"use strict";var e=require("@kdcloudjs/kwc"),t=require("../kddsCommon-CICoPypw.js");require("../observable-BXDJFaLN.js"),require("../i18n-CP31jeWH.js");var r=require("../normalize-DKPi18vK.js"),s=require("./utilsPrivate.js"),i=require("./shadowBaseClassPrivate.js");require("../empty_html-hFq4zm9t.js"),require("../client-Co_j5m_k.js"),require("../ssr-RXknEJpO.js"),require("./iso8601Utils.js"),require("../colorValid-BBnkvgd_.js");var n=[[t.stylesheet0]];const l=e.parseFragment`<span dir="ltr"${3}>${"t1"}</span>`,a=e.parseFragment`<a target="_blank"${"a0:href"} rel="noopener"${3}>${"t1"}</a>`;function o(e,t,r,s){const{d:i,sp:n,st:o,t:u,k:d,i:c,f:h}=e;return h([t.shouldFormat?null:t.ignoreRTL?o(l,1,[n(1,null,i(t.normalizedValue))]):null,t.shouldFormat||t.ignoreRTL?null:u(i(t.normalizedValue)),c(t.formattedParts,function(e){return[t.shouldFormat&&e.isLink?o(a,d(3,e.key),[n(0,{attrs:{href:e.href}},null),n(1,null,i(e.value))]):null,t.shouldFormat&&e.isText?u(i(e.value)):null]})])}var u=e.registerTemplate(o);o.stylesheets=[],o.stylesheetToken="kwc-2sj394kinr2",o.legacyStylesheetToken="D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\baseFormattedText-undefined_baseFormattedText",n&&o.stylesheets.push.apply(o.stylesheets,n),e.freezeTemplate(o);class d extends i{constructor(...e){super(...e),this.value="",this._linkify=!1}get linkify(){return this._linkify}set linkify(e){this._linkify=r.normalizeBoolean(e)}get shouldFormat(){return this.linkify&&this.isString}get isString(){return this.value&&"string"==typeof this.value}get isObject(){return"object"==typeof this.value}get normalizedValue(){return this.isObject?"":this.value}get formattedParts(){return this.isString?s.parseToFormattedLinkifiedParts(this.value,!0):[]}get ignoreRTL(){return s.isTextIgnoreRTL(this.value)}}e.registerDecorators(d,{publicProps:{value:{config:0},linkify:{config:3}},track:{_linkify:1}});const c=e.registerComponent(d,{tmpl:u,sel:"D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\baseFormattedText-",apiVersion:63});module.exports=c;
