layers-design-system 3.0.3 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{en-f63b4866.js → en-06d40df0.js} +1 -1
- package/dist/{es-eddf76e1.js → es-0b01587d.js} +1 -1
- package/dist/{index-f2e6beb3.js → index-9ea4fc54.js} +2 -2
- package/dist/layers-design-system.js +1 -1
- package/dist/layers-design-system.umd.cjs +2 -2
- package/dist/{main-136278ed.js → main-3f789b5f.js} +7 -8
- package/dist/{pt-br-64830261.js → pt-br-64aab668.js} +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -114,7 +114,7 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:r,curr
|
|
|
114
114
|
*/var jFe=Object.prototype.toString,Uu=Array.isArray||function(n){return jFe.call(n)==="[object Array]"};function L_(e){return typeof e=="function"}function PFe(e){return Uu(e)?"array":typeof e}function V_(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function t$(e,n){return e!=null&&typeof e=="object"&&n in e}function RFe(e,n){return e!=null&&typeof e!="object"&&e.hasOwnProperty&&e.hasOwnProperty(n)}var FFe=RegExp.prototype.test;function HFe(e,n){return FFe.call(e,n)}var UFe=/\S/;function YFe(e){return!HFe(UFe,e)}var WFe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function QFe(e){return String(e).replace(/[&<>"'`=\/]/g,function(o){return WFe[o]})}var KFe=/\s*/,qFe=/\s+/,n$=/\s*=/,GFe=/\s*\}/,XFe=/#|\^|\/|>|\{|&|=|!/;function ZFe(e,n){if(!e)return[];var o=!1,r=[],a=[],l=[],i=!1,s=!1,c="",d=0;function u(){if(i&&!s)for(;l.length;)delete a[l.pop()];else l=[];i=!1,s=!1}var f,p,m;function g(S){if(typeof S=="string"&&(S=S.split(qFe,2)),!Uu(S)||S.length!==2)throw new Error("Invalid tags: "+S);f=new RegExp(V_(S[0])+"\\s*"),p=new RegExp("\\s*"+V_(S[1])),m=new RegExp("\\s*"+V_("}"+S[1]))}g(n||ua.tags);for(var y=new dh(e),b,w,N,_,C,k;!y.eos();){if(b=y.pos,N=y.scanUntil(f),N)for(var E=0,T=N.length;E<T;++E)_=N.charAt(E),YFe(_)?(l.push(a.length),c+=_):(s=!0,o=!0,c+=" "),a.push(["text",_,b,b+1]),b+=1,_===`
|
|
115
115
|
`&&(u(),c="",d=0,o=!1);if(!y.scan(f))break;if(i=!0,w=y.scan(XFe)||"name",y.scan(KFe),w==="="?(N=y.scanUntil(n$),y.scan(n$),y.scanUntil(p)):w==="{"?(N=y.scanUntil(m),y.scan(GFe),y.scanUntil(p),w="&"):N=y.scanUntil(p),!y.scan(p))throw new Error("Unclosed tag at "+y.pos);if(w==">"?C=[w,N,b,y.pos,c,d,o]:C=[w,N,b,y.pos],d++,a.push(C),w==="#"||w==="^")r.push(C);else if(w==="/"){if(k=r.pop(),!k)throw new Error('Unopened section "'+N+'" at '+b);if(k[1]!==N)throw new Error('Unclosed section "'+k[1]+'" at '+b)}else w==="name"||w==="{"||w==="&"?s=!0:w==="="&&g(N)}if(u(),k=r.pop(),k)throw new Error('Unclosed section "'+k[1]+'" at '+y.pos);return eHe(JFe(a))}function JFe(e){for(var n=[],o,r,a=0,l=e.length;a<l;++a)o=e[a],o&&(o[0]==="text"&&r&&r[0]==="text"?(r[1]+=o[1],r[3]=o[3]):(n.push(o),r=o));return n}function eHe(e){for(var n=[],o=n,r=[],a,l,i=0,s=e.length;i<s;++i)switch(a=e[i],a[0]){case"#":case"^":o.push(a),r.push(a),o=a[4]=[];break;case"/":l=r.pop(),l[5]=a[2],o=r.length>0?r[r.length-1][4]:n;break;default:o.push(a)}return n}function dh(e){this.string=e,this.tail=e,this.pos=0}dh.prototype.eos=function(){return this.tail===""},dh.prototype.scan=function(n){var o=this.tail.match(n);if(!o||o.index!==0)return"";var r=o[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r},dh.prototype.scanUntil=function(n){var o=this.tail.search(n),r;switch(o){case-1:r=this.tail,this.tail="";break;case 0:r="";break;default:r=this.tail.substring(0,o),this.tail=this.tail.substring(o)}return this.pos+=r.length,r};function Yu(e,n){this.view=e,this.cache={".":this.view},this.parent=n}Yu.prototype.push=function(n){return new Yu(n,this)},Yu.prototype.lookup=function(n){var o=this.cache,r;if(o.hasOwnProperty(n))r=o[n];else{for(var a=this,l,i,s,c=!1;a;){if(n.indexOf(".")>0)for(l=a.view,i=n.split("."),s=0;l!=null&&s<i.length;)s===i.length-1&&(c=t$(l,i[s])||RFe(l,i[s])),l=l[i[s++]];else l=a.view[n],c=t$(a.view,n);if(c){r=l;break}a=a.parent}o[n]=r}return L_(r)&&(r=r.call(this.view)),r};function or(){this.templateCache={_cache:{},set:function(n,o){this._cache[n]=o},get:function(n){return this._cache[n]},clear:function(){this._cache={}}}}or.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()},or.prototype.parse=function(n,o){var r=this.templateCache,a=n+":"+(o||ua.tags).join(":"),l=typeof r<"u",i=l?r.get(a):void 0;return i==null&&(i=ZFe(n,o),l&&r.set(a,i)),i},or.prototype.render=function(n,o,r,a){var l=this.getConfigTags(a),i=this.parse(n,l),s=o instanceof Yu?o:new Yu(o,void 0);return this.renderTokens(i,s,r,n,a)},or.prototype.renderTokens=function(n,o,r,a,l){for(var i="",s,c,d,u=0,f=n.length;u<f;++u)d=void 0,s=n[u],c=s[0],c==="#"?d=this.renderSection(s,o,r,a,l):c==="^"?d=this.renderInverted(s,o,r,a,l):c===">"?d=this.renderPartial(s,o,r,l):c==="&"?d=this.unescapedValue(s,o):c==="name"?d=this.escapedValue(s,o,l):c==="text"&&(d=this.rawValue(s)),d!==void 0&&(i+=d);return i},or.prototype.renderSection=function(n,o,r,a,l){var i=this,s="",c=o.lookup(n[1]);function d(p){return i.render(p,o,r,l)}if(c){if(Uu(c))for(var u=0,f=c.length;u<f;++u)s+=this.renderTokens(n[4],o.push(c[u]),r,a,l);else if(typeof c=="object"||typeof c=="string"||typeof c=="number")s+=this.renderTokens(n[4],o.push(c),r,a,l);else if(L_(c)){if(typeof a!="string")throw new Error("Cannot use higher-order sections without the original template");c=c.call(o.view,a.slice(n[3],n[5]),d),c!=null&&(s+=c)}else s+=this.renderTokens(n[4],o,r,a,l);return s}},or.prototype.renderInverted=function(n,o,r,a,l){var i=o.lookup(n[1]);if(!i||Uu(i)&&i.length===0)return this.renderTokens(n[4],o,r,a,l)},or.prototype.indentPartial=function(n,o,r){for(var a=o.replace(/[^ \t]/g,""),l=n.split(`
|
|
116
116
|
`),i=0;i<l.length;i++)l[i].length&&(i>0||!r)&&(l[i]=a+l[i]);return l.join(`
|
|
117
|
-
`)},or.prototype.renderPartial=function(n,o,r,a){if(r){var l=this.getConfigTags(a),i=L_(r)?r(n[1]):r[n[1]];if(i!=null){var s=n[6],c=n[5],d=n[4],u=i;c==0&&d&&(u=this.indentPartial(i,d,s));var f=this.parse(u,l);return this.renderTokens(f,o,r,u,a)}}},or.prototype.unescapedValue=function(n,o){var r=o.lookup(n[1]);if(r!=null)return r},or.prototype.escapedValue=function(n,o,r){var a=this.getConfigEscape(r)||ua.escape,l=o.lookup(n[1]);if(l!=null)return typeof l=="number"&&a===ua.escape?String(l):a(l)},or.prototype.rawValue=function(n){return n[1]},or.prototype.getConfigTags=function(n){return Uu(n)?n:n&&typeof n=="object"?n.tags:void 0},or.prototype.getConfigEscape=function(n){if(n&&typeof n=="object"&&!Uu(n))return n.escape};var ua={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){uh.templateCache=e},get templateCache(){return uh.templateCache}},uh=new or;ua.clearCache=function(){return uh.clearCache()},ua.parse=function(n,o){return uh.parse(n,o)},ua.render=function(n,o,r,a){if(typeof n!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+PFe(n)+'" was given as the first argument for mustache#render(template, view, partials)');return uh.render(n,o,r,a)},ua.escape=QFe,ua.Scanner=dh,ua.Context=Yu,ua.Writer=or;const tHe={props:["value","schema","entity"],methods:{hasRouterLink(){return er(this.schema,"options.routerLink")},getRouterLink(){const e=er(this.schema,"options.routerLink");return ua.render(e,this.entity)}}},nHe={key:1};function oHe(e,n,o,r,a,l){const i=t.resolveComponent("router-link");return e.$options.methods.hasRouterLink(e.props)?(t.openBlock(),t.createBlock(i,{key:0,to:e.$options.methods.getRouterLink(e.props)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.value),1)]),_:1},8,["to"])):(t.openBlock(),t.createElementBlock("span",nHe,t.toDisplayString(o.value),1))}const rHe=lt(tHe,[["render",oHe]]),aHe={props:["value","schema"],methods:{formatValue(e){return e}}};function lHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("span",null,t.toDisplayString(e.$options.methods.formatValue(o.value)),1)}const iHe=lt(aHe,[["render",lHe]]),sHe={props:["value","schema"],methods:{formatValue(e){return isNaN(e)||e===null||e===void 0?"-":Number(e/100).toLocaleString("pt-BR",{style:"currency",currency:"BRL"})}}};function cHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("span",null,t.toDisplayString(e.$options.methods.formatValue(o.value)),1)}const dHe=lt(sHe,[["render",cHe]]),uHe={props:["value","schema"]},fHe=["href"];function pHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("a",{target:"_blank",href:`mailto:${o.value}`},t.toDisplayString(o.value),9,fHe)}const hHe=lt(uHe,[["render",pHe]]),mHe={props:["value","schema"],methods:{formatValue(e,n){if(!e)return"-";const o=er(n,"options.format","dd/MM/yyyy hh:mm:ss");return Ge(e).format(o)}}};function gHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("span",null,t.toDisplayString(e.$options.methods.formatValue(o.value,o.schema)),1)}const yHe=lt(mHe,[["render",gHe]]),o$={};o$.register=function(){hr.register({type:"String"},"default",rHe),hr.register({type:"Date"},"default",yHe),hr.register({type:"Number"},"default",iHe),hr.register({format:"Amount"},"default",dHe),hr.register({format:"Email"},"default",hHe)};const Odt="",bHe={props:{perPage:Number,pagesCount:Number,totalCount:Number,columnSpecs:{type:Array},includedIds:{type:Array},excludedIds:{type:Array},selectable:Boolean,clickable:Boolean,multiselect:Boolean,page:Object},data(e){return{checked:this.computeChecked(e)}},emits:["selected","click-item"],computed:{includedAll(){return this.includedIds.toString()==="*"},estimatedRows(){return this.page&&this.pagesCount>1&&this.page.index>=this.pagesCount-1?this.totalCount%this.perPage:this.perPage}},methods:{getColumnComponent(e){return e.component},getColumnValue(e,n){return er(e,n.path)},computeChecked(e){const n=e||this;if(!n.page||!n.page.data)return[];let o=n.includedIds,r=n.excludedIds,a=n.includedAll;return n.page.data.map(l=>a&&!r.includes(l.id)||o.includes(l.id))}},watch:{includedAll(){this.checked=this.computeChecked(this)},includedIds(){this.checked=this.computeChecked(this)},excludedIds(){this.checked=this.computeChecked(this)}}},MHe={class:"l-table-tbody"},wHe={key:"selector",class:"l-table-cell l-table-column-selector"},CHe=["onClick"],_He={key:"selector",class:"l-table-cell l-table-column-selector"},NHe={key:"selector",class:"l-table-cell l-table-column-selector"};function kHe(e,n,o,r,a,l){const i=t.resolveComponent("l-checkbox");return t.openBlock(),t.createElementBlock("tbody",MHe,[o.page&&o.page.loaded?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.page.data,(s,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c,class:t.normalizeClass({"l-table-selected":a.checked[c]})},[o.selectable?(t.openBlock(),t.createElementBlock("td",wHe,[t.createVNode(i,{modelValue:a.checked[c],"onUpdate:modelValue":d=>a.checked[c]=d,class:"l-table-selector",type:o.multiselect?"checkbox":"radio",onChange:()=>e.$emit("selected",{key:s.id,selected:e.$event})},null,8,["modelValue","onUpdate:modelValue","type","onChange"])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createElementBlock("td",{key:u,class:t.normalizeClass(["l-table-cell",`align-${d.align}${o.clickable?" cursor-pointer":""}`]),onClick:f=>e.$emit("click-item",s)},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.getColumnComponent(d)),{value:l.getColumnValue(s,d),schema:d,entity:s},null,8,["value","schema","entity"]))],10,CHe))),128))],2))),128)):o.page&&o.page.loading?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(l.estimatedRows,(s,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c},[o.selectable?(t.openBlock(),t.createElementBlock("td",_He,[t.createVNode(i,{disabled:"",class:"l-table-selector",type:o.multiselect?"checkbox":"radio",value:l.includedAll},null,8,["type","value"])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createElementBlock("td",{key:u,class:t.normalizeClass(["l-table-cell",`align-${d.align}`])},n[0]||(n[0]=[t.createElementVNode("span",{class:"l-table-skeleton"},null,-1)]),2))),128))]))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(l.estimatedRows,(s,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c},[o.selectable?(t.openBlock(),t.createElementBlock("td",NHe,[t.createVNode(i,{disabled:"",class:"l-table-selector",type:o.multiselect?"checkbox":"radio",checked:l.includedAll},null,8,["type","checked"])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createElementBlock("td",{key:u,class:t.normalizeClass(["l-table-cell",`align-${d.align}`])},n[1]||(n[1]=[t.createElementVNode("span",{class:"l-table-skeleton error"},null,-1)]),2))),128))]))),128))])}const EHe=lt(bHe,[["render",kHe]]),zdt="",xHe={props:{title:String,maxWidth:{type:Number,default:null},minWidth:{type:Number,default:50}},data(){return{dragging:!1,deltaX:0}},computed:{handleStyle(){return this.dragging?{transform:`translateX(${this.deltaX}px)`}:null}},methods:{currentWidth(){return this.$el.parentElement.getBoundingClientRect().width},limitDeltaX(e){let n=this.currentWidth();return this.limitWidth(n+e)-n},limitWidth(e){return e?this.maxWidth&&this.maxWidth<e?this.maxWidth:this.minWidth&&this.minWidth>e?this.minWidth:e:null},resize(e){this.$emit("resize",this.limitWidth(e))},drag(e){this.dragging||this.unregisterDocumentHandlers();let n=e.clientX-this.dragStartClientX;this.deltaX=this.limitDeltaX(n),console.log("drag",this.deltaX)},dragStart(e){this.registerDocumentHandlers(),this.deltaX=0,this.dragging=!0,this.dragStartClientX=e.clientX,console.log("dragStart",e)},dragEnd(e){if(this.deltaX){let n=this.currentWidth()+this.deltaX;this.resize(n)}this.unregisterDocumentHandlers(),this.deltaX=0,this.dragging=!1,this.dragStartClientX=0,console.log("dragEnd",e)},registerDocumentHandlers(){this.unregisterDocumentHandlers(),this._documentMouseMove=e=>this.drag(e),this._documentMouseUp=e=>this.dragEnd(e),document.body.style.cursor="col-resize",document.addEventListener("mousemove",this._documentMouseMove),document.addEventListener("mouseup",this._documentMouseUp),document.onselectstart=()=>!1,document.ondragstart=()=>!1},unregisterDocumentHandlers(){document.removeEventListener("mousemove",this._documentMouseMove),document.removeEventListener("mouseup",this._documentMouseUp),document.body.style.cursor="",document.onselectstart=null,document.ondragstart=null}}};function THe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["mt-handle",a.dragging?"dragging":""]),style:t.normalizeStyle(l.handleStyle),onDblclick:n[0]||(n[0]=i=>l.resize(null)),onMousedown:n[1]||(n[1]=(...i)=>l.dragStart&&l.dragStart(...i))},null,38)}const SHe=lt(xHe,[["render",THe]]),Bdt="",DHe={components:{LTableHeaderResizer:SHe},props:{spec:{type:Object}},emits:["spec:update"],data:e=>({localSpec:e.spec}),computed:{resizable(){return this.localSpec.field&&this.localSpec.field.resizable},reordable(){return!0},icon(){return this.$L.Icons.get(this.localSpec.field)}},methods:{resizeColumn(e,n){e.width=n},toggleSorting(e){let n=this.localSpec.column.sortDirection,o="asc";n?n.toLowerCase()==="asc"&&(o="desc"):o="asc",this.$emit("sort",{direction:o,cumulative:e})}},watch:{localSpec:{handler(e){this.$emit("spec:update",e)},deep:!0}}},vHe={key:1,class:"l-table-header-cell-content"};function IHe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-tooltip"),c=t.resolveComponent("LTableHeaderResizer");return t.openBlock(),t.createElementBlock("th",{class:"l-table-header-cell l-table-cell",style:t.normalizeStyle({"--l-table-col-width":o.spec.column.width?`${o.spec.column.width}px`:"auto"})},[o.spec.sortable?(t.openBlock(),t.createElementBlock("a",{key:0,href:"#",class:t.normalizeClass(["l-table-header-cell-content",[o.spec.column.sortDirection?"active":null,`l-table-header-align-${o.spec.align}`]]),onClick:n[0]||(n[0]=t.withModifiers(d=>l.toggleSorting(),["prevent"]))},[t.createVNode(s,{key:"tooltip",disabled:!o.spec.description,content:o.spec.description,placement:"top","open-delay":600,offset:0},{default:t.withCtx(()=>[t.createElementVNode("span",null,[l.icon?(t.openBlock(),t.createBlock(i,{key:0,class:"l-table-header-icon"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.icon),1)]),_:1})):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(o.spec.title),1)])]),_:1},8,["disabled","content"]),t.createElementVNode("i",{class:t.normalizeClass(["l-table-sorter-icon uil uil-arrow-down",`l-table-sorter-${o.spec.column.sortDirection||"default"}`])},null,2)],2)):(t.openBlock(),t.createElementBlock("span",vHe,[t.createVNode(s,{disabled:!o.spec.description,content:o.spec.description,placement:"top","open-delay":600,offset:0},{default:t.withCtx(()=>[t.createElementVNode("span",null,[l.icon?(t.openBlock(),t.createBlock(i,{key:0,class:"l-table-header-icon"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.icon),1)]),_:1})):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(o.spec.title),1)])]),_:1},8,["disabled","content"])])),n[2]||(n[2]=t.createElementVNode("span",{style:{width:"12px"}},null,-1)),l.resizable?(t.openBlock(),t.createBlock(c,{key:2,onResize:n[1]||(n[1]=d=>l.resizeColumn(o.spec.column,d))})):t.createCommentVNode("",!0)],4)}const AHe=lt(DHe,[["render",IHe]]),Ldt="",OHe={props:["loading"]};function zHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["l-table-header-loader",{loading:o.loading}])},null,2)}const BHe=lt(OHe,[["render",zHe]]),Vdt="",LHe={components:{LTableHeaderCell:AHe,LTableHeaderLoader:BHe},props:{columnSpecs:{type:Array},loading:{type:Boolean,default:!1},includedIds:{type:Array},excludedIds:{type:Array},total:{type:Number},selectable:{type:Boolean},multiselect:{type:Boolean}},data:e=>({localColumnSpecs:e.columnSpecs}),emits:["columnSpecs:update","selected"],computed:{selectedEverything(){let e=this.includedIds.length===this.total&&this.total>0,n=this.includedIds.toString()==="*"&&this.excludedIds.length==0;return e||n},selectedNothing(){return this.includedIds.length===0},selectedSomethings(){return!this.selectedNothing&&!this.selectedEverything}},methods:{changeSpecSort(e,{direction:n,cumulative:o}){if(o){let a=this.localColumnSpecs.reduce((l,i)=>Math.max(l,i.column.sortOrder),0)+1;e.column.sortOrder=a,e.column.sortDirection=n}else{for(let r of this.localColumnSpecs)r.column.sortOrder=null,r.column.sortDirection=null;e.column.sortOrder=1,e.column.sortDirection=n}},syncSpec(e){let n=this.localColumnSpecs.findIndex(o=>o.field===e.field);this.localColumnSpecs.splice(n,1,e)},changeSelection(e){this.$emit("selected",{key:"*",selected:e})}},watch:{localColumnSpecs:{handler(e){this.$emit("columnSpecs:update",e)},deep:!0}}},VHe={class:"l-table-header"},$He={key:0,scope:"col",class:"l-table-header-cell l-table-cell l-table-column-selector"},jHe={class:"l-table-header-extras"},PHe={colspan:"999"};function RHe(e,n,o,r,a,l){const i=t.resolveComponent("l-checkbox"),s=t.resolveComponent("LTableHeaderCell"),c=t.resolveComponent("LTableHeaderLoader");return t.openBlock(),t.createElementBlock("thead",VHe,[t.createElementVNode("tr",null,[o.selectable?(t.openBlock(),t.createElementBlock("th",$He,[o.multiselect?(t.openBlock(),t.createBlock(i,{key:0,class:"l-table-selector",type:"checkbox",value:l.selectedEverything,indeterminate:l.selectedSomethings,onChange:n[0]||(n[0]=d=>l.changeSelection(d))},null,8,["value","indeterminate"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createBlock(s,{key:u,spec:d,"onSpec:update":l.syncSpec,onSort:f=>l.changeSpecSort(d,f),ref_for:!0,ref:"headers"},null,8,["spec","onSpec:update","onSort"]))),128))]),t.createElementVNode("tr",jHe,[t.createElementVNode("td",PHe,[t.createVNode(c,{loading:o.loading},null,8,["loading"]),n[1]||(n[1]=t.createElementVNode("div",{class:"l-table-header-shadow-top"},null,-1))])])])}const FHe=lt(LHe,[["render",RHe]]),$dt="",HHe={},UHe={class:"l-table-endspace"};function YHe(e,n){return t.openBlock(),t.createElementBlock("div",UHe)}const WHe=lt(HHe,[["render",YHe]]),jdt="",QHe={props:{loading:Boolean,automatic:Boolean},mounted(){this.intersectionObserver=new IntersectionObserver(([e])=>{e&&e.isIntersecting&&this.automatic&&this.$emit("appeared")}),this.intersectionObserver.observe(this.$el)},unmounted(){this.intersectionObserver&&this.intersectionObserver.disconnect()}};function KHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["l-table-loadmore",{loading:o.loading}]),onClick:n[0]||(n[0]=i=>e.$emit("click"))},n[1]||(n[1]=[t.createElementVNode("a",{href:"#",class:"l-table-loadmore-link"},"Carregar mais",-1)]),2)}const qHe=lt(QHe,[["render",KHe]]),Pdt="",GHe=2e3,XHe={name:"LTableReloader",data(){return{canReload:!0}},methods:{reload(){this.canReload=!1,this.$emit("reload"),setTimeout(()=>this.canReload=!0,GHe)}}},ZHe={class:"l-table-reloader"},JHe={class:"l-table-reloader-content"};function eUe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-button");return t.openBlock(),t.createElementBlock("div",ZHe,[t.createElementVNode("div",JHe,[t.createVNode(i,{size:"22"},{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode("uil-cloud-exclamation")])),_:1}),n[3]||(n[3]=t.createElementVNode("span",{style:{"margin-left":"8px",flex:"1 1"}},"Algumas informações não puderam ser carregadas.",-1)),t.createVNode(s,{size:"mini",onClick:n[0]||(n[0]=c=>l.reload())},{default:t.withCtx(()=>n[2]||(n[2]=[t.createTextVNode("Recarregar")])),_:1})])])}const tUe=lt(XHe,[["render",eUe]]),Rdt="",nUe={props:{height:{type:Number}}},oUe={class:"l-table-spacer"};function rUe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("tbody",oUe,[t.createElementVNode("tr",{style:t.normalizeStyle({height:`${o.height}px`})},n[0]||(n[0]=[t.createElementVNode("td",{class:"l-table-spacer-bg",colspan:"999"},null,-1)]),4)])}const aUe=lt(nUe,[["render",rUe]]);var lUe=T9;function iUe(e){var n=e==null?0:e.length;return n?lUe(e,1):[]}var sUe=iUe;const cUe=qn(sUe);function dUe(){}var uUe=dUe,$_=CB,fUe=uUe,pUe=lC,hUe=1/0,mUe=$_&&1/pUe(new $_([,-0]))[1]==hUe?function(e){return new $_(e)}:fUe,gUe=mUe,yUe=rC,bUe=_9,MUe=N9,wUe=aC,CUe=gUe,_Ue=lC,NUe=200;function kUe(e,n,o){var r=-1,a=bUe,l=e.length,i=!0,s=[],c=s;if(o)i=!1,a=MUe;else if(l>=NUe){var d=n?null:CUe(e);if(d)return _Ue(d);i=!1,a=wUe,c=new yUe}else c=n?[]:s;e:for(;++r<l;){var u=e[r],f=n?n(u):u;if(u=o||u!==0?u:0,i&&f===f){for(var p=c.length;p--;)if(c[p]===f)continue e;n&&c.push(f),s.push(u)}else a(c,f,o)||(c!==s&&c.push(f),s.push(u))}return s}var EUe=kUe,xUe=EUe;function TUe(e){return e&&e.length?xUe(e):[]}var SUe=TUe;const DUe=qn(SUe);function vUe({key:e,selected:n},o){let{loadedPages:r,allowInvertedSelection:a,includedIds:l,excludedIds:i,multiselect:s,itemToId:c=m=>m}=o;if(!e===void 0||e===null)return{includedIds:l,excludedIds:i};if(e==="*"){if(l.splice(0,l.length),i.splice(0,i.length),n&&s&&a&&l.push("*"),n&&s&&!a){let m=cUe(r.filter(y=>y.data).map(y=>y.data));l=DUe(m.map(y=>c(y)))}return{includedIds:l,excludedIds:i}}let u=l.includes("*"),f=l.includes(e),p=i.includes(e);if(s||(l.splice(0,l.length),i.splice(0,i.length)),u&&s){if(n&&p){let m=i.indexOf(e);i.splice(m,1)}!n&&!p&&s&&i.push(e)}else if(n&&!f&&(s?l.push(e):l=[e]),!n&&f){let m=l.indexOf(e);l.splice(m,1)}return{includedIds:l,excludedIds:i}}function IUe({pagesCount:e,currentPage:n,endingAdjacents:o=1,adjacents:r=2,next:a=!0,previous:l=!0,last:i=!1,first:s=!1,fixedWidth:c=!0}){const d=[];if(!e)return d;const u=c?o*2+r*2+3:o*2+1;if(e<=u)for(let f=0;f<e;f++)d.push(f);else{let f=0;for(let y=0;y<Math.min(o,e);y++)d.push(f=y);let p=o+r*2,m=r,g=r;c&&n<p&&(g+=p-n),c&&e-n-1<p&&(m+=p-(e-n-1));for(let y=Math.max(f+1,n-m);y<Math.min(n+g+1,e);y++)f+2===y&&d.push(f=f+1),f+1!==y&&d.push("...1"),d.push(f=y);for(let y=Math.max(f+1,e-o);y<e;y++)f+2===y&&d.push(f=f+1),f+1!==y&&d.push("...2"),d.push(f=y)}return l&&d.unshift("<"),a&&d.push(">"),s&&d.unshift("<<"),i&&d.push(">>"),d}const Fdt="",AUe={name:"LTablePagination",props:{pagesCount:Number,totalCount:Number,currentPage:{type:Number,default:2}},computed:{visiblePages(){return this.totalCount?IUe({pagesCount:this.pagesCount,currentPage:this.currentPage,adjacents:1,endingAdjacents:1,fixedWidth:!0}):["...1"]}},methods:{clicked(e){typeof e=="number"?this.goto(parseInt(e)):e==="<"?this.goto(this.currentPage-1):e===">"?this.goto(this.currentPage+1):e==="<<"?this.goto(0):e===">>"&&this.goto(this.pagesCount-1)},goto(e){this.currentPage!=e&&(e=Math.max(0,Math.min(e,this.pagesCount-1)),this.$emit("goto",e))}}},OUe={class:"l-table-pagination"},zUe=["onClick"];function BUe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon");return t.openBlock(),t.createElementBlock("div",OUe,[t.createVNode(t.TransitionGroup,{tag:"div",class:"l-table-pagination-pages",name:"l-table-pagination-transition"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.visiblePages,s=>(t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["l-table-pagination-page-item",{active:s==o.currentPage}]),key:s,onClick:c=>l.clicked(s)},[s==="<"?(t.openBlock(),t.createBlock(i,{key:0,size:"20"},{default:t.withCtx(()=>n[0]||(n[0]=[t.createTextVNode("uil-angle-left")])),_:1})):s===">"?(t.openBlock(),t.createBlock(i,{key:1,size:"20"},{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode("uil-angle-right")])),_:1})):s==="...1"||s==="...2"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createTextVNode(" ... ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.createTextVNode(t.toDisplayString(s+1),1)],64))],10,zUe))),128))]),_:1})])}const LUe=lt(AUe,[["render",BUe]]),Hdt="";o$.register();const VUe=100,$Ue=3e4,jUe=3,PUe="scrollBehavior"in document.documentElement.style,RUe={name:"LTable",tagName:"l-table",components:{LTableHeader:FHe,LTableBody:EHe,LTableReloader:tUe,LTableLoadMore:qHe,LTableEndspace:WHe,LTableBodySpacer:aUe,LTablePagination:LUe},props:{rows:{type:Array},primaryKey:{type:String,default:"id"},fetch:{type:Function},columns:{type:Array},pagination:{type:Boolean,default:!1},display:{type:String,enum:["all","more","paged"],default:"all"},autoLoadMore:{type:Boolean,default:!1},schema:{type:Object,required:!0},selectable:{type:Boolean,default:!1},clickable:{type:Boolean,default:!1},multiselect:{type:Boolean,default:!0},allowInvertedSelection:{type:Boolean,default:!0},rowHeight:{type:Number,default:32},borderTick:{type:Number,default:1},snapToPageOnMore:{type:Boolean,default:!0},stickyColumnLeft:{type:Boolean,default:!1},recycle:{type:Boolean,default:!0},limitPerPage:{type:Number,default:50}},mounted(){this.computeVisibleRows()},data(e){let n=[];return e.columns.length&&(n=e.columns.map(o=>this.buildColumnSpec(o))),{fetching:0,headerHeight:56,nonce:0,id:0,extraRows:15,lastComputedOffsetY:0,includedIds:[],excludedIds:[],scrollAtTop:!0,scrollAtLeft:!0,totalCount:0,firstPage:null,currentPage:null,lastPage:null,loadedPages:[],columnSpecs:n}},watch:{totalCount(e){this.$emit("changeSelection",{includedIds:this.includedIds,excludedIds:this.excludedIds,selectionCount:this.selectionCount,totalCount:e})},somePageIsLoading(e){this.$emit("loading",e)}},computed:{perPage(){return Number(this.limitPerPage)},pagesCount(){return Math.floor(this.totalCount/this.perPage)+1},selectionCount(){return this.includedIds.toString()==="*"?this.totalCount-this.excludedIds.length:this.includedIds.length},lastLoadedPage(){return this.loadedPages.length},isLoadMoreVisible(){return this.display==="more"&&this.lastLoadedPage<this.pagesCount},isPaginationVisible(){return(this.display==="page"||!!this.pagination)&&this.display!=="more"&&this.pagesCount!==null},isLeftColumnSticky(){return this.stickyColumnLeft||this.columns&&this.columns[0]&&this.columns[0].sticky},usingRecycledLayout(){return this.display!=="paged"&&this.recycle},hasVisibleFailedPages(){for(let e=this.firstPageRendered;e<=this.lastPageRendered;e++)if(this.loadedPages[e]&&this.loadedPages[e].failed)return!0;return!1},firstPageRendered(){return!this.usingRecycledLayout&&this.display!=="paged"?0:this.firstPage},lastPageRendered(){return this.display==="paged"?this.firstPage:this.usingRecycledLayout?this.lastPage:Math.max(0,this.lastLoadedPage-1)},visiblePages(){let e=[];for(let n=this.firstPageRendered;n<=this.lastPageRendered;n++){let o=this.loadedPages[n]||{index:n};e.push(o)}return e},contentStyle(){return{"--l-table-primary-color":"#2F8AF5","--l-table-warning-color":"#fd3a57","--l-table-bg-color":"white","--l-table-header-height":`${this.headerHeight}px`,"--l-table-header-text-color":"#232B34","--l-table-header-border-color":"#E8E8E8","--l-table-skeleton-height":`${Math.min(this.rowHeight-8,8)}px`,"--l-table-loader-height":"3px","--l-table-loader-color":"var(--l-table-primary-color)","--l-table-row-height":`${this.rowHeight}px`,"--l-table-cell-padding":"0 8px","--l-table-row-hover-color":"#fafbfd","--l-table-row-selected-color":"#eef5fa","--l-table-row-selected-hover-color":"#e6f0f8","--l-table-border-color":"#D3DAE6","--l-table-border-tick":`${this.borderTick}px`,"--l-table-selector-width":`${this.selectable?Math.min(this.headerHeight,this.rowHeight):0}px`,"--l-table-loadmore-height":"46px","--l-table-pagination-height":"48px","--l-table-pagination-color":"var(--l-table-primary-color)","--l-table-pagination-bg-color":"white","--l-table-reloader-margin":"16px","--l-table-endspace-bg-color":"#f5f5f5","--l-table-link-color":"var(--l-table-primary-color)"}},contentClasses(){return{"l-table-at-top":this.scrollAtTop,"l-table-at-left":this.scrollAtLeft,"l-table-sticky-column-left":this.isLeftColumnSticky}},spacing(){let e=0,n=0,o=this.display,r=this.totalCount;return o==="more"&&(r=this.loadedPages.length*this.perPage),(o==="all"||o==="more")&&(e=this.firstPageRendered*this.perPage*this.rowHeight,n=Math.max(0,(r-(this.lastPageRendered+1)*this.perPage)*this.rowHeight)),{top:Math.max(0,e),bottom:Math.max(0,n)}},rect(){return this.$refs.container.getBoundingClientRect()},somePageIsLoading(){return this.loadedPages.map(e=>e.loading).some(e=>e)}},methods:{itemToId(e){return e?this.primaryKey?e[this.primaryKey]:e:null},scrollTo(e=0,n){let o="auto";if(n){let r=this.$refs.container.scrollTop,a=this.perPage*this.rowHeight+1;o=Math.abs(r-e)<a?"smooth":"auto"}this.$refs.container.scrollTo({top:e,behavior:o})},gotoPage(e,n){if(e=Math.max(0,Math.min(this.pagesCount,e)),this.display==="paged"){this.setViewablePages(e,e,e),this.scrollTo(0,!0);return}this.display==="more"?this.setViewablePages(e-1,e,e):this.setViewablePages(e,e,e);let o=e*this.rowHeight*this.perPage;this.scrollTo(o,n)},async loadMore(e){let n=this.loadedPages[this.loadedPages.length-1];if(!n||n.loading)return!1;let o=this.loadedPages.length;this.setViewablePages(this.firstPage,o),e&&this.snapToPageOnMore&&PUe&&setTimeout(()=>this.gotoPage(o,!0),100)},reload(){this.id++,this.fetching=0,this.firstPage=null,this.lastPage=null,this.totalCount=null,this.loadedPages=[],this.includedIds=[],this.excludedIds=[],this.gotoPage(0),this.computeVisibleRows()},reloadFailedPages(){let e=0;for(let n=this.firstPageRendered;n<=this.lastPageRendered&&!(!(!this.loadedPages[n]||!this.loadedPages[n].failed)&&(this.loadedPages[n]=null,this.fetchPage(n),++e>=jUe));n++);},onScroll(){if(!(this.getScrollSpeed()>$Ue)&&!this._scrollDebounce)return this.computeVisibleRows();clearTimeout(this._scrollDebounce),this._scrollDebounce=setTimeout(()=>{this.computeVisibleRows(),this._scrollDebounce=null},VUe)},getScrollSpeed(){let e=this._lastOffsetY||0,n=this._lastOffsetYTime||0,o=this._lastOffsetY=this.$refs.container.scrollTop,r=this._lastOffsetYTime=Date.now();return Math.abs(1e3*(e-o)/(r-n))},computeVisibleRows(){let e=this.$refs.container.scrollTop,n=this.$refs.container.scrollLeft,o=this.lastComputedOffsetY;this.scrollAtTop=e===0,this.scrollAtLeft=n===0;let r=Math.abs(o-e);if(e>2&&o>2&&r<150||(this.lastComputedOffsetY=e,this.display==="paged"))return;let l=this.rect.height-this.headerHeight,i=Math.max(0,Math.floor(e/this.rowHeight)),s=Math.ceil(l/this.rowHeight),c=i+s,d=this.extraRows,u=this.perPage,f=Math.floor((i-d)/this.perPage),p=Math.floor((c+d)/u),m=p>=this.pagesCount-1?s:s/2,g=Math.floor((i+m)/this.perPage);if(this.display==="more"){for(f=Math.min(f,this.lastLoadedPage);!this.loadedPages[f]&&f>0;)f--;for(p=Math.max(p,f);!this.loadedPages[p]&&p>f&&p>0;)p--}this.setViewablePages(f,p,g)},setViewablePages(e=0,n=0,o=0){this.display==="paged"&&(n=e),e=Math.min(Math.max(e,0),this.pagesCount-1),n=Math.min(Math.max(n,e),this.pagesCount-1),o=Math.min(n,Math.max(e,o||0));let r=e!==this.firstPage||n!==this.lastPage;this.firstPage=e,this.lastPage=n,this.currentPage=o,r&&this.scheduleFeching()},buildColumnSpec(e){if(!this.schema.fields)throw new Error("Missing schema.fields!");const n=this.schema.fields.find(r=>r.path===e.path);if(!n)throw new Error(`Missing field schema for path ${e.path}`);const o=this.$L.FieldTypeComponents.get(n,"default");return Object.assign({},n,{width:e.width||null,sortable:n?n.sortable:!1,sticky:n&&n.sticky||e.sticky||!1,align:n&&n.align||"left",column:e,field:n,component:o})},handleColumnSpecsUpdate(e){this.columnSpecs=e},changeSelection({key:e,selected:n}){const{includedIds:o,excludedIds:r}=vUe({key:e,selected:n},this);this.includedIds=o,this.excludedIds=r,this.$nextTick(()=>{this.$emit("changeSelection",{includedIds:this.includedIds,excludedIds:this.excludedIds,selectionCount:this.selectionCount,totalCount:this.totalCount})})},scheduleFeching(){for(let e=this.firstPage;e<=this.lastPage;e++)this.fetchPage(e)},async fetchPage(e){let n=this.loadedPages[e];if(n)return n;n=this.loadedPages[e]={id:this.id,index:e,startedAt:Date.now(),duration:null,loading:!0,loaded:!1,failed:!1,error:null,data:null};try{this.fetching++;const{hits:o,total:r}=await this.resolvePageData(e);Object.assign(n,{duration:Date.now()-n.startedAt,loading:!1,loaded:!0,data:o});let a=this.loadedPages.indexOf(n)>=0;r!==void 0&&a&&(this.totalCount=r)}catch(o){console.error("LTable","Failed to call `fetch` callback",o),Object.assign(n,{loading:!1,failed:!0,error:o.toString()})}finally{this.id===n.id&&this.fetching--}return n},async resolvePageData(e){if(this.rows){let n=this.perPage,o=e*n;return{data:this.rows.slice(o,o+n),total:this.rows.length}}else{if(this.fetch)return await this.fetch({page:e,offset:e*this.perPage,limit:this.perPage,schema:this.schema,columns:this.columns,perPage:this.perPage,primaryKey:this.primaryKey});throw new Error("Cannot discover data. Either `rows` or `fetch` property must be assigned to table")}}}},FUe={class:"l-table-table",border:"0"};function HUe(e,n,o,r,a,l){const i=t.resolveComponent("LTableHeader"),s=t.resolveComponent("LTableBodySpacer"),c=t.resolveComponent("LTableBody"),d=t.resolveComponent("LTableLoadMore"),u=t.resolveComponent("LTableEndspace"),f=t.resolveComponent("LTableReloader"),p=t.resolveComponent("LTablePagination");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["l-table-container",l.contentClasses]),ref:"container",style:t.normalizeStyle(l.contentStyle),onScroll:n[7]||(n[7]=(...m)=>l.onScroll&&l.onScroll(...m))},[t.createElementVNode("table",FUe,[n[8]||(n[8]=t.createElementVNode("caption",{style:{display:"none"}}," Table Header ",-1)),t.createVNode(i,{height:a.headerHeight,selectable:o.selectable,columnSpecs:a.columnSpecs,loading:!!a.fetching,total:a.totalCount,includedIds:a.includedIds,excludedIds:a.excludedIds,multiselect:o.multiselect,onSelected:n[0]||(n[0]=m=>l.changeSelection(m)),"onColumnSpecs:update":l.handleColumnSpecsUpdate},null,8,["height","selectable","columnSpecs","loading","total","includedIds","excludedIds","multiselect","onColumnSpecs:update"]),t.createVNode(s,{height:l.spacing.top},null,8,["height"]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.visiblePages,m=>(t.openBlock(),t.createBlock(c,{key:m.index,page:m,perPage:l.perPage,pagesCount:l.pagesCount,totalCount:a.totalCount,selectable:o.selectable,clickable:o.clickable,columnSpecs:a.columnSpecs,includedIds:a.includedIds,excludedIds:a.excludedIds,multiselect:o.multiselect,onClickItem:n[1]||(n[1]=g=>e.$emit("click-item",g)),onSelected:n[2]||(n[2]=g=>l.changeSelection(g))},null,8,["page","perPage","pagesCount","totalCount","selectable","clickable","columnSpecs","includedIds","excludedIds","multiselect"]))),128)),t.createVNode(s,{height:l.spacing.bottom},null,8,["height"])]),l.isLoadMoreVisible?(t.openBlock(),t.createBlock(d,{key:0,onClick:n[3]||(n[3]=m=>l.loadMore(!0)),onAppeared:n[4]||(n[4]=m=>l.loadMore()),automatic:o.autoLoadMore},null,8,["automatic"])):t.createCommentVNode("",!0),t.createVNode(u),t.createVNode(t.Transition,{name:"scale-up"},{default:t.withCtx(()=>[l.hasVisibleFailedPages?(t.openBlock(),t.createBlock(f,{key:0,onReload:n[5]||(n[5]=m=>l.reloadFailedPages())})):t.createCommentVNode("",!0)]),_:1}),l.isPaginationVisible?(t.openBlock(),t.createBlock(p,{key:1,currentPage:a.currentPage,pagesCount:l.pagesCount,totalCount:a.totalCount,onGoto:n[6]||(n[6]=m=>l.gotoPage(m))},null,8,["currentPage","pagesCount","totalCount"])):t.createCommentVNode("",!0)],38)}const UUe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(RUe,[["render",HUe]])},Symbol.toStringTag,{value:"Module"})),Ydt="",YUe={name:"LTabs",components:{ElTabs:bw},methods:{calcPaneInstances(e=!1){if(this.$slots.default){const o=this.$slots.default.filter(a=>a.tag&&a.componentOptions&&a.componentOptions.Ctor.options.tagName==="l-tab-pane").map(({componentInstance:a})=>a),r=!(o.length===this.panes.length&&o.every((a,l)=>a===this.panes[l]));(e||r)&&(this.panes=o)}else this.panes.length!==0&&(this.panes=[])}},data(){return{panes:[]}}};function WUe(e,n,o,r,a,l){const i=t.resolveComponent("el-tabs");return t.openBlock(),t.createBlock(i,t.normalizeProps(t.guardReactiveProps(e.$attrs)),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},16)}const QUe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(YUe,[["render",WUe],["__scopeId","data-v-66db6dd7"]])},Symbol.toStringTag,{value:"Module"})),KUe={tagName:"l-target-chip",name:"LTargetChip",props:{kind:{type:String,required:!0},closeable:{type:Boolean,default:!1},name:{type:String,required:!0},count:{type:Number}},computed:{color:function(){return{member:"purple",group:"aqua",user:"link",tag:"warning",community:"danger",role:"lead-light"}[this.kind]||"lead"},icon:function(){return{member:"uil-graduation-cap",group:"uil-users-alt",user:"uil-user",tag:"uil-tag-alt",role:"uil-user",community:"uil-channel"}[this.kind]}}},qUe={class:"l-d-flex l-align-items"};function GUe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-chip");return t.openBlock(),t.createBlock(s,{style:{height:"24px"},bold:"",fill:"",color:l.color,icon:l.icon},{default:t.withCtx(()=>[t.createElementVNode("div",qUe,[t.createTextVNode(t.toDisplayString(o.count)+" "+t.toDisplayString(o.name)+" ",1),o.closeable?(t.openBlock(),t.createBlock(i,{key:0,onClick:n[0]||(n[0]=c=>e.$emit("remove")),class:"l-d-flex l-align-items-center ml-1 mr-0",style:{cursor:"pointer"},size:"15"},{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode(" uis-times-circle ")])),_:1})):t.createCommentVNode("",!0)])]),_:1},8,["color","icon"])}const XUe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(KUe,[["render",GUe]])},Symbol.toStringTag,{value:"Module"})),Kdt="",ZUe={tagName:"l-target-input",name:"LTargetInput",props:{topics:{type:Array,required:!0},limit:{type:Number,default:3},editable:{type:Boolean,default:!1}},computed:{topicsToShow(){return this.topics.slice(0,this.limit)},moreTopicsText(){const e=this.topics.length-this.limit>1;return`+ ${this.topics.length-this.limit} destinatário`+(e?"s":"")}}};function JUe(e,n,o,r,a,l){const i=t.resolveComponent("l-target-chip"),s=t.resolveComponent("l-chip");return o.topics&&o.topics.length?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass("l-target-input"+(o.editable?" editable":""))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.topicsToShow,c=>(t.openBlock(),t.createBlock(i,{kind:c.kind,name:c.name,key:c.id,class:"mr-2 mb-2"},null,8,["kind","name"]))),128)),o.topics.length>this.limit?(t.openBlock(),t.createBlock(s,{key:0,color:"purple",class:"mb-2",fill:"","hide-icon":""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.moreTopicsText),1)]),_:1})):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0)}const eYe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(ZUe,[["render",JUe],["__scopeId","data-v-1da7433b"]])},Symbol.toStringTag,{value:"Module"}));function So(e){this.content=e}So.prototype={constructor:So,find:function(e){for(var n=0;n<this.content.length;n+=2)if(this.content[n]===e)return n;return-1},get:function(e){var n=this.find(e);return n==-1?void 0:this.content[n+1]},update:function(e,n,o){var r=o&&o!=e?this.remove(o):this,a=r.find(e),l=r.content.slice();return a==-1?l.push(o||e,n):(l[a+1]=n,o&&(l[a]=o)),new So(l)},remove:function(e){var n=this.find(e);if(n==-1)return this;var o=this.content.slice();return o.splice(n,2),new So(o)},addToStart:function(e,n){return new So([e,n].concat(this.remove(e).content))},addToEnd:function(e,n){var o=this.remove(e).content.slice();return o.push(e,n),new So(o)},addBefore:function(e,n,o){var r=this.remove(n),a=r.content.slice(),l=r.find(e);return a.splice(l==-1?a.length:l,0,n,o),new So(a)},forEach:function(e){for(var n=0;n<this.content.length;n+=2)e(this.content[n],this.content[n+1])},prepend:function(e){return e=So.from(e),e.size?new So(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=So.from(e),e.size?new So(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var n=this;e=So.from(e);for(var o=0;o<e.content.length;o+=2)n=n.remove(e.content[o]);return n},toObject:function(){var e={};return this.forEach(function(n,o){e[n]=o}),e},get size(){return this.content.length>>1}},So.from=function(e){if(e instanceof So)return e;var n=[];if(e)for(var o in e)n.push(o,e[o]);return new So(n)};function r$(e,n,o){for(let r=0;;r++){if(r==e.childCount||r==n.childCount)return e.childCount==n.childCount?null:o;let a=e.child(r),l=n.child(r);if(a==l){o+=a.nodeSize;continue}if(!a.sameMarkup(l))return o;if(a.isText&&a.text!=l.text){for(let i=0;a.text[i]==l.text[i];i++)o++;return o}if(a.content.size||l.content.size){let i=r$(a.content,l.content,o+1);if(i!=null)return i}o+=a.nodeSize}}function a$(e,n,o,r){for(let a=e.childCount,l=n.childCount;;){if(a==0||l==0)return a==l?null:{a:o,b:r};let i=e.child(--a),s=n.child(--l),c=i.nodeSize;if(i==s){o-=c,r-=c;continue}if(!i.sameMarkup(s))return{a:o,b:r};if(i.isText&&i.text!=s.text){let d=0,u=Math.min(i.text.length,s.text.length);for(;d<u&&i.text[i.text.length-d-1]==s.text[s.text.length-d-1];)d++,o--,r--;return{a:o,b:r}}if(i.content.size||s.content.size){let d=a$(i.content,s.content,o-1,r-1);if(d)return d}o-=c,r-=c}}class Ye{constructor(n,o){if(this.content=n,this.size=o||0,o==null)for(let r=0;r<n.length;r++)this.size+=n[r].nodeSize}nodesBetween(n,o,r,a=0,l){for(let i=0,s=0;s<o;i++){let c=this.content[i],d=s+c.nodeSize;if(d>n&&r(c,a+s,l||null,i)!==!1&&c.content.size){let u=s+1;c.nodesBetween(Math.max(0,n-u),Math.min(c.content.size,o-u),r,a+u)}s=d}}descendants(n){this.nodesBetween(0,this.size,n)}textBetween(n,o,r,a){let l="",i=!0;return this.nodesBetween(n,o,(s,c)=>{let d=s.isText?s.text.slice(Math.max(n,c)-c,o-c):s.isLeaf?a?typeof a=="function"?a(s):a:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&d||s.isTextblock)&&r&&(i?i=!1:l+=r),l+=d},0),l}append(n){if(!n.size)return this;if(!this.size)return n;let o=this.lastChild,r=n.firstChild,a=this.content.slice(),l=0;for(o.isText&&o.sameMarkup(r)&&(a[a.length-1]=o.withText(o.text+r.text),l=1);l<n.content.length;l++)a.push(n.content[l]);return new Ye(a,this.size+n.size)}cut(n,o=this.size){if(n==0&&o==this.size)return this;let r=[],a=0;if(o>n)for(let l=0,i=0;i<o;l++){let s=this.content[l],c=i+s.nodeSize;c>n&&((i<n||c>o)&&(s.isText?s=s.cut(Math.max(0,n-i),Math.min(s.text.length,o-i)):s=s.cut(Math.max(0,n-i-1),Math.min(s.content.size,o-i-1))),r.push(s),a+=s.nodeSize),i=c}return new Ye(r,a)}cutByIndex(n,o){return n==o?Ye.empty:n==0&&o==this.content.length?this:new Ye(this.content.slice(n,o))}replaceChild(n,o){let r=this.content[n];if(r==o)return this;let a=this.content.slice(),l=this.size+o.nodeSize-r.nodeSize;return a[n]=o,new Ye(a,l)}addToStart(n){return new Ye([n].concat(this.content),this.size+n.nodeSize)}addToEnd(n){return new Ye(this.content.concat(n),this.size+n.nodeSize)}eq(n){if(this.content.length!=n.content.length)return!1;for(let o=0;o<this.content.length;o++)if(!this.content[o].eq(n.content[o]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(n){let o=this.content[n];if(!o)throw new RangeError("Index "+n+" out of range for "+this);return o}maybeChild(n){return this.content[n]||null}forEach(n){for(let o=0,r=0;o<this.content.length;o++){let a=this.content[o];n(a,r,o),r+=a.nodeSize}}findDiffStart(n,o=0){return r$(this,n,o)}findDiffEnd(n,o=this.size,r=n.size){return a$(this,n,o,r)}findIndex(n,o=-1){if(n==0)return _1(0,n);if(n==this.size)return _1(this.content.length,n);if(n>this.size||n<0)throw new RangeError(`Position ${n} outside of fragment (${this})`);for(let r=0,a=0;;r++){let l=this.child(r),i=a+l.nodeSize;if(i>=n)return i==n||o>0?_1(r+1,i):_1(r,a);a=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(n=>n.toJSON()):null}static fromJSON(n,o){if(!o)return Ye.empty;if(!Array.isArray(o))throw new RangeError("Invalid input for Fragment.fromJSON");return new Ye(o.map(n.nodeFromJSON))}static fromArray(n){if(!n.length)return Ye.empty;let o,r=0;for(let a=0;a<n.length;a++){let l=n[a];r+=l.nodeSize,a&&l.isText&&n[a-1].sameMarkup(l)?(o||(o=n.slice(0,a)),o[o.length-1]=l.withText(o[o.length-1].text+l.text)):o&&o.push(l)}return new Ye(o||n,r)}static from(n){if(!n)return Ye.empty;if(n instanceof Ye)return n;if(Array.isArray(n))return this.fromArray(n);if(n.attrs)return new Ye([n],n.nodeSize);throw new RangeError("Can not convert "+n+" to a Fragment"+(n.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Ye.empty=new Ye([],0);const j_={index:0,offset:0};function _1(e,n){return j_.index=e,j_.offset=n,j_}function N1(e,n){if(e===n)return!0;if(!(e&&typeof e=="object")||!(n&&typeof n=="object"))return!1;let o=Array.isArray(e);if(Array.isArray(n)!=o)return!1;if(o){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!N1(e[r],n[r]))return!1}else{for(let r in e)if(!(r in n)||!N1(e[r],n[r]))return!1;for(let r in n)if(!(r in e))return!1}return!0}let mn=class aE{constructor(n,o){this.type=n,this.attrs=o}addToSet(n){let o,r=!1;for(let a=0;a<n.length;a++){let l=n[a];if(this.eq(l))return n;if(this.type.excludes(l.type))o||(o=n.slice(0,a));else{if(l.type.excludes(this.type))return n;!r&&l.type.rank>this.type.rank&&(o||(o=n.slice(0,a)),o.push(this),r=!0),o&&o.push(l)}}return o||(o=n.slice()),r||o.push(this),o}removeFromSet(n){for(let o=0;o<n.length;o++)if(this.eq(n[o]))return n.slice(0,o).concat(n.slice(o+1));return n}isInSet(n){for(let o=0;o<n.length;o++)if(this.eq(n[o]))return!0;return!1}eq(n){return this==n||this.type==n.type&&N1(this.attrs,n.attrs)}toJSON(){let n={type:this.type.name};for(let o in this.attrs){n.attrs=this.attrs;break}return n}static fromJSON(n,o){if(!o)throw new RangeError("Invalid input for Mark.fromJSON");let r=n.marks[o.type];if(!r)throw new RangeError(`There is no mark type ${o.type} in this schema`);let a=r.create(o.attrs);return r.checkAttrs(a.attrs),a}static sameSet(n,o){if(n==o)return!0;if(n.length!=o.length)return!1;for(let r=0;r<n.length;r++)if(!n[r].eq(o[r]))return!1;return!0}static setFrom(n){if(!n||Array.isArray(n)&&n.length==0)return aE.none;if(n instanceof aE)return[n];let o=n.slice();return o.sort((r,a)=>r.type.rank-a.type.rank),o}};mn.none=[];class k1 extends Error{}class ct{constructor(n,o,r){this.content=n,this.openStart=o,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(n,o){let r=i$(this.content,n+this.openStart,o);return r&&new ct(r,this.openStart,this.openEnd)}removeBetween(n,o){return new ct(l$(this.content,n+this.openStart,o+this.openStart),this.openStart,this.openEnd)}eq(n){return this.content.eq(n.content)&&this.openStart==n.openStart&&this.openEnd==n.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let n={content:this.content.toJSON()};return this.openStart>0&&(n.openStart=this.openStart),this.openEnd>0&&(n.openEnd=this.openEnd),n}static fromJSON(n,o){if(!o)return ct.empty;let r=o.openStart||0,a=o.openEnd||0;if(typeof r!="number"||typeof a!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ct(Ye.fromJSON(n,o.content),r,a)}static maxOpen(n,o=!0){let r=0,a=0;for(let l=n.firstChild;l&&!l.isLeaf&&(o||!l.type.spec.isolating);l=l.firstChild)r++;for(let l=n.lastChild;l&&!l.isLeaf&&(o||!l.type.spec.isolating);l=l.lastChild)a++;return new ct(n,r,a)}}ct.empty=new ct(Ye.empty,0,0);function l$(e,n,o){let{index:r,offset:a}=e.findIndex(n),l=e.maybeChild(r),{index:i,offset:s}=e.findIndex(o);if(a==n||l.isText){if(s!=o&&!e.child(i).isText)throw new RangeError("Removing non-flat range");return e.cut(0,n).append(e.cut(o))}if(r!=i)throw new RangeError("Removing non-flat range");return e.replaceChild(r,l.copy(l$(l.content,n-a-1,o-a-1)))}function i$(e,n,o,r){let{index:a,offset:l}=e.findIndex(n),i=e.maybeChild(a);if(l==n||i.isText)return r&&!r.canReplace(a,a,o)?null:e.cut(0,n).append(o).append(e.cut(n));let s=i$(i.content,n-l-1,o);return s&&e.replaceChild(a,i.copy(s))}function tYe(e,n,o){if(o.openStart>e.depth)throw new k1("Inserted content deeper than insertion position");if(e.depth-o.openStart!=n.depth-o.openEnd)throw new k1("Inconsistent open depths");return s$(e,n,o,0)}function s$(e,n,o,r){let a=e.index(r),l=e.node(r);if(a==n.index(r)&&r<e.depth-o.openStart){let i=s$(e,n,o,r+1);return l.copy(l.content.replaceChild(a,i))}else if(o.content.size)if(!o.openStart&&!o.openEnd&&e.depth==r&&n.depth==r){let i=e.parent,s=i.content;return Uc(i,s.cut(0,e.parentOffset).append(o.content).append(s.cut(n.parentOffset)))}else{let{start:i,end:s}=nYe(o,e);return Uc(l,d$(e,i,s,n,r))}else return Uc(l,E1(e,n,r))}function c$(e,n){if(!n.type.compatibleContent(e.type))throw new k1("Cannot join "+n.type.name+" onto "+e.type.name)}function P_(e,n,o){let r=e.node(o);return c$(r,n.node(o)),r}function Hc(e,n){let o=n.length-1;o>=0&&e.isText&&e.sameMarkup(n[o])?n[o]=e.withText(n[o].text+e.text):n.push(e)}function fh(e,n,o,r){let a=(n||e).node(o),l=0,i=n?n.index(o):a.childCount;e&&(l=e.index(o),e.depth>o?l++:e.textOffset&&(Hc(e.nodeAfter,r),l++));for(let s=l;s<i;s++)Hc(a.child(s),r);n&&n.depth==o&&n.textOffset&&Hc(n.nodeBefore,r)}function Uc(e,n){return e.type.checkContent(n),e.copy(n)}function d$(e,n,o,r,a){let l=e.depth>a&&P_(e,n,a+1),i=r.depth>a&&P_(o,r,a+1),s=[];return fh(null,e,a,s),l&&i&&n.index(a)==o.index(a)?(c$(l,i),Hc(Uc(l,d$(e,n,o,r,a+1)),s)):(l&&Hc(Uc(l,E1(e,n,a+1)),s),fh(n,o,a,s),i&&Hc(Uc(i,E1(o,r,a+1)),s)),fh(r,null,a,s),new Ye(s)}function E1(e,n,o){let r=[];if(fh(null,e,o,r),e.depth>o){let a=P_(e,n,o+1);Hc(Uc(a,E1(e,n,o+1)),r)}return fh(n,null,o,r),new Ye(r)}function nYe(e,n){let o=n.depth-e.openStart,a=n.node(o).copy(e.content);for(let l=o-1;l>=0;l--)a=n.node(l).copy(Ye.from(a));return{start:a.resolveNoCache(e.openStart+o),end:a.resolveNoCache(a.content.size-e.openEnd-o)}}class ph{constructor(n,o,r){this.pos=n,this.path=o,this.parentOffset=r,this.depth=o.length/3-1}resolveDepth(n){return n==null?this.depth:n<0?this.depth+n:n}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(n){return this.path[this.resolveDepth(n)*3]}index(n){return this.path[this.resolveDepth(n)*3+1]}indexAfter(n){return n=this.resolveDepth(n),this.index(n)+(n==this.depth&&!this.textOffset?0:1)}start(n){return n=this.resolveDepth(n),n==0?0:this.path[n*3-1]+1}end(n){return n=this.resolveDepth(n),this.start(n)+this.node(n).content.size}before(n){if(n=this.resolveDepth(n),!n)throw new RangeError("There is no position before the top-level node");return n==this.depth+1?this.pos:this.path[n*3-1]}after(n){if(n=this.resolveDepth(n),!n)throw new RangeError("There is no position after the top-level node");return n==this.depth+1?this.pos:this.path[n*3-1]+this.path[n*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let n=this.parent,o=this.index(this.depth);if(o==n.childCount)return null;let r=this.pos-this.path[this.path.length-1],a=n.child(o);return r?n.child(o).cut(r):a}get nodeBefore(){let n=this.index(this.depth),o=this.pos-this.path[this.path.length-1];return o?this.parent.child(n).cut(0,o):n==0?null:this.parent.child(n-1)}posAtIndex(n,o){o=this.resolveDepth(o);let r=this.path[o*3],a=o==0?0:this.path[o*3-1]+1;for(let l=0;l<n;l++)a+=r.child(l).nodeSize;return a}marks(){let n=this.parent,o=this.index();if(n.content.size==0)return mn.none;if(this.textOffset)return n.child(o).marks;let r=n.maybeChild(o-1),a=n.maybeChild(o);if(!r){let s=r;r=a,a=s}let l=r.marks;for(var i=0;i<l.length;i++)l[i].type.spec.inclusive===!1&&(!a||!l[i].isInSet(a.marks))&&(l=l[i--].removeFromSet(l));return l}marksAcross(n){let o=this.parent.maybeChild(this.index());if(!o||!o.isInline)return null;let r=o.marks,a=n.parent.maybeChild(n.index());for(var l=0;l<r.length;l++)r[l].type.spec.inclusive===!1&&(!a||!r[l].isInSet(a.marks))&&(r=r[l--].removeFromSet(r));return r}sharedDepth(n){for(let o=this.depth;o>0;o--)if(this.start(o)<=n&&this.end(o)>=n)return o;return 0}blockRange(n=this,o){if(n.pos<this.pos)return n.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==n.pos?1:0);r>=0;r--)if(n.pos<=this.end(r)&&(!o||o(this.node(r))))return new x1(this,n,r);return null}sameParent(n){return this.pos-this.parentOffset==n.pos-n.parentOffset}max(n){return n.pos>this.pos?n:this}min(n){return n.pos<this.pos?n:this}toString(){let n="";for(let o=1;o<=this.depth;o++)n+=(n?"/":"")+this.node(o).type.name+"_"+this.index(o-1);return n+":"+this.parentOffset}static resolve(n,o){if(!(o>=0&&o<=n.content.size))throw new RangeError("Position "+o+" out of range");let r=[],a=0,l=o;for(let i=n;;){let{index:s,offset:c}=i.content.findIndex(l),d=l-c;if(r.push(i,s,a+c),!d||(i=i.child(s),i.isText))break;l=d-1,a+=c+1}return new ph(o,r,l)}static resolveCached(n,o){let r=u$.get(n);if(r)for(let l=0;l<r.elts.length;l++){let i=r.elts[l];if(i.pos==o)return i}else u$.set(n,r=new oYe);let a=r.elts[r.i]=ph.resolve(n,o);return r.i=(r.i+1)%rYe,a}}class oYe{constructor(){this.elts=[],this.i=0}}const rYe=12,u$=new WeakMap;class x1{constructor(n,o,r){this.$from=n,this.$to=o,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const aYe=Object.create(null);let Yc=class lE{constructor(n,o,r,a=mn.none){this.type=n,this.attrs=o,this.marks=a,this.content=r||Ye.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(n){return this.content.child(n)}maybeChild(n){return this.content.maybeChild(n)}forEach(n){this.content.forEach(n)}nodesBetween(n,o,r,a=0){this.content.nodesBetween(n,o,r,a,this)}descendants(n){this.nodesBetween(0,this.content.size,n)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(n,o,r,a){return this.content.textBetween(n,o,r,a)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(n){return this==n||this.sameMarkup(n)&&this.content.eq(n.content)}sameMarkup(n){return this.hasMarkup(n.type,n.attrs,n.marks)}hasMarkup(n,o,r){return this.type==n&&N1(this.attrs,o||n.defaultAttrs||aYe)&&mn.sameSet(this.marks,r||mn.none)}copy(n=null){return n==this.content?this:new lE(this.type,this.attrs,n,this.marks)}mark(n){return n==this.marks?this:new lE(this.type,this.attrs,this.content,n)}cut(n,o=this.content.size){return n==0&&o==this.content.size?this:this.copy(this.content.cut(n,o))}slice(n,o=this.content.size,r=!1){if(n==o)return ct.empty;let a=this.resolve(n),l=this.resolve(o),i=r?0:a.sharedDepth(o),s=a.start(i),d=a.node(i).content.cut(a.pos-s,l.pos-s);return new ct(d,a.depth-i,l.depth-i)}replace(n,o,r){return tYe(this.resolve(n),this.resolve(o),r)}nodeAt(n){for(let o=this;;){let{index:r,offset:a}=o.content.findIndex(n);if(o=o.maybeChild(r),!o)return null;if(a==n||o.isText)return o;n-=a+1}}childAfter(n){let{index:o,offset:r}=this.content.findIndex(n);return{node:this.content.maybeChild(o),index:o,offset:r}}childBefore(n){if(n==0)return{node:null,index:0,offset:0};let{index:o,offset:r}=this.content.findIndex(n);if(r<n)return{node:this.content.child(o),index:o,offset:r};let a=this.content.child(o-1);return{node:a,index:o-1,offset:r-a.nodeSize}}resolve(n){return ph.resolveCached(this,n)}resolveNoCache(n){return ph.resolve(this,n)}rangeHasMark(n,o,r){let a=!1;return o>n&&this.nodesBetween(n,o,l=>(r.isInSet(l.marks)&&(a=!0),!a)),a}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let n=this.type.name;return this.content.size&&(n+="("+this.content.toStringInner()+")"),f$(this.marks,n)}contentMatchAt(n){let o=this.type.contentMatch.matchFragment(this.content,0,n);if(!o)throw new Error("Called contentMatchAt on a node with invalid content");return o}canReplace(n,o,r=Ye.empty,a=0,l=r.childCount){let i=this.contentMatchAt(n).matchFragment(r,a,l),s=i&&i.matchFragment(this.content,o);if(!s||!s.validEnd)return!1;for(let c=a;c<l;c++)if(!this.type.allowsMarks(r.child(c).marks))return!1;return!0}canReplaceWith(n,o,r,a){if(a&&!this.type.allowsMarks(a))return!1;let l=this.contentMatchAt(n).matchType(r),i=l&&l.matchFragment(this.content,o);return i?i.validEnd:!1}canAppend(n){return n.content.size?this.canReplace(this.childCount,this.childCount,n.content):this.type.compatibleContent(n.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let n=mn.none;for(let o=0;o<this.marks.length;o++){let r=this.marks[o];r.type.checkAttrs(r.attrs),n=r.addToSet(n)}if(!mn.sameSet(n,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(o=>o.type.name)}`);this.content.forEach(o=>o.check())}toJSON(){let n={type:this.type.name};for(let o in this.attrs){n.attrs=this.attrs;break}return this.content.size&&(n.content=this.content.toJSON()),this.marks.length&&(n.marks=this.marks.map(o=>o.toJSON())),n}static fromJSON(n,o){if(!o)throw new RangeError("Invalid input for Node.fromJSON");let r;if(o.marks){if(!Array.isArray(o.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=o.marks.map(n.markFromJSON)}if(o.type=="text"){if(typeof o.text!="string")throw new RangeError("Invalid text node in JSON");return n.text(o.text,r)}let a=Ye.fromJSON(n,o.content),l=n.nodeType(o.type).create(o.attrs,a,r);return l.type.checkAttrs(l.attrs),l}};Yc.prototype.text=void 0;class T1 extends Yc{constructor(n,o,r,a){if(super(n,o,null,a),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):f$(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(n,o){return this.text.slice(n,o)}get nodeSize(){return this.text.length}mark(n){return n==this.marks?this:new T1(this.type,this.attrs,this.text,n)}withText(n){return n==this.text?this:new T1(this.type,this.attrs,n,this.marks)}cut(n=0,o=this.text.length){return n==0&&o==this.text.length?this:this.withText(this.text.slice(n,o))}eq(n){return this.sameMarkup(n)&&this.text==n.text}toJSON(){let n=super.toJSON();return n.text=this.text,n}}function f$(e,n){for(let o=e.length-1;o>=0;o--)n=e[o].type.name+"("+n+")";return n}class Wc{constructor(n){this.validEnd=n,this.next=[],this.wrapCache=[]}static parse(n,o){let r=new lYe(n,o);if(r.next==null)return Wc.empty;let a=p$(r);r.next&&r.err("Unexpected trailing text");let l=pYe(fYe(a));return hYe(l,r),l}matchType(n){for(let o=0;o<this.next.length;o++)if(this.next[o].type==n)return this.next[o].next;return null}matchFragment(n,o=0,r=n.childCount){let a=this;for(let l=o;a&&l<r;l++)a=a.matchType(n.child(l).type);return a}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let n=0;n<this.next.length;n++){let{type:o}=this.next[n];if(!(o.isText||o.hasRequiredAttrs()))return o}return null}compatible(n){for(let o=0;o<this.next.length;o++)for(let r=0;r<n.next.length;r++)if(this.next[o].type==n.next[r].type)return!0;return!1}fillBefore(n,o=!1,r=0){let a=[this];function l(i,s){let c=i.matchFragment(n,r);if(c&&(!o||c.validEnd))return Ye.from(s.map(d=>d.createAndFill()));for(let d=0;d<i.next.length;d++){let{type:u,next:f}=i.next[d];if(!(u.isText||u.hasRequiredAttrs())&&a.indexOf(f)==-1){a.push(f);let p=l(f,s.concat(u));if(p)return p}}return null}return l(this,[])}findWrapping(n){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==n)return this.wrapCache[r+1];let o=this.computeWrapping(n);return this.wrapCache.push(n,o),o}computeWrapping(n){let o=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let a=r.shift(),l=a.match;if(l.matchType(n)){let i=[];for(let s=a;s.type;s=s.via)i.push(s.type);return i.reverse()}for(let i=0;i<l.next.length;i++){let{type:s,next:c}=l.next[i];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in o)&&(!a.type||c.validEnd)&&(r.push({match:s.contentMatch,type:s,via:a}),o[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(n){if(n>=this.next.length)throw new RangeError(`There's no ${n}th edge in this content match`);return this.next[n]}toString(){let n=[];function o(r){n.push(r);for(let a=0;a<r.next.length;a++)n.indexOf(r.next[a].next)==-1&&o(r.next[a].next)}return o(this),n.map((r,a)=>{let l=a+(r.validEnd?"*":" ")+" ";for(let i=0;i<r.next.length;i++)l+=(i?", ":"")+r.next[i].type.name+"->"+n.indexOf(r.next[i].next);return l}).join(`
|
|
117
|
+
`)},or.prototype.renderPartial=function(n,o,r,a){if(r){var l=this.getConfigTags(a),i=L_(r)?r(n[1]):r[n[1]];if(i!=null){var s=n[6],c=n[5],d=n[4],u=i;c==0&&d&&(u=this.indentPartial(i,d,s));var f=this.parse(u,l);return this.renderTokens(f,o,r,u,a)}}},or.prototype.unescapedValue=function(n,o){var r=o.lookup(n[1]);if(r!=null)return r},or.prototype.escapedValue=function(n,o,r){var a=this.getConfigEscape(r)||ua.escape,l=o.lookup(n[1]);if(l!=null)return typeof l=="number"&&a===ua.escape?String(l):a(l)},or.prototype.rawValue=function(n){return n[1]},or.prototype.getConfigTags=function(n){return Uu(n)?n:n&&typeof n=="object"?n.tags:void 0},or.prototype.getConfigEscape=function(n){if(n&&typeof n=="object"&&!Uu(n))return n.escape};var ua={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){uh.templateCache=e},get templateCache(){return uh.templateCache}},uh=new or;ua.clearCache=function(){return uh.clearCache()},ua.parse=function(n,o){return uh.parse(n,o)},ua.render=function(n,o,r,a){if(typeof n!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+PFe(n)+'" was given as the first argument for mustache#render(template, view, partials)');return uh.render(n,o,r,a)},ua.escape=QFe,ua.Scanner=dh,ua.Context=Yu,ua.Writer=or;const tHe={props:["value","schema","entity"],methods:{hasRouterLink(){return er(this.schema,"options.routerLink")},getRouterLink(){const e=er(this.schema,"options.routerLink");return ua.render(e,this.entity)}}},nHe={key:1};function oHe(e,n,o,r,a,l){const i=t.resolveComponent("router-link");return e.$options.methods.hasRouterLink(e.props)?(t.openBlock(),t.createBlock(i,{key:0,to:e.$options.methods.getRouterLink(e.props)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.value),1)]),_:1},8,["to"])):(t.openBlock(),t.createElementBlock("span",nHe,t.toDisplayString(o.value),1))}const rHe=lt(tHe,[["render",oHe]]),aHe={props:["value","schema"],methods:{formatValue(e){return e}}};function lHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("span",null,t.toDisplayString(e.$options.methods.formatValue(o.value)),1)}const iHe=lt(aHe,[["render",lHe]]),sHe={props:["value","schema"],methods:{formatValue(e){return isNaN(e)||e===null||e===void 0?"-":Number(e/100).toLocaleString("pt-BR",{style:"currency",currency:"BRL"})}}};function cHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("span",null,t.toDisplayString(e.$options.methods.formatValue(o.value)),1)}const dHe=lt(sHe,[["render",cHe]]),uHe={props:["value","schema"]},fHe=["href"];function pHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("a",{target:"_blank",href:`mailto:${o.value}`},t.toDisplayString(o.value),9,fHe)}const hHe=lt(uHe,[["render",pHe]]),mHe={props:["value","schema"],methods:{formatValue(e,n){if(!e)return"-";const o=er(n,"options.format","dd/MM/yyyy hh:mm:ss");return Ge(e).format(o)}}};function gHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("span",null,t.toDisplayString(e.$options.methods.formatValue(o.value,o.schema)),1)}const yHe=lt(mHe,[["render",gHe]]),o$={};o$.register=function(){hr.register({type:"String"},"default",rHe),hr.register({type:"Date"},"default",yHe),hr.register({type:"Number"},"default",iHe),hr.register({format:"Amount"},"default",dHe),hr.register({format:"Email"},"default",hHe)};const Odt="",bHe={props:{perPage:Number,pagesCount:Number,totalCount:Number,columnSpecs:{type:Array},includedIds:{type:Array},excludedIds:{type:Array},selectable:Boolean,clickable:Boolean,multiselect:Boolean,page:Object},data(e){return{checked:this.computeChecked(e)}},emits:["selected","click-item"],computed:{includedAll(){return this.includedIds.toString()==="*"},estimatedRows(){return this.page&&this.pagesCount>1&&this.page.index>=this.pagesCount-1?this.totalCount%this.perPage:this.perPage}},methods:{getColumnComponent(e){return e.component},getColumnValue(e,n){return er(e,n.path)},computeChecked(e){const n=e||this;if(!n.page||!n.page.data)return[];let o=n.includedIds,r=n.excludedIds,a=n.includedAll;return n.page.data.map(l=>a&&!r.includes(l.id)||o.includes(l.id))}},watch:{includedAll(){this.checked=this.computeChecked(this)},includedIds(){this.checked=this.computeChecked(this)},excludedIds(){this.checked=this.computeChecked(this)}}},MHe={class:"l-table-tbody"},wHe={key:"selector",class:"l-table-cell l-table-column-selector"},CHe=["onClick"],_He={key:"selector",class:"l-table-cell l-table-column-selector"},NHe={key:"selector",class:"l-table-cell l-table-column-selector"};function kHe(e,n,o,r,a,l){const i=t.resolveComponent("l-checkbox");return t.openBlock(),t.createElementBlock("tbody",MHe,[o.page&&o.page.loaded?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.page.data,(s,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c,class:t.normalizeClass({"l-table-selected":a.checked[c]})},[o.selectable?(t.openBlock(),t.createElementBlock("td",wHe,[t.createVNode(i,{modelValue:a.checked[c],"onUpdate:modelValue":d=>a.checked[c]=d,class:"l-table-selector",type:o.multiselect?"checkbox":"radio",onChange:()=>e.$emit("selected",{key:s.id,selected:e.$event})},null,8,["modelValue","onUpdate:modelValue","type","onChange"])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createElementBlock("td",{key:u,class:t.normalizeClass(["l-table-cell",`align-${d.align}${o.clickable?" cursor-pointer":""}`]),onClick:f=>e.$emit("click-item",s)},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.getColumnComponent(d)),{value:l.getColumnValue(s,d),schema:d,entity:s},null,8,["value","schema","entity"]))],10,CHe))),128))],2))),128)):o.page&&o.page.loading?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(l.estimatedRows,(s,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c},[o.selectable?(t.openBlock(),t.createElementBlock("td",_He,[t.createVNode(i,{disabled:"",class:"l-table-selector",type:o.multiselect?"checkbox":"radio",value:l.includedAll},null,8,["type","value"])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createElementBlock("td",{key:u,class:t.normalizeClass(["l-table-cell",`align-${d.align}`])},n[0]||(n[0]=[t.createElementVNode("span",{class:"l-table-skeleton"},null,-1)]),2))),128))]))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(l.estimatedRows,(s,c)=>(t.openBlock(),t.createElementBlock("tr",{key:c},[o.selectable?(t.openBlock(),t.createElementBlock("td",NHe,[t.createVNode(i,{disabled:"",class:"l-table-selector",type:o.multiselect?"checkbox":"radio",checked:l.includedAll},null,8,["type","checked"])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createElementBlock("td",{key:u,class:t.normalizeClass(["l-table-cell",`align-${d.align}`])},n[1]||(n[1]=[t.createElementVNode("span",{class:"l-table-skeleton error"},null,-1)]),2))),128))]))),128))])}const EHe=lt(bHe,[["render",kHe]]),zdt="",xHe={props:{title:String,maxWidth:{type:Number,default:null},minWidth:{type:Number,default:50}},data(){return{dragging:!1,deltaX:0}},computed:{handleStyle(){return this.dragging?{transform:`translateX(${this.deltaX}px)`}:null}},methods:{currentWidth(){return this.$el.parentElement.getBoundingClientRect().width},limitDeltaX(e){let n=this.currentWidth();return this.limitWidth(n+e)-n},limitWidth(e){return e?this.maxWidth&&this.maxWidth<e?this.maxWidth:this.minWidth&&this.minWidth>e?this.minWidth:e:null},resize(e){this.$emit("resize",this.limitWidth(e))},drag(e){this.dragging||this.unregisterDocumentHandlers();let n=e.clientX-this.dragStartClientX;this.deltaX=this.limitDeltaX(n),console.log("drag",this.deltaX)},dragStart(e){this.registerDocumentHandlers(),this.deltaX=0,this.dragging=!0,this.dragStartClientX=e.clientX,console.log("dragStart",e)},dragEnd(e){if(this.deltaX){let n=this.currentWidth()+this.deltaX;this.resize(n)}this.unregisterDocumentHandlers(),this.deltaX=0,this.dragging=!1,this.dragStartClientX=0,console.log("dragEnd",e)},registerDocumentHandlers(){this.unregisterDocumentHandlers(),this._documentMouseMove=e=>this.drag(e),this._documentMouseUp=e=>this.dragEnd(e),document.body.style.cursor="col-resize",document.addEventListener("mousemove",this._documentMouseMove),document.addEventListener("mouseup",this._documentMouseUp),document.onselectstart=()=>!1,document.ondragstart=()=>!1},unregisterDocumentHandlers(){document.removeEventListener("mousemove",this._documentMouseMove),document.removeEventListener("mouseup",this._documentMouseUp),document.body.style.cursor="",document.onselectstart=null,document.ondragstart=null}}};function THe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["mt-handle",a.dragging?"dragging":""]),style:t.normalizeStyle(l.handleStyle),onDblclick:n[0]||(n[0]=i=>l.resize(null)),onMousedown:n[1]||(n[1]=(...i)=>l.dragStart&&l.dragStart(...i))},null,38)}const SHe=lt(xHe,[["render",THe]]),Bdt="",DHe={components:{LTableHeaderResizer:SHe},props:{spec:{type:Object}},emits:["spec:update"],data:e=>({localSpec:e.spec}),computed:{resizable(){return this.localSpec.field&&this.localSpec.field.resizable},reordable(){return!0},icon(){return this.$L.Icons.get(this.localSpec.field)}},methods:{resizeColumn(e,n){e.width=n},toggleSorting(e){let n=this.localSpec.column.sortDirection,o="asc";n?n.toLowerCase()==="asc"&&(o="desc"):o="asc",this.$emit("sort",{direction:o,cumulative:e})}},watch:{localSpec:{handler(e){this.$emit("spec:update",e)},deep:!0}}},vHe={key:1,class:"l-table-header-cell-content"};function IHe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-tooltip"),c=t.resolveComponent("LTableHeaderResizer");return t.openBlock(),t.createElementBlock("th",{class:"l-table-header-cell l-table-cell",style:t.normalizeStyle({"--l-table-col-width":o.spec.column.width?`${o.spec.column.width}px`:"auto"})},[o.spec.sortable?(t.openBlock(),t.createElementBlock("a",{key:0,href:"#",class:t.normalizeClass(["l-table-header-cell-content",[o.spec.column.sortDirection?"active":null,`l-table-header-align-${o.spec.align}`]]),onClick:n[0]||(n[0]=t.withModifiers(d=>l.toggleSorting(),["prevent"]))},[t.createVNode(s,{key:"tooltip",disabled:!o.spec.description,content:o.spec.description,placement:"top","open-delay":600,offset:0},{default:t.withCtx(()=>[t.createElementVNode("span",null,[l.icon?(t.openBlock(),t.createBlock(i,{key:0,class:"l-table-header-icon"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.icon),1)]),_:1})):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(o.spec.title),1)])]),_:1},8,["disabled","content"]),t.createElementVNode("i",{class:t.normalizeClass(["l-table-sorter-icon uil uil-arrow-down",`l-table-sorter-${o.spec.column.sortDirection||"default"}`])},null,2)],2)):(t.openBlock(),t.createElementBlock("span",vHe,[t.createVNode(s,{disabled:!o.spec.description,content:o.spec.description,placement:"top","open-delay":600,offset:0},{default:t.withCtx(()=>[t.createElementVNode("span",null,[l.icon?(t.openBlock(),t.createBlock(i,{key:0,class:"l-table-header-icon"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.icon),1)]),_:1})):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(o.spec.title),1)])]),_:1},8,["disabled","content"])])),n[2]||(n[2]=t.createElementVNode("span",{style:{width:"12px"}},null,-1)),l.resizable?(t.openBlock(),t.createBlock(c,{key:2,onResize:n[1]||(n[1]=d=>l.resizeColumn(o.spec.column,d))})):t.createCommentVNode("",!0)],4)}const AHe=lt(DHe,[["render",IHe]]),Ldt="",OHe={props:["loading"]};function zHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["l-table-header-loader",{loading:o.loading}])},null,2)}const BHe=lt(OHe,[["render",zHe]]),Vdt="",LHe={components:{LTableHeaderCell:AHe,LTableHeaderLoader:BHe},props:{columnSpecs:{type:Array},loading:{type:Boolean,default:!1},includedIds:{type:Array},excludedIds:{type:Array},total:{type:Number},selectable:{type:Boolean},multiselect:{type:Boolean}},data:e=>({localColumnSpecs:e.columnSpecs}),emits:["columnSpecs:update","selected"],computed:{selectedEverything(){let e=this.includedIds.length===this.total&&this.total>0,n=this.includedIds.toString()==="*"&&this.excludedIds.length==0;return e||n},selectedNothing(){return this.includedIds.length===0},selectedSomethings(){return!this.selectedNothing&&!this.selectedEverything}},methods:{changeSpecSort(e,{direction:n,cumulative:o}){if(o){let a=this.localColumnSpecs.reduce((l,i)=>Math.max(l,i.column.sortOrder),0)+1;e.column.sortOrder=a,e.column.sortDirection=n}else{for(let r of this.localColumnSpecs)r.column.sortOrder=null,r.column.sortDirection=null;e.column.sortOrder=1,e.column.sortDirection=n}},syncSpec(e){let n=this.localColumnSpecs.findIndex(o=>o.field===e.field);this.localColumnSpecs.splice(n,1,e)},changeSelection(e){this.$emit("selected",{key:"*",selected:e})}},watch:{localColumnSpecs:{handler(e){this.$emit("columnSpecs:update",e)},deep:!0}}},VHe={class:"l-table-header"},$He={key:0,scope:"col",class:"l-table-header-cell l-table-cell l-table-column-selector"},jHe={class:"l-table-header-extras"},PHe={colspan:"999"};function RHe(e,n,o,r,a,l){const i=t.resolveComponent("l-checkbox"),s=t.resolveComponent("LTableHeaderCell"),c=t.resolveComponent("LTableHeaderLoader");return t.openBlock(),t.createElementBlock("thead",VHe,[t.createElementVNode("tr",null,[o.selectable?(t.openBlock(),t.createElementBlock("th",$He,[o.multiselect?(t.openBlock(),t.createBlock(i,{key:0,class:"l-table-selector",type:"checkbox",value:l.selectedEverything,indeterminate:l.selectedSomethings,onChange:n[0]||(n[0]=d=>l.changeSelection(d))},null,8,["value","indeterminate"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.columnSpecs,(d,u)=>(t.openBlock(),t.createBlock(s,{key:u,spec:d,"onSpec:update":l.syncSpec,onSort:f=>l.changeSpecSort(d,f),ref_for:!0,ref:"headers"},null,8,["spec","onSpec:update","onSort"]))),128))]),t.createElementVNode("tr",jHe,[t.createElementVNode("td",PHe,[t.createVNode(c,{loading:o.loading},null,8,["loading"]),n[1]||(n[1]=t.createElementVNode("div",{class:"l-table-header-shadow-top"},null,-1))])])])}const FHe=lt(LHe,[["render",RHe]]),$dt="",HHe={},UHe={class:"l-table-endspace"};function YHe(e,n){return t.openBlock(),t.createElementBlock("div",UHe)}const WHe=lt(HHe,[["render",YHe]]),jdt="",QHe={props:{loading:Boolean,automatic:Boolean},mounted(){this.intersectionObserver=new IntersectionObserver(([e])=>{e&&e.isIntersecting&&this.automatic&&this.$emit("appeared")}),this.intersectionObserver.observe(this.$el)},unmounted(){this.intersectionObserver&&this.intersectionObserver.disconnect()}};function KHe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["l-table-loadmore",{loading:o.loading}]),onClick:n[0]||(n[0]=i=>e.$emit("click"))},n[1]||(n[1]=[t.createElementVNode("a",{href:"#",class:"l-table-loadmore-link"},"Carregar mais",-1)]),2)}const qHe=lt(QHe,[["render",KHe]]),Pdt="",GHe=2e3,XHe={name:"LTableReloader",data(){return{canReload:!0}},methods:{reload(){this.canReload=!1,this.$emit("reload"),setTimeout(()=>this.canReload=!0,GHe)}}},ZHe={class:"l-table-reloader"},JHe={class:"l-table-reloader-content"};function eUe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-button");return t.openBlock(),t.createElementBlock("div",ZHe,[t.createElementVNode("div",JHe,[t.createVNode(i,{size:"22"},{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode("uil-cloud-exclamation")])),_:1}),n[3]||(n[3]=t.createElementVNode("span",{style:{"margin-left":"8px",flex:"1 1"}},"Algumas informações não puderam ser carregadas.",-1)),t.createVNode(s,{size:"mini",onClick:n[0]||(n[0]=c=>l.reload())},{default:t.withCtx(()=>n[2]||(n[2]=[t.createTextVNode("Recarregar")])),_:1})])])}const tUe=lt(XHe,[["render",eUe]]),Rdt="",nUe={props:{height:{type:Number}}},oUe={class:"l-table-spacer"};function rUe(e,n,o,r,a,l){return t.openBlock(),t.createElementBlock("tbody",oUe,[t.createElementVNode("tr",{style:t.normalizeStyle({height:`${o.height}px`})},n[0]||(n[0]=[t.createElementVNode("td",{class:"l-table-spacer-bg",colspan:"999"},null,-1)]),4)])}const aUe=lt(nUe,[["render",rUe]]);var lUe=T9;function iUe(e){var n=e==null?0:e.length;return n?lUe(e,1):[]}var sUe=iUe;const cUe=qn(sUe);function dUe(){}var uUe=dUe,$_=CB,fUe=uUe,pUe=lC,hUe=1/0,mUe=$_&&1/pUe(new $_([,-0]))[1]==hUe?function(e){return new $_(e)}:fUe,gUe=mUe,yUe=rC,bUe=_9,MUe=N9,wUe=aC,CUe=gUe,_Ue=lC,NUe=200;function kUe(e,n,o){var r=-1,a=bUe,l=e.length,i=!0,s=[],c=s;if(o)i=!1,a=MUe;else if(l>=NUe){var d=n?null:CUe(e);if(d)return _Ue(d);i=!1,a=wUe,c=new yUe}else c=n?[]:s;e:for(;++r<l;){var u=e[r],f=n?n(u):u;if(u=o||u!==0?u:0,i&&f===f){for(var p=c.length;p--;)if(c[p]===f)continue e;n&&c.push(f),s.push(u)}else a(c,f,o)||(c!==s&&c.push(f),s.push(u))}return s}var EUe=kUe,xUe=EUe;function TUe(e){return e&&e.length?xUe(e):[]}var SUe=TUe;const DUe=qn(SUe);function vUe({key:e,selected:n},o){let{loadedPages:r,allowInvertedSelection:a,includedIds:l,excludedIds:i,multiselect:s,itemToId:c=m=>m}=o;if(!e===void 0||e===null)return{includedIds:l,excludedIds:i};if(e==="*"){if(l.splice(0,l.length),i.splice(0,i.length),n&&s&&a&&l.push("*"),n&&s&&!a){let m=cUe(r.filter(y=>y.data).map(y=>y.data));l=DUe(m.map(y=>c(y)))}return{includedIds:l,excludedIds:i}}let u=l.includes("*"),f=l.includes(e),p=i.includes(e);if(s||(l.splice(0,l.length),i.splice(0,i.length)),u&&s){if(n&&p){let m=i.indexOf(e);i.splice(m,1)}!n&&!p&&s&&i.push(e)}else if(n&&!f&&(s?l.push(e):l=[e]),!n&&f){let m=l.indexOf(e);l.splice(m,1)}return{includedIds:l,excludedIds:i}}function IUe({pagesCount:e,currentPage:n,endingAdjacents:o=1,adjacents:r=2,next:a=!0,previous:l=!0,last:i=!1,first:s=!1,fixedWidth:c=!0}){const d=[];if(!e)return d;const u=c?o*2+r*2+3:o*2+1;if(e<=u)for(let f=0;f<e;f++)d.push(f);else{let f=0;for(let y=0;y<Math.min(o,e);y++)d.push(f=y);let p=o+r*2,m=r,g=r;c&&n<p&&(g+=p-n),c&&e-n-1<p&&(m+=p-(e-n-1));for(let y=Math.max(f+1,n-m);y<Math.min(n+g+1,e);y++)f+2===y&&d.push(f=f+1),f+1!==y&&d.push("...1"),d.push(f=y);for(let y=Math.max(f+1,e-o);y<e;y++)f+2===y&&d.push(f=f+1),f+1!==y&&d.push("...2"),d.push(f=y)}return l&&d.unshift("<"),a&&d.push(">"),s&&d.unshift("<<"),i&&d.push(">>"),d}const Fdt="",AUe={name:"LTablePagination",props:{pagesCount:Number,totalCount:Number,currentPage:{type:Number,default:2}},computed:{visiblePages(){return this.totalCount?IUe({pagesCount:this.pagesCount,currentPage:this.currentPage,adjacents:1,endingAdjacents:1,fixedWidth:!0}):["...1"]}},methods:{clicked(e){typeof e=="number"?this.goto(parseInt(e)):e==="<"?this.goto(this.currentPage-1):e===">"?this.goto(this.currentPage+1):e==="<<"?this.goto(0):e===">>"&&this.goto(this.pagesCount-1)},goto(e){this.currentPage!=e&&(e=Math.max(0,Math.min(e,this.pagesCount-1)),this.$emit("goto",e))}}},OUe={class:"l-table-pagination"},zUe=["onClick"];function BUe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon");return t.openBlock(),t.createElementBlock("div",OUe,[t.createVNode(t.TransitionGroup,{tag:"div",class:"l-table-pagination-pages",name:"l-table-pagination-transition"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.visiblePages,s=>(t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["l-table-pagination-page-item",{active:s==o.currentPage}]),key:s,onClick:c=>l.clicked(s)},[s==="<"?(t.openBlock(),t.createBlock(i,{key:0,size:"20"},{default:t.withCtx(()=>n[0]||(n[0]=[t.createTextVNode("uil-angle-left")])),_:1})):s===">"?(t.openBlock(),t.createBlock(i,{key:1,size:"20"},{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode("uil-angle-right")])),_:1})):s==="...1"||s==="...2"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createTextVNode(" ... ")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.createTextVNode(t.toDisplayString(s+1),1)],64))],10,zUe))),128))]),_:1})])}const LUe=lt(AUe,[["render",BUe]]),Hdt="";o$.register();const VUe=100,$Ue=3e4,jUe=3,PUe="scrollBehavior"in document.documentElement.style,RUe={name:"LTable",tagName:"l-table",components:{LTableHeader:FHe,LTableBody:EHe,LTableReloader:tUe,LTableLoadMore:qHe,LTableEndspace:WHe,LTableBodySpacer:aUe,LTablePagination:LUe},props:{rows:{type:Array},primaryKey:{type:String,default:"id"},fetch:{type:Function},columns:{type:Array},pagination:{type:Boolean,default:!1},display:{type:String,enum:["all","more","paged"],default:"all"},autoLoadMore:{type:Boolean,default:!1},schema:{type:Object,required:!0},selectable:{type:Boolean,default:!1},clickable:{type:Boolean,default:!1},multiselect:{type:Boolean,default:!0},allowInvertedSelection:{type:Boolean,default:!0},rowHeight:{type:Number,default:32},borderTick:{type:Number,default:1},snapToPageOnMore:{type:Boolean,default:!0},stickyColumnLeft:{type:Boolean,default:!1},recycle:{type:Boolean,default:!0},limitPerPage:{type:Number,default:50}},emits:["loading","changeSelection","click-item"],mounted(){this.computeVisibleRows()},data(e){let n=[];return e.columns.length&&(n=e.columns.map(o=>this.buildColumnSpec(o))),{fetching:0,headerHeight:56,nonce:0,id:0,extraRows:15,lastComputedOffsetY:0,includedIds:[],excludedIds:[],scrollAtTop:!0,scrollAtLeft:!0,totalCount:0,firstPage:null,currentPage:null,lastPage:null,loadedPages:[],columnSpecs:n}},watch:{totalCount(e){this.$emit("changeSelection",{includedIds:this.includedIds,excludedIds:this.excludedIds,selectionCount:this.selectionCount,totalCount:e})},somePageIsLoading(e){this.$emit("loading",e)}},computed:{perPage(){return Number(this.limitPerPage)},pagesCount(){return Math.floor(this.totalCount/this.perPage)+1},selectionCount(){return this.includedIds.toString()==="*"?this.totalCount-this.excludedIds.length:this.includedIds.length},lastLoadedPage(){return this.loadedPages.length},isLoadMoreVisible(){return this.display==="more"&&this.lastLoadedPage<this.pagesCount},isPaginationVisible(){return(this.display==="page"||!!this.pagination)&&this.display!=="more"&&this.pagesCount!==null},isLeftColumnSticky(){return this.stickyColumnLeft||this.columns&&this.columns[0]&&this.columns[0].sticky},usingRecycledLayout(){return this.display!=="paged"&&this.recycle},hasVisibleFailedPages(){for(let e=this.firstPageRendered;e<=this.lastPageRendered;e++)if(this.loadedPages[e]&&this.loadedPages[e].failed)return!0;return!1},firstPageRendered(){return!this.usingRecycledLayout&&this.display!=="paged"?0:this.firstPage},lastPageRendered(){return this.display==="paged"?this.firstPage:this.usingRecycledLayout?this.lastPage:Math.max(0,this.lastLoadedPage-1)},visiblePages(){let e=[];for(let n=this.firstPageRendered;n<=this.lastPageRendered;n++){let o=this.loadedPages[n]||{index:n};e.push(o)}return e},contentStyle(){return{"--l-table-primary-color":"#2F8AF5","--l-table-warning-color":"#fd3a57","--l-table-bg-color":"white","--l-table-header-height":`${this.headerHeight}px`,"--l-table-header-text-color":"#232B34","--l-table-header-border-color":"#E8E8E8","--l-table-skeleton-height":`${Math.min(this.rowHeight-8,8)}px`,"--l-table-loader-height":"3px","--l-table-loader-color":"var(--l-table-primary-color)","--l-table-row-height":`${this.rowHeight}px`,"--l-table-cell-padding":"0 8px","--l-table-row-hover-color":"#fafbfd","--l-table-row-selected-color":"#eef5fa","--l-table-row-selected-hover-color":"#e6f0f8","--l-table-border-color":"#D3DAE6","--l-table-border-tick":`${this.borderTick}px`,"--l-table-selector-width":`${this.selectable?Math.min(this.headerHeight,this.rowHeight):0}px`,"--l-table-loadmore-height":"46px","--l-table-pagination-height":"48px","--l-table-pagination-color":"var(--l-table-primary-color)","--l-table-pagination-bg-color":"white","--l-table-reloader-margin":"16px","--l-table-endspace-bg-color":"#f5f5f5","--l-table-link-color":"var(--l-table-primary-color)"}},contentClasses(){return{"l-table-at-top":this.scrollAtTop,"l-table-at-left":this.scrollAtLeft,"l-table-sticky-column-left":this.isLeftColumnSticky}},spacing(){let e=0,n=0,o=this.display,r=this.totalCount;return o==="more"&&(r=this.loadedPages.length*this.perPage),(o==="all"||o==="more")&&(e=this.firstPageRendered*this.perPage*this.rowHeight,n=Math.max(0,(r-(this.lastPageRendered+1)*this.perPage)*this.rowHeight)),{top:Math.max(0,e),bottom:Math.max(0,n)}},rect(){return this.$refs.container.getBoundingClientRect()},somePageIsLoading(){return this.loadedPages.map(e=>e.loading).some(e=>e)}},methods:{itemToId(e){return e?this.primaryKey?e[this.primaryKey]:e:null},scrollTo(e=0,n){let o="auto";if(n){let r=this.$refs.container.scrollTop,a=this.perPage*this.rowHeight+1;o=Math.abs(r-e)<a?"smooth":"auto"}this.$refs.container.scrollTo({top:e,behavior:o})},gotoPage(e,n){if(e=Math.max(0,Math.min(this.pagesCount,e)),this.display==="paged"){this.setViewablePages(e,e,e),this.scrollTo(0,!0);return}this.display==="more"?this.setViewablePages(e-1,e,e):this.setViewablePages(e,e,e);let o=e*this.rowHeight*this.perPage;this.scrollTo(o,n)},async loadMore(e){let n=this.loadedPages[this.loadedPages.length-1];if(!n||n.loading)return!1;let o=this.loadedPages.length;this.setViewablePages(this.firstPage,o),e&&this.snapToPageOnMore&&PUe&&setTimeout(()=>this.gotoPage(o,!0),100)},reload(){this.id++,this.fetching=0,this.firstPage=null,this.lastPage=null,this.totalCount=null,this.loadedPages=[],this.includedIds=[],this.excludedIds=[],this.gotoPage(0),this.computeVisibleRows()},reloadFailedPages(){let e=0;for(let n=this.firstPageRendered;n<=this.lastPageRendered&&!(!(!this.loadedPages[n]||!this.loadedPages[n].failed)&&(this.loadedPages[n]=null,this.fetchPage(n),++e>=jUe));n++);},onScroll(){if(!(this.getScrollSpeed()>$Ue)&&!this._scrollDebounce)return this.computeVisibleRows();clearTimeout(this._scrollDebounce),this._scrollDebounce=setTimeout(()=>{this.computeVisibleRows(),this._scrollDebounce=null},VUe)},getScrollSpeed(){let e=this._lastOffsetY||0,n=this._lastOffsetYTime||0,o=this._lastOffsetY=this.$refs.container.scrollTop,r=this._lastOffsetYTime=Date.now();return Math.abs(1e3*(e-o)/(r-n))},computeVisibleRows(){let e=this.$refs.container.scrollTop,n=this.$refs.container.scrollLeft,o=this.lastComputedOffsetY;this.scrollAtTop=e===0,this.scrollAtLeft=n===0;let r=Math.abs(o-e);if(e>2&&o>2&&r<150||(this.lastComputedOffsetY=e,this.display==="paged"))return;let l=this.rect.height-this.headerHeight,i=Math.max(0,Math.floor(e/this.rowHeight)),s=Math.ceil(l/this.rowHeight),c=i+s,d=this.extraRows,u=this.perPage,f=Math.floor((i-d)/this.perPage),p=Math.floor((c+d)/u),m=p>=this.pagesCount-1?s:s/2,g=Math.floor((i+m)/this.perPage);if(this.display==="more"){for(f=Math.min(f,this.lastLoadedPage);!this.loadedPages[f]&&f>0;)f--;for(p=Math.max(p,f);!this.loadedPages[p]&&p>f&&p>0;)p--}this.setViewablePages(f,p,g)},setViewablePages(e=0,n=0,o=0){this.display==="paged"&&(n=e),e=Math.min(Math.max(e,0),this.pagesCount-1),n=Math.min(Math.max(n,e),this.pagesCount-1),o=Math.min(n,Math.max(e,o||0));let r=e!==this.firstPage||n!==this.lastPage;this.firstPage=e,this.lastPage=n,this.currentPage=o,r&&this.scheduleFeching()},buildColumnSpec(e){if(!this.schema.fields)throw new Error("Missing schema.fields!");const n=this.schema.fields.find(r=>r.path===e.path);if(!n)throw new Error(`Missing field schema for path ${e.path}`);const o=this.$L.FieldTypeComponents.get(n,"default");return Object.assign({},n,{width:e.width||null,sortable:n?n.sortable:!1,sticky:n&&n.sticky||e.sticky||!1,align:n&&n.align||"left",column:e,field:n,component:o})},handleColumnSpecsUpdate(e){this.columnSpecs=e},changeSelection({key:e,selected:n}){const{includedIds:o,excludedIds:r}=vUe({key:e,selected:n},this);this.includedIds=o,this.excludedIds=r,this.$nextTick(()=>{this.$emit("changeSelection",{includedIds:this.includedIds,excludedIds:this.excludedIds,selectionCount:this.selectionCount,totalCount:this.totalCount})})},scheduleFeching(){for(let e=this.firstPage;e<=this.lastPage;e++)this.fetchPage(e)},async fetchPage(e){let n=this.loadedPages[e];if(n)return n;n=this.loadedPages[e]={id:this.id,index:e,startedAt:Date.now(),duration:null,loading:!0,loaded:!1,failed:!1,error:null,data:null};try{this.fetching++;const{hits:o,total:r}=await this.resolvePageData(e);Object.assign(n,{duration:Date.now()-n.startedAt,loading:!1,loaded:!0,data:o});let a=this.loadedPages.indexOf(n)>=0;r!==void 0&&a&&(this.totalCount=r)}catch(o){console.error("LTable","Failed to call `fetch` callback",o),Object.assign(n,{loading:!1,failed:!0,error:o.toString()})}finally{this.id===n.id&&this.fetching--}return n},async resolvePageData(e){if(this.rows){let n=this.perPage,o=e*n;return{data:this.rows.slice(o,o+n),total:this.rows.length}}else{if(this.fetch)return await this.fetch({page:e,offset:e*this.perPage,limit:this.perPage,schema:this.schema,columns:this.columns,perPage:this.perPage,primaryKey:this.primaryKey});throw new Error("Cannot discover data. Either `rows` or `fetch` property must be assigned to table")}}}},FUe={class:"l-table-table",border:"0"};function HUe(e,n,o,r,a,l){const i=t.resolveComponent("LTableHeader"),s=t.resolveComponent("LTableBodySpacer"),c=t.resolveComponent("LTableBody"),d=t.resolveComponent("LTableLoadMore"),u=t.resolveComponent("LTableEndspace"),f=t.resolveComponent("LTableReloader"),p=t.resolveComponent("LTablePagination");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["l-table-container",l.contentClasses]),ref:"container",style:t.normalizeStyle(l.contentStyle),onScroll:n[7]||(n[7]=(...m)=>l.onScroll&&l.onScroll(...m))},[t.createElementVNode("table",FUe,[n[8]||(n[8]=t.createElementVNode("caption",{style:{display:"none"}}," Table Header ",-1)),t.createVNode(i,{height:a.headerHeight,selectable:o.selectable,columnSpecs:a.columnSpecs,loading:!!a.fetching,total:a.totalCount,includedIds:a.includedIds,excludedIds:a.excludedIds,multiselect:o.multiselect,onSelected:n[0]||(n[0]=m=>l.changeSelection(m)),"onColumnSpecs:update":l.handleColumnSpecsUpdate},null,8,["height","selectable","columnSpecs","loading","total","includedIds","excludedIds","multiselect","onColumnSpecs:update"]),t.createVNode(s,{height:l.spacing.top},null,8,["height"]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.visiblePages,m=>(t.openBlock(),t.createBlock(c,{key:m.index,page:m,perPage:l.perPage,pagesCount:l.pagesCount,totalCount:a.totalCount,selectable:o.selectable,clickable:o.clickable,columnSpecs:a.columnSpecs,includedIds:a.includedIds,excludedIds:a.excludedIds,multiselect:o.multiselect,onClickItem:n[1]||(n[1]=g=>e.$emit("click-item",g)),onSelected:n[2]||(n[2]=g=>l.changeSelection(g))},null,8,["page","perPage","pagesCount","totalCount","selectable","clickable","columnSpecs","includedIds","excludedIds","multiselect"]))),128)),t.createVNode(s,{height:l.spacing.bottom},null,8,["height"])]),l.isLoadMoreVisible?(t.openBlock(),t.createBlock(d,{key:0,onClick:n[3]||(n[3]=m=>l.loadMore(!0)),onAppeared:n[4]||(n[4]=m=>l.loadMore()),automatic:o.autoLoadMore},null,8,["automatic"])):t.createCommentVNode("",!0),t.createVNode(u),t.createVNode(t.Transition,{name:"scale-up"},{default:t.withCtx(()=>[l.hasVisibleFailedPages?(t.openBlock(),t.createBlock(f,{key:0,onReload:n[5]||(n[5]=m=>l.reloadFailedPages())})):t.createCommentVNode("",!0)]),_:1}),l.isPaginationVisible?(t.openBlock(),t.createBlock(p,{key:1,currentPage:a.currentPage,pagesCount:l.pagesCount,totalCount:a.totalCount,onGoto:n[6]||(n[6]=m=>l.gotoPage(m))},null,8,["currentPage","pagesCount","totalCount"])):t.createCommentVNode("",!0)],38)}const UUe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(RUe,[["render",HUe]])},Symbol.toStringTag,{value:"Module"})),Ydt="",YUe={name:"LTabs",components:{ElTabs:bw},methods:{calcPaneInstances(e=!1){if(this.$slots.default){const o=this.$slots.default.filter(a=>a.tag&&a.componentOptions&&a.componentOptions.Ctor.options.tagName==="l-tab-pane").map(({componentInstance:a})=>a),r=!(o.length===this.panes.length&&o.every((a,l)=>a===this.panes[l]));(e||r)&&(this.panes=o)}else this.panes.length!==0&&(this.panes=[])}},data(){return{panes:[]}}};function WUe(e,n,o,r,a,l){const i=t.resolveComponent("el-tabs");return t.openBlock(),t.createBlock(i,t.normalizeProps(t.guardReactiveProps(e.$attrs)),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},16)}const QUe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(YUe,[["render",WUe],["__scopeId","data-v-66db6dd7"]])},Symbol.toStringTag,{value:"Module"})),KUe={tagName:"l-target-chip",name:"LTargetChip",props:{kind:{type:String,required:!0},closeable:{type:Boolean,default:!1},name:{type:String,required:!0},count:{type:Number}},computed:{color:function(){return{member:"purple",group:"aqua",user:"link",tag:"warning",community:"danger",role:"lead-light"}[this.kind]||"lead"},icon:function(){return{member:"uil-graduation-cap",group:"uil-users-alt",user:"uil-user",tag:"uil-tag-alt",role:"uil-user",community:"uil-channel"}[this.kind]}}},qUe={class:"l-d-flex l-align-items"};function GUe(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-chip");return t.openBlock(),t.createBlock(s,{style:{height:"24px"},bold:"",fill:"",color:l.color,icon:l.icon},{default:t.withCtx(()=>[t.createElementVNode("div",qUe,[t.createTextVNode(t.toDisplayString(o.count)+" "+t.toDisplayString(o.name)+" ",1),o.closeable?(t.openBlock(),t.createBlock(i,{key:0,onClick:n[0]||(n[0]=c=>e.$emit("remove")),class:"l-d-flex l-align-items-center ml-1 mr-0",style:{cursor:"pointer"},size:"15"},{default:t.withCtx(()=>n[1]||(n[1]=[t.createTextVNode(" uis-times-circle ")])),_:1})):t.createCommentVNode("",!0)])]),_:1},8,["color","icon"])}const XUe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(KUe,[["render",GUe]])},Symbol.toStringTag,{value:"Module"})),Kdt="",ZUe={tagName:"l-target-input",name:"LTargetInput",props:{topics:{type:Array,required:!0},limit:{type:Number,default:3},editable:{type:Boolean,default:!1}},computed:{topicsToShow(){return this.topics.slice(0,this.limit)},moreTopicsText(){const e=this.topics.length-this.limit>1;return`+ ${this.topics.length-this.limit} destinatário`+(e?"s":"")}}};function JUe(e,n,o,r,a,l){const i=t.resolveComponent("l-target-chip"),s=t.resolveComponent("l-chip");return o.topics&&o.topics.length?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass("l-target-input"+(o.editable?" editable":""))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.topicsToShow,c=>(t.openBlock(),t.createBlock(i,{kind:c.kind,name:c.name,key:c.id,class:"mr-2 mb-2"},null,8,["kind","name"]))),128)),o.topics.length>this.limit?(t.openBlock(),t.createBlock(s,{key:0,color:"purple",class:"mb-2",fill:"","hide-icon":""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.moreTopicsText),1)]),_:1})):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0)}const eYe=Object.freeze(Object.defineProperty({__proto__:null,default:lt(ZUe,[["render",JUe],["__scopeId","data-v-1da7433b"]])},Symbol.toStringTag,{value:"Module"}));function So(e){this.content=e}So.prototype={constructor:So,find:function(e){for(var n=0;n<this.content.length;n+=2)if(this.content[n]===e)return n;return-1},get:function(e){var n=this.find(e);return n==-1?void 0:this.content[n+1]},update:function(e,n,o){var r=o&&o!=e?this.remove(o):this,a=r.find(e),l=r.content.slice();return a==-1?l.push(o||e,n):(l[a+1]=n,o&&(l[a]=o)),new So(l)},remove:function(e){var n=this.find(e);if(n==-1)return this;var o=this.content.slice();return o.splice(n,2),new So(o)},addToStart:function(e,n){return new So([e,n].concat(this.remove(e).content))},addToEnd:function(e,n){var o=this.remove(e).content.slice();return o.push(e,n),new So(o)},addBefore:function(e,n,o){var r=this.remove(n),a=r.content.slice(),l=r.find(e);return a.splice(l==-1?a.length:l,0,n,o),new So(a)},forEach:function(e){for(var n=0;n<this.content.length;n+=2)e(this.content[n],this.content[n+1])},prepend:function(e){return e=So.from(e),e.size?new So(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=So.from(e),e.size?new So(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var n=this;e=So.from(e);for(var o=0;o<e.content.length;o+=2)n=n.remove(e.content[o]);return n},toObject:function(){var e={};return this.forEach(function(n,o){e[n]=o}),e},get size(){return this.content.length>>1}},So.from=function(e){if(e instanceof So)return e;var n=[];if(e)for(var o in e)n.push(o,e[o]);return new So(n)};function r$(e,n,o){for(let r=0;;r++){if(r==e.childCount||r==n.childCount)return e.childCount==n.childCount?null:o;let a=e.child(r),l=n.child(r);if(a==l){o+=a.nodeSize;continue}if(!a.sameMarkup(l))return o;if(a.isText&&a.text!=l.text){for(let i=0;a.text[i]==l.text[i];i++)o++;return o}if(a.content.size||l.content.size){let i=r$(a.content,l.content,o+1);if(i!=null)return i}o+=a.nodeSize}}function a$(e,n,o,r){for(let a=e.childCount,l=n.childCount;;){if(a==0||l==0)return a==l?null:{a:o,b:r};let i=e.child(--a),s=n.child(--l),c=i.nodeSize;if(i==s){o-=c,r-=c;continue}if(!i.sameMarkup(s))return{a:o,b:r};if(i.isText&&i.text!=s.text){let d=0,u=Math.min(i.text.length,s.text.length);for(;d<u&&i.text[i.text.length-d-1]==s.text[s.text.length-d-1];)d++,o--,r--;return{a:o,b:r}}if(i.content.size||s.content.size){let d=a$(i.content,s.content,o-1,r-1);if(d)return d}o-=c,r-=c}}class Ye{constructor(n,o){if(this.content=n,this.size=o||0,o==null)for(let r=0;r<n.length;r++)this.size+=n[r].nodeSize}nodesBetween(n,o,r,a=0,l){for(let i=0,s=0;s<o;i++){let c=this.content[i],d=s+c.nodeSize;if(d>n&&r(c,a+s,l||null,i)!==!1&&c.content.size){let u=s+1;c.nodesBetween(Math.max(0,n-u),Math.min(c.content.size,o-u),r,a+u)}s=d}}descendants(n){this.nodesBetween(0,this.size,n)}textBetween(n,o,r,a){let l="",i=!0;return this.nodesBetween(n,o,(s,c)=>{let d=s.isText?s.text.slice(Math.max(n,c)-c,o-c):s.isLeaf?a?typeof a=="function"?a(s):a:s.type.spec.leafText?s.type.spec.leafText(s):"":"";s.isBlock&&(s.isLeaf&&d||s.isTextblock)&&r&&(i?i=!1:l+=r),l+=d},0),l}append(n){if(!n.size)return this;if(!this.size)return n;let o=this.lastChild,r=n.firstChild,a=this.content.slice(),l=0;for(o.isText&&o.sameMarkup(r)&&(a[a.length-1]=o.withText(o.text+r.text),l=1);l<n.content.length;l++)a.push(n.content[l]);return new Ye(a,this.size+n.size)}cut(n,o=this.size){if(n==0&&o==this.size)return this;let r=[],a=0;if(o>n)for(let l=0,i=0;i<o;l++){let s=this.content[l],c=i+s.nodeSize;c>n&&((i<n||c>o)&&(s.isText?s=s.cut(Math.max(0,n-i),Math.min(s.text.length,o-i)):s=s.cut(Math.max(0,n-i-1),Math.min(s.content.size,o-i-1))),r.push(s),a+=s.nodeSize),i=c}return new Ye(r,a)}cutByIndex(n,o){return n==o?Ye.empty:n==0&&o==this.content.length?this:new Ye(this.content.slice(n,o))}replaceChild(n,o){let r=this.content[n];if(r==o)return this;let a=this.content.slice(),l=this.size+o.nodeSize-r.nodeSize;return a[n]=o,new Ye(a,l)}addToStart(n){return new Ye([n].concat(this.content),this.size+n.nodeSize)}addToEnd(n){return new Ye(this.content.concat(n),this.size+n.nodeSize)}eq(n){if(this.content.length!=n.content.length)return!1;for(let o=0;o<this.content.length;o++)if(!this.content[o].eq(n.content[o]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(n){let o=this.content[n];if(!o)throw new RangeError("Index "+n+" out of range for "+this);return o}maybeChild(n){return this.content[n]||null}forEach(n){for(let o=0,r=0;o<this.content.length;o++){let a=this.content[o];n(a,r,o),r+=a.nodeSize}}findDiffStart(n,o=0){return r$(this,n,o)}findDiffEnd(n,o=this.size,r=n.size){return a$(this,n,o,r)}findIndex(n,o=-1){if(n==0)return _1(0,n);if(n==this.size)return _1(this.content.length,n);if(n>this.size||n<0)throw new RangeError(`Position ${n} outside of fragment (${this})`);for(let r=0,a=0;;r++){let l=this.child(r),i=a+l.nodeSize;if(i>=n)return i==n||o>0?_1(r+1,i):_1(r,a);a=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(n=>n.toJSON()):null}static fromJSON(n,o){if(!o)return Ye.empty;if(!Array.isArray(o))throw new RangeError("Invalid input for Fragment.fromJSON");return new Ye(o.map(n.nodeFromJSON))}static fromArray(n){if(!n.length)return Ye.empty;let o,r=0;for(let a=0;a<n.length;a++){let l=n[a];r+=l.nodeSize,a&&l.isText&&n[a-1].sameMarkup(l)?(o||(o=n.slice(0,a)),o[o.length-1]=l.withText(o[o.length-1].text+l.text)):o&&o.push(l)}return new Ye(o||n,r)}static from(n){if(!n)return Ye.empty;if(n instanceof Ye)return n;if(Array.isArray(n))return this.fromArray(n);if(n.attrs)return new Ye([n],n.nodeSize);throw new RangeError("Can not convert "+n+" to a Fragment"+(n.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Ye.empty=new Ye([],0);const j_={index:0,offset:0};function _1(e,n){return j_.index=e,j_.offset=n,j_}function N1(e,n){if(e===n)return!0;if(!(e&&typeof e=="object")||!(n&&typeof n=="object"))return!1;let o=Array.isArray(e);if(Array.isArray(n)!=o)return!1;if(o){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!N1(e[r],n[r]))return!1}else{for(let r in e)if(!(r in n)||!N1(e[r],n[r]))return!1;for(let r in n)if(!(r in e))return!1}return!0}let mn=class aE{constructor(n,o){this.type=n,this.attrs=o}addToSet(n){let o,r=!1;for(let a=0;a<n.length;a++){let l=n[a];if(this.eq(l))return n;if(this.type.excludes(l.type))o||(o=n.slice(0,a));else{if(l.type.excludes(this.type))return n;!r&&l.type.rank>this.type.rank&&(o||(o=n.slice(0,a)),o.push(this),r=!0),o&&o.push(l)}}return o||(o=n.slice()),r||o.push(this),o}removeFromSet(n){for(let o=0;o<n.length;o++)if(this.eq(n[o]))return n.slice(0,o).concat(n.slice(o+1));return n}isInSet(n){for(let o=0;o<n.length;o++)if(this.eq(n[o]))return!0;return!1}eq(n){return this==n||this.type==n.type&&N1(this.attrs,n.attrs)}toJSON(){let n={type:this.type.name};for(let o in this.attrs){n.attrs=this.attrs;break}return n}static fromJSON(n,o){if(!o)throw new RangeError("Invalid input for Mark.fromJSON");let r=n.marks[o.type];if(!r)throw new RangeError(`There is no mark type ${o.type} in this schema`);let a=r.create(o.attrs);return r.checkAttrs(a.attrs),a}static sameSet(n,o){if(n==o)return!0;if(n.length!=o.length)return!1;for(let r=0;r<n.length;r++)if(!n[r].eq(o[r]))return!1;return!0}static setFrom(n){if(!n||Array.isArray(n)&&n.length==0)return aE.none;if(n instanceof aE)return[n];let o=n.slice();return o.sort((r,a)=>r.type.rank-a.type.rank),o}};mn.none=[];class k1 extends Error{}class ct{constructor(n,o,r){this.content=n,this.openStart=o,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(n,o){let r=i$(this.content,n+this.openStart,o);return r&&new ct(r,this.openStart,this.openEnd)}removeBetween(n,o){return new ct(l$(this.content,n+this.openStart,o+this.openStart),this.openStart,this.openEnd)}eq(n){return this.content.eq(n.content)&&this.openStart==n.openStart&&this.openEnd==n.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let n={content:this.content.toJSON()};return this.openStart>0&&(n.openStart=this.openStart),this.openEnd>0&&(n.openEnd=this.openEnd),n}static fromJSON(n,o){if(!o)return ct.empty;let r=o.openStart||0,a=o.openEnd||0;if(typeof r!="number"||typeof a!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ct(Ye.fromJSON(n,o.content),r,a)}static maxOpen(n,o=!0){let r=0,a=0;for(let l=n.firstChild;l&&!l.isLeaf&&(o||!l.type.spec.isolating);l=l.firstChild)r++;for(let l=n.lastChild;l&&!l.isLeaf&&(o||!l.type.spec.isolating);l=l.lastChild)a++;return new ct(n,r,a)}}ct.empty=new ct(Ye.empty,0,0);function l$(e,n,o){let{index:r,offset:a}=e.findIndex(n),l=e.maybeChild(r),{index:i,offset:s}=e.findIndex(o);if(a==n||l.isText){if(s!=o&&!e.child(i).isText)throw new RangeError("Removing non-flat range");return e.cut(0,n).append(e.cut(o))}if(r!=i)throw new RangeError("Removing non-flat range");return e.replaceChild(r,l.copy(l$(l.content,n-a-1,o-a-1)))}function i$(e,n,o,r){let{index:a,offset:l}=e.findIndex(n),i=e.maybeChild(a);if(l==n||i.isText)return r&&!r.canReplace(a,a,o)?null:e.cut(0,n).append(o).append(e.cut(n));let s=i$(i.content,n-l-1,o);return s&&e.replaceChild(a,i.copy(s))}function tYe(e,n,o){if(o.openStart>e.depth)throw new k1("Inserted content deeper than insertion position");if(e.depth-o.openStart!=n.depth-o.openEnd)throw new k1("Inconsistent open depths");return s$(e,n,o,0)}function s$(e,n,o,r){let a=e.index(r),l=e.node(r);if(a==n.index(r)&&r<e.depth-o.openStart){let i=s$(e,n,o,r+1);return l.copy(l.content.replaceChild(a,i))}else if(o.content.size)if(!o.openStart&&!o.openEnd&&e.depth==r&&n.depth==r){let i=e.parent,s=i.content;return Uc(i,s.cut(0,e.parentOffset).append(o.content).append(s.cut(n.parentOffset)))}else{let{start:i,end:s}=nYe(o,e);return Uc(l,d$(e,i,s,n,r))}else return Uc(l,E1(e,n,r))}function c$(e,n){if(!n.type.compatibleContent(e.type))throw new k1("Cannot join "+n.type.name+" onto "+e.type.name)}function P_(e,n,o){let r=e.node(o);return c$(r,n.node(o)),r}function Hc(e,n){let o=n.length-1;o>=0&&e.isText&&e.sameMarkup(n[o])?n[o]=e.withText(n[o].text+e.text):n.push(e)}function fh(e,n,o,r){let a=(n||e).node(o),l=0,i=n?n.index(o):a.childCount;e&&(l=e.index(o),e.depth>o?l++:e.textOffset&&(Hc(e.nodeAfter,r),l++));for(let s=l;s<i;s++)Hc(a.child(s),r);n&&n.depth==o&&n.textOffset&&Hc(n.nodeBefore,r)}function Uc(e,n){return e.type.checkContent(n),e.copy(n)}function d$(e,n,o,r,a){let l=e.depth>a&&P_(e,n,a+1),i=r.depth>a&&P_(o,r,a+1),s=[];return fh(null,e,a,s),l&&i&&n.index(a)==o.index(a)?(c$(l,i),Hc(Uc(l,d$(e,n,o,r,a+1)),s)):(l&&Hc(Uc(l,E1(e,n,a+1)),s),fh(n,o,a,s),i&&Hc(Uc(i,E1(o,r,a+1)),s)),fh(r,null,a,s),new Ye(s)}function E1(e,n,o){let r=[];if(fh(null,e,o,r),e.depth>o){let a=P_(e,n,o+1);Hc(Uc(a,E1(e,n,o+1)),r)}return fh(n,null,o,r),new Ye(r)}function nYe(e,n){let o=n.depth-e.openStart,a=n.node(o).copy(e.content);for(let l=o-1;l>=0;l--)a=n.node(l).copy(Ye.from(a));return{start:a.resolveNoCache(e.openStart+o),end:a.resolveNoCache(a.content.size-e.openEnd-o)}}class ph{constructor(n,o,r){this.pos=n,this.path=o,this.parentOffset=r,this.depth=o.length/3-1}resolveDepth(n){return n==null?this.depth:n<0?this.depth+n:n}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(n){return this.path[this.resolveDepth(n)*3]}index(n){return this.path[this.resolveDepth(n)*3+1]}indexAfter(n){return n=this.resolveDepth(n),this.index(n)+(n==this.depth&&!this.textOffset?0:1)}start(n){return n=this.resolveDepth(n),n==0?0:this.path[n*3-1]+1}end(n){return n=this.resolveDepth(n),this.start(n)+this.node(n).content.size}before(n){if(n=this.resolveDepth(n),!n)throw new RangeError("There is no position before the top-level node");return n==this.depth+1?this.pos:this.path[n*3-1]}after(n){if(n=this.resolveDepth(n),!n)throw new RangeError("There is no position after the top-level node");return n==this.depth+1?this.pos:this.path[n*3-1]+this.path[n*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let n=this.parent,o=this.index(this.depth);if(o==n.childCount)return null;let r=this.pos-this.path[this.path.length-1],a=n.child(o);return r?n.child(o).cut(r):a}get nodeBefore(){let n=this.index(this.depth),o=this.pos-this.path[this.path.length-1];return o?this.parent.child(n).cut(0,o):n==0?null:this.parent.child(n-1)}posAtIndex(n,o){o=this.resolveDepth(o);let r=this.path[o*3],a=o==0?0:this.path[o*3-1]+1;for(let l=0;l<n;l++)a+=r.child(l).nodeSize;return a}marks(){let n=this.parent,o=this.index();if(n.content.size==0)return mn.none;if(this.textOffset)return n.child(o).marks;let r=n.maybeChild(o-1),a=n.maybeChild(o);if(!r){let s=r;r=a,a=s}let l=r.marks;for(var i=0;i<l.length;i++)l[i].type.spec.inclusive===!1&&(!a||!l[i].isInSet(a.marks))&&(l=l[i--].removeFromSet(l));return l}marksAcross(n){let o=this.parent.maybeChild(this.index());if(!o||!o.isInline)return null;let r=o.marks,a=n.parent.maybeChild(n.index());for(var l=0;l<r.length;l++)r[l].type.spec.inclusive===!1&&(!a||!r[l].isInSet(a.marks))&&(r=r[l--].removeFromSet(r));return r}sharedDepth(n){for(let o=this.depth;o>0;o--)if(this.start(o)<=n&&this.end(o)>=n)return o;return 0}blockRange(n=this,o){if(n.pos<this.pos)return n.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==n.pos?1:0);r>=0;r--)if(n.pos<=this.end(r)&&(!o||o(this.node(r))))return new x1(this,n,r);return null}sameParent(n){return this.pos-this.parentOffset==n.pos-n.parentOffset}max(n){return n.pos>this.pos?n:this}min(n){return n.pos<this.pos?n:this}toString(){let n="";for(let o=1;o<=this.depth;o++)n+=(n?"/":"")+this.node(o).type.name+"_"+this.index(o-1);return n+":"+this.parentOffset}static resolve(n,o){if(!(o>=0&&o<=n.content.size))throw new RangeError("Position "+o+" out of range");let r=[],a=0,l=o;for(let i=n;;){let{index:s,offset:c}=i.content.findIndex(l),d=l-c;if(r.push(i,s,a+c),!d||(i=i.child(s),i.isText))break;l=d-1,a+=c+1}return new ph(o,r,l)}static resolveCached(n,o){let r=u$.get(n);if(r)for(let l=0;l<r.elts.length;l++){let i=r.elts[l];if(i.pos==o)return i}else u$.set(n,r=new oYe);let a=r.elts[r.i]=ph.resolve(n,o);return r.i=(r.i+1)%rYe,a}}class oYe{constructor(){this.elts=[],this.i=0}}const rYe=12,u$=new WeakMap;class x1{constructor(n,o,r){this.$from=n,this.$to=o,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const aYe=Object.create(null);let Yc=class lE{constructor(n,o,r,a=mn.none){this.type=n,this.attrs=o,this.marks=a,this.content=r||Ye.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(n){return this.content.child(n)}maybeChild(n){return this.content.maybeChild(n)}forEach(n){this.content.forEach(n)}nodesBetween(n,o,r,a=0){this.content.nodesBetween(n,o,r,a,this)}descendants(n){this.nodesBetween(0,this.content.size,n)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(n,o,r,a){return this.content.textBetween(n,o,r,a)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(n){return this==n||this.sameMarkup(n)&&this.content.eq(n.content)}sameMarkup(n){return this.hasMarkup(n.type,n.attrs,n.marks)}hasMarkup(n,o,r){return this.type==n&&N1(this.attrs,o||n.defaultAttrs||aYe)&&mn.sameSet(this.marks,r||mn.none)}copy(n=null){return n==this.content?this:new lE(this.type,this.attrs,n,this.marks)}mark(n){return n==this.marks?this:new lE(this.type,this.attrs,this.content,n)}cut(n,o=this.content.size){return n==0&&o==this.content.size?this:this.copy(this.content.cut(n,o))}slice(n,o=this.content.size,r=!1){if(n==o)return ct.empty;let a=this.resolve(n),l=this.resolve(o),i=r?0:a.sharedDepth(o),s=a.start(i),d=a.node(i).content.cut(a.pos-s,l.pos-s);return new ct(d,a.depth-i,l.depth-i)}replace(n,o,r){return tYe(this.resolve(n),this.resolve(o),r)}nodeAt(n){for(let o=this;;){let{index:r,offset:a}=o.content.findIndex(n);if(o=o.maybeChild(r),!o)return null;if(a==n||o.isText)return o;n-=a+1}}childAfter(n){let{index:o,offset:r}=this.content.findIndex(n);return{node:this.content.maybeChild(o),index:o,offset:r}}childBefore(n){if(n==0)return{node:null,index:0,offset:0};let{index:o,offset:r}=this.content.findIndex(n);if(r<n)return{node:this.content.child(o),index:o,offset:r};let a=this.content.child(o-1);return{node:a,index:o-1,offset:r-a.nodeSize}}resolve(n){return ph.resolveCached(this,n)}resolveNoCache(n){return ph.resolve(this,n)}rangeHasMark(n,o,r){let a=!1;return o>n&&this.nodesBetween(n,o,l=>(r.isInSet(l.marks)&&(a=!0),!a)),a}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let n=this.type.name;return this.content.size&&(n+="("+this.content.toStringInner()+")"),f$(this.marks,n)}contentMatchAt(n){let o=this.type.contentMatch.matchFragment(this.content,0,n);if(!o)throw new Error("Called contentMatchAt on a node with invalid content");return o}canReplace(n,o,r=Ye.empty,a=0,l=r.childCount){let i=this.contentMatchAt(n).matchFragment(r,a,l),s=i&&i.matchFragment(this.content,o);if(!s||!s.validEnd)return!1;for(let c=a;c<l;c++)if(!this.type.allowsMarks(r.child(c).marks))return!1;return!0}canReplaceWith(n,o,r,a){if(a&&!this.type.allowsMarks(a))return!1;let l=this.contentMatchAt(n).matchType(r),i=l&&l.matchFragment(this.content,o);return i?i.validEnd:!1}canAppend(n){return n.content.size?this.canReplace(this.childCount,this.childCount,n.content):this.type.compatibleContent(n.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let n=mn.none;for(let o=0;o<this.marks.length;o++){let r=this.marks[o];r.type.checkAttrs(r.attrs),n=r.addToSet(n)}if(!mn.sameSet(n,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(o=>o.type.name)}`);this.content.forEach(o=>o.check())}toJSON(){let n={type:this.type.name};for(let o in this.attrs){n.attrs=this.attrs;break}return this.content.size&&(n.content=this.content.toJSON()),this.marks.length&&(n.marks=this.marks.map(o=>o.toJSON())),n}static fromJSON(n,o){if(!o)throw new RangeError("Invalid input for Node.fromJSON");let r;if(o.marks){if(!Array.isArray(o.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=o.marks.map(n.markFromJSON)}if(o.type=="text"){if(typeof o.text!="string")throw new RangeError("Invalid text node in JSON");return n.text(o.text,r)}let a=Ye.fromJSON(n,o.content),l=n.nodeType(o.type).create(o.attrs,a,r);return l.type.checkAttrs(l.attrs),l}};Yc.prototype.text=void 0;class T1 extends Yc{constructor(n,o,r,a){if(super(n,o,null,a),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):f$(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(n,o){return this.text.slice(n,o)}get nodeSize(){return this.text.length}mark(n){return n==this.marks?this:new T1(this.type,this.attrs,this.text,n)}withText(n){return n==this.text?this:new T1(this.type,this.attrs,n,this.marks)}cut(n=0,o=this.text.length){return n==0&&o==this.text.length?this:this.withText(this.text.slice(n,o))}eq(n){return this.sameMarkup(n)&&this.text==n.text}toJSON(){let n=super.toJSON();return n.text=this.text,n}}function f$(e,n){for(let o=e.length-1;o>=0;o--)n=e[o].type.name+"("+n+")";return n}class Wc{constructor(n){this.validEnd=n,this.next=[],this.wrapCache=[]}static parse(n,o){let r=new lYe(n,o);if(r.next==null)return Wc.empty;let a=p$(r);r.next&&r.err("Unexpected trailing text");let l=pYe(fYe(a));return hYe(l,r),l}matchType(n){for(let o=0;o<this.next.length;o++)if(this.next[o].type==n)return this.next[o].next;return null}matchFragment(n,o=0,r=n.childCount){let a=this;for(let l=o;a&&l<r;l++)a=a.matchType(n.child(l).type);return a}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let n=0;n<this.next.length;n++){let{type:o}=this.next[n];if(!(o.isText||o.hasRequiredAttrs()))return o}return null}compatible(n){for(let o=0;o<this.next.length;o++)for(let r=0;r<n.next.length;r++)if(this.next[o].type==n.next[r].type)return!0;return!1}fillBefore(n,o=!1,r=0){let a=[this];function l(i,s){let c=i.matchFragment(n,r);if(c&&(!o||c.validEnd))return Ye.from(s.map(d=>d.createAndFill()));for(let d=0;d<i.next.length;d++){let{type:u,next:f}=i.next[d];if(!(u.isText||u.hasRequiredAttrs())&&a.indexOf(f)==-1){a.push(f);let p=l(f,s.concat(u));if(p)return p}}return null}return l(this,[])}findWrapping(n){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==n)return this.wrapCache[r+1];let o=this.computeWrapping(n);return this.wrapCache.push(n,o),o}computeWrapping(n){let o=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let a=r.shift(),l=a.match;if(l.matchType(n)){let i=[];for(let s=a;s.type;s=s.via)i.push(s.type);return i.reverse()}for(let i=0;i<l.next.length;i++){let{type:s,next:c}=l.next[i];!s.isLeaf&&!s.hasRequiredAttrs()&&!(s.name in o)&&(!a.type||c.validEnd)&&(r.push({match:s.contentMatch,type:s,via:a}),o[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(n){if(n>=this.next.length)throw new RangeError(`There's no ${n}th edge in this content match`);return this.next[n]}toString(){let n=[];function o(r){n.push(r);for(let a=0;a<r.next.length;a++)n.indexOf(r.next[a].next)==-1&&o(r.next[a].next)}return o(this),n.map((r,a)=>{let l=a+(r.validEnd?"*":" ")+" ";for(let i=0;i<r.next.length;i++)l+=(i?", ":"")+r.next[i].type.name+"->"+n.indexOf(r.next[i].next);return l}).join(`
|
|
118
118
|
`)}}Wc.empty=new Wc(!0);class lYe{constructor(n,o){this.string=n,this.nodeTypes=o,this.inline=null,this.pos=0,this.tokens=n.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(n){return this.next==n&&(this.pos++||!0)}err(n){throw new SyntaxError(n+" (in content expression '"+this.string+"')")}}function p$(e){let n=[];do n.push(iYe(e));while(e.eat("|"));return n.length==1?n[0]:{type:"choice",exprs:n}}function iYe(e){let n=[];do n.push(sYe(e));while(e.next&&e.next!=")"&&e.next!="|");return n.length==1?n[0]:{type:"seq",exprs:n}}function sYe(e){let n=uYe(e);for(;;)if(e.eat("+"))n={type:"plus",expr:n};else if(e.eat("*"))n={type:"star",expr:n};else if(e.eat("?"))n={type:"opt",expr:n};else if(e.eat("{"))n=cYe(e,n);else break;return n}function h$(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let n=Number(e.next);return e.pos++,n}function cYe(e,n){let o=h$(e),r=o;return e.eat(",")&&(e.next!="}"?r=h$(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:o,max:r,expr:n}}function dYe(e,n){let o=e.nodeTypes,r=o[n];if(r)return[r];let a=[];for(let l in o){let i=o[l];i.isInGroup(n)&&a.push(i)}return a.length==0&&e.err("No node type or group '"+n+"' found"),a}function uYe(e){if(e.eat("(")){let n=p$(e);return e.eat(")")||e.err("Missing closing paren"),n}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let n=dYe(e,e.next).map(o=>(e.inline==null?e.inline=o.isInline:e.inline!=o.isInline&&e.err("Mixing inline and block content"),{type:"name",value:o}));return e.pos++,n.length==1?n[0]:{type:"choice",exprs:n}}}function fYe(e){let n=[[]];return a(l(e,0),o()),n;function o(){return n.push([])-1}function r(i,s,c){let d={term:c,to:s};return n[i].push(d),d}function a(i,s){i.forEach(c=>c.to=s)}function l(i,s){if(i.type=="choice")return i.exprs.reduce((c,d)=>c.concat(l(d,s)),[]);if(i.type=="seq")for(let c=0;;c++){let d=l(i.exprs[c],s);if(c==i.exprs.length-1)return d;a(d,s=o())}else if(i.type=="star"){let c=o();return r(s,c),a(l(i.expr,c),c),[r(c)]}else if(i.type=="plus"){let c=o();return a(l(i.expr,s),c),a(l(i.expr,c),c),[r(c)]}else{if(i.type=="opt")return[r(s)].concat(l(i.expr,s));if(i.type=="range"){let c=s;for(let d=0;d<i.min;d++){let u=o();a(l(i.expr,c),u),c=u}if(i.max==-1)a(l(i.expr,c),c);else for(let d=i.min;d<i.max;d++){let u=o();r(c,u),a(l(i.expr,c),u),c=u}return[r(c)]}else{if(i.type=="name")return[r(s,void 0,i.value)];throw new Error("Unknown expr type")}}}}function m$(e,n){return n-e}function g$(e,n){let o=[];return r(n),o.sort(m$);function r(a){let l=e[a];if(l.length==1&&!l[0].term)return r(l[0].to);o.push(a);for(let i=0;i<l.length;i++){let{term:s,to:c}=l[i];!s&&o.indexOf(c)==-1&&r(c)}}}function pYe(e){let n=Object.create(null);return o(g$(e,0));function o(r){let a=[];r.forEach(i=>{e[i].forEach(({term:s,to:c})=>{if(!s)return;let d;for(let u=0;u<a.length;u++)a[u][0]==s&&(d=a[u][1]);g$(e,c).forEach(u=>{d||a.push([s,d=[]]),d.indexOf(u)==-1&&d.push(u)})})});let l=n[r.join(",")]=new Wc(r.indexOf(e.length-1)>-1);for(let i=0;i<a.length;i++){let s=a[i][1].sort(m$);l.next.push({type:a[i][0],next:n[s.join(",")]||o(s)})}return l}}function hYe(e,n){for(let o=0,r=[e];o<r.length;o++){let a=r[o],l=!a.validEnd,i=[];for(let s=0;s<a.next.length;s++){let{type:c,next:d}=a.next[s];i.push(c.name),l&&!(c.isText||c.hasRequiredAttrs())&&(l=!1),r.indexOf(d)==-1&&r.push(d)}l&&n.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function y$(e){let n=Object.create(null);for(let o in e){let r=e[o];if(!r.hasDefault)return null;n[o]=r.default}return n}function b$(e,n){let o=Object.create(null);for(let r in e){let a=n&&n[r];if(a===void 0){let l=e[r];if(l.hasDefault)a=l.default;else throw new RangeError("No value supplied for attribute "+r)}o[r]=a}return o}function M$(e,n,o,r){for(let a in n)if(!(a in e))throw new RangeError(`Unsupported attribute ${a} for ${o} of type ${a}`);for(let a in e){let l=e[a];l.validate&&l.validate(n[a])}}function w$(e,n){let o=Object.create(null);if(n)for(let r in n)o[r]=new gYe(e,r,n[r]);return o}let C$=class iU{constructor(n,o,r){this.name=n,this.schema=o,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=w$(n,r.attrs),this.defaultAttrs=y$(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||n=="text"),this.isText=n=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Wc.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(n){return this.groups.indexOf(n)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let n in this.attrs)if(this.attrs[n].isRequired)return!0;return!1}compatibleContent(n){return this==n||this.contentMatch.compatible(n.contentMatch)}computeAttrs(n){return!n&&this.defaultAttrs?this.defaultAttrs:b$(this.attrs,n)}create(n=null,o,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Yc(this,this.computeAttrs(n),Ye.from(o),mn.setFrom(r))}createChecked(n=null,o,r){return o=Ye.from(o),this.checkContent(o),new Yc(this,this.computeAttrs(n),o,mn.setFrom(r))}createAndFill(n=null,o,r){if(n=this.computeAttrs(n),o=Ye.from(o),o.size){let i=this.contentMatch.fillBefore(o);if(!i)return null;o=i.append(o)}let a=this.contentMatch.matchFragment(o),l=a&&a.fillBefore(Ye.empty,!0);return l?new Yc(this,n,o.append(l),mn.setFrom(r)):null}validContent(n){let o=this.contentMatch.matchFragment(n);if(!o||!o.validEnd)return!1;for(let r=0;r<n.childCount;r++)if(!this.allowsMarks(n.child(r).marks))return!1;return!0}checkContent(n){if(!this.validContent(n))throw new RangeError(`Invalid content for node ${this.name}: ${n.toString().slice(0,50)}`)}checkAttrs(n){M$(this.attrs,n,"node",this.name)}allowsMarkType(n){return this.markSet==null||this.markSet.indexOf(n)>-1}allowsMarks(n){if(this.markSet==null)return!0;for(let o=0;o<n.length;o++)if(!this.allowsMarkType(n[o].type))return!1;return!0}allowedMarks(n){if(this.markSet==null)return n;let o;for(let r=0;r<n.length;r++)this.allowsMarkType(n[r].type)?o&&o.push(n[r]):o||(o=n.slice(0,r));return o?o.length?o:mn.none:n}static compile(n,o){let r=Object.create(null);n.forEach((l,i)=>r[l]=new iU(l,o,i));let a=o.spec.topNode||"doc";if(!r[a])throw new RangeError("Schema is missing its top node type ('"+a+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let l in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function mYe(e,n,o){let r=o.split("|");return a=>{let l=a===null?"null":typeof a;if(r.indexOf(l)<0)throw new RangeError(`Expected value of type ${r} for attribute ${n} on type ${e}, got ${l}`)}}class gYe{constructor(n,o,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?mYe(n,o,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class S1{constructor(n,o,r,a){this.name=n,this.rank=o,this.schema=r,this.spec=a,this.attrs=w$(n,a.attrs),this.excluded=null;let l=y$(this.attrs);this.instance=l?new mn(this,l):null}create(n=null){return!n&&this.instance?this.instance:new mn(this,b$(this.attrs,n))}static compile(n,o){let r=Object.create(null),a=0;return n.forEach((l,i)=>r[l]=new S1(l,a++,o,i)),r}removeFromSet(n){for(var o=0;o<n.length;o++)n[o].type==this&&(n=n.slice(0,o).concat(n.slice(o+1)),o--);return n}isInSet(n){for(let o=0;o<n.length;o++)if(n[o].type==this)return n[o]}checkAttrs(n){M$(this.attrs,n,"mark",this.name)}excludes(n){return this.excluded.indexOf(n)>-1}}class _${constructor(n){this.linebreakReplacement=null,this.cached=Object.create(null);let o=this.spec={};for(let a in n)o[a]=n[a];o.nodes=So.from(n.nodes),o.marks=So.from(n.marks||{}),this.nodes=C$.compile(this.spec.nodes,this),this.marks=S1.compile(this.spec.marks,this);let r=Object.create(null);for(let a in this.nodes){if(a in this.marks)throw new RangeError(a+" can not be both a node and a mark");let l=this.nodes[a],i=l.spec.content||"",s=l.spec.marks;if(l.contentMatch=r[i]||(r[i]=Wc.parse(i,this.nodes)),l.inlineContent=l.contentMatch.inlineContent,l.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!l.isInline||!l.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=l}l.markSet=s=="_"?null:s?N$(this,s.split(" ")):s==""||!l.inlineContent?[]:null}for(let a in this.marks){let l=this.marks[a],i=l.spec.excludes;l.excluded=i==null?[l]:i==""?[]:N$(this,i.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(n,o=null,r,a){if(typeof n=="string")n=this.nodeType(n);else if(n instanceof C$){if(n.schema!=this)throw new RangeError("Node type from different schema used ("+n.name+")")}else throw new RangeError("Invalid node type: "+n);return n.createChecked(o,r,a)}text(n,o){let r=this.nodes.text;return new T1(r,r.defaultAttrs,n,mn.setFrom(o))}mark(n,o){return typeof n=="string"&&(n=this.marks[n]),n.create(o)}nodeFromJSON(n){return Yc.fromJSON(this,n)}markFromJSON(n){return mn.fromJSON(this,n)}nodeType(n){let o=this.nodes[n];if(!o)throw new RangeError("Unknown node type: "+n);return o}}function N$(e,n){let o=[];for(let r=0;r<n.length;r++){let a=n[r],l=e.marks[a],i=l;if(l)o.push(l);else for(let s in e.marks){let c=e.marks[s];(a=="_"||c.spec.group&&c.spec.group.split(" ").indexOf(a)>-1)&&o.push(i=c)}if(!i)throw new SyntaxError("Unknown mark type: '"+n[r]+"'")}return o}function yYe(e){return e.tag!=null}function bYe(e){return e.style!=null}class _s{constructor(n,o){this.schema=n,this.rules=o,this.tags=[],this.styles=[];let r=this.matchedStyles=[];o.forEach(a=>{if(yYe(a))this.tags.push(a);else if(bYe(a)){let l=/[^=]*/.exec(a.style)[0];r.indexOf(l)<0&&r.push(l),this.styles.push(a)}}),this.normalizeLists=!this.tags.some(a=>{if(!/^(ul|ol)\b/.test(a.tag)||!a.node)return!1;let l=n.nodes[a.node];return l.contentMatch.matchType(l)})}parse(n,o={}){let r=new T$(this,o,!1);return r.addAll(n,mn.none,o.from,o.to),r.finish()}parseSlice(n,o={}){let r=new T$(this,o,!0);return r.addAll(n,mn.none,o.from,o.to),ct.maxOpen(r.finish())}matchTag(n,o,r){for(let a=r?this.tags.indexOf(r)+1:0;a<this.tags.length;a++){let l=this.tags[a];if(CYe(n,l.tag)&&(l.namespace===void 0||n.namespaceURI==l.namespace)&&(!l.context||o.matchesContext(l.context))){if(l.getAttrs){let i=l.getAttrs(n);if(i===!1)continue;l.attrs=i||void 0}return l}}}matchStyle(n,o,r,a){for(let l=a?this.styles.indexOf(a)+1:0;l<this.styles.length;l++){let i=this.styles[l],s=i.style;if(!(s.indexOf(n)!=0||i.context&&!r.matchesContext(i.context)||s.length>n.length&&(s.charCodeAt(n.length)!=61||s.slice(n.length+1)!=o))){if(i.getAttrs){let c=i.getAttrs(o);if(c===!1)continue;i.attrs=c||void 0}return i}}}static schemaRules(n){let o=[];function r(a){let l=a.priority==null?50:a.priority,i=0;for(;i<o.length;i++){let s=o[i];if((s.priority==null?50:s.priority)<l)break}o.splice(i,0,a)}for(let a in n.marks){let l=n.marks[a].spec.parseDOM;l&&l.forEach(i=>{r(i=S$(i)),i.mark||i.ignore||i.clearMark||(i.mark=a)})}for(let a in n.nodes){let l=n.nodes[a].spec.parseDOM;l&&l.forEach(i=>{r(i=S$(i)),i.node||i.ignore||i.mark||(i.node=a)})}return o}static fromSchema(n){return n.cached.domParser||(n.cached.domParser=new _s(n,_s.schemaRules(n)))}}const k$={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},MYe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},E$={ol:!0,ul:!0},D1=1,v1=2,hh=4;function x$(e,n,o){return n!=null?(n?D1:0)|(n==="full"?v1:0):e&&e.whitespace=="pre"?D1|v1:o&~hh}class I1{constructor(n,o,r,a,l,i){this.type=n,this.attrs=o,this.marks=r,this.solid=a,this.options=i,this.content=[],this.activeMarks=mn.none,this.match=l||(i&hh?null:n.contentMatch)}findWrapping(n){if(!this.match){if(!this.type)return[];let o=this.type.contentMatch.fillBefore(Ye.from(n));if(o)this.match=this.type.contentMatch.matchFragment(o);else{let r=this.type.contentMatch,a;return(a=r.findWrapping(n.type))?(this.match=r,a):null}}return this.match.findWrapping(n.type)}finish(n){if(!(this.options&D1)){let r=this.content[this.content.length-1],a;if(r&&r.isText&&(a=/[ \t\r\n\u000c]+$/.exec(r.text))){let l=r;r.text.length==a[0].length?this.content.pop():this.content[this.content.length-1]=l.withText(l.text.slice(0,l.text.length-a[0].length))}}let o=Ye.from(this.content);return!n&&this.match&&(o=o.append(this.match.fillBefore(Ye.empty,!0))),this.type?this.type.create(this.attrs,o,this.marks):o}inlineContext(n){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:n.parentNode&&!k$.hasOwnProperty(n.parentNode.nodeName.toLowerCase())}}class T${constructor(n,o,r){this.parser=n,this.options=o,this.isOpen=r,this.open=0;let a=o.topNode,l,i=x$(null,o.preserveWhitespace,0)|(r?hh:0);a?l=new I1(a.type,a.attrs,mn.none,!0,o.topMatch||a.type.contentMatch,i):r?l=new I1(null,null,mn.none,!0,null,i):l=new I1(n.schema.topNodeType,null,mn.none,!0,null,i),this.nodes=[l],this.find=o.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(n,o){n.nodeType==3?this.addTextNode(n,o):n.nodeType==1&&this.addElement(n,o)}addTextNode(n,o){let r=n.nodeValue,a=this.top;if(a.options&v1||a.inlineContext(n)||/[^ \t\r\n\u000c]/.test(r)){if(a.options&D1)a.options&v1?r=r.replace(/\r\n?/g,`
|
|
119
119
|
`):r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=a.content[a.content.length-1],i=n.previousSibling;(!l||i&&i.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),o),this.findInText(n)}else this.findInside(n)}addElement(n,o,r){let a=n.nodeName.toLowerCase(),l;E$.hasOwnProperty(a)&&this.parser.normalizeLists&&wYe(n);let i=this.options.ruleFromNode&&this.options.ruleFromNode(n)||(l=this.parser.matchTag(n,this,r));if(i?i.ignore:MYe.hasOwnProperty(a))this.findInside(n),this.ignoreFallback(n,o);else if(!i||i.skip||i.closeParent){i&&i.closeParent?this.open=Math.max(0,this.open-1):i&&i.skip.nodeType&&(n=i.skip);let s,c=this.top,d=this.needsBlock;if(k$.hasOwnProperty(a))c.content.length&&c.content[0].isInline&&this.open&&(this.open--,c=this.top),s=!0,c.type||(this.needsBlock=!0);else if(!n.firstChild){this.leafFallback(n,o);return}let u=i&&i.skip?o:this.readStyles(n,o);u&&this.addAll(n,u),s&&this.sync(c),this.needsBlock=d}else{let s=this.readStyles(n,o);s&&this.addElementByRule(n,i,s,i.consuming===!1?l:void 0)}}leafFallback(n,o){n.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(n.ownerDocument.createTextNode(`
|
|
120
120
|
`),o)}ignoreFallback(n,o){n.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),o)}readStyles(n,o){let r=n.style;if(r&&r.length)for(let a=0;a<this.parser.matchedStyles.length;a++){let l=this.parser.matchedStyles[a],i=r.getPropertyValue(l);if(i)for(let s=void 0;;){let c=this.parser.matchStyle(l,i,this,s);if(!c)break;if(c.ignore)return null;if(c.clearMark?o=o.filter(d=>!c.clearMark(d)):o=o.concat(this.parser.schema.marks[c.mark].create(c.attrs)),c.consuming===!1)s=c;else break}}return o}addElementByRule(n,o,r,a){let l,i;if(o.node)if(i=this.parser.schema.nodes[o.node],i.isLeaf)this.insertNode(i.create(o.attrs),r)||this.leafFallback(n,r);else{let c=this.enter(i,o.attrs||null,r,o.preserveWhitespace);c&&(l=!0,r=c)}else{let c=this.parser.schema.marks[o.mark];r=r.concat(c.create(o.attrs))}let s=this.top;if(i&&i.isLeaf)this.findInside(n);else if(a)this.addElement(n,r,a);else if(o.getContent)this.findInside(n),o.getContent(n,this.parser.schema).forEach(c=>this.insertNode(c,r));else{let c=n;typeof o.contentElement=="string"?c=n.querySelector(o.contentElement):typeof o.contentElement=="function"?c=o.contentElement(n):o.contentElement&&(c=o.contentElement),this.findAround(n,c,!0),this.addAll(c,r),this.findAround(n,c,!1)}l&&this.sync(s)&&this.open--}addAll(n,o,r,a){let l=r||0;for(let i=r?n.childNodes[r]:n.firstChild,s=a==null?null:n.childNodes[a];i!=s;i=i.nextSibling,++l)this.findAtPoint(n,l),this.addDOM(i,o);this.findAtPoint(n,l)}findPlace(n,o){let r,a;for(let l=this.open;l>=0;l--){let i=this.nodes[l],s=i.findWrapping(n);if(s&&(!r||r.length>s.length)&&(r=s,a=i,!s.length)||i.solid)break}if(!r)return null;this.sync(a);for(let l=0;l<r.length;l++)o=this.enterInner(r[l],null,o,!1);return o}insertNode(n,o){if(n.isInline&&this.needsBlock&&!this.top.type){let a=this.textblockFromContext();a&&(o=this.enterInner(a,null,o))}let r=this.findPlace(n,o);if(r){this.closeExtra();let a=this.top;a.match&&(a.match=a.match.matchType(n.type));let l=mn.none;for(let i of r.concat(n.marks))(a.type?a.type.allowsMarkType(i.type):D$(i.type,n.type))&&(l=i.addToSet(l));return a.content.push(n.mark(l)),!0}return!1}enter(n,o,r,a){let l=this.findPlace(n.create(o),r);return l&&(l=this.enterInner(n,o,r,!0,a)),l}enterInner(n,o,r,a=!1,l){this.closeExtra();let i=this.top;i.match=i.match&&i.match.matchType(n);let s=x$(n,l,i.options);i.options&hh&&i.content.length==0&&(s|=hh);let c=mn.none;return r=r.filter(d=>(i.type?i.type.allowsMarkType(d.type):D$(d.type,n))?(c=d.addToSet(c),!1):!0),this.nodes.push(new I1(n,o,c,a,null,s)),this.open++,r}closeExtra(n=!1){let o=this.nodes.length-1;if(o>this.open){for(;o>this.open;o--)this.nodes[o-1].content.push(this.nodes[o].finish(n));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(n){for(let o=this.open;o>=0;o--)if(this.nodes[o]==n)return this.open=o,!0;return!1}get currentPos(){this.closeExtra();let n=0;for(let o=this.open;o>=0;o--){let r=this.nodes[o].content;for(let a=r.length-1;a>=0;a--)n+=r[a].nodeSize;o&&n++}return n}findAtPoint(n,o){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==n&&this.find[r].offset==o&&(this.find[r].pos=this.currentPos)}findInside(n){if(this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&n.nodeType==1&&n.contains(this.find[o].node)&&(this.find[o].pos=this.currentPos)}findAround(n,o,r){if(n!=o&&this.find)for(let a=0;a<this.find.length;a++)this.find[a].pos==null&&n.nodeType==1&&n.contains(this.find[a].node)&&o.compareDocumentPosition(this.find[a].node)&(r?2:4)&&(this.find[a].pos=this.currentPos)}findInText(n){if(this.find)for(let o=0;o<this.find.length;o++)this.find[o].node==n&&(this.find[o].pos=this.currentPos-(n.nodeValue.length-this.find[o].offset))}matchesContext(n){if(n.indexOf("|")>-1)return n.split(/\s*\|\s*/).some(this.matchesContext,this);let o=n.split("/"),r=this.options.context,a=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),l=-(r?r.depth+1:0)+(a?0:1),i=(s,c)=>{for(;s>=0;s--){let d=o[s];if(d==""){if(s==o.length-1||s==0)continue;for(;c>=l;c--)if(i(s-1,c))return!0;return!1}else{let u=c>0||c==0&&a?this.nodes[c].type:r&&c>=l?r.node(c-l).type:null;if(!u||u.name!=d&&!u.isInGroup(d))return!1;c--}}return!0};return i(o.length-1,this.open)}textblockFromContext(){let n=this.options.context;if(n)for(let o=n.depth;o>=0;o--){let r=n.node(o).contentMatchAt(n.indexAfter(o)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let o in this.parser.schema.nodes){let r=this.parser.schema.nodes[o];if(r.isTextblock&&r.defaultAttrs)return r}}}function wYe(e){for(let n=e.firstChild,o=null;n;n=n.nextSibling){let r=n.nodeType==1?n.nodeName.toLowerCase():null;r&&E$.hasOwnProperty(r)&&o?(o.appendChild(n),n=o):r=="li"?o=n:r&&(o=null)}}function CYe(e,n){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,n)}function S$(e){let n={};for(let o in e)n[o]=e[o];return n}function D$(e,n){let o=n.schema.nodes;for(let r in o){let a=o[r];if(!a.allowsMarkType(e))continue;let l=[],i=s=>{l.push(s);for(let c=0;c<s.edgeCount;c++){let{type:d,next:u}=s.edge(c);if(d==n||l.indexOf(u)<0&&i(u))return!0}};if(i(a.contentMatch))return!0}}class Qc{constructor(n,o){this.nodes=n,this.marks=o}serializeFragment(n,o={},r){r||(r=R_(o).createDocumentFragment());let a=r,l=[];return n.forEach(i=>{if(l.length||i.marks.length){let s=0,c=0;for(;s<l.length&&c<i.marks.length;){let d=i.marks[c];if(!this.marks[d.type.name]){c++;continue}if(!d.eq(l[s][0])||d.type.spec.spanning===!1)break;s++,c++}for(;s<l.length;)a=l.pop()[1];for(;c<i.marks.length;){let d=i.marks[c++],u=this.serializeMark(d,i.isInline,o);u&&(l.push([d,a]),a.appendChild(u.dom),a=u.contentDOM||u.dom)}}a.appendChild(this.serializeNodeInner(i,o))}),r}serializeNodeInner(n,o){let{dom:r,contentDOM:a}=A1(R_(o),this.nodes[n.type.name](n),null,n.attrs);if(a){if(n.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(n.content,o,a)}return r}serializeNode(n,o={}){let r=this.serializeNodeInner(n,o);for(let a=n.marks.length-1;a>=0;a--){let l=this.serializeMark(n.marks[a],n.isInline,o);l&&((l.contentDOM||l.dom).appendChild(r),r=l.dom)}return r}serializeMark(n,o,r={}){let a=this.marks[n.type.name];return a&&A1(R_(r),a(n,o),null,n.attrs)}static renderSpec(n,o,r=null,a){return A1(n,o,r,a)}static fromSchema(n){return n.cached.domSerializer||(n.cached.domSerializer=new Qc(this.nodesFromSchema(n),this.marksFromSchema(n)))}static nodesFromSchema(n){let o=v$(n.nodes);return o.text||(o.text=r=>r.text),o}static marksFromSchema(n){return v$(n.marks)}}function v$(e){let n={};for(let o in e){let r=e[o].spec.toDOM;r&&(n[o]=r)}return n}function R_(e){return e.document||window.document}const I$=new WeakMap;function _Ye(e){let n=I$.get(e);return n===void 0&&I$.set(e,n=NYe(e)),n}function NYe(e){let n=null;function o(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")n||(n=[]),n.push(r);else for(let a=0;a<r.length;a++)o(r[a]);else for(let a in r)o(r[a])}return o(e),n}function A1(e,n,o,r){if(typeof n=="string")return{dom:e.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let a=n[0],l;if(typeof a!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(l=_Ye(r))&&l.indexOf(n)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let i=a.indexOf(" ");i>0&&(o=a.slice(0,i),a=a.slice(i+1));let s,c=o?e.createElementNS(o,a):e.createElement(a),d=n[1],u=1;if(d&&typeof d=="object"&&d.nodeType==null&&!Array.isArray(d)){u=2;for(let f in d)if(d[f]!=null){let p=f.indexOf(" ");p>0?c.setAttributeNS(f.slice(0,p),f.slice(p+1),d[f]):c.setAttribute(f,d[f])}}for(let f=u;f<n.length;f++){let p=n[f];if(p===0){if(f<n.length-1||f>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:c,contentDOM:c}}else{let{dom:m,contentDOM:g}=A1(e,p,o,r);if(c.appendChild(m),g){if(s)throw new RangeError("Multiple content holes");s=g}}}return{dom:c,contentDOM:s}}const A$=65535,O$=Math.pow(2,16);function kYe(e,n){return e+n*O$}function z$(e){return e&A$}function EYe(e){return(e-(e&A$))/O$}const B$=1,L$=2,O1=4,V$=8;class F_{constructor(n,o,r){this.pos=n,this.delInfo=o,this.recover=r}get deleted(){return(this.delInfo&V$)>0}get deletedBefore(){return(this.delInfo&(B$|O1))>0}get deletedAfter(){return(this.delInfo&(L$|O1))>0}get deletedAcross(){return(this.delInfo&O1)>0}}class Hr{constructor(n,o=!1){if(this.ranges=n,this.inverted=o,!n.length&&Hr.empty)return Hr.empty}recover(n){let o=0,r=z$(n);if(!this.inverted)for(let a=0;a<r;a++)o+=this.ranges[a*3+2]-this.ranges[a*3+1];return this.ranges[r*3]+o+EYe(n)}mapResult(n,o=1){return this._map(n,o,!1)}map(n,o=1){return this._map(n,o,!0)}_map(n,o,r){let a=0,l=this.inverted?2:1,i=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let c=this.ranges[s]-(this.inverted?a:0);if(c>n)break;let d=this.ranges[s+l],u=this.ranges[s+i],f=c+d;if(n<=f){let p=d?n==c?-1:n==f?1:o:o,m=c+a+(p<0?0:u);if(r)return m;let g=n==(o<0?c:f)?null:kYe(s/3,n-c),y=n==c?L$:n==f?B$:O1;return(o<0?n!=c:n!=f)&&(y|=V$),new F_(m,y,g)}a+=u-d}return r?n+a:new F_(n+a,0,null)}touches(n,o){let r=0,a=z$(o),l=this.inverted?2:1,i=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let c=this.ranges[s]-(this.inverted?r:0);if(c>n)break;let d=this.ranges[s+l],u=c+d;if(n<=u&&s==a*3)return!0;r+=this.ranges[s+i]-d}return!1}forEach(n){let o=this.inverted?2:1,r=this.inverted?1:2;for(let a=0,l=0;a<this.ranges.length;a+=3){let i=this.ranges[a],s=i-(this.inverted?l:0),c=i+(this.inverted?0:l),d=this.ranges[a+o],u=this.ranges[a+r];n(s,s+d,c,c+u),l+=u-d}}invert(){return new Hr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(n){return n==0?Hr.empty:new Hr(n<0?[0,-n,0]:[0,0,n])}}Hr.empty=new Hr([]);class Wu{constructor(n=[],o,r=0,a=n.length){this.maps=n,this.mirror=o,this.from=r,this.to=a}slice(n=0,o=this.maps.length){return new Wu(this.maps,this.mirror,n,o)}copy(){return new Wu(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(n,o){this.to=this.maps.push(n),o!=null&&this.setMirror(this.maps.length-1,o)}appendMapping(n){for(let o=0,r=this.maps.length;o<n.maps.length;o++){let a=n.getMirror(o);this.appendMap(n.maps[o],a!=null&&a<o?r+a:void 0)}}getMirror(n){if(this.mirror){for(let o=0;o<this.mirror.length;o++)if(this.mirror[o]==n)return this.mirror[o+(o%2?-1:1)]}}setMirror(n,o){this.mirror||(this.mirror=[]),this.mirror.push(n,o)}appendMappingInverted(n){for(let o=n.maps.length-1,r=this.maps.length+n.maps.length;o>=0;o--){let a=n.getMirror(o);this.appendMap(n.maps[o].invert(),a!=null&&a>o?r-a-1:void 0)}}invert(){let n=new Wu;return n.appendMappingInverted(this),n}map(n,o=1){if(this.mirror)return this._map(n,o,!0);for(let r=this.from;r<this.to;r++)n=this.maps[r].map(n,o);return n}mapResult(n,o=1){return this._map(n,o,!1)}_map(n,o,r){let a=0;for(let l=this.from;l<this.to;l++){let i=this.maps[l],s=i.mapResult(n,o);if(s.recover!=null){let c=this.getMirror(l);if(c!=null&&c>l&&c<this.to){l=c,n=this.maps[c].recover(s.recover);continue}}a|=s.delInfo,n=s.pos}return r?n:new F_(n,a,null)}}const H_=Object.create(null);class Ro{getMap(){return Hr.empty}merge(n){return null}static fromJSON(n,o){if(!o||!o.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=H_[o.stepType];if(!r)throw new RangeError(`No step type ${o.stepType} defined`);return r.fromJSON(n,o)}static jsonID(n,o){if(n in H_)throw new RangeError("Duplicate use of step JSON ID "+n);return H_[n]=o,o.prototype.jsonID=n,o}}class Qn{constructor(n,o){this.doc=n,this.failed=o}static ok(n){return new Qn(n,null)}static fail(n){return new Qn(null,n)}static fromReplace(n,o,r,a){try{return Qn.ok(n.replace(o,r,a))}catch(l){if(l instanceof k1)return Qn.fail(l.message);throw l}}}function U_(e,n,o){let r=[];for(let a=0;a<e.childCount;a++){let l=e.child(a);l.content.size&&(l=l.copy(U_(l.content,n,l))),l.isInline&&(l=n(l,o,a)),r.push(l)}return Ye.fromArray(r)}class Ns extends Ro{constructor(n,o,r){super(),this.from=n,this.to=o,this.mark=r}apply(n){let o=n.slice(this.from,this.to),r=n.resolve(this.from),a=r.node(r.sharedDepth(this.to)),l=new ct(U_(o.content,(i,s)=>!i.isAtom||!s.type.allowsMarkType(this.mark.type)?i:i.mark(this.mark.addToSet(i.marks)),a),o.openStart,o.openEnd);return Qn.fromReplace(n,this.from,this.to,l)}invert(){return new $l(this.from,this.to,this.mark)}map(n){let o=n.mapResult(this.from,1),r=n.mapResult(this.to,-1);return o.deleted&&r.deleted||o.pos>=r.pos?null:new Ns(o.pos,r.pos,this.mark)}merge(n){return n instanceof Ns&&n.mark.eq(this.mark)&&this.from<=n.to&&this.to>=n.from?new Ns(Math.min(this.from,n.from),Math.max(this.to,n.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(n,o){if(typeof o.from!="number"||typeof o.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ns(o.from,o.to,n.markFromJSON(o.mark))}}Ro.jsonID("addMark",Ns);class $l extends Ro{constructor(n,o,r){super(),this.from=n,this.to=o,this.mark=r}apply(n){let o=n.slice(this.from,this.to),r=new ct(U_(o.content,a=>a.mark(this.mark.removeFromSet(a.marks)),n),o.openStart,o.openEnd);return Qn.fromReplace(n,this.from,this.to,r)}invert(){return new Ns(this.from,this.to,this.mark)}map(n){let o=n.mapResult(this.from,1),r=n.mapResult(this.to,-1);return o.deleted&&r.deleted||o.pos>=r.pos?null:new $l(o.pos,r.pos,this.mark)}merge(n){return n instanceof $l&&n.mark.eq(this.mark)&&this.from<=n.to&&this.to>=n.from?new $l(Math.min(this.from,n.from),Math.max(this.to,n.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(n,o){if(typeof o.from!="number"||typeof o.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new $l(o.from,o.to,n.markFromJSON(o.mark))}}Ro.jsonID("removeMark",$l);class ks extends Ro{constructor(n,o){super(),this.pos=n,this.mark=o}apply(n){let o=n.nodeAt(this.pos);if(!o)return Qn.fail("No node at mark step's position");let r=o.type.create(o.attrs,null,this.mark.addToSet(o.marks));return Qn.fromReplace(n,this.pos,this.pos+1,new ct(Ye.from(r),0,o.isLeaf?0:1))}invert(n){let o=n.nodeAt(this.pos);if(o){let r=this.mark.addToSet(o.marks);if(r.length==o.marks.length){for(let a=0;a<o.marks.length;a++)if(!o.marks[a].isInSet(r))return new ks(this.pos,o.marks[a]);return new ks(this.pos,this.mark)}}return new Qu(this.pos,this.mark)}map(n){let o=n.mapResult(this.pos,1);return o.deletedAfter?null:new ks(o.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(n,o){if(typeof o.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new ks(o.pos,n.markFromJSON(o.mark))}}Ro.jsonID("addNodeMark",ks);class Qu extends Ro{constructor(n,o){super(),this.pos=n,this.mark=o}apply(n){let o=n.nodeAt(this.pos);if(!o)return Qn.fail("No node at mark step's position");let r=o.type.create(o.attrs,null,this.mark.removeFromSet(o.marks));return Qn.fromReplace(n,this.pos,this.pos+1,new ct(Ye.from(r),0,o.isLeaf?0:1))}invert(n){let o=n.nodeAt(this.pos);return!o||!this.mark.isInSet(o.marks)?this:new ks(this.pos,this.mark)}map(n){let o=n.mapResult(this.pos,1);return o.deletedAfter?null:new Qu(o.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(n,o){if(typeof o.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Qu(o.pos,n.markFromJSON(o.mark))}}Ro.jsonID("removeNodeMark",Qu);class po extends Ro{constructor(n,o,r,a=!1){super(),this.from=n,this.to=o,this.slice=r,this.structure=a}apply(n){return this.structure&&Y_(n,this.from,this.to)?Qn.fail("Structure replace would overwrite content"):Qn.fromReplace(n,this.from,this.to,this.slice)}getMap(){return new Hr([this.from,this.to-this.from,this.slice.size])}invert(n){return new po(this.from,this.from+this.slice.size,n.slice(this.from,this.to))}map(n){let o=n.mapResult(this.from,1),r=n.mapResult(this.to,-1);return o.deletedAcross&&r.deletedAcross?null:new po(o.pos,Math.max(o.pos,r.pos),this.slice)}merge(n){if(!(n instanceof po)||n.structure||this.structure)return null;if(this.from+this.slice.size==n.from&&!this.slice.openEnd&&!n.slice.openStart){let o=this.slice.size+n.slice.size==0?ct.empty:new ct(this.slice.content.append(n.slice.content),this.slice.openStart,n.slice.openEnd);return new po(this.from,this.to+(n.to-n.from),o,this.structure)}else if(n.to==this.from&&!this.slice.openStart&&!n.slice.openEnd){let o=this.slice.size+n.slice.size==0?ct.empty:new ct(n.slice.content.append(this.slice.content),n.slice.openStart,this.slice.openEnd);return new po(n.from,this.to,o,this.structure)}else return null}toJSON(){let n={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(n.slice=this.slice.toJSON()),this.structure&&(n.structure=!0),n}static fromJSON(n,o){if(typeof o.from!="number"||typeof o.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new po(o.from,o.to,ct.fromJSON(n,o.slice),!!o.structure)}}Ro.jsonID("replace",po);class ho extends Ro{constructor(n,o,r,a,l,i,s=!1){super(),this.from=n,this.to=o,this.gapFrom=r,this.gapTo=a,this.slice=l,this.insert=i,this.structure=s}apply(n){if(this.structure&&(Y_(n,this.from,this.gapFrom)||Y_(n,this.gapTo,this.to)))return Qn.fail("Structure gap-replace would overwrite content");let o=n.slice(this.gapFrom,this.gapTo);if(o.openStart||o.openEnd)return Qn.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,o.content);return r?Qn.fromReplace(n,this.from,this.to,r):Qn.fail("Content does not fit in gap")}getMap(){return new Hr([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(n){let o=this.gapTo-this.gapFrom;return new ho(this.from,this.from+this.slice.size+o,this.from+this.insert,this.from+this.insert+o,n.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(n){let o=n.mapResult(this.from,1),r=n.mapResult(this.to,-1),a=this.from==this.gapFrom?o.pos:n.map(this.gapFrom,-1),l=this.to==this.gapTo?r.pos:n.map(this.gapTo,1);return o.deletedAcross&&r.deletedAcross||a<o.pos||l>r.pos?null:new ho(o.pos,r.pos,a,l,this.slice,this.insert,this.structure)}toJSON(){let n={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(n.slice=this.slice.toJSON()),this.structure&&(n.structure=!0),n}static fromJSON(n,o){if(typeof o.from!="number"||typeof o.to!="number"||typeof o.gapFrom!="number"||typeof o.gapTo!="number"||typeof o.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ho(o.from,o.to,o.gapFrom,o.gapTo,ct.fromJSON(n,o.slice),o.insert,!!o.structure)}}Ro.jsonID("replaceAround",ho);function Y_(e,n,o){let r=e.resolve(n),a=o-n,l=r.depth;for(;a>0&&l>0&&r.indexAfter(l)==r.node(l).childCount;)l--,a--;if(a>0){let i=r.node(l).maybeChild(r.indexAfter(l));for(;a>0;){if(!i||i.isLeaf)return!0;i=i.firstChild,a--}}return!1}function xYe(e,n,o,r){let a=[],l=[],i,s;e.doc.nodesBetween(n,o,(c,d,u)=>{if(!c.isInline)return;let f=c.marks;if(!r.isInSet(f)&&u.type.allowsMarkType(r.type)){let p=Math.max(d,n),m=Math.min(d+c.nodeSize,o),g=r.addToSet(f);for(let y=0;y<f.length;y++)f[y].isInSet(g)||(i&&i.to==p&&i.mark.eq(f[y])?i.to=m:a.push(i=new $l(p,m,f[y])));s&&s.to==p?s.to=m:l.push(s=new Ns(p,m,r))}}),a.forEach(c=>e.step(c)),l.forEach(c=>e.step(c))}function TYe(e,n,o,r){let a=[],l=0;e.doc.nodesBetween(n,o,(i,s)=>{if(!i.isInline)return;l++;let c=null;if(r instanceof S1){let d=i.marks,u;for(;u=r.isInSet(d);)(c||(c=[])).push(u),d=u.removeFromSet(d)}else r?r.isInSet(i.marks)&&(c=[r]):c=i.marks;if(c&&c.length){let d=Math.min(s+i.nodeSize,o);for(let u=0;u<c.length;u++){let f=c[u],p;for(let m=0;m<a.length;m++){let g=a[m];g.step==l-1&&f.eq(a[m].style)&&(p=g)}p?(p.to=d,p.step=l):a.push({style:f,from:Math.max(s,n),to:d,step:l})}}}),a.forEach(i=>e.step(new $l(i.from,i.to,i.style)))}function W_(e,n,o,r=o.contentMatch,a=!0){let l=e.doc.nodeAt(n),i=[],s=n+1;for(let c=0;c<l.childCount;c++){let d=l.child(c),u=s+d.nodeSize,f=r.matchType(d.type);if(!f)i.push(new po(s,u,ct.empty));else{r=f;for(let p=0;p<d.marks.length;p++)o.allowsMarkType(d.marks[p].type)||e.step(new $l(s,u,d.marks[p]));if(a&&d.isText&&o.whitespace!="pre"){let p,m=/\r?\n|\r/g,g;for(;p=m.exec(d.text);)g||(g=new ct(Ye.from(o.schema.text(" ",o.allowedMarks(d.marks))),0,0)),i.push(new po(s+p.index,s+p.index+p[0].length,g))}}s=u}if(!r.validEnd){let c=r.fillBefore(Ye.empty,!0);e.replace(s,s,new ct(c,0,0))}for(let c=i.length-1;c>=0;c--)e.step(i[c])}function SYe(e,n,o){return(n==0||e.canReplace(n,e.childCount))&&(o==e.childCount||e.canReplace(0,o))}function Ku(e){let o=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let a=e.$from.node(r),l=e.$from.index(r),i=e.$to.indexAfter(r);if(r<e.depth&&a.canReplace(l,i,o))return r;if(r==0||a.type.spec.isolating||!SYe(a,l,i))break}return null}function DYe(e,n,o){let{$from:r,$to:a,depth:l}=n,i=r.before(l+1),s=a.after(l+1),c=i,d=s,u=Ye.empty,f=0;for(let g=l,y=!1;g>o;g--)y||r.index(g)>0?(y=!0,u=Ye.from(r.node(g).copy(u)),f++):c--;let p=Ye.empty,m=0;for(let g=l,y=!1;g>o;g--)y||a.after(g+1)<a.end(g)?(y=!0,p=Ye.from(a.node(g).copy(p)),m++):d++;e.step(new ho(c,d,i,s,new ct(u.append(p),f,m),u.size-f,!0))}function Q_(e,n,o=null,r=e){let a=vYe(e,n),l=a&&IYe(r,n);return l?a.map($$).concat({type:n,attrs:o}).concat(l.map($$)):null}function $$(e){return{type:e,attrs:null}}function vYe(e,n){let{parent:o,startIndex:r,endIndex:a}=e,l=o.contentMatchAt(r).findWrapping(n);if(!l)return null;let i=l.length?l[0]:n;return o.canReplaceWith(r,a,i)?l:null}function IYe(e,n){let{parent:o,startIndex:r,endIndex:a}=e,l=o.child(r),i=n.contentMatch.findWrapping(l.type);if(!i)return null;let c=(i.length?i[i.length-1]:n).contentMatch;for(let d=r;c&&d<a;d++)c=c.matchType(o.child(d).type);return!c||!c.validEnd?null:i}function AYe(e,n,o){let r=Ye.empty;for(let i=o.length-1;i>=0;i--){if(r.size){let s=o[i].type.contentMatch.matchFragment(r);if(!s||!s.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Ye.from(o[i].type.create(o[i].attrs,r))}let a=n.start,l=n.end;e.step(new ho(a,l,a,l,new ct(r,0,0),o.length,!0))}function OYe(e,n,o,r,a){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let l=e.steps.length;e.doc.nodesBetween(n,o,(i,s)=>{let c=typeof a=="function"?a(i):a;if(i.isTextblock&&!i.hasMarkup(r,c)&&zYe(e.doc,e.mapping.slice(l).map(s),r)){let d=null;if(r.schema.linebreakReplacement){let m=r.whitespace=="pre",g=!!r.contentMatch.matchType(r.schema.linebreakReplacement);m&&!g?d=!1:!m&&g&&(d=!0)}d===!1&&P$(e,i,s,l),W_(e,e.mapping.slice(l).map(s,1),r,void 0,d===null);let u=e.mapping.slice(l),f=u.map(s,1),p=u.map(s+i.nodeSize,1);return e.step(new ho(f,p,f+1,p-1,new ct(Ye.from(r.create(c,null,i.marks)),0,0),1,!0)),d===!0&&j$(e,i,s,l),!1}})}function j$(e,n,o,r){n.forEach((a,l)=>{if(a.isText){let i,s=/\r?\n|\r/g;for(;i=s.exec(a.text);){let c=e.mapping.slice(r).map(o+1+l+i.index);e.replaceWith(c,c+1,n.type.schema.linebreakReplacement.create())}}})}function P$(e,n,o,r){n.forEach((a,l)=>{if(a.type==a.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(o+1+l);e.replaceWith(i,i+1,n.type.schema.text(`
|
|
@@ -229,7 +229,7 @@ img.ProseMirror-separator {
|
|
|
229
229
|
3. "-" cannot repeat`);Ln.customSchemes.push([e,n])}function CZe(){Ln.scanner=fZe(Ln.customSchemes);for(let e=0;e<Ln.tokenQueue.length;e++)Ln.tokenQueue[e][1]({scanner:Ln.scanner});Ln.parser=gZe(Ln.scanner.tokens);for(let e=0;e<Ln.pluginQueue.length;e++)Ln.pluginQueue[e][1]({scanner:Ln.scanner,parser:Ln.parser});Ln.initialized=!0}function QP(e){return Ln.initialized||CZe(),yZe(Ln.parser.start,e,pZe(Ln.scanner.start,e))}function KP(e,n,o){if(n===void 0&&(n=null),o===void 0&&(o=null),n&&typeof n=="object"){if(o)throw Error(`linkifyjs: Invalid link type ${n}; must be a string`);o=n,n=null}const r=new wk(o),a=QP(e),l=[];for(let i=0;i<a.length;i++){const s=a[i];s.isLink&&(!n||s.t===n)&&r.check(s)&&l.push(s.toFormattedObject(r))}return l}function _Ze(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function NZe(e){return new Do({key:new rr("autolink"),appendTransaction:(n,o,r)=>{const a=n.some(d=>d.docChanged)&&!o.doc.eq(r.doc),l=n.some(d=>d.getMeta("preventAutolink"));if(!a||l)return;const{tr:i}=r,s=gqe(o.doc,[...n]);if(Eqe(s).forEach(({newRange:d})=>{const u=bqe(r.doc,d,m=>m.isTextblock);let f,p;if(u.length>1?(f=u[0],p=r.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ")):u.length&&r.doc.textBetween(d.from,d.to," "," ").endsWith(" ")&&(f=u[0],p=r.doc.textBetween(f.pos,d.to,void 0," ")),f&&p){const m=p.split(" ").filter(w=>w!=="");if(m.length<=0)return!1;const g=m[m.length-1],y=f.pos+p.lastIndexOf(g);if(!g)return!1;const b=QP(g).map(w=>w.toObject(e.defaultProtocol));if(!_Ze(b))return!1;b.filter(w=>w.isLink).map(w=>({...w,from:y+w.start+1,to:y+w.end+1})).filter(w=>r.schema.marks.code?!r.doc.rangeHasMark(w.from,w.to,r.schema.marks.code):!0).filter(w=>e.validate(w.value)).forEach(w=>{VN(w.from,w.to,r.doc).some(N=>N.mark.type===e.type)||i.addMark(w.from,w.to,e.type.create({href:w.href}))})}}),!!i.steps.length)return i}})}function kZe(e){return new Do({key:new rr("handleClickLink"),props:{handleClick:(n,o,r)=>{var a,l;if(r.button!==0||!n.editable)return!1;let i=r.target;const s=[];for(;i.nodeName!=="DIV";)s.push(i),i=i.parentNode;if(!s.find(p=>p.nodeName==="A"))return!1;const c=O7(n.state,e.type.name),d=r.target,u=(a=d==null?void 0:d.href)!==null&&a!==void 0?a:c.href,f=(l=d==null?void 0:d.target)!==null&&l!==void 0?l:c.target;return d&&u?(window.open(u,f),!0):!1}}})}function EZe(e){return new Do({key:new rr("handlePasteLink"),props:{handlePaste:(n,o,r)=>{const{state:a}=n,{selection:l}=a,{empty:i}=l;if(i)return!1;let s="";r.content.forEach(d=>{s+=d.textContent});const c=KP(s,{defaultProtocol:e.defaultProtocol}).find(d=>d.isLink&&d.value===s);return!s||!c?!1:(e.editor.commands.setMark(e.type,{href:c.href}),!0)}}})}const xZe=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function qP(e,n){const o=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return n&&n.forEach(r=>{const a=typeof r=="string"?r:r.scheme;a&&o.push(a)}),!e||e.replace(xZe,"").match(new RegExp(`^(?:(?:${o.join("|")}):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))`,"i"))}const GP=Bs.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.protocols.forEach(e=>{if(typeof e=="string"){WP(e);return}WP(e.scheme,e.optionalSlashes)})},onDestroy(){wZe()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:e=>!!e}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{const n=e.getAttribute("href");return!n||!qP(n,this.options.protocols)?!1:null}}]},renderHTML({HTMLAttributes:e}){return qP(e.href,this.options.protocols)?["a",Tr(this.options.HTMLAttributes,e),0]:["a",Tr(this.options.HTMLAttributes,{...e,href:""}),0]},addCommands(){return{setLink:e=>({chain:n})=>n().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:n})=>n().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Ih({find:e=>{const n=[];if(e){const{validate:o}=this.options,r=KP(e).filter(a=>a.isLink&&o(a.value));r.length&&r.forEach(a=>n.push({text:a.value,data:{href:a.href},index:a.start}))}return n},type:this.type,getAttributes:e=>{var n;return{href:(n=e.data)===null||n===void 0?void 0:n.href}}})]},addProseMirrorPlugins(){const e=[];return this.options.autolink&&e.push(NZe({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:this.options.validate})),this.options.openOnClick===!0&&e.push(kZe({type:this.type})),this.options.linkOnPaste&&e.push(EZe({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),e}}),XP="color-link",ZP="text-decoration: underline",TZe=GP.extend({defaultOptions:{...GP.options,openOnClick:!1},priority:1,addAttributes(){return{class:{default:XP,parseHTML:e=>e.class=XP},style:{default:ZP,parseHTML:e=>e.style=ZP},href:{default:""}}}}),JP=sr.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new Do({key:new rr("placeholder"),props:{decorations:({doc:e,selection:n})=>{const o=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=n,a=[];if(!o)return null;const l=this.editor.isEmpty;return e.descendants((i,s)=>{const c=r>=s&&r<=s+i.nodeSize,d=!i.isLeaf&&r2(i);if((c||!this.options.showOnlyCurrent)&&d){const u=[this.options.emptyNodeClass];l&&u.push(this.options.emptyEditorClass);const f=ma.node(s,s+i.nodeSize,{class:u.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:i,pos:s,hasAnchor:c}):this.options.placeholder});a.push(f)}return this.options.includeChildren}),io.create(e,a)}}})]}}),SZe=JP.extend({defaultOptions:{...JP.options,emptyEditorClass:"is-editor-empty color-gray-60",placeholder:"Escreva a descrição aqui"}}),eR=xi.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",Tr(this.options.HTMLAttributes,e)]},renderText(){return`
|
|
230
230
|
`},addCommands(){return{setHardBreak:()=>({commands:e,chain:n,state:o,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:a,storedMarks:l}=o;if(a.$from.parent.type.spec.isolating)return!1;const{keepMarks:i}=this.options,{splittableMarks:s}=r.extensionManager,c=l||a.$to.parentOffset&&a.$from.marks();return n().insertContent({type:this.name}).command(({tr:d,dispatch:u})=>{if(u&&c&&i){const f=c.filter(p=>s.includes(p.type.name));d.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),DZe=eR.extend({defaultOptions:{...eR.options,keepMarks:!1},addKeyboardShortcuts(){return{"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var K2=200,go=function(){};go.prototype.append=function(n){return n.length?(n=go.from(n),!this.length&&n||n.length<K2&&this.leafAppend(n)||this.length<K2&&n.leafPrepend(this)||this.appendInner(n)):this},go.prototype.prepend=function(n){return n.length?go.from(n).append(this):this},go.prototype.appendInner=function(n){return new vZe(this,n)},go.prototype.slice=function(n,o){return n===void 0&&(n=0),o===void 0&&(o=this.length),n>=o?go.empty:this.sliceInner(Math.max(0,n),Math.min(this.length,o))},go.prototype.get=function(n){if(!(n<0||n>=this.length))return this.getInner(n)},go.prototype.forEach=function(n,o,r){o===void 0&&(o=0),r===void 0&&(r=this.length),o<=r?this.forEachInner(n,o,r,0):this.forEachInvertedInner(n,o,r,0)},go.prototype.map=function(n,o,r){o===void 0&&(o=0),r===void 0&&(r=this.length);var a=[];return this.forEach(function(l,i){return a.push(n(l,i))},o,r),a},go.from=function(n){return n instanceof go?n:n&&n.length?new tR(n):go.empty};var tR=function(e){function n(r){e.call(this),this.values=r}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var o={length:{configurable:!0},depth:{configurable:!0}};return n.prototype.flatten=function(){return this.values},n.prototype.sliceInner=function(a,l){return a==0&&l==this.length?this:new n(this.values.slice(a,l))},n.prototype.getInner=function(a){return this.values[a]},n.prototype.forEachInner=function(a,l,i,s){for(var c=l;c<i;c++)if(a(this.values[c],s+c)===!1)return!1},n.prototype.forEachInvertedInner=function(a,l,i,s){for(var c=l-1;c>=i;c--)if(a(this.values[c],s+c)===!1)return!1},n.prototype.leafAppend=function(a){if(this.length+a.length<=K2)return new n(this.values.concat(a.flatten()))},n.prototype.leafPrepend=function(a){if(this.length+a.length<=K2)return new n(a.flatten().concat(this.values))},o.length.get=function(){return this.values.length},o.depth.get=function(){return 0},Object.defineProperties(n.prototype,o),n}(go);go.empty=new tR([]);var vZe=function(e){function n(o,r){e.call(this),this.left=o,this.right=r,this.length=o.length+r.length,this.depth=Math.max(o.depth,r.depth)+1}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},n.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},n.prototype.forEachInner=function(r,a,l,i){var s=this.left.length;if(a<s&&this.left.forEachInner(r,a,Math.min(l,s),i)===!1||l>s&&this.right.forEachInner(r,Math.max(a-s,0),Math.min(this.length,l)-s,i+s)===!1)return!1},n.prototype.forEachInvertedInner=function(r,a,l,i){var s=this.left.length;if(a>s&&this.right.forEachInvertedInner(r,a-s,Math.max(l,s)-s,i+s)===!1||l<s&&this.left.forEachInvertedInner(r,Math.min(a,s),l,i)===!1)return!1},n.prototype.sliceInner=function(r,a){if(r==0&&a==this.length)return this;var l=this.left.length;return a<=l?this.left.slice(r,a):r>=l?this.right.slice(r-l,a-l):this.left.slice(r,l).append(this.right.slice(0,a-l))},n.prototype.leafAppend=function(r){var a=this.right.leafAppend(r);if(a)return new n(this.left,a)},n.prototype.leafPrepend=function(r){var a=this.left.leafPrepend(r);if(a)return new n(a,this.right)},n.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new n(this.left,new n(this.right,r)):new n(this,r)},n}(go);const IZe=500;class cl{constructor(n,o){this.items=n,this.eventCount=o}popEvent(n,o){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let a,l;o&&(a=this.remapping(r,this.items.length),l=a.maps.length);let i=n.tr,s,c,d=[],u=[];return this.items.forEach((f,p)=>{if(!f.step){a||(a=this.remapping(r,p+1),l=a.maps.length),l--,u.push(f);return}if(a){u.push(new Ql(f.map));let m=f.step.map(a.slice(l)),g;m&&i.maybeStep(m).doc&&(g=i.mapping.maps[i.mapping.maps.length-1],d.push(new Ql(g,void 0,void 0,d.length+u.length))),l--,g&&a.appendMap(g,l)}else i.maybeStep(f.step);if(f.selection)return s=a?f.selection.map(a.slice(l)):f.selection,c=new cl(this.items.slice(0,r).append(u.reverse().concat(d)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:i,selection:s}}addTransform(n,o,r,a){let l=[],i=this.eventCount,s=this.items,c=!a&&s.length?s.get(s.length-1):null;for(let u=0;u<n.steps.length;u++){let f=n.steps[u].invert(n.docs[u]),p=new Ql(n.mapping.maps[u],f,o),m;(m=c&&c.merge(p))&&(p=m,u?l.pop():s=s.slice(0,s.length-1)),l.push(p),o&&(i++,o=void 0),a||(c=p)}let d=i-r.depth;return d>OZe&&(s=AZe(s,d),i-=d),new cl(s.append(l),i)}remapping(n,o){let r=new Wu;return this.items.forEach((a,l)=>{let i=a.mirrorOffset!=null&&l-a.mirrorOffset>=n?r.maps.length-a.mirrorOffset:void 0;r.appendMap(a.map,i)},n,o),r}addMaps(n){return this.eventCount==0?this:new cl(this.items.append(n.map(o=>new Ql(o))),this.eventCount)}rebased(n,o){if(!this.eventCount)return this;let r=[],a=Math.max(0,this.items.length-o),l=n.mapping,i=n.steps.length,s=this.eventCount;this.items.forEach(p=>{p.selection&&s--},a);let c=o;this.items.forEach(p=>{let m=l.getMirror(--c);if(m==null)return;i=Math.min(i,m);let g=l.maps[m];if(p.step){let y=n.steps[m].invert(n.docs[m]),b=p.selection&&p.selection.map(l.slice(c+1,m));b&&s++,r.push(new Ql(g,y,b))}else r.push(new Ql(g))},a);let d=[];for(let p=o;p<i;p++)d.push(new Ql(l.maps[p]));let u=this.items.slice(0,a).append(d).append(r),f=new cl(u,s);return f.emptyItemCount()>IZe&&(f=f.compress(this.items.length-r.length)),f}emptyItemCount(){let n=0;return this.items.forEach(o=>{o.step||n++}),n}compress(n=this.items.length){let o=this.remapping(0,n),r=o.maps.length,a=[],l=0;return this.items.forEach((i,s)=>{if(s>=n)a.push(i),i.selection&&l++;else if(i.step){let c=i.step.map(o.slice(r)),d=c&&c.getMap();if(r--,d&&o.appendMap(d,r),c){let u=i.selection&&i.selection.map(o.slice(r));u&&l++;let f=new Ql(d.invert(),c,u),p,m=a.length-1;(p=a.length&&a[m].merge(f))?a[m]=p:a.push(f)}}else i.map&&r--},this.items.length,0),new cl(go.from(a.reverse()),l)}}cl.empty=new cl(go.empty,0);function AZe(e,n){let o;return e.forEach((r,a)=>{if(r.selection&&n--==0)return o=a,!1}),e.slice(o)}class Ql{constructor(n,o,r,a){this.map=n,this.step=o,this.selection=r,this.mirrorOffset=a}merge(n){if(this.step&&n.step&&!n.selection){let o=n.step.merge(this.step);if(o)return new Ql(o.getMap().invert(),o,this.selection)}}}class Rs{constructor(n,o,r,a,l){this.done=n,this.undone=o,this.prevRanges=r,this.prevTime=a,this.prevComposition=l}}const OZe=20;function zZe(e,n,o,r){let a=o.getMeta(ld),l;if(a)return a.historyState;o.getMeta(VZe)&&(e=new Rs(e.done,e.undone,null,0,-1));let i=o.getMeta("appendedTransaction");if(o.steps.length==0)return e;if(i&&i.getMeta(ld))return i.getMeta(ld).redo?new Rs(e.done.addTransform(o,void 0,r,q2(n)),e.undone,nR(o.mapping.maps),e.prevTime,e.prevComposition):new Rs(e.done,e.undone.addTransform(o,void 0,r,q2(n)),null,e.prevTime,e.prevComposition);if(o.getMeta("addToHistory")!==!1&&!(i&&i.getMeta("addToHistory")===!1)){let s=o.getMeta("composition"),c=e.prevTime==0||!i&&e.prevComposition!=s&&(e.prevTime<(o.time||0)-r.newGroupDelay||!BZe(o,e.prevRanges)),d=i?_k(e.prevRanges,o.mapping):nR(o.mapping.maps);return new Rs(e.done.addTransform(o,c?n.selection.getBookmark():void 0,r,q2(n)),cl.empty,d,o.time,s??e.prevComposition)}else return(l=o.getMeta("rebased"))?new Rs(e.done.rebased(o,l),e.undone.rebased(o,l),_k(e.prevRanges,o.mapping),e.prevTime,e.prevComposition):new Rs(e.done.addMaps(o.mapping.maps),e.undone.addMaps(o.mapping.maps),_k(e.prevRanges,o.mapping),e.prevTime,e.prevComposition)}function BZe(e,n){if(!n)return!1;if(!e.docChanged)return!0;let o=!1;return e.mapping.maps[0].forEach((r,a)=>{for(let l=0;l<n.length;l+=2)r<=n[l+1]&&a>=n[l]&&(o=!0)}),o}function nR(e){let n=[];for(let o=e.length-1;o>=0&&n.length==0;o--)e[o].forEach((r,a,l,i)=>n.push(l,i));return n}function _k(e,n){if(!e)return null;let o=[];for(let r=0;r<e.length;r+=2){let a=n.map(e[r],1),l=n.map(e[r+1],-1);a<=l&&o.push(a,l)}return o}function LZe(e,n,o){let r=q2(n),a=ld.get(n).spec.config,l=(o?e.undone:e.done).popEvent(n,r);if(!l)return null;let i=l.selection.resolve(l.transform.doc),s=(o?e.done:e.undone).addTransform(l.transform,n.selection.getBookmark(),a,r),c=new Rs(o?s:l.remaining,o?l.remaining:s,null,0,-1);return l.transform.setSelection(i).setMeta(ld,{redo:o,historyState:c})}let Nk=!1,oR=null;function q2(e){let n=e.plugins;if(oR!=n){Nk=!1,oR=n;for(let o=0;o<n.length;o++)if(n[o].spec.historyPreserveItems){Nk=!0;break}}return Nk}const ld=new rr("history"),VZe=new rr("closeHistory");function $Ze(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Do({key:ld,state:{init(){return new Rs(cl.empty,cl.empty,null,0,-1)},apply(n,o,r){return zZe(o,r,n,e)}},config:e,props:{handleDOMEvents:{beforeinput(n,o){let r=o.inputType,a=r=="historyUndo"?aR:r=="historyRedo"?lR:null;return a?(o.preventDefault(),a(n.state,n.dispatch)):!1}}}})}function rR(e,n){return(o,r)=>{let a=ld.getState(o);if(!a||(e?a.undone:a.done).eventCount==0)return!1;if(r){let l=LZe(a,o,e);l&&r(n?l.scrollIntoView():l)}return!0}}const aR=rR(!1,!0),lR=rR(!0,!0),iR=sr.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:n})=>aR(e,n),redo:()=>({state:e,dispatch:n})=>lR(e,n)}},addProseMirrorPlugins(){return[$Ze(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),jZe=iR.extend({defaultOptions:{...iR.options,newGroupDelay:150}});var PZe="4.0.0";function RZe(e){return e===void 0}function Ca(e){return typeof e=="boolean"}function FZe(e,n){for(var o in n)n.hasOwnProperty(o)&&RZe(e[o])&&(e[o]=n[o]);return e}function HZe(e,n,o){var r;return e.length>n&&(o==null?(o="…",r=3):r=o.length,e=e.substring(0,n-r)+o),e}function kn(e,n){for(var o=e.length-1;o>=0;o--)e[o]===n&&e.splice(o,1)}function id(e,n){for(var o=e.length-1;o>=0;o--)n(e[o])===!0&&e.splice(o,1)}function Qh(e){throw new Error("Unhandled case for value: '".concat(e,"'"))}var bf=/[A-Za-z]/,Uo=/[\d]/,dl=/\s/,kk=/['"]/,UZe=/[\x00-\x1F\x7F]/,YZe=/A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source,WZe=/\u2700-\u27bf\udde6-\uddff\ud800-\udbff\udc00-\udfff\ufe0e\ufe0f\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0\ud83c\udffb-\udfff\u200d\u3299\u3297\u303d\u3030\u24c2\ud83c\udd70-\udd71\udd7e-\udd7f\udd8e\udd91-\udd9a\udde6-\uddff\ude01-\ude02\ude1a\ude2f\ude32-\ude3a\ude50-\ude51\u203c\u2049\u25aa-\u25ab\u25b6\u25c0\u25fb-\u25fe\u00a9\u00ae\u2122\u2139\udc04\u2600-\u26FF\u2b05\u2b06\u2b07\u2b1b\u2b1c\u2b50\u2b55\u231a\u231b\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa\udccf\u2935\u2934\u2190-\u21ff/.source,QZe=/\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source,KZe=YZe+WZe+QZe,qZe=/0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source,sR=KZe+qZe,sd=new RegExp("[".concat(sR,"]")),cR=function(){function e(n){n===void 0&&(n={}),this.tagName="",this.attrs={},this.innerHTML="",this.tagName=n.tagName||"",this.attrs=n.attrs||{},this.innerHTML=n.innerHtml||n.innerHTML||""}return e.prototype.setTagName=function(n){return this.tagName=n,this},e.prototype.getTagName=function(){return this.tagName||""},e.prototype.setAttr=function(n,o){var r=this.getAttrs();return r[n]=o,this},e.prototype.getAttr=function(n){return this.getAttrs()[n]},e.prototype.setAttrs=function(n){return Object.assign(this.getAttrs(),n),this},e.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},e.prototype.setClass=function(n){return this.setAttr("class",n)},e.prototype.addClass=function(n){for(var o=this.getClass(),r=o?o.split(dl):[],a=n.split(dl),l;l=a.shift();)r.indexOf(l)===-1&&r.push(l);return this.getAttrs().class=r.join(" "),this},e.prototype.removeClass=function(n){for(var o=this.getClass(),r=o?o.split(dl):[],a=n.split(dl),l;r.length&&(l=a.shift());){var i=r.indexOf(l);i!==-1&&r.splice(i,1)}return this.getAttrs().class=r.join(" "),this},e.prototype.getClass=function(){return this.getAttrs().class||""},e.prototype.hasClass=function(n){return(" "+this.getClass()+" ").indexOf(" "+n+" ")!==-1},e.prototype.setInnerHTML=function(n){return this.innerHTML=n,this},e.prototype.setInnerHtml=function(n){return this.setInnerHTML(n)},e.prototype.getInnerHTML=function(){return this.innerHTML||""},e.prototype.getInnerHtml=function(){return this.getInnerHTML()},e.prototype.toAnchorString=function(){var n=this.getTagName(),o=this.buildAttrsStr();return o=o?" "+o:"",["<",n,o,">",this.getInnerHtml(),"</",n,">"].join("")},e.prototype.buildAttrsStr=function(){if(!this.attrs)return"";var n=this.getAttrs(),o=[];for(var r in n)n.hasOwnProperty(r)&&o.push(r+'="'+n[r]+'"');return o.join(" ")},e}();function GZe(e,n,o){var r,a;o==null?(o="…",a=3,r=8):(a=o.length,r=o.length);var l=function(N){var _={},C=N,k=C.match(/^([a-z]+):\/\//i);return k&&(_.scheme=k[1],C=C.substr(k[0].length)),k=C.match(/^(.*?)(?=(\?|#|\/|$))/i),k&&(_.host=k[1],C=C.substr(k[0].length)),k=C.match(/^\/(.*?)(?=(\?|#|$))/i),k&&(_.path=k[1],C=C.substr(k[0].length)),k=C.match(/^\?(.*?)(?=(#|$))/i),k&&(_.query=k[1],C=C.substr(k[0].length)),k=C.match(/^#(.*?)$/i),k&&(_.fragment=k[1]),_},i=function(N){var _="";return N.scheme&&N.host&&(_+=N.scheme+"://"),N.host&&(_+=N.host),N.path&&(_+="/"+N.path),N.query&&(_+="?"+N.query),N.fragment&&(_+="#"+N.fragment),_},s=function(N,_){var C=_/2,k=Math.ceil(C),E=-1*Math.floor(C),T="";return E<0&&(T=N.substr(E)),N.substr(0,k)+o+T};if(e.length<=n)return e;var c=n-a,d=l(e);if(d.query){var u=d.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i);u&&(d.query=d.query.substr(0,u[1].length),e=i(d))}if(e.length<=n||(d.host&&(d.host=d.host.replace(/^www\./,""),e=i(d)),e.length<=n))return e;var f="";if(d.host&&(f+=d.host),f.length>=c)return d.host.length==n?(d.host.substr(0,n-a)+o).substr(0,c+r):s(f,c).substr(0,c+r);var p="";if(d.path&&(p+="/"+d.path),d.query&&(p+="?"+d.query),p)if((f+p).length>=c){if((f+p).length==n)return(f+p).substr(0,n);var m=c-f.length;return(f+s(p,m)).substr(0,c+r)}else f+=p;if(d.fragment){var g="#"+d.fragment;if((f+g).length>=c){if((f+g).length==n)return(f+g).substr(0,n);var y=c-f.length;return(f+s(g,y)).substr(0,c+r)}else f+=g}if(d.scheme&&d.host){var b=d.scheme+"://";if((f+b).length<c)return(b+f).substr(0,n)}if(f.length<=n)return f;var w="";return c>0&&(w=f.substr(-1*Math.floor(c/2))),(f.substr(0,Math.ceil(c/2))+o+w).substr(0,c+r)}function XZe(e,n,o){if(e.length<=n)return e;var r,a;o==null?(o="…",r=8,a=3):(r=o.length,a=o.length);var l=n-a,i="";return l>0&&(i=e.substr(-1*Math.floor(l/2))),(e.substr(0,Math.ceil(l/2))+o+i).substr(0,l+r)}function ZZe(e,n,o){return HZe(e,n,o)}var JZe=function(){function e(n){n===void 0&&(n={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=n.newWindow||!1,this.truncate=n.truncate||{},this.className=n.className||""}return e.prototype.build=function(n){return new cR({tagName:"a",attrs:this.createAttrs(n),innerHtml:this.processAnchorText(n.getAnchorText())})},e.prototype.createAttrs=function(n){var o={href:n.getAnchorHref()},r=this.createCssClass(n);return r&&(o.class=r),this.newWindow&&(o.target="_blank",o.rel="noopener noreferrer"),this.truncate&&this.truncate.length&&this.truncate.length<n.getAnchorText().length&&(o.title=n.getAnchorHref()),o},e.prototype.createCssClass=function(n){var o=this.className;if(o){for(var r=[o],a=n.getCssClassSuffixes(),l=0,i=a.length;l<i;l++)r.push(o+"-"+a[l]);return r.join(" ")}else return""},e.prototype.processAnchorText=function(n){return n=this.doTruncate(n),n},e.prototype.doTruncate=function(n){var o=this.truncate;if(!o||!o.length)return n;var r=o.length,a=o.location;return a==="smart"?GZe(n,r):a==="middle"?XZe(n,r):ZZe(n,r)},e}(),Ek=function(e,n){return Ek=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,r){o.__proto__=r}||function(o,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(o[a]=r[a])},Ek(e,n)};function Kh(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");Ek(e,n);function o(){this.constructor=e}e.prototype=n===null?Object.create(n):(o.prototype=n.prototype,new o)}var yo=function(){return yo=Object.assign||function(n){for(var o,r=1,a=arguments.length;r<a;r++){o=arguments[r];for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(n[l]=o[l])}return n},yo.apply(this,arguments)};typeof SuppressedError=="function"&&SuppressedError;var qh=function(){function e(n){this._=null,this.matchedText="",this.offset=0,this.tagBuilder=n.tagBuilder,this.matchedText=n.matchedText,this.offset=n.offset}return e.prototype.getMatchedText=function(){return this.matchedText},e.prototype.setOffset=function(n){this.offset=n},e.prototype.getOffset=function(){return this.offset},e.prototype.getCssClassSuffixes=function(){return[this.type]},e.prototype.buildTag=function(){return this.tagBuilder.build(this)},e}(),eJe="(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|travelchannel|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|etisalat|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abarth|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|loans|locus|lotte|lotto|macys|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)",tJe=new RegExp("^"+eJe+"$"),nJe=/[\/?#]/,oJe=/[-+&@#/%=~_()|'$*\[\]{}\u2713]/,dR=/[?!:,.;^]/,uR=/https?:\/\//i,rJe=new RegExp("^"+uR.source,"i"),aJe=new RegExp(dR.source+"$"),lJe=/^(javascript|vbscript):/i,iJe=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/,sJe=/^(?:\/\/)?([^/#?:]+)/;function xk(e){return bf.test(e)}function fR(e){return bf.test(e)||Uo.test(e)||e==="+"||e==="-"||e==="."}function Fs(e){return sd.test(e)}function Tk(e){return e==="_"||Fs(e)}function pR(e){return sd.test(e)||oJe.test(e)||dR.test(e)}function Sk(e){return nJe.test(e)}function hR(e){return tJe.test(e.toLowerCase())}function cJe(e){if(lJe.test(e))return!1;var n=e.match(iJe);if(!n)return!1;var o=!!n[1],r=n[2];return o?!0:!(r.indexOf(".")===-1||!bf.test(r))}function dJe(e){var n=e.match(sJe);if(!n)return!1;var o=n[0],r=o.split(".");if(r.length<2)return!1;var a=r[r.length-1];return!!hR(a)}var uJe=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,fJe=/[:/?#]/;function pJe(e){var n=e.split(fJe,1)[0];return uJe.test(n)}var hJe=/^(https?:\/\/)?(www\.)?/i,mJe=/^\/\//,gJe=function(e){Kh(n,e);function n(o){var r=e.call(this,o)||this;return r.type="url",r.url="",r.urlMatchType="scheme",r.protocolRelativeMatch=!1,r.stripPrefix={scheme:!0,www:!0},r.stripTrailingSlash=!0,r.decodePercentEncoding=!0,r.protocolPrepended=!1,r.urlMatchType=o.urlMatchType,r.url=o.url,r.protocolRelativeMatch=o.protocolRelativeMatch,r.stripPrefix=o.stripPrefix,r.stripTrailingSlash=o.stripTrailingSlash,r.decodePercentEncoding=o.decodePercentEncoding,r}return n.prototype.getType=function(){return"url"},n.prototype.getUrlMatchType=function(){return this.urlMatchType},n.prototype.getUrl=function(){var o=this.url;return!this.protocolRelativeMatch&&this.urlMatchType!=="scheme"&&!this.protocolPrepended&&(o=this.url="http://"+o,this.protocolPrepended=!0),o},n.prototype.getAnchorHref=function(){var o=this.getUrl();return o.replace(/&/g,"&")},n.prototype.getAnchorText=function(){var o=this.getMatchedText();return this.protocolRelativeMatch&&(o=MJe(o)),this.stripPrefix.scheme&&(o=yJe(o)),this.stripPrefix.www&&(o=bJe(o)),this.stripTrailingSlash&&(o=wJe(o)),this.decodePercentEncoding&&(o=CJe(o)),o},n}(qh);function yJe(e){return e.replace(rJe,"")}function bJe(e){return e.replace(hJe,"$1")}function MJe(e){return e.replace(mJe,"")}function wJe(e){return e.charAt(e.length-1)==="/"&&(e=e.slice(0,-1)),e}function CJe(e){var n=e.replace(/%22/gi,""").replace(/%26/gi,"&").replace(/%27/gi,"'").replace(/%3C/gi,"<").replace(/%3E/gi,">");try{return decodeURIComponent(n)}catch{return n}}var _Je=/^mailto:/i,NJe=new RegExp("[".concat(sR,"!#$%&'*+/=?^_`{|}~-]"));function kJe(e){return sd.test(e)}function Dk(e){return NJe.test(e)}function EJe(e){var n=e.split(".").pop()||"";return hR(n)}var xJe=function(e){Kh(n,e);function n(o){var r=e.call(this,o)||this;return r.type="email",r.email="",r.email=o.email,r}return n.prototype.getType=function(){return"email"},n.prototype.getEmail=function(){return this.email},n.prototype.getAnchorHref=function(){return"mailto:"+this.email},n.prototype.getAnchorText=function(){return this.email},n}(qh);function mR(e){return e==="_"||sd.test(e)}function TJe(e){return e.length<=140}var SJe=["twitter","facebook","instagram","tiktok"],DJe=function(e){Kh(n,e);function n(o){var r=e.call(this,o)||this;return r.type="hashtag",r.serviceName="twitter",r.hashtag="",r.serviceName=o.serviceName,r.hashtag=o.hashtag,r}return n.prototype.getType=function(){return"hashtag"},n.prototype.getServiceName=function(){return this.serviceName},n.prototype.getHashtag=function(){return this.hashtag},n.prototype.getAnchorHref=function(){var o=this.serviceName,r=this.hashtag;switch(o){case"twitter":return"https://twitter.com/hashtag/"+r;case"facebook":return"https://www.facebook.com/hashtag/"+r;case"instagram":return"https://instagram.com/explore/tags/"+r;case"tiktok":return"https://www.tiktok.com/tag/"+r;default:throw Qh(o),new Error("Invalid hashtag service: ".concat(o))}},n.prototype.getAnchorText=function(){return"#"+this.hashtag},n.prototype.getCssClassSuffixes=function(){var o=e.prototype.getCssClassSuffixes.call(this),r=this.getServiceName();return r&&o.push(r),o},n}(qh),vJe={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/},IJe=/[-\w.]/;function gR(e){return IJe.test(e)}function AJe(e,n){var o=vJe[n];return o.test(e)}var OJe=["twitter","instagram","soundcloud","tiktok"],zJe=function(e){Kh(n,e);function n(o){var r=e.call(this,o)||this;return r.type="mention",r.serviceName="twitter",r.mention="",r.mention=o.mention,r.serviceName=o.serviceName,r}return n.prototype.getType=function(){return"mention"},n.prototype.getMention=function(){return this.mention},n.prototype.getServiceName=function(){return this.serviceName},n.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":return"https://twitter.com/"+this.mention;case"instagram":return"https://instagram.com/"+this.mention;case"soundcloud":return"https://soundcloud.com/"+this.mention;case"tiktok":return"https://www.tiktok.com/@"+this.mention;default:throw new Error("Unknown service name to point mention to: "+this.serviceName)}},n.prototype.getAnchorText=function(){return"@"+this.mention},n.prototype.getCssClassSuffixes=function(){var o=e.prototype.getCssClassSuffixes.call(this),r=this.getServiceName();return r&&o.push(r),o},n}(qh),BJe=/[-. ]/,LJe=/[-. ()]/,VJe=/[,;]/,$Je=/(?:(?:(?:(\+)?\d{1,3}[-. ]?)?\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-. ]?(?:\d[-. ]?){6,12}\d+))([,;]+[0-9]+#?)*/,jJe=/(0([1-9]-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/,PJe=new RegExp("^".concat($Je.source,"|").concat(jJe.source,"$"));function yR(e){return BJe.test(e)}function vk(e){return VJe.test(e)}function RJe(e){var n=e.charAt(0)==="+"||LJe.test(e);return n&&PJe.test(e)}var FJe=function(e){Kh(n,e);function n(o){var r=e.call(this,o)||this;return r.type="phone",r.number="",r.plusSign=!1,r.number=o.number,r.plusSign=o.plusSign,r}return n.prototype.getType=function(){return"phone"},n.prototype.getPhoneNumber=function(){return this.number},n.prototype.getNumber=function(){return this.getPhoneNumber()},n.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},n.prototype.getAnchorText=function(){return this.matchedText},n}(qh);function HJe(e,n){for(var o=n.tagBuilder,r=n.stripPrefix,a=n.stripTrailingSlash,l=n.decodePercentEncoding,i=n.hashtagServiceName,s=n.mentionServiceName,c=[],d=e.length,u=[],f=0;f<d;f++){var p=e.charAt(f);if(u.length===0)b(p);else for(var m=u.length-1;m>=0;m--){var g=u[m];switch(g.state){case 11:E(g,p);break;case 12:T(g,p);break;case 0:w(g,p);break;case 1:N(g,p);break;case 2:_(g,p);break;case 3:C(g,p);break;case 4:k(g,p);break;case 5:S(g,p);break;case 6:D(g,p);break;case 7:v(g,p);break;case 13:I(g,p);break;case 14:B(g,p);break;case 8:$(g,p);break;case 9:F(g,p);break;case 10:L(g,p);break;case 15:A(g,p);break;case 16:P(g,p);break;case 17:j(g,p);break;case 18:O(g,p);break;case 19:z(g,p);break;case 20:R(g,p);break;case 21:Y(g,p);break;case 22:K(g,p);break;case 23:te(g,p);break;case 24:J(g,p);break;case 25:W(g,p);break;case 26:G(g,p);break;case 27:ne(g,p);break;case 28:le(g,p);break;case 29:ge(g,p);break;case 30:fe(g,p);break;case 31:oe(g,p);break;case 32:Oe(g,p);break;case 33:Qe(g,p);break;case 34:Je(g,p);break;case 35:Ne(g,p);break;case 36:Te(g,p);break;case 37:we(g,p);break;case 38:ke(g,p);break;case 39:Pe(g,p);break;case 40:He(g,p);break;case 41:nt(g,p);break;default:Qh(g.state)}}}for(var y=u.length-1;y>=0;y--)u.forEach(function(X){return $e(X)});return c;function b(X){if(X==="#")u.push(KJe(f,28));else if(X==="@")u.push(qJe(f,30));else if(X==="/")u.push(Ak(f,11));else if(X==="+")u.push(Ok(f,37));else if(X==="(")u.push(Ok(f,32));else{if(Uo.test(X)&&(u.push(Ok(f,38)),u.push(WJe(f,13))),kJe(X)){var re=X.toLowerCase()==="m"?15:22;u.push(QJe(f,re))}xk(X)&&u.push(Ik(f,0)),sd.test(X)&&u.push(Ak(f,5))}}function w(X,re){re===":"?X.state=2:re==="-"?X.state=1:fR(re)||kn(u,X)}function N(X,re){re==="-"||(re==="/"?(kn(u,X),u.push(Ak(f,11))):fR(re)?X.state=0:kn(u,X))}function _(X,re){re==="/"?X.state=3:re==="."?kn(u,X):Fs(re)?(X.state=5,xk(re)&&u.push(Ik(f,0))):kn(u,X)}function C(X,re){re==="/"?X.state=4:pR(re)?(X.state=10,X.acceptStateReached=!0):$e(X)}function k(X,re){re==="/"?X.state=10:Fs(re)?(X.state=5,X.acceptStateReached=!0):kn(u,X)}function E(X,re){re==="/"?X.state=12:kn(u,X)}function T(X,re){Fs(re)?X.state=5:kn(u,X)}function S(X,re){re==="."?X.state=7:re==="-"?X.state=6:re===":"?X.state=8:Sk(re)?X.state=10:Tk(re)||$e(X)}function D(X,re){re==="-"||(re==="."?$e(X):Fs(re)?X.state=5:$e(X))}function v(X,re){re==="."?$e(X):Fs(re)?(X.state=5,X.acceptStateReached=!0):$e(X)}function I(X,re){re==="."?X.state=14:re===":"?X.state=8:Uo.test(re)||(Sk(re)?X.state=10:sd.test(re)?kn(u,X):$e(X))}function B(X,re){Uo.test(re)?(X.octetsEncountered++,X.octetsEncountered===4&&(X.acceptStateReached=!0),X.state=13):$e(X)}function $(X,re){Uo.test(re)?X.state=9:$e(X)}function F(X,re){Uo.test(re)||(Sk(re)?X.state=10:$e(X))}function L(X,re){pR(re)||$e(X)}function A(X,re){re.toLowerCase()==="a"?X.state=16:K(X,re)}function P(X,re){re.toLowerCase()==="i"?X.state=17:K(X,re)}function j(X,re){re.toLowerCase()==="l"?X.state=18:K(X,re)}function O(X,re){re.toLowerCase()==="t"?X.state=19:K(X,re)}function z(X,re){re.toLowerCase()==="o"?X.state=20:K(X,re)}function R(X,re){re.toLowerCase()===":"?X.state=21:K(X,re)}function Y(X,re){Dk(re)?X.state=22:kn(u,X)}function K(X,re){re==="."?X.state=23:re==="@"?X.state=24:Dk(re)?X.state=22:kn(u,X)}function te(X,re){re==="."||re==="@"?kn(u,X):Dk(re)?X.state=22:kn(u,X)}function J(X,re){Fs(re)?X.state=25:kn(u,X)}function W(X,re){re==="."?X.state=27:re==="-"?X.state=26:Tk(re)||$e(X)}function G(X,re){re==="-"||re==="."?$e(X):Tk(re)?X.state=25:$e(X)}function ne(X,re){re==="."||re==="-"?$e(X):Fs(re)?(X.state=25,X.acceptStateReached=!0):$e(X)}function le(X,re){mR(re)?(X.state=29,X.acceptStateReached=!0):kn(u,X)}function ge(X,re){mR(re)||$e(X)}function fe(X,re){gR(re)?(X.state=31,X.acceptStateReached=!0):kn(u,X)}function oe(X,re){gR(re)||(sd.test(re)?kn(u,X):$e(X))}function we(X,re){Uo.test(re)?X.state=38:(kn(u,X),b(re))}function Oe(X,re){Uo.test(re)?X.state=33:kn(u,X),b(re)}function Qe(X,re){Uo.test(re)?X.state=34:kn(u,X)}function Je(X,re){Uo.test(re)?X.state=35:kn(u,X)}function Ne(X,re){re===")"?X.state=36:kn(u,X)}function Te(X,re){Uo.test(re)?X.state=38:yR(re)?X.state=39:kn(u,X)}function ke(X,re){X.acceptStateReached=!0,vk(re)?X.state=40:re==="#"?X.state=41:Uo.test(re)||(re==="("?X.state=32:yR(re)?X.state=39:($e(X),xk(re)&&u.push(Ik(f,0))))}function Pe(X,re){Uo.test(re)?X.state=38:re==="("?X.state=32:($e(X),b(re))}function He(X,re){vk(re)||(re==="#"?X.state=41:Uo.test(re)?X.state=38:$e(X))}function nt(X,re){vk(re)?X.state=40:Uo.test(re)?kn(u,X):$e(X)}function $e(X){if(kn(u,X),!!X.acceptStateReached){var re=X.startIdx,Ke=e.slice(X.startIdx,f);if(Ke=YJe(Ke),X.type==="url"){var kt=e.charAt(X.startIdx-1);if(kt==="@")return;var mt=X.matchType;if(mt==="scheme"){var Ot=uR.exec(Ke);if(Ot&&(re=re+Ot.index,Ke=Ke.slice(Ot.index)),!cJe(Ke))return}else if(mt==="tld"){if(!dJe(Ke))return}else if(mt==="ipV4"){if(!pJe(Ke))return}else Qh(mt);c.push(new gJe({tagBuilder:o,matchedText:Ke,offset:re,urlMatchType:mt,url:Ke,protocolRelativeMatch:Ke.slice(0,2)==="//",stripPrefix:r,stripTrailingSlash:a,decodePercentEncoding:l}))}else if(X.type==="email")EJe(Ke)&&c.push(new xJe({tagBuilder:o,matchedText:Ke,offset:re,email:Ke.replace(_Je,"")}));else if(X.type==="hashtag")TJe(Ke)&&c.push(new DJe({tagBuilder:o,matchedText:Ke,offset:re,serviceName:i,hashtag:Ke.slice(1)}));else if(X.type==="mention")AJe(Ke,s)&&c.push(new zJe({tagBuilder:o,matchedText:Ke,offset:re,serviceName:s,mention:Ke.slice(1)}));else if(X.type==="phone"){if(Ke=Ke.replace(/ +$/g,""),RJe(Ke)){var Ct=Ke.replace(/[^0-9,;#]/g,"");c.push(new FJe({tagBuilder:o,matchedText:Ke,offset:re,number:Ct,plusSign:Ke.charAt(0)==="+"}))}}else Qh(X)}}}var UJe=/[\(\{\[]/,bR=/[\)\}\]]/,MR={")":"(","}":"{","]":"["};function YJe(e){for(var n={"(":0,"{":0,"[":0},o=0;o<e.length;o++){var r=e.charAt(o);UJe.test(r)?n[r]++:bR.test(r)&&n[MR[r]]--}for(var a=e.length-1,l;a>=0;)if(l=e.charAt(a),bR.test(l)){var i=MR[l];if(n[i]<0)n[i]++,a--;else break}else if(aJe.test(l))a--;else break;return e.slice(0,a+1)}function Ik(e,n){return{type:"url",startIdx:e,state:n,acceptStateReached:!1,matchType:"scheme"}}function Ak(e,n){return{type:"url",startIdx:e,state:n,acceptStateReached:!1,matchType:"tld"}}function WJe(e,n){return{type:"url",startIdx:e,state:n,acceptStateReached:!1,matchType:"ipV4",octetsEncountered:1}}function QJe(e,n){return{type:"email",startIdx:e,state:n,acceptStateReached:!1}}function KJe(e,n){return{type:"hashtag",startIdx:e,state:n,acceptStateReached:!1}}function qJe(e,n){return{type:"mention",startIdx:e,state:n,acceptStateReached:!1}}function Ok(e,n){return{type:"phone",startIdx:e,state:n,acceptStateReached:!1}}function GJe(e,n){for(var o=n.onOpenTag,r=n.onCloseTag,a=n.onText,l=n.onComment,i=n.onDoctype,s=new Kl,c=0,d=e.length,u=0,f=0,p=s;c<d;){var m=e.charAt(c);switch(u){case 0:g(m);break;case 1:y(m);break;case 2:w(m);break;case 3:b(m);break;case 4:N(m);break;case 5:_(m);break;case 6:C(m);break;case 7:k(m);break;case 8:E(m);break;case 9:T(m);break;case 10:S(m);break;case 11:D(m);break;case 12:v(m);break;case 13:I();break;case 14:B(m);break;case 15:$(m);break;case 16:F(m);break;case 17:L(m);break;case 18:A(m);break;case 19:P(m);break;case 20:j(m);break;default:Qh(u)}c++}f<c&&Y();function g(J){J==="<"&&z()}function y(J){J==="!"?u=13:J==="/"?(u=2,p=new Kl(yo(yo({},p),{isClosing:!0}))):J==="<"?z():bf.test(J)?(u=3,p=new Kl(yo(yo({},p),{isOpening:!0}))):(u=0,p=s)}function b(J){dl.test(J)?(p=new Kl(yo(yo({},p),{name:K()})),u=4):J==="<"?z():J==="/"?(p=new Kl(yo(yo({},p),{name:K()})),u=12):J===">"?(p=new Kl(yo(yo({},p),{name:K()})),R()):!bf.test(J)&&!Uo.test(J)&&J!==":"&&O()}function w(J){J===">"?O():bf.test(J)?u=3:O()}function N(J){dl.test(J)||(J==="/"?u=12:J===">"?R():J==="<"?z():J==="="||kk.test(J)||UZe.test(J)?O():u=5)}function _(J){dl.test(J)?u=6:J==="/"?u=12:J==="="?u=7:J===">"?R():J==="<"?z():kk.test(J)&&O()}function C(J){dl.test(J)||(J==="/"?u=12:J==="="?u=7:J===">"?R():J==="<"?z():kk.test(J)?O():u=5)}function k(J){dl.test(J)||(J==='"'?u=8:J==="'"?u=9:/[>=`]/.test(J)?O():J==="<"?z():u=10)}function E(J){J==='"'&&(u=11)}function T(J){J==="'"&&(u=11)}function S(J){dl.test(J)?u=4:J===">"?R():J==="<"&&z()}function D(J){dl.test(J)?u=4:J==="/"?u=12:J===">"?R():J==="<"?z():(u=4,te())}function v(J){J===">"?(p=new Kl(yo(yo({},p),{isClosing:!0})),R()):u=4}function I(J){e.substr(c,2)==="--"?(c+=2,p=new Kl(yo(yo({},p),{type:"comment"})),u=14):e.substr(c,7).toUpperCase()==="DOCTYPE"?(c+=7,p=new Kl(yo(yo({},p),{type:"doctype"})),u=20):O()}function B(J){J==="-"?u=15:J===">"?O():u=16}function $(J){J==="-"?u=18:J===">"?O():u=16}function F(J){J==="-"&&(u=17)}function L(J){J==="-"?u=18:u=16}function A(J){J===">"?R():J==="!"?u=19:J==="-"||(u=16)}function P(J){J==="-"?u=17:J===">"?R():u=16}function j(J){J===">"?R():J==="<"&&z()}function O(){u=0,p=s}function z(){u=1,p=new Kl({idx:c})}function R(){var J=e.slice(f,p.idx);J&&a(J,f),p.type==="comment"?l(p.idx):p.type==="doctype"?i(p.idx):(p.isOpening&&o(p.name,p.idx),p.isClosing&&r(p.name,p.idx)),O(),f=c+1}function Y(){var J=e.slice(f,c);a(J,f),f=c+1}function K(){var J=p.idx+(p.isClosing?2:1);return e.slice(J,c).toLowerCase()}function te(){c--}}var Kl=function(){function e(n){n===void 0&&(n={}),this.idx=n.idx!==void 0?n.idx:-1,this.type=n.type||"tag",this.name=n.name||"",this.isOpening=!!n.isOpening,this.isClosing=!!n.isClosing}return e}(),zk=function(){function e(n){n===void 0&&(n={}),this.version=e.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.sanitizeHtml=!1,this.tagBuilder=null,this.urls=XJe(n.urls),this.email=Ca(n.email)?n.email:this.email,this.phone=Ca(n.phone)?n.phone:this.phone,this.hashtag=n.hashtag||this.hashtag,this.mention=n.mention||this.mention,this.newWindow=Ca(n.newWindow)?n.newWindow:this.newWindow,this.stripPrefix=ZJe(n.stripPrefix),this.stripTrailingSlash=Ca(n.stripTrailingSlash)?n.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=Ca(n.decodePercentEncoding)?n.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=n.sanitizeHtml||!1;var o=this.mention;if(o!==!1&&OJe.indexOf(o)===-1)throw new Error("invalid `mention` cfg '".concat(o,"' - see docs"));var r=this.hashtag;if(r!==!1&&SJe.indexOf(r)===-1)throw new Error("invalid `hashtag` cfg '".concat(r,"' - see docs"));this.truncate=JJe(n.truncate),this.className=n.className||this.className,this.replaceFn=n.replaceFn||this.replaceFn,this.context=n.context||this}return e.link=function(n,o){var r=new e(o);return r.link(n)},e.parse=function(n,o){var r=new e(o);return r.parse(n)},e.prototype.parse=function(n){var o=this,r=["a","style","script"],a=0,l=[];return GJe(n,{onOpenTag:function(i){r.indexOf(i)>=0&&a++},onText:function(i,s){if(a===0){var c=/( | |<|<|>|>|"|"|')/gi,d=i.split(c),u=s;d.forEach(function(f,p){if(p%2===0){var m=o.parseText(f,u);l.push.apply(l,m)}u+=f.length})}},onCloseTag:function(i){r.indexOf(i)>=0&&(a=Math.max(a-1,0))},onComment:function(i){},onDoctype:function(i){}}),l=this.compactMatches(l),l=this.removeUnwantedMatches(l),l},e.prototype.compactMatches=function(n){n.sort(function(c,d){return c.getOffset()-d.getOffset()});for(var o=0;o<n.length-1;){var r=n[o],a=r.getOffset(),l=r.getMatchedText().length,i=a+l;if(o+1<n.length){if(n[o+1].getOffset()===a){var s=n[o+1].getMatchedText().length>l?o:o+1;n.splice(s,1);continue}if(n[o+1].getOffset()<i){n.splice(o+1,1);continue}}o++}return n},e.prototype.removeUnwantedMatches=function(n){return this.hashtag||id(n,function(o){return o.getType()==="hashtag"}),this.email||id(n,function(o){return o.getType()==="email"}),this.phone||id(n,function(o){return o.getType()==="phone"}),this.mention||id(n,function(o){return o.getType()==="mention"}),this.urls.schemeMatches||id(n,function(o){return o.getType()==="url"&&o.getUrlMatchType()==="scheme"}),this.urls.tldMatches||id(n,function(o){return o.getType()==="url"&&o.getUrlMatchType()==="tld"}),this.urls.ipV4Matches||id(n,function(o){return o.getType()==="url"&&o.getUrlMatchType()==="ipV4"}),n},e.prototype.parseText=function(n,o){o===void 0&&(o=0),o=o||0;for(var r=HJe(n,{tagBuilder:this.getTagBuilder(),stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding,hashtagServiceName:this.hashtag,mentionServiceName:this.mention||"twitter"}),a=0,l=r.length;a<l;a++)r[a].setOffset(o+r[a].getOffset());return r},e.prototype.link=function(n){if(!n)return"";this.sanitizeHtml&&(n=n.replace(/</g,"<").replace(/>/g,">"));for(var o=this.parse(n),r=[],a=0,l=0,i=o.length;l<i;l++){var s=o[l];r.push(n.substring(a,s.getOffset())),r.push(this.createMatchReturnVal(s)),a=s.getOffset()+s.getMatchedText().length}return r.push(n.substring(a)),r.join("")},e.prototype.createMatchReturnVal=function(n){var o;if(this.replaceFn&&(o=this.replaceFn.call(this.context,n)),typeof o=="string")return o;if(o===!1)return n.getMatchedText();if(o instanceof cR)return o.toAnchorString();var r=n.buildTag();return r.toAnchorString()},e.prototype.getTagBuilder=function(){var n=this.tagBuilder;return n||(n=this.tagBuilder=new JZe({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),n},e.version=PZe,e}();function XJe(e){return e==null&&(e=!0),Ca(e)?{schemeMatches:e,tldMatches:e,ipV4Matches:e}:{schemeMatches:Ca(e.schemeMatches)?e.schemeMatches:!0,tldMatches:Ca(e.tldMatches)?e.tldMatches:!0,ipV4Matches:Ca(e.ipV4Matches)?e.ipV4Matches:!0}}function ZJe(e){return e==null&&(e=!0),Ca(e)?{scheme:e,www:e}:{scheme:Ca(e.scheme)?e.scheme:!0,www:Ca(e.www)?e.www:!0}}function JJe(e){return typeof e=="number"?{length:e,location:"end"}:FZe(e||{},{length:Number.POSITIVE_INFINITY,location:"end"})}function eet(e){return e.startsWith("http://")||e.startsWith("https://")?e:"https://"+e}const uut="",tet={props:{previousURL:String},data(){return{linkToAppend:this.previousURL,linkError:""}},methods:{insertLink(){this.isLinkValid(this.linkToAppend)?(this.linkError=!1,this.$emit("setLink",{url:eet(this.linkToAppend),insertedText:this.linkToAppend}),this.$emit("close")):this.linkError=!0},isLinkValid(e){return zk.link(e,{email:!1}).includes("href")}},computed:{disableButton(){return this.linkToAppend===""||this.linkToAppend===void 0}}},net={class:"wrapper-input mb-3"},oet={key:0,class:"l-input-error-message"},ret={class:"wrapper-buttons row l-justify-content-end"};function aet(e,n,o,r,a,l){const i=t.resolveComponent("l-input"),s=t.resolveComponent("l-button"),c=t.resolveComponent("l-box");return t.openBlock(),t.createBlock(c,{class:"link-box column"},{default:t.withCtx(()=>[t.createElementVNode("div",net,[t.createVNode(i,{modelValue:a.linkToAppend,"onUpdate:modelValue":n[0]||(n[0]=d=>a.linkToAppend=d),placeholder:"Insira um link",error:a.linkError,autofocus:"",style:{"box-sizing":"border-box"}},null,8,["modelValue","error"]),a.linkError?(t.openBlock(),t.createElementBlock("div",oet," Insira um link válido ")):t.createCommentVNode("",!0)]),t.createElementVNode("div",ret,[t.createVNode(s,{size:"small",onClick:n[1]||(n[1]=d=>e.$emit("close"))},{default:t.withCtx(()=>n[3]||(n[3]=[t.createTextVNode("Cancelar")])),_:1}),t.createVNode(s,{size:"small",type:"primary",onClick:n[2]||(n[2]=d=>l.insertLink()),disabled:l.disableButton},{default:t.withCtx(()=>n[4]||(n[4]=[t.createTextVNode("Inserir")])),_:1},8,["disabled"])])]),_:1})}const iet=lt(tet,[["render",aet],["__scopeId","data-v-594513ec"]]),fut="",set={props:{dataLink:String},data(){return{boxButtons:[{tooltip:"Editar link",icon:"uil-edit",event:"edit"},{tooltip:"Remover link",icon:"uil-link-broken",event:"remove"}],tooltipDelay:125}},methods:{actionButtonBased(e){this.$emit(e)}},computed:{tooltipLink(){return this.dataLink.length>=60?this.dataLink.slice(0,60)+"...":this.dataLink}}},cet={class:"wrapper-floating-link l-ra-1 px-2 py-2 row l-align-items-center l-align-content-center"},det=["href","open-delay"];function uet(e,n,o,r,a,l){const i=t.resolveComponent("l-icon"),s=t.resolveComponent("l-tooltip");return t.openBlock(),t.createElementBlock("div",cet,[t.createVNode(i,{size:"24",class:"color-lead-light mr-2",icon:"uil-globe"}),t.createVNode(s,{class:"item color-link",content:l.tooltipLink},{default:t.withCtx(()=>[t.createElementVNode("a",{class:"l-flex-grow-1 h6 color-link l-ellipsis",target:"_blank",rel:"nofollow noopener noreferrer",style:{display:"inline"},href:o.dataLink,"open-delay":a.tooltipDelay},t.toDisplayString(o.dataLink),9,det)]),_:1},8,["content"]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.boxButtons,(c,d)=>(t.openBlock(),t.createBlock(s,{class:"item",key:d,content:c.tooltip,"open-delay":a.tooltipDelay},{default:t.withCtx(()=>[t.createVNode(i,{size:"20",class:"color-lead-light ml-2",icon:c.icon,onClick:u=>l.actionButtonBased(c.event)},null,8,["icon","onClick"])]),_:2},1032,["content","open-delay"]))),128))])}const fet=lt(set,[["render",uet],["__scopeId","data-v-264ac301"]]),pet=/<(\w+).[^>]*>\s*<\/\1>/g;function het(e){return e.replace(pet,"")}/*! @license DOMPurify 2.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.7/LICENSE */function Hs(e){"@babel/helpers - typeof";return Hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hs(e)}function Bk(e,n){return Bk=Object.setPrototypeOf||function(r,a){return r.__proto__=a,r},Bk(e,n)}function met(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function G2(e,n,o){return met()?G2=Reflect.construct:G2=function(a,l,i){var s=[null];s.push.apply(s,l);var c=Function.bind.apply(a,s),d=new c;return i&&Bk(d,i.prototype),d},G2.apply(null,arguments)}function ul(e){return get(e)||yet(e)||bet(e)||Met()}function get(e){if(Array.isArray(e))return Lk(e)}function yet(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bet(e,n){if(e){if(typeof e=="string")return Lk(e,n);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Lk(e,n)}}function Lk(e,n){(n==null||n>e.length)&&(n=e.length);for(var o=0,r=new Array(n);o<n;o++)r[o]=e[o];return r}function Met(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
231
231
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var wet=Object.hasOwnProperty,wR=Object.setPrototypeOf,Cet=Object.isFrozen,_et=Object.getPrototypeOf,Net=Object.getOwnPropertyDescriptor,cr=Object.freeze,fl=Object.seal,ket=Object.create,CR=typeof Reflect<"u"&&Reflect,X2=CR.apply,Vk=CR.construct;X2||(X2=function(n,o,r){return n.apply(o,r)}),cr||(cr=function(n){return n}),fl||(fl=function(n){return n}),Vk||(Vk=function(n,o){return G2(n,ul(o))});var Eet=_a(Array.prototype.forEach),_R=_a(Array.prototype.pop),Gh=_a(Array.prototype.push),Z2=_a(String.prototype.toLowerCase),$k=_a(String.prototype.toString),xet=_a(String.prototype.match),pl=_a(String.prototype.replace),Tet=_a(String.prototype.indexOf),Det=_a(String.prototype.trim),dr=_a(RegExp.prototype.test),jk=vet(TypeError);function _a(e){return function(n){for(var o=arguments.length,r=new Array(o>1?o-1:0),a=1;a<o;a++)r[a-1]=arguments[a];return X2(e,n,r)}}function vet(e){return function(){for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return Vk(e,o)}}function $t(e,n,o){var r;o=(r=o)!==null&&r!==void 0?r:Z2,wR&&wR(e,null);for(var a=n.length;a--;){var l=n[a];if(typeof l=="string"){var i=o(l);i!==l&&(Cet(n)||(n[a]=i),l=i)}e[l]=!0}return e}function cd(e){var n=ket(null),o;for(o in e)X2(wet,e,[o])===!0&&(n[o]=e[o]);return n}function J2(e,n){for(;e!==null;){var o=Net(e,n);if(o){if(o.get)return _a(o.get);if(typeof o.value=="function")return _a(o.value)}e=_et(e)}function r(a){return console.warn("fallback value for",a),null}return r}var NR=cr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Pk=cr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Rk=cr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Iet=cr(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Fk=cr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Aet=cr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),kR=cr(["#text"]),ER=cr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Hk=cr(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),xR=cr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ey=cr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Oet=fl(/\{\{[\w\W]*|[\w\W]*\}\}/gm),zet=fl(/<%[\w\W]*|[\w\W]*%>/gm),Bet=fl(/\${[\w\W]*}/gm),Let=fl(/^data-[\-\w.\u00B7-\uFFFF]/),Vet=fl(/^aria-[\-\w]+$/),$et=fl(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jet=fl(/^(?:\w+script|data):/i),Pet=fl(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ret=fl(/^html$/i),Fet=function(){return typeof window>"u"?null:window},Het=function(n,o){if(Hs(n)!=="object"||typeof n.createPolicy!="function")return null;var r=null,a="data-tt-policy-suffix";o.currentScript&&o.currentScript.hasAttribute(a)&&(r=o.currentScript.getAttribute(a));var l="dompurify"+(r?"#"+r:"");try{return n.createPolicy(l,{createHTML:function(s){return s},createScriptURL:function(s){return s}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}};function TR(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Fet(),n=function(ue){return TR(ue)};if(n.version="2.4.7",n.removed=[],!e||!e.document||e.document.nodeType!==9)return n.isSupported=!1,n;var o=e.document,r=e.document,a=e.DocumentFragment,l=e.HTMLTemplateElement,i=e.Node,s=e.Element,c=e.NodeFilter,d=e.NamedNodeMap,u=d===void 0?e.NamedNodeMap||e.MozNamedAttrMap:d,f=e.HTMLFormElement,p=e.DOMParser,m=e.trustedTypes,g=s.prototype,y=J2(g,"cloneNode"),b=J2(g,"nextSibling"),w=J2(g,"childNodes"),N=J2(g,"parentNode");if(typeof l=="function"){var _=r.createElement("template");_.content&&_.content.ownerDocument&&(r=_.content.ownerDocument)}var C=Het(m,o),k=C?C.createHTML(""):"",E=r,T=E.implementation,S=E.createNodeIterator,D=E.createDocumentFragment,v=E.getElementsByTagName,I=o.importNode,B={};try{B=cd(r).documentMode?r.documentMode:{}}catch{}var $={};n.isSupported=typeof N=="function"&&T&&T.createHTMLDocument!==void 0&&B!==9;var F=Oet,L=zet,A=Bet,P=Let,j=Vet,O=jet,z=Pet,R=$et,Y=null,K=$t({},[].concat(ul(NR),ul(Pk),ul(Rk),ul(Fk),ul(kR))),te=null,J=$t({},[].concat(ul(ER),ul(Hk),ul(xR),ul(ey))),W=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),G=null,ne=null,le=!0,ge=!0,fe=!1,oe=!0,we=!1,Oe=!1,Qe=!1,Je=!1,Ne=!1,Te=!1,ke=!1,Pe=!0,He=!1,nt="user-content-",$e=!0,X=!1,re={},Ke=null,kt=$t({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),mt=null,Ot=$t({},["audio","video","img","source","image","track"]),Ct=null,pn=$t({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),se="http://www.w3.org/1998/Math/MathML",Ee="http://www.w3.org/2000/svg",U="http://www.w3.org/1999/xhtml",ie=U,Q=!1,ye=null,ze=$t({},[se,Ee,U],$k),et,Et=["application/xhtml+xml","text/html"],cn="text/html",Dt,_t=null,vt=r.createElement("form"),vn=function(ue){return ue instanceof RegExp||ue instanceof Function},Ao=function(ue){_t&&_t===ue||((!ue||Hs(ue)!=="object")&&(ue={}),ue=cd(ue),et=Et.indexOf(ue.PARSER_MEDIA_TYPE)===-1?et=cn:et=ue.PARSER_MEDIA_TYPE,Dt=et==="application/xhtml+xml"?$k:Z2,Y="ALLOWED_TAGS"in ue?$t({},ue.ALLOWED_TAGS,Dt):K,te="ALLOWED_ATTR"in ue?$t({},ue.ALLOWED_ATTR,Dt):J,ye="ALLOWED_NAMESPACES"in ue?$t({},ue.ALLOWED_NAMESPACES,$k):ze,Ct="ADD_URI_SAFE_ATTR"in ue?$t(cd(pn),ue.ADD_URI_SAFE_ATTR,Dt):pn,mt="ADD_DATA_URI_TAGS"in ue?$t(cd(Ot),ue.ADD_DATA_URI_TAGS,Dt):Ot,Ke="FORBID_CONTENTS"in ue?$t({},ue.FORBID_CONTENTS,Dt):kt,G="FORBID_TAGS"in ue?$t({},ue.FORBID_TAGS,Dt):{},ne="FORBID_ATTR"in ue?$t({},ue.FORBID_ATTR,Dt):{},re="USE_PROFILES"in ue?ue.USE_PROFILES:!1,le=ue.ALLOW_ARIA_ATTR!==!1,ge=ue.ALLOW_DATA_ATTR!==!1,fe=ue.ALLOW_UNKNOWN_PROTOCOLS||!1,oe=ue.ALLOW_SELF_CLOSE_IN_ATTR!==!1,we=ue.SAFE_FOR_TEMPLATES||!1,Oe=ue.WHOLE_DOCUMENT||!1,Ne=ue.RETURN_DOM||!1,Te=ue.RETURN_DOM_FRAGMENT||!1,ke=ue.RETURN_TRUSTED_TYPE||!1,Je=ue.FORCE_BODY||!1,Pe=ue.SANITIZE_DOM!==!1,He=ue.SANITIZE_NAMED_PROPS||!1,$e=ue.KEEP_CONTENT!==!1,X=ue.IN_PLACE||!1,R=ue.ALLOWED_URI_REGEXP||R,ie=ue.NAMESPACE||U,W=ue.CUSTOM_ELEMENT_HANDLING||{},ue.CUSTOM_ELEMENT_HANDLING&&vn(ue.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=ue.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ue.CUSTOM_ELEMENT_HANDLING&&vn(ue.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=ue.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ue.CUSTOM_ELEMENT_HANDLING&&typeof ue.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=ue.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),we&&(ge=!1),Te&&(Ne=!0),re&&(Y=$t({},ul(kR)),te=[],re.html===!0&&($t(Y,NR),$t(te,ER)),re.svg===!0&&($t(Y,Pk),$t(te,Hk),$t(te,ey)),re.svgFilters===!0&&($t(Y,Rk),$t(te,Hk),$t(te,ey)),re.mathMl===!0&&($t(Y,Fk),$t(te,xR),$t(te,ey))),ue.ADD_TAGS&&(Y===K&&(Y=cd(Y)),$t(Y,ue.ADD_TAGS,Dt)),ue.ADD_ATTR&&(te===J&&(te=cd(te)),$t(te,ue.ADD_ATTR,Dt)),ue.ADD_URI_SAFE_ATTR&&$t(Ct,ue.ADD_URI_SAFE_ATTR,Dt),ue.FORBID_CONTENTS&&(Ke===kt&&(Ke=cd(Ke)),$t(Ke,ue.FORBID_CONTENTS,Dt)),$e&&(Y["#text"]=!0),Oe&&$t(Y,["html","head","body"]),Y.table&&($t(Y,["tbody"]),delete G.tbody),cr&&cr(ue),_t=ue)},ka=$t({},["mi","mo","mn","ms","mtext"]),Ir=$t({},["foreignobject","desc","title","annotation-xml"]),Yo=$t({},["title","style","font","a","script"]),hl=$t({},Pk);$t(hl,Rk),$t(hl,Iet);var ml=$t({},Fk);$t(ml,Aet);var ql=function(ue){var Re=N(ue);(!Re||!Re.tagName)&&(Re={namespaceURI:ie,tagName:"template"});var ce=Z2(ue.tagName),Ae=Z2(Re.tagName);return ye[ue.namespaceURI]?ue.namespaceURI===Ee?Re.namespaceURI===U?ce==="svg":Re.namespaceURI===se?ce==="svg"&&(Ae==="annotation-xml"||ka[Ae]):!!hl[ce]:ue.namespaceURI===se?Re.namespaceURI===U?ce==="math":Re.namespaceURI===Ee?ce==="math"&&Ir[Ae]:!!ml[ce]:ue.namespaceURI===U?Re.namespaceURI===Ee&&!Ir[Ae]||Re.namespaceURI===se&&!ka[Ae]?!1:!ml[ce]&&(Yo[ce]||!hl[ce]):!!(et==="application/xhtml+xml"&&ye[ue.namespaceURI]):!1},bo=function(ue){Gh(n.removed,{element:ue});try{ue.parentNode.removeChild(ue)}catch{try{ue.outerHTML=k}catch{ue.remove()}}},vi=function(ue,Re){try{Gh(n.removed,{attribute:Re.getAttributeNode(ue),from:Re})}catch{Gh(n.removed,{attribute:null,from:Re})}if(Re.removeAttribute(ue),ue==="is"&&!te[ue])if(Ne||Te)try{bo(Re)}catch{}else try{Re.setAttribute(ue,"")}catch{}},Us=function(ue){var Re,ce;if(Je)ue="<remove></remove>"+ue;else{var Ae=xet(ue,/^[\r\n\t ]+/);ce=Ae&&Ae[0]}et==="application/xhtml+xml"&&ie===U&&(ue='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ue+"</body></html>");var at=C?C.createHTML(ue):ue;if(ie===U)try{Re=new p().parseFromString(at,et)}catch{}if(!Re||!Re.documentElement){Re=T.createDocument(ie,"template",null);try{Re.documentElement.innerHTML=Q?k:at}catch{}}var ut=Re.body||Re.documentElement;return ue&&ce&&ut.insertBefore(r.createTextNode(ce),ut.childNodes[0]||null),ie===U?v.call(Re,Oe?"html":"body")[0]:Oe?Re.documentElement:ut},Ys=function(ue){return S.call(ue.ownerDocument||ue,ue,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},dd=function(ue){return ue instanceof f&&(typeof ue.nodeName!="string"||typeof ue.textContent!="string"||typeof ue.removeChild!="function"||!(ue.attributes instanceof u)||typeof ue.removeAttribute!="function"||typeof ue.setAttribute!="function"||typeof ue.namespaceURI!="string"||typeof ue.insertBefore!="function"||typeof ue.hasChildNodes!="function")},Ce=function(ue){return Hs(i)==="object"?ue instanceof i:ue&&Hs(ue)==="object"&&typeof ue.nodeType=="number"&&typeof ue.nodeName=="string"},Ue=function(ue,Re,ce){$[ue]&&Eet($[ue],function(Ae){Ae.call(n,Re,ce,_t)})},zt=function(ue){var Re;if(Ue("beforeSanitizeElements",ue,null),dd(ue)||dr(/[\u0080-\uFFFF]/,ue.nodeName))return bo(ue),!0;var ce=Dt(ue.nodeName);if(Ue("uponSanitizeElement",ue,{tagName:ce,allowedTags:Y}),ue.hasChildNodes()&&!Ce(ue.firstElementChild)&&(!Ce(ue.content)||!Ce(ue.content.firstElementChild))&&dr(/<[/\w]/g,ue.innerHTML)&&dr(/<[/\w]/g,ue.textContent)||ce==="select"&&dr(/<template/i,ue.innerHTML))return bo(ue),!0;if(!Y[ce]||G[ce]){if(!G[ce]&&Vn(ce)&&(W.tagNameCheck instanceof RegExp&&dr(W.tagNameCheck,ce)||W.tagNameCheck instanceof Function&&W.tagNameCheck(ce)))return!1;if($e&&!Ke[ce]){var Ae=N(ue)||ue.parentNode,at=w(ue)||ue.childNodes;if(at&&Ae)for(var ut=at.length,Jt=ut-1;Jt>=0;--Jt)Ae.insertBefore(y(at[Jt],!0),b(ue))}return bo(ue),!0}return ue instanceof s&&!ql(ue)||(ce==="noscript"||ce==="noembed"||ce==="noframes")&&dr(/<\/no(script|embed|frames)/i,ue.innerHTML)?(bo(ue),!0):(we&&ue.nodeType===3&&(Re=ue.textContent,Re=pl(Re,F," "),Re=pl(Re,L," "),Re=pl(Re,A," "),ue.textContent!==Re&&(Gh(n.removed,{element:ue.cloneNode()}),ue.textContent=Re)),Ue("afterSanitizeElements",ue,null),!1)},En=function(ue,Re,ce){if(Pe&&(Re==="id"||Re==="name")&&(ce in r||ce in vt))return!1;if(!(ge&&!ne[Re]&&dr(P,Re))){if(!(le&&dr(j,Re))){if(!te[Re]||ne[Re]){if(!(Vn(ue)&&(W.tagNameCheck instanceof RegExp&&dr(W.tagNameCheck,ue)||W.tagNameCheck instanceof Function&&W.tagNameCheck(ue))&&(W.attributeNameCheck instanceof RegExp&&dr(W.attributeNameCheck,Re)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(Re))||Re==="is"&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&dr(W.tagNameCheck,ce)||W.tagNameCheck instanceof Function&&W.tagNameCheck(ce))))return!1}else if(!Ct[Re]){if(!dr(R,pl(ce,z,""))){if(!((Re==="src"||Re==="xlink:href"||Re==="href")&&ue!=="script"&&Tet(ce,"data:")===0&&mt[ue])){if(!(fe&&!dr(O,pl(ce,z,"")))){if(ce)return!1}}}}}}return!0},Vn=function(ue){return ue.indexOf("-")>0},gl=function(ue){var Re,ce,Ae,at;Ue("beforeSanitizeAttributes",ue,null);var ut=ue.attributes;if(ut){var Jt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:te};for(at=ut.length;at--;){Re=ut[at];var Wo=Re,Kn=Wo.name,Mf=Wo.namespaceURI;if(ce=Kn==="value"?Re.value:Det(Re.value),Ae=Dt(Kn),Jt.attrName=Ae,Jt.attrValue=ce,Jt.keepAttr=!0,Jt.forceKeepAttr=void 0,Ue("uponSanitizeAttribute",ue,Jt),ce=Jt.attrValue,!Jt.forceKeepAttr&&(vi(Kn,ue),!!Jt.keepAttr)){if(!oe&&dr(/\/>/i,ce)){vi(Kn,ue);continue}we&&(ce=pl(ce,F," "),ce=pl(ce,L," "),ce=pl(ce,A," "));var Zh=Dt(ue.nodeName);if(En(Zh,Ae,ce)){if(He&&(Ae==="id"||Ae==="name")&&(vi(Kn,ue),ce=nt+ce),C&&Hs(m)==="object"&&typeof m.getAttributeType=="function"&&!Mf)switch(m.getAttributeType(Zh,Ae)){case"TrustedHTML":{ce=C.createHTML(ce);break}case"TrustedScriptURL":{ce=C.createScriptURL(ce);break}}try{Mf?ue.setAttributeNS(Mf,Kn,ce):ue.setAttribute(Kn,ce),_R(n.removed)}catch{}}}}Ue("afterSanitizeAttributes",ue,null)}},Gl=function st(ue){var Re,ce=Ys(ue);for(Ue("beforeSanitizeShadowDOM",ue,null);Re=ce.nextNode();)Ue("uponSanitizeShadowNode",Re,null),!zt(Re)&&(Re.content instanceof a&&st(Re.content),gl(Re));Ue("afterSanitizeShadowDOM",ue,null)};return n.sanitize=function(st){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Re,ce,Ae,at,ut;if(Q=!st,Q&&(st="<!-->"),typeof st!="string"&&!Ce(st))if(typeof st.toString=="function"){if(st=st.toString(),typeof st!="string")throw jk("dirty is not a string, aborting")}else throw jk("toString is not a function");if(!n.isSupported){if(Hs(e.toStaticHTML)==="object"||typeof e.toStaticHTML=="function"){if(typeof st=="string")return e.toStaticHTML(st);if(Ce(st))return e.toStaticHTML(st.outerHTML)}return st}if(Qe||Ao(ue),n.removed=[],typeof st=="string"&&(X=!1),X){if(st.nodeName){var Jt=Dt(st.nodeName);if(!Y[Jt]||G[Jt])throw jk("root node is forbidden and cannot be sanitized in-place")}}else if(st instanceof i)Re=Us("<!---->"),ce=Re.ownerDocument.importNode(st,!0),ce.nodeType===1&&ce.nodeName==="BODY"||ce.nodeName==="HTML"?Re=ce:Re.appendChild(ce);else{if(!Ne&&!we&&!Oe&&st.indexOf("<")===-1)return C&&ke?C.createHTML(st):st;if(Re=Us(st),!Re)return Ne?null:ke?k:""}Re&&Je&&bo(Re.firstChild);for(var Wo=Ys(X?st:Re);Ae=Wo.nextNode();)Ae.nodeType===3&&Ae===at||zt(Ae)||(Ae.content instanceof a&&Gl(Ae.content),gl(Ae),at=Ae);if(at=null,X)return st;if(Ne){if(Te)for(ut=D.call(Re.ownerDocument);Re.firstChild;)ut.appendChild(Re.firstChild);else ut=Re;return(te.shadowroot||te.shadowrootmod)&&(ut=I.call(o,ut,!0)),ut}var Kn=Oe?Re.outerHTML:Re.innerHTML;return Oe&&Y["!doctype"]&&Re.ownerDocument&&Re.ownerDocument.doctype&&Re.ownerDocument.doctype.name&&dr(Ret,Re.ownerDocument.doctype.name)&&(Kn="<!DOCTYPE "+Re.ownerDocument.doctype.name+`>
|
|
232
|
-
`+Kn),we&&(Kn=pl(Kn,F," "),Kn=pl(Kn,L," "),Kn=pl(Kn,A," ")),C&&ke?C.createHTML(Kn):Kn},n.setConfig=function(st){Ao(st),Qe=!0},n.clearConfig=function(){_t=null,Qe=!1},n.isValidAttribute=function(st,ue,Re){_t||Ao({});var ce=Dt(st),Ae=Dt(ue);return En(ce,Ae,Re)},n.addHook=function(st,ue){typeof ue=="function"&&($[st]=$[st]||[],Gh($[st],ue))},n.removeHook=function(st){if($[st])return _R($[st])},n.removeHooks=function(st){$[st]&&($[st]=[])},n.removeAllHooks=function(){$={}},n}var Uet=TR();const Yet="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxNyAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcuMjM3MjQgMC44MzMyNTJDNy41NjcyNiAwLjgzMzI1MiA3LjgyODg3IDAuOTM5OTQgOC4wMjIwNSAxLjE1MzMyQzguMjIzMjggMS4zNTgxNiA4LjMyMzkgMS42MzU1NSA4LjMyMzkgMS45ODU0OVY4LjgzNDg4QzguMzIzOSA5LjE4NDgyIDguMjIzMjggOS40NjY0OCA4LjAyMjA1IDkuNjc5ODVDNy44Mjg4NyA5Ljg5MzIzIDcuNTY3MjYgOS45OTk5MiA3LjIzNzI0IDkuOTk5OTJDNi45MDcyMiA5Ljk5OTkyIDYuNjQxNiA5Ljg5NzUgNi40NDAzNyA5LjY5MjY2QzYuMjQ3MTggOS40NzkyOCA2LjE1MDU5IDkuMTkzMzUgNi4xNTA1OSA4LjgzNDg4VjYuMjc0MzZIMi42NzMzVjguODM0ODhDMi42NzMzIDkuMTg0ODIgMi41NzI2OSA5LjQ2NjQ4IDIuMzcxNDYgOS42Nzk4NUMyLjE3ODI3IDkuODkzMjMgMS45MTY2NyA5Ljk5OTkyIDEuNTg2NjUgOS45OTk5MkMxLjI1NjYzIDkuOTk5OTIgMC45OTEwMDYgOS44OTc1IDAuNzg5Nzc0IDkuNjkyNjZDMC41OTY1OTEgOS40NzkyOCAwLjUgOS4xOTMzNSAwLjUgOC44MzQ4OFYxLjk4NTQ5QzAuNSAxLjYzNTU1IDAuNTk2NTkxIDEuMzU4MTYgMC43ODk3NzQgMS4xNTMzMkMwLjk5MTAwNiAwLjkzOTk0IDEuMjU2NjMgMC44MzMyNTIgMS41ODY2NSAwLjgzMzI1MkMxLjkxNjY3IDAuODMzMjUyIDIuMTc4MjcgMC45Mzk5NCAyLjM3MTQ2IDEuMTUzMzJDMi41NzI2OSAxLjM1ODE2IDIuNjczMyAxLjYzNTU1IDIuNjczMyAxLjk4NTQ5VjQuNDA1MThINi4xNTA1OVYxLjk4NTQ5QzYuMTUwNTkgMS42MzU1NSA2LjI0NzE4IDEuMzU4MTYgNi40NDAzNyAxLjE1MzMyQzYuNjQxNiAwLjkzOTk0IDYuOTA3MjIgMC44MzMyNTIgNy4yMzcyNCAwLjgzMzI1MloiIGZpbGw9IiM0MzRFNUIiLz4KPHBhdGggZD0iTTE1LjI4MjkgOC4wNTM5MkMxNS42NDUxIDguMDUzOTIgMTUuOTEwNyA4LjEzMDc0IDE2LjA3OTggOC4yODQzN0MxNi4yNDg4IDguNDM4IDE2LjMzMzMgOC42Njg0NSAxNi4zMzMzIDguOTc1NzFDMTYuMzMzMyA5LjYwNzMxIDE1Ljk4MzIgOS45MjMxIDE1LjI4MjkgOS45MjMxSDExLjA5MzNDMTAuMzkzIDkuOTIzMSAxMC4wNDI4IDkuNjA3MzEgMTAuMDQyOCA4Ljk3NTcxQzEwLjA0MjggOC42Njg0NSAxMC4xMjczIDguNDM4IDEwLjI5NjQgOC4yODQzN0MxMC40NjU0IDguMTMwNzQgMTAuNzMxIDguMDUzOTIgMTEuMDkzMyA4LjA1MzkySDEyLjA3MTJWMy40MzIxOEwxMS4xMDUzIDQuMDMzOUMxMC45Njg1IDQuMTE5MjUgMTAuODI3NiA0LjE2MTkzIDEwLjY4MjcgNC4xNjE5M0MxMC40NTc0IDQuMTYxOTMgMTAuMjY0MiA0LjA1OTUxIDEwLjEwMzIgMy44NTQ2N0M5Ljk0MjIxIDMuNjQxMjkgOS44NjE3MiAzLjQwNjU4IDkuODYxNzIgMy4xNTA1MkM5Ljg2MTcyIDIuODAwNTkgMTAuMDAyNiAyLjUzNiAxMC4yODQzIDIuMzU2NzZMMTIuMjE2MSAxLjE2NjEyQzEyLjU3MDMgMC45NTI3NDMgMTIuOTA0MyAwLjg0NjA1NCAxMy4yMTgzIDAuODQ2MDU0QzEzLjU0MDIgMC44NDYwNTQgMTMuNzk3OCAwLjk0ODQ3NSAxMy45OTEgMS4xNTMzMkMxNC4xOTIyIDEuMzU4MTYgMTQuMjkyOCAxLjYzNTU1IDE0LjI5MjggMS45ODU0OVY4LjA1MzkySDE1LjI4MjlaIiBmaWxsPSIjNDM0RTVCIi8+Cjwvc3ZnPgo=",Wet="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxOCAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTguNjU3MjkgNC4xNjIxNEM4LjY1NzI5IDEuOTYwMTMgNi44NjM5IDAuMTY2NzQ4IDQuNjYxOSAwLjE2Njc0OEMyLjQ1OTg5IDAuMTY2NzQ4IDAuNjY2NTA0IDEuOTYwMTMgMC42NjY1MDQgNC4xNjIxNEMwLjY2NjUwNCA2LjM2NDE0IDIuNDU5ODkgOC4xNTc1MyA0LjY2MTkgOC4xNTc1M0M1LjEzODYyIDguMTU3NTMgNS42MTUzNCA4LjA2NjczIDYuMDQ2NjYgNy45MDc4MkM1Ljk1NTg2IDguOTA2NjcgNS42NjA3NCA5LjkyODIyIDUuMTYxMzIgMTAuODgxN0M1LjExNTkyIDEwLjk0OTggNS4xMTU5MiAxMS4wNDA2IDUuMTM4NjIgMTEuMTA4N0M1LjE2MTMyIDExLjE1NDEgNS4yMDY3MiAxMS4xOTk1IDUuMjUyMTIgMTEuMTk5NUM1LjMyMDIzIDExLjIyMjIgNS4zODgzMyAxMS4xOTk1IDUuNDc5MTQgMTEuMTMxNEM2LjQzMjU4IDEwLjMxNDEgNy4yNDk4MiA5LjI0NzE4IDcuNzk0NjUgOC4wNjY3M0M4LjI5NDA3IDYuOTc3MDcgOC41ODkxOCA1LjgxOTMyIDguNjM0NTkgNC41OTM0NkM4LjY1NzI5IDQuNDU3MjUgOC42NTcyOSA0LjI5ODM1IDguNjU3MjkgNC4xNjIxNFoiIGZpbGw9IiM0MzRFNUIiLz4KPHBhdGggZD0iTTE3LjM1MTYgNC4xNjIxNEMxNy4zNTE2IDEuOTYwMTMgMTUuNTU4MiAwLjE2Njc0OCAxMy4zNTYyIDAuMTY2NzQ4QzExLjE1NDIgMC4xNjY3NDggOS4zNjA4NCAxLjk2MDEzIDkuMzYwODQgNC4xNjIxNEM5LjM2MDg0IDYuMzY0MTQgMTEuMTU0MiA4LjE1NzUzIDEzLjM1NjIgOC4xNTc1M0MxMy44MzMgOC4xNTc1MyAxNC4zMDk3IDguMDY2NzMgMTQuNzQxIDcuOTA3ODJDMTQuNjUwMiA4LjkwNjY3IDE0LjM1NTEgOS45MjgyMiAxMy44NTU3IDEwLjg4MTdDMTMuODEwMyAxMC45NDk4IDEzLjgxMDMgMTEuMDQwNiAxMy44MzMgMTEuMTA4N0MxMy44NTU3IDExLjE1NDEgMTMuOTAxMSAxMS4xOTk1IDEzLjk0NjUgMTEuMTk5NUMxNC4wMTQ2IDExLjIyMjIgMTQuMDgyNyAxMS4xOTk1IDE0LjE3MzUgMTEuMTMxNEMxNS4xMjY5IDEwLjMxNDEgMTUuOTQ0MiA5LjI0NzE4IDE2LjQ4OSA4LjA2NjczQzE2Ljk4ODQgNi45NzcwNyAxNy4yODM1IDUuODE5MzIgMTcuMzI4OSA0LjU5MzQ2QzE3LjM1MTYgNC40NTcyNSAxNy4zNTE2IDQuMjk4MzUgMTcuMzUxNiA0LjE2MjE0WiIgZmlsbD0iIzQzNEU1QiIvPgo8L3N2Zz4K",Qet="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTMiIHZpZXdCb3g9IjAgMCAxMyAxMyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuMzkyMDkgNy40MjQ4VjExLjE5OUM1LjM5MjA5IDExLjQ4OTMgNS40ODg4NiAxMS42ODI5IDUuNjgyNDEgMTEuODc2NEM1Ljg3NTk2IDEyLjA3IDYuMDY5NTEgMTIuMTY2NyA2LjM1OTgzIDEyLjE2NjdDNi42NTAxNSAxMi4xNjY3IDYuODQzNyAxMi4wNyA3LjAzNzI1IDExLjg3NjRDNy4yMzA4IDExLjY4MjkgNy4zMjc1NyAxMS40ODkzIDcuMzI3NTcgMTEuMTk5VjkuNDU3MDZMNS4zOTIwOSA3LjQyNDhaIiBmaWxsPSIjNDM0RTVCIi8+CjxwYXRoIGQ9Ik00LjMyNzU3IDIuNDg5NDRINS4zOTIwOVYzLjY1MDczTDcuMzI3NTcgNS42ODI5OVYyLjQ4OTQ0SDExLjE5ODVDMTEuNDg4OSAyLjQ4OTQ0IDExLjY4MjQgMi4zOTI2NiAxMS44NzYgMi4xOTkxMkMxMi4wNjk1IDIuMDA1NTcgMTIuMTY2MyAxLjgxMjAyIDEyLjE2NjMgMS41MjE3QzEyLjE2NjMgMS4yMzEzNyAxMi4wNjk1IDEuMDM3ODMgMTEuODc2IDAuODQ0Mjc4QzExLjY4MjQgMC42NTA3MjkgMTEuNDg4OSAwLjU1Mzk1NSAxMS4xOTg1IDAuNTUzOTU1SDIuMzkyMDlMNC4zMjc1NyAyLjQ4OTQ0WiIgZmlsbD0iIzQzNEU1QiIvPgo8cGF0aCBkPSJNMTAuNjE4MSAxMS44NzY0QzEwLjMyNzggMTEuODc2NCAxMC4xMzQyIDExLjc3OTcgOS45NDA3IDExLjU4NjFMMC40NTY4MjcgMS44MTE5MUMwLjI2MzI3OCAxLjYxODM2IDAuMTY2NTA0IDEuMzI4MDQgMC4xNjY1MDQgMS4xMzQ0OUMwLjE2NjUwNCAwLjg0NDE2NyAwLjI2MzI3OCAwLjY1MDYxOSAwLjQ1NjgyNyAwLjQ1NzA3MUMwLjY1MDM3NSAwLjI2MzUyMiAwLjg0MzkyMyAwLjE2Njc0OCAxLjEzNDI1IDAuMTY2NzQ4QzEuNDI0NTcgMC4xNjY3NDggMS42MTgxMiAwLjI2MzUyMiAxLjgxMTY3IDAuNDU3MDcxTDExLjI5NTUgMTAuMjMxM0MxMS40ODkxIDEwLjQyNDggMTEuNTg1OSAxMC42MTg0IDExLjU4NTkgMTAuOTA4N0MxMS41ODU5IDExLjE5OSAxMS40ODkxIDExLjM5MjYgMTEuMjk1NSAxMS41ODYxQzExLjEwMiAxMS43Nzk3IDEwLjkwODQgMTEuODc2NCAxMC42MTgxIDExLjg3NjRaIiBmaWxsPSIjNDM0RTVCIi8+Cjwvc3ZnPgo=",put="",Ket={name:"LTextEditor",props:{modelValue:String},emits:["update:modelValue","useMarkUp","focus","input"],components:{EditorContent:AXe,LinkBox:iet,BubbleMenu:vXe,FloatingLink:fet},data(){return{editor:null,markUps:[{name:"bold",tooltip:"Negrito",icon:"uil-bold"},{name:"italic",tooltip:"Itálico",icon:"uil-italic"},{name:"underline",tooltip:"Sublinhado",icon:"uil-underline"},{name:"heading",tooltip:"Título",icon:Yet},{name:"bulletList",tooltip:"Lista com marcadores",icon:"uil-list-ul"},{name:"orderedList",tooltip:"Lista numerada",icon:"uil-list-ol-alt"},{name:"link",tooltip:"Inserir link",icon:"uil-link-alt"},{name:"blockquote",tooltip:"Citação",icon:Wet},{name:"removeFormatting",tooltip:"Remover formatação",icon:Qet}],showLinkBox:!1,isEditorFocused:null,tooltipDelay:125}},methods:{isUnicon(e){return e.startsWith("uil-")},markUpText(e){if(e==="link"){this.toggleLinkBox();return}this.editor.chain().focus().setMarkUp(e).run()},toggleLinkBox(){this.showLinkBox=!this.showLinkBox},closeLinkBox(){this.editor.commands.focus(),this.toggleLinkBox()},markUpLink(e){this.currentTextSelection||this.previousURL?this.editor.chain().focus().extendMarkRange("link").setLink({href:e.url,target:"_blank"}).run():this.editor.commands.insertContent(zk.link(e.insertedText))},markOffLink(){this.editor.chain().focus().extendMarkRange("link").unsetLink().run()},hasSomeMarkUpActive(){const e=this.editor.getJSON().content,n=this.markUps.map(l=>l.name),r=e.map(l=>l.type).some(l=>n.includes(l)),a=e.some(l=>{if(l.hasOwnProperty("content"))return l.content.some(i=>i.hasOwnProperty("marks"))});return r||a},addSpaceToFinalParagraphTag(e){return e.replace(/<\/p>/g," </p>")}},computed:{previousURL(){return this.editor.getAttributes("link").href},showFloatingLink(){return this.editor.isActive("link")},finalText(){const e=this.editor.getHTML();console.log("textEditorHTML",e);const n=this.addSpaceToFinalParagraphTag(e),o=zk.link(n);return Uet.sanitize(het(o),{ADD_ATTR:["target"]})},currentTextSelection(){const{view:e,state:n}=this.editor,{from:o,to:r}=e.state.selection;return n.doc.textBetween(o,r,"")},arrowXPosition(){const n=this.$refs.link[0].$el;return{left:`${n.offsetLeft+(n.offsetWidth-16.8)/2}px`}},linkBoxPosition(){const n=this.$refs.texteditor.$el.offsetWidth,o=this.$refs.link[0].$el;let r;return n>500?r=`${o.offsetLeft+o.offsetWidth/2-456/2}px`:r="1rem",{left:r}}},beforeMount(){this.editor=new IXe({extensions:[OXe,zXe,BXe,$Xe,HXe,KXe,GXe,XXe,JXe,tZe,oZe,TZe,SZe,DZe,jZe],content:this.modelValue,autofocus:!1,onUpdate:()=>{this.$emit("input",this.finalText),this.$emit("useMarkUp",this.hasSomeMarkUpActive()),this.$emit("update:modelValue",this.finalText)},onFocus:()=>{this.isEditorFocused=!0,this.$emit("focus",!0)},onBlur:()=>{this.isEditorFocused=!1}})},beforeUnmount(){this.editor.destroy()}},qet={class:"wrapper-text-editor"},Get={class:"wrapper-editor-features"},Xet={class:"wrapper-scroll"},Zet={class:"wrapper-buttons py-2 pl-3 pr-4 l-d-flex row l-d-justify-content-start l-d-align-item-center"},Jet=["alt","src"];function ett(e,n,o,r,a,l){const i=t.resolveComponent("FloatingLink"),s=t.resolveComponent("BubbleMenu"),c=t.resolveComponent("EditorContent"),d=t.resolveComponent("l-icon"),u=t.resolveComponent("l-button"),f=t.resolveComponent("l-tooltip"),p=t.resolveComponent("LinkBox");return t.openBlock(),t.createElementBlock("section",qet,[l.showFloatingLink?(t.openBlock(),t.createBlock(s,{key:0,editor:a.editor,tippyOptions:{zIndex:1e3},shouldShow:({editor:m})=>m.isActive("link")},{default:t.withCtx(()=>[t.createVNode(i,{"data-link":a.editor.getAttributes("link").href,onEdit:n[0]||(n[0]=m=>l.toggleLinkBox()),onRemove:n[1]||(n[1]=m=>l.markOffLink())},null,8,["data-link"])]),_:1},8,["editor","shouldShow"])):t.createCommentVNode("",!0),t.createVNode(c,{editor:a.editor,ref:"texteditor"},null,8,["editor"]),t.createElementVNode("div",Get,[t.createElementVNode("div",Xet,[t.createElementVNode("div",Zet,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.markUps,m=>(t.openBlock(),t.createBlock(f,{key:m.name,content:m.tooltip,class:"item","open-delay":a.tooltipDelay},{default:t.withCtx(()=>[t.createVNode(u,{onClick:g=>l.markUpText(m.name),class:t.normalizeClass(["button-text-editor",{"is-active":a.editor.isActive(m.name)}]),size:"small",square:"",ref_for:!0,ref:m.name},{default:t.withCtx(()=>[l.isUnicon(m.icon)?(t.openBlock(),t.createBlock(d,{key:0,size:"24",icon:m.icon},null,8,["icon"])):(t.openBlock(),t.createElementBlock("img",{key:1,alt:m.name,src:m.icon,class:t.normalizeClass({"icon-active":a.editor.isActive(m.name)})},null,10,Jet))]),_:2},1032,["onClick","class"])]),_:2},1032,["content","open-delay"]))),128))])]),a.showLinkBox?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("span",{class:"link-box-arrow",style:t.normalizeStyle([l.arrowXPosition])},null,4),t.createVNode(p,{class:"link-box-position",onClose:n[2]||(n[2]=m=>l.closeLinkBox()),onSetLink:n[3]||(n[3]=m=>l.markUpLink(m)),previousURL:l.previousURL,style:t.normalizeStyle([l.linkBoxPosition])},null,8,["previousURL","style"])],64)):t.createCommentVNode("",!0)])])}const ttt=Object.freeze(Object.defineProperty({__proto__:null,default:lt(Ket,[["render",ett],["__scopeId","data-v-858640fd"]])},Symbol.toStringTag,{value:"Module"})),mut="",ntt={name:"LTimeSelect",components:{ElTimeSelect:Cw},props:{prefixIcon:{type:String,default:"el-icon-clock"},clearIcon:{type:String,default:"el-icon-multiply"},hideIcon:{type:Boolean,default:!1},placeholder:{type:String,default:"Horário"},clearable:{type:Boolean,default:!1}}};function ott(e,n,o,r,a,l){const i=t.resolveComponent("el-time-select");return t.openBlock(),t.createBlock(i,t.mergeProps({"prefix-icon":o.prefixIcon,"clear-icon":o.clearIcon,placeholder:o.placeholder,clearable:o.clearable},e.$attrs,{ref:"timeSelect",class:["l-time-select",{"hide-icon":o.hideIcon}]}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},16,["prefix-icon","clear-icon","placeholder","clearable","class"])}const rtt=Object.freeze(Object.defineProperty({__proto__:null,default:lt(ntt,[["render",ott],["__scopeId","data-v-61335252"]])},Symbol.toStringTag,{value:"Module"})),yut="",att={name:"LToggleButtonGroup",props:{options:Array,modelValue:String,disabled:{type:Boolean,default:!1}},computed:{value:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}}},methods:{optionType(e){return this.disabled?"default":e.value===this.value?"primary":"default"},selectOption(e){this.value=e.value}}};function ltt(e,n,o,r,a,l){const i=t.resolveComponent("l-button"),s=t.resolveComponent("l-tooltip"),c=t.resolveComponent("l-button-group");return t.openBlock(),t.createBlock(c,{class:"l-toggle-button-group"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.options,d=>(t.openBlock(),t.createBlock(s,{effect:"dark",content:d.title,placement:"bottom",key:d.value},{default:t.withCtx(()=>[t.createVNode(i,{disabled:o.disabled,type:l.optionType(d),icon:d.icon,size:"small",plain:"",onClick:u=>l.selectOption(d)},null,8,["disabled","type","icon","onClick"])]),_:2},1032,["content"]))),128))]),_:1})}const itt=Object.freeze(Object.defineProperty({__proto__:null,default:lt(att,[["render",ltt]])},Symbol.toStringTag,{value:"Module"})),Mut="",stt={components:{ElTooltip:eo},props:{tooltipClass:{type:String,default:"l-tooltip-popper"}}};function ctt(e,n,o,r,a,l){const i=t.resolveComponent("ElTooltip");return t.openBlock(),t.createBlock(i,t.mergeProps(e.$attrs,{"popper-class":o.tooltipClass}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["popper-class"])}const dtt=Object.freeze(Object.defineProperty({__proto__:null,default:lt(stt,[["render",ctt]])},Symbol.toStringTag,{value:"Module"})),Cut="",utt={name:"LTransitionExpand",methods:{enter(e){const n=getComputedStyle(e).width;e.style.width=n,e.style.position="absolute",e.style.visibility="hidden",e.style.height="auto";const o=getComputedStyle(e).height;e.style.width=null,e.style.position=null,e.style.visibility=null,e.style.height=0,getComputedStyle(e).height,requestAnimationFrame(()=>{e.style.height=o})},afterEnter(e){e.style.height="auto"},leave(e){const n=getComputedStyle(e).height;e.style.height=n,getComputedStyle(e).height,requestAnimationFrame(()=>{e.style.height=0})}}};function ftt(e,n,o,r,a,l){return t.openBlock(),t.createBlock(t.Transition,{class:"l-transition-expand",name:"expand",onEnter:l.enter,onAfterEnter:l.afterEnter,onLeave:l.leave},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["onEnter","onAfterEnter","onLeave"])}const SR=Object.assign({"../components/LAlert/index.vue":Awe,"../components/LAttachmentChip/index.vue":Hwe,"../components/LBox/index.vue":Wwe,"../components/LBoxHeader/index.vue":qwe,"../components/LButton/index.vue":Jwe,"../components/LCarousel/index.vue":lCe,"../components/LCheckbox/index.vue":cCe,"../components/LCheckboxButton/index.vue":fCe,"../components/LCheckboxGroup/index.vue":mCe,"../components/LChip/index.vue":wCe,"../components/LCircularLoader/index.vue":NCe,"../components/LCollapseItem/index.vue":xCe,"../components/LDatePicker/index.vue":DCe,"../components/LDialog/index.vue":ACe,"../components/LFailedToLoad/index.vue":$Ce,"../components/LHelperBox/index.vue":UCe,"../components/LIcon/index.vue":MU,"../components/LImageViewer/index.vue":t_e,"../components/LInput/index.vue":l_e,"../components/LLinearProgress/index.vue":c_e,"../components/LNotice/index.vue":h_e,"../components/LNotification/index.vue":TU,"../components/LPresentation/index.vue":__e,"../components/LPromptDialog/index.vue":S_e,"../components/LRadio/index.vue":I_e,"../components/LRadioButton/index.vue":z_e,"../components/LRadioGroup/index.vue":V_e,"../components/LRating/index.vue":P_e,"../components/LSearchBar/index.vue":nve,"../components/LSearchTopics/index.vue":BFe,"../components/LSwitch/index.vue":$Fe,"../components/LTable/index.vue":UUe,"../components/LTabs/index.vue":QUe,"../components/LTargetChip/index.vue":XUe,"../components/LTargetInput/index.vue":eYe,"../components/LTextEditor/index.vue":ttt,"../components/LTimeSelect/index.vue":rtt,"../components/LToggleButtonGroup/index.vue":itt,"../components/LTooltip/index.vue":dtt,"../components/LTransitionExpand/index.vue":Object.freeze(Object.defineProperty({__proto__:null,default:lt(utt,[["render",ftt],["__scopeId","data-v-00bad3ad"]])},Symbol.toStringTag,{value:"Module"})),"../components/LUpload/index.vue":Object.freeze(Object.defineProperty({__proto__:null,default:{tagName:"l-upload",extends:Rw}},Symbol.toStringTag,{value:"Module"}))}),ptt=(e,n="index")=>{const o=e.split("/"),r=o.pop().replace(".vue","");return r===n?o.pop():r},htt={install(e){Object.keys(SR).forEach(n=>{const o=ptt(n);e.component(o,SR[n].default)})}},xut="";if(typeof Xh>"u")var Xh=window;var mtt=Object.create,Uk=Object.defineProperty,gtt=Object.getPrototypeOf,ytt=Object.prototype.hasOwnProperty,btt=Object.getOwnPropertyNames,Mtt=Object.getOwnPropertyDescriptor,wtt=e=>Uk(e,"__esModule",{value:!0}),Na=(e,n)=>()=>(n||(n={exports:{}},e(n.exports,n)),n.exports),Ctt=(e,n,o)=>{if(wtt(e),n&&typeof n=="object"||typeof n=="function")for(let r of btt(n))!ytt.call(e,r)&&r!=="default"&&Uk(e,r,{get:()=>n[r],enumerable:!(o=Mtt(n,r))||o.enumerable});return e},_tt=e=>e&&e.__esModule?e:Ctt(Uk(e!=null?mtt(gtt(e)):{},"default",{value:e,enumerable:!0}),e),DR=Na((e,n)=>{function o(r){var a=typeof r;return r!=null&&(a=="object"||a=="function")}n.exports=o}),Ntt=Na((e,n)=>{var o=typeof Xh=="object"&&Xh&&Xh.Object===Object&&Xh;n.exports=o}),vR=Na((e,n)=>{var o=Ntt(),r=typeof self=="object"&&self&&self.Object===Object&&self,a=o||r||Function("return this")();n.exports=a}),ktt=Na((e,n)=>{var o=vR(),r=function(){return o.Date.now()};n.exports=r}),IR=Na((e,n)=>{var o=vR(),r=o.Symbol;n.exports=r}),Ett=Na((e,n)=>{var o=IR(),r=Object.prototype,a=r.hasOwnProperty,l=r.toString,i=o?o.toStringTag:void 0;function s(c){var d=a.call(c,i),u=c[i];try{c[i]=void 0;var f=!0}catch{}var p=l.call(c);return f&&(d?c[i]=u:delete c[i]),p}n.exports=s}),xtt=Na((e,n)=>{var o=Object.prototype,r=o.toString;function a(l){return r.call(l)}n.exports=a}),Ttt=Na((e,n)=>{var o=IR(),r=Ett(),a=xtt(),l="[object Null]",i="[object Undefined]",s=o?o.toStringTag:void 0;function c(d){return d==null?d===void 0?i:l:s&&s in Object(d)?r(d):a(d)}n.exports=c}),Stt=Na((e,n)=>{function o(r){return r!=null&&typeof r=="object"}n.exports=o}),Dtt=Na((e,n)=>{var o=Ttt(),r=Stt(),a="[object Symbol]";function l(i){return typeof i=="symbol"||r(i)&&o(i)==a}n.exports=l}),vtt=Na((e,n)=>{var o=DR(),r=Dtt(),a=0/0,l=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;function u(f){if(typeof f=="number")return f;if(r(f))return a;if(o(f)){var p=typeof f.valueOf=="function"?f.valueOf():f;f=o(p)?p+"":p}if(typeof f!="string")return f===0?f:+f;f=f.replace(l,"");var m=s.test(f);return m||c.test(f)?d(f.slice(2),m?2:8):i.test(f)?a:+f}n.exports=u}),Itt=Na((e,n)=>{var o=DR(),r=ktt(),a=vtt(),l="Expected a function",i=Math.max,s=Math.min;function c(d,u,f){var p,m,g,y,b,w,N=0,_=!1,C=!1,k=!0;if(typeof d!="function")throw new TypeError(l);u=a(u)||0,o(f)&&(_=!!f.leading,C="maxWait"in f,g=C?i(a(f.maxWait)||0,u):g,k="trailing"in f?!!f.trailing:k);function E(L){var A=p,P=m;return p=m=void 0,N=L,y=d.apply(P,A),y}function T(L){return N=L,b=setTimeout(v,u),_?E(L):y}function S(L){var A=L-w,P=L-N,j=u-A;return C?s(j,g-P):j}function D(L){var A=L-w,P=L-N;return w===void 0||A>=u||A<0||C&&P>=g}function v(){var L=r();if(D(L))return I(L);b=setTimeout(v,S(L))}function I(L){return b=void 0,k&&p?E(L):(p=m=void 0,y)}function B(){b!==void 0&&clearTimeout(b),N=0,p=w=m=b=void 0}function $(){return b===void 0?y:I(r())}function F(){var L=r(),A=D(L);if(p=arguments,m=this,w=L,A){if(b===void 0)return T(w);if(C)return clearTimeout(b),b=setTimeout(v,u),E(w)}return b===void 0&&(b=setTimeout(v,u)),y}return F.cancel=B,F.flush=$,F}n.exports=c}),Att=_tt(Itt()),Ott=Att.default;function ztt(){let e=[],n=[];function o(N,_){N.forEach(C=>{C.call(null,_)})}this.onSingleTap=function(N){typeof N=="function"&&!e.includes(N)&&e.push(N)},this.onDoubleTap=function(N){typeof N=="function"&&!n.includes(N)&&n.push(N)},this.attach=function(N){if(!(N instanceof Element)){console.error("TapDetector.attach: arg must be an Element");return}N.addEventListener("touchstart",d),N.addEventListener("touchmove",f),N.addEventListener("touchend",u),N.addEventListener("mousedown",p),N.addEventListener("mouseup",m),N.addEventListener("mousemove",g)},this.detach=function(N){N.removeEventListener("touchstart",d),N.removeEventListener("touchmove",f),N.removeEventListener("touchend",u),N.removeEventListener("mousedown",p),N.removeEventListener("mouseup",m),N.removeEventListener("mousemove",g)};let r=!1,a=0,l=0,i=0,s=0,c=0;function d(N){r=!0,N.touches.length===1&&y(N.touches[0].clientX,N.touches[0].clientY)}function u(N){N.touches.length===0&&b()}function f(N){N.touches.length===1&&w(N.touches[0].clientX,N.touches[0].clientY)}function p(N){r||y(N.clientX,N.clientY)}function m(N){r||b()}function g(N){r||N.button===0&&w(N.clientX,N.clientY)}function y(N,_){s=N,c=_,i=0}function b(){let N=Date.now();i<10&&(N-a<300?l+=1:l=1,a=Date.now(),o(e,{clientX:s,clientY:c}),l===2&&(o(n,{clientX:s,clientY:c}),l=0)),i=0}function w(N,_){let C=s-N,k=c-_,E=Math.sqrt(C*C+k*k);i+=E,s=N,c=_}}var Btt={props:{minScale:{type:Number,default:1},maxScale:{type:Number,default:5},zoomed:{type:Boolean,default:!1},resetTrigger:{type:Number,default:1e5},aspectRatio:{type:Number,default:1},backgroundColor:{type:String,default:"transparent"},pivot:{type:String,default:"cursor"},zoomingElastic:{type:Boolean,default:!0},limitTranslation:{type:Boolean,default:!0},doubleClickToZoom:{type:Boolean,default:!0},mouseWheelToZoom:{type:Boolean,default:!0}},data(){return{containerWidth:1,containerHeight:1,containerLeft:0,containerTop:0,translateX:0,animTranslateX:0,translateY:0,animTranslateY:0,scale:1,animScale:1,lastFullWheelTime:0,lastWheelTime:0,lastWheelDirection:"y",isPointerDown:!1,pointerPosX:-1,pointerPosY:-1,twoFingerInitDist:0,panLocked:!0,raf:null,tapDetector:null}},computed:{wrapperStyle(){let e=this.containerWidth*this.animTranslateX,n=this.containerHeight*this.animTranslateY;return{transform:[`translate(${e}px, ${n}px)`,`scale(${this.animScale})`].join(" ")}}},watch:{scale(e){e!==1&&(this.$emit("update:zoomed",!0),this.panLocked=!1)},resetTrigger:"reset"},mounted(){this.tapDetector=new ztt,this.tapDetector.attach(this.$el),this.doubleClickToZoom&&this.tapDetector.onDoubleTap(this.onDoubleTap),window.addEventListener("resize",this.onWindowResize),this.onWindowResize(),this.refreshContainerPos(),this.loop()},destroyed(){this.tapDetector.detach(this.$el),window.removeEventListener("resize",this.onWindowResize),window.cancelAnimationFrame(this.raf)},methods:{reset(){this.scale=1,this.panLocked=!0,this.translateX=0,this.translateY=0},zoomIn(e=2){this.tryToScale(e),this.onInteractionEnd()},zoomOut(e=.5){this.tryToScale(e),this.onInteractionEnd()},tryToScale(e){let n=this.scale*e;if(this.zoomingElastic){if(n<this.minScale||n>this.maxScale){let o=Math.log2(e);o*=.2,e=Math.pow(2,o),n=this.scale*e}}else n<this.minScale?n=this.minScale:n>this.maxScale&&(n=this.maxScale);if(e=n/this.scale,this.scale=n,this.pivot!=="image-center"){let o=(this.pointerPosX-this.containerLeft)/this.containerWidth,r=(this.pointerPosY-this.containerTop)/this.containerHeight;this.translateX=(.5+this.translateX-o)*e+o-.5,this.translateY=(.5+this.translateY-r)*e+r-.5}},setPointerPosCenter(){this.pointerPosX=this.containerLeft+this.containerWidth/2,this.pointerPosY=this.containerTop+this.containerHeight/2},onPointerMove(e,n){if(this.isPointerDown){let o=e-this.pointerPosX,r=n-this.pointerPosY;this.panLocked||(this.translateX+=o/this.containerWidth,this.translateY+=r/this.containerHeight)}this.pointerPosX=e,this.pointerPosY=n},onInteractionEnd:Ott(function(){this.limit(),this.panLocked=this.scale===1,this.$emit("update:zoomed",!this.panLocked)},100),limit(){if(this.scale<this.minScale?this.scale=this.minScale:this.scale>this.maxScale&&this.tryToScale(this.maxScale/this.scale),this.limitTranslation){let e=this.calcTranslateLimit();Math.abs(this.translateX)>e.x&&(this.translateX*=e.x/Math.abs(this.translateX)),Math.abs(this.translateY)>e.y&&(this.translateY*=e.y/Math.abs(this.translateY))}},calcTranslateLimit(){if(this.getMarginDirection()==="y"){let e=this.containerWidth/this.aspectRatio/this.containerHeight,n=(this.scale*e-1)/2;return n<0&&(n=0),{x:(this.scale-1)/2,y:n}}else{let e=this.containerHeight*this.aspectRatio/this.containerWidth,n=(this.scale*e-1)/2;return n<0&&(n=0),{x:n,y:(this.scale-1)/2}}},getMarginDirection(){return this.containerWidth/this.containerHeight>this.aspectRatio?"x":"y"},onDoubleTap(e){this.scale===1?(e.clientX>0&&(this.pointerPosX=e.clientX,this.pointerPosY=e.clientY),this.tryToScale(Math.min(3,this.maxScale))):this.reset(),this.onInteractionEnd()},onWindowResize(){let e=window.getComputedStyle(this.$el);this.containerWidth=parseFloat(e.width),this.containerHeight=parseFloat(e.height),this.setPointerPosCenter(),this.limit()},refreshContainerPos(){let e=this.$el.getBoundingClientRect();this.containerLeft=e.left,this.containerTop=e.top},loop(){this.animScale=this.gainOn(this.animScale,this.scale),this.animTranslateX=this.gainOn(this.animTranslateX,this.translateX),this.animTranslateY=this.gainOn(this.animTranslateY,this.translateY),this.raf=window.requestAnimationFrame(this.loop)},gainOn(e,n){let o=(n-e)*.3;return Math.abs(o)>1e-5?e+o:n},onMouseWheel(e){if(!this.mouseWheelToZoom)return;e.preventDefault(),e.detail&&(e.wheelDelta=e.detail*-10);let n=Date.now();Math.abs(e.wheelDelta)===120?n-this.lastFullWheelTime>50&&(this.onMouseWheelDo(e.wheelDelta),this.lastFullWheelTime=n):(n-this.lastWheelTime>50&&typeof e.deltaX=="number"&&(this.lastWheelDirection=e.detail==0&&Math.abs(e.deltaX)>Math.abs(e.deltaY)?"x":"y",this.lastWheelDirection==="x"&&this.$emit("swipe",e.deltaX>0?"left":"right")),this.lastWheelDirection==="y"&&this.onMouseWheelDo(e.wheelDelta)),this.lastWheelTime=n},onMouseWheelDo(e){let n=Math.pow(1.25,e/120);this.tryToScale(n),this.onInteractionEnd()},onMouseDown(e){this.refreshContainerPos(),this.isPointerDown=!0,this.pointerPosX=e.clientX,this.pointerPosY=e.clientY},onMouseUp(e){this.isPointerDown=!1,this.onInteractionEnd()},onMouseMove(e){this.onPointerMove(e.clientX,e.clientY)},onTouchStart(e){if(e.touches.length===1)this.refreshContainerPos(),this.pointerPosX=e.touches[0].clientX,this.pointerPosY=e.touches[0].clientY,this.isPointerDown=!0;else if(e.touches.length===2){this.isPointerDown=!0,this.pointerPosX=(e.touches[0].clientX+e.touches[1].clientX)/2,this.pointerPosY=(e.touches[0].clientY+e.touches[1].clientY)/2;let n=e.touches[0].clientX-e.touches[1].clientX,o=e.touches[0].clientY-e.touches[1].clientY;this.twoFingerInitDist=Math.sqrt(n*n+o*o)}},onTouchEnd(e){e.touches.length===0?(this.isPointerDown=!1,Math.abs(this.scale-1)<.1&&(this.scale=1),this.onInteractionEnd()):e.touches.length===1&&(this.pointerPosX=e.touches[0].clientX,this.pointerPosY=e.touches[0].clientY)},onTouchMove(e){if(e.touches.length===1)this.onPointerMove(e.touches[0].clientX,e.touches[0].clientY);else if(e.touches.length===2){let n=(e.touches[0].clientX+e.touches[1].clientX)/2,o=(e.touches[0].clientY+e.touches[1].clientY)/2;this.onPointerMove(n,o),this.pointerPosX=n,this.pointerPosY=o;let r=e.touches[0].clientX-e.touches[1].clientX,a=e.touches[0].clientY-e.touches[1].clientY,l=Math.sqrt(r*r+a*a);this.tryToScale(l/this.twoFingerInitDist),this.twoFingerInitDist=l}}}};function AR(e,n,o,r,a,l,i,s,c,d){typeof i!="boolean"&&(c=s,s=i,i=!1);const u=typeof o=="function"?o.options:o;e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,a&&(u.functional=!0)),r&&(u._scopeId=r);let f;if(l?(f=function(p){p=p||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!p&&typeof __VUE_SSR_CONTEXT__<"u"&&(p=__VUE_SSR_CONTEXT__),n&&n.call(this,c(p)),p&&p._registeredComponents&&p._registeredComponents.add(l)},u._ssrRegister=f):n&&(f=i?function(p){n.call(this,d(p,this.$root.$options.shadowRoot))}:function(p){n.call(this,s(p))}),f)if(u.functional){const p=u.render;u.render=function(g,y){return f.call(y),p(g,y)}}else{const p=u.beforeCreate;u.beforeCreate=p?[].concat(p,f):[f]}return o}const Ltt=typeof navigator<"u"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function OR(e){return(n,o)=>Vtt(n,o)}let Yk;const zR={};function Vtt(e,n){const o=Ltt?n.media||"default":e,r=zR[o]||(zR[o]={ids:new Set,styles:[]});if(!r.ids.has(e)){r.ids.add(e);let a=n.source;if(n.map&&(a+=`
|
|
232
|
+
`+Kn),we&&(Kn=pl(Kn,F," "),Kn=pl(Kn,L," "),Kn=pl(Kn,A," ")),C&&ke?C.createHTML(Kn):Kn},n.setConfig=function(st){Ao(st),Qe=!0},n.clearConfig=function(){_t=null,Qe=!1},n.isValidAttribute=function(st,ue,Re){_t||Ao({});var ce=Dt(st),Ae=Dt(ue);return En(ce,Ae,Re)},n.addHook=function(st,ue){typeof ue=="function"&&($[st]=$[st]||[],Gh($[st],ue))},n.removeHook=function(st){if($[st])return _R($[st])},n.removeHooks=function(st){$[st]&&($[st]=[])},n.removeAllHooks=function(){$={}},n}var Uet=TR();const Yet="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxNyAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcuMjM3MjQgMC44MzMyNTJDNy41NjcyNiAwLjgzMzI1MiA3LjgyODg3IDAuOTM5OTQgOC4wMjIwNSAxLjE1MzMyQzguMjIzMjggMS4zNTgxNiA4LjMyMzkgMS42MzU1NSA4LjMyMzkgMS45ODU0OVY4LjgzNDg4QzguMzIzOSA5LjE4NDgyIDguMjIzMjggOS40NjY0OCA4LjAyMjA1IDkuNjc5ODVDNy44Mjg4NyA5Ljg5MzIzIDcuNTY3MjYgOS45OTk5MiA3LjIzNzI0IDkuOTk5OTJDNi45MDcyMiA5Ljk5OTkyIDYuNjQxNiA5Ljg5NzUgNi40NDAzNyA5LjY5MjY2QzYuMjQ3MTggOS40NzkyOCA2LjE1MDU5IDkuMTkzMzUgNi4xNTA1OSA4LjgzNDg4VjYuMjc0MzZIMi42NzMzVjguODM0ODhDMi42NzMzIDkuMTg0ODIgMi41NzI2OSA5LjQ2NjQ4IDIuMzcxNDYgOS42Nzk4NUMyLjE3ODI3IDkuODkzMjMgMS45MTY2NyA5Ljk5OTkyIDEuNTg2NjUgOS45OTk5MkMxLjI1NjYzIDkuOTk5OTIgMC45OTEwMDYgOS44OTc1IDAuNzg5Nzc0IDkuNjkyNjZDMC41OTY1OTEgOS40NzkyOCAwLjUgOS4xOTMzNSAwLjUgOC44MzQ4OFYxLjk4NTQ5QzAuNSAxLjYzNTU1IDAuNTk2NTkxIDEuMzU4MTYgMC43ODk3NzQgMS4xNTMzMkMwLjk5MTAwNiAwLjkzOTk0IDEuMjU2NjMgMC44MzMyNTIgMS41ODY2NSAwLjgzMzI1MkMxLjkxNjY3IDAuODMzMjUyIDIuMTc4MjcgMC45Mzk5NCAyLjM3MTQ2IDEuMTUzMzJDMi41NzI2OSAxLjM1ODE2IDIuNjczMyAxLjYzNTU1IDIuNjczMyAxLjk4NTQ5VjQuNDA1MThINi4xNTA1OVYxLjk4NTQ5QzYuMTUwNTkgMS42MzU1NSA2LjI0NzE4IDEuMzU4MTYgNi40NDAzNyAxLjE1MzMyQzYuNjQxNiAwLjkzOTk0IDYuOTA3MjIgMC44MzMyNTIgNy4yMzcyNCAwLjgzMzI1MloiIGZpbGw9IiM0MzRFNUIiLz4KPHBhdGggZD0iTTE1LjI4MjkgOC4wNTM5MkMxNS42NDUxIDguMDUzOTIgMTUuOTEwNyA4LjEzMDc0IDE2LjA3OTggOC4yODQzN0MxNi4yNDg4IDguNDM4IDE2LjMzMzMgOC42Njg0NSAxNi4zMzMzIDguOTc1NzFDMTYuMzMzMyA5LjYwNzMxIDE1Ljk4MzIgOS45MjMxIDE1LjI4MjkgOS45MjMxSDExLjA5MzNDMTAuMzkzIDkuOTIzMSAxMC4wNDI4IDkuNjA3MzEgMTAuMDQyOCA4Ljk3NTcxQzEwLjA0MjggOC42Njg0NSAxMC4xMjczIDguNDM4IDEwLjI5NjQgOC4yODQzN0MxMC40NjU0IDguMTMwNzQgMTAuNzMxIDguMDUzOTIgMTEuMDkzMyA4LjA1MzkySDEyLjA3MTJWMy40MzIxOEwxMS4xMDUzIDQuMDMzOUMxMC45Njg1IDQuMTE5MjUgMTAuODI3NiA0LjE2MTkzIDEwLjY4MjcgNC4xNjE5M0MxMC40NTc0IDQuMTYxOTMgMTAuMjY0MiA0LjA1OTUxIDEwLjEwMzIgMy44NTQ2N0M5Ljk0MjIxIDMuNjQxMjkgOS44NjE3MiAzLjQwNjU4IDkuODYxNzIgMy4xNTA1MkM5Ljg2MTcyIDIuODAwNTkgMTAuMDAyNiAyLjUzNiAxMC4yODQzIDIuMzU2NzZMMTIuMjE2MSAxLjE2NjEyQzEyLjU3MDMgMC45NTI3NDMgMTIuOTA0MyAwLjg0NjA1NCAxMy4yMTgzIDAuODQ2MDU0QzEzLjU0MDIgMC44NDYwNTQgMTMuNzk3OCAwLjk0ODQ3NSAxMy45OTEgMS4xNTMzMkMxNC4xOTIyIDEuMzU4MTYgMTQuMjkyOCAxLjYzNTU1IDE0LjI5MjggMS45ODU0OVY4LjA1MzkySDE1LjI4MjlaIiBmaWxsPSIjNDM0RTVCIi8+Cjwvc3ZnPgo=",Wet="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxOCAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTguNjU3MjkgNC4xNjIxNEM4LjY1NzI5IDEuOTYwMTMgNi44NjM5IDAuMTY2NzQ4IDQuNjYxOSAwLjE2Njc0OEMyLjQ1OTg5IDAuMTY2NzQ4IDAuNjY2NTA0IDEuOTYwMTMgMC42NjY1MDQgNC4xNjIxNEMwLjY2NjUwNCA2LjM2NDE0IDIuNDU5ODkgOC4xNTc1MyA0LjY2MTkgOC4xNTc1M0M1LjEzODYyIDguMTU3NTMgNS42MTUzNCA4LjA2NjczIDYuMDQ2NjYgNy45MDc4MkM1Ljk1NTg2IDguOTA2NjcgNS42NjA3NCA5LjkyODIyIDUuMTYxMzIgMTAuODgxN0M1LjExNTkyIDEwLjk0OTggNS4xMTU5MiAxMS4wNDA2IDUuMTM4NjIgMTEuMTA4N0M1LjE2MTMyIDExLjE1NDEgNS4yMDY3MiAxMS4xOTk1IDUuMjUyMTIgMTEuMTk5NUM1LjMyMDIzIDExLjIyMjIgNS4zODgzMyAxMS4xOTk1IDUuNDc5MTQgMTEuMTMxNEM2LjQzMjU4IDEwLjMxNDEgNy4yNDk4MiA5LjI0NzE4IDcuNzk0NjUgOC4wNjY3M0M4LjI5NDA3IDYuOTc3MDcgOC41ODkxOCA1LjgxOTMyIDguNjM0NTkgNC41OTM0NkM4LjY1NzI5IDQuNDU3MjUgOC42NTcyOSA0LjI5ODM1IDguNjU3MjkgNC4xNjIxNFoiIGZpbGw9IiM0MzRFNUIiLz4KPHBhdGggZD0iTTE3LjM1MTYgNC4xNjIxNEMxNy4zNTE2IDEuOTYwMTMgMTUuNTU4MiAwLjE2Njc0OCAxMy4zNTYyIDAuMTY2NzQ4QzExLjE1NDIgMC4xNjY3NDggOS4zNjA4NCAxLjk2MDEzIDkuMzYwODQgNC4xNjIxNEM5LjM2MDg0IDYuMzY0MTQgMTEuMTU0MiA4LjE1NzUzIDEzLjM1NjIgOC4xNTc1M0MxMy44MzMgOC4xNTc1MyAxNC4zMDk3IDguMDY2NzMgMTQuNzQxIDcuOTA3ODJDMTQuNjUwMiA4LjkwNjY3IDE0LjM1NTEgOS45MjgyMiAxMy44NTU3IDEwLjg4MTdDMTMuODEwMyAxMC45NDk4IDEzLjgxMDMgMTEuMDQwNiAxMy44MzMgMTEuMTA4N0MxMy44NTU3IDExLjE1NDEgMTMuOTAxMSAxMS4xOTk1IDEzLjk0NjUgMTEuMTk5NUMxNC4wMTQ2IDExLjIyMjIgMTQuMDgyNyAxMS4xOTk1IDE0LjE3MzUgMTEuMTMxNEMxNS4xMjY5IDEwLjMxNDEgMTUuOTQ0MiA5LjI0NzE4IDE2LjQ4OSA4LjA2NjczQzE2Ljk4ODQgNi45NzcwNyAxNy4yODM1IDUuODE5MzIgMTcuMzI4OSA0LjU5MzQ2QzE3LjM1MTYgNC40NTcyNSAxNy4zNTE2IDQuMjk4MzUgMTcuMzUxNiA0LjE2MjE0WiIgZmlsbD0iIzQzNEU1QiIvPgo8L3N2Zz4K",Qet="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTMiIHZpZXdCb3g9IjAgMCAxMyAxMyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuMzkyMDkgNy40MjQ4VjExLjE5OUM1LjM5MjA5IDExLjQ4OTMgNS40ODg4NiAxMS42ODI5IDUuNjgyNDEgMTEuODc2NEM1Ljg3NTk2IDEyLjA3IDYuMDY5NTEgMTIuMTY2NyA2LjM1OTgzIDEyLjE2NjdDNi42NTAxNSAxMi4xNjY3IDYuODQzNyAxMi4wNyA3LjAzNzI1IDExLjg3NjRDNy4yMzA4IDExLjY4MjkgNy4zMjc1NyAxMS40ODkzIDcuMzI3NTcgMTEuMTk5VjkuNDU3MDZMNS4zOTIwOSA3LjQyNDhaIiBmaWxsPSIjNDM0RTVCIi8+CjxwYXRoIGQ9Ik00LjMyNzU3IDIuNDg5NDRINS4zOTIwOVYzLjY1MDczTDcuMzI3NTcgNS42ODI5OVYyLjQ4OTQ0SDExLjE5ODVDMTEuNDg4OSAyLjQ4OTQ0IDExLjY4MjQgMi4zOTI2NiAxMS44NzYgMi4xOTkxMkMxMi4wNjk1IDIuMDA1NTcgMTIuMTY2MyAxLjgxMjAyIDEyLjE2NjMgMS41MjE3QzEyLjE2NjMgMS4yMzEzNyAxMi4wNjk1IDEuMDM3ODMgMTEuODc2IDAuODQ0Mjc4QzExLjY4MjQgMC42NTA3MjkgMTEuNDg4OSAwLjU1Mzk1NSAxMS4xOTg1IDAuNTUzOTU1SDIuMzkyMDlMNC4zMjc1NyAyLjQ4OTQ0WiIgZmlsbD0iIzQzNEU1QiIvPgo8cGF0aCBkPSJNMTAuNjE4MSAxMS44NzY0QzEwLjMyNzggMTEuODc2NCAxMC4xMzQyIDExLjc3OTcgOS45NDA3IDExLjU4NjFMMC40NTY4MjcgMS44MTE5MUMwLjI2MzI3OCAxLjYxODM2IDAuMTY2NTA0IDEuMzI4MDQgMC4xNjY1MDQgMS4xMzQ0OUMwLjE2NjUwNCAwLjg0NDE2NyAwLjI2MzI3OCAwLjY1MDYxOSAwLjQ1NjgyNyAwLjQ1NzA3MUMwLjY1MDM3NSAwLjI2MzUyMiAwLjg0MzkyMyAwLjE2Njc0OCAxLjEzNDI1IDAuMTY2NzQ4QzEuNDI0NTcgMC4xNjY3NDggMS42MTgxMiAwLjI2MzUyMiAxLjgxMTY3IDAuNDU3MDcxTDExLjI5NTUgMTAuMjMxM0MxMS40ODkxIDEwLjQyNDggMTEuNTg1OSAxMC42MTg0IDExLjU4NTkgMTAuOTA4N0MxMS41ODU5IDExLjE5OSAxMS40ODkxIDExLjM5MjYgMTEuMjk1NSAxMS41ODYxQzExLjEwMiAxMS43Nzk3IDEwLjkwODQgMTEuODc2NCAxMC42MTgxIDExLjg3NjRaIiBmaWxsPSIjNDM0RTVCIi8+Cjwvc3ZnPgo=",put="",Ket={name:"LTextEditor",props:{modelValue:String},emits:["update:modelValue","useMarkUp","focus","input"],components:{EditorContent:AXe,LinkBox:iet,BubbleMenu:vXe,FloatingLink:fet},data(){return{editor:null,markUps:[{name:"bold",tooltip:"Negrito",icon:"uil-bold"},{name:"italic",tooltip:"Itálico",icon:"uil-italic"},{name:"underline",tooltip:"Sublinhado",icon:"uil-underline"},{name:"heading",tooltip:"Título",icon:Yet},{name:"bulletList",tooltip:"Lista com marcadores",icon:"uil-list-ul"},{name:"orderedList",tooltip:"Lista numerada",icon:"uil-list-ol-alt"},{name:"link",tooltip:"Inserir link",icon:"uil-link-alt"},{name:"blockquote",tooltip:"Citação",icon:Wet},{name:"removeFormatting",tooltip:"Remover formatação",icon:Qet}],showLinkBox:!1,isEditorFocused:null,tooltipDelay:125}},methods:{isUnicon(e){return e.startsWith("uil-")},markUpText(e){if(e==="link"){this.toggleLinkBox();return}this.editor.chain().focus().setMarkUp(e).run()},toggleLinkBox(){this.showLinkBox=!this.showLinkBox},closeLinkBox(){this.editor.commands.focus(),this.toggleLinkBox()},markUpLink(e){this.currentTextSelection||this.previousURL?this.editor.chain().focus().extendMarkRange("link").setLink({href:e.url,target:"_blank"}).run():this.editor.commands.insertContent(zk.link(e.insertedText))},markOffLink(){this.editor.chain().focus().extendMarkRange("link").unsetLink().run()},hasSomeMarkUpActive(){const e=this.editor.getJSON().content,n=this.markUps.map(l=>l.name),r=e.map(l=>l.type).some(l=>n.includes(l)),a=e.some(l=>{if(l.hasOwnProperty("content"))return l.content.some(i=>i.hasOwnProperty("marks"))});return r||a},addSpaceToFinalParagraphTag(e){return e.replace(/<\/p>/g," </p>")}},computed:{previousURL(){return this.editor.getAttributes("link").href},showFloatingLink(){return this.editor.isActive("link")},finalText(){const e=this.editor.getHTML(),n=this.addSpaceToFinalParagraphTag(e),o=zk.link(n);return Uet.sanitize(het(o),{ADD_ATTR:["target"]})},currentTextSelection(){const{view:e,state:n}=this.editor,{from:o,to:r}=e.state.selection;return n.doc.textBetween(o,r,"")},arrowXPosition(){const n=this.$refs.link[0].$el;return{left:`${n.offsetLeft+(n.offsetWidth-16.8)/2}px`}},linkBoxPosition(){const n=this.$refs.texteditor.$el.offsetWidth,o=this.$refs.link[0].$el;let r;return n>500?r=`${o.offsetLeft+o.offsetWidth/2-456/2}px`:r="1rem",{left:r}}},beforeMount(){this.editor=new IXe({extensions:[OXe,zXe,BXe,$Xe,HXe,KXe,GXe,XXe,JXe,tZe,oZe,TZe,SZe,DZe,jZe],content:this.modelValue,autofocus:!1,onUpdate:()=>{this.$emit("input",this.finalText),this.$emit("useMarkUp",this.hasSomeMarkUpActive()),this.$emit("update:modelValue",this.finalText)},onFocus:()=>{this.isEditorFocused=!0,this.$emit("focus",!0)},onBlur:()=>{this.isEditorFocused=!1}})},beforeUnmount(){this.editor.destroy()}},qet={class:"wrapper-text-editor"},Get={class:"wrapper-editor-features"},Xet={class:"wrapper-scroll"},Zet={class:"wrapper-buttons py-2 pl-3 pr-4 l-d-flex row l-d-justify-content-start l-d-align-item-center"},Jet=["alt","src"];function ett(e,n,o,r,a,l){const i=t.resolveComponent("FloatingLink"),s=t.resolveComponent("BubbleMenu"),c=t.resolveComponent("EditorContent"),d=t.resolveComponent("l-icon"),u=t.resolveComponent("l-button"),f=t.resolveComponent("l-tooltip"),p=t.resolveComponent("LinkBox");return t.openBlock(),t.createElementBlock("section",qet,[l.showFloatingLink?(t.openBlock(),t.createBlock(s,{key:0,editor:a.editor,tippyOptions:{zIndex:1e3},shouldShow:({editor:m})=>m.isActive("link")},{default:t.withCtx(()=>[t.createVNode(i,{"data-link":a.editor.getAttributes("link").href,onEdit:n[0]||(n[0]=m=>l.toggleLinkBox()),onRemove:n[1]||(n[1]=m=>l.markOffLink())},null,8,["data-link"])]),_:1},8,["editor","shouldShow"])):t.createCommentVNode("",!0),t.createVNode(c,{editor:a.editor,ref:"texteditor"},null,8,["editor"]),t.createElementVNode("div",Get,[t.createElementVNode("div",Xet,[t.createElementVNode("div",Zet,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.markUps,m=>(t.openBlock(),t.createBlock(f,{key:m.name,content:m.tooltip,class:"item","open-delay":a.tooltipDelay},{default:t.withCtx(()=>[t.createVNode(u,{onClick:g=>l.markUpText(m.name),class:t.normalizeClass(["button-text-editor",{"is-active":a.editor.isActive(m.name)}]),size:"small",square:"",ref_for:!0,ref:m.name},{default:t.withCtx(()=>[l.isUnicon(m.icon)?(t.openBlock(),t.createBlock(d,{key:0,size:"24",icon:m.icon},null,8,["icon"])):(t.openBlock(),t.createElementBlock("img",{key:1,alt:m.name,src:m.icon,class:t.normalizeClass({"icon-active":a.editor.isActive(m.name)})},null,10,Jet))]),_:2},1032,["onClick","class"])]),_:2},1032,["content","open-delay"]))),128))])]),a.showLinkBox?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("span",{class:"link-box-arrow",style:t.normalizeStyle([l.arrowXPosition])},null,4),t.createVNode(p,{class:"link-box-position",onClose:n[2]||(n[2]=m=>l.closeLinkBox()),onSetLink:n[3]||(n[3]=m=>l.markUpLink(m)),previousURL:l.previousURL,style:t.normalizeStyle([l.linkBoxPosition])},null,8,["previousURL","style"])],64)):t.createCommentVNode("",!0)])])}const ttt=Object.freeze(Object.defineProperty({__proto__:null,default:lt(Ket,[["render",ett],["__scopeId","data-v-73b63582"]])},Symbol.toStringTag,{value:"Module"})),mut="",ntt={name:"LTimeSelect",components:{ElTimeSelect:Cw},props:{prefixIcon:{type:String,default:"el-icon-clock"},clearIcon:{type:String,default:"el-icon-multiply"},hideIcon:{type:Boolean,default:!1},placeholder:{type:String,default:"Horário"},clearable:{type:Boolean,default:!1}}};function ott(e,n,o,r,a,l){const i=t.resolveComponent("el-time-select");return t.openBlock(),t.createBlock(i,t.mergeProps({"prefix-icon":o.prefixIcon,"clear-icon":o.clearIcon,placeholder:o.placeholder,clearable:o.clearable},e.$attrs,{ref:"timeSelect",class:["l-time-select",{"hide-icon":o.hideIcon}]}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},16,["prefix-icon","clear-icon","placeholder","clearable","class"])}const rtt=Object.freeze(Object.defineProperty({__proto__:null,default:lt(ntt,[["render",ott],["__scopeId","data-v-61335252"]])},Symbol.toStringTag,{value:"Module"})),yut="",att={name:"LToggleButtonGroup",props:{options:Array,modelValue:String,disabled:{type:Boolean,default:!1}},computed:{value:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}}},methods:{optionType(e){return this.disabled?"default":e.value===this.value?"primary":"default"},selectOption(e){this.value=e.value}}};function ltt(e,n,o,r,a,l){const i=t.resolveComponent("l-button"),s=t.resolveComponent("l-tooltip"),c=t.resolveComponent("l-button-group");return t.openBlock(),t.createBlock(c,{class:"l-toggle-button-group"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.options,d=>(t.openBlock(),t.createBlock(s,{effect:"dark",content:d.title,placement:"bottom",key:d.value},{default:t.withCtx(()=>[t.createVNode(i,{disabled:o.disabled,type:l.optionType(d),icon:d.icon,size:"small",plain:"",onClick:u=>l.selectOption(d)},null,8,["disabled","type","icon","onClick"])]),_:2},1032,["content"]))),128))]),_:1})}const itt=Object.freeze(Object.defineProperty({__proto__:null,default:lt(att,[["render",ltt]])},Symbol.toStringTag,{value:"Module"})),Mut="",stt={components:{ElTooltip:eo},props:{tooltipClass:{type:String,default:"l-tooltip-popper"}}};function ctt(e,n,o,r,a,l){const i=t.resolveComponent("ElTooltip");return t.openBlock(),t.createBlock(i,t.mergeProps(e.$attrs,{"popper-class":o.tooltipClass}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["popper-class"])}const dtt=Object.freeze(Object.defineProperty({__proto__:null,default:lt(stt,[["render",ctt]])},Symbol.toStringTag,{value:"Module"})),Cut="",utt={name:"LTransitionExpand",methods:{enter(e){const n=getComputedStyle(e).width;e.style.width=n,e.style.position="absolute",e.style.visibility="hidden",e.style.height="auto";const o=getComputedStyle(e).height;e.style.width=null,e.style.position=null,e.style.visibility=null,e.style.height=0,getComputedStyle(e).height,requestAnimationFrame(()=>{e.style.height=o})},afterEnter(e){e.style.height="auto"},leave(e){const n=getComputedStyle(e).height;e.style.height=n,getComputedStyle(e).height,requestAnimationFrame(()=>{e.style.height=0})}}};function ftt(e,n,o,r,a,l){return t.openBlock(),t.createBlock(t.Transition,{class:"l-transition-expand",name:"expand",onEnter:l.enter,onAfterEnter:l.afterEnter,onLeave:l.leave},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["onEnter","onAfterEnter","onLeave"])}const SR=Object.assign({"../components/LAlert/index.vue":Awe,"../components/LAttachmentChip/index.vue":Hwe,"../components/LBox/index.vue":Wwe,"../components/LBoxHeader/index.vue":qwe,"../components/LButton/index.vue":Jwe,"../components/LCarousel/index.vue":lCe,"../components/LCheckbox/index.vue":cCe,"../components/LCheckboxButton/index.vue":fCe,"../components/LCheckboxGroup/index.vue":mCe,"../components/LChip/index.vue":wCe,"../components/LCircularLoader/index.vue":NCe,"../components/LCollapseItem/index.vue":xCe,"../components/LDatePicker/index.vue":DCe,"../components/LDialog/index.vue":ACe,"../components/LFailedToLoad/index.vue":$Ce,"../components/LHelperBox/index.vue":UCe,"../components/LIcon/index.vue":MU,"../components/LImageViewer/index.vue":t_e,"../components/LInput/index.vue":l_e,"../components/LLinearProgress/index.vue":c_e,"../components/LNotice/index.vue":h_e,"../components/LNotification/index.vue":TU,"../components/LPresentation/index.vue":__e,"../components/LPromptDialog/index.vue":S_e,"../components/LRadio/index.vue":I_e,"../components/LRadioButton/index.vue":z_e,"../components/LRadioGroup/index.vue":V_e,"../components/LRating/index.vue":P_e,"../components/LSearchBar/index.vue":nve,"../components/LSearchTopics/index.vue":BFe,"../components/LSwitch/index.vue":$Fe,"../components/LTable/index.vue":UUe,"../components/LTabs/index.vue":QUe,"../components/LTargetChip/index.vue":XUe,"../components/LTargetInput/index.vue":eYe,"../components/LTextEditor/index.vue":ttt,"../components/LTimeSelect/index.vue":rtt,"../components/LToggleButtonGroup/index.vue":itt,"../components/LTooltip/index.vue":dtt,"../components/LTransitionExpand/index.vue":Object.freeze(Object.defineProperty({__proto__:null,default:lt(utt,[["render",ftt],["__scopeId","data-v-00bad3ad"]])},Symbol.toStringTag,{value:"Module"})),"../components/LUpload/index.vue":Object.freeze(Object.defineProperty({__proto__:null,default:{tagName:"l-upload",extends:Rw}},Symbol.toStringTag,{value:"Module"}))}),ptt=(e,n="index")=>{const o=e.split("/"),r=o.pop().replace(".vue","");return r===n?o.pop():r},htt={install(e){Object.keys(SR).forEach(n=>{const o=ptt(n);e.component(o,SR[n].default)})}},xut="";if(typeof Xh>"u")var Xh=window;var mtt=Object.create,Uk=Object.defineProperty,gtt=Object.getPrototypeOf,ytt=Object.prototype.hasOwnProperty,btt=Object.getOwnPropertyNames,Mtt=Object.getOwnPropertyDescriptor,wtt=e=>Uk(e,"__esModule",{value:!0}),Na=(e,n)=>()=>(n||(n={exports:{}},e(n.exports,n)),n.exports),Ctt=(e,n,o)=>{if(wtt(e),n&&typeof n=="object"||typeof n=="function")for(let r of btt(n))!ytt.call(e,r)&&r!=="default"&&Uk(e,r,{get:()=>n[r],enumerable:!(o=Mtt(n,r))||o.enumerable});return e},_tt=e=>e&&e.__esModule?e:Ctt(Uk(e!=null?mtt(gtt(e)):{},"default",{value:e,enumerable:!0}),e),DR=Na((e,n)=>{function o(r){var a=typeof r;return r!=null&&(a=="object"||a=="function")}n.exports=o}),Ntt=Na((e,n)=>{var o=typeof Xh=="object"&&Xh&&Xh.Object===Object&&Xh;n.exports=o}),vR=Na((e,n)=>{var o=Ntt(),r=typeof self=="object"&&self&&self.Object===Object&&self,a=o||r||Function("return this")();n.exports=a}),ktt=Na((e,n)=>{var o=vR(),r=function(){return o.Date.now()};n.exports=r}),IR=Na((e,n)=>{var o=vR(),r=o.Symbol;n.exports=r}),Ett=Na((e,n)=>{var o=IR(),r=Object.prototype,a=r.hasOwnProperty,l=r.toString,i=o?o.toStringTag:void 0;function s(c){var d=a.call(c,i),u=c[i];try{c[i]=void 0;var f=!0}catch{}var p=l.call(c);return f&&(d?c[i]=u:delete c[i]),p}n.exports=s}),xtt=Na((e,n)=>{var o=Object.prototype,r=o.toString;function a(l){return r.call(l)}n.exports=a}),Ttt=Na((e,n)=>{var o=IR(),r=Ett(),a=xtt(),l="[object Null]",i="[object Undefined]",s=o?o.toStringTag:void 0;function c(d){return d==null?d===void 0?i:l:s&&s in Object(d)?r(d):a(d)}n.exports=c}),Stt=Na((e,n)=>{function o(r){return r!=null&&typeof r=="object"}n.exports=o}),Dtt=Na((e,n)=>{var o=Ttt(),r=Stt(),a="[object Symbol]";function l(i){return typeof i=="symbol"||r(i)&&o(i)==a}n.exports=l}),vtt=Na((e,n)=>{var o=DR(),r=Dtt(),a=0/0,l=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;function u(f){if(typeof f=="number")return f;if(r(f))return a;if(o(f)){var p=typeof f.valueOf=="function"?f.valueOf():f;f=o(p)?p+"":p}if(typeof f!="string")return f===0?f:+f;f=f.replace(l,"");var m=s.test(f);return m||c.test(f)?d(f.slice(2),m?2:8):i.test(f)?a:+f}n.exports=u}),Itt=Na((e,n)=>{var o=DR(),r=ktt(),a=vtt(),l="Expected a function",i=Math.max,s=Math.min;function c(d,u,f){var p,m,g,y,b,w,N=0,_=!1,C=!1,k=!0;if(typeof d!="function")throw new TypeError(l);u=a(u)||0,o(f)&&(_=!!f.leading,C="maxWait"in f,g=C?i(a(f.maxWait)||0,u):g,k="trailing"in f?!!f.trailing:k);function E(L){var A=p,P=m;return p=m=void 0,N=L,y=d.apply(P,A),y}function T(L){return N=L,b=setTimeout(v,u),_?E(L):y}function S(L){var A=L-w,P=L-N,j=u-A;return C?s(j,g-P):j}function D(L){var A=L-w,P=L-N;return w===void 0||A>=u||A<0||C&&P>=g}function v(){var L=r();if(D(L))return I(L);b=setTimeout(v,S(L))}function I(L){return b=void 0,k&&p?E(L):(p=m=void 0,y)}function B(){b!==void 0&&clearTimeout(b),N=0,p=w=m=b=void 0}function $(){return b===void 0?y:I(r())}function F(){var L=r(),A=D(L);if(p=arguments,m=this,w=L,A){if(b===void 0)return T(w);if(C)return clearTimeout(b),b=setTimeout(v,u),E(w)}return b===void 0&&(b=setTimeout(v,u)),y}return F.cancel=B,F.flush=$,F}n.exports=c}),Att=_tt(Itt()),Ott=Att.default;function ztt(){let e=[],n=[];function o(N,_){N.forEach(C=>{C.call(null,_)})}this.onSingleTap=function(N){typeof N=="function"&&!e.includes(N)&&e.push(N)},this.onDoubleTap=function(N){typeof N=="function"&&!n.includes(N)&&n.push(N)},this.attach=function(N){if(!(N instanceof Element)){console.error("TapDetector.attach: arg must be an Element");return}N.addEventListener("touchstart",d),N.addEventListener("touchmove",f),N.addEventListener("touchend",u),N.addEventListener("mousedown",p),N.addEventListener("mouseup",m),N.addEventListener("mousemove",g)},this.detach=function(N){N.removeEventListener("touchstart",d),N.removeEventListener("touchmove",f),N.removeEventListener("touchend",u),N.removeEventListener("mousedown",p),N.removeEventListener("mouseup",m),N.removeEventListener("mousemove",g)};let r=!1,a=0,l=0,i=0,s=0,c=0;function d(N){r=!0,N.touches.length===1&&y(N.touches[0].clientX,N.touches[0].clientY)}function u(N){N.touches.length===0&&b()}function f(N){N.touches.length===1&&w(N.touches[0].clientX,N.touches[0].clientY)}function p(N){r||y(N.clientX,N.clientY)}function m(N){r||b()}function g(N){r||N.button===0&&w(N.clientX,N.clientY)}function y(N,_){s=N,c=_,i=0}function b(){let N=Date.now();i<10&&(N-a<300?l+=1:l=1,a=Date.now(),o(e,{clientX:s,clientY:c}),l===2&&(o(n,{clientX:s,clientY:c}),l=0)),i=0}function w(N,_){let C=s-N,k=c-_,E=Math.sqrt(C*C+k*k);i+=E,s=N,c=_}}var Btt={props:{minScale:{type:Number,default:1},maxScale:{type:Number,default:5},zoomed:{type:Boolean,default:!1},resetTrigger:{type:Number,default:1e5},aspectRatio:{type:Number,default:1},backgroundColor:{type:String,default:"transparent"},pivot:{type:String,default:"cursor"},zoomingElastic:{type:Boolean,default:!0},limitTranslation:{type:Boolean,default:!0},doubleClickToZoom:{type:Boolean,default:!0},mouseWheelToZoom:{type:Boolean,default:!0}},data(){return{containerWidth:1,containerHeight:1,containerLeft:0,containerTop:0,translateX:0,animTranslateX:0,translateY:0,animTranslateY:0,scale:1,animScale:1,lastFullWheelTime:0,lastWheelTime:0,lastWheelDirection:"y",isPointerDown:!1,pointerPosX:-1,pointerPosY:-1,twoFingerInitDist:0,panLocked:!0,raf:null,tapDetector:null}},computed:{wrapperStyle(){let e=this.containerWidth*this.animTranslateX,n=this.containerHeight*this.animTranslateY;return{transform:[`translate(${e}px, ${n}px)`,`scale(${this.animScale})`].join(" ")}}},watch:{scale(e){e!==1&&(this.$emit("update:zoomed",!0),this.panLocked=!1)},resetTrigger:"reset"},mounted(){this.tapDetector=new ztt,this.tapDetector.attach(this.$el),this.doubleClickToZoom&&this.tapDetector.onDoubleTap(this.onDoubleTap),window.addEventListener("resize",this.onWindowResize),this.onWindowResize(),this.refreshContainerPos(),this.loop()},destroyed(){this.tapDetector.detach(this.$el),window.removeEventListener("resize",this.onWindowResize),window.cancelAnimationFrame(this.raf)},methods:{reset(){this.scale=1,this.panLocked=!0,this.translateX=0,this.translateY=0},zoomIn(e=2){this.tryToScale(e),this.onInteractionEnd()},zoomOut(e=.5){this.tryToScale(e),this.onInteractionEnd()},tryToScale(e){let n=this.scale*e;if(this.zoomingElastic){if(n<this.minScale||n>this.maxScale){let o=Math.log2(e);o*=.2,e=Math.pow(2,o),n=this.scale*e}}else n<this.minScale?n=this.minScale:n>this.maxScale&&(n=this.maxScale);if(e=n/this.scale,this.scale=n,this.pivot!=="image-center"){let o=(this.pointerPosX-this.containerLeft)/this.containerWidth,r=(this.pointerPosY-this.containerTop)/this.containerHeight;this.translateX=(.5+this.translateX-o)*e+o-.5,this.translateY=(.5+this.translateY-r)*e+r-.5}},setPointerPosCenter(){this.pointerPosX=this.containerLeft+this.containerWidth/2,this.pointerPosY=this.containerTop+this.containerHeight/2},onPointerMove(e,n){if(this.isPointerDown){let o=e-this.pointerPosX,r=n-this.pointerPosY;this.panLocked||(this.translateX+=o/this.containerWidth,this.translateY+=r/this.containerHeight)}this.pointerPosX=e,this.pointerPosY=n},onInteractionEnd:Ott(function(){this.limit(),this.panLocked=this.scale===1,this.$emit("update:zoomed",!this.panLocked)},100),limit(){if(this.scale<this.minScale?this.scale=this.minScale:this.scale>this.maxScale&&this.tryToScale(this.maxScale/this.scale),this.limitTranslation){let e=this.calcTranslateLimit();Math.abs(this.translateX)>e.x&&(this.translateX*=e.x/Math.abs(this.translateX)),Math.abs(this.translateY)>e.y&&(this.translateY*=e.y/Math.abs(this.translateY))}},calcTranslateLimit(){if(this.getMarginDirection()==="y"){let e=this.containerWidth/this.aspectRatio/this.containerHeight,n=(this.scale*e-1)/2;return n<0&&(n=0),{x:(this.scale-1)/2,y:n}}else{let e=this.containerHeight*this.aspectRatio/this.containerWidth,n=(this.scale*e-1)/2;return n<0&&(n=0),{x:n,y:(this.scale-1)/2}}},getMarginDirection(){return this.containerWidth/this.containerHeight>this.aspectRatio?"x":"y"},onDoubleTap(e){this.scale===1?(e.clientX>0&&(this.pointerPosX=e.clientX,this.pointerPosY=e.clientY),this.tryToScale(Math.min(3,this.maxScale))):this.reset(),this.onInteractionEnd()},onWindowResize(){let e=window.getComputedStyle(this.$el);this.containerWidth=parseFloat(e.width),this.containerHeight=parseFloat(e.height),this.setPointerPosCenter(),this.limit()},refreshContainerPos(){let e=this.$el.getBoundingClientRect();this.containerLeft=e.left,this.containerTop=e.top},loop(){this.animScale=this.gainOn(this.animScale,this.scale),this.animTranslateX=this.gainOn(this.animTranslateX,this.translateX),this.animTranslateY=this.gainOn(this.animTranslateY,this.translateY),this.raf=window.requestAnimationFrame(this.loop)},gainOn(e,n){let o=(n-e)*.3;return Math.abs(o)>1e-5?e+o:n},onMouseWheel(e){if(!this.mouseWheelToZoom)return;e.preventDefault(),e.detail&&(e.wheelDelta=e.detail*-10);let n=Date.now();Math.abs(e.wheelDelta)===120?n-this.lastFullWheelTime>50&&(this.onMouseWheelDo(e.wheelDelta),this.lastFullWheelTime=n):(n-this.lastWheelTime>50&&typeof e.deltaX=="number"&&(this.lastWheelDirection=e.detail==0&&Math.abs(e.deltaX)>Math.abs(e.deltaY)?"x":"y",this.lastWheelDirection==="x"&&this.$emit("swipe",e.deltaX>0?"left":"right")),this.lastWheelDirection==="y"&&this.onMouseWheelDo(e.wheelDelta)),this.lastWheelTime=n},onMouseWheelDo(e){let n=Math.pow(1.25,e/120);this.tryToScale(n),this.onInteractionEnd()},onMouseDown(e){this.refreshContainerPos(),this.isPointerDown=!0,this.pointerPosX=e.clientX,this.pointerPosY=e.clientY},onMouseUp(e){this.isPointerDown=!1,this.onInteractionEnd()},onMouseMove(e){this.onPointerMove(e.clientX,e.clientY)},onTouchStart(e){if(e.touches.length===1)this.refreshContainerPos(),this.pointerPosX=e.touches[0].clientX,this.pointerPosY=e.touches[0].clientY,this.isPointerDown=!0;else if(e.touches.length===2){this.isPointerDown=!0,this.pointerPosX=(e.touches[0].clientX+e.touches[1].clientX)/2,this.pointerPosY=(e.touches[0].clientY+e.touches[1].clientY)/2;let n=e.touches[0].clientX-e.touches[1].clientX,o=e.touches[0].clientY-e.touches[1].clientY;this.twoFingerInitDist=Math.sqrt(n*n+o*o)}},onTouchEnd(e){e.touches.length===0?(this.isPointerDown=!1,Math.abs(this.scale-1)<.1&&(this.scale=1),this.onInteractionEnd()):e.touches.length===1&&(this.pointerPosX=e.touches[0].clientX,this.pointerPosY=e.touches[0].clientY)},onTouchMove(e){if(e.touches.length===1)this.onPointerMove(e.touches[0].clientX,e.touches[0].clientY);else if(e.touches.length===2){let n=(e.touches[0].clientX+e.touches[1].clientX)/2,o=(e.touches[0].clientY+e.touches[1].clientY)/2;this.onPointerMove(n,o),this.pointerPosX=n,this.pointerPosY=o;let r=e.touches[0].clientX-e.touches[1].clientX,a=e.touches[0].clientY-e.touches[1].clientY,l=Math.sqrt(r*r+a*a);this.tryToScale(l/this.twoFingerInitDist),this.twoFingerInitDist=l}}}};function AR(e,n,o,r,a,l,i,s,c,d){typeof i!="boolean"&&(c=s,s=i,i=!1);const u=typeof o=="function"?o.options:o;e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,a&&(u.functional=!0)),r&&(u._scopeId=r);let f;if(l?(f=function(p){p=p||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!p&&typeof __VUE_SSR_CONTEXT__<"u"&&(p=__VUE_SSR_CONTEXT__),n&&n.call(this,c(p)),p&&p._registeredComponents&&p._registeredComponents.add(l)},u._ssrRegister=f):n&&(f=i?function(p){n.call(this,d(p,this.$root.$options.shadowRoot))}:function(p){n.call(this,s(p))}),f)if(u.functional){const p=u.render;u.render=function(g,y){return f.call(y),p(g,y)}}else{const p=u.beforeCreate;u.beforeCreate=p?[].concat(p,f):[f]}return o}const Ltt=typeof navigator<"u"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function OR(e){return(n,o)=>Vtt(n,o)}let Yk;const zR={};function Vtt(e,n){const o=Ltt?n.media||"default":e,r=zR[o]||(zR[o]={ids:new Set,styles:[]});if(!r.ids.has(e)){r.ids.add(e);let a=n.source;if(n.map&&(a+=`
|
|
233
233
|
/*# sourceURL=`+n.map.sources[0]+" */",a+=`
|
|
234
234
|
/*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(n.map))))+" */"),r.element||(r.element=document.createElement("style"),r.element.type="text/css",n.media&&r.element.setAttribute("media",n.media),Yk===void 0&&(Yk=document.head||document.getElementsByTagName("head")[0]),Yk.appendChild(r.element)),"styleSheet"in r.element)r.styles.push(a),r.element.styleSheet.cssText=r.styles.filter(Boolean).join(`
|
|
235
235
|
`);else{const l=r.ids.size-1,i=document.createTextNode(a),s=r.element.childNodes;s[l]&&r.element.removeChild(s[l]),s.length?r.element.insertBefore(i,s[l]):r.element.appendChild(i)}}}const $tt=Btt;var BR=function(){var e=this,n=e.$createElement,o=e._self._c||n;return o("div",{staticClass:"vue-zoomer",style:{backgroundColor:e.backgroundColor},on:{mousewheel:e.onMouseWheel,DOMMouseScroll:e.onMouseWheel,mousedown:e.onMouseDown,mouseup:e.onMouseUp,mousemove:e.onMouseMove,mouseout:e.setPointerPosCenter,touchstart:e.onTouchStart,touchend:e.onTouchEnd,touchmove:e.onTouchMove}},[o("div",{staticClass:"zoomer",style:e.wrapperStyle},[e._t("default")],2)])},jtt=[];BR._withStripped=!0;const LR=AR({render:BR,staticRenderFns:jtt},function(e){e&&e("data-v-e532c06e_0",{source:`
|