1(function(){function hn(pn,pt,Et){function We(fe,D){if(!pt[fe]){if(!pn[fe]){var ie=typeof require=="function"&&require;if(!D&&ie)return ie(fe,!0);if(ke)return ke(fe,!0);var ce=new Error("Cannot find module '"+fe+"'");throw ce.code="MODULE_NOT_FOUND",ce}var ae=pt[fe]={exports:{}};pn[fe][0].call(ae.exports,function(se){var oe=pn[fe][1][se];return We(oe||se)},ae,ae.exports,hn,pn,pt,Et)}return pt[fe].exports}for(var ke=typeof require=="function"&&require,S=0;S<Et.length;S++)We(Et[S]);return We}return hn})()({1:[function(hn,pn,pt){var Et=hn("cssfilter").FilterCSS,We=hn("cssfilter").getDefaultWhiteList,ke=hn("./util");function S(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var fe=new Et;function D(M,s,l){}function ie(M,s,l){}function ce(M,s,l){}function ae(M,s,l){}function se(M){return M.replace(W,"<").replace(I,">")}function oe(M,s,l,f){if(l=O(l),s==="href"||s==="src"){if(l=ke.trim(l),l==="#")return"#";if(!(l.substr(0,7)==="http://"||l.substr(0,8)==="https://"||l.substr(0,7)==="mailto:"||l.substr(0,4)==="tel:"||l.substr(0,11)==="data:image/"||l.substr(0,6)==="ftp://"||l.substr(0,2)==="./"||l.substr(0,3)==="../"||l[0]==="#"||l[0]==="/"))return""}else if(s==="background"){if(re.lastIndex=0,re.test(l))return""}else if(s==="style"){if(z.lastIndex=0,z.test(l)||(F.lastIndex=0,F.test(l)&&(re.lastIndex=0,re.test(l))))return"";f!==!1&&(f=f||fe,l=f.process(l))}return l=j(l),l}var W=/</g,I=/>/g,g=/"/g,P=/"/g,x=/&#([a-zA-Z0-9]*);?/gim,A=/:?/gim,$=/&newline;?/gim,re=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,z=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,F=/u\s*r\s*l\s*\(.*/gi;function G(M){return M.replace(g,""")}function H(M){return M.replace(P,'"')}function ne(M){return M.replace(x,function(l,f){return f[0]==="x"||f[0]==="X"?String.fromCharCode(parseInt(f.substr(1),16)):String.fromCharCode(parseInt(f,10))})}function ye(M){return M.replace(A,":").replace($," ")}function ee(M){for(var s="",l=0,f=M.length;l<f;l++)s+=M.charCodeAt(l)<32?" ":M.charAt(l);return ke.trim(s)}function O(M){return M=H(M),M=ne(M),M=ye(M),M=ee(M),M}function j(M){return M=G(M),M=se(M),M}function E(){return""}function B(M,s){typeof s!="function"&&(s=function(){});var l=!Array.isArray(M);function f(J){return l?!0:ke.indexOf(M,J)!==-1}var w=[],te=!1;return{onIgnoreTag:function(J,R,k){if(f(J))if(k.isClosing){var v="[/removed]",b=k.position+v.length;return w.push([te!==!1?te:k.position,b]),te=!1,v}else return te||(te=k.position),"[removed]";else return s(J,R,k)},remove:function(J){var R="",k=0;return ke.forEach(w,function(v){R+=J.slice(k,v[0]),k=v[1]}),R+=J.slice(k),R}}}function X(M){for(var s="",l=0;l<M.length;){var f=M.indexOf("<!--",l);if(f===-1){s+=M.slice(l);break}s+=M.slice(l,f);var w=M.indexOf("-->",f);if(w===-1)break;l=w+3}return s}function _(M){var s=M.split("");return s=s.filter(function(l){var f=l.charCodeAt(0);return f===127?!1:f<=31?f===10||f===13:!0}),s.join("")}pt.whiteList=S(),pt.getDefaultWhiteList=S,pt.onTag=D,pt.onIgnoreTag=ie,pt.onTagAttr=ce,pt.onIgnoreTagAttr=ae,pt.safeAttrValue=oe,pt.escapeHtml=se,pt.escapeQuote=G,pt.unescapeQuote=H,pt.escapeHtmlEntities=ne,pt.escapeDangerHtml5Entities=ye,pt.clearNonPrintableCharacter=ee,pt.friendlyAttrValue=O,pt.escapeAttrValue=j,pt.onIgnoreTagStripAll=E,pt.StripTagBody=B,pt.stripCommentTag=X,pt.stripBlankChar=_,pt.attributeWrapSign='"',pt.cssFilter=fe,pt.getDefaultCSSWhiteList=We},{"./util":4,cssfilter:8}],2:[function(hn,pn,pt){var Et=hn("./default"),We=hn("./parser"),ke=hn("./xss");function S(D,ie){var ce=new ke(ie);return ce.process(D)}pt=pn.exports=S,pt.filterXSS=S,pt.FilterXSS=ke,(function(){for(var D in Et)pt[D]=Et[D];for(var ie in We)pt[ie]=We[ie]}
vendor: 5,982 bytes, line 1
1)(),typeof window<"u"&&(window.filterXSS=pn.exports);function fe(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}fe()&&(self.filterXSS=pn.exports)},{"./default":1,"./parser":3,"./xss":5}],3:[function(hn,pn,pt){var Et=hn("./util");function We(W){var I=Et.spaceIndex(W),g;return I===-1?g=W.slice(1,-1):g=W.slice(1,I+1),g=Et.trim(g).toLowerCase(),g.slice(0,1)==="/"&&(g=g.slice(1)),g.slice(-1)==="/"&&(g=g.slice(0,-1)),g}function ke(W){return W.slice(0,2)==="</"}function S(W,I,g){"use strict";var P="",x=0,A=!1,$=!1,re=0,z=W.length,F="",G="";e:for(re=0;re<z;re++){var H=W.charAt(re);if(A===!1){if(H==="<"){A=re;continue}}else if($===!1){if(H==="<"){P+=g(W.slice(x,re)),A=re,x=re;continue}if(H===">"||re===z-1){P+=g(W.slice(x,A)),G=W.slice(A,re+1),F=We(G),P+=I(A,P.length,F,G,ke(G)),x=re+1,A=!1;continue}if(H==='"'||H==="'")for(var ne=1,ye=W.charAt(re-ne);ye.trim()===""||ye==="=";){if(ye==="="){$=H;continue e}ye=W.charAt(re-++ne)}}else if(H===$){$=!1;continue}}return x<z&&(P+=g(W.substr(x))),P}var fe=/[^a-zA-Z0-9\\_:.-]/gim;function D(W,I){"use strict";var g=0,P=0,x=[],A=!1,$=W.length;function re(ne,ye){if(ne=Et.trim(ne),ne=ne.replace(fe,"").toLowerCase(),!(ne.length<1)){var ee=I(ne,ye||"");ee&&x.push(ee)}}for(var z=0;z<$;z++){var F=W.charAt(z),G,H;if(A===!1&&F==="="){A=W.slice(g,z),g=z+1,P=W.charAt(g)==='"'||W.charAt(g)==="'"?g:ce(W,z+1);continue}if(A!==!1&&z===P){if(H=W.indexOf(F,z+1),H===-1)break;G=Et.trim(W.slice(P+1,H)),re(A,G),A=!1,z=H,g=z+1;continue}if(/\s|\n|\t/.test(F))if(W=W.replace(/\s|\n|\t/g," "),A===!1)if(H=ie(W,z),H===-1){G=Et.trim(W.slice(g,z)),re(G),A=!1,g=z+1;continue}else{z=H-1;continue}else if(H=ae(W,z-1),H===-1){G=Et.trim(W.slice(g,z)),G=oe(G),re(A,G),A=!1,g=z+1;continue}else continue}return g<W.length&&(A===!1?re(W.slice(g)):re(A,oe(Et.trim(W.slice(g))))),Et.trim(x.join(" "))}function ie(W,I){for(;I<W.length;I++){var g=W[I];if(g!==" ")return g==="="?I:-1}}function ce(W,I){for(;I<W.length;I++){var g=W[I];if(g!==" ")return g==="'"||g==='"'?I:-1}}function ae(W,I){for(;I>0;I--){var g=W[I];if(g!==" ")return g==="="?I:-1}}function se(W){return W[0]==='"'&&W[W.length-1]==='"'||W[0]==="'"&&W[W.length-1]==="'"}function oe(W){return se(W)?W.substr(1,W.length-2):W}pt.parseTag=S,pt.parseAttr=D},{"./util":4}],4:[function(hn,pn,pt){pn.exports={indexOf:function(Et,We){var ke,S;if(Array.prototype.indexOf)return Et.indexOf(We);for(ke=0,S=Et.length;ke<S;ke++)if(Et[ke]===We)return ke;return-1},forEach:function(Et,We,ke){var S,fe;if(Array.prototype.forEach)return Et.forEach(We,ke);for(S=0,fe=Et.length;S<fe;S++)We.call(ke,Et[S],S,Et)},trim:function(Et){return String.prototype.trim?Et.trim():Et.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(Et){var We=/\s|\n|\t/,ke=We.exec(Et);return ke?ke.index:-1}}},{}],5:[function(hn,pn,pt){var Et=hn("cssfilter").FilterCSS,We=hn("./default"),ke=hn("./parser"),S=ke.parseTag,fe=ke.parseAttr,D=hn("./util");function ie(W){return W==null}function ce(W){var I=D.spaceIndex(W);if(I===-1)return{html:"",closing:W[W.length-2]==="/"};W=D.trim(W.slice(I+1,-1));var g=W[W.length-1]==="/";return g&&(W=D.trim(W.slice(0,-1))),{html:W,closing:g}}function ae(W){var I={};for(var g in W)I[g]=W[g];return I}function se(W){var I={};for(var g in W)Array.isArray(W[g])?I[g.toLowerCase()]=W[g].map(function(P){return P.toLowerCase()}):I[g.toLowerCase()]=W[g];return I}function oe(W){W=ae(W||{}),W.stripIgnoreTag&&(W.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),W.onIgnoreTag=We.onIgnoreTagStripAll),W.whiteList||W.allowList?W.whiteList=se(W.whiteList||W.allowList):W.whiteList=We.whiteList,this.attributeWrapSign=W.singleQuotedAttributeValue===!0?"'":We.attributeWrapSign,W.onTag=W.onTag||We.onTag,W.onTagAttr=W.onTagAttr||We.onTagAttr,W.onIgnoreTag=W.onIgnoreTag||We.onIgnoreTag,W.onIgnoreTagAttr=W.onIgnoreTagAttr||We.onIgnoreTagAttr,W.safeAttrValue=W.safeAttrValue||We.safeAttrValue,W.escapeHtml=W.escapeHtml||We.escapeHtml,this.options=W,W.css===!1?this.cssFilter=!1:(W.css=W.css||{},this.cssFilter=new Et(W.css))}oe.prototype.process=function(W){if(W=W||"",W=W.toString(),!W)return"";var I=this,g=I.options,P=g.whiteList,x=g.onTag,A=g.onIgnoreTag,$=g.onTagAttr,re=g.onIgnoreTagAttr,z=g.safeAttrValue,F=g.escapeHtml,G=I.attributeWrapSign,H=I.cssFilter;g.stripBlankChar&&(W=We.stripBlankChar(W)),g.allowCommentTag||(W=We.stripCommentTag(W));var ne=!1;g.stripIgnoreTagBody&&(ne=We.StripTagBody(g.stripIgnoreTagBody,A),A=ne.onIgnoreTag);var ye=S(W,function(ee,O,j,E,B){var X={sourcePosition:ee,position:O,isClosing:B,isWhite:Object.prototype.hasOwnProperty.call(P,j)},_=x(j,E,X);if(!ie(_))return _;if(X.isWhite){if(X.isClosing)return"</"+j+">";var M=ce(E),s=P[j],l=fe(M.html,function(f,w){var te=D.indexOf(s,f)!==-1,J=$(j,f,w,te);return ie(J)?te?(w=z(j,f,w,H),w?f+"="+G+w+G:f):(J=re(j,f,w,te),ie(J)?void 0:J):J});return E="<"+j,l&&(E+=" "+l),M.closing&&(E+=" /"),E+=">",E}else return _=A(j,E,X),ie(_)?F(E):_},F);return ne&&(ye=ne.remove(ye)),ye},pn.exports=oe},{"./default":1,"./parser":3,"./util":4,cssfilter:8}],6:[function(hn,pn,pt){var Et=hn("./default"),We=hn("./parser"),ke=hn("./util");function S(ie){return ie==null}function fe(ie){var ce={};for(var ae in ie)ce[ae]=ie[ae];return ce}function D(ie){ie=fe(ie||{}),ie.whiteList=ie.whiteList||Et.whiteList,ie.onAttr=ie.onAttr||Et.onAttr,ie.onIgnoreAttr=ie.onIgnoreAttr||Et.onIgnoreAttr,ie.safeAttrValue=ie.safeAttrValue||Et.safeAttrValue,this.options=ie}D.prototype.process=function(ie){if(ie=ie||"",ie=ie.toString(),!ie)return"";var ce=this,ae=ce.options,se=ae.whiteList,oe=ae.onAttr,W=ae.onIgnoreAttr,I=ae.safeAttrValue,g=We(ie,function(P,x,A,$,re){var z=se[A],F=!1;if(z===!0?F=z:typeof z=="function"?F=z($):z instanceof RegExp&&(F=z.test($)),F!==!0&&(F=!1),$=I(A,$),!!$){var G={position:x,sourcePosition:P,source:re,isWhite:F};if(F){var H=oe(A,$,G);return S(H)?A+":"+$:H}else{var H=W(A,$,G);if(!S(H))return H}}});return g},pn.exports=D}
1,{"./default":7,"./parser":9,"./util":10}],7:[function(hn,pn,pt){function Et(){var D={};return D["align-content"]=!1,D["align-items"]=!1,D["align-self"]=!1,D["alignment-adjust"]=!1,D["alignment-baseline"]=!1,D.all=!1,D["anchor-point"]=!1,D.animation=!1,D["animation-delay"]=!1,D["animation-direction"]=!1,D["animation-duration"]=!1,D["animation-fill-mode"]=!1,D["animation-iteration-count"]=!1,D["animation-name"]=!1,D["animation-play-state"]=!1,D["animation-timing-function"]=!1,D.azimuth=!1,D["backface-visibility"]=!1,D.background=!0,D["background-attachment"]=!0,D["background-clip"]=!0,D["background-color"]=!0,D["background-image"]=!0,D["background-origin"]=!0,D["background-position"]=!0,D["background-repeat"]=!0,D["background-size"]=!0,D["baseline-shift"]=!1,D.binding=!1,D.bleed=!1,D["bookmark-label"]=!1,D["bookmark-level"]=!1,D["bookmark-state"]=!1,D.border=!0,D["border-bottom"]=!0,D["border-bottom-color"]=!0,D["border-bottom-left-radius"]=!0,D["border-bottom-right-radius"]=!0,D["border-bottom-style"]=!0,D["border-bottom-width"]=!0,D["border-collapse"]=!0,D["border-color"]=!0,D["border-image"]=!0,D["border-image-outset"]=!0,D["border-image-repeat"]=!0,D["border-image-slice"]=!0,D["border-image-source"]=!0,D["border-image-width"]=!0,D["border-left"]=!0,D["border-left-color"]=!0,D["border-left-style"]=!0,D["border-left-width"]=!0,D["border-radius"]=!0,D["border-right"]=!0,D["border-right-color"]=!0,D["border-right-style"]=!0,D["border-right-width"]=!0,D["border-spacing"]=!0,D["border-style"]=!0,D["border-top"]=!0,D["border-top-color"]=!0,D["border-top-left-radius"]=!0,D["border-top-right-radius"]=!0,D["border-top-style"]=!0,D["border-top-width"]=!0,D["border-width"]=!0,D.bottom=!1,D["box-decoration-break"]=!0,D["box-shadow"]=!0,D["box-sizing"]=!0,D["box-snap"]=!0,D["box-suppress"]=!0,D["break-after"]=!0,D["break-before"]=!0,D["break-inside"]=!0,D["caption-side"]=!1,D.chains=!1,D.clear=!0,D.clip=!1,D["clip-path"]=!1,D["clip-rule"]=!1,D.color=!0,D["color-interpolation-filters"]=!0,D["column-count"]=!1,D["column-fill"]=!1,D["column-gap"]=!1,D["column-rule"]=!1,D["column-rule-color"]=!1,D["column-rule-style"]=!1,D["column-rule-width"]=!1,D["column-span"]=!1,D["column-width"]=!1,D.columns=!1,D.contain=!1,D.content=!1,D["counter-increment"]=!1,D["counter-reset"]=!1,D["counter-set"]=!1,D.crop=!1,D.cue=!1,D["cue-after"]=!1,D["cue-before"]=!1,D.cursor=!1,D.direction=!1,D.display=!0,D["display-inside"]=!0,D["display-list"]=!0,D["display-outside"]=!0,D["dominant-baseline"]=!1,D.elevation=!1,D["empty-cells"]=!1,D.filter=!1,D.flex=!1,D["flex-basis"]=!1,D["flex-direction"]=!1,D["flex-flow"]=!1,D["flex-grow"]=!1,D["flex-shrink"]=!1,D["flex-wrap"]=!1,D.float=!1,D["float-offset"]=!1,D["flood-color"]=!1,D["flood-opacity"]=!1,D["flow-from"]=!1,D["flow-into"]=!1,D.font=!0,D["font-family"]=!0,D["font-feature-settings"]=!0,D["font-kerning"]=!0,D["font-language-override"]=!0,D["font-size"]=!0,D["font-size-adjust"]=!0,D["font-stretch"]=!0,D["font-style"]=!0,D["font-synthesis"]=!0,D["font-variant"]=!0,D["font-variant-alternates"]=!0,D["font-variant-caps"]=!0,D["font-variant-east-asian"]=!0,D["font-variant-ligatures"]=!0,D["font-variant-numeric"]=!0,D["font-variant-position"]=!0,D["font-weight"]=!0,D.grid=!1,D["grid-area"]=!1,D["grid-auto-columns"]=!1,D["grid-auto-flow"]=!1,D["grid-auto-rows"]=!1,D["grid-column"]=!1,D["grid-column-end"]=!1,D["grid-column-start"]=!1,D["grid-row"]=!1,D["grid-row-end"]=!1,D["grid-row-start"]=!1,D["grid-template"]=!1,D["grid-template-areas"]=!1,D["grid-template-columns"]=!1,D["grid-template-rows"]=!1,D["hanging-punctuation"]=!1,D.height=!0,D.hyphens=!1,D.icon=!1,D["image-orientation"]=!1,D["image-resolution"]=!1,D["ime-mode"]=!1,D["initial-letters"]=!1,D["inline-box-align"]=!1,D["justify-content"]=!1,D["justify-items"]=!1,D["justify-self"]=!1,D.left=!1,D["letter-spacing"]=!0,D["lighting-color"]=!0,D["line-box-contain"]=!1,D["line-break"]=!1,D["line-grid"]=!1,D["line-height"]=!1,D["line-snap"]=!1,D["line-stacking"]=!1,D["line-stacking-ruby"]=!1,D["line-stacking-shift"]=!1,D["line-stacking-strategy"]=!1,D["list-style"]=!0,D["list-style-image"]=!0,D["list-style-position"]=!0,D["list-style-type"]=!0,D.margin=!0,D["margin-bottom"]=!0,D["margin-left"]=!0,D["margin-right"]=!0,D["margin-top"]=!0,D["marker-offset"]=!1,D["marker-side"]=!1,D.marks=!1,D.mask=!1,D["mask-box"]=!1,D["mask-box-outset"]=!1,D["mask-box-repeat"]=!1,D["mask-box-slice"]=!1,D["mask-box-source"]=!1,D["mask-box-width"]=!1,D["mask-clip"]=!1,D["mask-image"]=!1,D["mask-origin"]=!1,D["mask-position"]=!1,D["mask-repeat"]=!1,D["mask-size"]=!1,D["mask-source-type"]=!1,D["mask-type"]=!1,D["max-height"]=!0,D["max-lines"]=!1,D["max-width"]=!0,D["min-height"]=!0,D["min-width"]=!0,D["move-to"]=!1,D["nav-down"]=!1,D["nav-index"]=!1,D["nav-left"]=!1,D["nav-right"]=!1,D["nav-up"]=!1,D["object-fit"]=!1,D["object-position"]=!1,D.opacity=!1,D.order=!1,D.orphans=!1,D.outline=!1,D["outline-color"]=!1,D["outline-offset"]=!1,D["outline-style"]=!1,D["outline-width"]=!1,D.overflow=!1,D["overflow-wrap"]=!1,D["overflow-x"]=!1,D["overflow-y"]=!1,D.padding=!0,D["padding-bottom"]=!0,D["padding-left"]=!0,D["padding-right"]=!0,D["padding-top"]=!0,D.page=!1,D["page-break-after"]=!1,D["page-break-before"]=!1,D["page-break-inside"]=!1,D["page-policy"]=!1,D.pause=!1,D["pause-after"]=!1,D["pause-before"]=!1,D.perspective=!1,D["perspective-origin"]=!1,D.pitch=!1,D["pitch-range"]=!1,D["play-during"]=!1,D.position=!1,D["presentation-level"]=!1,D.quotes=!1,D["region-fragment"]=!1,D.resize=!1,D.rest=!1,D["rest-after"]=!1,D["rest-before"]=!1,D.richness=!1,D.right=!1,D.rotation=!1,D["rotation-point"]=!1,D["ruby-align"]=!1,D["ruby-merge"]=!1,D["ruby-position"]=!1,D["shape-image-threshold"]=!1,D["shape-outside"]=!1,D["shape-margin"]=!1,D.size=!1,D.speak=!1,D["speak-as"]=!1,D["speak-header"]=!1,D["speak-numeral"]=!1,D["speak-
1punctuation"]=!1,D["speech-rate"]=!1,D.stress=!1,D["string-set"]=!1,D["tab-size"]=!1,D["table-layout"]=!1,D["text-align"]=!0,D["text-align-last"]=!0,D["text-combine-upright"]=!0,D["text-decoration"]=!0,D["text-decoration-color"]=!0,D["text-decoration-line"]=!0,D["text-decoration-skip"]=!0,D["text-decoration-style"]=!0,D["text-emphasis"]=!0,D["text-emphasis-color"]=!0,D["text-emphasis-position"]=!0,D["text-emphasis-style"]=!0,D["text-height"]=!0,D["text-indent"]=!0,D["text-justify"]=!0,D["text-orientation"]=!0,D["text-overflow"]=!0,D["text-shadow"]=!0,D["text-space-collapse"]=!0,D["text-transform"]=!0,D["text-underline-position"]=!0,D["text-wrap"]=!0,D.top=!1,D.transform=!1,D["transform-origin"]=!1,D["transform-style"]=!1,D.transition=!1,D["transition-delay"]=!1,D["transition-duration"]=!1,D["transition-property"]=!1,D["transition-timing-function"]=!1,D["unicode-bidi"]=!1,D["vertical-align"]=!1,D.visibility=!1,D["voice-balance"]=!1,D["voice-duration"]=!1,D["voice-family"]=!1,D["voice-pitch"]=!1,D["voice-range"]=!1,D["voice-rate"]=!1,D["voice-stress"]=!1,D["voice-volume"]=!1,D.volume=!1,D["white-space"]=!1,D.widows=!1,D.width=!0,D["will-change"]=!1,D["word-break"]=!0,D["word-spacing"]=!0,D["word-wrap"]=!0,D["wrap-flow"]=!1,D["wrap-through"]=!1,D["writing-mode"]=!1,D["z-index"]=!1,D}function We(D,ie,ce){}function ke(D,ie,ce){}var S=/javascript\s*\:/img;function fe(D,ie){return S.test(ie)?"":ie}pt.whiteList=Et(),pt.getDefaultWhiteList=Et,pt.onAttr=We,pt.onIgnoreAttr=ke,pt.safeAttrValue=fe},{}],8:[function(hn,pn,pt){var Et=hn("./default"),We=hn("./css");function ke(fe,D){var ie=new We(D);return ie.process(fe)}pt=pn.exports=ke,pt.FilterCSS=We;for(var S in Et)pt[S]=Et[S];typeof window<"u"&&(window.filterCSS=pn.exports)},{"./css":6,"./default":7}],9:[function(hn,pn,pt){var Et=hn("./util");function We(ke,S){ke=Et.trimRight(ke),ke[ke.length-1]!==";"&&(ke+=";");var fe=ke.length,D=!1,ie=0,ce=0,ae="";function se(){if(!D){var I=Et.trim(ke.slice(ie,ce)),g=I.indexOf(":");if(g!==-1){var P=Et.trim(I.slice(0,g)),x=Et.trim(I.slice(g+1));if(P){var A=S(ie,ae.length,P,x,I);A&&(ae+=A+"; ")}}}ie=ce+1}for(;ce<fe;ce++){var oe=ke[ce];if(oe==="/"&&ke[ce+1]==="*"){var W=ke.indexOf("*/",ce+2);if(W===-1)break;ce=W+1,ie=ce+1,D=!1}else oe==="("?D=!0:oe===")"?D=!1:oe===";"?D||se():oe===` 2`&&se()}return Et.trim(ae)}pn.exports=We},{"./util":10}],10:[function(hn,pn,pt){pn.exports={indexOf:function(Et,We){var ke,S;if(Array.prototype.indexOf)return Et.indexOf(We);for(ke=0,S=Et.length;ke<S;ke++)if(Et[ke]===We)return ke;return-1},forEach:function(Et,We,ke){var S,fe;if(Array.prototype.forEach)return Et.forEach(We,ke);for(S=0,fe=Et.length;S<fe;S++)We.call(ke,Et[S],S,Et)},trim:function(Et){return String.prototype.trim?Et.trim():Et.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(Et){return String.prototype.trimRight?Et.trimRight():Et.replace(/(\s*$)/g,"")}}},{}]},{},[2]);/*! grapesjs - 0.19.5 */(function(hn,pn){typeof exports=="object"&&typeof module=="object"?module.exports=pn():typeof define=="function"&&define.amd?define([],pn):typeof exports=="object"?exports.grapesjs=pn():hn.grapesjs=pn()})(typeof globalThis<"u"?globalThis:typeof window<"u"?window:this,(()=>(()=>{var hn={7757:(We,ke,S)=>{We.exports=S(5666)},3410:(We,ke,S)=>{var fe,D,ie;D=[S(9050),S(2316)],fe=function(ce,ae){var se=Array.prototype.slice;function oe(O,j,E){return E.length<=4?O.call(j,E[0],E[1],E[2],E[3]):O.apply(j,E)}function W(O,j){return se.call(O,j)}function I(O,j){return O!=null&&(ce.isArray(j)||(j=W(arguments,1)),ce.all(j,(function(E){return E in O})))}var g=(function(){var O=!1,j=-1;function E(){j++,O=!0,ce.defer((function(){O=!1}))}return function(){return O||E(),j}})();function P(){this.registeredObjects=[],this.cidIndexes=[]}function x(O,j,E,B){for(var X,_=0,M=j.length;_<M;_++)if(X=j[_]){if(O==="on"){if(!B.objectRegistry.register(X))continue}else if(!B.objectRegistry.unregister(X))continue;ce.isFunction(X[O])&&X[O]("all",E,B)}}function A(O,j){var E=j.type,B=j.undoTypes,X=!B[E]||B[E][O];ce.isFunction(X)&&X(j.object,j.before,j.after,j.options)}function $(O,j,E,B,X){if(!(E.isCurrentlyUndoRedoing||O==="undo"&&E.pointer===-1||O==="redo"&&E.pointer===E.length-1)){E.isCurrentlyUndoRedoing=!0;var _,M,s=O==="undo";for(X?M=s&&E.pointer===E.length-1||!s&&E.pointer===-1?ce.clone(E.models):se.apply(E.models,s?[0,E.pointer]:[E.pointer,E.length-1]):(_=E.at(s?E.pointer:E.pointer+1),M=B?E.where({magicFusionIndex:_.get("magicFusionIndex")}):[_]),E.pointer+=(s?-1:1)*M.length;_=s?M.pop():M.shift();)_[O]();E.isCurrentlyUndoRedoing=!1,j.trigger(O,j)}}function re(O,j){var E=O.condition,B=typeof E;return B==="function"?!!oe(E,O,j):B!=="boolean"||E}function z(O,j,E,B){if(O.track&&!O.isCurrentlyUndoRedoing&&j in B&&re(B[j],E)){var X=oe(B[j].on,B[j],E);if(I(X,"object","before","after")){if(X.type=j,X.magicFusionIndex=g(),X.undoTypes=B,O.pointer<O.length-1)for(var _=O.length-O.pointer-1;_--;)O.pop();O.pointer=O.length,O.add(X),O.length>O.maximumStackLength&&(O.shift(),O.pointer--)}}}P.prototype={isRegistered:function(O){return O&&O.cid?this.registeredObjects[O.cid]:ce.contains(this.registeredObjects,O)},register:function(O){return!this.isRegistered(O)&&(O&&O.cid?(this.registeredObjects[O.cid]=O,this.cidIndexes.push(O.cid)):this.registeredObjects.push(O),!0)},unregister:function(O){if(this.isRegistered(O)){if(O&&O.cid)delete this.registeredObjects[O.cid],this.cidIndexes.splice(ce.indexOf(this.cidIndexes,O.cid),1);else{var j=ce.indexOf(this.registeredObjects,O);this.registeredObjects.splice(j,1)}return!0}return!1},get:function(){return ce.map(this.cidIndexes,(function(O){return this.registeredObjects[O]}),this).concat(this.registeredObjects)}};var F={add:{undo:function(O,j,E,B){O.remove(E,B)},redo:function(O,j,E,B){B.index&&(B.at=B.index),O.add(E,B)},on:function(O,j,E){return{object:j,before:void 0,after:O,options:ce.clone(E)}}},remove:{undo:function(O,j,E,B){"index"in B&&(B.at=B.index),O.add(j,B)},redo:function(O,j,E,B){O.remove(j,B)},on:function(O,j,E){return{object:j,before:O,after:void 0,options:ce.clone(E)}}},change:{undo:function(O,j,E,B){ce.isEmpty(j)?ce.each(ce.keys(E),O.unset,O):(O.set(j),B&&B.unsetData&&B.unsetData.before&&B.unsetData.before.length&&ce.each(B.unsetData.before,O.unset,O))},redo:function(O,j,E,B){ce.isEmpty(E)?ce.each(ce.keys(j),O.unset,O):(O.set(E),B&&B.unsetData&&B.unsetData.after&&B.unsetData.after.length&&ce.each(B.unsetData.after,O.unset,O))},on:function(O,j){var E=O.changedAttributes(),B=ce.keys(E),X=ce.pick(O.previousAttributes(),B),_=ce.keys(X),M=(j||(j={})).unsetData={after:[],before:[]};return B.length!=_.length&&(B.length>_.length?ce.each(B,(function(s){s in X||M.before.push(s)}),this):ce.each(_,(function(s){s in E||M.after.push(s)}))),{object:O,before:X,after:E,options:ce.clone(j)}}},reset:{undo:function(O,j,E){O.reset(j)},redo:function(O,j,E){O.reset(E)},on:function(O,j){return{object:O,before:j.previousModels,after:ce.clone(O.models)}}}};function G(){}function H(O,j,E,B){if(typeof j=="object")return ce.each(j,(function(X,_){O===2?H(O,X,E,B):H(O,_,X,E)}));switch(O){case 0:I(E,"undo","redo","on")&&ce.all(ce.pick(E,"undo","redo","on"),ce.isFunction)&&(B[j]=E);break;case 1:B[j]&&ce.isObject(E)&&(B[j]=ce.extend({},B[j],E));break;case 2:delete B[j]}return this}G.prototype=F;var ne=ae.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(O){A("undo",this.attributes)},redo:function(O){A("redo",this.attributes)}}),ye=ae.Collection.extend({model:ne,pointer:-1,track:!1,isCurrentlyUndoRedoing:!1,maximumStackLength:1/0,setMaxLength:function(O){this.maximumStackLength=O}}),ee=ae.Model.extend({defaults:{maximumStackLength:1/0,track:!1},initialize:function(O){this.stack=new ye,this.objectRegistry=new P,this.undoTypes=new G,this.stack.setMaxLength(this.get("maximumStackLength")),this.on("change:maximumStackLength",(function(j,E){this.stack.setMaxLength(E)}),this),O&&O.track&&this.startTracking(),O&&O.register&&(ce.isArray(O.register)||ce.isArguments(O.register)?oe(this.register,this,O.register):this.register(O.register))},startTracking:function(){this.set("track",!0),this.stack.track=!0},stopTracking:function(){this.set("track",!1),this.stack.track=!1},isTracking:function(){return this.get("track")}
2,_addToStack:function(O){z(this.stack,O,W(arguments,1),this.undoTypes)},register:function(){x("on",arguments,this._addToStack,this)},unregister:function(){x("off",arguments,this._addToStack,this)},unregisterAll:function(){oe(this.unregister,this,this.objectRegistry.get())},undo:function(O){$("undo",this,this.stack,O)},undoAll:function(){$("undo",this,this.stack,!1,!0)},redo:function(O){$("redo",this,this.stack,O)},redoAll:function(){$("redo",this,this.stack,!1,!0)},isAvailable:function(O){var j=this.stack,E=j.length;switch(O){case"undo":return E>0&&j.pointer>-1;case"redo":return E>0&&j.pointer<E-1;default:return!1}},merge:function(O){for(var j,E=ce.isArray(O)?O:W(arguments);j=E.pop();)j instanceof ee&&j.stack instanceof ye&&(j.stack=this.stack)},addUndoType:function(O,j){H(0,O,j,this.undoTypes)},changeUndoType:function(O,j){H(1,O,j,this.undoTypes)},removeUndoType:function(O){H(2,O,void 0,this.undoTypes)},clear:function(){this.stack.reset(),this.stack.pointer=-1}});return ce.extend(ee,{defaults:function(O){ce.extend(ee.prototype.defaults,O)},addUndoType:function(O,j){H(0,O,j,F)},changeUndoType:function(O,j){H(1,O,j,F)},removeUndoType:function(O){H(2,O,void 0,F)}}),ae.UndoManager=ee},(ie=typeof fe=="function"?fe.apply(ke,D):fe)===void 0||(We.exports=ie)},2316:(We,ke,S)=>{var fe,D;(function(ie){var ce=typeof self=="object"&&self.self===self&&self||typeof S.g=="object"&&S.g.global===S.g&&S.g;fe=[S(9050),S(2579),ke],D=(function(ae,se,oe){ce.Backbone=(function(W,I,g,P){var x=W.Backbone,A=Array.prototype.slice;I.VERSION="1.3.3",I.$=P,I.noConflict=function(){return W.Backbone=x,this},I.emulateHTTP=!1,I.emulateJSON=!1;var $=function(a,c,C){switch(a){case 1:return function(){return g[c](this[C])};case 2:return function(Q){return g[c](this[C],Q)};case 3:return function(Q,pe){return g[c](this[C],z(Q,this),pe)};case 4:return function(Q,pe,Ce){return g[c](this[C],z(Q,this),pe,Ce)};default:return function(){var Q=A.call(arguments);return Q.unshift(this[C]),g[c].apply(g,Q)}}},re=function(a,c,C){g.each(c,(function(Q,pe){g[pe]&&(a.prototype[pe]=$(Q,pe,C))}))},z=function(a,c){return g.isFunction(a)?a:g.isObject(a)&&!c._isModel(a)?F(a):g.isString(a)?function(C){return C.get(a)}:a},F=function(a){var c=g.matches(a);return function(C){return c(C.attributes)}},G=I.Events={},H=/\s+/,ne=function(a,c,C,Q,pe){var Ce,Se=0;if(C&&typeof C=="object")for(Q!==void 0&&("context"in pe)&&pe.context===void 0&&(pe.context=Q),Ce=g.keys(C);Se<Ce.length;Se++)c=ne(a,c,Ce[Se],C[Ce[Se]],pe);else if(C&&H.test(C))for(Ce=C.split(H);Se<Ce.length;Se++)c=a(c,Ce[Se],Q,pe);else c=a(c,C,Q,pe);return c};G.on=function(a,c,C){return ye(this,a,c,C)};var ye=function(a,c,C,Q,pe){return a._events=ne(ee,a._events||{},c,C,{context:Q,ctx:a,listening:pe}),pe&&((a._listeners||(a._listeners={}))[pe.id]=pe),a};G.listenTo=function(a,c,C){if(!a)return this;var Q=a._listenId||(a._listenId=g.uniqueId("l")),pe=this._listeningTo||(this._listeningTo={}),Ce=pe[Q];if(!Ce){var Se=this._listenId||(this._listenId=g.uniqueId("l"));Ce=pe[Q]={obj:a,objId:Q,id:Se,listeningTo:pe,count:0}}return ye(a,c,C,this,Ce),this};var ee=function(a,c,C,Q){if(C){var pe=a[c]||(a[c]=[]),Ce=Q.context,Se=Q.ctx,me=Q.listening;me&&me.count++,pe.push({callback:C,context:Ce,ctx:Ce||Se,listening:me})}return a};G.off=function(a,c,C){return this._events?(this._events=ne(O,this._events,a,c,{context:C,listeners:this._listeners}),this):this},G.stopListening=function(a,c,C){var Q=this._listeningTo;if(!Q)return this;for(var pe=a?[a._listenId]:g.keys(Q),Ce=0;Ce<pe.length;Ce++){var Se=Q[pe[Ce]];if(!Se)break;Se.obj.off(c,C,this)}return this};var O=function(a,c,C,Q){if(a){var pe,Ce=0,Se=Q.context,me=Q.listeners;if(c||C||Se){for(var xe=c?[c]:g.keys(a);Ce<xe.length;Ce++){var de=a[c=xe[Ce]];if(!de)break;for(var Ee=[],Fe=0;Fe<de.length;Fe++){var He=de[Fe];C&&C!==He.callback&&C!==He.callback._callback||Se&&Se!==He.context?Ee.push(He):(pe=He.listening)&&--pe.count==0&&(delete me[pe.id],delete pe.listeningTo[pe.objId])}Ee.length?a[c]=Ee:delete a[c]}return a}for(var et=g.keys(me);Ce<et.length;Ce++)delete me[(pe=me[et[Ce]]).id],delete pe.listeningTo[pe.objId]}};G.once=function(a,c,C){var Q=ne(j,{},a,c,g.bind(this.off,this));
2return typeof a=="string"&&C==null&&(c=void 0),this.on(Q,c,C)},G.listenToOnce=function(a,c,C){var Q=ne(j,{},c,C,g.bind(this.stopListening,this,a));return this.listenTo(a,Q)};var j=function(a,c,C,Q){if(C){var pe=a[c]=g.once((function(){Q(c,pe),C.apply(this,arguments)}));pe._callback=C}return a};G.trigger=function(a){if(!this._events)return this;for(var c=Math.max(0,arguments.length-1),C=Array(c),Q=0;Q<c;Q++)C[Q]=arguments[Q+1];return ne(E,this._events,a,void 0,C),this};var E=function(a,c,C,Q){if(a){var pe=a[c],Ce=a.all;pe&&Ce&&(Ce=Ce.slice()),pe&&B(pe,Q),Ce&&B(Ce,[c].concat(Q))}return a},B=function(a,c){var C,Q=-1,pe=a.length,Ce=c[0],Se=c[1],me=c[2];switch(c.length){case 0:for(;++Q<pe;)(C=a[Q]).callback.call(C.ctx);return;case 1:for(;++Q<pe;)(C=a[Q]).callback.call(C.ctx,Ce);return;case 2:for(;++Q<pe;)(C=a[Q]).callback.call(C.ctx,Ce,Se);return;case 3:for(;++Q<pe;)(C=a[Q]).callback.call(C.ctx,Ce,Se,me);return;default:for(;++Q<pe;)(C=a[Q]).callback.apply(C.ctx,c);return}};G.bind=G.on,G.unbind=G.off,g.extend(I,G);var X=I.Model=function(a,c){var C=a||{};c||(c={}),this.cid=g.uniqueId(this.cidPrefix),this.attributes={},c.collection&&(this.collection=c.collection),c.parse&&(C=this.parse(C,c)||{});var Q=g.result(this,"defaults");C=g.defaults(g.extend({},Q,C),Q),this.set(C,c),this.changed={},this.initialize.apply(this,arguments)};g.extend(X.prototype,G,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(a){return g.clone(this.attributes)},sync:function(){return I.sync.apply(this,arguments)},get:function(a){return this.attributes[a]},escape:function(a){return g.escape(this.get(a))},has:function(a){return this.get(a)!=null},matches:function(a){return!!g.iteratee(a,this)(this.attributes)},set:function(a,c,C){if(a==null)return this;var Q;if(typeof a=="object"?(Q=a,C=c):(Q={})[a]=c,C||(C={}),!this._validate(Q,C))return!1;var pe=C.unset,Ce=C.silent,Se=[],me=this._changing;this._changing=!0,me||(this._previousAttributes=g.clone(this.attributes),this.changed={});var xe=this.attributes,de=this.changed,Ee=this._previousAttributes;for(var Fe in Q)c=Q[Fe],g.isEqual(xe[Fe],c)||Se.push(Fe),g.isEqual(Ee[Fe],c)?delete de[Fe]:de[Fe]=c,pe?delete xe[Fe]:xe[Fe]=c;if(this.idAttribute in Q&&(this.id=this.get(this.idAttribute)),!Ce){Se.length&&(this._pending=C);for(var He=0;He<Se.length;He++)this.trigger("change:"+Se[He],this,xe[Se[He]],C)}if(me)return this;if(!Ce)for(;this._pending;)C=this._pending,this._pending=!1,this.trigger("change",this,C);return this._pending=!1,this._changing=!1,this},unset:function(a,c){return this.set(a,void 0,g.extend({},c,{unset:!0}))},clear:function(a){var c={};for(var C in this.attributes)c[C]=void 0;return this.set(c,g.extend({},a,{unset:!0}))},hasChanged:function(a){return a==null?!g.isEmpty(this.changed):g.has(this.changed,a)},changedAttributes:function(a){if(!a)return!!this.hasChanged()&&g.clone(this.changed);var c=this._changing?this._previousAttributes:this.attributes,C={};for(var Q in a){var pe=a[Q];g.isEqual(c[Q],pe)||(C[Q]=pe)}return!!g.size(C)&&C},previous:function(a){return a!=null&&this._previousAttributes?this._previousAttributes[a]:null},previousAttributes:function(){return g.clone(this._previousAttributes)},fetch:function(a){a=g.extend({parse:!0},a);var c=this,C=a.success;return a.success=function(Q){var pe=a.parse?c.parse(Q,a):Q;if(!c.set(pe,a))return!1;C&&C.call(a.context,c,Q,a),c.trigger("sync",c,Q,a)},N(this,a),this.sync("read",this,a)},save:function(a,c,C){var Q;a==null||typeof a=="object"?(Q=a,C=c):(Q={})[a]=c;var pe=(C=g.extend({validate:!0,parse:!0},C)).wait;if(Q&&!pe){if(!this.set(Q,C))return!1}else if(!this._validate(Q,C))return!1;var Ce=this,Se=C.success,me=this.attributes;C.success=function(Ee){Ce.attributes=me;var Fe=C.parse?Ce.parse(Ee,C):Ee;if(pe&&(Fe=g.extend({},Q,Fe)),Fe&&!Ce.set(Fe,C))return!1;Se&&Se.call(C.context,Ce,Ee,C),Ce.trigger("sync",Ce,Ee,C)},N(this,C),Q&&pe&&(this.attributes=g.extend({},me,Q));var xe=this.isNew()?"create":C.patch?"patch":"update";xe!=="patch"||C.attrs||(C.attrs=Q);var de=this.sync(xe,this,C);return this.attributes=me,de},destroy:function(a){a=a?g.clone(a):{};var c=this,C=a.success,Q=a.wait,pe=function(){c.stopListening(),c.trigger("destroy",c,c.collection,a)};a.success=function(Se){Q&&pe(),C&&C.call(a.context,c,Se,a),c.isNew()||c.trigger("sync",c,Se,a)};var Ce=!1;return this.isNew()?g.defer(a.success):(N(this,a),Ce=this.sync("delete",this,a)),Q||pe(),Ce},url:function(){var a=g.result(this,"urlRoot")||g.result(this.collection,"url")||q();if(this.isNew())return a;var c=this.get(this.idAttribute);return a.replace(/[^\/]$/,"$&/")+encodeURIComponent(c)},parse:function(a,c){return a},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)}
2,isValid:function(a){return this._validate({},g.extend({},a,{validate:!0}))},_validate:function(a,c){if(!c.validate||!this.validate)return!0;a=g.extend({},this.attributes,a);var C=this.validationError=this.validate(a,c)||null;return!C||(this.trigger("invalid",this,C,g.extend(c,{validationError:C})),!1)}}),re(X,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes");var _=I.Collection=function(a,c){c||(c={}),c.model&&(this.model=c.model),c.comparator!==void 0&&(this.comparator=c.comparator),this._reset(),this.initialize.apply(this,arguments),a&&this.reset(a,g.extend({silent:!0},c))},M={add:!0,remove:!0,merge:!0},s={add:!0,remove:!1},l=function(a,c,C){C=Math.min(Math.max(C,0),a.length);var Q,pe=Array(a.length-C),Ce=c.length;for(Q=0;Q<pe.length;Q++)pe[Q]=a[Q+C];for(Q=0;Q<Ce;Q++)a[Q+C]=c[Q];for(Q=0;Q<pe.length;Q++)a[Q+Ce+C]=pe[Q]};g.extend(_.prototype,G,{model:X,initialize:function(){},toJSON:function(a){return this.map((function(c){return c.toJSON(a)}))},sync:function(){return I.sync.apply(this,arguments)},add:function(a,c){return this.set(a,g.extend({merge:!1},c,s))},remove:function(a,c){c=g.extend({},c);var C=!g.isArray(a);a=C?[a]:a.slice();var Q=this._removeModels(a,c);return!c.silent&&Q.length&&(c.changes={added:[],merged:[],removed:Q},this.trigger("update",this,c)),C?Q[0]:Q},set:function(a,c){if(a!=null){(c=g.extend({},M,c)).parse&&!this._isModel(a)&&(a=this.parse(a,c)||[]);var C=!g.isArray(a);a=C?[a]:a.slice();var Q=c.at;Q!=null&&(Q=+Q),Q>this.length&&(Q=this.length),Q<0&&(Q+=this.length+1);var pe,Ce,Se=[],me=[],xe=[],de=[],Ee={},Fe=c.add,He=c.merge,et=c.remove,Ge=!1,yt=this.comparator&&Q==null&&c.sort!==!1,St=g.isString(this.comparator)?this.comparator:null;for(Ce=0;Ce<a.length;Ce++){pe=a[Ce];var bt=this.get(pe);if(bt){if(He&&pe!==bt){var Jt=this._isModel(pe)?pe.attributes:pe;c.parse&&(Jt=bt.parse(Jt,c)),bt.set(Jt,c),xe.push(bt),yt&&!Ge&&(Ge=bt.hasChanged(St))}Ee[bt.cid]||(Ee[bt.cid]=!0,Se.push(bt)),a[Ce]=bt}else Fe&&(pe=a[Ce]=this._prepareModel(pe,c))&&(me.push(pe),this._addReference(pe,c),Ee[pe.cid]=!0,Se.push(pe))}if(et){for(Ce=0;Ce<this.length;Ce++)Ee[(pe=this.models[Ce]).cid]||de.push(pe);de.length&&this._removeModels(de,c)}var mt=!1,_t=!yt&&Fe&&et;if(Se.length&&_t?(mt=this.length!==Se.length||g.some(this.models,(function(Oe,De){return Oe!==Se[De]})),this.models.length=0,l(this.models,Se,0),this.length=this.models.length):me.length&&(yt&&(Ge=!0),l(this.models,me,Q??this.length),this.length=this.models.length),Ge&&this.sort({silent:!0}),!c.silent){for(Ce=0;Ce<me.length;Ce++)Q!=null&&(c.index=Q+Ce),(pe=me[Ce]).trigger("add",pe,this,c);(Ge||mt)&&this.trigger("sort",this,c),(me.length||de.length||xe.length)&&(c.changes={added:me,removed:de,merged:xe},this.trigger("update",this,c))}return C?a[0]:a}},reset:function(a,c){c=c?g.clone(c):{};for(var C=0;C<this.models.length;C++)this._removeReference(this.models[C],c);return c.previousModels=this.models,this._reset(),a=this.add(a,g.extend({silent:!0},c)),c.silent||this.trigger("reset",this,c),a},push:function(a,c){return this.add(a,g.extend({at:this.length},c))},pop:function(a){var c=this.at(this.length-1);return this.remove(c,a)},unshift:function(a,c){return this.add(a,g.extend({at:0},c))},shift:function(a){var c=this.at(0);return this.remove(c,a)},slice:function(){return A.apply(this.models,arguments)},get:function(a){if(a!=null)return this._byId[a]||this._byId[this.modelId(a.attributes||a)]||a.cid&&this._byId[a.cid]},has:function(a){return this.get(a)!=null},at:function(a){return a<0&&(a+=this.length),this.models[a]},where:function(a,c){return this[c?"find":"filter"](a)},findWhere:function(a){return this.where(a,!0)},sort:function(a){var c=this.comparator;if(!c)throw new Error("Cannot sort a set without a comparator");a||(a={});var C=c.length;return g.isFunction(c)&&(c=g.bind(c,this)),C===1||g.isString(c)?this.models=this.sortBy(c):this.models.sort(c),a.silent||this.trigger("sort",this,a),this},pluck:function(a){return this.map(a+"")},fetch:function(a){var c=(a=g.extend({parse:!0},a)).success,C=this;return a.success=function(Q){var pe=a.reset?"reset":"set";C[pe](Q,a),c&&c.call(a.context,C,Q,a),C.trigger("sync",C,Q,a)},N(this,a),this.sync("read",this,a)},create:function(a,c){var C=(c=c?g.clone(c):{}).wait;if(!(a=this._prepareModel(a,c)))return!1;C||this.add(a,c);var Q=this,pe=c.success;return c.success=function(Ce,Se,me){C&&Q.add(Ce,me),pe&&pe.call(me.context,Ce,Se,me)},a.save(null,c),a},parse:function(a,c){return a},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(a){return a[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(a,c){if(this._isModel(a))return a.collection||(a.collection=this),a;(c=c?g.clone(c):{}).collection=this;var C=new this.model(a,c);return C.validationError?(this.trigger("invalid",this,C.validationError,c),!1):C},_removeModels:function(a,c){for(var C=[],Q=0;Q<a.length;Q++){var pe=this.get(a[Q]);if(pe){var Ce=this.indexOf(pe);this.models.splice(Ce,1),this.length--,delete this._byId[pe.cid];var Se=this.modelId(pe.attributes);Se!=null&&delete this._byId[Se],c.silent||(c.index=Ce,pe.trigger("remove",pe,this,c)),C.push(pe),this._removeReference(pe,c)}}return C},_isModel:function(a){return a instanceof X},_addReference:function(a,c){this._byId[a.cid]=a;var C=this.modelId(a.attributes);C!=null&&(this._byId[C]=a),a.on("all",this._onModelEvent,this)},_removeReference:function(a,c){delete this._byId[a.cid];
2var C=this.modelId(a.attributes);C!=null&&delete this._byId[C],this===a.collection&&delete a.collection,a.off("all",this._onModelEvent,this)},_onModelEvent:function(a,c,C,Q){if(c){if((a==="add"||a==="remove")&&C!==this)return;if(a==="destroy"&&this.remove(c,Q),a==="change"){var pe=this.modelId(c.previousAttributes()),Ce=this.modelId(c.attributes);pe!==Ce&&(pe!=null&&delete this._byId[pe],Ce!=null&&(this._byId[Ce]=c))}}this.trigger.apply(this,arguments)}}),re(_,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models");var f=I.View=function(a){this.cid=g.uniqueId("view"),g.extend(this,g.pick(a,te)),this._ensureElement(),this.initialize.apply(this,arguments)},w=/^(\S+)\s*(.*)$/,te=["model","collection","el","id","attributes","className","tagName","events"];g.extend(f.prototype,G,{tagName:"div",$:function(a){return this.$el.find(a)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(a){return this.undelegateEvents(),this._setElement(a),this.delegateEvents(),this},_setElement:function(a){this.$el=a instanceof I.$?a:I.$(a),this.el=this.$el[0]},delegateEvents:function(a){if(a||(a=g.result(this,"events")),!a)return this;for(var c in this.undelegateEvents(),a){var C=a[c];if(g.isFunction(C)||(C=this[C]),C){var Q=c.match(w);this.delegate(Q[1],Q[2],g.bind(C,this))}}return this},delegate:function(a,c,C){return this.$el.on(a+".delegateEvents"+this.cid,c,C),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(a,c,C){return this.$el.off(a+".delegateEvents"+this.cid,c,C),this},_createElement:function(a){return document.createElement(a)},_ensureElement:function(){if(this.el)this.setElement(g.result(this,"el"));else{var a=g.extend({},g.result(this,"attributes"));this.id&&(a.id=g.result(this,"id")),this.className&&(a.class=g.result(this,"className")),this.setElement(this._createElement(g.result(this,"tagName"))),this._setAttributes(a)}},_setAttributes:function(a){this.$el.attr(a)}}),I.sync=function(a,c,C){var Q=J[a];g.defaults(C||(C={}),{emulateHTTP:I.emulateHTTP,emulateJSON:I.emulateJSON});var pe={type:Q,dataType:"json"};if(C.url||(pe.url=g.result(c,"url")||q()),C.data!=null||!c||a!=="create"&&a!=="update"&&a!=="patch"||(pe.contentType="application/json",pe.data=JSON.stringify(C.attrs||c.toJSON(C))),C.emulateJSON&&(pe.contentType="application/x-www-form-urlencoded",pe.data=pe.data?{model:pe.data}:{}),C.emulateHTTP&&(Q==="PUT"||Q==="DELETE"||Q==="PATCH")){pe.type="POST",C.emulateJSON&&(pe.data._method=
2Q);var Ce=C.beforeSend;C.beforeSend=function(xe){if(xe.setRequestHeader("X-HTTP-Method-Override",Q),Ce)return Ce.apply(this,arguments)}}pe.type==="GET"||C.emulateJSON||(pe.processData=!1);var Se=C.error;C.error=function(xe,de,Ee){C.textStatus=de,C.errorThrown=Ee,Se&&Se.call(C.context,xe,de,Ee)};var me=C.xhr=I.ajax(g.extend(pe,C));return c.trigger("request",c,me,C),me};var J={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};I.ajax=function(){return I.$.ajax.apply(I.$,arguments)};var R=I.Router=function(a){a||(a={}),a.routes&&(this.routes=a.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},k=/\((.*?)\)/g,v=/(\(\?)?:\w+/g,b=/\*\w+/g,h=/[\-{}\[\]+?.,\\\^$|#\s]/g;g.extend(R.prototype,G,{initialize:function(){},route:function(a,c,C){g.isRegExp(a)||(a=this._routeToRegExp(a)),g.isFunction(c)&&(C=c,c=""),C||(C=this[c]);var Q=this;return I.history.route(a,(function(pe){var Ce=Q._extractParameters(a,pe);Q.execute(C,Ce,c)!==!1&&(Q.trigger.apply(Q,["route:"+c].concat(Ce)),Q.trigger("route",c,Ce),I.history.trigger("route",Q,c,Ce))})),this},execute:function(a,c,C){a&&a.apply(this,c)},navigate:function(a,c){return I.history.navigate(a,c),this},_bindRoutes:function(){if(this.routes){this.routes=g.result(this,"routes");for(var a,c=g.keys(this.routes);(a=c.pop())!=null;)this.route(a,this.routes[a])}},_routeToRegExp:function(a){return a=a.replace(h,"\\$&").replace(k,"(?:$1)?").replace(v,(function(c,C){return C?c:"([^/?]+)"})).replace(b,"([^?]*?)"),new RegExp("^"+a+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(a,c){var C=a.exec(c).slice(1);return g.map(C,(function(Q,pe){return pe===C.length-1?Q||null:Q?decodeURIComponent(Q):null}))}});var m=I.History=function(){this.handlers=[],this.checkUrl=g.bind(this.checkUrl,this),typeof window<"u"&&(this.location=window.location,this.history=window.history)},p=/^[#\/]|\s+$/g,y=/^\/+|\/+$/g,Z=/#.*$/;m.started=!1,g.extend(m.prototype,G,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(a){return decodeURI(a.replace(/%25/g,"%2525"))},getSearch:function(){var a=this.location.href.replace(/#.*/,"").match(/\?.+/);return a?a[0]:""},getHash:function(a){var c=(a||this).location.href.match(/#(.*)$/);return c?c[1]:""},getPath:function(){var a=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return a.charAt(0)==="/"?a.slice(1):a},getFragment:function(a){return a==null&&(a=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),a.replace(p,"")},start:function(a){if(m.started)throw new Error("Backbone.history has already been started");if(m.started=!0,this.options=g.extend({root:"/"},this.options,a),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._hasHashChange="onhashchange"in window&&(document.documentMode===void 0||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(y,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var c=this.root.slice(0,-1)||"/";return this.location.replace(c+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var C=document.body,Q=C.insertBefore(this.iframe,C.firstChild).contentWindow;Q.document.open(),Q.document.close(),Q.location.hash="#"+this.fragment}var pe=window.addEventListener||function(Ce,Se){return attachEvent("on"+Ce,Se)};if(this._usePushState?pe("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?pe("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var a=window.removeEventListener||function(c,C){return detachEvent("on"+c,C)};this._usePushState?a("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&a("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),m.started=!1},route:function(a,c){this.handlers.unshift({route:a,callback:c})},checkUrl:function(a){var c=this.getFragment();if(c===this.fragment&&this.iframe&&(c=this.getHash(this.iframe.contentWindow)),c===this.fragment)return!1;this.iframe&&this.navigate(c),this.loadUrl()},loadUrl:function(a){return!!this.matchRoot()&&(a=this.fragment=this.getFragment(a),g.some(this.handlers,(function(c){if(c.route.test(a))return c.callback(a),!0})))},navigate:function(a,c){if(!m.started)return!1;c&&c!==!0||(c={trigger:!!c}),a=this.getFragment(a||"");var C=this.root;a!==""&&a.charAt(0)!=="?"||(C=C.slice(0,-1)||"/");var Q=C+a;if(a=this.decodeFragment(a.replace(Z,"")),this.fragment!==a){if(this.fragment=a,this._usePushState)this.history[c.replace?"replaceState":"pushState"]({},document.title,Q);else{if(!this._wantsHashChange)return this.location.assign(Q);if(this._updateHash(this.location,a,c.replace),this.iframe&&a!==this.getHash(this.iframe.contentWindow)){var pe=this.iframe.contentWindow;c.replace||(pe.document.open(),pe.document.close()),this._updateHash(pe.location,a,c.replace)}}return c.trigger?this.loadUrl(a):void 0}},_updateHash:function(a,c,C){if(C){var Q=a.href.replace(/(javascript:|#).*$/,"");a.replace(Q+"#"+c)}else a.hash="#"+c}}),I.history=new m;var Y=function(a,c){var C,Q=this;return C=a&&g.has(a,"constructor")?a.constructor:function(){return Q.apply(this,arguments)},g.extend(C,Q,c),C.prototype=g.create(Q.prototype,a),C.prototype.constructor=C,C.__super__=Q.prototype,C};X.extend=_.extend=R.extend=f.extend=m.extend=Y;var q=function(){throw new Error('A "url" property or function must be specified')},N=function(a,c){var C=c.error;c.error=function(Q){C&&C.call(c.context,a,Q,c),a.trigger("error",a,Q,c)}};return I})(ce,oe,ae,se)}).apply(ke,fe),D===void 0||(We.exports=D)})()},9210:(We,ke,S)=>{(function(fe){fe.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(ie,ce){return/^[;{}]$/.test(ce)}}),fe.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(ie,ce,ae,se){return this.jsonMode?/^[\[,{]$/.test(ce)||/^}/.test(ae):(ce!=";"||!se.lexical||se.lexical.type!=")")&&/^[;{}]$/.test(ce)&&!/^;/.test(ae)}});var D=/^(a|abbr|acronym|area|base|bdo|big|br|button|caption|cite|code|col|colgroup|dd|del|dfn|em|frame|hr|iframe|img|input|ins|kbd|label|legend|link|map|object|optgroup|option|param|q|samp|script|select|small|span|strong|sub|sup|textarea|tt|var)$/;fe.extendMode("xml",{commentStart:"<!--",commentEnd:"-->",newlineAfterToken:function(ie,ce,ae,se){var oe=!1;return this.configuration=="html"&&(oe=!!se.context&&D.test(se.context.tagName)),!oe&&(ie=="tag"&&/>$/.test(ce)&&se.context||/^</.test(ae))}}),fe.defineExtension("commentRange",(function(ie,ce,ae){var se=this,oe=fe.innerMode(se.getMode(),se.getTokenAt(ce).state).mode;se.operation((function(){if(ie)se.replaceRange(oe.commentEnd,ae),se.replaceRange(oe.commentStart,ce),ce.line==ae.line&&ce.ch==ae.ch&&se.setCursor(ce.line,ce.ch+oe.commentStart.length);else{var W=se.getRange(ce,ae),I=W.indexOf(oe.commentStart),g=W.lastIndexOf(oe.commentEnd);I>-1&&g>-1&&g>I&&(W=W.substr(0,I)+W.substring(I+oe.commentStart.length,g)+W.substr(g+oe.commentEnd.length)),se.replaceRange(W,ce,ae)}}))})),fe.defineExtension("autoIndentRange",(function(ie,ce){var ae=this;this.operation((function(){for(var se=ie.line;se<=ce.line;se++)ae.indentLine(se,"smart")}))})),fe.defineExtension("autoFormatRange",(function(ie,ce){var ae=this,se=ae.getMode(),oe=ae.getRange(ie,ce).split(` 3`),W=fe.copyState(se,ae.getTokenAt(ie).state),I=ae.getOption("tabSize"),g="",P=0,x=ie.ch===0;function A(){g+=` 4`,x=!0,++P}for(var $=0;$<oe.length;++$){for(var re=new fe.StringStream(oe[$],I);!re.eol();){var z=fe.innerMode(se,W),F=se.token(re,W),G=re.current();re.start=re.pos,x&&!/\S/.test(G)||(g+=G,x=!1),!x&&z.mode.newlineAfterToken&&z.mode.newlineAfterToken(F,G,re.string.slice(re.pos)||oe[$+1]||"",z.state)&&A()}!re.pos&&se.blankLine&&se.blankLine(W),!x&&$<oe.length-1&&A()}ae.operation((function(){ae.replaceRange(g,ie,ce);for(var H=ie.line+1,ne=ie.line+P;H<=ne;++H)ae.indentLine(H,"smart");ae.setSelection(ie,ae.getCursor(!1))}))}))})(S(4631))},4631:function(We){We.exports=(function(){"use strict";var ke=navigator.userAgent,S=navigator.platform,fe=/gecko\/\d/i.test(ke),D=/MSIE \d/.test(ke),ie=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ke),ce=/Edge\/(\d+)/.exec(ke),ae=D||ie||ce,se=ae&&(D?document.documentMode||6:+(ce||ie)[1]),oe=!ce&&/WebKit\//.test(ke),W=oe&&/Qt\/\d+\.\d+/.test(ke),I=!ce&&/Chrome\//.test(ke),g=/Opera\//.test(ke),P=/Apple Computer/.test(navigator.vendor),x=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ke),A=/PhantomJS/.test(ke),$=P&&(/Mobile\/\w+/.test(ke)||navigator.maxTouchPoints>2),re=/Android/.test(ke),z=$||re||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ke),F=$||/Mac/.test(S),G=/\bCrOS\b/.test(ke),H=/win/i.test(S),ne=g&&ke.match(/Version\/(\d*\.\d*)/);ne&&(ne=Number(ne[1])),ne&&ne>=15&&(g=!1,oe=!0);var ye=F&&(W||g&&(ne==null||ne<12.11)),ee=fe||ae&&se>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var j,E=function(e,t){var r=e.className,n=O(t).exec(r);if(n){var o=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(o?n[1]+o:"")}};function B(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function X(e,t){return B(e).appendChild(t)}function _(e,t,r,n){var o=document.createElement(e);
4if(r&&(o.className=r),n&&(o.style.cssText=n),typeof t=="string")o.appendChild(document.createTextNode(t));else if(t)for(var d=0;d<t.length;++d)o.appendChild(t[d]);return o}function M(e,t,r,n){var o=_(e,t,r,n);return o.setAttribute("role","presentation"),o}function s(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function l(){var e;try{e=document.activeElement}catch{e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function f(e,t){var r=e.className;O(t).test(r)||(e.className+=(r?" ":"")+t)}function w(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!O(r[n]).test(t)&&(t+=" "+r[n]);return t}j=document.createRange?function(e,t,r,n){var o=document.createRange();return o.setEnd(n||e,r),o.setStart(e,t),o}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch{return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var te=function(e){e.select()};function J(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function R(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||r===!1&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function k(e,t,r,n,o){t==null&&(t=e.search(/[^\s\u00a0]/))==-1&&(t=e.length);for(var d=n||0,U=o||0;;){var K=e.indexOf(" ",d);if(K<0||K>=t)return U+(t-d);U+=K-d,U+=r-U%r,d=K+1}}$?te=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:ae&&(te=function(e){try{e.select()}catch{}});var v=function(){this.id=null,this.f=null,this.time=0,this.handler=J(this.onTimeout,this)};function b(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}v.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},v.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};var h=50,m={toString:function(){return"CodeMirror.Pass"}},p={scroll:!1},y={origin:"*mouse"},Z={origin:"+move"};function Y(e,t,r){for(var n=0,o=0;;){var d=e.indexOf(" ",n);d==-1&&(d=e.length);var U=d-n;if(d==e.length||o+U>=t)return n+Math.min(U,t-o);if(o+=d-n,n=d+1,(o+=r-o%r)>=t)return n}}var q=[""];function N(e){for(;q.length<=e;)q.push(a(q)+" ");return q[e]}function a(e){return e[e.length-1]}function c(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function C(e,t,r){for(var n=0,o=r(t);n<e.length&&r(e[n])<=o;)n++;e.splice(n,0,t)}function Q(){}function pe(e,t){var r;return Object.create?r=Object.create(e):(Q.prototype=e,r=new Q),t&&R(t,r),r}var Ce=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Se(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Ce.test(e))}function me(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Se(e))||t.test(e):Se(e)}function xe(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var de=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58
4-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Ee(e){return e.charCodeAt(0)>=768&&de.test(e)}function Fe(e,t,r){for(;(r<0?t>0:t<e.length)&&Ee(e.charAt(t));)t+=r;return t}function He(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var o=(t+r)/2,d=n<0?Math.ceil(o):Math.floor(o);if(d==t)return e(d)?t:r;e(d)?r=d:t=d+n}}function et(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var o=!1,d=0;d<e.length;++d){var U=e[d];(U.from<r&&U.to>t||t==r&&U.to==t)&&(n(Math.max(U.from,t),Math.min(U.to,r),U.level==1?"rtl":"ltr",d),o=!0)}o||n(t,r,"ltr")}var Ge=null;function yt(e,t,r){var n;Ge=null;for(var o=0;o<e.length;++o){var d=e[o];if(d.from<t&&d.to>t)return o;d.to==t&&(d.from!=d.to&&r=="before"?n=o:Ge=o),d.from==t&&(d.from!=d.to&&r!="before"?n=o:Ge=o)}return n??Ge}var St=(function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(ge){return ge<=247?e.charAt(ge):1424<=ge&&ge<=1524?"R":1536<=ge&&ge<=1785?t.charAt(ge-1536):1774<=ge&&ge<=2220?"r":8192<=ge&&ge<=8203?"w":ge==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,d=/[LRr]/,U=/[Lb1n]/,K=/[1n]/;function he(ge,je,Ae){this.level=ge,this.from=je,this.to=Ae}return function(ge,je){var Ae=je=="ltr"?"L":"R";if(ge.length==0||je=="ltr"&&!n.test(ge))return!1;for(var Ve=ge.length,Be=[],Ye=0;Ye<Ve;++Ye)Be.push(r(ge.charCodeAt(Ye)));for(var ot=0,lt=Ae;ot<Ve;++ot){var Ot=Be[ot];Ot=="m"?Be[ot]=lt:lt=Ot}for(var Tt=0,vt=Ae;Tt<Ve;++Tt){var At=Be[Tt];At=="1"&&vt=="r"?Be[Tt]="n":d.test(At)&&(vt=At,At=="r"&&(Be[Tt]="R"))}for(var jt=1,Ft=Be[0];jt<Ve-1;++jt){var On=Be[jt];On=="+"&&Ft=="1"&&Be[jt+1]=="1"?Be[jt]="1":On!=","||Ft!=Be[jt+1]||Ft!="1"&&Ft!="n"||(Be[jt]=Ft),Ft=On}for(var Cn=0;Cn<Ve;++Cn){var xr=Be[Cn];if(xr==",")Be[Cn]="N";else if(xr=="%"){var jn=void 0;for(jn=Cn+1;jn<Ve&&Be[jn]=="%";++jn);for(var Er=Cn&&Be[Cn-1]=="!"||jn<Ve&&Be[jn]=="1"?"1":"N",Or=Cn;Or<jn;++Or)Be[Or]=Er;Cn=jn-1}}for(var Ln=0,vr=Ae;Ln<Ve;++Ln){var sr=Be[Ln];vr=="L"&&sr=="1"?Be[Ln]="L":d.test(sr)&&(vr=sr)}for(var Hn=0;Hn<Ve;++Hn)if(o.test(Be[Hn])){var Nn=void 0;for(Nn=Hn+1;Nn<Ve&&o.test(Be[Nn]);++Nn);for(var zn=(Hn?Be[Hn-1]:Ae)=="L",mr=zn==((Nn<Ve?Be[Nn]:Ae)=="L")?zn?"L":"R":Ae,ei=Hn;ei<Nn;++ei)Be[ei]=mr;Hn=Nn-1}for(var Rr,or=[],Un=0;Un<Ve;)if(U.test(Be[Un])){var pa=Un;for(++Un;Un<Ve&&U.test(Be[Un]);++Un);or.push(new he(0,pa,Un))}else{var Ir=Un,ci=or.length,ui=je=="rtl"?1:0;for(++Un;Un<Ve&&Be[Un]!="L";++Un);for(var lr=Ir;lr<Un;)if(K.test(Be[lr])){Ir<lr&&(or.splice(ci,0,new he(1,Ir,lr)),ci+=ui);var Ti=lr;for(++lr;lr<Un&&K.test(Be[lr]);++lr);or.splice(ci,0,new he(2,Ti,lr)),ci+=ui,Ir=lr}else++lr;Ir<Un&&or.splice(ci,0,new he(1,Ir,Un))}return je=="ltr"&&(or[0].level==1&&(Rr=ge.match(/^\s+/))&&(or[0].from=Rr[0].length,or.unshift(new he(0,0,Rr[0].length))),a(or).level==1&&(Rr=ge.match(/\s+$/))&&(a(or).to-=Rr[0].length,or.push(new he(0,Ve-Rr[0].length,Ve)))),je=="rtl"?or.reverse():or}})();function bt(e,t){var r=e.order;return r==null&&(r=e.order=St(e.text,t)),r}var Jt=[],mt=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Jt).concat(r)}};function _t(e,t){return e._handlers&&e._handlers[t]||Jt}function Oe(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,o=n&&n[t];if(o){var d=b(o,r);d>-1&&(n[t]=o.slice(0,d).concat(o.slice(d+1)))}}}function De(e,t){var r=_t(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),o=0;o<r.length;++o)r[o].apply(null,n)}function Ze(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),De(e,r||t.type,e,t),at(t)||t.codemirrorIgnore}function Ue(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)b(r,t[n])==-1&&r.push(t[n])}function rt(e,t){return _t(e,t).length>0}function Te(e){e.prototype.on=function(t,r){mt(this,t,r)},e.prototype.off=function(t,r){Oe(this,t,r)}}function Ne(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function $e(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function at(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==0}function tt(e){Ne(e),$e(e)}function wt(e){return e.target||e.srcElement}function it(e){var t=e.which;return t==null&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),F&&e.ctrlKey&&t==1&&(t=3),t}var Rt,Ut,$t=(function(){if(ae&&se<9)return!1;var e=_("div");return"draggable"in e||"dragDrop"in e})();function Yt(e){if(Rt==null){var t=_("span","\u200B");X(e,_("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Rt=t.offsetWidth<=1&&t.offsetHeight>2&&!(ae&&se<8))}
4var r=Rt?_("span","\u200B"):_("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Xt(e){if(Ut!=null)return Ut;var t=X(e,document.createTextNode("A\u062EA")),r=j(t,0,1).getBoundingClientRect(),n=j(t,1,2).getBoundingClientRect();return B(e),!(!r||r.left==r.right)&&(Ut=n.right-r.right<3)}var Bt,ut=` 5 6b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var o=e.indexOf(` 7`,t);o==-1&&(o=e.length);var d=e.slice(t,e.charAt(o-1)=="\r"?o-1:o),U=d.indexOf("\r");U!=-1?(r.push(d.slice(0,U)),t+=U+1):(r.push(d),t=o+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Zt=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!(!t||t.parentElement()!=e)&&t.compareEndPoints("StartToEnd",t)!=0},Sn="oncopy"in(Bt=_("div"))||(Bt.setAttribute("oncopy","return;"),typeof Bt.oncopy=="function"),yn=null;function cn(e){if(yn!=null)return yn;var t=X(e,_("span","x")),r=t.getBoundingClientRect(),n=j(t,0,1).getBoundingClientRect();return yn=Math.abs(r.left-n.left)>1}var sn={},tn={};function un(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),sn[e]=t}function In(e,t){tn[e]=t}function _n(e){if(typeof e=="string"&&tn.hasOwnProperty(e))e=tn[e];else if(e&&typeof e.name=="string"&&tn.hasOwnProperty(e.name)){var t=tn[e.name];typeof t=="string"&&(t={name:t}),(e=pe(t,e)).name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return _n("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return _n("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function wn(e,t){t=_n(t);var r=sn[t.name];if(!r)return wn(e,"text/plain");var n=r(e,t);if(An.hasOwnProperty(t.name)){var o=An[t.name];for(var d in o)o.hasOwnProperty(d)&&(n.hasOwnProperty(d)&&(n["_"+d]=n[d]),n[d]=o[d])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var U in t.modeProps)n[U]=t.modeProps[U];return n}var An={};function Tn(e,t){R(t,An.hasOwnProperty(e)?An[e]:An[e]={})}function nn(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var o=t[n];o instanceof Array&&(o=o.concat([])),r[n]=o}return r}function Pn(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Qn(e,t,r){return!e.startState||e.startState(t,r)}var rn=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function ht(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var o=r.children[n],d=o.chunkSize();if(t<d){r=o;break}t-=d}return r.lines[t]}function Fn(e,t,r){var n=[],o=t.line;return e.iter(t.line,r.line+1,(function(d){var U=d.text;o==r.line&&(U=U.slice(0,r.ch)),o==t.line&&(U=U.slice(t.ch)),n.push(U),++o})),n}function qn(e,t,r){var n=[];return e.iter(t,r,(function(o){n.push(o.text)})),n}function dn(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function Kt(e){if(e.parent==null)return null;for(var t=e.parent,r=b(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var o=0;n.children[o]!=t;++o)r+=n.children[o].chunkSize();return r+t.first}function Vt(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var o=e.children[n],d=o.height;if(t<d){e=o;continue e}t-=d,r+=o.chunkSize()}return r}while(!e.lines);for(var U=0;U<e.lines.length;++U){var K=e.lines[U].height;if(t<K)break;t-=K}return r+U}function Rn(e,t){return t>=e.first&&t<e.first+e.size}function Wt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function st(e,t,r){if(r===void 0&&(r=null),!(this instanceof st))return new st(e,t,r);this.line=e,this.ch=t,this.sticky=r}function Nt(e,t){return e.line-t.line||e.ch-t.ch}function be(e,t){return e.sticky==t.sticky&&Nt(e,t)==0}function Pe(e){return st(e.line,e.ch)}function Xe(e,t){return Nt(e,t)<0?t:e}function gt(e,t){return Nt(e,t)<0?e:t}function kt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ft(e,t){if(t.line<e.first)return st(e.first,0);var r=e.first+e.size-1;return t.line>r?st(r,ht(e,r).text.length):qt(t,ht(e,t.line).text.length)}function qt(e,t){var r=e.ch;return r==null||r>t?st(e.line,t):r<0?st(e.line,0):e}function gn(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=ft(e,t[n]);return r}rn.prototype.eol=function(){return this.pos>=this.string.length},rn.prototype.sol=function(){return this.pos==this.lineStart},rn.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},rn.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},rn.prototype.eat=function(e){var t=this.string.charAt(this.pos);if(typeof e=="string"?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},rn.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},rn.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},rn.prototype.skipToEnd=function(){this.pos=this.string.length},rn.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},rn.prototype.backUp=function(e){this.pos-=e},rn.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=k(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?k(this.string,this.lineStart,this.tabSize):0)},rn.prototype.indentation=function(){return k(this.string,null,this.tabSize)-(this.lineStart?k(this.string,this.lineStart,this.tabSize):0)},rn.prototype.match=function(e,t,r){if(typeof e!="string"){var n=this.string.slice(this.pos).match(e);return n&&n.index>
vendor: 4,867 bytes, line 7
70?null:(n&&t!==!1&&(this.pos+=n[0].length),n)}var o=function(d){return r?d.toLowerCase():d};if(o(this.string.substr(this.pos,e.length))==o(e))return t!==!1&&(this.pos+=e.length),!0},rn.prototype.current=function(){return this.string.slice(this.start,this.pos)},rn.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},rn.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},rn.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var kn=function(e,t){this.state=e,this.lookAhead=t},Vn=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function er(e,t,r,n){var o=[e.state.modeGen],d={};fr(e,t.text,e.doc.mode,r,(function(ge,je){return o.push(ge,je)}),d,n);for(var U=r.state,K=function(ge){r.baseTokens=o;var je=e.state.overlays[ge],Ae=1,Ve=0;r.state=!0,fr(e,t.text,je.mode,r,(function(Be,Ye){for(var ot=Ae;Ve<Be;){var lt=o[Ae];lt>Be&&o.splice(Ae,1,Be,o[Ae+1],lt),Ae+=2,Ve=Math.min(Be,lt)}if(Ye)if(je.opaque)o.splice(ot,Ae-ot,Be,"overlay "+Ye),Ae=ot+2;else for(;ot<Ae;ot+=2){var Ot=o[ot+1];o[ot+1]=(Ot?Ot+" ":"")+"overlay "+Ye}}),d),r.state=U,r.baseTokens=null,r.baseTokenPos=1},he=0;he<e.state.overlays.length;++he)K(he);return{styles:o,classes:d.bgClass||d.textClass?d:null}}function cr(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=Wn(e,Kt(t)),o=t.text.length>e.options.maxHighlightLength&&nn(e.doc.mode,n.state),d=er(e,t,n);o&&(n.state=o),t.stateAfter=n.save(!o),t.styles=d.styles,d.classes?t.styleClasses=d.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Wn(e,t,r){var n=e.doc,o=e.display;if(!n.mode.startState)return new Vn(n,!0,t);var d=L(e,t,r),U=d>n.first&&ht(n,d-1).stateAfter,K=U?Vn.fromSaved(n,U,d):new Vn(n,Qn(n.mode),d);return n.iter(d,t,(function(he){tr(e,he.text,K);var ge=K.line;he.stateAfter=ge==t-1||ge%5==0||ge>=o.viewFrom&&ge<o.viewTo?K.save():null,K.nextLine()})),r&&(n.modeFrontier=K.line),K}function tr(e,t,r,n){var o=e.doc.mode,d=new rn(t,e.options.tabSize,r);for(d.start=d.pos=n||0,t==""&&ur(o,r.state);!d.eol();)nr(o,d,r.state),d.start=d.pos}function ur(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Pn(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function nr(e,t,r,n){for(var o=0;o<10;o++){n&&(n[0]=Pn(e,r).mode);var d=e.token(t,r);if(t.pos>t.start)return d}throw new Error("Mode "+e.name+" failed to advance stream.")}Vn.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Vn.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Vn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Vn.fromSaved=function(e,t,r){return t instanceof kn?new Vn(e,nn(e.mode,t.state),r,t.lookAhead):new Vn(e,nn(e.mode,t),r)},Vn.prototype.save=function(e){var t=e!==!1?nn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new kn(t,this.maxLookAhead):t};var Qt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Bn(e,t,r,n){var o,d,U=e.doc,K=U.mode,he=ht(U,(t=ft(U,t)).line),ge=Wn(e,t.line,r),je=new rn(he.text,e.options.tabSize,ge);for(n&&(d=[]);(n||je.pos<t.ch)&&!je.eol();)je.start=je.pos,o=nr(K,je,ge.state),n&&d.push(new Qt(je,o,nn(U.mode,ge.state)));return n?d:new Qt(je,o,ge.state)}function rr(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";t[n]==null?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function fr(e,t,r,n,o,d,U){var K=r.flattenSpans;K==null&&(K=e.options.flattenSpans);var he,ge=0,je=null,Ae=new rn(t,e.options.tabSize,n),Ve=e.options.addModeClass&&[null];for(t==""&&rr(ur(r,n.state),d);!Ae.eol();){if(Ae.pos>e.options.maxHighlightLength?(K=!1,U&&tr(e,t,n,Ae.pos),Ae.pos=t.length,he=null):he=rr(nr(r,Ae,n.state,Ve),d),Ve){var Be=Ve[0].name;Be&&(he="m-"+(he?Be+" "+he:Be))}if(!K||je!=he){for(;ge<Ae.start;)o(ge=Math.min(Ae.start,ge+5e3),je);je=he}Ae.start=Ae.pos}for(;ge<Ae.pos;){var Ye=Math.min(Ae.pos,ge+5e3);o(Ye,je),ge=Ye}}function L(e,t,r){for(var n,o,d=e.doc,U=r?-1:t-(e.doc.mode.innerMode?1e3:100),K=t;K>U;--K){if(K<=d.first)return d.first;var he=ht(d,K-1),ge=he.stateAfter;if(ge&&(!r||K+(ge instanceof kn?ge.lookAhead:0)<=d.modeFrontier))return K;var je=k(he.text,null,e.options.tabSize);(o==null||n>je)&&(o=K-1,n=je)}return o}
7function V(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var o=ht(e,n).stateAfter;if(o&&(!(o instanceof kn)||n+o.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}var u=!1,i=!1;function T(){u=!0}function le(){i=!0}function ve(e,t,r){this.marker=e,this.from=t,this.to=r}function _e(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Le(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Ke(e,t,r){var n=r&&window.WeakSet&&(r.markedSpans||(r.markedSpans=new WeakSet));n&&n.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],n&&n.add(e.markedSpans)),t.marker.attachLine(e)}function qe(e,t,r){var n;if(e)for(var o=0;o<e.length;++o){var d=e[o],U=d.marker;if(d.from==null||(U.inclusiveLeft?d.from<=t:d.from<t)||d.from==t&&U.type=="bookmark"&&(!r||!d.marker.insertLeft)){var K=d.to==null||(U.inclusiveRight?d.to>=t:d.to>t);(n||(n=[])).push(new ve(U,d.from,K?null:d.to))}}return n}function Je(e,t,r){var n;if(e)for(var o=0;o<e.length;++o){var d=e[o],U=d.marker;if(d.to==null||(U.inclusiveRight?d.to>=t:d.to>t)||d.from==t&&U.type=="bookmark"&&(!r||d.marker.insertLeft)){var K=d.from==null||(U.inclusiveLeft?d.from<=t:d.from<t);(n||(n=[])).push(new ve(U,K?null:d.from-t,d.to==null?null:d.to-t))}}return n}function Qe(e,t){if(t.full)return null;var r=Rn(e,t.from.line)&&ht(e,t.from.line).markedSpans,n=Rn(e,t.to.line)&&ht(e,t.to.line).markedSpans;if(!r&&!n)return null;var o=t.from.ch,d=t.to.ch,U=Nt(t.from,t.to)==0,K=qe(r,o,U),he=Je(n,d,U),ge=t.text.length==1,je=a(t.text).length+(ge?o:0);if(K)for(var Ae=0;Ae<K.length;++Ae){var Ve=K[Ae];if(Ve.to==null){var Be=_e(he,Ve.marker);Be?ge&&(Ve.to=Be.to==null?null:Be.to+je):Ve.to=o}}if(he)for(var Ye=0;Ye<he.length;++Ye){var ot=he[Ye];ot.to!=null&&(ot.to+=je),ot.from==null?_e(K,ot.marker)||(ot.from=je,ge&&(K||(K=[])).push(ot)):(ot.from+=je,ge&&(K||(K=[])).push(ot))}K&&(K=ct(K)),he&&he!=K&&(he=ct(he));var lt=[K];if(!ge){var Ot,Tt=t.text.length-2;if(Tt>0&&K)for(var vt=0;vt<K.length;++vt)K[vt].to==null&&(Ot||(Ot=[])).push(new ve(K[vt].marker,null,null));for(var At=0;At<Tt;++At)lt.push(Ot);lt.push(he)}return lt}function ct(e){for(var t=0;t<e.length;++t){var r=e[t];r.from!=null&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Ct(e,t,r){var n=null;if(e.iter(t.line,r.line+1,(function(Be){if(Be.markedSpans)for(var Ye=0;Ye<Be.markedSpans.length;++Ye){var ot=Be.markedSpans[Ye].marker;!ot.readOnly||n&&b(n,ot)!=-1||(n||(n=[])).push(ot)}})),!n)return null;for(var o=[{from:t,to:r}],d=0;d<n.length;++d)for(var U=n[d],K=U.find(0),he=0;he<o.length;++he){var ge=o[he];if(!(Nt(ge.to,K.from)<0||Nt(ge.from,K.to)>0)){var je=[he,1],Ae=Nt(ge.from,K.from),Ve=Nt(ge.to,K.to);(Ae<0||!U.inclusiveLeft&&!Ae)&&je.push({from:ge.from,to:K.from}),(Ve>0||!U.inclusiveRight&&!Ve)&&je.push({from:K.to,to:ge.to}),o.splice.apply(o,je),he+=je.length-3}}return o}function Mt(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function It(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Gt(e){return e.inclusiveLeft?-1:0}function on(e){return e.inclusiveRight?1:0}function ln(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),o=t.find(),d=Nt(n.from,o.from)||Gt(e)-Gt(t);if(d)return-d;var U=Nt(n.to,o.to)||on(e)-on(t);return U||t.id-e.id}function zt(e,t){var r,n=i&&e.markedSpans;if(n)for(var o=void 0,d=0;d<n.length;++d)(o=n[d]).marker.collapsed&&(t?o.from:o.to)==null&&(!r||ln(r,o.marker)<0)&&(r=o.marker);return r}function an(e){return zt(e,!0)}function xn(e){return zt(e,!1)}function hr(e,t){var r,n=i&&e.markedSpans;if(n)for(var o=0;o<n.length;++o){var d=n[o];d.marker.collapsed&&(d.from==null||d.from<t)&&(d.to==null||d.to>t)&&(!r||ln(r,d.marker)<0)&&(r=d.marker)}return r}function Gn(e,t,r,n,o){var d=ht(e,t),U=i&&d.markedSpans;if(U)for(var K=0;K<U.length;++K){var he=U[K];if(he.marker.collapsed){var ge=he.marker.find(0),je=Nt(ge.from,r)||Gt(he.marker)-Gt(o),Ae=Nt(ge.to,n)||on(he.marker)-on(o);if(!(je>=0&&Ae<=0||je<=0&&Ae>=0)&&(je<=0&&(he.marker.inclusiveRight&&o.inclusiveLeft?Nt(ge.to,r)>=0:Nt(ge.to,r)>0)||je>=0&&(he.marker.inclusiveRight&&o.inclusiveLeft?Nt(ge.from,n)<=0:Nt(ge.from,n)<0)))return!0}}}function mn(e){for(var t;t=an(e);)e=t.find(-1,!0).line;return e}function $n(e){for(var t;t=xn(e);)e=t.find(1,!0).line;return e}function yr(e){for(var t,r;t=xn(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function Pt(e,t){var r=ht(e,t),n=mn(r);return r==n?t:Kt(n)}function xt(e,t){if(t>
vendor: 10,142 bytes, lines 7-8
7e.lastLine())return t;var r,n=ht(e,t);if(!Lt(e,n))return t;for(;r=xn(n);)n=r.find(1,!0).line;return Kt(n)+1}function Lt(e,t){var r=i&&t.markedSpans;if(r){for(var n=void 0,o=0;o<r.length;++o)if((n=r[o]).marker.collapsed&&(n.from==null||!n.marker.widgetNode&&n.from==0&&n.marker.inclusiveLeft&&Dt(e,t,n)))return!0}}function Dt(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return Dt(e,n.line,_e(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var o=void 0,d=0;d<t.markedSpans.length;++d)if((o=t.markedSpans[d]).marker.collapsed&&!o.marker.widgetNode&&o.from==r.to&&(o.to==null||o.to!=r.from)&&(o.marker.inclusiveLeft||r.marker.inclusiveRight)&&Dt(e,t,o))return!0}function fn(e){for(var t=0,r=(e=mn(e)).parent,n=0;n<r.lines.length;++n){var o=r.lines[n];if(o==e)break;t+=o.height}for(var d=r.parent;d;d=(r=d).parent)for(var U=0;U<d.children.length;++U){var K=d.children[U];if(K==r)break;t+=K.height}return t}function Kn(e){if(e.height==0)return 0;for(var t,r=e.text.length,n=e;t=an(n);){var o=t.find(0,!0);n=o.from.line,r+=o.from.ch-o.to.ch}for(n=e;t=xn(n);){var d=t.find(0,!0);r-=n.text.length-d.from.ch,r+=(n=d.to.line).text.length-d.to.ch}return r}function dr(e){var t=e.display,r=e.doc;t.maxLine=ht(r,r.first),t.maxLineLength=Kn(t.maxLine),t.maxLineChanged=!0,r.iter((function(n){var o=Kn(n);o>t.maxLineLength&&(t.maxLineLength=o,t.maxLine=n)}))}var Yn=function(e,t,r){this.text=e,It(this,t),this.height=r?r(this):1};function Tr(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Mt(e),It(e,r);var o=n?n(e):1;o!=e.height&&dn(e,o)}function Fr(e){e.parent=null,Mt(e)}Yn.prototype.lineNo=function(){return Kt(this)},Te(Yn);var Vr={},fi={};function Mr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?fi:Vr;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Br(e,t){var r=M("span",null,null,oe?"padding-right: .1px":null),n={pre:M("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var d=o?t.rest[o-1]:t.line,U=void 0;n.pos=0,n.addToken=Lo,Xt(e.display.measure)&&(U=bt(d,e.doc.direction))&&(n.addToken=ro(n.addToken,U)),n.map=[],Ei(d,n,cr(e,d,t!=e.display.externalMeasured&&Kt(d))),d.styleClasses&&(d.styleClasses.bgClass&&(n.bgClass=w(d.styleClasses.bgClass,n.bgClass||"")),d.styleClasses.textClass&&(n.textClass=w(d.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(Yt(e.display.measure))),o==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(oe){var K=n.content.lastChild;(/\bcm-tab\b/.test(K.className)||K.querySelector&&K.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return De(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=w(n.pre.className,n.textClass||"")),n}function br(e){var t=_("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Lo(e,t,r,n,o,d,U){if(t){var K,he=e.splitSpaces?no(t,e.trailingSpace):t,ge=e.cm.state.specialChars,je=!1;if(ge.test(t)){K=document.createDocumentFragment();for(var Ae=0;;){ge.lastIndex=Ae;var Ve=ge.exec(t),Be=Ve?Ve.index-Ae:t.length-Ae;if(Be){var Ye=document.createTextNode(he.slice(Ae,Ae+Be));ae&&se<9?K.appendChild(_("span",[Ye])):K.appendChild(Ye),e.map.push(e.pos,e.pos+Be,Ye),e.col+=Be,e.pos+=Be}if(!Ve)break;Ae+=Be+1;var ot=void 0;if(Ve[0]==" "){var lt=e.cm.options.tabSize,Ot=lt-e.col%lt;(ot=K.appendChild(_("span",N(Ot),"cm-tab"))).setAttribute("role","presentation"),ot.setAttribute("cm-text"," "),e.col+=Ot}else Ve[0]=="\r"||Ve[0]==` 8`?((ot=K.appendChild(_("span",Ve[0]=="\r"?"\u240D":"\u2424","cm-invalidchar"))).setAttribute("cm-text",Ve[0]),e.col+=1):((ot=e.cm.options.specialCharPlaceholder(Ve[0])).setAttribute("cm-text",Ve[0]),ae&&se<9?K.appendChild(_("span",[ot])):K.appendChild(ot),e.col+=1);e.map.push(e.pos,e.pos+1,ot),e.pos++}}else e.col+=t.length,K=document.createTextNode(he),e.map.push(e.pos,e.pos+t.length,K),ae&&se<9&&(je=!0),e.pos+=t.length;if(e.trailingSpace=he.charCodeAt(t.length-1)==32,r||n||o||je||d||U){var Tt=r||"";n&&(Tt+=n),o&&(Tt+=o);var vt=_("span",[K],Tt,d);if(U)for(var At in U)U.hasOwnProperty(At)&&At!="style"&&At!="class"&&vt.setAttribute(At,U[At]);return e.content.appendChild(vt)}e.content.appendChild(K)}}function no(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",o=0;o<e.length;o++){var d=e.charAt(o);d!=" "||!r||o!=e.length-1&&e.charCodeAt(o+1)!=32||(d="\xA0"),n+=d,r=d==" "}return n}function ro(e,t){return function(r,n,o,d,U,K,he){o=o?o+" cm-force-border":"cm-force-border";for(var ge=r.pos,je=ge+n.length;;){for(var Ae=void 0,Ve=0;Ve<t.length&&!((Ae=t[Ve]).to>ge&&Ae.from<=ge);Ve++);if(Ae.to>=je)return e(r,n,o,d,U,K,he);e(r,n.slice(0,Ae.to-ge),o,d,null,K,he),d=null,n=n.slice(Ae.to-ge),ge=Ae.to}}}function io(e,t,r,n){var o=!n&&r.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!n&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",r.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function Ei(e,t,r){var n=e.markedSpans,o=e.text,d=0;if(n)for(var U,K,he,ge,je,Ae,Ve,Be=o.length,Ye=0,ot=1,lt="",Ot=0;;){if(Ot==Ye){he=ge=je=K="",Ve=null,Ae=null,Ot=1/0;for(var Tt=[],vt=void 0,At=0;At<n.length;++At){var jt=n[At],Ft=jt.marker;if(Ft.type=="bookmark"&&jt.from==Ye&&Ft.widgetNode)Tt.push(Ft);else if(jt.from<=Ye&&(jt.to==null||jt.to>Ye||Ft.collapsed&&jt.to==Ye&&jt.from==Ye)){if(jt.to!=null&&jt.to!=Ye&&Ot>jt.to&&(Ot=jt.to,ge=""),Ft.className&&(he+=" "+Ft.className),Ft.css&&(K=(K?K+";":"")+Ft.css),Ft.startStyle&&jt.from==Ye&&(je+=" "+Ft.startStyle),Ft.endStyle&&jt.to==Ot&&(vt||(vt=[])).push(Ft.endStyle,jt.to),Ft.title&&((Ve||(Ve={})).title=Ft.title),Ft.attributes)for(var On in Ft.attributes)(Ve||(Ve={}))[On]=Ft.attributes[On];Ft.collapsed&&(!Ae||ln(Ae.marker,Ft)<0)&&(Ae=jt)}else jt.from>Ye&&Ot>jt.from&&(Ot=jt.from)}if(vt)for(var Cn=0;Cn<vt.length;Cn+=2)vt[Cn+1]==Ot&&(ge+=" "+vt[Cn]);if(!Ae||Ae.from==Ye)for(var xr=0;xr<Tt.length;++xr)io(t,0,Tt[xr]);if(Ae&&(Ae.from||0)==Ye){if(io(t,(Ae.to==null?Be+1:Ae.to)-Ye,Ae.marker,Ae.from==null),Ae.to==null)return;Ae.to==Ye&&(Ae=!1)}}if(Ye>=Be)break;for(var jn=Math.min(Be,Ot);;){if(lt){var Er=Ye+lt.length;if(!Ae){var Or=Er>jn?lt.slice(0,jn-Ye):lt;t.addToken(t,Or,U?U+he:he,je,Ye+Or.length==Ot?ge:"",K,Ve)}if(Er>=jn){lt=lt.slice(jn-Ye),Ye=jn;break}Ye=Er,je=""}lt=o.slice(d,d=r[ot++]),U=Mr(r[ot++],t.cm.options)}}else for(var Ln=1;Ln<r.length;Ln+=2)t.addToken(t,o.slice(d,d=r[Ln]),Mr(r[Ln+1],t.cm.options))}function ji(e,t,r){this.line=t,this.rest=yr(t),this.size=this.rest?Kt(a(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Lt(e,t)}function Hr(e,t,r){for(var n,o=[],d=t;d<r;d=n){var U=new ji(e.doc,ht(e.doc,d),d);n=d+U.size,o.push(U)}return o}var Cr=null;function Lr(e){Cr?Cr.ops.push(e):e.ownsGroup=Cr={ops:[e],delayedCallbacks:[]}}function oo(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var o=e.ops[n];if(o.cursorActivityHandlers)for(;o.cursorActivityCalled<o.cursorActivityHandlers.length;)o.cursorActivityHandlers[o.cursorActivityCalled++].call(null,o.cm)}}while(r<t.length)}function ao(e,t){var r=e.ownsGroup;if(r)try{oo(r)}finally{Cr=null,t(r)}}var zr=null;function Mn(e,t){var r=_t(e,t);if(r.length){var n,o=Array.prototype.slice.call(arguments,2);Cr?n=Cr.delayedCallbacks:zr?n=zr:(n=zr=[],setTimeout(so,0));for(var d=function(K){n.push((function(){return r[K].apply(null,o)}))},U=0;U<r.length;++U)d(U)}}function so(){var e=zr;zr=null;for(var t=0;t<e.length;++t)e[t]()}function Ur(e,t,r,n){for(var o=0;o<t.changes.length;o++){var d=t.changes[o];d=="text"?co(e,t):d=="gutter"?Ai(e,t,r,n):d=="class"?hi(e,t):d=="widget"&&uo(e,t,n)}t.changes=null}function Wr(e){return e.node==e.text&&(e.node=_("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),ae&&se<8&&(e.node.style.zIndex=2)),e.node}function lo(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=Wr(t);t.background=n.insertBefore(_("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function $r(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Br(e,t)}function co(e,t){var r=t.text.className,n=$r(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,hi(e,t)):r&&(t.text.className=r)}function hi(e,t){lo(e,t),t.line.wrapClass?Wr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function Ai(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=Wr(t);t.gutterBackground=_("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var d=t.line.gutterMarkers;if(e.options.lineNumbers||d){var U=Wr(t),K=t.gutter=_("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(K.setAttribute("aria-hidden","true"),e.display.input.setUneditable(K),U.insertBefore(K,t.text),t.line.gutterClass&&(K.className+=" "+t.line.gutterClass),!e.options.lineNumbers||d&&d["CodeMirror-linenumbers"]||(t.lineNumber=K.appendChild(_("div",Wt(e.options,r),"CodeMirror-linenumber C
8odeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),d)for(var he=0;he<e.display.gutterSpecs.length;++he){var ge=e.display.gutterSpecs[he].className,je=d.hasOwnProperty(ge)&&d[ge];je&&K.appendChild(_("div",[je],"CodeMirror-gutter-elt","left: "+n.gutterLeft[ge]+"px; width: "+n.gutterWidth[ge]+"px"))}}}function uo(e,t,r){t.alignable&&(t.alignable=null);for(var n=O("CodeMirror-linewidget"),o=t.node.firstChild,d=void 0;o;o=d)d=o.nextSibling,n.test(o.className)&&t.node.removeChild(o);di(e,t,r)}function Di(e,t,r,n){var o=$r(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),hi(e,t),Ai(e,t,r,n),di(e,t,n),t.node}function di(e,t,r){if(fo(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)fo(e,t.rest[n],t,r,!1)}function fo(e,t,r,n,o){if(t.widgets)for(var d=Wr(r),U=0,K=t.widgets;U<K.length;++U){var he=K[U],ge=_("div",[he.node],"CodeMirror-linewidget"+(he.className?" "+he.className:""));he.handleMouseEvents||ge.setAttribute("cm-ignore-events","true"),Ri(he,ge,r,n),e.display.input.setUneditable(ge),o&&he.above?d.insertBefore(ge,r.gutter||r.text):d.appendChild(ge),Mn(he,"redraw")}}function Ri(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var o=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(o-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=o+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function ti(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!s(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),X(t.display.measure,_("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function ue(e,t){for(var r=wt(t);r!=e.wrapper;r=r.parentNode)if(!r||r.nodeType==1&&r.getAttribute("cm-ignore-events")=="true"||r.parentNode==e.sizer&&r!=e.mover)return!0}function we(e){return e.lineSpace.offsetTop}function Re(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Me(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=X(e.measure,_("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function ze(e){return h-e.display.nativeBarWidth}function Ie(e){return e.display.scroller.clientWidth-ze(e)-e.display.barWidth}function nt(e){return e.display.scroller.clientHeight-ze(e)-e.display.barHeight}function dt(e,t,r){var n=e.options.lineWrapping,o=n&&Ie(e);if(!t.measure.heights||n&&t.measure.width!=o){var d=t.measure.heights=[];if(n){t.measure.width=o;for(var U=t.text.firstChild.getClientRects(),K=0;K<U.length-1;K++){var he=U[K],ge=U[K+1];Math.abs(he.bottom-ge.bottom)>2&&d.push((he.bottom+ge.top)/2-r.top)}}d.push(r.bottom-r.top)}}function Ht(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var o=0;o<e.rest.length;o++)if(Kt(e.rest[o])>r)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}function en(e,t){var r=Kt(t=mn(t)),n=e.display.externalMeasured=new ji(e.doc,t,r);n.lineN=r;var o=n.built=Br(e,n);return n.text=o.pre,X(e.display.lineMeasure,o.pre),n}function En(e,t,r,n){return Sr(e,Zr(e,t),r,n)}function wr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ii(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Zr(e,t){var r=Kt(t),n=wr(e,r);n&&!n.text?n=null:n&&n.changes&&(Ur(e,n,r,Vo(e)),e.curOp.forceUpdate=!0),n||(n=en(e,t));var o=Ht(n,t,r);return{line:t,view:n,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function Sr(e,t,r,n,o){t.before&&(r=-1);var d,U=r+(n||"");
8return t.cache.hasOwnProperty(U)?d=t.cache[U]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(dt(e,t.view,t.rect),t.hasHeights=!0),(d=zs(e,t,r,n)).bogus||(t.cache[U]=d)),{left:d.left,right:d.right,top:o?d.rtop:d.top,bottom:o?d.rbottom:d.bottom}}var ni,va={left:0,right:0,top:0,bottom:0};function ma(e,t,r){for(var n,o,d,U,K,he,ge=0;ge<e.length;ge+=3)if(K=e[ge],he=e[ge+1],t<K?(o=0,d=1,U="left"):t<he?d=(o=t-K)+1:(ge==e.length-3||t==he&&e[ge+3]>t)&&(o=(d=he-K)-1,t>=he&&(U="right")),o!=null){if(n=e[ge+2],K==he&&r==(n.insertLeft?"left":"right")&&(U=r),r=="left"&&o==0)for(;ge&&e[ge-2]==e[ge-3]&&e[ge-1].insertLeft;)n=e[(ge-=3)+2],U="left";if(r=="right"&&o==he-K)for(;ge<e.length-3&&e[ge+3]==e[ge+4]&&!e[ge+5].insertLeft;)n=e[(ge+=3)+2],U="right";break}return{node:n,start:o,end:d,collapse:U,coverStart:K,coverEnd:he}}function Hs(e,t){var r=va;if(t=="left")for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var o=e.length-1;o>=0&&(r=e[o]).left==r.right;o--);return r}function zs(e,t,r,n){var o,d=ma(t.map,r,n),U=d.node,K=d.start,he=d.end,ge=d.collapse;if(U.nodeType==3){for(var je=0;je<4;je++){for(;K&&Ee(t.line.text.charAt(d.coverStart+K));)--K;for(;d.coverStart+he<d.coverEnd&&Ee(t.line.text.charAt(d.coverStart+he));)++he;if((o=ae&&se<9&&K==0&&he==d.coverEnd-d.coverStart?U.parentNode.getBoundingClientRect():Hs(j(U,K,he).getClientRects(),n)).left||o.right||K==0)break;he=K,K-=1,ge="right"}ae&&se<11&&(o=Us(e.display.measure,o))}else{var Ae;K>0&&(ge=n="right"),o=e.options.lineWrapping&&(Ae=U.getClientRects()).length>1?Ae[n=="right"?Ae.length-1:0]:U.getBoundingClientRect()}if(ae&&se<9&&!K&&(!o||!o.left&&!o.right)){var Ve=U.parentNode.getClientRects()[0];o=Ve?{left:Ve.left,right:Ve.left+gi(e.display),top:Ve.top,bottom:Ve.bottom}:va}for(var Be=o.top-t.rect.top,Ye=o.bottom-t.rect.top,ot=(Be+Ye)/2,lt=t.view.measure.heights,Ot=0;Ot<lt.length-1&&!(ot<lt[Ot]);Ot++);var Tt=Ot?lt[Ot-1]:0,vt=lt[Ot],At={left:(ge=="right"?o.right:o.left)-t.rect.left,right:(ge=="left"?o.left:o.right)-t.rect.left,top:Tt,bottom:vt};return o.left||o.right||(At.bogus=!0),e.options.singleCursorHeightPerLine||(At.rtop=Be,At.rbottom=Ye),At}function Us(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!cn(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function ya(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function ba(e){e.display.externalMeasure=null,B(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)ya(e.display.view[t])}function Mi(e){ba(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function wa(){return I&&re?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ka(){return I&&re?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Zo(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=ti(e.widgets[r]));return t}function ho(e,t,r,n,o){if(!o){var d=Zo(t);r.top+=d,r.bottom+=d}if(n=="line")return r;n||(n="local");var U=fn(t);if(n=="local"?U+=we(e.display):U-=e.display.viewOffset,n=="page"||n=="window"){var K=e.display.lineSpace.getBoundingClientRect();U+=K.top+(n=="window"?0:ka());var he=K.left+(n=="window"?0:wa());r.left+=he,r.right+=he}return r.top+=U,r.bottom+=U,r}function xa(e,t,r){if(r=="div")return t;var n=t.left,o=t.top;if(r=="page")n-=wa(),o-=ka();else if(r=="local"||!r){var d=e.display.sizer.getBoundingClientRect();n+=d.left,o+=d.top}var U=e.display.lineSpace.getBoundingClientRect();return{left:n-U.left,top:o-U.top}}function po(e,t,r,n,o){return n||(n=ht(e.doc,t.line)),ho(e,n,En(e,n,t.ch,o),r)}function jr(e,t,r,n,o,d){function U(Ye,ot){var lt=Sr(e,o,Ye,ot?"right":"left",d);return ot?lt.left=lt.right:lt.right=lt.left,ho(e,n,lt,r)}n=n||ht(e.doc,t.line),o||(o=Zr(e,n));
vendor: 4,271 bytes, line 8
8var K=bt(n,e.doc.direction),he=t.ch,ge=t.sticky;if(he>=n.text.length?(he=n.text.length,ge="before"):he<=0&&(he=0,ge="after"),!K)return U(ge=="before"?he-1:he,ge=="before");function je(Ye,ot,lt){return U(lt?Ye-1:Ye,K[ot].level==1!=lt)}var Ae=yt(K,he,ge),Ve=Ge,Be=je(he,Ae,ge=="before");return Ve!=null&&(Be.other=je(he,Ve,ge!="before")),Be}function Oa(e,t){var r=0;t=ft(e.doc,t),e.options.lineWrapping||(r=gi(e.display)*t.ch);var n=ht(e.doc,t.line),o=fn(n)+we(e.display);return{left:r,right:r,top:o,bottom:o+n.height}}function No(e,t,r,n,o){var d=st(e,t,r);return d.xRel=o,n&&(d.outside=n),d}function Io(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return No(n.first,0,null,-1,-1);var o=Vt(n,r),d=n.first+n.size-1;if(o>d)return No(n.first+n.size-1,ht(n,d).text.length,null,1,1);t<0&&(t=0);for(var U=ht(n,o);;){var K=Ws(e,U,o,t,r),he=hr(U,K.ch+(K.xRel>0||K.outside>0?1:0));if(!he)return K;var ge=he.find(1);if(ge.line==o)return ge;U=ht(n,o=ge.line)}}function Ca(e,t,r,n){n-=Zo(t);var o=t.text.length,d=He((function(U){return Sr(e,r,U-1).bottom<=n}),o,0);return{begin:d,end:o=He((function(U){return Sr(e,r,U).top>n}),d,o)}}function Sa(e,t,r,n){return r||(r=Zr(e,t)),Ca(e,t,r,ho(e,t,Sr(e,r,n),"line").top)}function Fo(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Ws(e,t,r,n,o){o-=fn(t);var d=Zr(e,t),U=Zo(t),K=0,he=t.text.length,ge=!0,je=bt(t,e.doc.direction);if(je){var Ae=(e.options.lineWrapping?qs:$s)(e,t,r,d,je,n,o);K=(ge=Ae.level!=1)?Ae.from:Ae.to-1,he=ge?Ae.to:Ae.from-1}var Ve,Be,Ye=null,ot=null,lt=He((function(jt){var Ft=Sr(e,d,jt);return Ft.top+=U,Ft.bottom+=U,!!Fo(Ft,n,o,!1)&&(Ft.top<=o&&Ft.left<=n&&(Ye=jt,ot=Ft),!0)}),K,he),Ot=!1;if(ot){var Tt=n-ot.left<ot.right-n,vt=Tt==ge;lt=Ye+(vt?0:1),Be=vt?"after":"before",Ve=Tt?ot.left:ot.right}else{ge||lt!=he&<!=K||lt++,Be=lt==0?"after":lt==t.text.length?"before":Sr(e,d,lt-(ge?1:0)).bottom+U<=o==ge?"after":"before";var At=jr(e,st(r,lt,Be),"line",t,d);Ve=At.left,Ot=o<At.top?-1:o>=At.bottom?1:0}return No(r,lt=Fe(t.text,lt,1),Be,Ot,n-Ve)}function $s(e,t,r,n,o,d,U){var K=He((function(Ae){var Ve=o[Ae],Be=Ve.level!=1;return Fo(jr(e,st(r,Be?Ve.to:Ve.from,Be?"before":"after"),"line",t,n),d,U,!0)}),0,o.length-1),he=o[K];if(K>0){var ge=he.level!=1,je=jr(e,st(r,ge?he.from:he.to,ge?"after":"before"),"line",t,n);Fo(je,d,U,!0)&&je.top>U&&(he=o[K-1])}return he}function qs(e,t,r,n,o,d,U){var K=Ca(e,t,n,U),he=K.begin,ge=K.end;/\s/.test(t.text.charAt(ge-1))&&ge--;for(var je=null,Ae=null,Ve=0;Ve<o.length;Ve++){var Be=o[Ve];if(!(Be.from>=ge||Be.to<=he)){var Ye=Sr(e,n,Be.level!=1?Math.min(ge,Be.to)-1:Math.max(he,Be.from)).right,ot=Ye<d?d-Ye+1e9:Ye-d;(!je||Ae>ot)&&(je=Be,Ae=ot)}}return je||(je=o[o.length-1]),je.from<he&&(je={from:he,to:je.to,level:je.level}),je.to>ge&&(je={from:je.from,to:ge,level:je.level}),je}function pi(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(ni==null){ni=_("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)ni.appendChild(document.createTextNode("x")),ni.appendChild(_("br"));ni.appendChild(document.createTextNode("x"))}X(e.measure,ni);var r=ni.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),B(e.measure),r||1}function gi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=_("span","xxxxxxxxxx"),r=_("pre",[t],"CodeMirror-line-like");X(e.measure,r);var n=t.getBoundingClientRect(),o=(n.right-n.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function Vo(e){for(var t=e.display,r={},n={},o=t.gutters.clientLeft,d=t.gutters.firstChild,U=0;d;d=d.nextSibling,++U){var K=e.display.gutterSpecs[U].className;r[K]=d.offsetLeft+d.clientLeft+o,n[K]=d.clientWidth}return{fixedPos:Bo(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function Bo(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function _a(e){var t=pi(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/gi(e.display)-3);return function(o){if(Lt(e.doc,o))return 0;var d=0;if(o.widgets)for(var U=0;U<o.widgets.length;U++)o.widgets[U].height&&(d+=o.widgets[U].height);return r?d+(Math.ceil(o.text.length/n)||1)*t:d+t}}function Ho(e){var t=e.doc,r=_a(e);t.iter((function(n){var o=r(n);o!=n.height&&dn(n,o)}))}function ri(e,t,r,n){var o=e.display;
8if(!r&&wt(t).getAttribute("cm-not-content")=="true")return null;var d,U,K=o.lineSpace.getBoundingClientRect();try{d=t.clientX-K.left,U=t.clientY-K.top}catch{return null}var he,ge=Io(e,d,U);if(n&&ge.xRel>0&&(he=ht(e.doc,ge.line).text).length==ge.ch){var je=k(he,he.length,e.options.tabSize)-he.length;ge=st(ge.line,Math.max(0,Math.round((d-Me(e.display).left)/gi(e.display))-je))}return ge}function ii(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function pr(e,t,r,n){t==null&&(t=e.doc.first),r==null&&(r=e.doc.first+e.doc.size),n||(n=0);var o=e.display;if(n&&r<o.viewTo&&(o.updateLineNumbers==null||o.updateLineNumbers>t)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)i&&Pt(e.doc,t)<o.viewTo&&Gr(e);else if(r<=o.viewFrom)i&&xt(e.doc,r+n)>o.viewFrom?Gr(e):(o.viewFrom+=n,o.viewTo+=n);else if(t<=o.viewFrom&&r>=o.viewTo)Gr(e);else if(t<=o.viewFrom){var d=go(e,r,r+n,1);d?(o.view=o.view.slice(d.index),o.viewFrom=d.lineN,o.viewTo+=n):Gr(e)}else if(r>=o.viewTo){var U=go(e,t,t,-1);U?(o.view=o.view.slice(0,U.index),o.viewTo=U.lineN):Gr(e)}else{var K=go(e,t,t,-1),he=go(e,r,r+n,1);K&&he?(o.view=o.view.slice(0,K.index).concat(Hr(e,K.lineN,he.lineN)).concat(o.view.slice(he.index)),o.viewTo+=n):Gr(e)}var ge=o.externalMeasured;ge&&(r<ge.lineN?ge.lineN+=n:t<ge.lineN+ge.size&&(o.externalMeasured=null))}function qr(e,t,r){e.curOp.viewChanged=!0;var n=e.display,o=e.display.externalMeasured;if(o&&t>=o.lineN&&t<o.lineN+o.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var d=n.view[ii(e,t)];if(d.node!=null){var U=d.changes||(d.changes=[]);b(U,r)==-1&&U.push(r)}}}function Gr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function go(e,t,r,n){var o,d=ii(e,t),U=e.display.view;if(!i||r==e.doc.first+e.doc.size)return{index:d,lineN:r};for(var K=e.display.viewFrom,he=0;he<d;he++)K+=U[he].size;if(K!=t){if(n>0){if(d==U.length-1)return null;o=K+U[d].size-t,d++}else o=K-t;t+=o,r+=o}for(;Pt(e.doc,r)!=r;){if(d==(n<0?0:U.length-1))return null;r+=n*U[d-(n<0?1:0)].size,d+=n}return{index:d,lineN:r}}function Gs(e,t,r){var n=e.display;n.view.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=Hr(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Hr(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(ii(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Hr(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,ii(e,r)))),n.viewTo=r}function Pa(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var o=t[n];o.hidden||o.node&&!o.changes||++r}return r}function Li(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ta(e,t){t===void 0&&(t=!0);for(var r=e.doc,n={},o=n.cursors=document.createDocumentFragment(),d=n.selection=document.createDocumentFragment(),U=0;U<r.sel.ranges.length;U++)if(t||U!=r.sel.primIndex){var K=r.sel.ranges[U];if(!(K.from().line>=e.display.viewTo||K.to().line<e.display.viewFrom)){var he=K.empty();(he||e.options.showCursorWhenSelecting)&&Ea(e,K.head,o),he||Ks(e,K,d)}}return n}function Ea(e,t,r){var n=jr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=r.appendChild(_("div","\xA0","CodeMirror-cursor"));if(o.style.left=n.left+"px",o.style.top=n.top+"px",o.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var d=po(e,t,"div",null,null);d.right-d.left>0&&(o.style.width=d.right-d.left+"px")}if(n.other){var U=r.appendChild(_("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));U.style.display="",U.style.left=n.other.left+"px",U.style.top=n.other.top+"px",U.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function vo(e,t){return e.top-t.top||e.left-t.left}function Ks(e,t,r){var n=e.display,o=e.doc,d=document.createDocumentFragment(),U=Me(e.display),K=U.left,he=Math.max(n.sizerWidth,Ie(e)-n.sizer.offsetLeft)-U.right,ge=o.direction=="ltr";function je(vt,At,jt,Ft){At<0&&(At=0),At=Math.round(At),Ft=Math.round(Ft),d.appendChild(_("div",null,"CodeMirror-selected","position: absolute; left: "+vt+`px; 9 top: `+At+"px; width: "+(jt??he-vt)+`px; 10 height: `+(Ft-At)+"px"))}function Ae(vt,At,jt){var Ft,On,Cn=ht(o,vt),xr=Cn.text.length;function jn(Ln,vr){return po(e,st(vt,Ln),"div",Cn,vr)}function Er(Ln,vr,sr){var Hn=Sa(e,Cn,null,Ln),Nn=vr=="ltr"==(sr=="after")?"left":"right";return jn(sr=="after"?Hn.begin:Hn.end-(/\s/.test(Cn.text.charAt(Hn.end-1))?2:1),Nn)[Nn]}var Or=bt(Cn,o.direction);return et(Or,At||0,jt??xr,(function(Ln,vr,sr,Hn){var Nn=sr=="ltr",zn=jn(Ln,Nn?"left":"right"),mr=jn(vr-1,Nn?"right":"left"),ei=At==null&&Ln==0,Rr=jt==null&&vr==xr,or=Hn==0,Un=!Or||Hn==Or.length-1;
vendor: 59,024 bytes, lines 10-14
10if(mr.top-zn.top<=3){var pa=(ge?Rr:ei)&&Un,Ir=(ge?ei:Rr)&&or?K:(Nn?zn:mr).left,ci=pa?he:(Nn?mr:zn).right;je(Ir,zn.top,ci-Ir,zn.bottom)}else{var ui,lr,Ti,ga;Nn?(ui=ge&&ei&&or?K:zn.left,lr=ge?he:Er(Ln,sr,"before"),Ti=ge?K:Er(vr,sr,"after"),ga=ge&&Rr&&Un?he:mr.right):(ui=ge?Er(Ln,sr,"before"):K,lr=!ge&&ei&&or?he:zn.right,Ti=!ge&&Rr&&Un?K:mr.left,ga=ge?Er(vr,sr,"after"):he),je(ui,zn.top,lr-ui,zn.bottom),zn.bottom<mr.top&&je(K,zn.bottom,null,mr.top),je(Ti,mr.top,ga-Ti,mr.bottom)}(!Ft||vo(zn,Ft)<0)&&(Ft=zn),vo(mr,Ft)<0&&(Ft=mr),(!On||vo(zn,On)<0)&&(On=zn),vo(mr,On)<0&&(On=mr)})),{start:Ft,end:On}}var Ve=t.from(),Be=t.to();if(Ve.line==Be.line)Ae(Ve.line,Ve.ch,Be.ch);else{var Ye=ht(o,Ve.line),ot=ht(o,Be.line),lt=mn(Ye)==mn(ot),Ot=Ae(Ve.line,Ve.ch,lt?Ye.text.length+1:null).end,Tt=Ae(Be.line,lt?0:null,Be.ch).start;lt&&(Ot.top<Tt.top-2?(je(Ot.right,Ot.top,null,Ot.bottom),je(K,Tt.top,Tt.left,Tt.bottom)):je(Ot.right,Ot.top,Tt.left-Ot.right,Ot.bottom)),Ot.bottom<Tt.top&&je(K,Ot.bottom,null,Tt.top)}r.appendChild(d)}function zo(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||vi(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function ja(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Wo(e))}function Uo(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&vi(e))}),100)}function Wo(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(De(e,"focus",e,t),e.state.focused=!0,f(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),oe&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),zo(e))}function vi(e,t){e.state.delayingBlurEvent||(e.state.focused&&(De(e,"blur",e,t),e.state.focused=!1,E(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function mo(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),o=t.lineDiv.getBoundingClientRect().top,d=0,U=0;U<t.view.length;U++){var K=t.view[U],he=e.options.lineWrapping,ge=void 0,je=0;if(!K.hidden){if(o+=K.line.height,ae&&se<8){var Ae=K.node.offsetTop+K.node.offsetHeight;ge=Ae-r,r=Ae}else{var Ve=K.node.getBoundingClientRect();ge=Ve.bottom-Ve.top,!he&&K.text.firstChild&&(je=K.text.firstChild.getBoundingClientRect().right-Ve.left-1)}var Be=K.line.height-ge;if((Be>.005||Be<-.005)&&(o<n&&(d-=Be),dn(K.line,ge),Aa(K.line),K.rest))for(var Ye=0;Ye<K.rest.length;Ye++)Aa(K.rest[Ye]);if(je>e.display.sizerWidth){var ot=Math.ceil(je/gi(e.display));ot>e.display.maxLineLength&&(e.display.maxLineLength=ot,e.display.maxLine=K.line,e.display.maxLineChanged=!0)}}}Math.abs(d)>2&&(t.scroller.scrollTop+=d)}function Aa(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function yo(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-we(e));var o=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,d=Vt(t,n),U=Vt(t,o);if(r&&r.ensure){var K=r.ensure.from.line,he=r.ensure.to.line;K<d?(d=K,U=Vt(t,fn(ht(t,K))+e.wrapper.clientHeight)):Math.min(he,t.lastLine())>=U&&(d=Vt(t,fn(ht(t,he))-e.wrapper.clientHeight),U=he)}return{from:d,to:Math.max(U,d+1)}}function Ys(e,t){if(!Ze(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),o=null;if(t.top+n.top<0?o=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),o!=null&&!A){var d=_("div","\u200B",null,`position: absolute; 11 top: `+(t.top-r.viewOffset-we(e.display))+`px; 12 height: `+(t.bottom-t.top+ze(e)+r.barHeight)+`px; 13 left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(d),d.scrollIntoView(o),e.display.lineSpace.removeChild(d)}}}function Xs(e,t,r,n){var o;n==null&&(n=0),e.options.lineWrapping||t!=r||(r=t.sticky=="before"?st(t.line,t.ch+1,"before"):t,t=t.ch?st(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var d=0;d<5;d++){var U=!1,K=jr(e,t),he=r&&r!=t?jr(e,r):K,ge=$o(e,o={left:Math.min(K.left,he.left),top:Math.min(K.top,he.top)-n,right:Math.max(K.left,he.left),bottom:Math.max(K.bottom,he.bottom)+n}),je=e.doc.scrollTop,Ae=e.doc.scrollLeft;if(ge.scrollTop!=null&&(Ni(e,ge.scrollTop),Math.abs(e.doc.scrollTop-je)>1&&(U=!0)),ge.scrollLeft!=null&&(oi(e,ge.scrollLeft),Math.abs(e.doc.scrollLeft-Ae)>1&&(U=!0)),!U)break}return o}function Js(e,t){var r=$o(e,t);r.scrollTop!=null&&Ni(e,r.scrollTop),r.scrollLeft!=null&&oi(e,r.scrollLeft)}function $o(e,t){var r=e.display,n=pi(e.display);t.top<0&&(t.top=0);var o=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,d=nt(e),U={};t.bottom-t.top>d&&(t.bottom=t.top+d);var K=e.doc.height+Re(r),he=t.top<n,ge=t.bottom>K-n;if(t.top<o)U.scrollTop=he?0:t.top;else if(t.bottom>o+d){var je=Math.min(t.top,(ge?K:t.bottom)-d);je!=o&&(U.scrollTop=je)}var Ae=e.options.fixedGutter?0:r.gutters.offsetWidth,Ve=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-Ae,Be=Ie(e)-r.gutters.offsetWidth,Ye=t.right-t.left>Be;return Ye&&(t.right=t.left+Be),t.left<10?U.scrollLeft=0:t.left<Ve?U.scrollLeft=Math.max(0,t.left+Ae-(Ye?0:10)):t.right>Be+Ve-3&&(U.scrollLeft=t.right+(Ye?0:10)-Be),U}function qo(e,t){t!=null&&(bo(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function mi(e){bo(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Zi(e,t,r){t==null&&r==null||bo(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Qs(e,t){bo(e),e.curOp.scrollToPos=t}function bo(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Da(e,Oa(e,t.from),Oa(e,t.to),t.margin))}function Da(e,t,r,n){var o=$o(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Zi(e,o.scrollLeft,o.scrollTop)}function Ni(e,t){Math.abs(e.doc.scrollTop-t)<2||(fe||Ko(e,{top:t}),Ra(e,t,!0),fe&&Ko(e),Vi(e,100))}function Ra(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function oi(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Ia(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Ii(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Re(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+ze(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var ai=function(e,t,r){this.cm=r;var n=this.vert=_("div",[_("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=_("div",[_("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=o.tabIndex=-1,e(n),e(o),mt(n,"scroll",(function(){n.clientHeight&&t(n.scrollTop,"vertical")})),mt(o,"scroll",(function(){o.clientWidth&&t(o.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,ae&&se<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ai.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var o=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var d=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+d)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},ai.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ai.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ai.prototype.zeroWidthHack=function(){var e=F&&!x?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new v,this.disableVert=new v},ai.prototype.enableZeroWidthBar=function(e,t,r){function n(){var o=e.getBoundingClientRect();(r=="vert"?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},ai.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Fi=function(){};function yi(e,t){t||(t=Ii(e));var r=e.display.barWidth,n=e.display.barHeight;Ma(e,t);for(var o=0;o<4&&r!=e.display.barWidth||n!=e.display.barHeight;o++)r!=e.display.barWidth&&e.options.lineWrapping&&mo(e),Ma(e,Ii(e)),r=e.display.barWidth,n=e.display.barHeight}function Ma(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}Fi.prototype.update=function(){return{bottom:0,right:0}},Fi.prototype.setScrollLeft=function(){},Fi.prototype.setScrollTop=function(){},Fi.prototype.clear=function(){};var La={native:ai,null:Fi};function Za(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new La[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),mt(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,r){r=="horizontal"?oi(e,t):Ni(e,t)}),e),e.display.scrollbars.addClass&&f(e.display.wrapper,e.display.scrollbars.addClass)}var el=0;function si(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++el,markArrays:null},Lr(e.curOp)}function li(e){var t=e.curOp;t&&ao(t,(function(r){for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;tl(r)}))}function tl(e){for(var t=e.ops,r=0;r<t.length;r++)nl(t[r]);for(var n=0;n<t.length;n++)rl(t[n]);for(var o=0;o<t.length;o++)il(t[o]);for(var d=0;d<t.length;d++)ol(t[d]);for(var U=0;U<t.length;U++)al(t[U])}function nl(e){var t=e.cm,r=t.display;ll(t),e.updateMaxLine&&dr(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new wo(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function rl(e){e.updatedDisplay=e.mustUpdate&&Go(e.cm,e.update)}function il(e){var t=e.cm,r=t.display;e.updatedDisplay&&mo(t),e.barMeasure=Ii(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=En(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+ze(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Ie(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function ol(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&oi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==l();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&yi(t,e.barMeasure),e.updatedDisplay&&Xo(t,e.barMeasure),e.selectionChanged&&zo(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&ja(e.cm)}function al(e){var t=e.cm,r=t.display,n=t.doc;e.updatedDisplay&&Na(t,e.update),r.wheelStartX==null||e.scrollTop==null&&e.scrollLeft==null&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&Ra(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&oi(t,e.scrollLeft,!0,!0),e.scrollToPos&&Ys(t,Xs(t,ft(n,e.scrollToPos.from),ft(n,e.scrollToPos.to),e.scrollToPos.margin));var o=e.maybeHiddenMarkers,d=e.maybeUnhiddenMarkers;if(o)for(var U=0;U<o.length;++U)o[U].lines.length||De(o[U],"hide");if(d)for(var K=0;K<d.length;++K)d[K].lines.length&&De(d[K],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&De(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function kr(e,t){if(e.curOp)return t();si(e);try{return t()}finally{li(e)}}function Xn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);si(e);try{return t.apply(e,arguments)}finally{li(e)}}}function ar(e){return function(){if(this.curOp)return e.apply(this,arguments);si(this);try{return e.apply(this,arguments)}finally{li(this)}}}function Jn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);si(t);try{return e.apply(this,arguments)}finally{li(t)}}}function Vi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,J(sl,e))}function sl(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=Wn(e,t.highlightFrontier),o=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(d){if(n.line>=e.display.viewFrom){var U=d.styles,K=d.text.length>e.options.maxHighlightLength?nn(t.mode,n.state):null,he=er(e,d,n,!0);K&&(n.state=K),d.styles=he.styles;var ge=d.styleClasses,je=he.classes;je?d.styleClasses=je:ge&&(d.styleClasses=null);for(var Ae=!U||U.length!=d.styles.length||ge!=je&&(!ge||!je||ge.bgClass!=je.bgClass||ge.textClass!=je.textClass),Ve=0;!Ae&&Ve<U.length;++Ve)Ae=U[Ve]!=d.styles[Ve];Ae&&o.push(n.line),d.stateAfter=n.save(),n.nextLine()}else d.text.length<=e.options.maxHighlightLength&&tr(e,d.text,n),d.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return Vi(e,e.options.workDelay),!0})),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),o.length&&kr(e,(function(){for(var d=0;d<o.length;d++)qr(e,o[d],"text")}))}}var wo=function(e,t,r){var n=e.display;this.viewport=t,this.visible=yo(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Ie(e),this.force=r,this.dims=Vo(e),this.events=[]};function ll(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=ze(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=ze(e)+"px",t.scrollbarsClipped=!0)}function cl(e){if(e.hasFocus())return null;var t=l();if(!t||!s(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&s(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function ul(e){if(e&&e.activeElt&&e.activeElt!=l()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&s(document.body,e.anchorNode)&&s(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function Go(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Gr(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&Pa(e)==0)return!1;Fa(e)&&(Gr(e),t.dims=Vo(e));var o=n.first+n.size,d=Math.max(t.visible.from-e.options.viewportMargin,n.first),U=Math.min(o,t.visible.to+e.options.viewportMargin);r.viewFrom<d&&d-r.viewFrom<20&&(d=Math.max(n.first,r.viewFrom)),r.viewTo>U&&r.viewTo-U<20&&(U=Math.min(o,r.viewTo)),i&&(d=Pt(e.doc,d),U=xt(e.doc,U));var K=d!=r.viewFrom||U!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Gs(e,d,U),r.viewOffset=fn(ht(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var he=Pa(e);if(!K&&he==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var ge=cl(e);return he>4&&(r.lineDiv.style.display="none"),fl(e,r.updateLineNumbers,t.dims),he>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,ul(ge),B(r.cursorDiv),B(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,K&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,Vi(e,400)),r.updateLineNumbers=null,!0}function Na(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Ie(e))n&&(t.visible=yo(e.display,e.doc,r));else if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+Re(e.display)-nt(e),r.top)}),t.visible=yo(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Go(e,t))break;mo(e);var o=Ii(e);Li(e),yi(e,o),Xo(e,o),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ko(e,t){var r=new wo(e,t);if(Go(e,r)){mo(e),Na(e,r);var n=Ii(e);Li(e),yi(e,n),Xo(e,n),r.finish()}}function fl(e,t,r){var n=e.display,o=e.options.lineNumbers,d=n.lineDiv,U=d.firstChild;function K(Ye){var ot=Ye.nextSibling;return oe&&F&&e.display.currentWheelTarget==Ye?Ye.style.display="none":Ye.parentNode.removeChild(Ye),ot}for(var he=n.view,ge=n.viewFrom,je=0;je<he.length;je++){var Ae=he[je];if(!Ae.hidden)if(Ae.node&&Ae.node.parentNode==d){for(;U!=Ae.node;)U=K(U);var Ve=o&&t!=null&&t<=ge&&Ae.lineNumber;Ae.changes&&(b(Ae.changes,"gutter")>-1&&(Ve=!1),Ur(e,Ae,ge,r)),Ve&&(B(Ae.lineNumber),Ae.lineNumber.appendChild(document.createTextNode(Wt(e.options,ge)))),U=Ae.node.nextSibling}else{var Be=Di(e,Ae,ge,r);d.insertBefore(Be,U)}ge+=Ae.size}for(;U;)U=K(U)}function Yo(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",Mn(e,"gutterChanged",e)}function Xo(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+ze(e)+"px"}function Ia(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=Bo(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,d=n+"px",U=0;U<r.length;U++)if(!r[U].hidden){e.options.fixedGutter&&(r[U].gutter&&(r[U].gutter.style.left=d),r[U].gutterBackground&&(r[U].gutterBackground.style.left=d));var K=r[U].alignable;if(K)for(var he=0;he<K.length;he++)K[he].style.left=d}e.options.fixedGutter&&(t.gutters.style.left=n+o+"px")}}function Fa(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Wt(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var o=n.measure.appendChild(_("div",[_("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),d=o.firstChild.offsetWidth,U=o.offsetWidth-d;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(d,n.lineGutter.offsetWidth-U)+1,n.lineNumWidth=n.lineNumInnerWidth+U,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",Yo(e.display),!0}return!1}function Jo(e,t){for(var r=[],n=!1,o=0;o<e.length;o++){var d=e[o],U=null;if(typeof d!="string"&&(U=d.style,d=d.className),d=="CodeMirror-linenumbers"){if(!t)continue;n=!0}r.push({className:d,style:U})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function Va(e){var t=e.gutters,r=e.gutterSpecs;B(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var o=r[n],d=o.className,U=o.style,K=t.appendChild(_("div",null,"CodeMirror-gutter "+d));U&&(K.style.cssText=U),d=="CodeMirror-linenumbers"&&(e.lineGutter=K,K.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",Yo(e)}function Bi(e){Va(e.display),pr(e),Ia(e)}function hl(e,t,r,n){var o=this;this.input=r,o.scrollbarFiller=_("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=_("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=M("div",null,"CodeMirror-code"),o.selectionDiv=_("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=_("div",null,"CodeMirror-cursors"),o.measure=_("div",null,"CodeMirror-measure"),o.lineMeasure=_("div",null,"CodeMirror-measure"),o.lineSpace=M("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var d=M("div",[o.lineSpace],"CodeMirror-lines");o.mover=_("div",[d],null,"position: relative"),o.sizer=_("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=_("div",null,null,"position: absolute; height: "+h+"px; width: 1px;"),o.gutters=_("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=_("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=_("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),o.wrapper.setAttribute("translate","no"),ae&&se<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),oe||fe&&z||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=Jo(n.gutters,n.lineNumbers),Va(o),r.init(o)}wo.prototype.signal=function(e,t){rt(e,t)&&this.events.push(arguments)},wo.prototype.finish=function(){for(var e=0;e<this.events.length;e++)De.apply(null,this.events[e])};var ko=0,_r=null;function Ba(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),r==null&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:r==null&&(r=e.wheelDelta),{x:t,y:r}}function dl(e){var t=Ba(e);return t.x*=_r,t.y*=_r,t}function Ha(e,t){var r=Ba(t),n=r.x,o=r.y,d=e.display,U=d.scroller,K=U.scrollWidth>U.clientWidth,he=U.scrollHeight>U.clientHeight;if(n&&K||o&&he){if(o&&F&&oe){e:for(var ge=t.target,je=d.view;ge!=U;ge=ge.parentNode)for(var Ae=0;Ae<je.length;Ae++)if(je[Ae].node==ge){e.display.currentWheelTarget=ge;break e}}if(n&&!fe&&!g&&_r!=null)return o&&he&&Ni(e,Math.max(0,U.scrollTop+o*_r)),oi(e,Math.max(0,U.scrollLeft+n*_r)),(!o||o&&he)&&Ne(t),void(d.wheelStartX=null);if(o&&_r!=null){var Ve=o*_r,Be=e.doc.scrollTop,Ye=Be+d.wrapper.clientHeight;Ve<0?Be=Math.max(0,Be+Ve-50):Ye=Math.min(e.doc.height,Ye+Ve+50),Ko(e,{top:Be,bottom:Ye})}ko<20&&(d.wheelStartX==null?(d.wheelStartX=U.scrollLeft,d.wheelStartY=U.scrollTop,d.wheelDX=n,d.wheelDY=o,setTimeout((function(){if(d.wheelStartX!=null){var ot=U.scrollLeft-d.wheelStartX,lt=U.scrollTop-d.wheelStartY,Ot=lt&&d.wheelDY&</d.wheelDY||ot&&d.wheelDX&&ot/d.wheelDX;d.wheelStartX=d.wheelStartY=null,Ot&&(_r=(_r*ko+Ot)/(ko+1),++ko)}}),200)):(d.wheelDX+=n,d.wheelDY+=o))}}ae?_r=-.53:fe?_r=15:I?_r=-.7:P&&(_r=-.3333333333333333);var Pr=function(e,t){this.ranges=e,this.primIndex=t};Pr.prototype.primary=function(){return this.ranges[this.primIndex]},Pr.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!be(r.anchor,n.anchor)||!be(r.head,n.head))return!1}return!0},Pr.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new vn(Pe(this.ranges[t].anchor),Pe(this.ranges[t].head));return new Pr(e,this.primIndex)},Pr.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Pr.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(Nt(t,n.from())>=0&&Nt(e,n.to())<=0)return r}return-1};var vn=function(e,t){this.anchor=e,this.head=t};function Ar(e,t,r){var n=e&&e.options.selectionsMayTouch,o=t[r];t.sort((function(Ve,Be){return Nt(Ve.from(),Be.from())})),r=b(t,o);for(var d=1;d<t.length;d++){var U=t[d],K=t[d-1],he=Nt(K.to(),U.from());if(n&&!U.empty()?he>0:he>=0){var ge=gt(K.from(),U.from()),je=Xe(K.to(),U.to()),Ae=K.empty()?U.from()==U.head:K.from()==K.head;d<=r&&--r,t.splice(--d,2,new vn(Ae?je:ge,Ae?ge:je))}}return new Pr(t,r)}function Kr(e,t){return new Pr([new vn(e,t||e)],0)}function Yr(e){return e.text?st(e.from.line+e.text.length-1,a(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function za(e,t){if(Nt(e,t.from)<0)return e;if(Nt(e,t.to)<=0)return Yr(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Yr(t).ch-t.to.ch),st(r,n)}function Qo(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var o=e.sel.ranges[n];r.push(new vn(za(o.anchor,t),za(o.head,t)))}return Ar(e.cm,r,e.sel.primIndex)}function Ua(e,t,r){return e.line==t.line?st(r.line,e.ch-t.ch+r.ch):st(r.line+(e.line-t.line),e.ch)}function pl(e,t,r){for(var n=[],o=st(e.first,0),d=o,U=0;U<t.length;U++){var K=t[U],he=Ua(K.from,o,d),ge=Ua(Yr(K),o,d);if(o=K.to,d=ge,r=="around"){var je=e.sel.ranges[U],Ae=Nt(je.head,je.anchor)<0;n[U]=new vn(Ae?ge:he,Ae?he:ge)}else n[U]=new vn(he,he)}return new Pr(n,e.sel.primIndex)}function ea(e){e.doc.mode=wn(e.options,e.doc.modeOption),Hi(e)}function Hi(e){e.doc.iter((function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Vi(e,100),e.state.modeGen++,e.curOp&&pr(e)}function Wa(e,t){return t.from.ch==0&&t.to.ch==0&&a(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ta(e,t,r,n){function o(Tt){return r?r[Tt]:null}function d(Tt,vt,At){Tr(Tt,vt,At,n),Mn(Tt,"change",Tt,t)}function U(Tt,vt){for(var At=[],jt=Tt;jt<vt;++jt)At.push(new Yn(ge[jt],o(jt),n));return At}var K=t.from,he=t.to,ge=t.text,je=ht(e,K.line),Ae=ht(e,he.line),Ve=a(ge),Be=o(ge.length-1),Ye=he.line-K.line;if(t.full)e.insert(0,U(0,ge.length)),e.remove(ge.length,e.size-ge.length);else if(Wa(e,t)){var ot=U(0,ge.length-1);d(Ae,Ae.text,Be),Ye&&e.remove(K.line,Ye),ot.length&&e.insert(K.line,ot)}else if(je==Ae)if(ge.length==1)d(je,je.text.slice(0,K.ch)+Ve+je.text.slice(he.ch),Be);else{var lt=U(1,ge.length-1);lt.push(new Yn(Ve+je.text.slice(he.ch),Be,n)),d(je,je.text.slice(0,K.ch)+ge[0],o(0)),e.insert(K.line+1,lt)}else if(ge.length==1)d(je,je.text.slice(0,K.ch)+ge[0]+Ae.text.slice(he.ch),o(0)),e.remove(K.line+1,Ye);else{d(je,je.text.slice(0,K.ch)+ge[0],o(0)),d(Ae,Ve+Ae.text.slice(he.ch),Be);var Ot=U(1,ge.length-1);Ye>1&&e.remove(K.line+1,Ye-1),e.insert(K.line+1,Ot)}Mn(e,"change",e,t)}function Xr(e,t,r){function n(o,d,U){if(o.linked)for(var K=0;K<o.linked.length;++K){var he=o.linked[K];if(he.doc!=d){var ge=U&&he.sharedHist;r&&!ge||(t(he.doc,ge),n(he.doc,o,ge))}}}n(e,null,!0)}function $a(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Ho(e),ea(e),qa(e),e.options.direction=t.direction,e.options.lineWrapping||dr(e),e.options.mode=t.modeOption,pr(e)}function qa(e){(e.doc.direction=="rtl"?f:E)(e.display.lineDiv,"CodeMirror-rtl")}function gl(e){kr(e,(function(){qa(e),pr(e)}))}function xo(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function na(e,t){var r={from:Pe(t.from),to:Yr(t),text:Fn(e,t.from,t.to)};return Ya(e,r,t.from.line,t.to.line+1),Xr(e,(function(n){return Ya(n,r,t.from.line,t.to.line+1)}),!0),r}function Ga(e){for(;e.length&&a(e).ranges;)e.pop()}function vl(e,t){return t?(Ga(e.done),a(e.done)):e.done.length&&!a(e.done).ranges?a(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),a(e.done)):void 0}function Ka(e,t,r,n){var o=e.history;o.undone.length=0;var d,U,K=+new Date;if((o.lastOp==n||o.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&o.lastModTime>K-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(d=vl(o,o.lastOp==n)))U=a(d.changes),Nt(t.from,t.to)==0&&Nt(t.from,U.to)==0?U.to=Yr(t):d.changes.push(na(e,t));else{var he=a(o.done);for(he&&he.ranges||Oo(e.sel,o.done),d={changes:[na(e,t)],generation:o.generation},o.done.push(d);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(r),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=K,o.lastOp=o.lastSelOp=n,o.lastOrigin=o.lastSelOrigin=t.origin,U||De(e,"historyAdded")}function ml(e,t,r,n){var o=t.charAt(0);return o=="*"||o=="+"&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function yl(e,t,r,n){var o=e.history,d=n&&n.origin;r==o.lastSelOp||d&&o.lastSelOrigin==d&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==d||ml(e,d,a(o.done),t))?o.done[o.done.length-1]=t:Oo(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=d,o.lastSelOp=r,n&&n.clearRedo!==!1&&Ga(o.undone)}function Oo(e,t){var r=a(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ya(e,t,r,n){var o=t["spans_"+e.id],d=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),(function(U){U.markedSpans&&((o||(o=t["spans_"+e.id]={}))[d]=U.markedSpans),++d}))}function bl(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function wl(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],o=0;o<t.text.length;++o)n.push(bl(r[o]));return n}function Xa(e,t){var r=wl(e,t),n=Qe(e,t);if(!r)return n;if(!n)return r;for(var o=0;o<r.length;++o){var d=r[o],U=n[o];if(d&&U)e:for(var K=0;K<U.length;++K){for(var he=U[K],ge=0;ge<d.length;++ge)if(d[ge].marker==he.marker)continue e;d.push(he)}else U&&(r[o]=U)}return r}function bi(e,t,r){for(var n=[],o=0;o<e.length;++o){var d=e[o];if(d.ranges)n.push(r?Pr.prototype.deepCopy.call(d):d);else{var U=d.changes,K=[];n.push({changes:K});for(var he=0;he<U.length;++he){var ge=U[he],je=void 0;if(K.push({from:ge.from,to:ge.to,text:ge.text}),t)for(var Ae in ge)(je=Ae.match(/^spans_(\d+)$/))&&b(t,Number(je[1]))>-1&&(a(K)[Ae]=ge[Ae],delete ge[Ae])}}}return n}function ra(e,t,r,n){if(n){var o=e.anchor;if(r){var d=Nt(t,o)<0;d!=Nt(r,o)<0?(o=t,t=r):d!=Nt(t,r)<0&&(t=r)}return new vn(o,t)}return new vn(r||t,t)}function Co(e,t,r,n,o){o==null&&(o=e.cm&&(e.cm.display.shift||e.extend)),ir(e,new Pr([ra(e.sel.primary(),t,r,o)],0),n)}function Ja(e,t,r){for(var n=[],o=e.cm&&(e.cm.display.shift||e.extend),d=0;d<e.sel.ranges.length;d++)n[d]=ra(e.sel.ranges[d],t[d],null,o);ir(e,Ar(e.cm,n,e.sel.primIndex),r)}function ia(e,t,r,n){var o=e.sel.ranges.slice(0);o[t]=r,ir(e,Ar(e.cm,o,e.sel.primIndex),n)}function Qa(e,t,r,n){ir(e,Kr(t,r),n)}function kl(e,t,r){var n={ranges:t.ranges,update:function(o){this.ranges=[];for(var d=0;d<o.length;d++)this.ranges[d]=new vn(ft(e,o[d].anchor),ft(e,o[d].head))},origin:r&&r.origin};return De(e,"beforeSelectionChange",e,n),e.cm&&De(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?Ar(e.cm,n.ranges,n.ranges.length-1):t}function es(e,t,r){var n=e.history.done,o=a(n);o&&o.ranges?(n[n.length-1]=t,So(e,t,r)):ir(e,t,r)}function ir(e,t,r){So(e,t,r),yl(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function So(e,t,r){(rt(e,"beforeSelectionChange")||e.cm&&rt(e.cm,"beforeSelectionChange"))&&(t=kl(e,t,r));var n=r&&r.bias||(Nt(t.primary().head,e.sel.primary().head)<0?-1:1);ts(e,rs(e,t,n,!0)),r&&r.scroll===!1||!e.cm||e.cm.getOption("readOnly")=="nocursor"||mi(e.cm)}function ts(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Ue(e.cm)),Mn(e,"cursorActivity",e))}function ns(e){ts(e,rs(e,e.sel,null,!1))}function rs(e,t,r,n){for(var o,d=0;d<t.ranges.length;d++){var U=t.ranges[d],K=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[d],he=_o(e,U.anchor,K&&K.anchor,r,n),ge=_o(e,U.head,K&&K.head,r,n);(o||he!=U.anchor||ge!=U.head)&&(o||(o=t.ranges.slice(0,d)),o[d]=new vn(he,ge))}return o?Ar(e.cm,o,t.primIndex):t}function wi(e,t,r,n,o){var d=ht(e,t.line);if(d.markedSpans)for(var U=0;U<d.markedSpans.length;++U){var K=d.markedSpans[U],he=K.marker,ge="selectLeft"in he?!he.selectLeft:he.inclusiveLeft,je="selectRight"in he?!he.selectRight:he.inclusiveRight;if((K.from==null||(ge?K.from<=t.ch:K.from<t.ch))&&(K.to==null||(je?K.to>=t.ch:K.to>t.ch))){if(o&&(De(he,"beforeCursorEnter"),he.explicitlyCleared)){if(d.markedSpans){--U;continue}break}if(!he.atomic)continue;if(r){var Ae=he.find(n<0?1:-1),Ve=void 0;if((n<0?je:ge)&&(Ae=is(e,Ae,-n,Ae&&Ae.line==t.line?d:null)),Ae&&Ae.line==t.line&&(Ve=Nt(Ae,r))&&(n<0?Ve<0:Ve>0))return wi(e,Ae,t,n,o)}var Be=he.find(n<0?-1:1);return(n<0?ge:je)&&(Be=is(e,Be,n,Be.line==t.line?d:null)),Be?wi(e,Be,t,n,o):null}}return t}function _o(e,t,r,n,o){var d=n||1,U=wi(e,t,r,d,o)||!o&&wi(e,t,r,d,!0)||wi(e,t,r,-d,o)||!o&&wi(e,t,r,-d,!0);return U||(e.cantEdit=!0,st(e.first,0))}function is(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?ft(e,st(t.line-1)):null:r>0&&t.ch==(n||ht(e,t.line)).text.length?t.line<e.first+e.size-1?st(t.line+1,0):null:new st(t.line,t.ch+r)}function os(e){e.setSelection(st(e.firstLine(),0),st(e.lastLine()),p)}function as(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(o,d,U,K){o&&(n.from=ft(e,o)),d&&(n.to=ft(e,d)),U&&(n.text=U),K!==void 0&&(n.origin=K)}),De(e,"beforeChange",e,n),e.cm&&De(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function ki(e,t,r){if(e.cm){if(!e.cm.curOp)return Xn(e.cm,ki)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(rt(e,"beforeChange")||e.cm&&rt(e.cm,"beforeChange"))||(t=as(e,t,!0))){var n=u&&!r&&Ct(e,t.from,t.to);if(n)for(var o=n.length-1;o>=0;--o)ss(e,{from:n[o].from,to:n[o].to,text:o?[""]:t.text,origin:t.origin});else ss(e,t)}}function ss(e,t){if(t.text.length!=1||t.text[0]!=""||Nt(t.from,t.to)!=0){var r=Qo(e,t);Ka(e,t,r,e.cm?e.cm.curOp.id:NaN),zi(e,t,r,Qe(e,t));var n=[];Xr(e,(function(o,d){d||b(n,o.history)!=-1||(fs(o.history,t),n.push(o.history)),zi(o,t,null,Qe(o,t))}))}}function Po(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var o,d=e.history,U=e.sel,K=t=="undo"?d.done:d.undone,he=t=="undo"?d.undone:d.done,ge=0;ge<K.length&&(o=K[ge],r?!o.ranges||o.equals(e.sel):o.ranges);ge++);if(ge!=K.length){for(d.lastOrigin=d.lastSelOrigin=null;;){if(!(o=K.pop()).ranges){if(n)return void K.push(o);break}if(Oo(o,he),r&&!o.equals(e.sel))return void ir(e,o,{clearRedo:!1});U=o}var je=[];Oo(U,he),he.push({changes:je,generation:d.generation}),d.generation=o.generation||++d.maxGeneration;for(var Ae=rt(e,"beforeChange")||e.cm&&rt(e.cm,"beforeChange"),Ve=function(ot){var lt=o.changes[ot];if(lt.origin=t,Ae&&!as(e,lt,!1))return K.length=0,{};je.push(na(e,lt));var Ot=ot?Qo(e,lt):a(K);zi(e,lt,Ot,Xa(e,lt)),!ot&&e.cm&&e.cm.scrollIntoView({from:lt.from,to:Yr(lt)});var Tt=[];Xr(e,(function(vt,At){At||b(Tt,vt.history)!=-1||(fs(vt.history,lt),Tt.push(vt.history)),zi(vt,lt,null,Xa(vt,lt))}))},Be=o.changes.length-1;Be>=0;--Be){var Ye=Ve(Be);if(Ye)return Ye.v}}}}function ls(e,t){if(t!=0&&(e.first+=t,e.sel=new Pr(c(e.sel.ranges,(function(o){return new vn(st(o.anchor.line+t,o.anchor.ch),st(o.head.line+t,o.head.ch))})),e.sel.primIndex),e.cm)){pr(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)qr(e.cm,n,"gutter")}}function zi(e,t,r,n){if(e.cm&&!e.cm.curOp)return Xn(e.cm,zi)(e,t,r,n);if(t.to.line<e.first)ls(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var o=t.text.length-1-(e.first-t.from.line);ls(e,o),t={from:st(e.first,0),to:st(t.to.line+o,t.to.ch),text:[a(t.text)],origin:t.origin}}var d=e.lastLine();t.to.line>d&&(t={from:t.from,to:st(d,ht(e,d).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Fn(e,t.from,t.to),r||(r=Qo(e,t)),e.cm?xl(e.cm,t,n):ta(e,t,n),So(e,r,p),e.cantEdit&&_o(e,st(e.firstLine(),0))&&(e.cantEdit=!1)}}function xl(e,t,r){var n=e.doc,o=e.display,d=t.from,U=t.to,K=!1,he=d.line;e.options.lineWrapping||(he=Kt(mn(ht(n,d.line))),n.iter(he,U.line+1,(function(Be){if(Be==o.maxLine)return K=!0,!0}))),n.sel.contains(t.from,t.to)>-1&&Ue(e),ta(n,t,r,_a(e)),e.options.lineWrapping||(n.iter(he,d.line+t.text.length,(function(Be){var Ye=Kn(Be);Ye>o.maxLineLength&&(o.maxLine=Be,o.maxLineLength=Ye,o.maxLineChanged=!0,K=!1)})),K&&(e.curOp.updateMaxLine=!0)),V(n,d.line),Vi(e,400);var ge=t.text.length-(U.line-d.line)-1;t.full?pr(e):d.line!=U.line||t.text.length!=1||Wa(e.doc,t)?pr(e,d.line,U.line+1,ge):qr(e,d.line,"text");var je=rt(e,"changes"),Ae=rt(e,"change");if(Ae||je){var Ve={from:d,to:U,text:t.text,removed:t.removed,origin:t.origin};Ae&&Mn(e,"change",e,Ve),je&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Ve)}e.display.selForContextMenu=null}function xi(e,t,r,n,o){var d;n||(n=r),Nt(n,r)<0&&(r=(d=[n,r])[0],n=d[1]),typeof t=="string"&&(t=e.splitLines(t)),ki(e,{from:r,to:n,text:t,origin:o})}function cs(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function us(e,t,r,n){for(var o=0;o<e.length;++o){var d=e[o],U=!0;if(d.ranges){d.copied||((d=e[o]=d.deepCopy()).copied=!0);for(var K=0;K<d.ranges.length;K++)cs(d.ranges[K].anchor,t,r,n),cs(d.ranges[K].head,t,r,n)}else{for(var he=0;he<d.changes.length;++he){var ge=d.changes[he];if(r<ge.from.line)ge.from=st(ge.from.line+n,ge.from.ch),ge.to=st(ge.to.line+n,ge.to.ch);else if(t<=ge.to.line){U=!1;break}}U||(e.splice(0,o+1),o=0)}}}function fs(e,t){var r=t.from.line,n=t.to.line,o=t.text.length-(n-r)-1;us(e.done,r,n,o),us(e.undone,r,n,o)}function Ui(e,t,r,n){var o=t,d=t;return typeof t=="number"?d=ht(e,kt(e,t)):o=Kt(t),o==null?null:(n(d,o)&&e.cm&&qr(e.cm,o,r),d)}function Wi(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function $i(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var o=e[n];t+=o.chunkSize(),r+=o.height,o.parent=this}this.size=t,this.height=r,this.parent=null}vn.prototype.from=function(){return gt(this.anchor,this.head)},vn.prototype.to=function(){return Xe(this.anchor,this.head)},vn.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Wi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var o=this.lines[r];this.height-=o.height,Fr(o),Mn(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},$i.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],o=n.chunkSize();if(e<o){var d=Math.min(t,o-e),U=n.height;if(n.removeInner(e,d),this.height-=U-n.height,o==d&&(this.children.splice(r--,1),n.parent=null),(t-=d)==0)break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Wi))){var K=[];this.collapse(K),this.children=[new Wi(K)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var o=this.children[n],d=o.chunkSize();if(e<=d){if(o.insertInner(e,t,r),o.lines&&o.lines.length>50){for(var U=o.lines.length%25+25,K=U;K<o.lines.length;){var he=new Wi(o.lines.slice(K,K+=25));o.height-=he.height,this.children.splice(++n,0,he),he.parent=this}o.lines=o.lines.slice(0,U),this.maybeSpill()}break}e-=d}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new $i(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var r=b(e.parent.children,e);e.parent.children.splice(r+1,0,t)}else{var n=new $i(e.children);n.parent=e,e.children=[n,t],e=n}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var o=this.children[n],d=o.chunkSize();if(e<d){var U=Math.min(t,d-e);if(o.iterN(e,U,r))return!0;if((t-=U)==0)break;e=0}else e-=d}}};var qi=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};function hs(e,t,r){fn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&qo(e,r)}function Ol(e,t,r,n){var o=new qi(e,r,n),d=e.cm;return d&&o.noHScroll&&(d.display.alignWidgets=!0),Ui(e,t,"widget",(function(U){var K=U.widgets||(U.widgets=[]);if(o.insertAt==null?K.push(o):K.splice(Math.min(K.length,Math.max(0,o.insertAt)),0,o),o.line=U,d&&!Lt(e,U)){var he=fn(U)<e.scrollTop;dn(U,U.height+ti(o)),he&&qo(d,o.height),d.curOp.forceUpdate=!0}return!0})),d&&Mn(d,"lineWidgetAdded",d,o,typeof t=="number"?t:Kt(t)),o}qi.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=Kt(r);if(n!=null&&t){for(var o=0;o<t.length;++o)t[o]==this&&t.splice(o--,1);t.length||(r.widgets=null);var d=ti(this);dn(r,Math.max(0,r.height-d)),e&&(kr(e,(function(){hs(e,r,-d),qr(e,n,"widget")})),Mn(e,"lineWidgetCleared",e,this,n))}},qi.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var o=ti(this)-t;o&&(Lt(this.doc,n)||dn(n,n.height+o),r&&kr(r,(function(){r.curOp.forceUpdate=!0,hs(r,n,o),Mn(r,"lineWidgetChanged",r,e,Kt(n))})))},Te(qi);var ds=0,Jr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ds};function Oi(e,t,r,n,o){if(n&&n.shared)return Cl(e,t,r,n,o);if(e.cm&&!e.cm.curOp)return Xn(e.cm,Oi)(e,t,r,n,o);var d=new Jr(e,o),U=Nt(t,r);if(n&&R(n,d,!1),U>0||U==0&&d.clearWhenEmpty!==!1)return d;if(d.replacedWith&&(d.collapsed=!0,d.widgetNode=M("span",[d.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||d.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(d.widgetNode.insertLeft=!0)),d.collapsed){if(Gn(e,t.line,t,r,d)||t.line!=r.line&&Gn(e,r.line,t,r,d))throw new Error("Inserting collapsed marker partially overlapping an existing one");le()}d.addToHistory&&Ka(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var K,he=t.line,ge=e.cm;if(e.iter(he,r.line+1,(function(Ae){ge&&d.collapsed&&!ge.options.lineWrapping&&mn(Ae)==ge.display.maxLine&&(K=!0),d.collapsed&&he!=t.line&&dn(Ae,0),Ke(Ae,new ve(d,he==t.line?t.ch:null,he==r.line?r.ch:null),e.cm&&e.cm.curOp),++he})),d.collapsed&&e.iter(t.line,r.line+1,(function(Ae){Lt(e,Ae)&&dn(Ae,0)})),d.clearOnEnter&&mt(d,"beforeCursorEnter",(function(){return d.clear()})),d.readOnly&&(T(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),d.collapsed&&(d.id=++ds,d.atomic=!0),ge){if(K&&(ge.curOp.updateMaxLine=!0),d.collapsed)pr(ge,t.line,r.line+1);else if(d.className||d.startStyle||d.endStyle||d.css||d.attributes||d.title)for(var je=t.line;je<=r.line;je++)qr(ge,je,"text");d.atomic&&ns(ge.doc),Mn(ge,"markerAdded",ge,d)}return d}Jr.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&si(e),rt(this,"clear")){var r=this.find();r&&Mn(this,"clear",r.from,r.to)}for(var n=null,o=null,d=0;d<this.lines.length;++d){var U=this.lines[d],K=_e(U.markedSpans,this);e&&!this.collapsed?qr(e,Kt(U),"text"):e&&(K.to!=null&&(o=Kt(U)),K.from!=null&&(n=Kt(U))),U.markedSpans=Le(U.markedSpans,K),K.from==null&&this.collapsed&&!Lt(this.doc,U)&&e&&dn(U,pi(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var he=0;he<this.lines.length;++he){var ge=mn(this.lines[he]),je=Kn(ge);je>e.display.maxLineLength&&(e.display.maxLine=ge,e.display.maxLineLength=je,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&pr(e,n,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ns(e.doc)),e&&Mn(e,"markerCleared",e,this,n,o),t&&li(e),this.parent&&this.parent.clear()}},Jr.prototype.find=function(e,t){var r,n;e==null&&this.type=="bookmark"&&(e=1);for(var o=0;o<this.lines.length;++o){var d=this.lines[o],U=_e(d.markedSpans,this);if(U.from!=null&&(r=st(t?d:Kt(d),U.from),e==-1))return r;if(U.to!=null&&(n=st(t?d:Kt(d),U.to),e==1))return n}return r&&{from:r,to:n}},Jr.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&kr(n,(function(){var o=t.line,d=Kt(t.line),U=wr(n,d);if(U&&(ya(U),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Lt(r.doc,o)&&r.height!=null){var K=r.height;r.height=null;var he=ti(r)-K;he&&dn(o,o.height+he)}Mn(n,"markerChanged",n,e)}))},Jr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&b(t.maybeHiddenMarkers,this)!=-1||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Jr.prototype.detachLine=function(e){if(this.lines.splice(b(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Te(Jr);var Gi=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};function Cl(e,t,r,n,o){(n=R(n)).shared=!1;var d=[Oi(e,t,r,n,o)],U=d[0],K=n.widgetNode;return Xr(e,(function(he){K&&(n.widgetNode=K.cloneNode(!0)),d.push(Oi(he,ft(he,t),ft(he,r),n,o));for(var ge=0;ge<he.linked.length;++ge)if(he.linked[ge].isParent)return;U=a(d)})),new Gi(d,U)}function ps(e){return e.findMarks(st(e.first,0),e.clipPos(st(e.lastLine())),(function(t){return t.parent}))}function Sl(e,t){for(var r=0;r<t.length;r++){var n=t[r],o=n.find(),d=e.clipPos(o.from),U=e.clipPos(o.to);if(Nt(d,U)){var K=Oi(e,d,U,n.primary,n.primary.type);n.markers.push(K),K.parent=n}}}function _l(e){for(var t=function(n){var o=e[n],d=[o.primary.doc];Xr(o.primary.doc,(function(he){return d.push(he)}));for(var U=0;U<o.markers.length;U++){var K=o.markers[U];b(d,K.doc)==-1&&(K.parent=null,o.markers.splice(U--,1))}},r=0;r<e.length;r++)t(r)}Gi.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Mn(this,"clear")}},Gi.prototype.find=function(e,t){return this.primary.find(e,t)},Te(Gi);var Pl=0,gr=function(e,t,r,n,o){if(!(this instanceof gr))return new gr(e,t,r,n,o);r==null&&(r=0),$i.call(this,[new Wi([new Yn("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var d=st(r,0);this.sel=Kr(d),this.history=new xo(null),this.id=++Pl,this.modeOption=t,this.lineSep=n,this.direction=o=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ta(this,{from:d,to:d,text:e}),ir(this,Kr(d),p)};gr.prototype=pe($i.prototype,{constructor:gr,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=qn(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Jn((function(e){var t=st(this.first,0),r=this.first+this.size-1;ki(this,{from:t,to:st(r,ht(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Zi(this.cm,0,0),ir(this,Kr(t),p)})),replaceRange:function(e,t,r,n){xi(this,e,t=ft(this,t),r=r?ft(this,r):t,n)},getRange:function(e,t,r){var n=Fn(this,ft(this,e),ft(this,t));return r===!1?n:r===""?n.join(""):n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Rn(this,e))return ht(this,e)},getLineNumber:function(e){return Kt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=ht(this,e)),mn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ft(this,e)},getCursor:function(e){var t=this.sel.primary();return e==null||e=="head"?t.head:e=="anchor"?t.anchor:e=="end"||e=="to"||e===!1?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Jn((function(e,t,r){Qa(this,ft(this,typeof e=="number"?st(e,t||0):e),null,r)})),setSelection:Jn((function(e,t,r){Qa(this,ft(this,e),ft(this,t||e),r)})),extendSelection:Jn((function(e,t,r){Co(this,ft(this,e),t&&ft(this,t),r)})),extendSelections:Jn((function(e,t){Ja(this,gn(this,e),t)})),extendSelectionsBy:Jn((function(e,t){Ja(this,gn(this,c(this.sel.ranges,e)),t)})),setSelections:Jn((function(e,t,r){if(e.length){for(var n=[],o=0;o<e.length;o++)n[o]=new vn(ft(this,e[o].anchor),ft(this,e[o].head||e[o].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),ir(this,Ar(this.cm,n,t),r)}})),addSelection:Jn((function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new vn(ft(this,e),ft(this,t||e))),ir(this,Ar(this.cm,n,n.length-1),r)})),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var o=Fn(this,r[n].from(),r[n].to());t=t?t.concat(o):o}return e===!1?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var o=Fn(this,r[n].from(),r[n].to());e!==!1&&(o=o.join(e||this.lineSeparator())),t[n]=o}return t},replaceSelection:function(e,t,r){for(var n=[],o=0;o<this.sel.ranges.length;o++)n[o]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:Jn((function(e,t,r){for(var n=[],o=this.sel,d=0;d<o.ranges.length;d++){var U=o.ranges[d];n[d]={from:U.from(),to:U.to(),text:this.splitLines(e[d]),origin:r}}for(var K=t&&t!="end"&&pl(this,n,t),he=n.length-1;he>=0;he--)ki(this,n[he]);K?es(this,K):this.cm&&mi(this.cm)})),undo:Jn((function(){Po(this,"undo")})),redo:Jn((function(){Po(this,"redo")})),undoSelection:Jn((function(){Po(this,"undo",!0)})),redoSelection:Jn((function(){Po(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var o=0;o<e.undone.length;o++)e.undone[o].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new xo(this.history),Xr(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:bi(this.history.done),undone:bi(this.history.undone)}},setHistory:function(e){var t=this.history=new xo(this.history);t.done=bi(e.done.slice(0),null,!0),t.undone=bi(e.undone.slice(0),null,!0)},setGutterMarker:Jn((function(e,t,r){return Ui(this,e,"gutter",(function(n){var o=n.gutterMarkers||(n.gutterMarkers={});return o[t]=r,!r&&xe(o)&&(n.gutterMarkers=null),!0}))})),clearGutter:Jn((function(e){var t=this;this.iter((function(r){r.gutterMarkers&&r.gutterMarkers[e]&&Ui(t,r,"gutter",(function(){return r.gutterMarkers[e]=null,xe(r.gutterMarkers)&&(r.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if(typeof e=="number"){if(!Rn(this,e)||(t=e,!(e=ht(this,e))))return null}else if((t=Kt(e))==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Jn((function(e,t,r){return Ui(this,e,t=="gutter"?"gutter":"class",(function(n){var o=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(n[o]){if(O(r).test(n[o]))return!1;n[o]+=" "+r}else n[o]=r;return!0}))})),removeLineClass:Jn((function(e,t,r){return Ui(this,e,t=="gutter"?"gutter":"class",(function(n){var o=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",d=n[o];if(!d)return!1;if(r==null)n[o]=null;else{var U=d.match(O(r));if(!U)return!1;var K=U.index+U[0].length;n[o]=d.slice(0,U.index)+(U.index&&K!=d.length?" ":"")+d.slice(K)||null}return!0}))})),addLineWidget:Jn((function(e,t,r){return Ol(this,e,t,r)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Oi(this,ft(this,e),ft(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return Oi(this,e=ft(this,e),e,r,"bookmark")},findMarksAt:function(e){var t=[],r=ht(this,(e=ft(this,e)).line).markedSpans;if(r)for(var n=0;n<r.length;++n){var o=r[n];(o.from==null||o.from<=e.ch)&&(o.to==null||o.to>=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,r){e=ft(this,e),t=ft(this,t);var n=[],o=e.line;return this.iter(e.line,t.line+1,(function(d){var U=d.markedSpans;if(U)for(var K=0;K<U.length;K++){var he=U[K];he.to!=null&&o==e.line&&e.ch>=he.to||he.from==null&&o!=e.line||he.from!=null&&o==t.line&&he.from>=t.ch||r&&!r(he.marker)||n.push(he.marker.parent||he.marker)}++o})),n},getAllMarks:function(){var e=[];return this.iter((function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)r[n].from!=null&&e.push(r[n].marker)})),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter((function(o){var d=o.text.length+n;if(d>e)return t=e,!0;e-=d,++r})),ft(this,st(r,t))},indexFromPos:function(e){var t=(e=ft(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,(function(n){t+=n.text.length+r})),t},copy:function(e){var t=new gr(qn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<r&&(r=e.to);var n=new gr(qn(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Sl(n,ps(this)),n},unlinkDoc:function(e){if(e instanceof Dn&&(e=e.doc),this.linked){for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),_l(ps(this));break}}if(e.history==this.history){var r=[e.id];Xr(e,(function(n){return r.push(n.id)}),!0),e.history=new xo(null),e.history.done=bi(this.history.done,r),e.history.undone=bi(this.history.undone,r)}},iterLinkedDocs:function(e){Xr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):ut(e)},lineSeparator:function(){return this.lineSep||` 14`},setDirection:Jn((function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(t){return t.order=null})),this.cm&&gl(this.cm))}))}),gr.prototype.eachLine=gr.prototype.iter;var gs=0;function Tl(e){var t=this;if(vs(t),!Ze(t,e)&&!ue(t.display,e)){Ne(e),ae&&(gs=+new Date);var r=ri(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var o=n.length,d=Array(o),U=0,K=function(){++U==o&&Xn(t,(function(){var Be={from:r=ft(t.doc,r),to:r,text:t.doc.splitLines(d.filter((function(Ye){return Ye!=null})).join(t.doc.lineSeparator())),origin:"paste"};ki(t.doc,Be),es(t.doc,Kr(ft(t.doc,r),ft(t.doc,Yr(Be))))}))()},he=function(Be,Ye){if(t.options.allowDropFileTypes&&b(t.options.allowDropFileTypes,Be.type)==-1)K();else{var ot=new FileReader;ot.onerror=function(){return K()},ot.onload=function(){var lt=ot.result;/[\x00-\x08\x0e-\x1f]{2}/.test(lt)||(d[Ye]=lt),K()},ot.readAsText(Be)}},ge=0;ge<n.length;ge++)he(n[ge],ge);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var je=e.dataTransfer.getData("Text");if(je){var Ae;if(t.state.draggingText&&!t.state.draggingText.copy&&(Ae=t.listSelections()),So(t.doc,Kr(r,r)),Ae)for(var Ve=0;Ve<Ae.length;++Ve)xi(t.doc,"",Ae[Ve].anchor,Ae[Ve].head,"drag");t.replaceSelection(je,"around","paste"),t.display.input.focus()}}catch{}}}}function El(e,t){if(ae&&(!e.state.draggingText||+new Date-gs<100))tt(t);else if(!Ze(e,t)&&!ue(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!P)){var r=_("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",g&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),g&&r.parentNode.removeChild(r)}}function jl(e,t){var r=ri(e,t);if(r){var n=document.createDocumentFragment();
14Ea(e,r,n),e.display.dragCursor||(e.display.dragCursor=_("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),X(e.display.dragCursor,n)}}function vs(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function ms(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var o=t[n].CodeMirror;o&&r.push(o)}r.length&&r[0].operation((function(){for(var d=0;d<r.length;d++)e(r[d])}))}}var ys=!1;function Al(){ys||(Dl(),ys=!0)}function Dl(){var e;mt(window,"resize",(function(){e==null&&(e=setTimeout((function(){e=null,ms(Rl)}),100))})),mt(window,"blur",(function(){return ms(vi)}))}function Rl(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Qr={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ki=0;Ki<10;Ki++)Qr[Ki+48]=Qr[Ki+96]=String(Ki);for(var To=65;To<=90;To++)Qr[To]=String.fromCharCode(To);for(var Yi=1;Yi<=12;Yi++)Qr[Yi+111]=Qr[Yi+63235]="F"+Yi;var Nr={};function Ml(e){var t,r,n,o,d=e.split(/-(?!$)/);e=d[d.length-1];for(var U=0;U<d.length-1;U++){var K=d[U];if(/^(cmd|meta|m)$/i.test(K))o=!0;else if(/^a(lt)?$/i.test(K))t=!0;else if(/^(c|ctrl|control)$/i.test(K))r=!0;else{if(!/^s(hift)?$/i.test(K))throw new Error("Unrecognized modifier name: "+K);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function Ll(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if(n=="..."){delete e[r];continue}for(var o=c(r.split(" "),Ml),d=0;d<o.length;d++){var U=void 0,K=void 0;d==o.length-1?(K=o.join(" "),U=n):(K=o.slice(0,d+1).join(" "),U="...");var he=t[K];if(he){if(he!=U)throw new Error("Inconsistent bindings for "+K)}else t[K]=U}delete e[r]}for(var ge in t)e[ge]=t[ge];return e}function Ci(e,t,r,n){var o=(t=Eo(t)).call?t.call(e,n):t[e];if(o===!1)return"nothing";if(o==="...")return"multi";if(o!=null&&r(o))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Ci(e,t.fallthrough,r,n);for(var d=0;d<t.fallthrough.length;d++){var U=Ci(e,t.fallthrough[d],r,n);if(U)return U}}}function bs(e){var t=typeof e=="string"?e:Qr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function ws(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(ye?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(ye?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function ks(e,t){if(g&&e.keyCode==34&&e.char)return!1;var r=Qr[e.keyCode];return r!=null&&!e.altGraphKey&&(e.keyCode==3&&e.code&&(r=e.code),ws(r,e,t))}function Eo(e){return typeof e=="string"?Nr[e]:e}function Si(e,t){for(var r=e.doc.sel.ranges,n=[],o=0;o<r.length;o++){for(var d=t(r[o]);n.length&&Nt(d.from,a(n).to)<=0;){var U=n.pop();if(Nt(U.from,d.from)<0){d.from=U.from;break}}n.push(d)}kr(e,(function(){for(var K=n.length-1;K>=0;K--)xi(e.doc,"",n[K].from,n[K].to,"+delete");mi(e)}))}function oa(e,t,r){var n=Fe(e.text,t+r,r);return n<0||n>e.text.length?null:n}function aa(e,t,r){var n=oa(e,t.ch,r);return n==null?null:new st(t.line,n,r<0?"after":"before")}function sa(e,t,r,n,o){if(e){t.doc.direction=="rtl"&&(o=-o);var d=bt(r,t.doc.direction);if(d){var U,K=o<0?a(d):d[0],he=o<0==(K.level==1)?"after":"before";if(K.level>0||t.doc.direction=="rtl"){var ge=Zr(t,r);U=o<0?r.text.length-1:0;var je=Sr(t,ge,U).top;U=He((function(Ae){return Sr(t,ge,Ae).top==je}),o<0==(K.level==1)?K.from:K.to-1,U),he=="before"&&(U=oa(r,U,1))}else U=o<0?K.to:K.from;return new st(n,U,he)}}return new st(n,o<0?r.text.length:0,o<0?"before":"after")}function Zl(e,t,r,n){var o=bt(t,e.doc.direction);if(!o)return aa(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var d=yt(o,r.ch,r.sticky),U=o[d];if(e.doc.direction=="ltr"&&U.level%2==0&&(n>0?U.to>r.ch:U.from<r.ch))return aa(t,r,n);var K,he=function(Ot,Tt){return oa(t,Ot instanceof st?Ot.ch:Ot,Tt)},ge=function(Ot){return e.options.lineWrapping?(K=K||Zr(e,t),Sa(e,t,K,Ot)):{begin:0,end:t.text.length}},je=ge(r.sticky=="before"?he(r,-1):r.ch);if(e.doc.direction=="rtl"||U.level==1){var Ae=U.level==1==n<0,Ve=he(r,Ae?1:-1);if(Ve!=null&&(Ae?Ve<=U.to&&Ve<=je.end:Ve>=U.from&&Ve>=je.begin)){var Be=Ae?"before":"after";return new st(r.line,Ve,Be)}}var Ye=function(Ot,Tt,vt){for(var At=function(Cn,xr){return xr?new st(r.line,he(Cn,1),"before"):new st(r.line,Cn,"after")};Ot>=0&&Ot<o.length;Ot+=Tt){var jt=o[Ot],Ft=Tt>0==(jt.level!=1),On=Ft?vt.begin:he(vt.end,-1);if(jt.from<=On&&On<jt.to||(On=Ft?jt.from:he(jt.to,-1),vt.begin<=On&&On<vt.end))return At(On,Ft)}},ot=Ye(d+n,n,je);if(ot)return ot;var lt=n>0?je.end:he(je.begin,-1);return lt==null||n>0&<==t.text.length||!(ot=Ye(n>0?0:o.length-1,n,ge(lt)))?null:ot}Nr.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Nr.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Nr.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Nr.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Nr.default=F?Nr.macDefault:Nr.pcDefault;var Xi={selectAll:os,singleSelection:function(e){return e.setSelection(e.getCursor("anch
14or"),e.getCursor("head"),p)},killLine:function(e){return Si(e,(function(t){if(t.empty()){var r=ht(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:st(t.head.line+1,0)}:{from:t.head,to:st(t.head.line,r)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Si(e,(function(t){return{from:st(t.from().line,0),to:ft(e.doc,st(t.to().line+1,0))}}))},delLineLeft:function(e){return Si(e,(function(t){return{from:st(t.from().line,0),to:t.from()}}))},delWrappedLineLeft:function(e){return Si(e,(function(t){var r=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Si(e,(function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(st(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(st(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return xs(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return Os(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return Nl(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")}),Z)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")}),Z)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?Os(e,t.head):n}),Z)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,o=0;o<r.length;o++){var d=r[o].from(),U=k(e.getLine(d.line),d.ch,n);t.push(N(n-U%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return kr(e,(function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var o=t[n].head,d=ht(e.doc,o.line).text;if(d){if(o.ch==d.length&&(o=new st(o.line,o.ch-1)),o.ch>0)o=new st(o.line,o.ch+1),e.replaceRange(d.charAt(o.ch-1)+d.charAt(o.ch-2),st(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var U=ht(e.doc,o.line-1).text;U&&(o=new st(o.line,1),e.replaceRange(d.charAt(0)+e.doc.lineSeparator()+U.charAt(U.length-1),st(o.line-1,U.length-1),o,"+transpose"))}}r.push(new vn(o,o))}e.setSelections(r)}))},newlineAndIndent:function(e){return kr(e,(function(){for(var t=e.listSelections(),r=t.length-1;r>=0;
14r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);mi(e)}))},openLine:function(e){return e.replaceSelection(` 15`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function xs(e,t){var r=ht(e.doc,t),n=mn(r);return n!=r&&(t=Kt(n)),sa(!0,e,n,t,1)}function Nl(e,t){var r=ht(e.doc,t),n=$n(r);return n!=r&&(t=Kt(n)),sa(!0,e,r,t,-1)}function Os(e,t){var r=xs(e,t.line),n=ht(e.doc,r.line),o=bt(n,e.doc.direction);if(!o||o[0].level==0){var d=Math.max(r.ch,n.text.search(/\S/)),U=t.line==r.line&&t.ch<=d&&t.ch;return st(r.line,U?0:d,r.sticky)}return r}function jo(e,t,r){if(typeof t=="string"&&!(t=Xi[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),o=t(e)!=m}finally{e.display.shift=n,e.state.suppressEdits=!1}return o}function Il(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var o=Ci(t,e.state.keyMaps[n],r,e);if(o)return o}return e.options.extraKeys&&Ci(t,e.options.extraKeys,r,e)||Ci(t,e.options.keyMap,r,e)}var Fl=new v;function Ji(e,t,r,n){var o=e.state.keySeq;if(o){if(bs(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Fl.set(50,(function(){e.state.keySeq==o&&(e.state.keySeq=null,e.display.input.reset())})),Cs(e,o+" "+t,r,n))return!0}return Cs(e,t,r,n)}function Cs(e,t,r,n){var o=Il(e,t,n);return o=="multi"&&(e.state.keySeq=t),o=="handled"&&Mn(e,"keyHandled",e,t,r),o!="handled"&&o!="multi"||(Ne(r),zo(e)),!!o}function Ss(e,t){var r=ks(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?Ji(e,"Shift-"+r,t,(function(n){return jo(e,n,!0)}))||Ji(e,r,t,(function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return jo(e,n)})):Ji(e,r,t,(function(n){return jo(e,n)})))}function Vl(e,t,r){return Ji(e,"'"+r+"'",t,(function(n){return jo(e,n,!0)}))}var la=null;function _s(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=l(),Ze(t,e)))){ae&&se<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=Ss(t,e);g&&(la=n?r:null,n||r!=88||Sn||!(F?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),fe&&!F&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r!=18||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||Bl(t)}}function Bl(e){var t=e.display.lineDiv;function r(n){n.keyCode!=18&&n.altKey||(E(t,"CodeMirror-crosshair"),Oe(document,"keyup",r),Oe(document,"mouseover",r))}f(t,"CodeMirror-crosshair"),mt(document,"keyup",r),mt(document,"mouseover",r)}function Ps(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ze(this,e)}function Ts(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||ue(t.display,e)||Ze(t,e)||e.ctrlKey&&!e.altKey||F&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(g&&r==la)return la=null,void Ne(e);if(!g||e.which&&!(e.which<10)||!Ss(t,e)){var o=String.fromCharCode(n??r);o!="\b"&&(Vl(t,e,o)||t.display.input.onKeyPress(e))}}}var Qi,eo,Hl=400,ca=function(e,t,r){this.time=e,this.pos=t,this.button=r};function zl(e,t){var r=+new Date;return eo&&eo.compare(r,e,t)?(Qi=eo=null,"triple"):Qi&&Qi.compare(r,e,t)?(eo=new ca(r,e,t),Qi=null,"double"):(Qi=new ca(r,e,t),eo=null,"single")}function Es(e){var t=this,r=t.display;if(!(Ze(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.input.ensurePolled(),r.shift=e.shiftKey,ue(r,e))oe||(r.scroller.draggable=!1,setTimeout((function(){return r.scroller.draggable=!0}),100));else if(!ua(t,e)){var n=ri(t,e),o=it(e),d=n?zl(n,o):"single";window.focus(),o==1&&t.state.selectingText&&t.state.selectingText(e),n&&Ul(t,o,n,d,e)||(o==1?n?$l(t,n,d,e):wt(e)==r.scroller&&Ne(e):o==2?(n&&Co(t.doc,n),setTimeout((function(){return r.input.focus()}),20)):o==3&&(ee?t.display.input.onContextMenu(e):Uo(t)))}}}function Ul(e,t,r,n,o){var d="Click";return n=="double"?d="Double"+d:n=="triple"&&(d="Triple"+d),Ji(e,ws(d=(t==1?"Left":t==2?"Middle":"Right")+d,o),o,(function(U){if(typeof U=="string"&&(U=Xi[U]),!U)return!1;var K=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),K=U(e,r)!=m}
15finally{e.state.suppressEdits=!1}return K}))}function Wl(e,t,r){var n=e.getOption("configureMouse"),o=n?n(e,t,r):{};if(o.unit==null){var d=G?r.shiftKey&&r.metaKey:r.altKey;o.unit=d?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(o.extend==null||e.doc.extend)&&(o.extend=e.doc.extend||r.shiftKey),o.addNew==null&&(o.addNew=F?r.metaKey:r.ctrlKey),o.moveOnDrag==null&&(o.moveOnDrag=!(F?r.altKey:r.ctrlKey)),o}function $l(e,t,r,n){ae?setTimeout(J(ja,e),0):e.curOp.focus=l();var o,d=Wl(e,r,n),U=e.doc.sel;e.options.dragDrop&&$t&&!e.isReadOnly()&&r=="single"&&(o=U.contains(t))>-1&&(Nt((o=U.ranges[o]).from(),t)<0||t.xRel>0)&&(Nt(o.to(),t)>0||t.xRel<0)?ql(e,n,t,d):Gl(e,n,t,d)}function ql(e,t,r,n){var o=e.display,d=!1,U=Xn(e,(function(ge){oe&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Uo(e)),Oe(o.wrapper.ownerDocument,"mouseup",U),Oe(o.wrapper.ownerDocument,"mousemove",K),Oe(o.scroller,"dragstart",he),Oe(o.scroller,"drop",U),d||(Ne(ge),n.addNew||Co(e.doc,r,null,null,n.extend),oe&&!P||ae&&se==9?setTimeout((function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()}),20):o.input.focus())})),K=function(ge){d=d||Math.abs(t.clientX-ge.clientX)+Math.abs(t.clientY-ge.clientY)>=10},he=function(){return d=!0};oe&&(o.scroller.draggable=!0),e.state.draggingText=U,U.copy=!n.moveOnDrag,mt(o.wrapper.ownerDocument,"mouseup",U),mt(o.wrapper.ownerDocument,"mousemove",K),mt(o.scroller,"dragstart",he),mt(o.scroller,"drop",U),e.state.delayingBlurEvent=!0,setTimeout((function(){return o.input.focus()}),20),o.scroller.dragDrop&&o.scroller.dragDrop()}function js(e,t,r){if(r=="char")return new vn(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new vn(st(t.line,0),ft(e.doc,st(t.line+1,0)));var n=r(e,t);return new vn(n.from,n.to)}function Gl(e,t,r,n){ae&&Uo(e);var o=e.display,d=e.doc;Ne(t);var U,K,he=d.sel,ge=he.ranges;if(n.addNew&&!n.extend?(K=d.sel.contains(r),U=K>-1?ge[K]:new vn(r,r)):(U=d.sel.primary(),K=d.sel.primIndex),n.unit=="rectangle")n.addNew||(U=new vn(r,r)),r=ri(e,t,!0,!0),K=-1;else{var je=js(e,r,n.unit);U=n.extend?ra(U,je.anchor,je.head,n.extend):je}n.addNew?K==-1?(K=ge.length,ir(d,Ar(e,ge.concat([U]),K),{scroll:!1,origin:"*mouse"})):ge.length>1&&ge[K].empty()&&n.unit=="char"&&!n.extend?(ir(d,Ar(e,ge.slice(0,K).concat(ge.slice(K+1)),0),{scroll:!1,origin:"*mouse"}),he=d.sel):ia(d,K,U,y):(K=0,ir(d,new Pr([U],0),y),he=d.sel);var Ae=r;function Ve(vt){if(Nt(Ae,vt)!=0)if(Ae=vt,n.unit=="rectangle"){for(var At=[],jt=e.options.tabSize,Ft=k(ht(d,r.line).text,r.ch,jt),On=k(ht(d,vt.line).text,vt.ch,jt),Cn=Math.min(Ft,On),xr=Math.max(Ft,On),jn=Math.min(r.line,vt.line),Er=Math.min(e.lastLine(),Math.max(r.line,vt.line));jn<=Er;jn++){var Or=ht(d,jn).text,Ln=Y(Or,Cn,jt);Cn==xr?At.push(new vn(st(jn,Ln),st(jn,Ln))):Or.length>Ln&&At.push(new vn(st(jn,Ln),st(jn,Y(Or,xr,jt))))}At.length||At.push(new vn(r,r)),ir(d,Ar(e,he.ranges.slice(0,K).concat(At),K),{origin:"*mouse",scroll:!1}),e.scrollIntoView(vt)}else{var vr,sr=U,Hn=js(e,vt,n.unit),Nn=sr.anchor;Nt(Hn.anchor,Nn)>0?(vr=Hn.head,Nn=gt(sr.from(),Hn.anchor)):(vr=Hn.anchor,Nn=Xe(sr.to(),Hn.head));var zn=he.ranges.slice(0);zn[K]=Kl(e,new vn(ft(d,Nn),vr)),ir(d,Ar(e,zn,K),y)}}var Be=o.wrapper.getBoundingClientRect(),Ye=0;function ot(vt){var At=++Ye,jt=ri(e,vt,!0,n.unit=="rectangle");if(jt)if(Nt(jt,Ae)!=0){e.curOp.focus=l(),Ve(jt);var Ft=yo(o,d);(jt.line>=Ft.to||jt.line<Ft.from)&&setTimeout(Xn(e,(function(){Ye==At&&ot(vt)})),150)}else{var On=vt.clientY<Be.top?-20:vt.clientY>Be.bottom?20:0;On&&setTimeout(Xn(e,(function(){Ye==At&&(o.scroller.scrollTop+=On,ot(vt))})),50)}}function lt(vt){e.state.selectingText=!1,Ye=1/0,vt&&(Ne(vt),o.input.focus()),Oe(o.wrapper.ownerDocument,"mousemove",Ot),Oe(o.wrapper.ownerDocument,"mouseup",Tt),d.history.lastSelOrigin=null}var Ot=Xn(e,(function(vt){vt.buttons!==0&&it(vt)?ot(vt):lt(vt)})),Tt=Xn(e,lt);e.state.selectingText=Tt,mt(o.wrapper.ownerDocument,"mousemove",Ot),mt(o.wrapper.ownerDocument,"mouseup",Tt)}function Kl(e,t){var r=t.anchor,n=t.head,o=ht(e.doc,r.line);if(Nt(r,n)==0&&r.sticky==n.sticky)return t;var d=bt(o);if(!d)return t;var U=yt(d,r.ch,r.sticky),K=d[U];if(K.from!=r.ch&&K.to!=r.ch)return t;var he,ge=U+(K.from==r.ch==(K.level!=1)?0:1);if(ge==0||ge==d.length)return t;
vendor: 12,022 bytes, lines 15-18
15if(n.line!=r.line)he=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var je=yt(d,n.ch,n.sticky),Ae=je-U||(n.ch-r.ch)*(K.level==1?-1:1);he=je==ge-1||je==ge?Ae<0:Ae>0}var Ve=d[ge+(he?-1:0)],Be=he==(Ve.level==1),Ye=Be?Ve.from:Ve.to,ot=Be?"after":"before";return r.ch==Ye&&r.sticky==ot?t:new vn(new st(r.line,Ye,ot),n)}function As(e,t,r,n){var o,d;if(t.touches)o=t.touches[0].clientX,d=t.touches[0].clientY;else try{o=t.clientX,d=t.clientY}catch{return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Ne(t);var U=e.display,K=U.lineDiv.getBoundingClientRect();if(d>K.bottom||!rt(e,r))return at(t);d-=K.top-U.viewOffset;for(var he=0;he<e.display.gutterSpecs.length;++he){var ge=U.gutters.childNodes[he];if(ge&&ge.getBoundingClientRect().right>=o)return De(e,r,e,Vt(e.doc,d),e.display.gutterSpecs[he].className,t),at(t)}}function ua(e,t){return As(e,t,"gutterClick",!0)}function Ds(e,t){ue(e.display,t)||Yl(e,t)||Ze(e,t,"contextmenu")||ee||e.display.input.onContextMenu(t)}function Yl(e,t){return!!rt(e,"gutterContextMenu")&&As(e,t,"gutterContextMenu",!1)}function Rs(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Mi(e)}ca.prototype.compare=function(e,t,r){return this.time+Hl>e&&Nt(t,this.pos)==0&&r==this.button};var _i={toString:function(){return"CodeMirror.Init"}},Ms={},Ao={};function Xl(e){var t=e.optionHandlers;function r(n,o,d,U){e.defaults[n]=o,d&&(t[n]=U?function(K,he,ge){ge!=_i&&d(K,he,ge)}:d)}e.defineOption=r,e.Init=_i,r("value","",(function(n,o){return n.setValue(o)}),!0),r("mode",null,(function(n,o){n.doc.modeOption=o,ea(n)}),!0),r("indentUnit",2,ea,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(n){Hi(n),Mi(n),pr(n)}),!0),r("lineSeparator",null,(function(n,o){if(n.doc.lineSep=o,o){var d=[],U=n.doc.first;n.doc.iter((function(he){for(var ge=0;;){var je=he.text.indexOf(o,ge);if(je==-1)break;ge=je+o.length,d.push(st(U,je))}U++}));for(var K=d.length-1;K>=0;K--)xi(n.doc,o,d[K],st(d[K].line,d[K].ch+o.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(n,o,d){n.state.specialChars=new RegExp(o.source+(o.test(" ")?"":"| "),"g"),d!=_i&&n.refresh()})),r("specialCharPlaceholder",br,(function(n){return n.refresh()}),!0),r("electricChars",!0),r("inputStyle",z?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(n,o){return n.getInputField().spellcheck=o}),!0),r("autocorrect",!1,(function(n,o){return n.getInputField().autocorrect=o}),!0),r("autocapitalize",!1,(function(n,o){return n.getInputField().autocapitalize=o}),!0),r("rtlMoveVisually",!H),r("wholeLineUpdateBefore",!0),r("theme","default",(function(n){Rs(n),Bi(n)}),!0),r("keyMap","default",(function(n,o,d){var U=Eo(o),K=d!=_i&&Eo(d);K&&K.detach&&K.detach(n,U),U.attach&&U.attach(n,K||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Ql,!0),r("gutters",[],(function(n,o){n.display.gutterSpecs=Jo(o,n.options.lineNumbers),Bi(n)}),!0),r("fixedGutter",!0,(function(n,o){n.display.gutters.style.left=o?Bo(n.display)+"px":"0",n.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(n){return yi(n)}),!0),r("scrollbarStyle","native",(function(n){Za(n),yi(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(n,o){n.display.gutterSpecs=Jo(n.options.gutters,o),Bi(n)}),!0),r("firstLineNumber",1,Bi,!0),r("lineNumberFormatter",(function(n){return n}),Bi,!0),r("showCursorWhenSelecting",!1,Li,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(n,o){o=="nocursor"&&(vi(n),n.display.input.blur()),n.display.input.readOnlyChanged(o)})),r("screenReaderLabel",null,(function(n,o){o=o===""?null:o,n.display.input.screenReaderLabelChanged(o)})),r("disableInput",!1,(function(n,o){o||n.display.input.reset()}),!0),r("dragDrop",!0,Jl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Li,!0),r("singleCursorHeightPerLine",!0,Li,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,Hi,!0),r("addModeClass",!1,Hi,!0),r("pollInterval",100),r("undoDepth",200,(function(n,o){return n.doc.history.undoDepth=o})),r("historyEventDelay",1250),r("viewportMargin",10,(function(n){return n.refresh()}),!0),r("maxHighlightLength",1e4,Hi,!0),r("moveInputWithCursor",!0,(function(n,o){o||n.display.input.resetPosition()})),r("tabindex",null,(function(n,o){return n.display.input.getField().tabIndex=o||""})),r("autofocus",null),r("direction","ltr",(function(n,o){return n.doc.setDirection(o)}),!0),r("phrases",null)}function Jl(e,t,r){if(!t!=!(r&&r!=_i)){var n=e.display.dragFunctions,o=t?mt:Oe;o(e.display.scroller,"dragstart",n.start),o(e.display.scroller,"dragenter",n.enter),o(e.display.scroller,"dragover",n.over),o(e.display.scroller,"dragleave",n.leave),o(e.display.scroller,"drop",n.drop)}}function Ql(e){e.options.lineWrapping?(f(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(E(e.display.wrapper,"CodeMirror-wrap"),dr(e)),Ho(e),pr(e),Mi(e),setTimeout((function(){return yi(e)}),100)}function Dn(e,t){var r=this;if(!(this instanceof Dn))return new Dn(e,t);this.options=t=t?R(t):{},R(Ms,t,!1);var n=t.value;typeof n=="string"?n=new gr(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var o=new Dn.inputStyles[t.inputStyle](this),d=this.display=new hl(e,n,o,t);for(var U in d.wrapper.CodeMirror=this,Rs(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Za(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new v,keySeq:null,specialChars:null},t.autofocus&&!z&&d.input.focus(),ae&&se<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),ec(this),Al(),si(this),this.curOp.forceUpdate=!0,$a(this,n),t.autofocus&&!z||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&Wo(r)}),20):vi(this),Ao)Ao.hasOwnProperty(U)&&Ao[U](this,t[U],_i);Fa(this),t.finishInit&&t.finishInit(this);for(var K=0;K<fa.length;++K)fa[K](this);li(this),oe&&t.lineWrapping&&getComputedStyle(d.lineDiv).textRendering=="optimizelegibility"&&(d.lineDiv.style.textRendering="auto")}function ec(e){var t=e.display;mt(t.scroller,"mousedown",Xn(e,Es)),mt(t.scroller,"dblclick",ae&&se<11?Xn(e,(function(he){if(!Ze(e,he)){var ge=ri(e,he);if(ge&&!ua(e,he)&&!ue(e.display,he)){Ne(he);var je=e.findWordAt(ge);Co(e.doc,je.anchor,je.head)}}})):function(he){return Ze(e,he)||Ne(he)}),mt(t.scroller,"contextmenu",(function(he){return Ds(e,he)})),mt(t.input.getField(),"contextmenu",(function(he){t.scroller.contains(he.target)||Ds(e,he)}));var r,n={end:0};function o(){t.activeTouch&&(r=setTimeout((function(){return t.activeTouch=null}),1e3),(n=t.activeTouch).end=+new Date)}function d(he){if(he.touches.length!=1)return!1;var ge=he.touches[0];return ge.radiusX<=1&&ge.radiusY<=1}function U(he,ge){if(ge.left==null)return!0;var je=ge.left-he.left,Ae=ge.top-he.top;return je*je+Ae*Ae>400}mt(t.scroller,"touchstart",(function(he){if(!Ze(e,he)&&!d(he)&&!ua(e,he)){t.input.ensurePolled(),clearTimeout(r);var ge=+new Date;t.activeTouch={start:ge,moved:!1,prev:ge-n.end<=300?n:null},he.touches.length==1&&(t.activeTouch.left=he.touches[0].pageX,t.activeTouch.top=he.touches[0].pageY)}})),mt(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),mt(t.scroller,"touchend",(function(he){var ge=t.activeTouch;if(ge&&!ue(t,he)&&ge.left!=null&&!ge.moved&&new Date-ge.start<300){var je,Ae=e.coordsChar(t.activeTouch,"page");je=!ge.prev||U(ge,ge.prev)?new vn(Ae,Ae):!ge.prev.prev||U(ge,ge.prev.prev)?e.findWordAt(Ae):new vn(st(Ae.line,0),ft(e.doc,st(Ae.line+1,0))),e.setSelection(je.anchor,je.head),e.focus(),Ne(he)}o()})),mt(t.scroller,"touchcancel",o),mt(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Ni(e,t.scroller.scrollTop),oi(e,t.scroller.scrollLeft,!0),De(e,"scroll",e))})),mt(t.scroller,"mousewheel",(function(he){return Ha(e,he)})),mt(t.scroller,"DOMMouseScroll",(function(he){return Ha(e,he)})),mt(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(he){Ze(e,he)||tt(he)},over:function(he){Ze(e,he)||(jl(e,he),tt(he))},start:function(he){return El(e,he)},drop:Xn(e,Tl),leave:function(he){Ze(e,he)||vs(e)}};var K=t.input.getField();mt(K,"keyup",(function(he){return Ps.call(e,he)})),mt(K,"keydown",Xn(e,_s)),mt(K,"keypress",Xn(e,Ts)),mt(K,"focus",(function(he){return Wo(e,he)})),mt(K,"blur",(function(he){return vi(e,he)}))}Dn.defaults=Ms,Dn.optionHandlers=Ao;var fa=[];function to(e,t,r,n){var o,d=e.doc;r==null&&(r="add"),r=="smart"&&(d.mode.indent?o=Wn(e,t).state:r="prev");var U=e.options.tabSize,K=ht(d,t),he=k(K.text,null,U);K.stateAfter&&(K.stateAfter=null);var ge,je=K.text.match(/^\s*/)[0];if(n||/\S/.test(K.text)){if(r=="smart"&&((ge=d.mode.indent(o,K.text.slice(je.length),K.text))==m||ge>150)){if(!n)return;r="prev"}}else ge=0,r="not";r=="prev"?ge=t>d.first?k(ht(d,t-1).text,null,U):0:r=="add"?ge=he+e.options.indentUnit:r=="subtract"?ge=he-e.options.indentUnit:typeof r=="number"&&(ge=he+r),ge=Math.max(0,ge);var Ae="",Ve=0;if(e.options.indentWithTabs)for(var Be=Math.floor(ge/U);Be;--Be)Ve+=U,Ae+=" ";if(Ve<ge&&(Ae+=N(ge-Ve)),Ae!=je)return xi(d,Ae,st(t,0),st(t,je.length),"+input"),K.stateAfter=null,!0;for(var Ye=0;Ye<d.sel.ranges.length;Ye++){var ot=d.sel.ranges[Ye];if(ot.head.line==t&&ot.head.ch<je.length){var lt=st(t,je.length);ia(d,Ye,new vn(lt,lt));break}}}Dn.defineInitHook=function(e){return fa.push(e)};var Dr=null;function Do(e){Dr=e}function ha(e,t,r,n,o){var d=e.doc;e.display.shift=!1,n||(n=d.sel);var U=+new Date-200,K=o=="paste"||e.state.pasteIncoming>U,he=ut(t),ge=null;if(K&&n.ranges.length>1)if(Dr&&Dr.text.join(` 16`)==t){if(n.ranges.length%Dr.text.length==0){ge=[];for(var je=0;je<Dr.text.length;je++)ge.push(d.splitLines(Dr.text[je]))}}else he.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(ge=c(he,(function(Ot){return[Ot]})));for(var Ae=e.curOp.updateInput,Ve=n.ranges.length-1;Ve>=0;Ve--){var Be=n.ranges[Ve],Ye=Be.from(),ot=Be.to();Be.empty()&&(r&&r>0?Ye=st(Ye.line,Ye.ch-r):e.state.overwrite&&!K?ot=st(ot.line,Math.min(ht(d,ot.line).text.length,ot.ch+a(he).length)):K&&Dr&&Dr.lineWise&&Dr.text.join(` 17`)==he.join(` 18`)&&(Ye=ot=st(Ye.line,0)));var lt={from:Ye,to:ot,text:ge?ge[Ve%ge.length]:he,origin:o||(K?"paste":e.state.cutIncoming>U?"cut":"+input")};ki(e.doc,lt),Mn(e,"inputRead",e,lt)}t&&!K&&Zs(e,t),mi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Ae),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ls(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||kr(t,(function(){return ha(t,r,0,null,"paste")})),!0}function Zs(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var o=r.ranges[n];if(!(o.head.ch>100||n&&r.ranges[n-1].head.line==o.head.line)){var d=e.getModeAt(o.head),U=!1;if(d.electricChars){for(var K=0;K<d.electricChars.length;K++)if(t.indexOf(d.electricChars.charAt(K))>-1){U=to(e,o.head.line,"smart");break}}else d.electricInput&&d.electricInput.test(ht(e.doc,o.head.line).text.slice(0,o.head.ch))&&(U=to(e,o.head.line,"smart"));U&&Mn(e,"electricInput",e,o.head.line)}}}function Ns(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var o=e.doc.sel.ranges[n].head.line,d={anchor:st(o,0),head:st(o+1,0)};r.push(d),t.push(e.getRange(d.anchor,d.head))}return{text:t,ranges:r}}function Is(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}
18function Fs(){var e=_("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=_("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return oe?e.style.width="1000px":e.setAttribute("wrap","off"),$&&(e.style.border="1px solid black"),Is(e),t}function tc(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,o){var d=this.options,U=d[n];d[n]==o&&n!="mode"||(d[n]=o,t.hasOwnProperty(n)&&Xn(this,t[n])(this,o,U),De(this,"optionChange",this,n))},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,o){this.state.keyMaps[o?"push":"unshift"](Eo(n))},removeKeyMap:function(n){for(var o=this.state.keyMaps,d=0;d<o.length;++d)if(o[d]==n||o[d].name==n)return o.splice(d,1),!0},addOverlay:ar((function(n,o){var d=n.token?n:e.getMode(this.options,n);if(d.startState)throw new Error("Overlays may not be stateful.");C(this.state.overlays,{mode:d,modeSpec:n,opaque:o&&o.opaque,priority:o&&o.priority||0},(function(U){return U.priority})),this.state.modeGen++,pr(this)})),removeOverlay:ar((function(n){for(var o=this.state.overlays,d=0;d<o.length;++d){var U=o[d].modeSpec;if(U==n||typeof n=="string"&&U.name==n)return o.splice(d,1),this.state.modeGen++,void pr(this)}})),indentLine:ar((function(n,o,d){typeof o!="string"&&typeof o!="number"&&(o=o==null?this.options.smartIndent?"smart":"prev":o?"add":"subtract"),Rn(this.doc,n)&&to(this,n,o,d)})),indentSelection:ar((function(n){for(var o=this.doc.sel.ranges,d=-1,U=0;U<o.length;U++){var K=o[U];if(K.empty())K.head.line>d&&(to(this,K.head.line,n,!0),d=K.head.line,U==this.doc.sel.primIndex&&mi(this));else{var he=K.from(),ge=K.to(),je=Math.max(d,he.line);d=Math.min(this.lastLine(),ge.line-(ge.ch?0:1))+1;for(var Ae=je;Ae<d;++Ae)to(this,Ae,n);var Ve=this.doc.sel.ranges;he.ch==0&&o.length==Ve.length&&Ve[U].from().ch>0&&ia(this.doc,U,new vn(he,Ve[U].to()),p)}}})),getTokenAt:function(n,o){return Bn(this,n,o)},getLineTokens:function(n,o){return Bn(this,st(n),o,!0)},getTokenTypeAt:function(n){n=ft(this.doc,n);var o,d=cr(this,ht(this.doc,n.line)),U=0,K=(d.length-1)/2,he=n.ch;if(he==0)o=d[2];else for(;;){var ge=U+K>>1;if((ge?d[2*ge-1]:0)>=he)K=ge;else{if(!(d[2*ge+1]<he)){o=d[2*ge+2];break}U=ge+1}}var je=o?o.indexOf("overlay "):-1;return je<0?o:je==0?null:o.slice(0,je-1)},getModeAt:function(n){var o=this.doc.mode;return o.innerMode?e.innerMode(o,this.getTokenAt(n).state).mode:o},getHelper:function(n,o){return this.getHelpers(n,o)[0]},getHelpers:function(n,o){var d=[];if(!r.hasOwnProperty(o))return d;var U=r[o],K=this.getModeAt(n);if(typeof K[o]=="string")U[K[o]]&&d.push(U[K[o]]);else if(K[o])for(var he=0;he<K[o].length;he++){var ge=U[K[o][he]];ge&&d.push(ge)}else K.helperType&&U[K.helperType]?d.push(U[K.helperType]):U[K.name]&&d.push(U[K.name]);for(var je=0;je<U._global.length;je++){var Ae=U._global[je];Ae.pred(K,this)&&b(d,Ae.val)==-1&&d.push(Ae.val)}return d},getStateAfter:function(n,o){var d=this.doc;return Wn(this,(n=kt(d,n??d.first+d.size-1))+1,o).state},cursorCoords:function(n,o){var d=this.doc.sel.primary();return jr(this,n==null?d.head:typeof n=="object"?ft(this.doc,n):n?d.from():d.to(),o||"page")},charCoords:function(n,o){return po(this,ft(this.doc,n),o||"page")},coordsChar:function(n,o){return Io(this,(n=xa(this,n,o||"page")).left,n.top)},lineAtHeight:function(n,o){return n=xa(this,{top:n,left:0},o||"page").top,Vt(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,o,d){var U,K=!1;if(typeof n=="number"){var he=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>he&&(n=he,K=!0),U=ht(this.doc,n)}else U=n;return ho(this,U,{top:0,left:0},o||"page",d||K).top+(K?this.doc.height-fn(U):0)},defaultTextHeight:function(){return pi(this.display)},defaultCharWidth:function(){return gi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,o,d,U,K){var he=this.display,ge=(n=jr(this,ft(this.doc,n))).bottom,je=n.left;if(o.style.position="absolute",o.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(o),he.sizer.appendChild(o),U=="over")ge=n.top;else if(U=="above"||U=="near"){var Ae=Math.max(he.wrapper.clientHeight,this.doc.height),Ve=Math.max(he.sizer.clientWidth,he.lineSpace.clientWidth);(U=="above"||n.bottom+o.offsetHeight>Ae)&&n.top>o.offsetHeight?ge=n.top-o.offsetHeight:n.bottom+o.offsetHeight<=Ae&&(ge=n.bottom),je+o.offsetWidth>Ve&&(je=Ve-o.offsetWidth)}o.style.top=ge+"px",o.style.left=o.style.right="",K=="right"?(je=he.sizer.clientWidth-o.offsetWidth,o.style.right="0px"):(K=="left"?je=0:K=="middle"&&(je=(he.sizer.clientWidth-o.offsetWidth)/2),o.style.left=je+"px"),d&&Js(this,{left:je,top:ge,right:je+o.offsetWidth,bottom:ge+o.offsetHeight})}
vendor: 12,621 bytes, lines 18-22
18,triggerOnKeyDown:ar(_s),triggerOnKeyPress:ar(Ts),triggerOnKeyUp:Ps,triggerOnMouseDown:ar(Es),execCommand:function(n){if(Xi.hasOwnProperty(n))return Xi[n].call(null,this)},triggerElectric:ar((function(n){Zs(this,n)})),findPosH:function(n,o,d,U){var K=1;o<0&&(K=-1,o=-o);for(var he=ft(this.doc,n),ge=0;ge<o&&!(he=da(this.doc,he,K,d,U)).hitSide;++ge);return he},moveH:ar((function(n,o){var d=this;this.extendSelectionsBy((function(U){return d.display.shift||d.doc.extend||U.empty()?da(d.doc,U.head,n,o,d.options.rtlMoveVisually):n<0?U.from():U.to()}),Z)})),deleteH:ar((function(n,o){var d=this.doc.sel,U=this.doc;d.somethingSelected()?U.replaceSelection("",null,"+delete"):Si(this,(function(K){var he=da(U,K.head,n,o,!1);return n<0?{from:he,to:K.head}:{from:K.head,to:he}}))})),findPosV:function(n,o,d,U){var K=1,he=U;o<0&&(K=-1,o=-o);for(var ge=ft(this.doc,n),je=0;je<o;++je){var Ae=jr(this,ge,"div");if(he==null?he=Ae.left:Ae.left=he,(ge=Vs(this,Ae,K,d)).hitSide)break}return ge},moveV:ar((function(n,o){var d=this,U=this.doc,K=[],he=!this.display.shift&&!U.extend&&U.sel.somethingSelected();if(U.extendSelectionsBy((function(je){if(he)return n<0?je.from():je.to();var Ae=jr(d,je.head,"div");je.goalColumn!=null&&(Ae.left=je.goalColumn),K.push(Ae.left);var Ve=Vs(d,Ae,n,o);return o=="page"&&je==U.sel.primary()&&qo(d,po(d,Ve,"div").top-Ae.top),Ve}),Z),K.length)for(var ge=0;ge<U.sel.ranges.length;ge++)U.sel.ranges[ge].goalColumn=K[ge]})),findWordAt:function(n){var o=ht(this.doc,n.line).text,d=n.ch,U=n.ch;if(o){var K=this.getHelper(n,"wordChars");n.sticky!="before"&&U!=o.length||!d?++U:--d;for(var he=o.charAt(d),ge=me(he,K)?function(je){return me(je,K)}:/\s/.test(he)?function(je){return/\s/.test(je)}:function(je){return!/\s/.test(je)&&!me(je)};d>0&&ge(o.charAt(d-1));)--d;for(;U<o.length&&ge(o.charAt(U));)++U}return new vn(st(n.line,d),st(n.line,U))},toggleOverwrite:function(n){n!=null&&n==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?f(this.display.cursorDiv,"CodeMirror-overwrite"):E(this.display.cursorDiv,"CodeMirror-overwrite"),De(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==l()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:ar((function(n,o){Zi(this,n,o)})),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-ze(this)-this.display.barHeight,width:n.scrollWidth-ze(this)-this.display.barWidth,clientHeight:nt(this),clientWidth:Ie(this)}},scrollIntoView:ar((function(n,o){n==null?(n={from:this.doc.sel.primary().head,to:null},o==null&&(o=this.options.cursorScrollMargin)):typeof n=="number"?n={from:st(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=o||0,n.from.line!=null?Qs(this,n):Da(this,n.from,n.to,n.margin)})),setSize:ar((function(n,o){var d=this,U=function(he){return typeof he=="number"||/^\d+$/.test(String(he))?he+"px":he};n!=null&&(this.display.wrapper.style.width=U(n)),o!=null&&(this.display.wrapper.style.height=U(o)),this.options.lineWrapping&&ba(this);var K=this.display.viewFrom;this.doc.iter(K,this.display.viewTo,(function(he){if(he.widgets){for(var ge=0;ge<he.widgets.length;ge++)if(he.widgets[ge].noHScroll){qr(d,K,"widget");break}}++K})),this.curOp.forceUpdate=!0,De(this,"refresh",this)})),operation:function(n){return kr(this,n)},startOperation:function(){return si(this)},endOperation:function(){return li(this)},refresh:ar((function(){var n=this.display.cachedTextHeight;pr(this),this.curOp.forceUpdate=!0,Mi(this),Zi(this,this.doc.scrollLeft,this.doc.scrollTop),Yo(this.display),(n==null||Math.abs(n-pi(this.display))>.5||this.options.lineWrapping)&&Ho(this),De(this,"refresh",this)})),swapDoc:ar((function(n){var o=this.doc;return o.cm=null,this.state.selectingText&&this.state.selectingText(),$a(this,n),Mi(this),this.display.input.reset(),Zi(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,Mn(this,"swapDoc",this,o),o})),phrase:function(n){var o=this.options.phrases;return o&&Object.prototype.hasOwnProperty.call(o,n)?o[n]:n},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Te(e),e.registerHelper=function(n,o,d){r.hasOwnProperty(n)||(r[n]=e[n]={_global:[]}),r[n][o]=d},e.registerGlobalHelper=function(n,o,d,U){e.registerHelper(n,o,U),r[n]._global.push({pred:d,val:U})}}function da(e,t,r,n,o){var d=t,U=r,K=ht(e,t.line),he=o&&e.direction=="rtl"?-r:r;function ge(){var Tt=t.line+he;return!(Tt<e.first||Tt>=e.first+e.size)&&(t=new st(Tt,t.ch,t.sticky),K=ht(e,Tt))}function je(Tt){var vt;if(n=="codepoint"){var At=K.text.charCodeAt(t.ch+(r>0?0:-1));if(isNaN(At))vt=null;else{var jt=r>0?At>=55296&&At<56320:At>=56320&&At<57343;vt=new st(t.line,Math.max(0,Math.min(K.text.length,t.ch+r*(jt?2:1))),-r)}}else vt=o?Zl(e.cm,K,t,r):aa(K,t,r);if(vt==null){if(Tt||!ge())return!1;t=sa(o,e.cm,K,t.line,he)}else t=vt;return!0}if(n=="char"||n=="codepoint")je();else if(n=="column")je(!0);else if(n=="word"||n=="group")for(var Ae=null,Ve=n=="group",Be=e.cm&&e.cm.getHelper(t,"wordChars"),Ye=!0;!(r<0)||je(!Ye);Ye=!1){var ot=K.text.charAt(t.ch)||` 19`,lt=me(ot,Be)?"w":Ve&&ot==` 20`?"n":!Ve||/\s/.test(ot)?null:"p";if(!Ve||Ye||lt||(lt="s"),Ae&&Ae!=lt){r<0&&(r=1,je(),t.sticky="after");break}if(lt&&(Ae=lt),r>0&&!je(!Ye))break}var Ot=_o(e,t,d,U,!0);return be(d,Ot)&&(Ot.hitSide=!0),Ot}function Vs(e,t,r,n){var o,d,U=e.doc,K=t.left;if(n=="page"){var he=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ge=Math.max(he-.5*pi(e.display),3);o=(r>0?t.bottom:t.top)+r*ge}else n=="line"&&(o=r>0?t.bottom+3:t.top-3);for(;(d=Io(e,K,o)).outside;){if(r<0?o<=0:o>=U.height){d.hitSide=!0;break}o+=5*r}return d}var bn=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new v,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Bs(e,t){var r=wr(e,t.line);if(!r||r.hidden)return null;var n=ht(e.doc,t.line),o=Ht(r,n,t.line),d=bt(n,e.doc.direction),U="left";d&&(U=yt(d,t.ch)%2?"right":"left");var K=ma(o.map,t.ch,U);return K.offset=K.collapse=="right"?K.end:K.start,K}function nc(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Pi(e,t){return t&&(e.bad=!0),e}function rc(e,t,r,n,o){var d="",U=!1,K=e.doc.lineSeparator(),he=!1;function ge(Be){return function(Ye){return Ye.id==Be}}function je(){U&&(d+=K,he&&(d+=K),U=he=!1)}function Ae(Be){Be&&(je(),d+=Be)}function Ve(Be){if(Be.nodeType==1){var Ye=Be.getAttribute("cm-text");if(Ye)return void Ae(Ye);var ot,lt=Be.getAttribute("cm-marker");if(lt){var Ot=e.findMarks(st(n,0),st(o+1,0),ge(+lt));return void(Ot.length&&(ot=Ot[0].find(0))&&Ae(Fn(e.doc,ot.from,ot.to).join(K)))}if(Be.getAttribute("contenteditable")=="false")return;var Tt=/^(pre|div|p|li|table|br)$/i.test(Be.nodeName);if(!/^br$/i.test(Be.nodeName)&&Be.textContent.length==0)return;Tt&&je();for(var vt=0;vt<Be.childNodes.length;vt++)Ve(Be.childNodes[vt]);/^(pre|p)$/i.test(Be.nodeName)&&(he=!0),Tt&&(U=!0)}else Be.nodeType==3&&Ae(Be.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Ve(t),t!=r;)t=t.nextSibling,he=!1;return d}function Ro(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return Pi(e.clipPos(st(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var o=0;o<e.display.view.length;o++){var d=e.display.view[o];if(d.node==n)return ic(d,t,r)}}function ic(e,t,r){var n=e.text.firstChild,o=!1;if(!t||!s(n,t))return Pi(st(Kt(e.line),0),!0);if(t==n&&(o=!0,t=n.childNodes[r],r=0,!t)){var d=e.rest?a(e.rest):e.line;return Pi(st(Kt(d),d.text.length),o)}var U=t.nodeType==3?t:null,K=t;for(U||t.childNodes.length!=1||t.firstChild.nodeType!=3||(U=t.firstChild,r&&(r=U.nodeValue.length));K.parentNode!=n;)K=K.parentNode;var he=e.measure,ge=he.maps;function je(lt,Ot,Tt){for(var vt=-1;vt<(ge?ge.length:0);vt++)for(var At=vt<0?he.map:ge[vt],jt=0;jt<At.length;jt+=3){var Ft=At[jt+2];if(Ft==lt||Ft==Ot){var On=Kt(vt<0?e.line:e.rest[vt]),Cn=At[jt]+Tt;return(Tt<0||Ft!=lt)&&(Cn=At[jt+(Tt?1:0)]),st(On,Cn)}}}var Ae=je(U,K,r);if(Ae)return Pi(Ae,o);for(var Ve=K.nextSibling,Be=U?U.nodeValue.length-r:0;Ve;Ve=Ve.nextSibling){if(Ae=je(Ve,Ve.firstChild,0))return Pi(st(Ae.line,Ae.ch-Be),o);Be+=Ve.textContent.length}for(var Ye=K.previousSibling,ot=r;Ye;Ye=Ye.previousSibling){if(Ae=je(Ye,Ye.firstChild,-1))return Pi(st(Ae.line,Ae.ch+ot),o);ot+=Ye.textContent.length}}bn.prototype.init=function(e){var t=this,r=this,n=r.cm,o=r.div=e.lineDiv;function d(K){for(var he=K.target;he;he=he.parentNode){if(he==o)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(he.className))break}return!1}function U(K){if(d(K)&&!Ze(n,K)){if(n.somethingSelected())Do({lineWise:!1,text:n.getSelections()}),K.type=="cut"&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var he=Ns(n);Do({lineWise:!0,text:he.text}),K.type=="cut"&&n.operation((function(){n.setSelections(he.ranges,0,p),n.replaceSelection("",null,"cut")}))}if(K.clipboardData){K.clipboardData.clearData();var ge=Dr.text.join(` 21`);if(K.clipboardData.setData("Text",ge),K.clipboardData.getData("Text")==ge)return void K.preventDefault()}var je=Fs(),Ae=je.firstChild;n.display.lineSpace.insertBefore(je,n.display.lineSpace.firstChild),Ae.value=Dr.text.join(` 22`);var Ve=l();te(Ae),setTimeout((function(){n.display.lineSpace.removeChild(je),Ve.focus(),Ve==o&&r.showPrimarySelection()}),50)}}o.contentEditable=!0,Is(o,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize),mt(o,"paste",(function(K){!d(K)||Ze(n,K)||Ls(K,n)||se<=11&&setTimeout(Xn(n,(function(){return t.updateFromDOM()})),20)})),mt(o,"compositionstart",(function(K){t.composing={data:K.data,done:!1}})),mt(o,"compositionupdate",(function(K){t.composing||(t.composing={data:K.data,done:!1})})),mt(o,"compositionend",(function(K){t.composing&&(K.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),mt(o,"touchstart",(function(){return r.forceCompositionEnd()})),mt(o,"input",(function(){t.composing||t.readFromDOMSoon()})),mt(o,"copy",U),mt(o,"cut",U)},bn.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},bn.prototype.prepareSelection=function(){var e=Ta(this.cm,!1);return e.focus=l()==this.div,e},bn.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},bn.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},bn.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),o=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var d=Ro(t,e.anchorNode,e.anchorOffset),U=Ro(t,e.focusNode,e.focusOffset);if(!d||d.bad||!U||U.bad||Nt(gt(d,U),n)!=0||Nt(Xe(d,U),o)!=0){var K=t.display.view,he=n.line>=t.display.viewFrom&&Bs(t,n)||{node:K[0].measure.map[2],offset:0},ge=o.line<t.display.viewTo&&Bs(t,o);if(!ge){var je=K[K.length-1].measure,Ae=je.maps?je.maps[je.maps.length-1]:je.map;ge={node:Ae[Ae.length-1],offset:Ae[Ae.length-2]-Ae[Ae.length-3]}}if(he&&ge){var Ve,Be=e.rangeCount&&e.getRangeAt(0);try{Ve=j(he.node,he.offset,ge.offset,ge.node)}catch{}Ve&&(!fe&&t.state.focused?(e.collapse(he.node,he.offset),Ve.collapsed||(e.removeAllRanges(),e.addRange(Ve))):(e.removeAllRanges(),e.addRange(Ve)),Be&&e.anchorNode==null?e.addRange(Be):fe&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},bn.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},bn.prototype.showMultipleSelections=function(e){X(this.cm.display.cursorDiv,e.cursors),X(this.cm.display.selectionDiv,e.selection)},bn.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},bn.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return s(this.div,t)}
22,bn.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&(this.selectionInEditor()&&l()==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},bn.prototype.blur=function(){this.div.blur()},bn.prototype.getField=function(){return this.div},bn.prototype.supportsTouch=function(){return!0},bn.prototype.receivedFocus=function(){var e=this,t=this;function r(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,r))}this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):kr(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,r)},bn.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},bn.prototype.pollSelection=function(){if(this.readDOMTimeout==null&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(re&&I&&this.cm.display.gutterSpecs.length&&nc(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=Ro(t,e.anchorNode,e.anchorOffset),n=Ro(t,e.focusNode,e.focusOffset);r&&n&&kr(t,(function(){ir(t.doc,Kr(r,n),p),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)}))}}},bn.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,r,n=this.cm,o=n.display,d=n.doc.sel.primary(),U=d.from(),K=d.to();if(U.ch==0&&U.line>n.firstLine()&&(U=st(U.line-1,ht(n.doc,U.line-1).length)),K.ch==ht(n.doc,K.line).text.length&&K.line<n.lastLine()&&(K=st(K.line+1,0)),U.line<o.viewFrom||K.line>o.viewTo-1)return!1;U.line==o.viewFrom||(e=ii(n,U.line))==0?(t=Kt(o.view[0].line),r=o.view[0].node):(t=Kt(o.view[e].line),r=o.view[e-1].node.nextSibling);var he,ge,je=ii(n,K.line);if(je==o.view.length-1?(he=o.viewTo-1,ge=o.lineDiv.lastChild):(he=Kt(o.view[je+1].line)-1,ge=o.view[je+1].node.previousSibling),!r)return!1;for(var Ae=n.doc.splitLines(rc(n,r,ge,t,he)),Ve=Fn(n.doc,st(t,0),st(he,ht(n.doc,he).text.length));Ae.length>1&&Ve.length>1;)if(a(Ae)==a(Ve))Ae.pop(),Ve.pop(),he--;else{if(Ae[0]!=Ve[0])break;Ae.shift(),Ve.shift(),t++}for(var Be=0,Ye=0,ot=Ae[0],lt=Ve[0],Ot=Math.min(ot.length,lt.length);Be<Ot&&ot.charCodeAt(Be)==lt.charCodeAt(Be);)++Be;for(var Tt=a(Ae),vt=a(Ve),At=Math.min(Tt.length-(Ae.length==1?Be:0),vt.length-(Ve.length==1?Be:0));Ye<At&&Tt.charCodeAt(Tt.length-Ye-1)==vt.charCodeAt(vt.length-Ye-1);)++Ye;if(Ae.length==1&&Ve.length==1&&t==U.line)for(;Be&&Be>U.ch&&Tt.charCodeAt(Tt.length-Ye-1)==vt.charCodeAt(vt.length-Ye-1);)Be--,Ye++;Ae[Ae.length-1]=Tt.slice(0,Tt.length-Ye).replace(/^\u200b+/,""),Ae[0]=Ae[0].slice(Be).replace(/\u200b+$/,"");var jt=st(t,Be),Ft=st(he,Ve.length?a(Ve).length-Ye:0);return Ae.length>1||Ae[0]||Nt(jt,Ft)?(xi(n.doc,Ae,jt,Ft,"+input"),!0):void 0},bn.prototype.ensurePolled=function(){this.forceCompositionEnd()},bn.prototype.reset=function(){this.forceCompositionEnd()},bn.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},bn.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},bn.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||kr(this.cm,(function(){return pr(e.cm)}))},bn.prototype.setUneditable=function(e){e.contentEditable="false"},bn.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Xn(this.cm,ha)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},bn.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},bn.prototype.onContextMenu=function(){},bn.prototype.resetPosition=function(){},bn.prototype.needsContentAttribute=!0;var Zn=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new v,this.hasSelection=!1,this.composing=null};function oc(e,t){if((t=t?R(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var r=l();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=K.getValue()}var o;if(e.form&&(mt(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var d=e.form;o=d.submit;try{var U=d.submit=function(){n(),d.submit=o,d.submit(),d.submit=U}}catch{}}t.finishInit=function(he){he.save=n,he.getTextArea=function(){return e},he.toTextArea=function(){he.toTextArea=isNaN,n(),e.parentNode.removeChild(he.getWrapperElement()),e.style.display="",e.form&&(Oe(e.form,"submit",n),t.leaveSubmitMethodAlone||typeof e.form.submit!="function"||(e.form.submit=o))}},e.style.display="none";var K=Dn((function(he){return e.parentNode.insertBefore(he,e.nextSibling)}),t);return K}function ac(e){e.off=Oe,e.on=mt,e.wheelEventPixels=dl,e.Doc=gr,e.splitLines=ut,e.countColumn=k,e.findColumn=Y,e.isWordChar=Se,e.Pass=m,e.signal=De,e.Line=Yn,e.changeEnd=Yr,e.scrollbarModel=La,e.Pos=st,e.cmpPos=Nt,e.modes=sn,e.mimeModes=tn,e.resolveMode=_n,e.getMode=wn,e.modeExtensions=An,e.extendMode=Tn,e.copyState=nn,e.startState=Qn,e.innerMode=Pn,e.commands=Xi,e.keyM
vendor: 5,664 bytes, lines 22-27
22ap=Nr,e.keyName=ks,e.isModifierKey=bs,e.lookupKey=Ci,e.normalizeKeyMap=Ll,e.StringStream=rn,e.SharedTextMarker=Gi,e.TextMarker=Jr,e.LineWidget=qi,e.e_preventDefault=Ne,e.e_stopPropagation=$e,e.e_stop=tt,e.addClass=f,e.contains=s,e.rmClass=E,e.keyNames=Qr}Zn.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var o=this.textarea;function d(U){if(!Ze(n,U)){if(n.somethingSelected())Do({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var K=Ns(n);Do({lineWise:!0,text:K.text}),U.type=="cut"?n.setSelections(K.ranges,null,p):(r.prevInput="",o.value=K.text.join(` 23`),te(o))}U.type=="cut"&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),$&&(o.style.width="0px"),mt(o,"input",(function(){ae&&se>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()})),mt(o,"paste",(function(U){Ze(n,U)||Ls(U,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())})),mt(o,"cut",d),mt(o,"copy",d),mt(e.scroller,"paste",(function(U){if(!ue(e,U)&&!Ze(n,U)){if(!o.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var K=new Event("paste");K.clipboardData=U.clipboardData,o.dispatchEvent(K)}})),mt(e.lineSpace,"selectstart",(function(U){ue(e,U)||Ne(U)})),mt(o,"compositionstart",(function(){var U=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:U,range:n.markText(U,n.getCursor("to"),{className:"CodeMirror-composing"})}})),mt(o,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)}))},Zn.prototype.createField=function(e){this.wrapper=Fs(),this.textarea=this.wrapper.firstChild},Zn.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Zn.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=Ta(e);if(e.options.moveInputWithCursor){var o=jr(e,r.sel.primary().head,"div"),d=t.wrapper.getBoundingClientRect(),U=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+U.top-d.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+U.left-d.left))}return n},Zn.prototype.showSelection=function(e){var t=this.cm.display;X(t.cursorDiv,e.cursors),X(t.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Zn.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&te(this.textarea),ae&&se>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",ae&&se>=9&&(this.hasSelection=null))}},Zn.prototype.getField=function(){return this.textarea},Zn.prototype.supportsTouch=function(){return!1},Zn.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!z||l()!=this.textarea))try{this.textarea.focus()}catch{}},Zn.prototype.blur=function(){this.textarea.blur()},Zn.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Zn.prototype.receivedFocus=function(){this.slowPoll()},Zn.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Zn.prototype.fastPoll=function(){var e=!1,t=this;function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))}t.pollingFast=!0,t.polling.set(20,r)},Zn.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Zt(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=r.value;if(o==n&&!t.somethingSelected())return!1;if(ae&&se>=9&&this.hasSelection===o||F&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var d=o.charCodeAt(0);if(d!=8203||n||(n="\u200B"),d==8666)return this.reset(),this.cm.execCommand("undo")}for(var U=0,K=Math.min(n.length,o.length);U<K&&n.charCodeAt(U)==o.charCodeAt(U);)++U;return kr(t,(function(){ha(t,o.slice(U),n.length-U,null,e.composing?"*compose":null),o.length>1e3||o.indexOf(` 24`)>-1?r.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Zn.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Zn.prototype.onKeyPress=function(){ae&&se>=9&&(this.hasSelection=null),this.fastPoll()},Zn.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var d=ri(r,e),U=n.scroller.scrollTop;if(d&&!g){r.options.resetSelectionOnContextMenu&&r.doc.sel.contains(d)==-1&&Xn(r,ir)(r.doc,Kr(d),p);var K,he=o.style.cssText,ge=t.wrapper.style.cssText,je=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",o.style.cssText=`position: absolute; width: 30px; height: 30px; 25 top: `+(e.clientY-je.top-5)+"px; left: "+(e.clientX-je.left-5)+`px; 26 z-index: 1000; background: `+(ae?"rgba(255, 255, 255, .05)":"transparent")+`; 27 outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`,oe&&(K=window.scrollY),n.input.focus(),oe&&window.scrollTo(null,K),n.input.reset(),r.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=Be,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),ae&&se>=9&&Ve(),ee){tt(e);var Ae=function(){Oe(window,"mouseup",Ae),setTimeout(Be,20)};mt(window,"mouseup",Ae)}else setTimeout(Be,50)}
27function Ve(){if(o.selectionStart!=null){var Ye=r.somethingSelected(),ot="\u200B"+(Ye?o.value:"");o.value="\u21DA",o.value=ot,t.prevInput=Ye?"":"\u200B",o.selectionStart=1,o.selectionEnd=ot.length,n.selForContextMenu=r.doc.sel}}function Be(){if(t.contextMenuPending==Be&&(t.contextMenuPending=!1,t.wrapper.style.cssText=ge,o.style.cssText=he,ae&&se<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=U),o.selectionStart!=null)){(!ae||ae&&se<9)&&Ve();var Ye=0,ot=function(){n.selForContextMenu==r.doc.sel&&o.selectionStart==0&&o.selectionEnd>0&&t.prevInput=="\u200B"?Xn(r,os)(r):Ye++<10?n.detectingSelectAll=setTimeout(ot,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(ot,200)}}},Zn.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Zn.prototype.setUneditable=function(){},Zn.prototype.needsContentAttribute=!1,Xl(Dn),tc(Dn);var sc="iter insert remove copy getEditor constructor".split(" ");for(var Mo in gr.prototype)gr.prototype.hasOwnProperty(Mo)&&b(sc,Mo)<0&&(Dn.prototype[Mo]=(function(e){return function(){return e.apply(this.doc,arguments)}})(gr.prototype[Mo]));return Te(gr),Dn.inputStyles={textarea:Zn,contenteditable:bn},Dn.defineMode=function(e){Dn.defaults.mode||e=="null"||(Dn.defaults.mode=e),un.apply(this,arguments)},Dn.defineMIME=In,Dn.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Dn.defineMIME("text/plain","null"),Dn.defineExtension=function(e,t){Dn.prototype[e]=t},Dn.defineDocExtension=function(e,t){gr.prototype[e]=t},Dn.fromTextArea=oc,ac(Dn),Dn.version="5.63.0",Dn})()},6629:(We,ke,S)=>{(function(fe){"use strict";function D(O){for(var j={},E=0;E<O.length;++E)j[O[E].toLowerCase()]=!0;return j}fe.defineMode("css",(function(O,j){var E=j.inline;j.propertyKeywords||(j=fe.resolveMode("text/css"));var B,X,_=O.indentUnit,M=j.tokenHooks,s=j.documentTypes||{},l=j.mediaTypes||{},f=j.mediaFeatures||{},w=j.mediaValueKeywords||{},te=j.propertyKeywords||{},J=j.nonStandardPropertyKeywords||{},R=j.fontProperties||{},k=j.counterDescriptors||{},v=j.colorKeywords||{},b=j.valueKeywords||{},h=j.allowNested,m=j.lineComment,p=j.supportsAtComponent===!0,y=O.highlightNonStandardPropertyKeywords!==!1;function Z(me,xe){return B=xe,me}function Y(me,xe){var de=me.next();if(M[de]){var Ee=M[de](me,xe);if(Ee!==!1)return Ee}return de=="@"?(me.eatWhile(/[\w\\\-]/),Z("def",me.current())):de=="="||(de=="~"||de=="|")&&me.eat("=")?Z(null,"compare"):de=='"'||de=="'"?(xe.tokenize=q(de),xe.tokenize(me,xe)):de=="#"?(me.eatWhile(/[\w\\\-]/),Z("atom","hash")):de=="!"?(me.match(/^\s*\w*/),Z("keyword","important")):/\d/.test(de)||de=="."&&me.eat(/\d/)?(me.eatWhile(/[\w.%]/),Z("number","unit")):de!=="-"?/[,+>*\/]/.test(de)?Z(null,"select-op"):de=="."&&me.match(/^-?[_a-z][_a-z0-9-]*/i)?Z("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(de)?Z(null,de):me.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(me.current())&&(xe.tokenize=N),Z("variable callee","variable")):/[\w\\\-]/.test(de)?(me.eatWhile(/[\w\\\-]/),Z("property","word")):Z(null,null):/[\d.]/.test(me.peek())?(me.eatWhile(/[\w.%]/),Z("number","unit")):me.match(/^-[\w\\\-]*/)?(me.eatWhile(/[\w\\\-]/),me.match(/^\s*:/,!1)?Z("variable-2","variable-definition"):Z("variable-2","variable")):me.match(/^\w+-/)?Z("meta","meta"):void 0}function q(me){return function(xe,de){for(var Ee,Fe=!1;(Ee=xe.next())!=null;){if(Ee==me&&!Fe){me==")"&&xe.backUp(1);break}Fe=!Fe&&Ee=="\\"}return(Ee==me||!Fe&&me!=")")&&(de.tokenize=null),Z("string","string")}}function N(me,xe){return me.next(),me.match(/^\s*[\"\')]/,!1)?xe.tokenize=null:xe.tokenize=q(")"),Z(null,"(")}function a(me,xe,de){this.type=me,this.indent=xe,this.prev=de}function c(me,xe,de,Ee){return me.context=new a(de,xe.indentation()+(Ee===!1?0:_),me.context),de}function C(me){return me.context.prev&&(me.context=me.context.prev),me.context.type}function Q(me,xe,de){return Se[de.context.type](me,xe,de)}function pe(me,xe,de,Ee){for(var Fe=Ee||1;Fe>0;Fe--)de.context=de.context.prev;return Q(me,xe,de)}function Ce(me){var xe=me.current().toLowerCase();X=b.hasOwnProperty(xe)?"atom":v.hasOwnProperty(xe)?"keyword":"variable"}var Se={top:function(me,xe,de){if(me=="{")return c(de,xe,"block");if(me=="}"&&de.context.prev)return C(de);if(p&&/@component/i.test(me))return c(de,xe,"atComponentBlock");if(/^@(-moz-)?document$/i.test(me))return c(de,xe,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(me))return c(de,xe,"atBlock");if(/^@(font-face|counter-style)/i.test(me))return de.stateArg=me,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(me))return"keyframes";if(me&&me.charAt(0)=="@")return c(de,xe,"at");if(me=="hash")X="builtin";else if(me=="word")X="tag";else{if(me=="variable-definition")return"maybeprop";if(me=="interpolation")return c(de,xe,"interpolation");if(me==":")return"pseudo";if(h&&me=="(")return c(de,xe,"parens")}return de.context.type},block:function(me,xe,de){if(me=="word"){var Ee=xe.current().toLowerCase();return te.hasOwnProperty(Ee)?(X="property","maybeprop"):J.hasOwnProperty(Ee)?(X=y?"string-2":"property","maybeprop"):h?(X=xe.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(X+=" error","maybeprop")}return me=="meta"?"block":h||me!="hash"&&me!="qualifier"?Se.top(me,xe,de):(X="error","block")},maybeprop:function(me,xe,de){return me==":"?c(de,xe,"prop"):Q(me,xe,de)},prop:function(me,xe,de){if(me==";")return C(de);if(me=="{"&&h)return c(de,xe,"propBlock");if(me=="}"||me=="{")return pe(me,xe,de);if(me=="(")return c(de,xe,"parens");if(me!="hash"||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(xe.current())){if(me=="word")Ce(xe);else if(me=="interpolation")return c(de,xe,"interpolation")}else X+=" error";return"prop"},propBlock:function(me,xe,de){return me=="}"?C(de):me=="word"?(X="property","maybeprop"):de.context.type},parens:function(me,xe,de){return me=="{"||me=="}"?pe(me,xe,de):me==")"?C(de):me=="("?c(de,xe,"parens"):me=="interpolation"?c(de,xe,"interpolation"):(me=="word"&&Ce(xe),"parens")},pseudo:function(me,xe,de){return me=="meta"?"pseudo":me=="word"?(X="variable-3",de.context.type):Q(me,xe,de)},documentTypes:function(me,xe,de){return me=="word"&&s.hasOwnProperty(xe.current())?(X="tag",de.context.type):Se.atBlock(me,xe,de)},atBlock:function(me,xe,de){if(me=="(")return c(de,xe,"atBlock_parens");if(me=="}"||me==";")return pe(me,xe,de);if(me=="{")return C(de)&&c(de,xe,h?"block":"top");if(me=="interpolation")return c(de,xe,"interpolation");if(me=="word"){var Ee=xe.current().toLowerCase();X=Ee=="only"||Ee=="not"||Ee=="and"||Ee=="or"?"keyword":l.hasOwnProperty(Ee)?"attribute":f.hasOwnProperty(Ee)?"property":w.hasOwnProperty(Ee)?"keyword":te.hasOwnProperty(Ee)?"property":J.hasOwnProperty(Ee)?y?"string-2":"property":b.hasOwnProperty(Ee)?"atom":v.hasOwnProperty(Ee)?"keyword":"error"}return de.context.type},atComponentBlock:function(me,xe,de){return me=="}"?pe(me,xe,de):me=="{"?C(de)&&c(de,xe,h?"block":"top",!1):(me=="word"&&(X="error"),de.context.type)},atBlock_parens:function(me,xe,de){return me==")"?C(de):me=="{"||me=="}"?pe(me,xe,de,2):Se.atBlock(me,xe,de)},restricted_atBlock_before:function(me,xe,de){return me=="{"?c(de,xe,"restricted_atBlock"):me=="word"&&de.stateArg=="@counter-style"?(X="variable","restricted_atBlock_before"):Q(me,xe,de)},restricted_atBlock:function(me,xe,de){return me=="}"?(de.stateArg=null,C(de)):me=="word"?(X=de.stateArg=="@font-face"&&!R.hasOwnProperty(xe.current().toLowerCase())||de.stateArg=="@counter-style"&&!k.hasOwnProperty(xe.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(me,xe,de){return me=="word"?(X="variable","keyframes"):me=="{"?c(de,xe,"top"):Q(me,xe,de)},at:function(me,xe,de){return me==";"?C(de):me=="{"||me=="}"?pe(me,xe,de):(me=="word"?X="tag":me=="hash"&&(X="builtin"),"at")},interpolation:function(me,xe,de){return me=="}"?C(de):me=="{"||me==";"?pe(me,xe,de):(me=="word"?X="variable":me!="variable"&&me!="("&&me!=")"&&(X="error"),"interpolation")}};return{startState:function(me){return{tokenize:null,state:E?"block":"top",stateArg:null,context:new a(E?"block":"top",me||0,null)}},token:function(me,xe){if(!xe.tokenize&&me.eatSpace())return null;var de=(xe.tokenize||Y)(me,xe);return de&&typeof de=="object"&&(B=de[1],de=de[0]),X=de,B!="comment"&&(xe.state=Se[xe.state](B,me,xe)),X},indent:function(me,xe){var de=me.context,Ee=xe&&xe.charAt(0),Fe=de.indent;return de.type!="prop"||Ee!="}"&&Ee!=")"||(de=de.prev),de.prev&&(Ee!="}"||de.type!="block"&&de.type!="top"&&de.type!="interpolation"&&de.type!="restricted_atBlock"?(Ee!=")"||de.type!="parens"&&de.type!="atBlock_parens")&&(Ee!="{"||de.type!="at"&&de.type!="atBlock")||(Fe=Math.max(0,de.indent-_)):Fe=(de=de.prev).indent),Fe},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:m,fold:"brace"}}));var ie=["domain","regexp","url","url-prefix"],ce=D(ie),ae=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],se=D(ae),oe=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme"],W=D(oe),I=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light"],g=D(I),P=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","
27nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],x=D(P),A=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],$=D(A),re=D(["font-display","font-family","src","unicode
27-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),z=D(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),F=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],G=D(F),H=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","
27initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],ne=D(H),ye=ie.concat(ae).concat(oe).concat(I
27).concat(P).concat(A).concat(F).concat(H);function ee(O,j){for(var E,B=!1;(E=O.next())!=null;){if(B&&E=="/"){j.tokenize=null;break}B=E=="*"}return["comment","comment"]}fe.registerHelper("hintWords","css",ye),fe.defineMIME("text/css",{documentTypes:ce,mediaTypes:se,mediaFeatures:W,mediaValueKeywords:g,propertyKeywords:x,nonStandardPropertyKeywords:$,fontProperties:re,counterDescriptors:z,colorKeywords:G,valueKeywords:ne,tokenHooks:{"/":function(O,j){return!!O.eat("*")&&(j.tokenize=ee,ee(O,j))}},name:"css"}),fe.defineMIME("text/x-scss",{mediaTypes:se,mediaFeatures:W,mediaValueKeywords:g,propertyKeywords:x,nonStandardPropertyKeywords:$,colorKeywords:G,valueKeywords:ne,fontProperties:re,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(O,j){return O.eat("/")?(O.skipToEnd(),["comment","comment"]):O.eat("*")?(j.tokenize=ee,ee(O,j)):["operator","operator"]},":":function(O){return!!O.match(/^\s*\{/,!1)&&[null,null]},$:function(O){return O.match(/^[\w-]+/),O.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(O){return!!O.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),fe.defineMIME("text/x-less",{mediaTypes:se,mediaFeatures:W,mediaValueKeywords:g,propertyKeywords:x,nonStandardPropertyKeywords:$,colorKeywords:G,valueKeywords:ne,fontProperties:re,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(O,j){return O.eat("/")?(O.skipToEnd(),["comment","comment"]):O.eat("*")?(j.tokenize=ee,ee(O,j)):["operator","operator"]},"@":function(O){return O.eat("{")?[null,"interpolation"]:!O.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(O.eatWhile(/[\w\\\-]/),O.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),fe.defineMIME("text/x-gss",{documentTypes:ce,mediaTypes:se,mediaFeatures:W,propertyKeywords:x,nonStandardPropertyKeywords:$,fontProperties:re,counterDescriptors:z,colorKeywords:G,valueKeywords:ne,supportsAtComponent:!0,tokenHooks:{"/":function(O,j){return!!O.eat("*")&&(j.tokenize=ee,ee(O,j))}},name:"css",helperType:"gss"})})(S(4631))},6531:(We,ke,S)=>{(function(fe){"use strict";var D={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function ie(g,P,x){var A=g.current(),$=A.search(P);return $>-1?g.backUp(A.length-$):A.match(/<\/?$/)&&(g.backUp(A.length),g.match(P,!1)||g.match(A)),x}var ce={};function ae(g){var P=ce[g];return P||(ce[g]=new RegExp("\\s+"+g+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function se(g,P){var x=g.match(ae(P));return x?/^\s*(.*?)\s*$/.exec(x[2])[1]:""}function oe(g,P){return new RegExp((P?"^":"")+"</s*"+g+"s*>","i")}function W(g,P){for(var x in g)for(var A=P[x]||(P[x]=[]),$=g[x],re=$.length-1;re>=0;re--)A.unshift($[re])}function I(g,P){for(var x=0;x<g.length;x++){var A=g[x];if(!A[0]||A[1].test(se(P,A[0])))return A[2]}}fe.defineMode("htmlmixed",(function(g,P){var x=fe.getMode(g,{name:"xml",htmlMode:!0,multilineTagIndentFactor:P.multilineTagIndentFactor,multilineTagIndentPastTag:P.multilineTagIndentPastTag,allowMissingTagName:P.allowMissingTagName}),A={},$=P&&P.tags,re=P&&P.scriptTypes;if(W(D,A),$&&W($,A),re)for(var z=re.length-1;z>=0;z--)A.script.unshift(["type",re[z].matches,re[z].mode]);function F(G,H){var ne,ye=x.token(G,H.htmlState),ee=/\btag\b/.test(ye);if(ee&&!/[<>\s\/]/.test(G.current())&&(ne=H.htmlState.tagName&&H.htmlState.tagName.toLowerCase())&&A.hasOwnProperty(ne))H.inTag=ne+" ";else if(H.inTag&&ee&&/>$/.test(G.current())){var O=/^([\S]+) (.*)/.exec(H.inTag);H.inTag=null;var j=G.current()==">"&&I(A[O[1]],O[2]),E=fe.getMode(g,j),B=oe(O[1],!0),X=oe(O[1],!1);H.token=function(_,M){return _.match(B,!1)?(M.token=F,M.localState=M.localMode=null,null):ie(_,X,M.localMode.token(_,M.localState))},H.localMode=E,H.localState=fe.startState(E,x.indent(H.htmlState,"",""))}else H.inTag&&(H.inTag+=G.current(),G.eol()&&(H.inTag+=" "));return ye}return{startState:function(){return{token:F,inTag:null,localMode:null,localState:null,htmlState:fe.startState(x)}},copyState:function(G){var H;return G.localState&&(H=fe.copyState(G.localMode,G.localState)),{token:G.token,inTag:G.inTag,localMode:G.localMode,localState:H,htmlState:fe.copyState(x,G.htmlState)}},token:function(G,H){return H.token(G,H)},indent:function(G,H,ne){return!G.localMode||/^\s*<\//.test(H)?x.indent(G.htmlState,H,ne):G.localMode.indent?G.localMode.indent(G.localState,H,ne):fe.Pass},innerMode:function(G){return{state:G.localState||G.htmlState,mode:G.localMode||x}}}}),"xml","javascript","css"),fe.defineMIME("text/html","htmlmixed")})(S(4631),S(9589),S(6876),S(6629))},6876:(We,ke,S)=>{(function(fe){"use strict";fe.defineMode("javascript",(function(D,ie){var ce,ae,se=D.indentUnit,oe=ie.statementIndent,W=ie.jsonld,I=ie.json||W,g=ie.trackScope!==!1,P=ie.typescript,x=ie.wordCharacters||/[\w$\xa1-\uffff]/,A=(function(){function be(gn){return{type:gn,style:"keyword"}}var Pe=be("keyword a"),Xe=be("keyword b"),gt=be("keyword c"),kt=be("keyword d"),ft=be("operator"),qt={type:"atom",style:"atom"};return{if:be("if"),while:Pe,with:Pe,else:Xe,do:Xe,try:Xe,finally:Xe,return:kt,break:kt,continue:kt,new:be("new"),delete:gt,void:gt,throw:gt,debugger:be("debugger"),var:be("var"),const:be("var"),let:be("var"),function:be("function"),catch:be("catch"),for:be("for"),switch:be("switch"),case:be("case"),default:be("default"),in:ft,typeof:ft,instanceof:ft,true:qt,false:qt,null:qt,undefined:qt,NaN:qt,Infinity:qt,this:be("this"),class:be("class"),super:be("atom"),yield:gt,export:be("export"),import:be("import"),extends:gt,await:gt}})(),$=/[+\-*&%=<>!?|~^@]/,re=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function z(be){for(var Pe,Xe=!1,gt=!1;(Pe=be.next())!=null;){if(!Xe){if(Pe=="/"&&!gt)return;Pe=="["?gt=!0:gt&&Pe=="]"&&(gt=!1)}Xe=!Xe&&Pe=="\\"}}function F(be,Pe,Xe){return ce=be,ae=Xe,Pe}function G(be,Pe){var Xe=be.next();if(Xe=='"'||Xe=="'")return Pe.tokenize=H(Xe),Pe.tokenize(be,Pe);if(Xe=="."&&be.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return F("number","number");if(Xe=="."&&be.match(".."))return F("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(Xe))return F(Xe);if(Xe=="="&&be.eat(">"))return F("=>","operator");if(Xe=="0"&&be.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return F("number","number");if(/\d/.test(Xe))return be.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),F("number","number");if(Xe=="/")return be.eat("*")?(Pe.tokenize=ne,ne(be,Pe)):be.eat("/")?(be.skipToEnd(),F("comment","comment")):Nt(be,Pe,1)?(z(be),be.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),F("regexp","string-2")):(be.eat("="),F("operator","operator",be.current()));if(Xe=="`")return Pe.tokenize=ye,ye(be,Pe);if(Xe=="#"&&be.peek()=="!")return be.skipToEnd(),F("meta","meta");if(Xe=="#"&&be.eatWhile(x))return F("variable","property");if(Xe=="<"&&be.match("!--")||Xe=="-"&&be.match("->")&&!/\S/.test(be.string.slice(0,be.start)))return be.skipToEnd(),F("comment","comment");
vendor: 5,502 bytes, line 27
27if($.test(Xe))return Xe==">"&&Pe.lexical&&Pe.lexical.type==">"||(be.eat("=")?Xe!="!"&&Xe!="="||be.eat("="):/[<>*+\-|&?]/.test(Xe)&&(be.eat(Xe),Xe==">"&&be.eat(Xe))),Xe=="?"&&be.eat(".")?F("."):F("operator","operator",be.current());if(x.test(Xe)){be.eatWhile(x);var gt=be.current();if(Pe.lastType!="."){if(A.propertyIsEnumerable(gt)){var kt=A[gt];return F(kt.type,kt.style,gt)}if(gt=="async"&&be.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return F("async","keyword",gt)}return F("variable","variable",gt)}}function H(be){return function(Pe,Xe){var gt,kt=!1;if(W&&Pe.peek()=="@"&&Pe.match(re))return Xe.tokenize=G,F("jsonld-keyword","meta");for(;(gt=Pe.next())!=null&&(gt!=be||kt);)kt=!kt&>=="\\";return kt||(Xe.tokenize=G),F("string","string")}}function ne(be,Pe){for(var Xe,gt=!1;Xe=be.next();){if(Xe=="/"&>){Pe.tokenize=G;break}gt=Xe=="*"}return F("comment","comment")}function ye(be,Pe){for(var Xe,gt=!1;(Xe=be.next())!=null;){if(!gt&&(Xe=="`"||Xe=="$"&&be.eat("{"))){Pe.tokenize=G;break}gt=!gt&&Xe=="\\"}return F("quasi","string-2",be.current())}var ee="([{}])";function O(be,Pe){Pe.fatArrowAt&&(Pe.fatArrowAt=null);var Xe=be.string.indexOf("=>",be.start);if(!(Xe<0)){if(P){var gt=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(be.string.slice(be.start,Xe));gt&&(Xe=gt.index)}for(var kt=0,ft=!1,qt=Xe-1;qt>=0;--qt){var gn=be.string.charAt(qt),kn=ee.indexOf(gn);if(kn>=0&&kn<3){if(!kt){++qt;break}if(--kt==0){gn=="("&&(ft=!0);break}}else if(kn>=3&&kn<6)++kt;else if(x.test(gn))ft=!0;else if(/["'\/`]/.test(gn))for(;;--qt){if(qt==0)return;if(be.string.charAt(qt-1)==gn&&be.string.charAt(qt-2)!="\\"){qt--;break}}else if(ft&&!kt){++qt;break}}ft&&!kt&&(Pe.fatArrowAt=qt)}}var j={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function E(be,Pe,Xe,gt,kt,ft){this.indented=be,this.column=Pe,this.type=Xe,this.prev=kt,this.info=ft,gt!=null&&(this.align=gt)}function B(be,Pe){if(!g)return!1;for(var Xe=be.localVars;Xe;Xe=Xe.next)if(Xe.name==Pe)return!0;for(var gt=be.context;gt;gt=gt.prev)for(Xe=gt.vars;Xe;Xe=Xe.next)if(Xe.name==Pe)return!0}function X(be,Pe,Xe,gt,kt){var ft=be.cc;for(_.state=be,_.stream=kt,_.marked=null,_.cc=ft,_.style=Pe,be.lexical.hasOwnProperty("align")||(be.lexical.align=!0);;)if((ft.length?ft.pop():I?q:Z)(Xe,gt)){for(;ft.length&&ft[ft.length-1].lex;)ft.pop()();return _.marked?_.marked:Xe=="variable"&&B(be,gt)?"variable-2":Pe}}var _={state:null,column:null,marked:null,cc:null};function M(){for(var be=arguments.length-1;be>=0;be--)_.cc.push(arguments[be])}function s(){return M.apply(null,arguments),!0}function l(be,Pe){for(var Xe=Pe;Xe;Xe=Xe.next)if(Xe.name==be)return!0;return!1}function f(be){var Pe=_.state;if(_.marked="def",g){if(Pe.context){if(Pe.lexical.info=="var"&&Pe.context&&Pe.context.block){var Xe=w(be,Pe.context);if(Xe!=null)return void(Pe.context=Xe)}else if(!l(be,Pe.localVars))return void(Pe.localVars=new R(be,Pe.localVars))}ie.globalVars&&!l(be,Pe.globalVars)&&(Pe.globalVars=new R(be,Pe.globalVars))}}function w(be,Pe){if(Pe){if(Pe.block){var Xe=w(be,Pe.prev);return Xe?Xe==Pe.prev?Pe:new J(Xe,Pe.vars,!0):null}return l(be,Pe.vars)?Pe:new J(Pe.prev,new R(be,Pe.vars),!1)}return null}function te(be){return be=="public"||be=="private"||be=="protected"||be=="abstract"||be=="readonly"}function J(be,Pe,Xe){this.prev=be,this.vars=Pe,this.block=Xe}function R(be,Pe){this.name=be,this.next=Pe}var k=new R("this",new R("arguments",null));function v(){_.state.context=new J(_.state.context,_.state.localVars,!1),_.state.localVars=k}function b(){_.state.context=new J(_.state.context,_.state.localVars,!0),_.state.localVars=null}function h(){_.state.localVars=_.state.context.vars,_.state.context=_.state.context.prev}function m(be,Pe){var Xe=function(){var gt=_.state,kt=gt.indented;if(gt.lexical.type=="stat")kt=gt.lexical.indented;else for(var ft=gt.lexical;ft&&ft.type==")"&&ft.align;ft=ft.prev)kt=ft.indented;gt.lexical=new E(kt,_.stream.column(),be,null,gt.lexical,Pe)};return Xe.lex=!0,Xe}function p(){var be=_.state;be.lexical.prev&&(be.lexical.type==")"&&(be.indented=be.lexical.indented),be.lexical=be.lexical.prev)}function y(be){function Pe(Xe){return Xe==be?s():be==";"||Xe=="}"||Xe==")"||Xe=="]"?M():s(Pe)}return Pe}function Z(be,Pe){return be=="var"?s(m("vardef",Pe),$t,y(";"),p):be=="keyword a"?s(m("form"),a,Z,p):be=="keyword b"?s(m("form"),Z,p):be=="keyword d"?_.stream.match(/^\s*$/,!1)?s():s(m("stat"),C,y(";"),p):be=="debugger"?s(y(";")):be=="{"?s(m("}"),b,mt,p,h):be==";"?s():be=="if"?(_.state.lexical.info=="else"&&_.state.cc[_.state.cc.length-1]==p&&_.state.cc.pop()(),s(m("form"),a,Z,p,Sn)):be=="function"?s(tn):be=="for"?s(m("form"),b,yn,Z,h,p):be=="class"||P&&Pe=="interface"?(_.marked="keyword",s(m("form",be=="class"?be:Pe),An,p)):be=="variable"?P&&Pe=="declare"?(_.marked="keyword",s(Z)):P&&(Pe=="module"||Pe=="enum"||Pe=="type")&&_.stream.match(/^\s*\w/,!1)?(_.marked="keyword",Pe=="enum"?s(Rn):Pe=="type"?s(In,y("operator"),Ue,y(";")):s(m("form"),Yt,y("{"),m("}"),mt,p,p)):P&&Pe=="namespace"?(_.marked="keyword",s(m("form"),q,Z,p)):P&&Pe=="abstract"?(_.marked="keyword",s(Z)):s(m("stat"),He):be=="switch"?s(m("form"),a,y("{"),m("}","switch"),b,mt,p,p,h):be=="case"?s(q,y(":")):be=="default"?s(y(":")):be=="catch"?s(m("form"),v,Y,Z,p,h):be=="export"?s(m("stat"),Qn,p):be=="import"?s(m("stat"),ht,p):be=="async"?s(Z):Pe=="@"?s(q,Z):M(m("stat"),q,y(";"),p)}function Y(be){if(be=="(")return s(_n,y(")"))}function q(be,Pe){return c(be,Pe,!1)}function N(be,Pe){return c(be,Pe,!0)}
27function a(be){return be!="("?M():s(m(")"),C,y(")"),p)}function c(be,Pe,Xe){if(_.state.fatArrowAt==_.stream.start){var gt=Xe?xe:me;if(be=="(")return s(v,m(")"),bt(_n,")"),p,y("=>"),gt,h);if(be=="variable")return M(v,Yt,y("=>"),gt,h)}var kt=Xe?pe:Q;return j.hasOwnProperty(be)?s(kt):be=="function"?s(tn,kt):be=="class"||P&&Pe=="interface"?(_.marked="keyword",s(m("form"),wn,p)):be=="keyword c"||be=="async"?s(Xe?N:q):be=="("?s(m(")"),C,y(")"),p,kt):be=="operator"||be=="spread"?s(Xe?N:q):be=="["?s(m("]"),Vt,p,kt):be=="{"?Jt(Ge,"}",null,kt):be=="quasi"?M(Ce,kt):be=="new"?s(de(Xe)):s()}function C(be){return be.match(/[;\}\)\],]/)?M():M(q)}function Q(be,Pe){return be==","?s(C):pe(be,Pe,!1)}function pe(be,Pe,Xe){var gt=Xe==0?Q:pe,kt=Xe==0?q:N;return be=="=>"?s(v,Xe?xe:me,h):be=="operator"?/\+\+|--/.test(Pe)||P&&Pe=="!"?s(gt):P&&Pe=="<"&&_.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?s(m(">"),bt(Ue,">"),p,gt):Pe=="?"?s(q,y(":"),kt):s(kt):be=="quasi"?M(Ce,gt):be!=";"?be=="("?Jt(N,")","call",gt):be=="."?s(et,gt):be=="["?s(m("]"),C,y("]"),p,gt):P&&Pe=="as"?(_.marked="keyword",s(Ue,gt)):be=="regexp"?(_.state.lastType=_.marked="operator",_.stream.backUp(_.stream.pos-_.stream.start-1),s(kt)):void 0:void 0}function Ce(be,Pe){return be!="quasi"?M():Pe.slice(Pe.length-2)!="${"?s(Ce):s(C,Se)}function Se(be){if(be=="}")return _.marked="string-2",_.state.tokenize=ye,s(Ce)}function me(be){return O(_.stream,_.state),M(be=="{"?Z:q)}function xe(be){return O(_.stream,_.state),M(be=="{"?Z:N)}function de(be){return function(Pe){return Pe=="."?s(be?Fe:Ee):Pe=="variable"&&P?s(it,be?pe:Q):M(be?N:q)}}function Ee(be,Pe){if(Pe=="target")return _.marked="keyword",s(Q)}function Fe(be,Pe){if(Pe=="target")return _.marked="keyword",s(pe)}function He(be){return be==":"?s(p,Z):M(Q,y(";"),p)}function et(be){if(be=="variable")return _.marked="property",s()}function Ge(be,Pe){return be=="async"?(_.marked="property",s(Ge)):be=="variable"||_.style=="keyword"?(_.marked="property",Pe=="get"||Pe=="set"?s(yt):(P&&_.state.fatArrowAt==_.stream.start&&(Xe=_.stream.match(/^\s*:\s*/,!1))&&(_.state.fatArrowAt=_.stream.pos+Xe[0].length),s(St))):be=="number"||be=="string"?(_.marked=W?"property":_.style+" property",s(St)):be=="jsonld-keyword"?s(St):P&&te(Pe)?(_.marked="keyword",s(Ge)):be=="["?s(q,_t,y("]"),St):be=="spread"?s(N,St):Pe=="*"?(_.marked="keyword",s(Ge)):be==":"?M(St):void 0;var Xe}function yt(be){return be!="variable"?M(St):(_.marked="property",s(tn))}function St(be){return be==":"?s(N):be=="("?M(tn):void 0}function bt(be,Pe,Xe){function gt(kt,ft){if(Xe?Xe.indexOf(kt)>-1:kt==","){var qt=_.state.lexical;return qt.info=="call"&&(qt.pos=(qt.pos||0)+1),s((function(gn,kn){return gn==Pe||kn==Pe?M():M(be)}),gt)}return kt==Pe||ft==Pe?s():Xe&&Xe.indexOf(";")>-1?M(be):s(y(Pe))}return function(kt,ft){return kt==Pe||ft==Pe?s():M(be,gt)}}function Jt(be,Pe,Xe){for(var gt=3;gt<arguments.length;gt++)_.cc.push(arguments[gt]);return s(m(Pe,Xe),bt(be,Pe),p)}function mt(be){return be=="}"?s():M(Z,mt)}function _t(be,Pe){if(P){if(be==":")return s(Ue);if(Pe=="?")return s(_t)}}function Oe(be,Pe){if(P&&(be==":"||Pe=="in"))return s(Ue)}function De(be){if(P&&be==":")return _.stream.match(/^\s*\w+\s+is\b/,!1)?s(q,Ze,Ue):s(Ue)}function Ze(be,Pe){if(Pe=="is")return _.marked="keyword",s()}function Ue(be,Pe){return Pe=="keyof"||Pe=="typeof"||Pe=="infer"||Pe=="readonly"?(_.marked="keyword",s(Pe=="typeof"?N:Ue)):be=="variable"||Pe=="void"?(_.marked="type",s(wt)):Pe=="|"||Pe=="&"?s(Ue):be=="string"||be=="number"||be=="atom"?s(wt):be=="["?s(m("]"),bt(Ue,"]",","),p,wt):be=="{"?s(m("}"),Te,p,wt):be=="("?s(bt(tt,")"),rt,wt):be=="<"?s(bt(Ue,">"),Ue):be=="quasi"?M($e,wt):void 0}function rt(be){if(be=="=>")return s(Ue)}function Te(be){return be.match(/[\}\)\]]/)?s():be==","||be==";"?s(Te):M(Ne,Te)}function Ne(be,Pe){return be=="variable"||_.style=="keyword"?(_.marked="property",s(Ne)):Pe=="?"||be=="number"||be=="string"?s(Ne):be==":"?s(Ue):be=="["?s(y("variable"),Oe,y("]"),Ne):be=="("?M(un,Ne):be.match(/[;\}\)\],]/)?void 0:s()}function $e(be,Pe){return be!="quasi"?M():Pe.slice(Pe.length-2)!="${"?s($e):s(Ue,at)}function at(be){if(be=="}
27")return _.marked="string-2",_.state.tokenize=ye,s($e)}function tt(be,Pe){return be=="variable"&&_.stream.match(/^\s*[?:]/,!1)||Pe=="?"?s(tt):be==":"?s(Ue):be=="spread"?s(tt):M(Ue)}function wt(be,Pe){return Pe=="<"?s(m(">"),bt(Ue,">"),p,wt):Pe=="|"||be=="."||Pe=="&"?s(Ue):be=="["?s(Ue,y("]"),wt):Pe=="extends"||Pe=="implements"?(_.marked="keyword",s(Ue)):Pe=="?"?s(Ue,y(":"),Ue):void 0}function it(be,Pe){if(Pe=="<")return s(m(">"),bt(Ue,">"),p,wt)}function Rt(){return M(Ue,Ut)}function Ut(be,Pe){if(Pe=="=")return s(Ue)}function $t(be,Pe){return Pe=="enum"?(_.marked="keyword",s(Rn)):M(Yt,_t,ut,Zt)}function Yt(be,Pe){return P&&te(Pe)?(_.marked="keyword",s(Yt)):be=="variable"?(f(Pe),s()):be=="spread"?s(Yt):be=="["?Jt(Bt,"]"):be=="{"?Jt(Xt,"}"):void 0}function Xt(be,Pe){return be!="variable"||_.stream.match(/^\s*:/,!1)?(be=="variable"&&(_.marked="property"),be=="spread"?s(Yt):be=="}"?M():be=="["?s(q,y("]"),y(":"),Xt):s(y(":"),Yt,ut)):(f(Pe),s(ut))}function Bt(){return M(Yt,ut)}function ut(be,Pe){if(Pe=="=")return s(N)}function Zt(be){if(be==",")return s($t)}function Sn(be,Pe){if(be=="keyword b"&&Pe=="else")return s(m("form","else"),Z,p)}function yn(be,Pe){return Pe=="await"?s(yn):be=="("?s(m(")"),cn,p):void 0}function cn(be){return be=="var"?s($t,sn):be=="variable"?s(sn):M(sn)}function sn(be,Pe){return be==")"?s():be==";"?s(sn):Pe=="in"||Pe=="of"?(_.marked="keyword",s(q,sn)):M(q,sn)}function tn(be,Pe){return Pe=="*"?(_.marked="keyword",s(tn)):be=="variable"?(f(Pe),s(tn)):be=="("?s(v,m(")"),bt(_n,")"),p,De,Z,h):P&&Pe=="<"?s(m(">"),bt(Rt,">"),p,tn):void 0}function un(be,Pe){return Pe=="*"?(_.marked="keyword",s(un)):be=="variable"?(f(Pe),s(un)):be=="("?s(v,m(")"),bt(_n,")"),p,De,h):P&&Pe=="<"?s(m(">"),bt(Rt,">"),p,un):void 0}function In(be,Pe){return be=="keyword"||be=="variable"?(_.marked="type",s(In)):Pe=="<"?s(m(">"),bt(Rt,">"),p):void 0}function _n(be,Pe){return Pe=="@"&&s(q,_n),be=="spread"?s(_n):P&&te(Pe)?(_.marked="keyword",s(_n)):P&&be=="this"?s(_t,ut):M(Yt,_t,ut)}function wn(be,Pe){return be=="variable"?An(be,Pe):Tn(be,Pe)}function An(be,Pe){if(be=="variable")return f(Pe),s(Tn)}function Tn(be,Pe){return Pe=="<"?s(m(">"),bt(Rt,">"),p,Tn):Pe=="extends"||Pe=="implements"||P&&be==","?(Pe=="implements"&&(_.marked="keyword"),s(P?Ue:q,Tn)):be=="{"?s(m("}"),nn,p):void 0}function nn(be,Pe){return be=="async"||be=="variable"&&(Pe=="static"||Pe=="get"||Pe=="set"||P&&te(Pe))&&_.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(_.marked="keyword",s(nn)):be=="variable"||_.style=="keyword"?(_.marked="property",s(Pn,nn)):be=="number"||be=="string"?s(Pn,nn):be=="["?s(q,_t,y("]"),Pn,nn):Pe=="*"?(_.marked="keyword",s(nn)):P&&be=="("?M(un,nn):be==";"||be==","?s(nn):be=="}"?s():Pe=="@"?s(q,nn):void 0}function Pn(be,Pe){if(Pe=="!"||Pe=="?")return s(Pn);if(be==":")return s(Ue,ut);if(Pe=="=")return s(N);var Xe=_.state.lexical.prev;return M(Xe&&Xe.info=="interface"?un:tn)}function Qn(be,Pe){return Pe=="*"?(_.marked="keyword",s(Kt,y(";"))):Pe=="default"?(_.marked="keyword",s(q,y(";"))):be=="{"?s(bt(rn,"}"),Kt,y(";")):M(Z)}function rn(be,Pe){return Pe=="as"?(_.marked="keyword",s(y("variable"))):be=="variable"?M(N,rn):void 0}function ht(be){return be=="string"?s():be=="("?M(q):be=="."?M(Q):M(Fn,qn,Kt)}function Fn(be,Pe){return be=="{"?Jt(Fn,"}"):(be=="variable"&&f(Pe),Pe=="*"&&(_.marked="keyword"),s(dn))}function qn(be){if(be==",")return s(Fn,qn)}function dn(be,Pe){if(Pe=="as")return _.marked="keyword",s(Fn)}function Kt(be,Pe){if(Pe=="from")return _.marked="keyword",s(q)}function Vt(be){return be=="]"?s():M(bt(N,"]"))}function Rn(){return M(m("form"),Yt,y("{"),m("}"),bt(Wt,"}"),p,p)}function Wt(){return M(Yt,ut)}function st(be,Pe){return be.lastType=="operator"||be.lastType==","||$.test(Pe.charAt(0))||/[,.]/.test(Pe.charAt(0))}function Nt(be,Pe,Xe){return Pe.tokenize==G&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(Pe.lastType)||Pe.lastType=="quasi"&&/\{\s*$/.test(be.string.slice(0,be.pos-(Xe||0)))}return h.lex=!0,p.lex=!0,{startState:function(be){var Pe={tokenize:G,lastType:"sof",cc:[],lexical:new E((be||0)-se,0,"block",!1),localVars:ie.localVars,context:ie.localVars&&new J(null,null,!1),indented:be||0};return ie.globalVars&&typeof ie.globalVars=="object"&&(Pe.globalVars=ie.globalVars),Pe},token:function(be,Pe){if(be.sol()&&(Pe.lexical.hasOwnProperty("align")||(Pe.lexical.align=!1),Pe.indented=be.indentation(),O(be,Pe)),Pe.tokenize!=ne&&be.eatSpace())return null;var Xe=Pe.tokenize(be,Pe);return ce=="comment"?Xe:(Pe.lastType=ce!="operator"||ae!="++"&&ae!="--"?ce:"incdec",X(Pe,Xe,ce,ae,be))},indent:function(be,Pe){if(be.tokenize==ne||be.tokenize==ye)return fe.Pass;if(be.tokenize!=G)return 0;var Xe,gt=Pe&&Pe.charAt(0),kt=be.lexical;if(!/^\s*else\b/.test(Pe))for(var ft=be.cc.length-1;ft>=0;--ft){var qt=be.cc[ft];if(qt==p)kt=kt.prev;else if(qt!=Sn&&qt!=h)break}for(;(kt.type=="stat"||kt.type=="form")&&(gt=="}"||(Xe=be.cc[be.cc.length-1])&&(Xe==Q||Xe==pe)&&!/^[,\.=+\-*:?[\(]/.test(Pe));)kt=kt.prev;oe&&kt.type==")"&&kt.prev.type=="stat"&&(kt=kt.prev);var gn=kt.type,kn=gt==gn;return gn=="vardef"?kt.indented+(be.lastType=="operator"||be.lastType==","?kt.info.length+1:0):gn=="form"&>=="{"?kt.indented:gn=="form"?kt.indented+se:gn=="stat"?kt.indented+(st(be,Pe)?oe||se:0):kt.info!="switch"||kn||ie.doubleIndentSwitch==0?kt.align?kt.column+(kn?0:1):kt.indented+(kn?0:se):kt.indented+(/^(?:case|default)\b/.test(Pe)?se:2*se)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:I?null:"/*",blockCommentEnd:I?null:"*/",blockCommentContinue:I?null:" * ",lineComment:I?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:I?"json":"javascript",jsonldMode:W,jsonMode:I,expressionAllowed:Nt,skipExpression:function(be){X(be,"atom","atom","true",new fe.StringStream("",2,null))}}})),fe.registerHelper("wordChars","javascript",/[\w$]/),fe.defineMIME("text/javascript","javascript"),fe.defineMIME("text/ecmascript","javascript"),fe.defineMIME("application/javascript","javascript"),fe.defineMIME("application/x-javascript","javascript"),fe.defineMIME("application/ecmascript","javascript"),fe.defineMIME("application/json",{name:"javascript",json:!0}),fe.defineMIME("application/x-json",{name:"javascript",json:!0}),fe.defineMIME("application/manifest+json",{name:"javascript",json:!0}),fe.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),fe.defineMIME("text/typescript",{name:"javascript",typescript:!0}),fe.defineMIME("application/typescript",{name:"javascript",typescript:!0})})(S(4631))},9589:(We,ke,S)=>{(function(fe){"use strict";var D={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0}
27,optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},ie={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};fe.defineMode("xml",(function(ce,ae){var se,oe,W=ce.indentUnit,I={},g=ae.htmlMode?D:ie;for(var P in g)I[P]=g[P];for(var P in ae)I[P]=ae[P];function x(s,l){function f(te){return l.tokenize=te,te(s,l)}var w=s.next();return w=="<"?s.eat("!")?s.eat("[")?s.match("CDATA[")?f(re("atom","]]>")):null:s.match("--")?f(re("comment","-->")):s.match("DOCTYPE",!0,!0)?(s.eatWhile(/[\w\._\-]/),f(z(1))):null:s.eat("?")?(s.eatWhile(/[\w\._\-]/),l.tokenize=re("meta","?>"),"meta"):(se=s.eat("/")?"closeTag":"openTag",l.tokenize=A,"tag bracket"):w=="&"?(s.eat("#")?s.eat("x")?s.eatWhile(/[a-fA-F\d]/)&&s.eat(";"):s.eatWhile(/[\d]/)&&s.eat(";"):s.eatWhile(/[\w\.\-:]/)&&s.eat(";"))?"atom":"error":(s.eatWhile(/[^&<]/),null)}function A(s,l){var f=s.next();if(f==">"||f=="/"&&s.eat(">"))return l.tokenize=x,se=f==">"?"endTag":"selfcloseTag","tag bracket";if(f=="=")return se="equals",null;if(f=="<"){l.tokenize=x,l.state=ye,l.tagName=l.tagStart=null;var w=l.tokenize(s,l);return w?w+" tag error":"tag error"}return/[\'\"]/.test(f)?(l.tokenize=$(f),l.stringStartCol=s.column(),l.tokenize(s,l)):(s.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function $(s){var l=function(f,w){for(;!f.eol();)if(f.next()==s){w.tokenize=A;break}return"string"};return l.isInAttribute=!0,l}function re(s,l){return function(f,w){for(;!f.eol();){if(f.match(l)){w.tokenize=x;break}f.next()}return s}}function z(s){return function(l,f){for(var w;(w=l.next())!=null;){if(w=="<")return f.tokenize=z(s+1),f.tokenize(l,f);if(w==">"){if(s==1){f.tokenize=x;break}return f.tokenize=z(s-1),f.tokenize(l,f)}}return"meta"}}function F(s){return s&&s.toLowerCase()}function G(s,l,f){this.prev=s.context,this.tagName=l||"",this.indent=s.indented,this.startOfLine=f,(I.doNotIndent.hasOwnProperty(l)||s.context&&s.context.noIndent)&&(this.noIndent=!0)}function H(s){s.context&&(s.context=s.context.prev)}function ne(s,l){for(var f;;){if(!s.context||(f=s.context.tagName,!I.contextGrabbers.hasOwnProperty(F(f))||!I.contextGrabbers[F(f)].hasOwnProperty(F(l))))return;H(s)}}function ye(s,l,f){return s=="openTag"?(f.tagStart=l.column(),ee):s=="closeTag"?O:ye}function ee(s,l,f){return s=="word"?(f.tagName=l.current(),oe="tag",B):I.allowMissingTagName&&s=="endTag"?(oe="tag bracket",B(s,l,f)):(oe="error",ee)}function O(s,l,f){if(s=="word"){var w=l.current();return f.context&&f.context.tagName!=w&&I.implicitlyClosed.hasOwnProperty(F(f.context.tagName))&&H(f),f.context&&f.context.tagName==w||I.matchClosing===!1?(oe="tag",j):(oe="tag error",E)}return I.allowMissingTagName&&s=="endTag"?(oe="tag bracket",j(s,l,f)):(oe="error",E)}function j(s,l,f){return s!="endTag"?(oe="error",j):(H(f),ye)}function E(s,l,f){return oe="error",j(s,l,f)}function B(s,l,f){if(s=="word")return oe="attribute",X;if(s=="endTag"||s=="selfcloseTag"){var w=f.tagName,te=f.tagStart;return f.tagName=f.tagStart=null,s=="selfcloseTag"||I.autoSelfClosers.hasOwnProperty(F(w))?ne(f,w):(ne(f,w),f.context=new G(f,w,te==f.indented)),ye}return oe="error",B}function X(s,l,f){return s=="equals"?_:(I.allowMissing||(oe="error"),B(s,l,f))}function _(s,l,f){return s=="string"?M:s=="word"&&I.allowUnquoted?(oe="string",B):(oe="error",B(s,l,f))}function M(s,l,f){return s=="string"?M:B(s,l,f)}return x.isInText=!0,{startState:function(s){var l={tokenize:x,state:ye,indented:s||0,tagName:null,tagStart:null,context:null};return s!=null&&(l.baseIndent=s),l},token:function(s,l){if(!l.tagName&&s.sol()&&(l.indented=s.indentation()),s.eatSpace())return null;se=null;var f=l.tokenize(s,l);return(f||se)&&f!="comment"&&(oe=null,l.state=l.state(se||f,s,l),oe&&(f=oe=="error"?f+" error":oe)),f},indent:function(s,l,f){var w=s.context;
27if(s.tokenize.isInAttribute)return s.tagStart==s.indented?s.stringStartCol+1:s.indented+W;if(w&&w.noIndent)return fe.Pass;if(s.tokenize!=A&&s.tokenize!=x)return f?f.match(/^(\s*)/)[0].length:0;if(s.tagName)return I.multilineTagIndentPastTag!==!1?s.tagStart+s.tagName.length+2:s.tagStart+W*(I.multilineTagIndentFactor||1);if(I.alignCDATA&&/<!\[CDATA\[/.test(l))return 0;var te=l&&/^<(\/)?([\w_:\.-]*)/.exec(l);if(te&&te[1])for(;w;){if(w.tagName==te[2]){w=w.prev;break}if(!I.implicitlyClosed.hasOwnProperty(F(w.tagName)))break;w=w.prev}else if(te)for(;w;){var J=I.contextGrabbers[F(w.tagName)];if(!J||!J.hasOwnProperty(F(te[2])))break;w=w.prev}for(;w&&w.prev&&!w.startOfLine;)w=w.prev;return w?w.indent+W:s.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:I.htmlMode?"html":"xml",helperType:I.htmlMode?"html":"xml",skipAttribute:function(s){s.state==_&&(s.state=B)},xmlCurrentTag:function(s){return s.tagName?{name:s.tagName,close:s.type=="closeTag"}:null},xmlCurrentContext:function(s){for(var l=[],f=s.context;f;f=f.prev)l.push(f.tagName);return l.reverse()}}})),fe.defineMIME("text/xml","xml"),fe.defineMIME("application/xml","xml"),fe.mimeModes.hasOwnProperty("text/html")||fe.defineMIME("text/html",{name:"xml",htmlMode:!0})})(S(4631))},9714:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>I});var fe=S(4942),D=S(2982),ie=S(5671),ce=S(3144),ae=S(9050),se=S(1163);function oe(g,P){var x=Object.keys(g);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(g);P&&(A=A.filter((function($){return Object.getOwnPropertyDescriptor(g,$).enumerable}))),x.push.apply(x,A)}return x}function W(g){for(var P=1;P<arguments.length;P++){var x=arguments[P]!=null?arguments[P]:{};P%2?oe(Object(x),!0).forEach((function(A){(0,fe.Z)(g,A,x[A])})):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(x)):oe(Object(x)).forEach((function(A){Object.defineProperty(g,A,Object.getOwnPropertyDescriptor(x,A))}))}return g}var I=(function(){function g(){(0,ie.Z)(this,g)}return(0,ce.Z)(g,[{key:"getConfig",value:function(P){return this.__getConfig(P)}},{key:"getProjectData",value:function(P){var x={},A=this.storageKey;return A&&(x[A]=P||this.getAll()),x}},{key:"loadProjectData",value:function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=x.all,$=x.onResult,re=x.reset,z=this.storageKey,F={action:"load"},G=A||this.getAll(),H=P[z];if(typeof H=="string")try{H=JSON.parse(H)}catch{this.__logWarn("Data parsing failed",{input:H})}return re&&H&&G.reset(null,F),$?H&&$(H,F):H&&(0,se.isDef)(H.length)&&G.reset(H,F),H}},{key:"clear",value:function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},x=this.all;return x&&x.reset(null,P),this}},{key:"__getConfig",value:function(P){var x=this.config||{};return P?x[P]:x}},{key:"getAll",value:function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.all?P.array?(0,D.Z)(this.all.models):this.all:[]}},{key:"getAllMap",value:function(){return this.getAll().reduce((function(P,x){return P[x.get(x.idAttribute)]=x,P}),{})}},{key:"__initConfig",value:function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.config=(0,se.deepMerge)(P,x),this.em=this.config.em,this.cls=[]}},{key:"__initListen",value:function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},x=this.all,A=this.em,$=this.events;x&&A&&x.on("add",(function(re,z,F){return A.trigger($.add,re,F)})).on("remove",(function(re,z,F){return A.trigger($.remove,re,F)})).on("change",(function(re,z){return A.trigger($.update,re,re.changedAttributes(),z)})).on("all",this.__catchAllEvent,this),this.cls=[x].concat(P.collections||[]),(P.propagate||[]).forEach((function(re){var z=re.entity,F=re.event;z.on("all",(function(G,H,ne,ye){var ee=W({event:G},ye||ne);[A,x].map((function(O){return O.trigger(F,H,ee)}))}))}))}},{key:"__remove",value:function(P){var x=this,A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=this.em,re=(0,ae.isString)(P)?this.get(P):P,z=function(){return re&&x.all.remove(re,A),re};return!A.silent&&$&&$.trigger(this.events.removeBefore,re,z,A),!A.abort&&z()}},{key:"__catchAllEvent",value:function(P,x,A,$){var re=this.em,z=this.events,F=$||A;re&&z.all&&re.trigger(z.all,{event:P,model:x,options:F}),this.__onAllEvent()}},{key:"__appendTo",value:function(){var P=this.getConfig().appendTo;if(P){var x=(0,ae.isElement)(P)?P:document.querySelector(P);if(!x)return this.__logWarn('"appendTo" element not found');x.appendChild(this.render())}}},{key:"__onAllEvent",value:function(){}},{key:"__logWarn",value:function(P,x){this.em.logWarning("[".concat(this.name,"]: ").concat(P),x)}},{key:"_createId",value:function(){var P,x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:16,A=this.getAll(),$=A.length+x,re=this.getAllMap();do P=(0,se.createId)($);
27while(re[P]);return P}},{key:"__listenAdd",value:function(P,x){var A=this;P.on("add",(function($,re,z){return A.em.trigger(x,$,z)}))}},{key:"__listenRemove",value:function(P,x){var A=this;P.on("remove",(function($,re,z){return A.em.trigger(x,$,z)}))}},{key:"__listenUpdate",value:function(P,x){var A=this;P.on("change",(function($,re){return A.em.trigger(x,$,$.changedAttributes(),re)}))}},{key:"__destroy",value:function(){var P;this.cls.forEach((function(x){x.stopListening(),x.reset()})),this.em=0,this.config=0,(P=this.view)===null||P===void 0||P.remove(),this.view=0}}]),g})()},1030:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>Ce,evAdd:()=>p,evAll:()=>v,evClose:()=>N,evCustom:()=>Y,evOpen:()=>q,evPfx:()=>b,evRemove:()=>y,evRemoveBefore:()=>Z,evSelect:()=>h,evUpdate:()=>m,evUpload:()=>a,evUploadEnd:()=>C,evUploadError:()=>Q,evUploadRes:()=>pe,evUploadStart:()=>c});var fe=S(4942),D=S(9050),ie=S(9304);const ce={assets:[],noAssets:"",stylePrefix:"am-",upload:0,uploadName:"files",headers:{},params:{},credentials:"include",multiUpload:!0,autoAdd:!0,customFetch:null,uploadFile:null,embedAsBase64:!0,handleAdd:null,beforeUpload:null,showUrlInput:!0,custom:!1,dropzone:!1,openAssetsOnDrop:1,dropzoneContent:""};var ae=S(3144),se=S(5671),oe=S(9340),W=S(2963),I=S(1120),g=S(2316);function P(Se){var me=(function(){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}})();return function(){var xe,de=(0,I.Z)(Se);if(me){var Ee=(0,I.Z)(this).constructor;xe=Reflect.construct(de,arguments,Ee)}else xe=de.apply(this,arguments);return(0,W.Z)(this,xe)}}var x=(function(Se){(0,oe.Z)(xe,Se);var me=P(xe);function xe(){return(0,se.Z)(this,xe),me.apply(this,arguments)}return(0,ae.Z)(xe,[{key:"defaults",value:function(){return{type:"",src:""}}},{key:"getType",value:function(){return this.get("type")}},{key:"getSrc",value:function(){return this.get("src")}},{key:"getFilename",value:function(){return this.get("src").split("/").pop().split("?").shift()}},{key:"getExtension",value:function(){return this.getFilename().split(".").pop()}}]),xe})(g.Model);function A(Se,me){var xe=Object.keys(Se);if(Object.getOwnPropertySymbols){var de=Object.getOwnPropertySymbols(Se);me&&(de=de.filter((function(Ee){return Object.getOwnPropertyDescriptor(Se,Ee).enumerable}))),xe.push.apply(xe,de)}return xe}function $(Se){for(var me=1;me<arguments.length;me++){var xe=arguments[me]!=null?arguments[me]:{};me%2?A(Object(xe),!0).forEach((function(de){(0,fe.Z)(Se,de,xe[de])})):Object.getOwnPropertyDescriptors?Object.defineProperties(Se,Object.getOwnPropertyDescriptors(xe)):A(Object(xe)).forEac
27h((function(de){Object.defineProperty(Se,de,Object.getOwnPropertyDescriptor(xe,de))}))}return Se}function re(Se){var me=(function(){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}})();return function(){var xe,de=(0,I.Z)(Se);if(me){var Ee=(0,I.Z)(this).constructor;xe=Reflect.construct(de,arguments,Ee)}else xe=de.apply(this,arguments);return(0,W.Z)(this,xe)}}x.prototype.idAttribute="src",x.getDefaults=function(){return(0,D.result)(this.prototype,"defaults")};var z=(function(Se){(0,oe.Z)(xe,Se);var me=re(xe);function xe(){return(0,se.Z)(this,xe),me.apply(this,arguments)}return(0,ae.Z)(xe,[{key:"defaults",value:function(){return $($({},x.getDefaults()),{},{type:"image",unitDim:"px",height:0,width:0})}}]),xe})(x),F=S(168);function G(Se){var me=(function(){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}})();return function(){var xe,de=(0,I.Z)(Se);if(me){var Ee=(0,I.Z)(this).constructor;xe=Reflect.construct(de,arguments,Ee)}else xe=de.apply(this,arguments);return(0,W.Z)(this,xe)}}var H,ne,ye=(function(Se){(0,oe.Z)(xe,Se);var me=G(xe);function xe(){return(0,se.Z)(this,xe),me.apply(this,arguments)}return(0,ae.Z)(xe,[{key:"initialize",value:function(){var de=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=de,this.collection=de.collection;var Ee=de.config||{};this.config=Ee,this.pfx=Ee.stylePrefix||"",this.ppfx=Ee.pStylePrefix||"",this.em=Ee.em,this.className=this.pfx+"asset",this.listenTo(this.model,"destroy remove",this.remove),this.model.view=this;var Fe=this.init&&this.init.bind(this);Fe&&Fe(de)}},{key:"__getBhv",value:function(){var de=this.em,Ee=de&&de.get("AssetManager");return Ee&&Ee.__getBehaviour()||{}}},{key:"template",value:function(){var de=this.pfx;return` 28 <div class="`.concat(de,`preview-cont"> 29 `).concat(this.getPreview(),` 30 </div> 31 <div class="`).concat(de,`meta"> 32 `).concat(this.getInfo(),` 33 </div> 34 <div class="`).concat(de,`close" data-toggle="asset-remove"> 35 ⨯ 36 </div> 37 `)}},{key:"updateTarget",value:function(de){de&&de.set&&(de.set("attributes",(0,D.clone)(de.get("attributes"))),de.set("src",this.model.get("src")))}},{key:"getPreview",value:function(){return""}},{key:"getInfo",value:function(){return""}},{key:"render",value:function(){var de=this.el;return de.innerHTML=this.template(this,this.model),de.className=this.className,this}}]),xe})(g.View),ee=S(7539);function O(Se){var me=(function(){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}})();return function(){var xe,de=(0,I.Z)(Se);if(me){var Ee=(0,I.Z)(this).constructor;xe=Reflect.construct(de,arguments,Ee)}else xe=de.apply(this,arguments);return(0,W.Z)(this,xe)}}var j=(function(Se){(0,oe.Z)(xe,Se);var me=O(xe);function xe(){return(0,se.Z)(this,xe),me.apply(this,arguments)}return(0,ae.Z)(xe,[{key:"getPreview",value:function(){var de=this.pfx,Ee=this.ppfx,Fe=this.model.get("src");return(0,ee.Z)(H||(H=(0,F.Z)([` 38 <div class="`,`preview" style="background-image: url('`,`');"></div> 39 <div class="`,"preview-bg ",`checker-bg"></div> 40 `])),de,Fe,de,Ee)}},{key:"getInfo",value:function(){var de=this.pfx,Ee=this.model,Fe=Ee.get("name"),He=Ee.get("width"),et=Ee.get("height"),Ge=Ee.get("unitDim"),yt=He&&et?"".concat(He,"x").concat(et).concat(Ge):"";return Fe=Fe||Ee.getFilename(),(0,ee.Z)(ne||(ne=(0,F.Z)([` 41 <div class="`,'name">',`</div> 42 <div class="`,'dimensions">',`</div> 43 `])),de,Fe,de,yt)}},{key:"init",value:function(de){var Ee=this.pfx;this.className+=" ".concat(Ee,"asset-image")}},{key:"onClick",value:function(){var de=this.model,Ee=this.pfx,Fe=this.__getBhv().select,He=this.config.onClick,et=this.collection;et.trigger("deselectAll"),this.$el.addClass(Ee+"highlight"),(0,D.isFunction)(Fe)?Fe(de,!1):(0,D.isFunction)(He)?He(de):this.updateTarget(et.target)}},{key:"onDblClick",value:function(){var de=this.em,Ee=this.model,Fe=this.__getBhv().select,He=this.config.onDblClick,et=this.collection,Ge=et.target,yt=et.onSelect;(0,D.isFunction)(Fe)?Fe(Ee,!0):(0,D.isFunction)(He)?He(Ee):(this.updateTarget(Ge),de&&de.get("Modal").close()),(0,D.isFunction)(yt)&&yt(Ee)}},{key:"onRemove",value:function(de){de.stopImmediatePropagation(),this.model.collection.remove(this.model)}}]),xe})(ye);j.prototype.events={"click [data-toggle=asset-remove]":"onRemove",click:"onClick",dblclick:"onDblClick"};var E=S(793);function B(Se){var me=(function(){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}})();return function(){var xe,de=(0,I.Z)(Se);if(me){var Ee=(0,I.Z)(this).constructor;xe=Reflect.construct(de,arguments,Ee)}else xe=de.apply(this,arguments);return(0,W.Z)(this,xe)}}var X=(function(Se){(0,oe.Z)(xe,Se);var me=B(xe);function xe(){return(0,se.Z)(this,xe),me.apply(this,arguments)}return(0,ae.Z)(xe)})(g.Collection.extend(E.Z));function _(Se){var me=(function(){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}})();return function(){var xe,de=(0,I.Z)(Se);if(me){var Ee=(0,I.Z)(this).constructor;xe=Reflect.construct(de,arguments,Ee)}else xe=de.apply(this,arguments);return(0,W.Z)(this,xe)}}X.prototype.types=[{id:"image",model:z,view:j,isType:function(Se){return typeof Se=="string"?{type:"image",src:Se}:Se}}];var M=(function(Se){(0,oe.Z)(xe,Se);var me=_(xe);function xe(){return(0,se.Z)(this,xe),me.apply(this,arguments)}return(0,ae.Z)(xe,[{key:"template",value:function(de){var Ee=de.pfx,Fe=de.ppfx,He=de.em,et="";return this.config.showUrlInput&&(et=` 44 <form class="`.concat(Ee,`add-asset"> 45 <div class="`).concat(Fe,"field ").concat(Ee,`add-field"> 46 <input placeholder="`).concat(He&&He.t("assetManager.inputPlh"),`"/> 47 </div> 48 <button class="`).concat(Fe,'btn-prim">').concat(He&&He.t("assetManager.addButton"),`</button> 49 <div style="clear:both"></div> 50 </form> 51 `)),` 52 <div class="`.concat(Ee,`assets-cont"> 53 <div class="`).concat(Ee,`assets-header"> 54 `).concat(et,` 55 </div> 56 <div class="`).concat(Ee,`assets" data-el="assets"></div> 57 <div style="clear:both"></div> 58 </div> 59 `)}},{key:"initialize",value:function(de){this.options=de,this.config=de.config,this.pfx=this.config.stylePrefix||"",this.ppfx=this.config.pStylePrefix||"",this.em=this.config.em;var Ee=this.collection;this.listenTo(Ee,"reset",this.renderAssets),this.listenTo(Ee,"add",this.addToAsset),this.listenTo(Ee,"remove",this.removedAsset),this.listenTo(Ee,"deselectAll",this.deselectAll)}},{key:"handleSubmit",value:function(de){de.preventDefault();
59var Ee=this.getAddInput(),Fe=Ee&&Ee.value.trim(),He=this.config.handleAdd;Fe&&(Ee.value="",this.getAssetsEl().scrollTop=0,He?He.bind(this)(Fe):this.options.globalCollection.add(Fe,{at:0}))}},{key:"getAssetsEl",value:function(){return this.el.querySelector(".".concat(this.pfx,"assets"))}},{key:"getAddInput",value:function(){return this.inputUrl&&this.inputUrl.value||(this.inputUrl=this.el.querySelector(".".concat(this.pfx,"add-asset input"))),this.inputUrl}},{key:"removedAsset",value:function(de){this.collection.length||this.toggleNoAssets()}},{key:"addToAsset",value:function(de){this.collection.length==1&&this.toggleNoAssets(1),this.addAsset(de)}},{key:"addAsset",value:function(de){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,Fe=Ee,He=this.collection,et=this.config,Ge=new de.typeView({model:de,collection:He,config:et}).render().el;if(Fe)Fe.appendChild(Ge);else{var yt=this.getAssetsEl();yt&&yt.insertBefore(Ge,yt.firstChild)}return Ge}},{key:"toggleNoAssets",value:function(de){var Ee=this.$el.find(".".concat(this.pfx,"assets"));if(de)Ee.empty();else{var Fe=this.config.noAssets;Fe&&Ee.append(Fe)}}},{key:"deselectAll",value:function(){var de=this.pfx;this.$el.find(".".concat(de,"highlight")).removeClass("".concat(de,"highlight"))}},{key:"renderAssets",value:function(){var de=this,Ee=document.createDocumentFragment(),Fe=this.$el.find(".".concat(this.pfx,"assets"));Fe.empty(),this.toggleNoAssets(this.collection.length),this.collection.each((function(He){return de.addAsset(He,Ee)})),Fe.append(Ee)}},{key:"render",value:function(){var de=this.options.fu.render().el;return this.$el.empty(),this.$el.append(de).append(this.template(this)),this.el.className="".concat(this.ppfx,"asset-manager"),this.renderAssets(),this}}]),xe})(g.View);M.prototype.events={submit:"handleSubmit"};var s,l=S(9661);function f(Se,me){var xe=typeof Symbol<"u"&&Se[Symbol.iterator]||Se["@@iterator"];if(!xe){if(Array.isArray(Se)||(xe=(function(Ge,yt){if(Ge){if(typeof Ge=="string")return w(Ge,yt);var St=Object.prototype.toString.call(Ge).slice(8,-1);if(St==="Object"&&Ge.constructor&&(St=Ge.constructor.name),St==="Map"||St==="Set")return Array.from(Ge);if(St==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(St))return w(Ge,yt)}})(Se))||me&&Se&&typeof Se.length=="number"){xe&&(Se=xe);var de=0,Ee=function(){};return{s:Ee,n:function(){return de>=Se.length?{done:!0}:{done:!1,value:Se[de++]}},e:function(Ge){throw Ge},f:Ee}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 60In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Fe,He=!0,et=!1;return{s:function(){xe=xe.call(Se)},n:function(){var Ge=xe.next();return He=Ge.done,Ge},e:function(Ge){et=!0,Fe=Ge},f:function(){try{He||xe.return==null||xe.return()}finally{if(et)throw Fe}}}}function w(Se,me){(me==null||me>Se.length)&&(me=Se.length);for(var xe=0,de=new Array(me);xe<me;xe++)de[xe]=Se[xe];return de}function te(Se){var me=(function(){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}})();return function(){var xe,de=(0,I.Z)(Se);if(me){var Ee=(0,I.Z)(this).constructor;xe=Reflect.construct(de,arguments,Ee)}else xe=de.apply(this,arguments);return(0,W.Z)(this,xe)}}var J=(function(Se){(0,oe.Z)(xe,Se);var me=te(xe);function xe(){return(0,se.Z)(this,xe),me.apply(this,arguments)}return(0,ae.Z)(xe,[{key:"template",value:function(de){var Ee=de.pfx,Fe=de.title,He=de.uploadId,et=de.disabled,Ge=de.multiUpload;return(0,ee.Z)(s||(s=(0,F.Z)([` 61 <form> 62 <div id="`,'title">',`</div> 63 <input 64 type="file" 65 id="`,`" 66 name="file" 67 accept="*/*" 68 `,` 69 `,` 70 /> 71 <div style="clear:both;"></div> 72 </form> 73 `])),Ee,Fe,He,et?"disabled":"",Ge?"multiple":"")}},{key:"initialize",value:function(){var de=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=de;var Ee=de.config||{};this.module=de.module,this.config=Ee,this.em=this.config.em,this.pfx=Ee.stylePrefix||"",this.ppfx=Ee.pStylePrefix||"",this.target=this.options.globalCollection||{},this.uploadId=this.pfx+"uploadFile",this.disabled=Ee.disableUpload!==void 0?Ee.disableUpload:!Ee.upload&&!Ee.embedAsBase64,this.multiUpload=Ee.multiUpload===void 0||Ee.multiUpload,this.events={["change #".concat(this.uploadId)]:"uploadFile"};var Fe=Ee.uploadFile;Fe?this.uploadFile=Fe.bind(this):!Ee.upload&&Ee.embedAsBase64&&(this.uploadFile=this.constructor.embedAsBase64),this.delegateEvents()}},{key:"onUploadStart",value:function(){var de=this.module;de&&de.__propEv("asset:upload:start")}},{key:"onUploadEnd",value:function(de){var Ee=this.$el,Fe=this.module;Fe&&Fe.__propEv("asset:upload:end",de);var He=Ee.find("input");He&&He.val("")}},{key:"onUploadError",value:function(de){var Ee=this.module;console.error(de),this.onUploadEnd(de),Ee&&Ee.__propEv("asset:upload:error",de)}},{key:"onUploadResponse",value:function(de,Ee){var Fe,He=this.module,et=this.config,Ge=this.target;try{Fe=typeof de=="string"?JSON.parse(de):de}catch{Fe=de}He&&He.__propEv("asset:upload:response",Fe),et.autoAdd&&Ge&&Ge.add(Fe.data,{at:0}),this.onUploadEnd(de),Ee&&Ee(Fe)}},{key:"uploadFile",value:function(de,Ee){var Fe=this,He=de.dataTransfer?de.dataTransfer.files:de.target.files,et=this.config,Ge=et.beforeUpload;
73if((Ge&&Ge(He))!==!1){var yt=new FormData,St=et.params,bt=et.customFetch;for(var Jt in St)yt.append(Jt,St[Jt]);if(this.multiUpload)for(var mt=0;mt<He.length;mt++)yt.append("".concat(et.uploadName,"[]"),He[mt]);else He.length&&yt.append(et.uploadName,He[0]);this.target;var _t=et.upload,Oe=et.headers,De="X-Requested-With";if(Oe[De]===void 0&&(Oe[De]="XMLHttpRequest"),_t){this.onUploadStart();var Ze={method:"post",credentials:et.credentials||"include",headers:Oe,body:yt};return(bt?bt(_t,Ze):(0,l.Z)(_t,Ze).then((function(Ue){return(Ue.status/200|0)==1?Ue.text():Ue.text().then((function(rt){return Promise.reject(rt)}))}))).then((function(Ue){return Fe.onUploadResponse(Ue,Ee)})).catch((function(Ue){return Fe.onUploadError(Ue)}))}}}},{key:"initDrop",value:function(){var de=this;!this.uploadForm&&(this.uploadForm=this.$el.find("form").get(0),"draggable"in this.uploadForm)&&(this.uploadFile,this.uploadForm.ondragover=function(){return this.className=de.pfx+"hover",!1},this.uploadForm.ondragleave=function(){return this.className="",!1},this.uploadForm.ondrop=function(Ee){this.className="",Ee.preventDefault(),de.uploadFile(Ee)})}},{key:"initDropzone",value:function(de){var Ee=this,Fe=0,He=this.config,et=de.model,Ge=de.el,yt=et.get("Editor"),St=(et.get("Config").el,et.get("Canvas").getBody()),bt=this.ppfx,Jt="".concat(bt,"dropzone-active"),mt="".concat(bt,"dropzone"),_t=function(){Ge.className=Ge.className.replace(Jt,"").trim(),Fe=0},Oe=function(){return Fe||(Ge.className+=" ".concat(Jt),Fe=1),!1},De=function(){return _t(),!1},Ze=function(Ue){if(_t(),Ue.preventDefault(),Ue.stopPropagation(),Ee.uploadFile(Ue),He.openAssetsOnDrop&&yt){var rt=yt.getSelected();yt.runCommand("open-assets",{target:rt,onSelect:function(){yt.Modal.close(),yt.AssetManager.setTarget(null)}})}return!1};de.$el.append('<div class="'.concat(mt,'">').concat(He.dropzoneContent,"</div>")),_t(),"draggable"in Ge&&[Ge,St].forEach((function(Ue){Ue.ondragover=Oe,Ue.ondragleave=De,Ue.ondrop=Ze}))}},{key:"render",value:function(){var de=this.$el,Ee=this.pfx,Fe=this.em;return de.html(this.template({title:Fe&&Fe.t("assetManager.uploadTitle"),uploadId:this.uploadId,disabled:this.disabled,multiUpload:this.multiUpload,pfx:Ee})),this.initDrop(),de.attr("class",Ee+"file-uploader"),this}}]),xe})(g.View);function R(Se,me){var xe=Object.keys(Se);if(Object.getOwnPropertySymbols){var de=Object.getOwnPropertySymbols(Se);me&&(de=de.filter((function(Ee){return Object.getOwnPropertyDescriptor(Se,Ee).enumerable}))),xe.push.apply(xe,de)}return xe}function k(Se){for(var me=1;me<arguments.length;me++){var xe=arguments[me]!=null?arguments[me]:{};me%2?R(Object(xe),!0).forEach((function(de){(0,fe.Z)(Se,de,xe[de])})):Object.getOwnPropertyDescriptors?Object.defineProperties(Se,Object.getOwnPropertyDescriptors(xe)):R(Object(xe)).forEac
73h((function(de){Object.defineProperty(Se,de,Object.getOwnPropertyDescriptor(xe,de))}))}return Se}J.embedAsBase64=function(Se,me){var xe=this,de=Se.dataTransfer?Se.dataTransfer.files:Se.target.files,Ee={data:[]};if(FileReader){var Fe,He=[],et=/^(.+)\/(.+)$/,Ge=f(de);try{var yt=function(){var St=Fe.value,bt=new Promise((function(Jt,mt){var _t=new FileReader;_t.addEventListener("load",(function(Oe){var De,Ze=St.name,Ue=et.exec(St.type);if((De=Ue?Ue[1]:St.type)==="image"){var rt={src:_t.result,name:Ze,type:De,height:0,width:0},Te=new Image;Te.addEventListener("error",(function(Ne){mt(Ne)})),Te.addEventListener("load",(function(){rt.height=Te.height,rt.width=Te.width,Jt(rt)})),Te.src=rt.src}else Jt(De?{src:_t.result,name:Ze,type:De}:_t.result)})),_t.addEventListener("error",(function(Oe){mt(Oe)})),_t.addEventListener("abort",(function(Oe){mt("Aborted")})),_t.readAsDataURL(St)}));He.push(bt)};for(Ge.s();!(Fe=Ge.n()).done;)yt()}catch(St){Ge.e(St)}finally{Ge.f()}Promise.all(He).then((function(St){Ee.data=St,xe.onUploadResponse(Ee,me)}),(function(St){xe.onUploadError(St)}))}else this.onUploadError(new Error("Unsupported platform, FileReader is not defined"))};var v="asset",b="".concat(v,":"),h="".concat(b,"select"),m="".concat(b,"update"),p="".concat(b,"add"),y="".concat(b,"remove"),Z="".concat(y,":before"),Y="".concat(b,"custom"),q="".concat(b,"open"),N="".concat(b,"close"),a="".concat(b,"upload"),c="".concat(a,":start"),C="".concat(a,":end"),Q="".concat(a,":error"),pe="".concat(a,":response");const Ce=function(){var Se,me,xe,de,Ee={},Fe="open-assets";return k(k({},ie.Z),{},{name:"AssetManager",storageKey:"assets",Asset:X,Assets:X,events:{all:v,select:h,update:m,add:p,remove:y,removeBefore:Z,custom:Y,open:q,close:N,uploadStart:c,uploadEnd:C,uploadError:Q,uploadResponse:pe},init:function(){var He=this,et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Ge=(Ee=k(k({},ce),et)).pStylePrefix,yt=Ee,St=yt.em;return this.config=Ee,this.em=St,Ge&&(Ee.stylePrefix=Ge+Ee.stylePrefix),Se=new X([]),me=new X([]),this.all=Se,this.__initListen(),Se.on("add",(function(bt){return He.getAllVisible().add(bt)})),Se.on("remove",(function(bt){return He.getAllVisible().remove(bt)})),this},__propEv:function(He){for(var et,Ge,yt=arguments.length,St=new Array(yt>1?yt-1:0),bt=1;bt<yt;bt++)St[bt-1]=arguments[bt];(et=this.em).trigger.apply(et,[He].concat(St)),(Ge=this.getAll()).trigger.apply(Ge,[He].concat(St))},__onAllEvent:(0,D.debounce)((function(){this.__trgCustom()})),__trgCustom:function(){(this.__getBehaviour().container||this.getConfig().custom.open)&&this.em.trigger(this.events.custom,this.__customData())},__customData:function(){var He=this,et=this.__getBehaviour();return{am:this,open:this.isOpen(),assets:this.getAll().models,types:et.types||[],container:et.container,close:function(){return He.close()},remove:function(){return He.remove.apply(He,arguments)},select:function(Ge,yt){var St=He.add(Ge);(0,D.isFunction)(et.select)&&et.select(St,yt)},options:et.options||{}}},open:function(){var He=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=this.em.get("Commands");et.run(Fe,k({types:["image"],select:function(){}},He))},close:function(){this.em.get("Commands").stop(Fe)},isOpen:function(){var He=this.em.get("Commands");return!(!He||!He.isActive(Fe))},add:function(He){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return et.at===void 0&&(et.at=0),Se.add(He,et)},get:function(He){return Se.where({src:He})[0]||null},getAll:function(){return Se},getAllVisible:function(){return me},remove:function(He,et){return this.__remove(He,et)},store:function(){return this.getProjectData()},load:function(He){return this.loadProjectData(He)},getContainer:function(){return this.__getBehaviour().container||xe&&xe.el},getAssetsEl:function(){return xe.el.querySelector("[data-el=assets]")},render:function(He){if(!this.getConfig().custom){var et=He||this.getAll().models;if(!xe){var Ge=this.__viewParams();Ge.fu=this.FileUploader();var yt=xe&&xe.el;(xe=new M(k({el:yt},Ge))).render()}return me.reset(et),this.getContainer()}},__viewParams:function(){return{collection:me,globalCollection:Se,config:Ee,module:this}}
73,addType:function(He,et){this.getAll().addType(He,et)},getType:function(He){return this.getAll().getType(He)},getTypes:function(){return this.getAll().getTypes()},AssetsView:function(){return xe},FileUploader:function(){return de||(de=new J(this.__viewParams())),de},onLoad:function(){var He=this;this.getAll().reset(Ee.assets);var et=this.em,Ge=this.events;et.on("run:".concat(Fe),(function(){return He.__propEv(Ge.open)})),et.on("stop:".concat(Fe),(function(){return He.__propEv(Ge.close)}))},postRender:function(He){Ee.dropzone&&de&&de.initDropzone(He)},setTarget:function(He){me.target=He},onSelect:function(He){me.onSelect=He},onClick:function(He){Ee.onClick=He},onDblClick:function(He){Ee.onDblClick=He},__behaviour:function(){var He=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this._bhv=k(k({},this._bhv||{}),He)},__getBehaviour:function(){return this._bhv||{}},destroy:function(){Se.stopListening(),me.stopListening(),Se.reset(),me.reset(),de&&de.remove(),xe&&xe.remove(),[Se,me,xe,de].forEach((function(He){return null})),this._bhv={},this.all={},Ee={}}})}},6407:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>Y,evAdd:()=>k,evAll:()=>J,evCustom:()=>Z,evDrag:()=>m,evDragStart:()=>p,evDragStop:()=>y,evPfx:()=>R,evRemove:()=>b,evRemoveBefore:()=>h,evUpdate:()=>v});var fe=S(5671),D=S(3144),ie=S(7326),ce=S(9340),ae=S(2963),se=S(1120),oe=S(4942),W=S(9050),I=S(9714);const g={appendTo:"",appendOnClick:!1,blocks:[],custom:!1};var P=S(2316);function x(q){var N=(function(){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}})();return function(){var a,c=(0,se.Z)(q);if(N){var C=(0,se.Z)(this).constructor;a=Reflect.construct(c,arguments,C)}else a=c.apply(this,arguments);return(0,ae.Z)(this,a)}}var A=(function(q){(0,ce.Z)(a,q);var N=x(a);function a(){return(0,fe.Z)(this,a),N.apply(this,arguments)}return(0,D.Z)(a,[{key:"defaults",value:function(){return{label:"",content:"",media:"",category:"",activate:!1,select:null,resetId:!1,disable:!1,onClick:null,attributes:{}}}},{key:"getId",value:function(){return this.id}},{key:"getLabel",value:function(){return this.get("label")}},{key:"getMedia",value:function(){return this.get("media")}},{key:"getContent",value:function(){return this.get("content")}},{key:"getCategoryLabel",value:function(){var c=this.get("category");return(0,W.isFunction)(c.get)?c.get("label"):c.label?c.label:c}}]),a})(P.Model);function $(q){var N=(function(){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}})();return function(){var a,c=(0,se.Z)(q);if(N){var C=(0,se.Z)(this).constructor;a=Reflect.construct(c,arguments,C)}else a=c.apply(this,arguments);return(0,ae.Z)(this,a)}}var re=(function(q){(0,ce.Z)(a,q);var N=$(a);function a(){return(0,fe.Z)(this,a),N.apply(this,arguments)}return(0,D.Z)(a)})(P.Collection);function z(q){var N=(function(){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}})();return function(){var a,c=(0,se.Z)(q);if(N){var C=(0,se.Z)(this).constructor;a=Reflect.construct(c,arguments,C)}else a=c.apply(this,arguments);return(0,ae.Z)(this,a)}}re.prototype.model=A;var F=(function(q){(0,ce.Z)(a,q);var N=z(a);function a(){return(0,fe.Z)(this,a),N.apply(this,arguments)}return(0,D.Z)(a,[{key:"defaults",value:function(){return{id:"",label:"",open:!0,attributes:{}}}}]),a})(P.Model);function G(q){var N=(function(){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}})();return function(){var a,c=(0,se.Z)(q);if(N){var C=(0,se.Z)(this).constructor;a=Reflect.construct(c,arguments,C)}else a=c.apply(this,arguments);return(0,ae.Z)(this,a)}}var H=(function(q){(0,ce.Z)(a,q);var N=G(a);function a(){return(0,fe.Z)(this,a),N.apply(this,arguments)}return(0,D.Z)(a)})(P.Collection);H.prototype.model=F;var ne=S(1163);function ye(q){var N=(function(){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}})();return function(){var a,c=(0,se.Z)(q);if(N){var C=(0,se.Z)(this).constructor;a=Reflect.construct(c,arguments,C)}else a=c.apply(this,arguments);return(0,ae.Z)(this,a)}}var ee,O=(function(q){(0,ce.Z)(a,q);var N=ye(a);function a(){return(0,fe.Z)(this,a),N.apply(this,arguments)}return(0,D.Z)(a,[{key:"events",value:function(){return{click:"handleClick",mousedown:"startDrag",dragstart:"handleDragStart",drag:"handleDrag",dragend:"handleDragEnd"}}},{key:"initialize",value:function(c){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Q=this.model;this.em=C.em,this.config=C,this.endDrag=this.endDrag.bind(this),this.ppfx=C.pStylePrefix||"",this.listenTo(Q,"destroy remove",this.remove),this.listenTo(Q,"change",this.render)}},{key:"__getModule",value:function(){return this.em.get("BlockManager")}},{key:"handleClick",value:function(c){var C=this.config,Q=this.model,pe=this.em,Ce=Q.get("onClick")||C.appendOnClick;if(pe.trigger("block:click",Q,c),Ce){if((0,W.isFunction)(Ce))return Ce(Q,pe.getEditor(),{event:c});var Se,me,xe=C.getSorter(),de=Q.get("content"),Ee=pe.getSelected();if(xe.setDropContent(de),Ee)if(xe.validTarget(Ee.getEl(),de).valid)Se=Ee;else{var Fe=Ee.parent();xe.validTarget(Fe.getEl(),de).valid&&(Se=Fe,me=Fe.components().indexOf(Ee)+1)}if(!Se){var He=pe.getWrapper();xe.validTarget(He.getEl(),de).valid&&(Se=He)}var et=Se&&Se.append(de,{at:me})[0];et&&pe.setSelected(et,{scroll:1})}}},{key:"startDrag",value:function(c){var C=this.config,Q=this.em,pe=this.model.get("disable");if(c.button===0&&C.getSorter&&!this.el.draggable&&!pe){Q.refreshCanvas();var Ce=C.getSorter();Ce.setDragHelper(this.el,c),Ce.setDropContent(this.model.get("content")),Ce.startSort(this.el),(0,ne.on)(document,"mouseup",this.endDrag)}}},{key:"handleDragStart",value:function(c){this.__getModule().__startDrag(this.model,c)}},{key:"handleDrag",value:function(c){this.__getModule().__drag(c)}},{key:"handleDragEnd",value:function(){this.__getModule().__endDrag(
73)}},{key:"endDrag",value:function(c){(0,ne.off)(document,"mouseup",this.endDrag);var C=this.config.getSorter();C.moved=0,C.endMove()}},{key:"render",value:function(){var c=this.em,C=this.el,Q=this.$el,pe=this.ppfx,Ce=this.model,Se=Ce.get("disable"),me=Ce.get("attributes")||{},xe=me.class||"",de="".concat(pe,"block"),Ee=c&&c.t("blockManager.labels.".concat(Ce.id))||Ce.get("label"),Fe=Ce.get("render"),He=Ce.get("media"),et=Se?"".concat(de,"--disable"):"".concat(pe,"four-color-h");Q.attr(me),C.className="".concat(xe," ").concat(de," ").concat(pe,"one-bg ").concat(et).trim(),C.innerHTML=` 74 `.concat(He?'<div class="'.concat(de,'__media">').concat(He,"</div>"):"",` 75 <div class="`).concat(de,'-label">').concat(Ee,`</div> 76 `),C.title=me.title||C.textContent.trim(),C.setAttribute("draggable",!(!(0,ne.hasDnd)(c)||Se));var Ge=Fe&&Fe({el:C,model:Ce,className:de,prefix:pe});return Ge&&(C.innerHTML=Ge),this}}]),a})(P.View),j=S(168),E=S(7539);function B(q){var N=(function(){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}})();return function(){var a,c=(0,se.Z)(q);if(N){var C=(0,se.Z)(this).constructor;a=Reflect.construct(c,arguments,C)}else a=c.apply(this,arguments);return(0,ae.Z)(this,a)}}var X=(function(q){(0,ce.Z)(a,q);var N=B(a);function a(){return(0,fe.Z)(this,a),N.apply(this,arguments)}return(0,D.Z)(a,[{key:"template",value:function(c){var C=c.pfx,Q=c.label;return(0,E.Z)(ee||(ee=(0,j.Z)([` 77 <div class="`,`title"> 78 <i class="`,`caret-icon"></i> 79 `,` 80 </div> 81 <div class="`,`blocks-c"></div> 82 `])),C,C,Q,C)}},{key:"attributes",value:function(){return this.model.get("attributes")}},{key:"initialize",value:function(){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.config=c;var C=c.pStylePrefix||"";this.em=c.em,this.pfx=C,this.caretR="fa fa-caret-right",this.caretD="fa fa-caret-down",this.iconClass="".concat(C,"caret-icon"),this.activeClass="".concat(C,"open"),this.className="".concat(C,"block-category"),this.events={},this.events["click .".concat(C,"title")]="toggle",this.listenTo(this.model,"change:open",this.updateVisibility),this.delegateEvents(),this.model.view=this}},{key:"updateVisibility",value:function(){this.model.get("open")?this.open():this.close()}},{key:"open",value:function(){this.$el.addClass(this.activeClass),this.getIconEl().className="".concat(this.iconClass," ").concat(this.caretD),this.getBlocksEl().style.display=""}},{key:"close",value:function(){this.$el.removeClass(this.activeClass),this.getIconEl().className="".concat(this.iconClass," ").concat(this.caretR),this.getBlocksEl().style.display="none"}},{key:"toggle",value:function(){var c=this.model;c.set("open",!c.get("open"))}},{key:"getIconEl",value:function(){return this.iconEl||(this.iconEl=this.el.querySelector("."+this.iconClass)),this.iconEl}},{key:"getBlocksEl",value:function(){return this.blocksEl||(this.blocksEl=this.el.querySelector("."+this.pfx+"blocks-c")),this.blocksEl}},{key:"append",value:function(c){this.getBlocksEl().appendChild(c)}},{key:"render",value:function(){var c=this.em,C=this.el,Q=this.$el,pe=this.model,Ce=this.pfx,Se=c.t("blockManager.categories.".concat(pe.id))||pe.get("label");return C.innerHTML=this.template({pfx:Ce,label:Se}),Q.addClass(this.className),Q.css({order:pe.get("order")}),this.updateVisibility(),this}}]),a})(P.View);function _(q,N){var a=Object.keys(q);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(q);N&&(c=c.filter((function(C){return Object.getOwnPropertyDescriptor(q,C).enumerable}))),a.push.apply(a,c)}return a}function M(q){for(var N=1;N<arguments.length;N++){var a=arguments[N]!=null?arguments[N]:{};N%2?_(Object(a),!0).forEach((function(c){(0,oe.Z)(q,c,a[c])})):Object.getOwnPropertyDescriptors?Object.defineProperties(q,Object.getOwnPropertyDescriptors(a)):_(Object(a)).forEach((function(c){Object.defineProperty(q,c,Object.getOwnPropertyDescriptor(a,c))}))}return q}function s(q){var N=(function(){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}})();return function(){var a,c=(0,se.Z)(q);if(N){var C=(0,se.Z)(this).constructor;a=Reflect.construct(c,arguments,C)}else a=c.apply(this,arguments);return(0,ae.Z)(this,a)}}var l=(function(q){(0,ce.Z)(a,q);var N=s(a);function a(){return(0,fe.Z)(this,a),N.apply(this,arguments)}return(0,D.Z)(a,[{key:"initialize",value:function(c,C){(0,W.bindAll)(this,"getSorter","onDrag","onDrop","onMove"),this.config=C||{},this.categories=c.categories||"",this.renderedCategories=[];var Q=this.config.pStylePrefix||"";this.ppfx=Q,this.noCatClass="".concat(Q,"blocks-no-cat"),this.blockContClass="".concat(Q,"blocks-c"),this.catsClass="".concat(Q,"block-categories");var pe=this.collection;this.listenTo(pe,"add",this.addTo),this.listenTo(pe,"reset",this.render),this.em=this.config.em,this.tac="test-tac",this.grabbingCls=this.ppfx+"grabbing",this.em&&(this.config.getSorter=this.getSorter,this.canvas=this.em.get("Canvas"))}},{key:"updateConfig",value:function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.config=M(M({},this.config),c)}},{key:"getSorter",value:function(){if(this.em){if(!this.sorter){var c=this.em.get("Utils"),C=this.canvas;this.sorter=new c.Sorter({container:C.getBody(),placer:C.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,onStart:this.onDrag,onEndMove:this.onDrop,onMove:this.onMove,document:C.getFrameEl().contentDocument,direction:"a",wmargin:1,nested:1,em:this.em,canvasRelative:1})}return this.sorter}}},{key:"onDrag",value:function(c){this.em.stopDefault(),this.em.trigger("block:drag:start",c)}},{key:"onMove",value:function(c){this.em.trigger("block:drag:move",c)}},{key:"onDrop",value:function(c){var C=this.em;if(C.runDefault(),c&&c.get){var Q="activeOnRender";c.get(Q)&&(c.trigger("active"),c.unset(Q)),C.trigger("block:drag:stop",c)}}},{key:"addTo",value:function(c){this.add(c)}},{key:"add",value:function(c,C){var Q=this.config,pe=C||null,Ce=new O({model:c,attributes:c.get("attributes")},Q).render().el,Se=c.get("category");if(Se&&this.categories&&!Q.ignoreCategories){(0,W.isString)(Se)?Se={id:Se,label:Se}
82:(0,W.isObject)(Se)&&!Se.id&&(Se.id=Se.label);var me=this.categories.add(Se),xe=me.get("id"),de=this.renderedCategories[xe],Ee=this.getCategoriesEl();return c.set("category",me,{silent:!0}),!de&&Ee&&(de=new X({model:me},this.config).render(),this.renderedCategories[xe]=de,Ee.appendChild(de.el)),void(de&&de.append(Ce))}pe?pe.appendChild(Ce):this.append(Ce)}},{key:"getCategoriesEl",value:function(){return this.catsEl||(this.catsEl=this.el.querySelector(".".concat(this.catsClass))),this.catsEl}},{key:"getBlocksEl",value:function(){return this.blocksEl||(this.blocksEl=this.el.querySelector(".".concat(this.noCatClass," .").concat(this.blockContClass))),this.blocksEl}},{key:"append",value:function(c){var C=this.getBlocksEl();C&&C.appendChild(c)}},{key:"render",value:function(){var c=this,C=this.ppfx,Q=document.createDocumentFragment();this.catsEl=null,this.blocksEl=null,this.renderedCategories=[],this.el.innerHTML=` 83 <div class="`.concat(this.catsClass,`"></div> 84 <div class="`).concat(this.noCatClass,`"> 85 <div class="`).concat(this.blockContClass,`"></div> 86 </div> 87 `),this.collection.each((function(Ce){return c.add(Ce,Q)})),this.append(Q);var pe="".concat(this.blockContClass,"s ").concat(C,"one-bg ").concat(C,"two-color");return this.$el.addClass(pe),this.rendered=!0,this}}]),a})(P.View);function f(q,N){var a=Object.keys(q);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(q);N&&(c=c.filter((function(C){return Object.getOwnPropertyDescriptor(q,C).enumerable}))),a.push.apply(a,c)}return a}function w(q){for(var N=1;N<arguments.length;N++){var a=arguments[N]!=null?arguments[N]:{};N%2?f(Object(a),!0).forEach((function(c){(0,oe.Z)(q,c,a[c])})):Object.getOwnPropertyDescriptors?Object.defineProperties(q,Object.getOwnPropertyDescriptors(a)):f(Object(a)).forEach((function(c){Object.defineProperty(q,c,Object.getOwnPropertyDescriptor(a,c))}))}return q}function te(q){var N=(function(){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}})();return function(){var a,c=(0,se.Z)(q);if(N){var C=(0,se.Z)(this).constructor;a=Reflect.construct(c,arguments,C)}else a=c.apply(this,arguments);return(0,ae.Z)(this,a)}}var J="block",R="".concat(J,":"),k="".concat(R,"add"),v="".concat(R,"update"),b="".concat(R,"remove"),h="".concat(b,":before"),m="".concat(R,"drag"),p="".concat(m,":start"),y="".concat(m,":stop"),Z="".concat(R,"custom"),Y=(function(q){(0,ce.Z)(a,q);var N=te(a);function a(){var c;(0,fe.Z)(this,a);for(var C=arguments.length,Q=new Array(C),pe=0;pe<C;pe++)Q[pe]=arguments[pe];return c=N.call.apply(N,[this].concat(Q)),(0,oe.Z)((0,ie.Z)(c),"name","BlockManager"),(0,oe.Z)((0,ie.Z)(c),"Block",A),(0,oe.Z)((0,ie.Z)(c),"Blocks",re),(0,oe.Z)((0,ie.Z)(c),"Category",F),(0,oe.Z)((0,ie.Z)(c),"Categories",H),(0,oe.Z)((0,ie.Z)(c),"events",{all:J,update:v,add:k,remove:b,removeBefore:h,drag:m,dragStart:p,dragEnd:y,custom:Z}),c}return(0,D.Z)(a,[{key:"init",value:function(){var c=this,C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.c=w(w({},g),C);var Q=this.c.em;return this.em=Q,this.blocks=new re(this.c.blocks),this.blocksVisible=new re(this.blocks.models),this.categories=new H,this.all=this.blocks,this.__initListen(),this.blocks.on("add",(function(pe){return c.blocksVisible.add(pe)})),this.blocks.on("remove",(function(pe){return c.blocksVisible.remove(pe)})),this.blocks.on("reset",(function(pe){return c.blocksVisible.reset(pe.models)})),this}},{key:"__trgCustom",value:function(){this.em.trigger(this.events.custom,this.__customData())}},{key:"__customData",value:function(){var c=this,C=this.__getBehaviour();return{bm:this,blocks:this.getAll().models,container:C.container,dragStart:function(Q,pe){return c.startDrag(Q,pe)},drag:function(Q){return c.__drag(Q)},dragStop:function(Q){return c.endDrag(Q)}}}},{key:"__startDrag",value:function(c,C){var Q=this.em,pe=this.events,Ce=this.blocks,Se=c.getContent?c.getContent():c;this._dragBlock=c,Q.set({dragResult:null,dragContent:Se}),[Q,Ce].map((function(me){return me.trigger(pe.dragStart,c,C)}))}}
87,{key:"__drag",value:function(c){var C=this.em,Q=this.events,pe=this.blocks,Ce=this._dragBlock;[C,pe].map((function(Se){return Se.trigger(Q.drag,Ce,c)}))}},{key:"__endDrag",value:function(){var c=this.em,C=this.events,Q=this.blocks,pe=this._dragBlock,Ce=c.get("dragResult");if(this._dragBlock=null,Ce){var Se="activeOnRender",me=Ce.get&&Ce.get(Se),xe=pe.get("activate")||me,de=pe.get("select"),Ee=(0,W.isArray)(Ce)?Ce[0]:Ce;(de||xe&&de!==!1)&&c.setSelected(Ee),xe&&(Ee.trigger("active"),me&&Ee.unset(Se)),pe.get("resetId")&&Ee.onAll((function(Fe){return Fe.resetId()}))}c.set({dragResult:null,dragContent:null}),[c,Q].map((function(Fe){return Fe.trigger(C.dragEnd,Ce,pe)}))}},{key:"__getFrameViews",value:function(){return this.em.get("Canvas").getFrames().map((function(c){return c.view}))}},{key:"__behaviour",value:function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this._bhv=w(w({},this._bhv||{}),c)}},{key:"__getBehaviour",value:function(){return this._bhv||{}}},{key:"startDrag",value:function(c,C){this.__startDrag(c,C),this.__getFrameViews().forEach((function(Q){return Q.droppable.startCustom()}))}},{key:"endDrag",value:function(c){this.__getFrameViews().forEach((function(C){return C.droppable.endCustom(c)})),this.__endDrag()}},{key:"getConfig",value:function(){return this.c}},{key:"postRender",value:function(){var c=this.categories,C=this.blocksVisible;this.blocksView=new l({collection:C,categories:c},this.c);var Q=this.getConfig().appendTo;if(Q){var pe=(0,W.isElement)(Q)?Q:document.querySelector(Q);if(!pe)return this.__logWarn('"appendTo" element not found');pe.appendChild(this.render(this.blocksVisible.models))}this.__trgCustom()}},{key:"add",value:function(c,C){var Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},pe=C||{};return pe.id=c,this.blocks.add(pe,Q)}},{key:"get",value:function(c){return this.blocks.get(c)}},{key:"getAll",value:function(){return this.blocks}},{key:"getAllVisible",value:function(){return this.blocksVisible}},{key:"remove",value:function(c){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.__remove(c,C)}},{key:"getCategories",value:function(){return this.categories}},{key:"getContainer",value:function(){return this.blocksView.el}},{key:"render",value:function(c){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Q=this.categories.categories,pe=c||this.getAll().models;if(C.external){var Ce=new re(pe);return new l({collection:Ce,categories:Q},w(w({},this.c),C)).render().el}return this.blocksView&&(this.blocksView.updateConfig(C),this.blocksView.collection.reset(pe),this.blocksView.rendered||(this.blocksView.render(),this.blocksView.rendered=1)),this.getContainer()}},{key:"destroy",value:function(){var c,C=[this.blocks,this.blocksVisible,this.categories];C.map((function(Q){return Q.stopListening()})),C.map((function(Q){return Q.reset()})),(c=this.blocksView)===null||c===void 0||c.remove(),this.c={},this.blocks={},this.blocksVisible={},this.blocksView={},this.categories=[],this.all={}}}]),a})(I.Z)},7619:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>B});var fe=S(9050);const D={stylePrefix:"cm-",inlineCss:!1};var ie=S(5671),ce=S(3144),ae=S(9340),se=S(2963),oe=S(1120),W=S(2316);function I(X){var _=(function(){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}})();return function(){var M,s=(0,oe.Z)(X);if(_){var l=(0,oe.Z)(this).constructor;M=Reflect.construct(s,arguments,l)}else M=s.apply(this,arguments);return(0,se.Z)(this,M)}}var g=(function(X){(0,ae.Z)(M,X);var _=I(M);function M(){return(0,ie.Z)(this,M),_.apply(this,arguments)}return(0,ce.Z)(M,[{key:"build",value:function(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},f={},w=l.em;if(l.cleanId&&w){var te=w.get("CssComposer").getAll(),J=te.toJSON().map((function(R){var k=R.selectors,v=k&&k.length===1&&k.models[0];return v&&v.isId()&&v.get("name")})).filter((function(R){return R}));f.attributes=function(R,k){var v=k.id;return v&&v[0]==="i"&&!R.get("script")&&!R.get("attributes").id&&J.indexOf(v)<0&&delete k.id,k}}return s.toHTML(f)}}]),M})(W.Model),P=S(8795);function x(X){var _=(function(){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}})();return function(){var M,s=(0,oe.Z)(X);if(_){var l=(0,oe.Z)(this).constructor;M=Reflect.construct(s,arguments,l)}else M=s.apply(this,arguments);return(0,se.Z)(this,M)}}var A=(function(X){(0,ae.Z)(M,X);var _=x(M);function M(){return(0,ie.Z)(this,M),_.apply(this,arguments)}return(0,ce.Z)(M,[{key:"build",value:function(s){var l=s.toJSON();return this.beforeEach(l),(0,fe.each)(l,(function(f,w){var te=l[w];if(te instanceof W.Model)l[w]=this.build(te);else if(te instanceof W.Collection){var J=te;l[w]=[],J.length&&J.each((function(R,k){l[w][k]=this.build(R)}),this)}}),this),l}},{key:"beforeEach",value:function(s){delete s.status}}]),M})(W.Model);function $(X){var _=(function(){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}})();return function(){var M,s=(0,oe.Z)(X);if(_){var l=(0,oe.Z)(this).constructor;M=Reflect.construct(s,arguments,l)}else M=s.apply(this,arguments);return(0,se.Z)(this,M)}}var re,z=(function(X){(0,ae.Z)(M,X);var _=$(M);function M(){return(0,ie.Z)(this,M),_.apply(this,arguments)}return(0,ce.Z)(M,[{key:"mapModel",value:function(s){var l="",f=s.get("script-export")||s.get("script"),w=s.get("type"),te=s.get("components"),J=s.getId();if(f){var R=s.get("attributes");R=(0,fe.extend)({},R,{id:J}),s.set("attributes",R,{silent:1});var k=s.getScriptString(f),v=s.get("script-props");if(s.get("scriptUpdated")&&!v)this.mapJs[w+"-"+J]={ids:[J],code:k};else{var b,h=this.mapJs[w];if(v&&(b=s.__getScriptProps()),h)h.ids.push(J),b&&(h.props[J]=b);else{var m={ids:[J],code:k};b&&(m.props={[J]:b}),this.mapJs[w]=m}}}return te.each((function(p){l+=this.mapModel(p)}),this),l}},{key:"build",value:function(s){this.mapJs={},this.mapModel(s);var l="";for(var f in this.mapJs){var w=this.mapJs[f];if(w.code)if(w.props){if(w.code.toString().match(/\{([\s\S]*)\}/m)[1].replace(/^\s*\/\/.*$/gm,"").trim().length===0)continue;l+=` 88 var props = `.concat(JSON.stringify(w.props),`; 89 var ids = Object.keys(props).map(function(id) { return '#'+id }).join(','); 90 var els = document.querySelectorAll(ids); 91 for (var i = 0, len = els.length; i < len; i++) { 92 var el = els[i]; 93 (`).concat(w.code,`.bind(el))(props[el.id]); 94 }`)}else{var te="#"+w.ids.join(", #");l+=` 95 var items = document.querySelectorAll('`.concat(te,`'); 96 for (var i = 0, len = items.length; i < len; i++) { 97 (function(){
98`).concat(w.code,` 99}.bind(items[i]))(); 100 }`)}}return l}}]),M})(W.Model),F=S(4942);function G(X,_){var M=Object.keys(X);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(X);_&&(s=s.filter((function(l){return Object.getOwnPropertyDescriptor(X,l).enumerable}))),M.push.apply(M,s)}return M}function H(X){var _=(function(){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}})();return function(){var M,s=(0,oe.Z)(X);if(_){var l=(0,oe.Z)(this).constructor;M=Reflect.construct(s,arguments,l)}else M=s.apply(this,arguments);return(0,se.Z)(this,M)}}(0,S(1163).hasWin)()&&(re=S(4631),S(6531),S(6629),S(9210));var ne=(function(X){(0,ae.Z)(M,X);var _=H(M);function M(){return(0,ie.Z)(this,M),_.apply(this,arguments)}return(0,ce.Z)(M,[{key:"defaults",value:function(){return{input:"",label:"",codeName:"",theme:"hopscotch",readOnly:!0,lineNumbers:!0}}},{key:"init",value:function(s){return(0,fe.bindAll)(this,"onChange"),this.editor=re.fromTextArea(s,(function(l){for(var f=1;f<arguments.length;f++){var w=arguments[f]!=null?arguments[f]:{};f%2?G(Object(w),!0).forEach((function(te){(0,F.Z)(l,te,w[te])})):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(w)):G(Object(w)).forEach((function(te){Object.defineProperty(l,te,Object.getOwnPropertyDescriptor(w,te))}))}return l})({dragDrop:!1,lineWrapping:!0,mode:this.get("codeName")},this.attributes)),this.element=s,this.editor.on("change",this.onChange),this}},{key:"onChange",value:function(){this.trigger("update",this)}},{key:"getEditor",value:function(){return this.editor}},{key:"getElement",value:function(){return this.element}},{key:"setElement",value:function(s){return this.element=s,this}},{key:"refresh",value:function(){return this.getEditor().refresh(),this}},{key:"focus",value:function(){return this.getEditor().focus(),this}},{key:"getContent",value:function(){var s=this.getEditor();return s&&s.getValue()}},{key:"setContent",value:function(s){var l=this,f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=this.editor;w&&(w.setValue(s),w.autoFormatRange&&(re.commands.selectAll(w),w.autoFormatRange(w.getCursor(!0),w.getCursor(!1)),re.commands.goDocStart(w)),!f.noRefresh&&setTimeout((function(){return l.refresh()})))}}]),M})(W.Model);ne.prototype.CodeMirror=re;var ye,ee=S(168),O=S(7539);function j(X){var _=(function(){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}})();return function(){var M,s=(0,oe.Z)(X);if(_){var l=(0,oe.Z)(this).constructor;M=Reflect.construct(s,arguments,l)}else M=s.apply(this,arguments);return(0,se.Z)(this,M)}}var E=(function(X){(0,ae.Z)(M,X);var _=j(M);function M(){return(0,ie.Z)(this,M),_.apply(this,arguments)}return(0,ce.Z)(M,[{key:"template",value:function(s){var l=s.pfx,f=s.codeName,w=s.label;return(0,O.Z)(ye||(ye=(0,ee.Z)([` 101 <div class="`,'editor" id="',"",`"> 102 <div id="`,'title">',`</div> 103 <div id="`,`code"></div> 104 </div> 105 `])),l,l,f,l,w,l)}},{key:"initialize",value:function(s){this.config=s.config||{},this.pfx=this.config.stylePrefix}},{key:"render",value:function(){var s=this.model,l=this.pfx,f=this.$el,w=s.toJSON();return w.pfx=l,f.html(this.template(w)),f.attr("class","".concat(l,"editor-c")),f.find("#".concat(l,"code")).append(s.get("input")),this}}]),M})(W.View);const B=function(){var X={},_={},M={},s={},l={},f="CodeMirror";return{getConfig:function(){return X},config:X,EditorView:E,name:"CodeManager",init:function(w){for(var te in X=w||{},D)te in X||(X[te]=D[te]);var J=X.pStylePrefix;return J&&(X.stylePrefix=J+X.stylePrefix),M.html=new g,M.css=new P.Z,M.json=new A,M.js=new z,l.CodeMirror=new ne,this.loadDefaultGenerators().loadDefaultViewers(),this},addGenerator:function(w,te){return _[w]=te,this},getGenerator:function(w){return _[w]||null},getGenerators:function(){return _},addViewer:function(w,te){return s[w]=te,this},getViewer:function(w){return s[w]||null},getViewers:function(){return s},createViewer:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}
105,te=(0,fe.isUndefined)(w.type)?f:w.type,J=this.getViewer(te)&&this.getViewer(te).clone(),R=document.createElement("div"),k=document.createElement("textarea");return R.appendChild(k),J.set(w),J.init(k),J.setElement(R),J},updateViewer:function(w,te){w.setContent(te)},getCode:function(w,te){var J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};J.em=X.em;var R=this.getGenerator(te);return R?R.build(w,J):""},loadDefaultGenerators:function(){for(var w in M)this.addGenerator(w,M[w]);return this},loadDefaultViewers:function(){for(var w in l)this.addViewer(w,l[w]);return this},destroy:function(){[X,_,M,s,l].forEach((function(w){return{}}))}}}},8795:(We,ke,S)=>{"use strict";S.d(ke,{U:()=>P,Z:()=>x});var fe=S(5671),D=S(3144),ie=S(9340),ce=S(2963),ae=S(1120),se=S(9050),oe=S(2316),W=S(1163);function I(A){var $=(function(){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}})();return function(){var re,z=(0,ae.Z)(A);if($){var F=(0,ae.Z)(this).constructor;re=Reflect.construct(z,arguments,F)}else re=z.apply(this,arguments);return(0,ce.Z)(this,re)}}var g=Number.MAX_VALUE,P=function(A){var $=/(-?\d*\.?\d+)\w{0,}/.exec(A);return $?$[0]:""},x=(function(A){(0,ie.Z)(re,A);var $=I(re);function re(){return(0,fe.Z)(this,re),$.apply(this,arguments)}return(0,D.Z)(re,[{key:"initialize",value:function(){(0,se.bindAll)(this,"sortRules"),this.compCls=[],this.ids=[]}},{key:"buildFromModel",value:function(z){var F=this,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H="",ne=this.em,ye=ne&&ne.getConfig().avoidInlineStyle,ee=z.styleToString(),O=z.get("classes");this.ids.push("#".concat(z.getId())),O.each((function(E){return F.compCls.push(E.getFullName())})),!ye&&ee&&(H="#".concat(z.getId(),"{").concat(ee,"}"));var j=z.components();return j.each((function(E){return H+=F.buildFromModel(E,G)})),H}},{key:"build",value:function(z){var F=this,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=G.json,ne=G.em||"",ye=G.cssc||ne&&ne.get("CssComposer");this.em=ne,this.compCls=[],this.ids=[],this.model=z;var ee=[],O=z?this.buildFromModel(z,G):"",j=(0,se.isUndefined)(G.clearStyles)&&ne?ne.getConfig().clearStyles:G.clearStyles;if(ye){var E=G.rules||ye.getAll(),B={},X=[];G.onlyMatched&&z&&(0,W.hasWin)()&&(E=this.matchedRules(z,E)),E.forEac
105h((function(_){var M=_.getAtRule();if(M){var s=B[M];s?s.push(_):B[M]=[_]}else{var l=F.buildFromRule(_,X,G);H?ee.push(l):O+=l}})),this.sortMediaObject(B).forEach((function(_){var M="",s=_.key;_.value.forEach((function(l){var f=F.buildFromRule(l,X,G);l.get("singleAtRule")?O+="".concat(s,"{").concat(f,"}"):M+=f,H&&ee.push(f)})),M&&(O+="".concat(s,"{").concat(M,"}"))})),ne&&j&&E.remove&&E.remove(X)}return H?ee.filter((function(_){return _})):O}},{key:"buildFromRule",value:function(z,F){var G,H=this,ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ye="",ee=this.model,O=z.selectorsToString({skipAdd:1}),j=z.get("selectorsAdd"),E=z.get("singleAtRule");if(z.get("selectors").each((function(X){var _=X.getFullName();(H.compCls.indexOf(_)>=0||H.ids.indexOf(_)>=0||ne.keepUnusedStyles)&&(G=1)})),O&&G||j||E||!ee){var B=z.getDeclaration({body:1});B&&(ne.json?ye=z:ye+=B)}else F.push(z);return ye}},{key:"matchedRules",value:function(z,F){var G=this,H=z.getEl(),ne=[];return F.forEach((function(ye){try{ye.selectorsToString().split(",").some((function(ee){return H.matches(G.__cleanSelector(ee))}
105))&&ne.push(ye)}catch{}})),z.components().forEach((function(ye){ne=ne.concat(G.matchedRules(ye,F))})),ne=ne.filter((function(ye,ee){return ne.indexOf(ye)===ee}))}},{key:"getQueryLength",value:function(z){var F=/(-?\d*\.?\d+)\w{0,}/.exec(z);return F?parseFloat(F[1]):g}},{key:"sortMediaObject",value:function(){var z=this,F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},G=[];return(0,se.each)(F,(function(H,ne){return G.push({key:ne,value:H})})),G.sort((function(H,ne){var ye=[H.key,ne.key].every((function(j){return j.indexOf("min-width")!==-1})),ee=ye?H.key:ne.key,O=ye?ne.key:H.key;return z.getQueryLength(ee)-z.getQueryLength(O)}))}},{key:"sortRules",value:function(z,F){var G=function(ee){return ee.get("mediaText")},H=[G(z),G(F)].every((function(ee){return ee.indexOf("min-width")!==-1})),ne=G(H?z:F),ye=G(H?F:z);return this.getQueryLength(ne)-this.getQueryLength(ye)}},{key:"__cleanSelector",value:function(z){return z.split(" ").map((function(F){return F.split(":")[0]})).join(" ")}}]),re})(oe.Model)},289:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>g});var fe=S(2982),D=S(4942),ie=S(9050),ce=S(238);const ae={stylePrefix:"com-",defaults:[],strict:1};var se=S(7375);function oe(P,x){var A=Object.keys(P);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(P);x&&($=$.filter((function(re){return Object.getOwnPropertyDescriptor(P,re).enumerable}))),A.push.apply(A,$)}return A}function W(P){for(var x=1;x<arguments.length;x++){var A=arguments[x]!=null?arguments[x]:{};x%2?oe(Object(A),!0).forEach((function($){(0,D.Z)(P,$,A[$])})):Object.getOwnPropertyDescriptors?Object.defineProperties(P,Object.getOwnPropertyDescriptors(A)):oe(Object(A)).forEach((function($){Object.defineProperty(P,$,Object.getOwnPropertyDescriptor(A,$))}))}return P}var I=[["preview","Preview","preview"],["resize","Resize","resize"],["fullscreen","Fullscreen","fullscreen"],["copy","CopyComponent"],["paste","PasteComponent"],["canvas-move","CanvasMove"],["canvas-clear","CanvasClear"],["open-code","ExportTemplate","export-template"],["open-layers","OpenLayers","open-layers"],["open-styles","OpenStyleManager","open-sm"],["open-traits","OpenTraitManager","open-tm"],["open-blocks","OpenBlocks","open-blocks"],["open-assets","OpenAssets","open-assets"],["component-select","SelectComponent","select-comp"],["component-outline","SwitchVisibility","sw-visibility"],["component-offset","ShowOffset","show-offset"],["component-move","MoveComponent","move-comp"],["component-next","ComponentNext"],["component-prev","ComponentPrev"],["component-enter","ComponentEnter"],["component-exit","ComponentExit","select-parent"],["component-delete","ComponentDelete"],["component-style-clear","ComponentStyleClear"],["component-drag","ComponentDrag"]];const g=function(){var P,x={},A={},$={},re={};return{CommandAbstract:ce.default,name:"Commands",init:function(){var z=this,F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};x=W(W({},ae),F),P=x.em;var G=x.pStylePrefix;return G&&(x.stylePrefix=G+x.stylePrefix),Object.keys(x.defaults).forEach((function(H){var ne=x.defaults[H];ne.id&&z.add(ne.id,ne)})),$["tlb-delete"]={run:function(H){return H.runCommand("core:component-delete")}},$["tlb-clone"]={run:function(H){H.runCommand("core:copy"),H.runCommand("core:paste",{action:"clone-component"})}},$["tlb-move"]={run:function(H,ne){var ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ee=H.getModel(),O=ye&&ye.event,j=ye.target,E=j||H.getSelected(),B=j?[j]:(0,fe.Z)(H.getSelectedAll()),X=O&&O.type=="dragstart",_={preserveSelected:1},M=["absolute","translate"];if(!E||!E.get("draggable"))return ee.logWarning("The element is not draggable");var s=E.get("dmode")||ee.get("dmode"),l=function(){return ee.stopDefault(_)},f=(0,ie.includes)(M,s);B.forEach((function(k){return k.trigger("disable")})),X?setTimeout(l,0):l();var w=function(k){ee.trigger("".concat(se.OA,":start"),k)},te=function(k){ee.trigger(se.OA,k)},J=function(k,v,b){B.forEach((function(h){return h.set("status","selected")})),H.select(B),E.emitUpdate(),ee.trigger("".concat(se.OA,":end"),b),setTimeout((function(){return ee.runDefault(_)})),(f||b.cancelled)&&ee.set("_cmpDrag",1)};if(f)H.runCommand("core:component-drag",{guidesInfo:1,mode:s,target:E,onStart:w,onDrag:te,onEnd:J,event:O});
105else{X&&O.dataTransfer.setDragImage(E.view.el,0,0);var R=H.Commands.get("move-comp");R.onStart=w,R.onDrag=te,R.onEndMoveFromModel=J,R.initSorterFromModels(B)}B.forEach((function(k){return k.set("status","freezed-selected")}))}},$["core:undo"]=function(H){return H.UndoManager.undo()},$["core:redo"]=function(H){return H.UndoManager.redo()},I.forEach((function(H){var ne=H[2],ye=S(2828)("./".concat(H[1])).default,ee="core:".concat(H[0]);$[ee]=ye,ne&&($[ne]=ye,["run","stop"].forEach((function(O){P.on("".concat(O,":").concat(ne),(function(){for(var j,E=arguments.length,B=new Array(E),X=0;X<E;X++)B[X]=arguments[X];return(j=P).trigger.apply(j,["".concat(O,":").concat(ee)].concat(B))}))})))})),x.em&&(x.model=x.em.get("Canvas")),this.loadDefaultCommands(),this},add:function(z,F){return(0,ie.isFunction)(F)&&(F={run:F}),F.stop||(F.noStop=1),delete F.initialize,F.id=z,A[z]=ce.default.extend(F),this},get:function(z){var F=A[z];return(0,ie.isFunction)(F)?(F=new F(x),A[z]=F):F||P.logWarning("'".concat(z,"' command not found")),F},extend:function(z){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},G=this.get(z);if(G){var H=W(W({},G.constructor.prototype),F);this.add(z,H);var ne=I.filter((function(ye){return"core:".concat(ye[0])===z&&ye[2]}))[0];ne&&this.add(ne[2],H)}return this},has:function(z){return!!A[z]},getAll:function(){return A},run:function(z){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.runCommand(this.get(z),F)},stop:function(z){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.stopCommand(this.get(z),F)},isActive:function(z){return this.getActive().hasOwnProperty(z)},getActive:function(){return re},loadDefaultCommands:function(){for(var z in $)this.add(z,$[z]);return this},runCommand:function(z){var F,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(z&&z.run){var H=z.id,ne=P.get("Editor");this.isActive(H)&&!G.force&&x.strict||(F=ne&&z.callRun(ne,G),H&&z.stop&&!z.noStop&&!G.abort&&(re[H]=F))}return F},stopCommand:function(z){var F,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(z&&z.run){var H=z.id,ne=P.get("Editor");(this.isActive(H)||G.force||!x.strict)&&(H&&delete re[H],F=z.callStop(ne,G))}return F},create:function(z){return z.stop||(z.noStop=1),new(ce.default.extend(z))(x)},destroy:function(){[P,x,A,$,re].forEach((function(z){return{}}))}}}},7202:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>fe});const fe={run:function(D){D.DomComponents.clear(),D.CssComposer.clear()}}},327:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>ce});var fe=S(9050),D=S(1163),ie=S(5610);const ce={run:function(ae){(0,fe.bindAll)(this,"onKeyUp","enableDragger","disableDragger"),this.editor=ae,this.canvasModel=this.canvas.getCanvasView().model,this.toggleMove(1)},stop:function(ae){this.toggleMove(),this.disableDragger()},onKeyUp:function(ae){(0,D.getKeyChar)(ae)===" "&&this.editor.stopCommand(this.id)},enableDragger:function(ae){this.toggleDragger(1,ae)},disableDragger:function(ae){this.toggleDragger(0,ae)},toggleDragger:function(ae,se){var oe=this.canvasModel,W=this.em,I=this.dragger,g=ae?"add":"remove";this.getCanvas().classList[g]("".concat(this.ppfx,"is__grabbing")),I||(I=new ie.Z({getPosition:function(){return{x:oe.get("x"),y:oe.get("y")}},setPosition:function(P){var x=P.x,A=P.y;oe.set({x,y:A})},onStart:function(P,x){W.trigger("canvas:move:start",x)},onDrag:function(P,x){W.trigger("canvas:move",x)},onEnd:function(P,x){W.trigger("canvas:move:end",x)}}),this.dragger=I),ae?I.start(se):I.stop()},toggleMove:function(ae){var se=this.ppfx,oe=ae?"add":"remove",W=ae?"on":"off",I={on:D.on,off:D.off},g=this.getCanvas(),P=["".concat(se,"is__grab")];!ae&&P.push("".concat(se,"is__grabbing")),P.forEach((function(x){return g.classList[oe](x)})),I[W](document,"keyup",this.onKeyUp),I[W](g,"mousedown",this.enableDragger),I[W](document,"mouseup",this.disableDragger)}}},238:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>W});var fe=S(5671),D=S(3144),ie=S(9340),ce=S(2963),ae=S(1120),se=S(2316);function oe(I){var g=(function(){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}})();return function(){var P,x=(0,ae.Z)(I);if(g){var A=(0,ae.Z)(this).constructor;P=Reflect.construct(x,arguments,A)}else P=x.apply(this,arguments);return(0,ce.Z)(this,P)}}var W=(function(I){(0,ie.Z)(P,I);var g=oe(P);function P(){return(0,fe.Z)(this,P),g.apply(this,arguments)}
105return(0,D.Z)(P,[{key:"initialize",value:function(x){this.config=x||{},this.editorModel=this.em=this.config.em||{},this.pfx=this.config.stylePrefix,this.ppfx=this.config.pStylePrefix,this.hoverClass=this.pfx+"hover",this.badgeClass=this.pfx+"badge",this.plhClass=this.pfx+"placeholder",this.freezClass=this.ppfx+"freezed",this.canvas=this.em.get&&this.em.get("Canvas"),this.init(this.config)}},{key:"onFrameScroll",value:function(x){}},{key:"getCanvas",value:function(){return this.canvas.getElement()}},{key:"getCanvasBody",value:function(){return this.canvas.getBody()}},{key:"getCanvasTools",value:function(){return this.canvas.getToolsEl()}},{key:"offset",value:function(x){var A=x.getBoundingClientRect();return{top:A.top+x.ownerDocument.body.scrollTop,left:A.left+x.ownerDocument.body.scrollLeft}}},{key:"init",value:function(x){}},{key:"callRun",value:function(x){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=this.id;if(x.trigger("run:".concat($,":before"),A),!A||!A.abort){var re=A.sender||x,z=this.run(x,re,A);return x.trigger("run:".concat($),z,A),x.trigger("run",$,z,A),z}x.trigger("abort:".concat($),A)}},{key:"callStop",value:function(x){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=this.id,re=A.sender||x;x.trigger("stop:".concat($,":before"),A);var z=this.stop(x,re,A);return x.trigger("stop:".concat($),z,A),x.trigger("stop",$,z,A),z}},{key:"stopCommand",value:function(){this.em.get("Commands").stop(this.id)}},{key:"run",value:function(x,A){}},{key:"stop",value:function(x,A){}}]),P})(se.Model)},5820:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>ie});var fe=S(2982),D=S(9050);const ie={run:function(ce,ae){var se=this,oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},W=[],I=oe.component||ce.getSelectedAll();return(I=(0,D.isArray)(I)?(0,fe.Z)(I):[I]).filter(Boolean).forEach((function(g){if(!g.get("removable"))return W.push(g),se.em.logWarning("The element is not removable",{component:g});g.remove()})),ce.select(W),I}}},6694:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>oe});var fe=S(4942),D=S(9050),ie=S(5610);function ce(W,I){var g=Object.keys(W);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(W);I&&(P=P.filter((function(x){return Object.getOwnPropertyDescriptor(W,x).enumerable}))),g.push.apply(g,P)}return g}function ae(W){for(var I=1;I<arguments.length;I++){var g=arguments[I]!=null?arguments[I]:{};I%2?ce(Object(g),!0).forEach((function(P){(0,fe.Z)(W,P,g[P])})):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(g)):ce(Object(g)).forEach((function(P){Object.defineProperty(W,P,Object.getOwnPropertyDescriptor(g,P))}))}return W}var se="dmode";const oe={run:function(W,I){var g=this,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};(0,D.bindAll)(this,"setPosition","onStart","onDrag","onEnd","getPosition","getGuidesStatic","renderGuide","getGuidesTarget");var x=P.target,A=P.event,$=P.mode,re=P.dragger,z=re===void 0?{}:re,F=x.getEl(),G=ae({doc:F.ownerDocument,onStart:this.onStart,onEnd:this.onEnd,onDrag:this.onDrag,getPosition:this.getPosition,setPosition:this.setPosition,guidesStatic:function(){return g.guidesStatic},guidesTarget:function(){return g.guidesTarget}},z);this.setupGuides(),this.opts=P,this.editor=W,this.em=W.getModel(),this.target=x,this.isTran=$=="translate",this.guidesContainer=this.getGuidesContainer(),this.guidesTarget=this.getGuidesTarget(),this.guidesStatic=this.getGuidesStatic();var H=this.dragger;return H?H.setOptions(G):(H=new ie.Z(G),this.dragger=H),A&&H.start(A),this.toggleDrag(1),this.em.trigger("".concat(se,":start"),this.getEventOpts()),H},getEventOpts:function(){return{mode:this.opts.mode,target:this.target,guidesTarget:this.guidesTarget,guidesStatic:this.guidesStatic}},stop:function(){this.toggleDrag()},setupGuides:function(){(this.guides||[]).forEach((function(W){var I=W.guide;I&&I.parentNode.removeChild(I)})),this.guides=[]},getGuidesContainer:function(){var W=this,I=this.guidesEl;if(!I){var g=this.editor,P=this.em,x=this.opts,A=g.getConfig().stylePrefix,$=document.createElement("div"),re=document.createElement("div"),z='<div class="'.concat(A,"guide-info__line ").concat(A,`danger-bg"> 106 <div class="`).concat(A,"guide-info__content ").concat(A,`danger-color"></div> 107 </div>`);(I=document.createElement("div")).className="".concat(A,"guides"),$.className="".concat(A,"guide-info ").concat(A,"guide-info__x"),re.className="".concat(A,"guide-info ").concat(A,"guide-info__y"),$.innerHTML=z,re.innerHTML=z,I.appendChild($),I.appendChild(re),g.Canvas.getGlobalToolsEl().appendChild(I),this.guidesEl=I,this.elGuideInfoX=$,this.elGuideInfoY=re,this.elGuideInfoContentX=$.querySelector(".".concat(A,"guide-info__content")),this.elGuideInfoContentY=re.querySelector(".".concat(A,"guide-info__content")),P.on("canvas:update frame:scroll",(0,D.debounce)((function(){W.updateGuides(),x.debug&&W.guides.forEac
107h((function(F){return W.renderGuide(F)}))}),200))}return I},getGuidesStatic:function(){var W=this,I=[],g=this.target.getEl(),P=g.parentNode,x=P===void 0?{}:P;return(0,D.each)(x.children,(function(A){return I=I.concat(g!==A?W.getElementGuides(A):[])})),I.concat(this.getElementGuides(x))},getGuidesTarget:function(){return this.getElementGuides(this.target.getEl())},updateGuides:function(W){var I,g,P=this;(W||this.guides).forEach((function(x){var A=x.origin,$=I===A?g:P.getElementPos(A);I=A,g=$,(0,D.each)(P.getGuidePosUpdate(x,$),(function(re,z){return x[z]=re})),x.originRect=$}))},getGuidePosUpdate:function(W,I){var g={},P=I.top,x=I.height,A=I.left,$=I.width;switch(W.type){case"t":g.y=P;break;case"b":g.y=P+x;break;case"l":g.x=A;break;case"r":g.x=A+$;break;case"x":g.x=A+$/2;break;case"y":g.y=P+x/2}return g},renderGuide:function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=W.guide||document.createElement("div"),g="px",P=W.active?2:1,x=I.children[0];return I.style="position: absolute; background-color: ".concat(W.active?"green":"red",";"),I.children.length||((x=document.createElement("div")).style="position: absolute; color: red; padding: 5px; top: 0; left: 0;",I.appendChild(x)),W.y?(I.style.width="100%",I.style.height="".concat(P).concat(g),I.style.top="".concat(W.y).concat(g),I.style.left=0):(I.style.width="".concat(P).concat(g),I.style.height="100%",I.style.left="".concat(W.x).concat(g),I.style.top="0".concat(g)),!W.guide&&this.guidesContainer.appendChild(I),I},getElementPos:function(W){return this.editor.Canvas.getElementPos(W,{noScroll:1})},getElementGuides:function(W){var I=this,g=this.opts,P=this.getElementPos(W),x=P.top,A=P.height,$=P.left,re=P.width,z=[{type:"t",y:x},{type:"b",y:x+A},{type:"l",x:$},{type:"r",x:$+re},{type:"x",x:$+re/2},{type:"y",y:x+A/2}].map((function(F){return ae(ae({},F),{},{origin:W,originRect:P,guide:g.debug&&I.renderGuide(F)})}));return z.forEach((function(F){return I.guides.push(F)})),z},getTranslate:function(W){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x",g=0;return(W||"").split(" ").forEach((function(P){var x=P.trim(),A="translate".concat(I.toUpperCase(),"(");x.indexOf(A)===0&&(g=parseFloat(x.replace(A,"")))})),g},setTranslate:function(W,I,g){var P="translate".concat(I.toUpperCase(),"("),x="".concat(P).concat(g,")"),A=(W||"").split(" ").map((function($){return $.trim().indexOf(P)===0&&($=x),$})).join(" ");return A.indexOf(P)<0&&(A+=" ".concat(x)),A},getPosition:function(){var W=this.target,I=this.isTran,g=W.getStyle(),P=g.left,x=g.top,A=g.transform,$=0,re=0;return I?($=this.getTranslate(A),re=this.getTranslate(A,"y")):($=parseFloat(P||0),re=parseFloat(x||0)),{x:$,y:re}},setPosition:function(W){var I=W.x,g=W.y,P=W.end,x=W.position,A=W.width,$=W.height,re=this.target,z=this.isTran,F=this.em,G="px",H=P?"":1,ne="".concat(I).concat(G),ye="".concat(g).concat(G),ee={};if(z){var O=re.getStyle().transform||"";O=this.setTranslate(O,"x",ne),ee={transform:O=this.setTranslate(O,"y",ye),en:H},re.addStyle(ee,{avoidStore:!P})}else{var j={position:x,width:A,height:$},E={left:ne,top:ye,en:H};(0,D.keys)(j).forEach((function(B){var X=j[B];X&&(E[B]=X)})),ee=E,re.addStyle(ee,{avoidStore:!P})}F.getSelected()&&(0,D.keys)(ee).forEach((function(B){return F.trigger("update:component:style:".concat(B))}))},_getDragData:function(){var W=this.target;return{target:W,parent:W.parent(),index:W.index()}},onStart:function(W){var I=this.target,g=this.editor,P=this.isTran,x=this.opts,A=x.center,$=x.onStart,re=g.Canvas,z=I.getStyle(),F="absolute",G=[F,"relative"];if($&&$(this._getDragData()),!P&&z.position!==F){var H,ne=re.offset(I.getEl()),ye=ne.left,ee=ne.top,O=ne.width,j=ne.height,E=I.parent();do{var B=E.getStyle();H=G.indexOf(B.position)>=0?E:null,E=E.parent()}while(E&&!H);if(A){var X=re.getMouseRelativeCanvas(W);ye=X.x,ee=X.y}else if(H){var _=re.offset(H.getEl());ye-=_.left,ee-=_.top}this.setPosition({x:ye,y:ee,width:"".concat(O,"px"),height:"".concat(j,"px"),position:F})}},onDrag:function(){var W=this,I=this.guidesTarget,g=this.opts,P=g.onDrag;this.updateGuides(I),g.debug&&I.forEach((function(x){return W.renderGuide(x)})),g.guidesInfo&&this.renderGuideInfo(I.filter((function(x){return x.active}))),P&&P(this._getDragData())},onEnd:function(W,I){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},P=this.editor,x=this.opts,A=this.id,$=x.onEnd;$&&$(W,g,ae(ae({event:W},g),this._getDragData())),P.stopCommand(A),this.hideGuidesInfo(),this.em.trigger("".concat(se,":end"),this.getEventOpts())},hideGuidesInfo:function(){var W=this;
107["X","Y"].forEach((function(I){var g=W["elGuideInfo".concat(I)];g&&(g.style.display="none")}))},renderGuideInfo:function(){var W=this,I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],g=this.guidesStatic;this.hideGuidesInfo(),I.forEach((function(P){var x=P.origin,A=P.x,$=W.getElementPos(x),re=(0,D.isUndefined)(A)?"y":"x",z=re==="y",F=$[z?"left":"top"],G=$.rect[z?"left":"top"],H=z?F+$.width:F+$.height,ne=z?G+$.rect.width:G+$.rect.height,ye=W["elGuideInfo".concat(re.toUpperCase())],ee=W["elGuideInfoContent".concat(re.toUpperCase())],O=ye.style,j=g.filter((function(m){return m.type===P.type})).map((function(m){var p=m.originRect,y=p.left,Z=p.width,Y=p.top,q=p.height,N=z?y+Z:Y+q;return{gap:N<F?F-N:(z?y:Y)-H,guide:m}})).filter((function(m){return m.gap>0})).sort((function(m,p){return m.gap-p.gap})).map((function(m){return m.guide}))[0];if(j){var E=j.originRect,B=E.left,X=E.width,_=E.top,M=E.height,s=E.rect,l=z?B<$.left:_<$.top,f=z?B:_,w=z?s.left:s.top,te=z?B+X:_+M,J=z?s.left+s.width:s.top+s.height,R=z?P.y:P.x,k=l?te:H,v="".concat(R,"px"),b=l?F-te:f-H,h=l?G-J:w-ne;O.display="",O[z?"top":"left"]=v,O[z?"left":"top"]="".concat(k,"px"),O[z?"width":"height"]="".concat(b,"px"),ee.innerHTML="".concat(Math.round(h),"px"),W.em.trigger("".concat(se,":active"),ae(ae({},W.getEventOpts()),{},{guide:P,guidesStatic:g,matched:j,posFirst:R,posSecond:k,size:b,sizeRaw:h,elGuideInfo:ye,elGuideInfoCnt:ee}))}}))},toggleDrag:function(W){var I=this.ppfx,g=this.editor,P=W?"add":"remove",x=["".concat(I,"is__grabbing")],A=g.Canvas,$=A.getBody();x.forEach((function(re){return $.classList[P](re)})),A[W?"startAutoscroll":"stopAutoscroll"]()}}},1947:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>fe});const fe={run:function(D){if(D.Canvas.hasFocus()){var ie=[];D.getSelectedAll().forEach((function(ce){var ae=ce.components(),se=ae&&ae.filter((function(oe){return oe.get("selectable")}))[0];se&&ie.push(se)})),ie.length&&D.select(ie)}}}},3888:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>fe});const fe={run:function(D,ie){var ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(D.Canvas.hasFocus()||ce.force){var ae=[];D.getSelectedAll().forEach((function(se){for(var oe=se.parent();oe&&!oe.get("selectable");)oe=oe.parent();oe&&ae.push(oe)})),ae.length&&D.select(ae)}}}},5883:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>fe});const fe={run:function(D){if(D.Canvas.hasFocus()){var ie=[];D.getSelectedAll().forEach((function(ce){var ae=ce.parent();if(ae){var se,oe=ae.components().length,W=0,I=0;do W++,se=(I=ce.index()+W)<=oe?ae.getChildAt(I):null;while(se&&!se.get("selectable"));ie.push(se||ce)}})),ie.length&&D.select(ie)}}}},7508:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>fe});const fe={run:function(D){if(D.Canvas.hasFocus()){var ie=[];D.getSelectedAll().forEach((function(ce){var ae=ce.parent();if(ae){var se,oe=0,W=0;do oe++,se=(W=ce.index()-oe)>=0?ae.getChildAt(W):null;while(se&&!se.get("selectable"));ie.push(se||ce)}})),ie.length&&D.select(ie)}}}},8769:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>D});var fe=S(9050);const D={run:function(ie,ce){var ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},se=ae.target,oe=[];if(!se.get("styles"))return oe;var W=se.get("type"),I=ie.Pages.getAllWrappers(),g=(0,fe.flatten)(I.map((function(x){return x.findType(W)}))).length;if(!g){var P=ie.CssComposer.getAll();oe=P.filter((function(x){return x.get("group")==="cmp:".concat(W)})),P.remove(oe)}return oe}}},2213:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>D});var fe=S(2982);const D={run:function(ie){var ce=ie.getModel(),ae=(0,fe.Z)(ie.getSelectedAll());ae.length&&ce.set("clipboard",ae)}}},5049:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>se});var fe=S(9050),D=S(2316),ie=S.n(D),ce=S(2620),ae=ie().$;const se=(0,fe.extend)({},ce.default,{init:function(oe){(0,fe.bindAll)(this,"startDelete","stopDelete","onDelete"),this.hoverClass=this.pfx+"hover-delete",this.badgeClass=this.pfx+"badge-red"},enable:function(){this.$el.find("*").mouseover(this.startDelete).mouseout(this.stopDelete).click(this.onDelete)},startDelete:function(oe){oe.stopPropagation();var W=ae(oe.target);W.data("model").get("removable")&&(W.addClass(this.hoverClass),this.attachBadge(W.get(0)))},stopDelete:function(oe){oe.stopPropagation(),ae(oe.target).removeClass(this.hoverClass),this.badge&&this.badge.css({left:-1e3,top:-1e3})},onDelete:function(oe){oe.stopPropagation();var W=ae(oe.target);W.data("model").get("removable")&&(W.data("model").destroy(),this.removeBadge(),this.clean())},updateBadgeLabel:function(oe){this.badge.html("Remove "+oe.getName())}})},3775:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>ie});var fe=S(2316),D=S.n(fe)().$;const ie={run:function(ce,ae){var se=this;ae&&ae.set&&ae.set("active",0);var oe=ce.getConfig(),W=ce.Modal,I=oe.stylePrefix;if(this.cm=ce.CodeManager||null,!this.$editors){var g=this.buildEditor("htmlmi
107xed","hopscotch","HTML"),P=this.buildEditor("css","hopscotch","CSS");this.htmlEditor=g.el,this.cssEditor=P.el;var x=D('<div class="'.concat(I,'export-dl"></div>'));x.append(g.$el).append(P.$el),this.$editors=x}W.open({title:oe.textViewCode,content:this.$editors}).getModel().once("change:open",(function(){return ce.stopCommand(se.id)})),this.htmlEditor.setContent(ce.getHtml()),this.cssEditor.setContent(ce.getCss())},stop:function(ce){var ae=ce.Modal;ae&&ae.close()},buildEditor:function(ce,ae,se){var oe=document.createElement("textarea");!this.codeMirror&&(this.codeMirror=this.cm.getViewer("CodeMirror"));var W=this.codeMirror.clone().set({label:se,codeName:ce,theme:ae,input:oe}),I=new this.cm.EditorView({model:W,config:this.cm.getConfig()}).render().$el;return W.init(oe),{el:W,$el:I}}}},58:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>D});var fe=S(9050);const D={isEnabled:function(){var ie=document;return ie.fullscreenElement||ie.webkitFullscreenElement||ie.mozFullScreenElement?1:0},enable:function(ie){var ce="";return ie.requestFullscreen?ie.requestFullscreen():ie.webkitRequestFullscreen?(ce="webkit",ie.webkitRequestFullscreen()):ie.mozRequestFullScreen?(ce="moz",ie.mozRequestFullScreen()):ie.msRequestFullscreen?ie.msRequestFullscreen():console.warn("Fullscreen not supported"),ce},disable:function(){var ie=document;this.isEnabled()&&(ie.exitFullscreen?ie.exitFullscreen():ie.webkitExitFullscreen?ie.webkitExitFullscreen():ie.mozCancelFullScreen?ie.mozCancelFullScreen():ie.msExitFullscreen&&ie.msExitFullscreen())},fsChanged:function(ie,ce){var ae=(ie||"")+"fullscreenchange";this.isEnabled()||(this.stop(null,this.sender),document.removeEventListener(ae,this.fsChanged))},run:function(ie,ce){var ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.sender=ce;var se=ae.target,oe=(0,fe.isElement)(se)?se:document.querySelector(se),W=this.enable(oe||ie.getContainer());this.fsChanged=this.fsChanged.bind(this,W),document.addEventListener(W+"fullscreenchange",this.fsChanged),ie.trigger("change:canvasOffset")},stop:function(ie,ce){ce&&ce.set&&ce.set("active",!1),this.disable(),ie&&ie.trigger("change:canvasOffset")}}},8658:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>W});var fe=S(9050),D=S(2316),ie=S.n(D),ce=S(1163),ae=S(2620),se=S(8463),oe=ie().$;const W=(0,fe.extend)({},se.default,ae.default,{init:function(I){ae.default.init.apply(this,arguments),(0,fe.bindAll)(this,"initSorter","rollback","onEndMove"),this.opt=I,this.hoverClass=this.ppfx+"highlighter-warning",this.badgeClass=this.ppfx+"badge-warning",this.noSelClass=this.ppfx+"no-select"},enable:function(){for(var I=arguments.length,g=new Array(I),P=0;P<I;P++)g[P]=arguments[P];ae.default.enable.apply(this,g),this.getBadgeEl().addClass(this.badgeClass),this.getHighlighterEl().addClass(this.hoverClass);var x=this.$wrapper;x.css("cursor","move"),x.on("mousedown",this.initSorter),x.addClass(this.noSelClass)},toggleClipboard:function(){},initSorter:function(I){var g=oe(I.target).data("model").get("draggable");g&&(this.cacheEl=null,this.startSelectPosition(I.target,this.frameEl.contentDocument),this.sorter.draggable=g,this.sorter.onEndMove=this.onEndMove.bind(this),this.stopSelectComponent(),this.$wrapper.off("mousedown",this.initSorter),(0,ce.on)(this.getContentWindow(),"keydown",this.rollback))},initSorterFromModel:function(I){var g=I.get("draggable");if(g){this.cacheEl=null;var P=I.view.el;this.startSelectPosition(P,this.frameEl.contentDocument),this.sorter.draggable=g,this.sorter.onEndMove=this.onEndMoveFromModel.bind(this),this.stopSelectComponent(),(0,ce.on)(this.getContentWindow(),"keydown",this.rollback)}},initSorterFromModels:function(I){this.cacheEl=null;var g=I[I.length-1],P=(this.em.get("currentFrame")||{}).model,x=g.getEl(P),A=x.ownerDocument;this.startSelectPosition(x,A,{onStart:this.onStart}),this.sorter.draggable=g.get("draggable"),this.sorter.toMove=I,this.sorter.onMoveClb=this.onDrag,this.sorter.onEndMove=this.onEndMoveFromModel.bind(this),this.stopSelectComponent(),(0,ce.on)(this.getContentWindow(),"keydown",this.rollback)},onEndMoveFromModel:function(){(0,ce.off)(this.getContentWindow(),"keydown",this.rollback)},onEndMove:function(){this.enable(),(0,ce.off)(this.getContentWindow(),"keydown",this.rollback)},onSelect:function(I,g){},rollback:function(I,g){((I.which||I.keyCode)==27||g)&&(this.sorter.moved=!1,this.sorter.endMove())},getBadgeEl:function(){return this.$badge||(this.$badge=oe(this.getBadge())),this.$badge},getHighlighterEl:function(){return this.$hl||(this.$hl=oe(this.canvas.getHighlighter())),this.$hl},stop:function(){for(var I=arguments.length,g=new Array(I),P=0;P<I;P++)g[P]=arguments[P];ae.default.stop.apply(this,g),this.getBadgeEl().removeClass(this.badgeClass),this.getHighlighterEl().removeClass(this.hoverClass);var x=this.$wrapper;x.css("cursor","").unbind().removeClass(this.noSelClass)}})},9617:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>ie});var fe=S(9050),D=S(9283);const ie={open:function(ce){var ae=this,se=this.editor,oe=this.title,W=this.config,I=this.am,g=W.custom;if((0,fe.isFunction)(g.open))return g.open(I.__customData());se.Modal.open({title:oe,content:ce}).onceClose((function(){return se.stopCommand(ae.id)}))},close:function(){var ce=this.config.custom;if((0,fe.isFunction)(ce.close))return ce.close(this.am.__customData());var ae=this.editor.Modal;ae&&ae.close()},run:function(ce,ae){var se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},oe=ce.AssetManager,W=oe.getConfig(),I=se.types,g=I===void 0?[]:I,P=se.accept,x=se.select;if(this.title=se.modalTitle||ce.t("assetManager.modalTitle")||"",this.editor=ce,this.config=W,this.am=oe,oe.setTarget(se.target),oe.onClick(se.onClick),oe.onDblClick(se.onDblClick),oe.onSelect(se.onSelect),oe.__behaviour({select:x,types:g,options:se}),W.custom)this.rendered=this.rendered||(0,D.ut)("div"),this.rendered.className="".concat(W.stylePrefix,"custom-wrp"),oe.__behaviour({container:this.rendered}),oe.__trgCustom();else{if(!this.rendered||g){var A=oe.getAll().filter((function(re){return re}));g&&g.length&&(A=A.filter((function(re){return g.indexOf(re.get("type"))!==-1}))),oe.render(A),this.rendered=oe.getContainer()}if(P){var $=this.rendered.querySelector("input#".concat(W.stylePrefix,"uploadFile"));$&&$.setAttribute("accept",P)}}return this.open(this.rendered),this},stop:function(ce){this.editor=ce,this.close(this.rendered)}}},5821:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>ie});var fe=S(9050),D=S(9283);const ie={open:function(){var ce=this.container,ae=this.editor,se=this.bm,oe
107=this.config,W=oe.custom,I=oe.appendTo;if((0,fe.isFunction)(W.open))return W.open(se.__customData());if(this.firstRender&&!I){var g="views-container",P=ae.Panels;(P.getPanel(g)||P.addPanel({id:g})).set("appendContent",ce).trigger("change:appendContent"),W||ce.appendChild(se.render())}ce&&(ce.style.display="block")},close:function(){var ce=this.container,ae=this.config.custom;if((0,fe.isFunction)(ae.close))return ae.close(this.bm.__customData());ce&&(ce.style.display="none")},run:function(ce){var ae=ce.Blocks;this.config=ae.getConfig(),this.firstRender=!this.container,this.container=this.container||(0,D.ut)("div"),this.editor=ce,this.bm=ae;var se=this.container;ae.__behaviour({container:se}),this.config.custom&&ae.__trgCustom(),this.open()},stop:function(){this.close()}}},3452:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>fe});const fe={run:function(D){var ie=D.LayerManager,ce=D.Panels,ae=ie.getConfig();if(!ae.appendTo){if(!this.layers){var se="views-container",oe=document.createElement("div"),W=ce.getPanel(se)||ce.addPanel({id:se});ae.custom?ie.__trgCustom({container:oe}):oe.appendChild(ie.render()),W.set("appendContent",oe).trigger("change:appendContent"),this.layers=oe}this.layers.style.display="block"}},stop:function(){var D=this.layers;D&&(D.style.display="none")}}},2840:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>ie});var fe=S(2316),D=S.n(fe)().$;const ie={run:function(ce,ae){if(this.sender=ae,!this.$cn){var se=ce.getConfig(),oe=ce.Panels,W="change:appendContent";this.$cn=D("<div></div>"),this.$cn2=D("<div></div>"),this.$cn.append(this.$cn2);var I=ce.DeviceManager;if(I&&se.showDevices){var g=oe.addPanel({id:"devices-c"}),P=I.render();g.set("appendContent",P).trigger(W)}var x=ce.SelectorManager;this.slm=x;var A=x.getConfig();A.custom?x.__trgCustom({container:this.$cn2.get(0)}):A.appendTo||this.$cn2.append(x.render([]));var $=ce.StyleManager;this.sm=$;var re=$.getConfig(),z=re.stylePrefix;this.$header=D('<div class="'.concat(z,'header">').concat(ce.t("styleManager.empty"),"</div>")),this.$cn.append(this.$header),re.custom?$.__trgCustom({container:this.$cn2.get(0)}):re.appendTo||this.$cn2.append($.render());var F="views-container";this.panel=oe.getPanel(F),this.panel||(this.panel=oe.addPanel({id:F})),this.panel.set("appendContent",this.$cn).trigger(W),this.em=ce.getModel(),this.listenTo(this.em,$.events.target,this.toggleSm)}this.toggleSm()},toggleSm:function(){var ce,ae,se,oe,W=this.sender,I=this.sm;W&&W.get&&!W.get("active")||!I||(I.getSelected()?((ce=this.$cn2)===null||ce===void 0||ce.show(),(ae=this.$header)===null||ae===void 0||ae.hide()):((se=this.$cn2)===null||se===void 0||se.hide(),(oe=this.$header)===null||oe===void 0||oe.show()))},stop:function(){var ce,ae;(ce=this.$cn2)===null||ce===void 0||ce.hide(),(ae=this.$header)===null||ae===void 0||ae.hide()}}},8644:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>ie});var fe=S(2316),D=S.n(fe)().$;const ie={run:function(ce,ae){this.sender=ae;var se=ce.getModel(),oe=ce.Config.stylePrefix,W=ce.TraitManager,I=W.getConfig();if(!I.appendTo){if(!this.$cn){this.$cn=D("<div></div>"),this.$cn2=D("<div></div>"),this.$cn.append(this.$cn2),this.$header=D("<div>").append('<div class="'.concat(I.stylePrefix,'header">').concat(se.t("traitManager.empty"),"</div>")),this.$cn.append(this.$header),this.$cn2.append('<div class="'.concat(oe,'traits-label">').concat(se.t("traitManager.label"),"</div>")),this.$cn2.append(W.render());var g=ce.Panels;(g.getPanel("views-container")?g.getPanel("views-container"):g.addPanel({id:"views-container"})).set("appendContent",this.$cn.get(0)).trigger("change:appendContent"),this.target=ce.getModel(),this.listenTo(this.target,"component:toggled",this.toggleTm)}this.toggleTm()}},toggleTm:function(){var ce=this.sender;ce&&ce.get&&!ce.get("active")||(this.target.getSelectedAll().length===1?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show()))},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},560:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>D});var fe=S(9050);const D={run:function(ie,ce){var ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}
107,se=ie.getModel(),oe=se.get("clipboard"),W=ie.getSelected();oe&&W&&(ie.getSelectedAll().forEach((function(I){var g=I.collection;if(g){var P,x={at:I.index()+1,action:ae.action||"paste-component"};if((0,fe.contains)(oe,I)&&I.get("copyable"))P=g.add(I.clone(),x);else{var A=oe.filter((function($){return $.get("copyable")})).filter((function($){return ie.Components.canMove(I.parent(),$).result}));P=g.add(A.map((function($){return $.clone()})),x)}(P=(0,fe.isArray)(P)?P:[P]).forEach((function($){return ie.trigger("component:paste",$)}))}})),W.emitUpdate())}}},4944:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>ce});var fe=S(2982),D=S(9050),ie="sw-visibility";const ce={getPanels:function(ae){return this.panels||(this.panels=ae.Panels.getPanels()),this.panels},preventDrag:function(ae){ae.abort=1},tglEffects:function(ae){var se=this.em,oe=ae?"on":"off";if(se){var W=se.get("Canvas"),I=W.getBody(),g=W.getToolbarEl();g&&(g.style.display=ae?"none":"");var P=I.querySelectorAll(".".concat(this.ppfx,"no-pointer"));(0,D.each)(P,(function(x){return x.style.pointerEvents=ae?"all":""})),se[oe]("run:tlb-move:before",this.preventDrag)}},run:function(ae,se){var oe=this;this.sender=se,this.selected=(0,fe.Z)(ae.getSelectedAll()),ae.select(),this.shouldRunSwVisibility||(this.shouldRunSwVisibility=ae.Commands.isActive(ie)),this.shouldRunSwVisibility&&ae.stopCommand(ie),ae.getModel().stopDefault();var W=this.getPanels(ae),I=ae.Canvas.getElement(),g=ae.getEl(),P=ae.Config.stylePrefix;if(!this.helper){var x=document.createElement("span");x.className="".concat(P,"off-prv fa fa-eye-slash"),g.appendChild(x),x.onclick=function(){return oe.stopCommand()},this.helper=x}this.helper.style.display="inline-block",W.forEach((function($){return $.set("visible",!1)}));var A=I.style;A.width="100%",A.height="100%",A.top="0",A.left="0",A.padding="0",A.margin="0",ae.refresh(),this.tglEffects(1)},stop:function(ae){var se=this.sender,oe=se===void 0?{}:se,W=this.selected;oe.set&&oe.set("active",0);var I=this.getPanels(ae);this.shouldRunSwVisibility&&(ae.runCommand(ie),this.shouldRunSwVisibility=!1),ae.getModel().runDefault(),I.forEach((function(g){return g.set("visible",!0)})),ae.Canvas.getElement().setAttribute("style",""),W&&ae.select(W),delete this.selected,this.helper&&(this.helper.style.display="none"),ae.refresh(),this.tglEffects()}}},7538:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>ie});var fe=S(4942);function D(ce,ae){var se=Object.keys(ce);if(Object.getOwnPropertySymbols){var oe=Object.getOwnPropertySymbols(ce);ae&&(oe=oe.filter((function(W){return Object.getOwnPropertyDescriptor(ce,W).enumerable}))),se.push.apply(se,oe)}return se}const ie={run:function(ce,ae,se){var oe=se||{},W=ce.Canvas,I=W.getCanvasView(),g=(function(x){for(var A=1;A<arguments.length;A++){var $=arguments[A]!=null?arguments[A]:{};A%2?D(Object($),!0).forEach((function(re){(0,fe.Z)(x,re,$[re])})):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors($)):D(Object($)).forEach((function(re){Object.defineProperty(x,re,Object.getOwnPropertyDescriptor($,re))}))}return x})({appendTo:W.getResizerEl(),prefix:ce.getConfig().stylePrefix,posFetcher:I.getElementPos.bind(I),mousePosFetcher:W.getMouseRelativePos},oe.options||{}),P=this.canvasResizer;return P&&!oe.forceNew||(this.canvasResizer=ce.Utils.Resizer.init(g),P=this.canvasResizer),P.setOptions(g),P.blur(),P.focus(oe.el),P},stop:function(){var ce;(ce=this.canvasResizer)===null||ce===void 0||ce.blur()}}},2620:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>X});var fe=S(1002),D=S(4942),ie=S(2316),ce=S.n(ie),ae=S(9050),se=S(1163),oe=S(9283),W=S(3144),I=S(5671),g=S(9340),P=S(2963),x=S(1120),A=S(6602);function $(_,M){var s=Object.keys(_);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(_);M&&(l=l.filter((function(f){return Object.getOwnPropertyDescriptor(_,f).enumerable}))),s.push.apply(s,l)}return s}function re(_){for(var M=1;M<arguments.length;M++){var s=arguments[M]!=null?arguments[M]:{};M%2?$(Object(s),!0).forEach((function(l){(0,D.Z)(_,l,s[l])})):Object.getOwnPropertyDescriptors?Object.defineProperties(_,Object.getOwnPropertyDescriptors(s)):$(Object(s)).forEac
107h((function(l){Object.defineProperty(_,l,Object.getOwnPropertyDescriptor(s,l))}))}return _}function z(_){var M=(function(){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}})();return function(){var s,l=(0,x.Z)(_);if(M){var f=(0,x.Z)(this).constructor;s=Reflect.construct(l,arguments,f)}else s=l.apply(this,arguments);return(0,P.Z)(this,s)}}var F=(function(_){(0,g.Z)(s,_);var M=z(s);function s(){return(0,I.Z)(this,s),M.apply(this,arguments)}return(0,W.Z)(s,[{key:"events",value:function(){return this.model.get("events")||{mousedown:"handleClick"}}},{key:"attributes",value:function(){return this.model.get("attributes")}},{key:"initialize",value:function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=l.config,w=f===void 0?{}:f;this.em=w.em,this.editor=w.editor}},{key:"handleClick",value:function(l){l.preventDefault(),l.stopPropagation();var f=this.editor,w=this.em,te=f.Canvas.getFrameEl().getBoundingClientRect(),J=te.left,R=te.top,k=re(re({},l),{},{clientX:l.clientX-J,clientY:l.clientY-R});w.trigger("toolbar:run:before"),this.execCommand(k)}},{key:"execCommand",value:function(l){var f={event:l},w=this.model.get("command"),te=this.editor;typeof w=="function"&&w(te,null,f),typeof w=="string"&&te.runCommand(w,f)}},{key:"render",value:function(){var l=this.editor,f=this.$el,w=this.model,te=w.get("id"),J=w.get("label"),R=l.getConfig().stylePrefix;return f.addClass("".concat(R,"toolbar-item")),te&&f.addClass("".concat(R,"toolbar-item__").concat(te)),J&&f.append(J),this}}]),s})(ce().View);function G(_){var M=(function(){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}})();return function(){var s,l=(0,x.Z)(_);if(M){var f=(0,x.Z)(this).constructor;s=Reflect.construct(l,arguments,f)}else s=l.apply(this,arguments);return(0,P.Z)(this,s)}}var H=(function(_){(0,g.Z)(s,_);var M=G(s);function s(){var l,f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},w=arguments.length>1?arguments[1]:void 0;return(0,I.Z)(this,s),(l=M.call(this,f,w)).config={editor:f.editor||"",em:f.em},l.listenTo(l.collection,"reset",l.render),l}return(0,W.Z)(s)})(A.Z);function ne(_){var M=(function(){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}})();return function(){var s,l=(0,x.Z)(_);if(M){var f=(0,x.Z)(this).constructor;s=Reflect.construct(l,arguments,f)}else s=l.apply(this,arguments);return(0,P.Z)(this,s)}}H.prototype.itemView=F;var ye=(function(_){(0,g.Z)(s,_);var M=ne(s);function s(){return(0,I.Z)(this,s),M.apply(this,arguments)}return(0,W.Z)(s,[{key:"defaults",value:function(){return{command:"",attributes:{}}}}]),s})(ce().Model);const ee=ce().Collection.extend({model:ye});function O(_,M){var s=Object.keys(_);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(_);M&&(l=l.filter((function(f){return Object.getOwnPropertyDescriptor(_,f).enumerable}))),s.push.apply(s,l)}return s}function j(_){for(var M=1;M<arguments.length;M++){var s=arguments[M]!=null?arguments[M]:{};M%2?O(Object(s),!0).forEach((function(l){(0,D.Z)(_,l,s[l])})):Object.getOwnPropertyDescriptors?Object.defineProperties(_,Object.getOwnPropertyDescriptors(s)):O(Object(s)).forEach((function(l){Object.defineProperty(_,l,Object.getOwnPropertyDescriptor(s,l))}))}return _}var E,B=ce().$;const X={init:function(_){(0,ae.bindAll)(this,"onHover","onOut","onClick","onFrameScroll","onFrameUpdated","onContainerChange")},enable:function(){this.frameOff=this.canvasOff=this.adjScroll=null,this.startSelectComponent(),E=1},startSelectComponent:function(){this.toggleSelectComponent(1),this.em.getSelected()&&this.onSelect()},stopSelectComponent:function(){this.toggleSelectComponent()},toggleSelectComponent:function(_){var M=this,s=this.em,l=s.getConfig().listenToEl,f=s.getContainer().parentNode,w=_?"on":"off",te={on:se.on,off:se.off};!l.length&&f&&l.push(f),te[w](window,"resize",this.onFrameUpdated),te[w](l,"scroll",this.onContainerChange),s[w]("component:toggled component:update undo redo",this.onSelect,this),s[w]("change:componentHovered",this.onHovered,this),s[w]("component:resize styleable:change component:input",this.updateGlobalPos,this),s[w]("component:update:toolbar",this._upToolbar,this),s[w]("change:canvasOffset",this.updateAttached,this),s[w]("frame:updated",this.onFrameUpdated,this),s[w]("canvas:updateTools",this.onFrameUpdated,this),s.get("Canvas").getFrames().forEac
107h((function(J){var R=J.view,k=R?.getWindow();k&&(function(v,b){te[w](b,"mouseover",M.onHover),te[w](b,"mouseleave",M.onOut),te[w](b,"click touchend",M.onClick),te[w](v,"scroll",M.onFrameScroll,!0)})(k,R.getBody())}))},onHover:function(_){_.stopPropagation();var M=this.em,s=_.target,l=(0,se.getViewEl)(s),f=l&&l._getFrame(),w=B(s),te=w.data("model");if(!te)for(var J=w.parent();!te&&J.length&&!(0,oe.Mx)(J[0]);)te=J.data("model"),J=J.parent();this.currentDoc=s.ownerDocument,M.setHovered(te,{useValid:!0}),f&&M.set("currentFrame",f)},onFrameUpdated:function(){this.updateLocalPos(),this.updateGlobalPos()},onHovered:function(_,M){var s=this,l={};M?M.views.forEach((function(f){var w=f.el,te=s.getElementPos(w);l={el:w,pos:te,component:M,view:(0,se.getViewEl)(w)},s.updateToolsLocal(l),w.ownerDocument===s.currentDoc&&(s.elHovered=l)})):(this.currentDoc=null,this.elHovered=0,this.updateToolsLocal(),this.canvas.getFrames().forEach((function(f){var w=f.view,te=w&&w.getToolsEl();te&&s.toggleToolsEl(0,0,{el:te})})))},onSelect:(0,ae.debounce)((function(){var _=this.em,M=_.getSelected(),s=_.get("currentFrame")||{},l=M&&M.getView(s.model),f=l&&l.el,w={};f&&(0,oe.pn)(f)&&(w={el:f,pos:this.getElementPos(f),component:M,view:(0,se.getViewEl)(f)}),this.elSelected=w,this.updateToolsGlobal(),this.updateLocalPos(w),this.initResize(M)})),updateGlobalPos:function(){var _=this.getElSelected();_.el&&(_.pos=this.getElementPos(_.el),this.updateToolsGlobal())},updateLocalPos:function(_){var M=this.getElHovered();M.el&&(M.pos=this.getElementPos(M.el),this.updateToolsLocal(_))},getElHovered:function(){return this.elHovered||{}},getElSelected:function(){return this.elSelected||{}},onOut:function(){this.em.setHovered(0)},toggleToolsEl:function(_,M){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=s.el||this.canvas.getToolsEl(M);return l&&(l.style.display=_?"":"none"),l||{}},showElementOffset:function(_,M){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E&&this.editor.runCommand("show-offset",{el:_,elPos:M,view:s.view,force:1,top:0,left:0})},hideElementOffset:function(_){this.editor.stopCommand("show-offset",{view:_})},showFixedElementOffset:function(_,M){this.editor.runCommand("show-offset",{el:_,elPos:M,state:"Fixed"})},hideFixedElementOffset:function(_,M){this.editor&&this.editor.stopCommand("show-offset",{state:"Fixed"})},hideHighlighter:function(_){this.canvas.getHighlighter(_).style.opacity=0},onClick:function(_){_.stopPropagation(),_.preventDefault();var M=this.em;if(M.get("_cmpDrag"))return M.set("_cmpDrag");var s=B(_.target),l=s.data("model");if(!l)for(var f=s.parent();!l&&f.length&&!(0,oe.Mx)(f[0]);)l=f.data("model"),f=f.parent();if(l){if(M.isEditing()&&!l.get("textable")&&l.isChildOf("text"))return;this.select(l,_)}},select:function(_){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};_&&(this.editor.select(_,{event:M,useValid:!0}),this.initResize(_))},updateBadge:function(_,M){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=this.canvas,f=B(_).data("model");if(f&&f.get("badgable")){var w=this.getBadge(s);if(!s.posOnly){var te=this.canvas.getConfig(),J=f.getIcon(),R=te.pStylePrefix||"",k="".concat(R,"badge"),v=te.customBadgeLabel,b="".concat(J?'<div class="'.concat(k,'__icon">').concat(J,"</div>"):"",` 108 <div class="`).concat(k,'__name">').concat(f.getName(),"</div>");w.innerHTML=v?v(f):b}var h="px",m=w.style;m.display="block";var p=l.getTargetToElementFixed(_,w,{pos:M}),y=p.top,Z=s.leftOff<0?-s.leftOff:0;m.top=y+h,m.left=Z+h}},showHighlighter:function(_){this.canvas.getHighlighter(_).style.opacity=""},initResize:function(_){var M,s=this.em,l=this.canvas,f=s?s.get("Editor"):"",w=(s?s.get("Config"):"").stylePrefix||"",te="".concat(w,"resizing"),J=!(0,ae.isElement)(_)&&(0,se.isTaggableNode)(_)?_:s.getSelected(),R=J&&J.get("resizable"),k={},v=function(h,m,p){var y=p.docs;y&&y.forEach((function(Z){var Y=Z.body,q=Y.className||"";Y.className=(h=="add"?"".concat(q," ").concat(te):q.replace(te,"")).trim()}))};if(f&&R){var b=(0,ae.isElement)(_)?_:J.getEl();k={onStart:function(h){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=m.el,y=m.config,Z=m.resizer,Y=y.keyHeight,q=y.keyWidth,N=y.currentUnit,a=y.keepAutoHeight,c=y.keepAutoWidth;v("add",0,m),M=s.get("StyleManager").getModelToStyle(J),l.toggleFramesEvents();
108var C=getComputedStyle(p),Q=M.getStyle(),pe=Q[q];y.autoWidth=c&&pe==="auto",isNaN(parseFloat(pe))&&(pe=C[q]);var Ce=Q[Y];y.autoHeight=a&&Ce==="auto",isNaN(parseFloat(Ce))&&(Ce=C[Y]),Z.startDim.w=parseFloat(pe),Z.startDim.h=parseFloat(Ce),E=0,N&&(y.unitHeight=(0,se.getUnitFromValue)(Ce),y.unitWidth=(0,se.getUnitFromValue)(pe))},onMove:function(){f.trigger("component:resize")},onEnd:function(h,m){v("remove",0,m),f.trigger("component:resize"),l.toggleFramesEvents(1),E=1},updateTarget:function(h,m){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(M){var y=p.store,Z=p.selectedHandler,Y=p.config,q=Y.keyHeight,N=Y.keyWidth,a=Y.autoHeight,c=Y.autoWidth,C=Y.unitWidth,Q=Y.unitHeight,pe=["tc","bc"].indexOf(Z)>=0,Ce=["cl","cr"].indexOf(Z)>=0,Se={},me=y?"":1;if(!pe){var xe=l.getBody().offsetWidth,de=m.w<xe?m.w:xe;Se[N]=c?"auto":"".concat(de).concat(C)}Ce||(Se[q]=a?"auto":"".concat(m.h).concat(Q)),M.addStyle(j(j({},Se),{},{en:me}),{avoidStore:!y});var Ee="update:component:style",Fe="".concat(Ee,":").concat(q," ").concat(Ee,":").concat(N);s&&s.trigger(Fe,null,null,{noEmit:1})}}},(0,fe.Z)(R)=="object"&&(k=j(j(j({},k),R),{},{parent:k})),this.resizer=f.runCommand("resize",{el:b,options:k,force:1})}else f.stopCommand("resize"),this.resizer=null},updateToolbar:function(_){var M=this.config.em,s=_==M?M.getSelected():_,l=this.canvas.getToolbarEl(),f=l.style,w=s.get("toolbar"),te=M.get("Config").showToolbar;if(s&&te&&w&&w.length){if(f.display="",!this.toolbar){l.innerHTML="",this.toolbar=new ee(w);var J=new H({collection:this.toolbar,editor:this.editor,em:M});l.appendChild(J.render().el)}this.toolbar.reset(w),f.top="-100px",f.left=0}else f.display="none"},updateToolbarPos:function(_){var M="px",s=this.canvas.getToolbarEl().style;s.top="".concat(_.top).concat(M),s.left="".concat(_.left).concat(M),s.opacity=""},getCanvasPosition:function(){return this.canvas.getCanvasView().getPosition()},getBadge:function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.canvas.getBadgeEl(_.view)},onFrameScroll:function(){this.updateTools()},updateTools:function(){this.updateLocalPos(),this.updateGlobalPos()},isCompSelected:function(_){return _&&_.get("status")==="selected"},updateToolsLocal:function(_){var M=_||this.getElHovered(),s=M.el,l=M.pos,f=M.view,w=M.component;if(s){var te=w.get("hoverable"),J=this.lastHovered!==s,R=J?{}:{posOnly:1};J&&te&&(this.lastHovered=s,this.showHighlighter(f),this.showElementOffset(s,l,{view:f})),this.isCompSelected(w)&&(this.hideHighlighter(f),this.hideElementOffset(f));var k="px",v=this.toggleToolsEl(1,f),b=v.style,h=this.canvas.canvasRectOffset(s,l),m=h.top,p=h.left;this.updateBadge(s,l,j(j({},R),{},{view:f,topOff:m,leftOff:p})),b.top=m+k,b.left=p+k,b.width=l.width+k,b.height=l.height+k,this._trgToolUp("local",{component:w,el:v,top:m,left:p,width:l.width,height:l.height})}else this.lastHovered=0},_upToolbar:(0,ae.debounce)((function(){this.updateToolsGlobal({force:1})})),_trgToolUp:function(_){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.em.trigger("canvas:tools:update",j({type:_},M))},updateToolsGlobal:function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=this.getElSelected(),s=M.el,l=M.pos,f=M.component;if(!s)return this.toggleToolsEl(),void(this.lastSelected=0);var w=this.canvas,te=this.lastSelected!==s;(te||_.force)&&(this.lastSelected=s,this.updateToolbar(f));var J="px",R=this.toggleToolsEl(1),k=R.style,v=w.getTargetToElementFixed(s,w.getToolbarEl(),{pos:l}),b=v.canvasOffsetTop,h=v.canvasOffsetLeft;k.top=b+J,k.left=h+J,k.width=l.width+J,k.height=l.height+J,this.updateToolbarPos({top:v.top,left:v.left}),this._trgToolUp("global",{component:f,el:R,top:b,left:h,width:l.width,height:l.height})},updateAttached:(0,ae.debounce)((function(){this.updateGlobalPos()})),onContainerChange:(0,ae.debounce)((function(){this.em.refreshCanvas()}),150),getElementPos:function(_){return this.canvas.getCanvasView().getElementPos(_)},hideBadge:function(){this.getBadge().style.display="none"},cleanPrevious:function(_){_&&_.set({status:"",state:""})},getContentWindow:function(){return this.canvas.getWindow()},run:function(_){(0,se.hasWin)()&&(this.editor=_&&_.get("Editor"),this.enable())},stop:function(_,M){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if((0,se.hasWin)()){var l=this.em,f=this.editor;this.onHovered(),this.stopSelectComponent(),!s.preserveSelected&&l.setSelected(null),this.toggleToolsEl(),f&&f.stopCommand("resize")}}}},8463:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>ie});var fe=S(2316),D=S.n(fe)().$;const ie={startSelectPosition:function(ce,ae){var se=this,oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.isPointed=!1;var W=this.editorModel.get("Utils"),I=ce.ownerDocument.body;W&&!this.sorter&&(this.sorter=new W.Sorter({container:I,placer:this.canvas.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,direction:"a",document:ae,wmargin:1,nested:1,em:this.editorModel,canvasRelative:1,scale:function(){return se.em.getZoomDecimal()}})),oe.onStart&&(this.sorter.onStart=oe.onStart),ce&&this.sorter.startSort(ce,{container:I})},getOffsetDim:function(){var ce=this.offset(this.canvas.getFrameEl()),ae=this.offset(this.canvas.getElement());
108return{top:ce.top-ae.top,left:ce.left-ae.left}},stopSelectPosition:function(){this.posTargetCollection=null,this.posIndex=this.posMethod=="after"&&this.cDim.length!==0?this.posIndex+1:this.posIndex,this.sorter&&(this.sorter.moved=0,this.sorter.endMove()),this.cDim&&(this.posIsLastEl=this.cDim.length!==0&&this.posMethod=="after"&&this.posIndex==this.cDim.length,this.posTargetEl=this.cDim.length===0?D(this.outsideElem):!this.posIsLastEl&&this.cDim[this.posIndex]?D(this.cDim[this.posIndex][5]).parent():D(this.outsideElem),this.posTargetModel=this.posTargetEl.data("model"),this.posTargetCollection=this.posTargetEl.data("model-comp"))},enable:function(){this.startSelectPosition()},nearFloat:function(ce,ae,se){var oe=ce||0,W=ae||"before",I=se.length,g=I!==0&&W=="after"&&oe==I;return I!==0&&(!g&&!se[oe][4]||se[oe-1]&&!se[oe-1][4]||g&&!se[oe-1][4])?1:0},run:function(){this.enable()},stop:function(){this.stopSelectPosition(),this.$wrapper.css("cursor",""),this.$wrapper.unbind()}}},7994:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>W});var fe=S(4942),D=S(2316),ie=S.n(D),ce=S(9050),ae=S(1163);function se(I,g){var P=Object.keys(I);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(I);g&&(x=x.filter((function(A){return Object.getOwnPropertyDescriptor(I,A).enumerable}))),P.push.apply(P,x)}return P}var oe=ie().$;const W={getOffsetMethod:function(I){return"get"+(I||"")+"OffsetViewerEl"},run:function(I,g,P){var x=P||{},A=x.state||"",$=I.getConfig(),re=this.em.getZoomDecimal(),z=x.el||"";if(!$.showOffsets||(0,ae.isTextNode)(z)||!$.showOffsetsSelected&&A=="Fixed")I.stopCommand(this.id,P);else{var F=I.Canvas,G=(function(et){for(var Ge=1;Ge<arguments.length;Ge++){var yt=arguments[Ge]!=null?arguments[Ge]:{};Ge%2?se(Object(yt),!0).forEach((function(St){(0,fe.Z)(et,St,yt[St])})):Object.getOwnPropertyDescriptors?Object.defineProperties(et,Object.getOwnPropertyDescriptors(yt)):se(Object(yt)).forEach((function(St){Object.defineProperty(et,St,Object.getOwnPropertyDescriptor(yt,St))}))}return et})({},x.elPos||F.getElementPos(z));(0,ce.isUndefined)(x.top)||(G.top=x.top),(0,ce.isUndefined)(x.left)||(G.left=x.left);var H=window.getComputedStyle(z),ne=this.ppfx,ye=A+"State",ee=F[this.getOffsetMethod(A)](P.view);ee.style.opacity="";var O=this["marginT"+A],j=this["marginB"+A],E=this["marginL"+A],B=this["marginR"+A],X=this["padT"+A],_=this["padB"+A],M=this["padL"+A],s=this["padR"+A];if(ee.childNodes.length&&(this[ye]="1",O=ee.querySelector("[data-offset-m-t]"),j=ee.querySelector("[data-offset-m-b]"),E=ee.querySelector("[data-offset-m-l]"),B=ee.querySelector("[data-offset-m-r]"),X=ee.querySelector("[data-offset-p-t]"),_=ee.querySelector("[data-offset-p-b]"),M=ee.querySelector("[data-offset-p-l]"),s=ee.querySelector("[data-offset-p-r]")),!this[ye]){var l=A.toLowerCase(),f=l+"margin-v",w=l+"padding-v",te=oe('<div class="'.concat(ne,'marginName">')).get(0),J=oe('<div class="'.concat(ne,'paddingName">')).get(0),R=ne+w+"-el",k="".concat(ne+f+"-el"," ").concat(ne+f),v="".concat(R," ").concat(ne+w);O=oe('<div class="'.concat(k,'-top"></div>')).get(0),j=oe('<div class="'.concat(k,'-bottom"></div>')).get(0),E=oe('<div class="'.concat(k,'-left"></div>')).get(0),B=oe('<div class="'.concat(k,'-right"></div>')).get(0),X=oe('<div class="'.concat(v,'-top"></div>')).get(0),_=oe('<div class="'.concat(v,'-bottom"></div>')).get(0),M=oe('<div class="'.concat(v,'-left"></div>')).get(0),s=oe('<div class="'.concat(v,'-right"></div>')).get(0),this["marginT"+A]=O,this["marginB"+A]=j,this["marginL"+A]=E,this["marginR"+A]=B,this["padT"+A]=X,this["padB"+A]=_,this["padL"+A]=M,this["padR"+A]=s,te.appendChild(O),te.appendChild(j),te.appendChild(E),te.appendChild(B),J.appendChild(X),J.appendChild(_),J.appendChild(M),J.appendChild(s),ee.appendChild(te),ee.appendChild(J),this[ye]="1"}var b="px",h=parseFloat(H.marginLeft.replace(b,""))*re,m=parseFloat(H.marginRight.replace(b,""))*re,p=parseFloat(H.marginTop.replace(b,""))*re,y=parseFloat(H.marginBottom.replace(b,""))*re,Z=O.style,Y=j.style,q=E.style,N=B.style,a=X.style,c=_.style,C=M.style,Q=s.style,pe=parseFloat(G.left),Ce=parseFloat(H.width)*re+b;
108Z.height=p+b,Z.width=Ce,Z.top=G.top-p+b,Z.left=pe+b,Y.height=y+b,Y.width=Ce,Y.top=G.top+G.height+b,Y.left=pe+b;var Se=G.height+p+y+b,me=G.top-p+b;q.height=Se,q.width=h+b,q.top=me,q.left=pe-h+b,N.height=Se,N.width=m+b,N.top=me,N.left=pe+G.width+b;var xe=parseFloat(H.paddingTop)*re;a.height=xe+b;var de=parseFloat(H.paddingBottom)*re;c.height=de+b;var Ee=G.height-de-xe+b,Fe=G.top+xe+b;C.height=Ee,C.width=parseFloat(H.paddingLeft)*re+b,C.top=Fe;var He=parseFloat(H.paddingRight)*re;Q.height=Ee,Q.width=He+b,Q.top=Fe}},stop:function(I,g){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},x=P||{},A=x.state||"",$=this.getOffsetMethod(A),re=I.Canvas,z=re[$](P.view);z.style.opacity=0}}},8352:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>D});var fe=S(9050);const D={init:function(){(0,fe.bindAll)(this,"_onFramesChange")},run:function(ie){this.toggleVis(ie)},stop:function(ie){this.toggleVis(ie,0)},toggleVis:function(ie){var ce=this,ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;if(!ie.Commands.isActive("preview")){var se=ie.Canvas,oe=ae?"on":"off";se.getFrames().forEach((function(W){return ce._upFrame(W,ae)})),se.getModel()[oe]("change:frames",this._onFramesChange)}},_onFramesChange:function(ie,ce){var ae=this;ce.forEach((function(se){return se.once("loaded",(function(){return ae._upFrame(se,!0)}))}))},_upFrame:function(ie,ce){var ae=ce?"add":"remove";ie.view.getBody().classList[ae]("".concat(this.ppfx,"dashed"))}}},9304:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>oe});var fe=S(4942),D=S(2982),ie=S(9050),ce=S(1163);function ae(W,I){var g=Object.keys(W);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(W);I&&(P=P.filter((function(x){return Object.getOwnPropertyDescriptor(W,x).enumerable}))),g.push.apply(g,P)}return g}function se(W){for(var I=1;I<arguments.length;I++){var g=arguments[I]!=null?arguments[I]:{};I%2?ae(Object(g),!0).forEach((function(P){(0,fe.Z)(W,P,g[P])})):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(g)):ae(Object(g)).forEach((function(P){Object.defineProperty(W,P,Object.getOwnPropertyDescriptor(g,P))}))}return W}const oe={getConfig:function(W){return this.__getConfig(W)},getProjectData:function(W){var I={},g=this.storageKey;return g&&(I[g]=W||this.getAll()),I},loadProjectData:function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=I.all,P=I.onResult,x=I.reset,A=this.storageKey,$={action:"load"},re=g||this.getAll(),z=W[A];if(typeof z=="string")try{z=JSON.parse(z)}catch{this.__logWarn("Data parsing failed",{input:z})}return x&&z&&re.reset(null,$),P?z&&P(z,$):z&&(0,ce.isDef)(z.length)&&re.reset(z,$),z},clear:function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=this.all;return I&&I.reset(null,W),this},__getConfig:function(W){var I=this.config||{};return W?I[W]:I},getAll:function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.all?W.array?(0,D.Z)(this.all.models):this.all:[]},getAllMap:function(){return this.getAll().reduce((function(W,I){return W[I.get(I.idAttribute)]=I,W}),{})},__initConfig:function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.config=(0,ce.deepMerge)(W,I),this.em=this.config.em,this.cls=[]},__initListen:function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},I=this.all,g=this.em,P=this.events;I&&g&&I.on("add",(function(x,A,$){return g.trigger(P.add,x,$)})).on("remove",(function(x,A,$){return g.trigger(P.remove,x,$)})).on("change",(function(x,A){return g.trigger(P.update,x,x.changedAttributes(),A)})).on("all",this.__catchAllEvent,this),this.cls=[I].concat(W.collections||[]),(W.propagate||[]).forEach((function(x){var A=x.entity,$=x.event;A.on("all",(function(re,z,F,G){var H=se({event:re},G||F);[g,I].map((function(ne){return ne.trigger($,z,H)}))}))}))},__remove:function(W){var I=this,g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=this.em,x=(0,ie.isString)(W)?this.get(W):W,A=function(){return x&&I.all.remove(x,g),x};return!g.silent&&P&&P.trigger(this.events.removeBefore,x,A,g),!g.abort&&A()},__catchAllEvent:function(W,I,g,P){var x=this.em,A=this.events,$=P||g;x&&A.all&&x.trigger(A.all,{event:W,model:I,options:$}),this.__onAllEvent()},__appendTo:function(){var W=this.getConfig().appendTo;if(W){var I=(0,ie.isElement)(W)?W:document.querySelector(W);if(!I)return this.__logWarn('"appendTo" element not found');I.appendChild(this.render())}},__onAllEvent:function(){},__logWarn:function(W,I){this.em.logWarning("[".concat(this.name,"]: ").concat(W),I)},_createId:function(){var W,I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:16,g=this.getAll(),P=g.length+I,x=this.getAllMap();do W=(0,ce.createId)(P);while(x[W]);return W},__listenAdd:function(W,I){var g=this;W.on("add",(function(P,x,A){return g.em.trigger(I,P,A)}))},__listenRemove:function(W,I){var g=this;W.on("remove",(function(P,x,A){return g.em.trigger(I,P,A)}))},__listenUpdate:function(W,I){var g=this;W.on("change",(function(P,x){return g.em.trigger(I,P,P.changedAttributes(),x)}))},__destroy:function(){var W;
108this.cls.forEach((function(I){I.stopListening(),I.reset()})),this.em=0,this.config=0,(W=this.view)===null||W===void 0||W.remove(),this.view=0}}},672:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>M});var fe=S(2982),D=S(5671),ie=S(3144),ce=S(7326),ae=S(9340),se=S(2963),oe=S(1120),W=S(4942),I=S(9050),g=S(1163),P=S(9714),x=S(966),A=S(5963);const $={stylePrefix:"css-",rules:[],onBeforeStyle:null};var re=S(2316),z=S(9524),F=S(8795);function G(s,l){var f=Object.keys(s);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(s);l&&(w=w.filter((function(te){return Object.getOwnPropertyDescriptor(s,te).enumerable}))),f.push.apply(f,w)}return f}function H(s){for(var l=1;l<arguments.length;l++){var f=arguments[l]!=null?arguments[l]:{};l%2?G(Object(f),!0).forEach((function(w){(0,W.Z)(s,w,f[w])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(f)):G(Object(f)).forEach((function(w){Object.defineProperty(s,w,Object.getOwnPropertyDescriptor(f,w))}))}return s}function ne(s){var l=(function(){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}})();return function(){var f,w=(0,oe.Z)(s);if(l){var te=(0,oe.Z)(this).constructor;f=Reflect.construct(w,arguments,te)}else f=w.apply(this,arguments);return(0,se.Z)(this,f)}}var ye=((0,g.hasWin)()?window:{}).CSS,ee=(function(s){(0,ae.Z)(f,s);var l=ne(f);function f(){return(0,D.Z)(this,f),l.apply(this,arguments)}return(0,ie.Z)(f,[{key:"defaults",value:function(){return{selectors:[],selectorsAdd:"",style:{},mediaText:"",state:"",stylable:!0,atRuleType:"",singleAtRule:!1,important:!1,group:"",shallow:!1,_undo:!0}}},{key:"initialize",value:function(w){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.config=w||{},this.opt=te,this.em=te.em,this.ensureSelectors(),this.on("change",this.__onChange)}},{key:"__onChange",value:function(w,te){var J=this.em,R=this.changedAttributes();!(0,g.isEmptyObj)(R)&&J&&J.changesUp(te)}},{key:"clone",value:function(){var w=H({},this.opt),te=H({},this.attributes);return te.selectors=this.get("selectors").map((function(J){return J.clone()})),new this.constructor(te,w)}},{key:"ensureSelectors",value:function(w,te,J){var R=this.em,k=R&&R.get("SelectorManager"),v=[this,"change:selectors",this.ensureSelectors],b=this.getSelectors();if(this.stopListening.apply(this,v),b.models&&(b=(0,fe.Z)(b.models)),b=(0,I.isString)(b)?[b]:b,Array.isArray(b)){var h=b.filter((function(m){return m})).map((function(m){return k?k.add(m):m}));b=new x.Z(h)}this.set("selectors",b,J),this.listenTo.apply(this,v)}},{key:"getAtRule",value:function(){var w=this.get("atRuleType"),te=this.get("mediaText"),J=w?"@".concat(w):te?"@media":"";return J+(te&&J?" ".concat(te):"")}},{key:"selectorsToString",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=[],J=this.get("state"),R=this.get("selectorsAdd"),k={escape:function(h){return ye&&ye.escape?ye.escape(h):h}},v=this.get("selectors").getFullString(0,k),b=J&&!w.skipState?":".concat(J):"";return v&&te.push("".concat(v).concat(b)),R&&!w.skipAdd&&te.push(R),te.join(", ")}},{key:"getDeclaration",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te="",J=this.attributes.important,R=this.selectorsToString(w),k=this.styleToString(H({important:J},w)),v=this.get("singleAtRule");return(R||v)&&(k||w.allowEmpty)&&(te=v?k:"".concat(R,"{").concat(k,"}")),te}},{key:"getDevice",value:function(){var w=this.em,te=this.attributes,J=te.atRuleType,R=te.mediaText,k=w?.get("DeviceManager").getDevices()||[],v=k.filter((function(b){return b.getWidthMedia()===""}))[0];return J==="media"&&R?k.filter((function(b){return b.getWidthMedia()===(0,F.U)(R)}))[0]||null:v||null}},{key:"getState",value:function(){var w=this.em,te=this.get("state");return(w.get("SelectorManager").getStates()||[]).filter((function(J){return J.getName()===te}))[0]||null}},{key:"getComponent",value:function(){var w,te=this.getSelectors(),J=te.length==1&&te.at(0),R=J&&J.isId()&&J.get("name");return R&&((w=this.em)===null||w===void 0?void 0:w.get("DomComponents").getById(R))||null}},{key:"toCSS",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te="",J=this.getAtRule(),R=this.getDeclaration(w);return(R||w.allowEmpty)&&(te=R),J&&te&&(te="".concat(J,"{").concat(te,"}")),te}},{key:"toJSON",value:function(){for(var w=arguments.length,te=new Array(w),J=0;J<w;J++)te[J]=arguments[J];var R=re.Model.prototype.toJSON.apply(this,te);if(this.em.getConfig().avoidDefaults){var k=this.defaults();(0,I.forEach)(k,(function(v,b){R[b]===v&&delete R[b]})),delete R.style.__p,(0,I.isEmpty)(R.selectors)&&delete R.selectors,(0,I.isEmpty)(R.style)&&delete R.style}return R}},{key:"compare",value:function(w,te,J){var R=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},k=te||"",v=J||"",b=R.selectorsAdd||"",h=R.atRuleType||"",m=(0,I.isArray)(w)||w.models?w.models||w:[w];v&&!h&&(h="media");var p=m.map((function(q){return q.getFullName()}
108)),y=this.get("selectors").map((function(q){return q.getFullName()})),Z=p.slice().sort(),Y=y.slice().sort();return!(p.length!==y.length||!Z.every((function(q,N){return q===Y[N]})))&&this.get("state")===k&&this.get("mediaText")===v&&this.get("selectorsAdd")===b&&this.get("atRuleType")===h}}]),f})(z.Z);function O(s){var l=(function(){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}})();return function(){var f,w=(0,oe.Z)(s);if(l){var te=(0,oe.Z)(this).constructor;f=Reflect.construct(w,arguments,te)}else f=w.apply(this,arguments);return(0,se.Z)(this,f)}}var j=(function(s){(0,ae.Z)(f,s);var l=O(f);function f(){return(0,D.Z)(this,f),l.apply(this,arguments)}return(0,ie.Z)(f,[{key:"initialize",value:function(w,te){var J=this;te&&te.em&&(this.editor=te.em),setTimeout((function(){J.on("remove",J.onRemove),J.on("add",J.onAdd)}))}},{key:"toJSON",value:function(w){return re.Collection.prototype.toJSON.call(this,w).filter((function(te){return te.style&&!te.shallow}))}},{key:"onAdd",value:function(w,te,J){w.ensureSelectors(w,te,J)}},{key:"onRemove",value:function(w){var te=this.editor;te.stopListening(w),te.get("UndoManager").remove(w)}},{key:"add",value:function(w){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return typeof w=="string"&&(w=this.editor.get("Parser").parseCss(w)),te.em=this.editor,re.Collection.prototype.add.apply(this,[w,te])}}]),f})(re.Collection);j.prototype.model=ee;var E=S(4868);function B(s,l){var f=Object.keys(s);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(s);l&&(w=w.filter((function(te){return Object.getOwnPropertyDescriptor(s,te).enumerable}))),f.push.apply(f,w)}return f}function X(s){for(var l=1;l<arguments.length;l++){var f=arguments[l]!=null?arguments[l]:{};l%2?B(Object(f),!0).forEach((function(w){(0,W.Z)(s,w,f[w])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(f)):B(Object(f)).forEach((function(w){Object.defineProperty(s,w,Object.getOwnPropertyDescriptor(f,w))}))}return s}function _(s){var l=(function(){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}})();return function(){var f,w=(0,oe.Z)(s);if(l){var te=(0,oe.Z)(this).constructor;f=Reflect.construct(w,arguments,te)}else f=w.apply(this,arguments);return(0,se.Z)(this,f)}}var M=(function(s){(0,ae.Z)(f,s);var l=_(f);function f(){var w;(0,D.Z)(this,f);for(var te=arguments.length,J=new Array(te),R=0;R<te;R++)J[R]=arguments[R];return w=l.call.apply(l,[this].concat(J)),(0,W.Z)((0,ce.Z)(w),"Selectors",x.Z),(0,W.Z)((0,ce.Z)(w),"name","CssComposer"),(0,W.Z)((0,ce.Z)(w),"storageKey","styles"),w}return(0,ie.Z)(f,[{key:"getConfig",value:function(){return this.c}},{key:"init",value:function(w){for(var te in this.c=w||{},$)te in this.c||(this.c[te]=$[te]);var J=this.c.pStylePrefix;J&&(this.c.stylePrefix=J+this.c.stylePrefix);var R=this.c.em&&this.c.em.config.style||"";return this.c.rules=R||this.c.rules,this.em=this.c.em,this.rules=new j([],this.c),this}},{key:"onLoad",value:function(){this.rules.add(this.c.rules,{silent:1})}},{key:"postLoad",value:function(){var w,te=(w=this.em)===null||w===void 0?void 0:w.get("UndoManager");te&&te.add(this.getAll())}},{key:"store",value:function(){return this.getProjectData()}},{key:"load",value:function(w){return this.loadProjectData(w)}},{key:"add",value:function(w,te,J){var R=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},k=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{},v=te||"",b=J||"",h=X({},R),m=this.get(w,v,b,h);return m&&m.config&&!m.config.singleAtRule||(h.state=v,h.mediaText=b,h.selectors=[],b&&(h.atRuleType="media"),(m=new ee(h,this.c)).get("selectors").add(w,k),this.rules.add(m,k)),m}},{key:"get",value:function(w,te,J,R){var k=w;if((0,I.isString)(w)){var v=this.em.get("SelectorManager"),b=w.split(",")[0].trim(),h=this.em.get("Parser").parserCss.checkNode({selectors:b})[0];k=v.get(h.selectors)}return this.rules.find((function(m){return m.compare(k,te,J,R)}))||null}},{key:"getAll",value:function(){return this.rules}},{key:"addCollection",value:function(w){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},R=[];(0,I.isString)(w)&&(w=this.em.get("Parser").parseCss(w));for(var k=w instanceof Array?w:[w],v=0,b=k.length;v<b;v++){var h,m=k[v]||{};if(m.selectors){var p=(h=this.em)===null||h===void 0?void 0:h.get("SelectorManager");p||console.warn("Selector Manager not found");for(var y=m.selectors,Z=y instanceof Array?y:[y],Y=[],q=0,N=Z.length;q<N;q++){var a=p.add(Z[q]);Y.push(a)}var c=this.get(Y,m.state,m.mediaText,m),C=this.add(Y,m.state,m.mediaText,m,te),Q=!c||!te.avoidUpdateStyle,pe=m.style||{};if((0,g.isObject)(J)&&C.set(J,te),Q){var Ce=te.extend?X(X({},C.get("style")),pe):pe;C.set("style",Ce,te)}R.push(C)}}return R}},{key:"addRules",value:function(w){return this.addCollection(w)}},{key:"setRule",value:function(w,te){var J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},R=J.atRuleType,k=J.atRuleParams,v=this.em.get("Parser").parserCss.checkNode({selectors:w,style:te})[0],b=v.state,h=v.selectorsAdd,m=this.em.get("SelectorManager"),p=m.add(v.selectors),y=this.add(p,b,k,{selectorsAdd:h,atRule:R});return y.setStyle(te,J),y}},{key:"getRule",value:function(w){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},J=this.em.get("SelectorManager"),R=this.em.get("Parser").parserCss.checkNode({selectors:w})[0],k=J.get(R.selectors),v=R.state,b=R.selectorsAdd,h=te.atRuleType,m=te.atRuleParams;return k&&this.get(k,v,m,{selectorsAdd:b,atRule:h})}},{key:"getRules",value:function(w){var te=this.getAll();if(!w)return(0,fe.Z)(te.models);var J={sort:!0},R=(0,I.isString)(w)?w.split(",").map((function(k){return k.trim()})):w;
108return te.filter((function(k){return R.indexOf(k.getSelectors().getFullString(null,J))>=0}))}},{key:"setIdRule",value:function(w){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},R=J.addOpts,k=R===void 0?{}:R,v=J.mediaText,b=J.state||"",h=(0,I.isUndefined)(v)?this.em.getCurrentMedia():v,m=this.em.get("SelectorManager"),p=m.add({name:w,type:A.Z.TYPE_ID},k),y=this.add(p,b,h,{},k);return y.setStyle(te,X(X({},J),k)),y}},{key:"getIdRule",value:function(w){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},J=te.mediaText,R=te.state||"",k=(0,I.isUndefined)(J)?this.em.getCurrentMedia():J,v=this.em.get("SelectorManager").get(w,A.Z.TYPE_ID);return v&&this.get(v,R,k)}},{key:"setClassRule",value:function(w){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},R=J.state||"",k=J.mediaText||this.em.getCurrentMedia(),v=this.em.get("SelectorManager"),b=v.add({name:w,type:A.Z.TYPE_CLASS}),h=this.add(b,R,k);return h.setStyle(te,J),h}},{key:"getClassRule",value:function(w){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},J=te.state||"",R=te.mediaText||this.em.getCurrentMedia(),k=this.em.get("SelectorManager").get(w,A.Z.TYPE_CLASS);return k&&this.get(k,J,R)}},{key:"remove",value:function(w,te){var J=(0,I.isString)(w)?this.getRules(w):w,R=this.getAll().remove(J,te);return(0,I.isArray)(R)?R:[R]}},{key:"clear",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.getAll().reset(null,w),this}},{key:"getComponentRules",value:function(w){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},J=te.state,R=te.mediaText,k=te.current;k&&(J=this.em.get("state")||"",R=this.em.getCurrentMedia());var v=w.getId(),b=this.getAll().filter((function(h){if(((0,I.isUndefined)(J)||h.get("state")===J)&&((0,I.isUndefined)(R)||h.get("mediaText")===R))return h.getSelectorsString()==="#".concat(v)}));return b}},{key:"render",value:function(){var w;return(w=this.rulesView)===null||w===void 0||w.remove(),this.rulesView=new E.Z({collection:this.rules,config:this.c}),this.rulesView.render().el}},{key:"destroy",value:function(){var w;this.rules.reset(),this.rules.stopListening(),(w=this.rulesView)===null||w===void 0||w.remove(),[this.em,this.rules,this.rulesView].forEach((function(te){return null})),this.c={}}}]),f})(P.Z)},4868:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>$});var fe=S(5671),D=S(3144),ie=S(9340),ce=S(2963),ae=S(1120),se=S(2316),oe=S(9283);function W(re){var z=(function(){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}})();return function(){var F,G=(0,ae.Z)(re);if(z){var H=(0,ae.Z)(this).constructor;F=Reflect.construct(G,arguments,H)}else F=G.apply(this,arguments);return(0,ce.Z)(this,F)}}var I=(function(re){(0,ie.Z)(F,re);var z=W(F);function F(){return(0,fe.Z)(this,F),z.apply(this,arguments)}return(0,D.Z)(F,[{key:"tagName",value:function(){return"style"}},{key:"initialize",value:function(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.config=G.config||{};var H=this.model;this.listenTo(H,"change",this.render),this.listenTo(H,"destroy remove",this.remove),this.listenTo(H.get("selectors"),"change",this.render)}},{key:"render",value:function(){var G=this.model,H=this.el,ne=G.get("important");return H.innerHTML=G.toCSS({important:ne}),this}}]),F})(se.View);function g(re){var z=(function(){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}})();return function(){var F,G=(0,ae.Z)(re);if(z){var H=(0,ae.Z)(this).constructor;F=Reflect.construct(G,arguments,H)}else F=G.apply(this,arguments);return(0,ce.Z)(this,F)}}var P=(function(re){(0,ie.Z)(F,re);var z=g(F);function F(){return(0,fe.Z)(this,F),z.apply(this,arguments)}return(0,D.Z)(F,[{key:"_createElement",value:function(){return document.createTextNode("")}},{key:"render",value:function(){var G=this.model,H=G.get("important");return this.el.textContent=G.getDeclaration({important:H}),this}}]),F})(I);function x(re){var z=(function(){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}})();return function(){var F,G=(0,ae.Z)(re);if(z){var H=(0,ae.Z)(this).constructor;F=Reflect.construct(G,arguments,H)}else F=G.apply(this,arguments);return(0,ce.Z)(this,F)}}var A=function(re,z){return"".concat(re).concat(z?"-".concat(parseFloat(z)):"")},$=(function(re){(0,ie.Z)(F,re);var z=x(F);function F(){return(0,fe.Z)(this,F),z.apply(this,arguments)}return(0,D.Z)(F,[{key:"initialize",value:function(G){var H=G.config||{};this.atRules={},this.config=H,this.em=H.em,this.pfx=H.stylePrefix||"",this.className=this.pfx+"rules";var ne=this.collection;this.listenTo(ne,"add",this.addTo),this.listenTo(ne,"reset",this.render)}},{key:"addTo",value:function(G){this.addToCollection(G)}},{key:"addToCollection",value:function(G,H){if(this.renderStarted){var ne,ye,ee=H||null,O={model:G,config:this.config};if(G.get("atRuleType")==="keyframes"){var j=G.getAtRule(),E=this.atRules[j];if(!E){var B=document.createElement("style");E=document.createTextNode(""),B.appendChild(document.createTextNode("".concat(j,"{"))),B.appendChild(E),B.appendChild(document.createTextNode("}")),this.atRules[j]=E,ne=B}ye=new P(O),E.appendData(ye.render().el.textContent)}else ne=(ye=new I(O)).render().el;var X=this.className,_=G.get("mediaText"),M=A(X),s=M;if(_&&(s=A(X,this.getMediaWidth(_))),ne){var l,f=ee||this.el;try{l=f.querySelector("#".concat(s))}catch{}l||(l=f.querySelector("#".concat(M))),l.appendChild(ne)}return ne}}},{key:"getMediaWidth",value:function(G){return G&&G.replace("(".concat(this.em.getConfig().mediaCondition,": "),"").replace(")","")}},{key:"render",value:function(){var G=this;this.renderStarted=1,this.atRules={};var H=this.em,ne=this.$el,ye=this.className,ee=this.collection,O=document.createDocumentFragment();ne.empty();var j=H.get("DeviceManager").getAll().pluck("priority");return j.every((function(E){return E}
108))&&j.unshift(0),j.forEach((function(E){return O.appendChild((0,oe.ut)("div",{id:A(ye,E)}))})),ee.each((function(E){return G.addToCollection(E,O)})),ne.append(O),ne.attr("class",ye),this}}]),F})(se.View)},2004:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>te,evAdd:()=>M,evAddBefore:()=>s,evAll:()=>j,evPfx:()=>E,evRemove:()=>l,evRemoveBefore:()=>f,evSelect:()=>B,evSelectBefore:()=>X,evUpdate:()=>_});var fe=S(5671),D=S(3144),ie=S(7326),ce=S(9340),ae=S(2963),se=S(1120),oe=S(4942),W=S(9050),I=S(9714);const g={default:null,devices:[{id:"desktop",name:"Desktop",width:""},{id:"tablet",name:"Tablet",width:"770px",widthMedia:"992px"},{id:"mobileLandscape",name:"Mobile landscape",width:"568px",widthMedia:"768px"},{id:"mobilePortrait",name:"Mobile portrait",width:"320px",widthMedia:"480px"}]};var P=S(2316);function x(J){var R=(function(){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}})();return function(){var k,v=(0,se.Z)(J);if(R){var b=(0,se.Z)(this).constructor;k=Reflect.construct(v,arguments,b)}else k=v.apply(this,arguments);return(0,ae.Z)(this,k)}}var A=(function(J){(0,ce.Z)(k,J);var R=x(k);function k(){return(0,fe.Z)(this,k),R.apply(this,arguments)}return(0,D.Z)(k,[{key:"defaults",value:function(){return{name:"",width:null,height:"",widthMedia:null,priority:null}}},{key:"initialize",value:function(){var v=this;this.get("widthMedia")===null&&this.set("widthMedia",this.get("width")),this.get("width")===null&&this.set("width",this.get("widthMedia")),!this.get("priority")&&this.set("priority",parseFloat(this.get("widthMedia"))||0),["width","height","widthMedia"].forEach((function(b){return v.checkUnit(b)}))}},{key:"checkUnit",value:function(v){var b=this.get(v)||"";(parseFloat(b)||0).toString()===b.toString()&&this.set(v,"".concat(b,"px"))}},{key:"getName",value:function(){return this.get("name")||this.get("id")}},{key:"getWidthMedia",value:function(){return this.get("widthMedia")||""}}]),k})(P.Model);function $(J){var R=(function(){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}})();return function(){var k,v=(0,se.Z)(J);if(R){var b=(0,se.Z)(this).constructor;k=Reflect.construct(v,arguments,b)}else k=v.apply(this,arguments);return(0,ae.Z)(this,k)}}var re=(function(J){(0,ce.Z)(k,J);var R=$(k);function k(){return(0,fe.Z)(this,k),R.apply(this,arguments)}return(0,D.Z)(k,[{key:"comparator",value:function(v,b){var h=Number.MAX_VALUE;return(b.get("priority")||h)-(v.get("priority")||h)}},{key:"getSorted",value:function(){return this.sort()}}]),k})(P.Collection);re.prototype.model=A;var z,F=S(168),G=S(7539);function H(J){var R=(function(){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}})();return function(){var k,v=(0,se.Z)(J);if(R){var b=(0,se.Z)(this).constructor;k=Reflect.construct(v,arguments,b)}else k=v.apply(this,arguments);return(0,ae.Z)(this,k)}}var ne=(function(J){(0,ce.Z)(k,J);var R=H(k);function k(){return(0,fe.Z)(this,k),R.apply(this,arguments)}return(0,D.Z)(k,[{key:"template",value:function(v){var b=v.ppfx,h=v.label;return(0,G.Z)(z||(z=(0,F.Z)([` 109 <div class="`,'device-label">',`</div> 110 <div class="`,"field ",`select"> 111 <span id="`,`input-holder"> 112 <select class="`,`devices"></select> 113 </span> 114 <div class="`,`sel-arrow"> 115 <div class="`,`d-s-arrow"></div> 116 </div> 117 </div> 118 <button style="display:none" class="`,`add-trasp">+</button> 119 `])),b,h,b,b,b,b,b,b,b)}},{key:"events",value:function(){return{change:"updateDevice"}}},{key:"initialize",value:function(v){this.config=v.config||{},this.em=this.config.em,this.ppfx=this.config.pStylePrefix||"",this.events["click ."+this.ppfx+"add-trasp"]=this.startAdd,this.listenTo(this.em,"change:device",this.updateSelect),this.delegateEvents()}},{key:"startAdd",value:function(){}},{key:"updateDevice",value:function(){var v=this.em;if(v){var b=this.devicesEl,h=b?b.val():"";v.set("device",h)}}},{key:"updateSelect",value:function(){var v=this.em,b=this.devicesEl;if(v&&v.getDeviceModel&&b){var h=v.getDeviceModel(),m=h?h.get("id"):"";b.val(m)}}},{key:"getOptions",value:function(){var v=this.collection,b=this.em,h="";return v.each((function(m){var p=m.attributes,y=p.name,Z=p.id,Y=b&&b.t&&b.t("deviceManager.devices.".concat(Z))||y;h+='<option value="'.concat(Z||y,'">').concat(Y,"</option>")})),h}},{key:"render",value:function(){var v=this.em,b=this.ppfx,h=this.$el,m=this.el,p=v&&v.t&&v.t("deviceManager.device");return h.html(this.template({ppfx:b,label:p})),this.devicesEl=h.find(".".concat(b,"devices")),this.devicesEl.append(this.getOptions()),this.devicesEl.val(v.get("device")),m.className="".concat(b,"devices-c"),this}}]),k})(P.View);function ye(J,R){var k=Object.keys(J);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(J);R&&(v=v.filter((function(b){return Object.getOwnPropertyDescriptor(J,b).enumerable}))),k.push.apply(k,v)}return k}function ee(J){for(var R=1;R<arguments.length;R++){var k=arguments[R]!=null?arguments[R]:{};
119R%2?ye(Object(k),!0).forEach((function(v){(0,oe.Z)(J,v,k[v])})):Object.getOwnPropertyDescriptors?Object.defineProperties(J,Object.getOwnPropertyDescriptors(k)):ye(Object(k)).forEach((function(v){Object.defineProperty(J,v,Object.getOwnPropertyDescriptor(k,v))}))}return J}function O(J){var R=(function(){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}})();return function(){var k,v=(0,se.Z)(J);if(R){var b=(0,se.Z)(this).constructor;k=Reflect.construct(v,arguments,b)}else k=v.apply(this,arguments);return(0,ae.Z)(this,k)}}var j="device",E="".concat(j,":"),B="".concat(E,"select"),X="".concat(B,":before"),_="".concat(E,"update"),M="".concat(E,"add"),s="".concat(M,":before"),l="".concat(E,"remove"),f="".concat(l,":before"),w="change:device",te=(function(J){(0,ce.Z)(k,J);var R=O(k);function k(){var v;(0,fe.Z)(this,k);for(var b=arguments.length,h=new Array(b),m=0;m<b;m++)h[m]=arguments[m];return v=R.call.apply(R,[this].concat(h)),(0,oe.Z)((0,ie.Z)(v),"name","DeviceManager"),(0,oe.Z)((0,ie.Z)(v),"Device",A),(0,oe.Z)((0,ie.Z)(v),"Devices",re),(0,oe.Z)((0,ie.Z)(v),"events",{all:j,select:B,update:_,add:M,remove:l,removeBefore:f}),v}return(0,D.Z)(k,[{key:"init",value:function(){var v=this,b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.c=ee(ee({},g),b);var h=this.c.em;return this.devices=new re,this.c.devices.forEach((function(m){return v.add(m)})),this.em=h,this.all=this.devices,this.select(this.c.default||this.devices.at(0)),this.__initListen(),h.on(w,this._onSelect,this),this}},{key:"_onSelect",value:function(v,b,h){var m=this.em,p=this.events,y=v.previous("device"),Z=this.get(b),Y=p.select;m.trigger(Y,Z,this.get(y)),this.__catchAllEvent(Y,Z,h)}},{key:"add",value:function(v){var b,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=h;if((0,W.isString)(v)){var p=h;b=ee(ee({},m=arguments[2]||{}),{},{id:v,name:m.name||v,width:p})}else b=v;return b.id||(b.id=b.name||this._createId()),this.devices.add(b,m)}},{key:"get",value:function(v){return this.getAll().filter((function(b){return b.get("name")===v}))[0]||this.devices.get(v)||null}},{key:"remove",value:function(v){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.__remove(v,b)}},{key:"getDevices",value:function(){return this.devices.models}},{key:"select",value:function(v){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=(0,W.isString)(v)?this.get(v):v;return h&&this.em.set("device",h.get("id"),b),this}},{key:"getSelected",value:function(){return this.get(this.em.get("device"))}},{key:"getAll",value:function(){return this.devices}},{key:"render",value:function(){var v;return(v=this.view)===null||v===void 0||v.remove(),this.view=new ne({collection:this.devices,config:this.c}),this.view.render().el}},{key:"destroy",value:function(){var v;this.devices.stopListening(),this.devices.reset(),(v=this.view)===null||v===void 0||v.remove(),[this.devices,this.view].forEach((function(b){return null})),this.c={}}}]),k})(I.Z)},7375:(We,ke,S)=>{"use strict";S.d(ke,{ZP:()=>R,OA:()=>s,GN:()=>te,xH:()=>J});
119var fe=S(1002),D=S(2982),ie=S(885),ce=S(4942),ae=S(5671),se=S(3144),oe=S(1120);function W(k,v){for(;!Object.prototype.hasOwnProperty.call(k,v)&&(k=(0,oe.Z)(k))!==null;);return k}function I(){return I=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(k,v,b){var h=W(k,v);if(h){var m=Object.getOwnPropertyDescriptor(h,v);return m.get?m.get.call(arguments.length<3?k:b):m.value}},I.apply(this,arguments)}var g=S(9340),P=S(2963),x=S(9050),A=S(1163),$=S(9524),re=S(2316),z=S(8431),F=S(5963),G=S(966);function H(k,v){var b=Object.keys(k);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(k);v&&(h=h.filter((function(m){return Object.getOwnPropertyDescriptor(k,m).enumerable}))),b.push.apply(b,h)}return b}function ne(k){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?H(Object(b),!0).forEach((function(h){(0,ce.Z)(k,h,b[h])})):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(b)):H(Object(b)).forEach((function(h){Object.defineProperty(k,h,Object.getOwnPropertyDescriptor(b,h))}))}return k}function ye(k){var v=(function(){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}})();return function(){var b,h=(0,oe.Z)(k);if(v){var m=(0,oe.Z)(this).constructor;b=Reflect.construct(h,arguments,m)}else b=h.apply(this,arguments);return(0,P.Z)(this,b)}}var ee=(function(k){(0,g.Z)(b,k);var v=ye(b);function b(){return(0,ae.Z)(this,b),v.apply(this,arguments)}return(0,se.Z)(b,[{key:"initialize",value:function(){var h=this.attributes,m=h.target,p=h.name,y=h.changeProp;if(!this.get("id")&&this.set("id",p),m){this.target=m,this.unset("target");var Z=y?"change:".concat(p):"change:attributes:".concat(p);this.listenTo(m,Z,this.targetUpdated)}}},{key:"getId",value:function(){return this.get("id")}},{key:"getType",value:function(){return this.get("type")}},{key:"getName",value:function(){return this.get("name")}},{key:"getLabel",value:function(){var h,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=m.locale,y=p===void 0||p,Z=this.getId(),Y=this.get("label")||this.getName();return y&&((h=this.em)===null||h===void 0?void 0:h.t("traitManager.traits.labels.".concat(Z)))||Y}},{key:"getValue",value:function(){return this.getTargetValue()}},{key:"setValue",value:function(h){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p={};m.partial&&(p.avoidStore=!0),this.setTargetValue(h,p),m.partial===!1&&(this.setTargetValue(""),this.setTargetValue(h))}},{key:"props",value:function(){return this.attributes}},{key:"targetUpdated",value:function(){var h,m=this.getTargetValue();this.set({value:m},{fromTarget:1}),(h=this.em)===null||h===void 0||h.trigger("trait:update",{trait:this,component:this.target})}},{key:"getTargetValue",value:function(){var h,m=this.get("name"),p=this.target;return h=this.get("changeProp")?p.get(m):p.getAttributes()[m],(0,x.isUndefined)(h)?"":h}},{key:"setTargetValue",value:function(h){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=this.target,y=this.get("name");if(!(0,x.isUndefined)(h)){var Z=h;if(h==="false"?Z=!1:h==="true"&&(Z=!0),this.get("changeProp"))p.set(y,Z,m);else{var Y=ne({},p.get("attributes"));Y[y]=Z,p.set("attributes",Y,m)}}}},{key:"setValueFromInput",value:function(h){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},y={value:h};this.set(y,ne(ne({},p),{},{avoidStore:1})),m&&(this.set("value","",p),this.set(y,p))}},{key:"getInitValue",value:function(){var h,m=this.target,p=this.get("name");if(m){var y=m.get("attributes");h=this.get("changeProp")?m.get(p):y[p]}return h||this.get("value")||this.get("default")}}]),b})(re.Model);ee.prototype.defaults={type:"text",label:"",name:"",min:"",max:"",unit:"",step:1,value:"",target:"",default:"",placeholder:"",changeProp:0,options:[]};function O(k){var v=(function(){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}})();return function(){var b,h=(0,oe.Z)(k);if(v){var m=(0,oe.Z)(this).constructor;b=Reflect.construct(h,arguments,m)}else b=h.apply(this,arguments);return(0,P.Z)(this,b)}}var j=(function(k){(0,g.Z)(b,k);var v=O(b);function b(){return(0,ae.Z)(this,b),v.apply(this,arguments)}return(0,se.Z)(b,[{key:"initialize",value:function(h){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.em=m.em,this.listenTo(this,"add",this.handleAdd),this.listenTo(this,"reset",this.handleReset)}},{key:"handleReset",value:function(h){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=m.previousModels,y=p===void 0?[]:p;
119y.forEach((function(Z){return Z.trigger("remove")}))}},{key:"handleAdd",value:function(h){h.em=this.em;var m=this.target;m&&(h.target=m)}},{key:"setTarget",value:function(h){this.target=h}},{key:"add",value:function(h,m){var p=this.em;if((0,x.isString)(h)||(0,x.isArray)(h)){var y=p&&p.get&&p.get("TraitManager"),Z=(function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{build:function(C){var Q=[];typeof C=="string"&&(C=[C]);for(var pe=0;pe<C.length;pe++){var Ce={},Se=C[pe];Ce.name=Se,Se==="target"&&(Ce.type="select",Ce.default=!1,Ce.options=c.optionsTarget),Q.push(Ce)}return Q}}})(y&&y.getConfig());(0,x.isString)(h)&&(h=[h]);for(var Y=0,q=h.length;Y<q;Y++){var N=h[Y],a=(0,x.isString)(N)?Z.build(N)[0]:N;a.target=this.target,h[Y]=a}}return re.Collection.prototype.add.apply(this,[h,m])}}]),b})(re.Collection);function E(k,v){var b=Object.keys(k);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(k);v&&(h=h.filter((function(m){return Object.getOwnPropertyDescriptor(k,m).enumerable}))),b.push.apply(b,h)}return b}function B(k){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%2?E(Object(b),!0).forEach((function(h){(0,ce.Z)(k,h,b[h])})):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(b)):E(Object(b)).forEach((function(h){Object.defineProperty(k,h,Object.getOwnPropertyDescriptor(b,h))}))}return k}function X(k){var v=(function(){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}})();return function(){var b,h=(0,oe.Z)(k);if(v){var m=(0,oe.Z)(this).constructor;b=Reflect.construct(h,arguments,m)}else b=h.apply(this,arguments);return(0,P.Z)(this,b)}}j.prototype.model=ee;var _=function(k){return k.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},M=function(k){return k&&k.getConfig().avoidInlineStyle},s="component:drag",l="__symbols",f="__symbol",w="__symbol_ovrd",te="component:update",J="".concat(te,"-inside"),R=(function(k){(0,g.Z)(b,k);var v=X(b);function b(){return(0,ae.Z)(this,b),v.apply(this,arguments)}return(0,se.Z)(b,[{key:"init",value:function(){}},{key:"updated",value:function(h,m,p){}},{key:"removed",value:function(){}},{key:"initialize",value:function(){var h=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,x.bindAll)(this,"__upSymbProps","__upSymbCls","__upSymbComps");var y=p.em,Z=this.parent(),Y=Z&&Z.attributes,q=this.get("propagate");if(q&&this.set("propagate",(0,x.isArray)(q)?q:[q]),Y&&Y.propagate&&!q){var N={},a=Y.propagate;a.forEach((function(Ce){return N[Ce]=Z.get(Ce)})),N.propagate=a,this.set(B(B({},N),m))}if(p&&p.config&&p.config.voidElements.indexOf(this.get("tagName"))>=0&&this.set("void",!0),p.em=y,this.opt=p,this.em=y,this.frame=p.frame,this.config=p.config||{},this.set("attributes",B(B({},(0,x.result)(this,"defaults").attributes||{}),this.get("attributes")||{})),this.ccid=b.createId(this,p),this.initClasses(),this.initTraits(),this.initComponents(),this.initToolbar(),this.initScriptProps(),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:tagName",this.tagUpdated),this.listenTo(this,"change:attributes",this.attrUpdated),this.listenTo(this,"change:attributes:id",this._idUpdated),this.on("change:toolbar",this.__emitUpdateTlb),this.on("change",this.__onChange),this.on(J,this.__propToParent),this.set("status",""),this.views=[],["classes","traits","components"].forEach((function(Ce){var Se="add remove ".concat(Ce!=="components"?"change":"");h.listenTo(h.get(Ce),Se.trim(),(function(){for(var me=arguments.length,xe=new Array(me),de=0;de<me;de++)xe[de]=arguments[de];return h.emitUpdate.apply(h,[Ce].concat(xe))}))})),!p.temporary){var c=y&&y.get("CssComposer"),C=this.attributes,Q=C.styles,pe=C.type;Q&&c&&c.addCollection(Q,{},{group:"cmp:".concat(pe)}),this.__postAdd(),this.init(),this.__isSymbolOrInst()&&this.__initSymb(),y&&y.trigger("component:create",this)}}},{key:"__postAdd",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=this.em,p=m&&m.get("UndoManager"),y=this.components();p&&!this.__hasUm&&(p.add(y),p.add(this.getSelectors()),this.__hasUm=1),h.recursive&&y.map((function(Z){return Z.__postAdd(h)}))}},{key:"__postRemove",value:function(){var h=this.em,m=h&&h.get("UndoManager");m&&(m.remove(this.components()),m.remove(this.getSelectors()),delete this.__hasUm)}},{key:"__onChange",value:function(h,m){var p=this,y=this.changedAttributes();
119(0,x.keys)(y).forEach((function(Z){return p.emitUpdate(Z)})),["status","open","toolbar","traits"].forEach((function(Z){return delete y[Z]})),(0,A.isEmptyObj)(y)||(this.__changesUp(m),this.__propSelfToParent({component:this,changed:y,options:m}))}},{key:"__changesUp",value:function(h){var m=this.em;[this.frame,m].forEach((function(p){return p&&p.changesUp(h)}))}},{key:"__propSelfToParent",value:function(h){this.trigger(te,h),this.__propToParent(h)}},{key:"__propToParent",value:function(h){var m=this.parent();m&&m.trigger(J,h)}},{key:"__emitUpdateTlb",value:function(){this.emitUpdate("toolbar")}},{key:"is",value:function(h){return this.get("type")==h}},{key:"props",value:function(){return this.attributes}},{key:"index",value:function(){var h=this.collection;return h?h.indexOf(this):0}},{key:"setDragMode",value:function(h){return this.set("dmode",h)}},{key:"find",value:function(h){var m=[],p=this.view.$el.find(h);return p.each((function(y){var Z=p.eq(y).data("model");Z&&m.push(Z)})),m}},{key:"findType",value:function(h){var m=[];return(function p(y){return y.forEach((function(Z){Z.is(h)&&m.push(Z),p(Z.components())}))})(this.components()),m}},{key:"closest",value:function(h){var m=this.view.$el.closest(h);return m.length&&m.data("model")}},{key:"closestType",value:function(h){for(var m=this.parent();m&&!m.is(h);)m=m.parent();return m}},{key:"contains",value:function(h){var m=!1;if(!h)return m;var p=function y(Z){!m&&Z.forEach((function(Y){Y===h&&(m=!0),!m&&y(Y.components())}))};return p(this.components()),m}},{key:"tagUpdated",value:function(){this.trigger("rerender")}},{key:"replaceWith",value:function(h){var m=this.collection,p=m.indexOf(this);return m.remove(this),m.add(h,{at:p})}},{key:"attrUpdated",value:function(h,m){var p=this,y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Z=this.get("attributes"),Y=Z.class;Y&&this.setClass(Y),delete Z.class;var q=Z.style;q&&this.setStyle(q),delete Z.style;var N=B({},this.previous("attributes")),a=(0,A.shallowDiff)(N,this.get("attributes"));(0,x.keys)(a).forEach((function(c){return p.trigger("change:attributes:".concat(c),p,a[c],y)}))}},{key:"setAttributes",value:function(h){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.set("attributes",B({},h),m),this}},{key:"addAttributes",value:function(h){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.setAttributes(B(B({},this.getAttributes({noClass:1})),h),m)}},{key:"removeAttributes",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=Array.isArray(h)?h:[h],y=this.getAttributes();return p.map((function(Z){return delete y[Z]})),this.setAttributes(y,m)}},{key:"getStyle",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=this.em,y=(0,x.isString)(h)?h:"",Z=y?m:h;if(p&&p.getConfig().avoidInlineStyle&&!Z.inline){var Y=p.get("state"),q=p.get("CssComposer"),N=q.getIdRule(this.getId(),B({state:Y},Z));if(this.rule=N,N)return N.getStyle(y)}return I((0,oe.Z)(b.prototype),"getStyle",this).call(this,y)}},{key:"setStyle",value:function(){var h=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=this.em,Z=this.opt;if(y&&y.getConfig().avoidInlineStyle&&!Z.temporary&&!p.inline){var Y=this.get("style")||{};m=B(B({},m=(0,x.isString)(m)?this.parseStyle(m):m),Y);var q=y.get("state"),N=y.get("CssComposer"),a=this.getStyle(p);this.rule=N.setIdRule(this.getId(),m,B(B({},p),{},{state:q}));var c=(0,A.shallowDiff)(a,m);this.set("style","",{silent:1}),(0,x.keys)(c).forEach((function(C){return h.trigger("change:style:".concat(C))}))}else m=I((0,oe.Z)(b.prototype),"setStyle",this).apply(this,arguments);return m}},{key:"getAttributes",value:function(){var h,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=this.em,y=[],Z=B({},this.get("attributes")),Y=p&&p.get("SelectorManager"),q=this.getId();if(m.noClass||(this.get("classes").forEach((function(a){return y.push((0,x.isString)(a)?a:a.get("name"))})),y.length&&(Z.class=y.join(" "))),!m.noStyle){var N=this.get("style");(0,A.isObject)(N)&&!(0,A.isEmptyObj)(N)&&(Z.style=this.styleToString({inline:1}))}return(0,x.has)(Z,"id")||(M(p)?h=Y&&Y.get(q,Y.Selector.TYPE_ID):(0,x.isEmpty)(this.getStyle())||(h=1),(this.__getSymbol()||this.__getSymbols())&&(h=1),h&&(Z.id=q)),Z}},{key:"addClass",value:function(h){var m=this.em.get("SelectorManager").addClass(h);return this.get("classes").add(m)}},{key:"setClass",value:function(h){return this.get("classes").reset(),this.addClass(h)}},{key:"removeClass",value:function(h){var m=[];h=(0,x.isArray)(h)?h:[h];var p=this.get("classes"),y=F.Z.TYPE_CLASS;return h.forEach((function(Z){Z.split(" ").forEach((function(Y){var q=p.where({name:Y,type:y}
119)[0];q&&m.push(p.remove(q))}))})),m}},{key:"getClasses",value:function(){var h=this.getAttributes().class;return h?h.split(" "):[]}},{key:"__logSymbol",value:function(h,m){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},y=this.__getSymbol(),Z=this.__getSymbols();(y||Z)&&this.em.log(h,{model:this,toUp:m,context:"symbols",opts:p})}},{key:"__initSymb",value:function(){this.__symbReady||(this.on("change",this.__upSymbProps),this.__symbReady=1)}},{key:"__isSymbol",value:function(){return(0,x.isArray)(this.get(l))}},{key:"__isSymbolOrInst",value:function(){return!(!this.__isSymbol()&&!this.get(f))}},{key:"__isSymbolTop",value:function(){var h=this.parent();return this.__isSymbolOrInst()&&(!h||h&&!h.__isSymbol()&&!h.__getSymbol())}},{key:"__isSymbolNested",value:function(){if(!this.__isSymbolOrInst()||this.__isSymbolTop())return!1;var h=(this.__isSymbol()?this:this.__getSymbol()).__getSymbTop(),m=this.__getSymbTop();return(m.__isSymbol()?m:m.__getSymbol())!==h}},{key:"__getAllById",value:function(){var h=this.em;return h?h.get("DomComponents").allById():{}}},{key:"__getSymbol",value:function(){var h=this.get(f);if(h&&(0,x.isString)(h)){var m=this.__getAllById()[h];m?(h=m,this.set(f,m)):h=0}return h}},{key:"__getSymbols",value:function(){var h=this,m=this.get(l);return m&&(0,x.isArray)(m)&&(m.forEach((function(p,y){p&&(0,x.isString)(p)&&(m[y]=h.__getAllById()[p])})),m=m.filter((function(p){return p&&!(0,x.isString)(p)}))),m}},{key:"__isSymbOvrd",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",m=this.get(w),p=h.split(":"),y=(0,ie.Z)(p,1),Z=y[0],Y=h!==Z?[h,Z]:[h];return m===!0||(0,x.isArray)(m)&&Y.some((function(q){return m.indexOf(q)>=0}))}},{key:"__getSymbToUp",value:function(){var h=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=[],y=this.em,Z=m.changed,Y=y&&y.config.symbols;if(m.fromInstance||m.noPropagate||m.fromUndo||!Y||Z&&this.__isSymbOvrd(Z))return p;var q=this.__getSymbols()||[],N=this.__getSymbol(),a=N?[N].concat((0,D.Z)(N.__getSymbols()||[])):q;return p=a.filter((function(c){return c!==h})).filter((function(c){return!(Z&&c.__isSymbOvrd(Z))}))}},{key:"__getSymbTop",value:function(h){for(var m=this,p=this.parent(h);p&&(p.__isSymbol()||p.__getSymbol());)m=p,p=p.parent(h);return m}},{key:"__upSymbProps",value:function(h){var m=this,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=this.changedAttributes(),Z=y.attributes||{};if(delete y.status,delete y.open,delete y[l],delete y[f],delete y[w],delete y.attributes,delete Z.id,(0,A.isEmptyObj)(Z)||(y.attributes=Z),!(0,A.isEmptyObj)(y)){var Y=this.__getSymbToUp(p);(0,x.keys)(y).map((function(q){m.__isSymbOvrd(q)&&delete y[q]})),this.__logSymbol("props",Y,{opts:p,changed:y}),Y.forEach((function(q){var N=B({},y);(0,x.keys)(N).map((function(a){q.__isSymbOvrd(a)&&delete N[a]})),q.set(N,B({fromInstance:m},p))}))}}},{key:"__upSymbCls",value:function(h,m){var p=this,y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Z=this.__getSymbToUp(y);this.__logSymbol("classes",Z,{opts:y}),Z.forEach((function(Y){Y.set("classes",p.get("classes"),{fromInstance:p})})),this.__changesUp(y)}},{key:"__upSymbComps",value:function(h,m,p){var y=this,Z=p||m||{},Y={fromInstance:Z.fromInstance,fromUndo:Z.fromUndo},q=h.opt.temporary;if(p)if(p.add){var N=[],a=!!this.__getSymbols(),c=this.__getSymbToUp(B(B({},Y),{},{changed:"components:add"}));if(c.length){var C=h.__getSymbol();N=(C?C.__getSymbols():h.__getSymbols())||[],(N=(0,D.Z)(N)).push(C||h)}!q&&this.__logSymbol("add",c,{opts:p,addedInstances:N.map((function(He){return He.cid})),added:h.cid}),c.forEach((function(He){var et=He.__getSymbTop(),Ge=N.filter((function(yt){var St=yt.__getSymbTop({prev:1});return et&&St&&St===et}))[0]||h.clone({symbol:1,symbolInv:a});He.append(Ge,B({fromInstance:y},p))}))}else{var Q=h.__getSymbol();if(Q&&!p.temporary&&Q.set(l,Q.__getSymbols().filter((function(He){return He!==h}))),!h.__isSymbolTop()){var pe="components:remove",Ce=p.index,Se=h.parent(),me=B({fromInstance:h},p),xe=h.__isSymbolNested(),de=function(He){var et=He.parent();et&&!et.__isSymbOvrd(pe)&&He.remove(me)},Ee=Se.__isSymbOvrd(pe)?[]:h.__getSymbToUp(Y);xe&&(Ee=Se.__getSymbToUp(B(B({},Y),{},{changed:pe})),de=function(He){var et=He.components().at(Ce);et&&et.remove(B({fromInstance:Se},me))}),!q&&this.__logSymbol("remove",Ee,{opts:p,removed:h.cid,isSymbNested:xe}),Ee.forEach(de)}}else{var Fe=this.__getSymbToUp(B(B({},Y),{},{changed:"components:reset"}));this.__logSymbol("reset",Fe,{components:h.models}),Fe.forEach((function(He){var et=h.models.map((function(Ge){return Ge.clone({symbol:1})}));He.components().reset(et,B({fromInstance:y},m))}))}this.__changesUp(Z)}},{key:"initClasses",value:function(h,m){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},y="change:classes",Z=this.get("attributes").class||[],Y=[this,y,this.initClasses],q=this.get("classes")||Z,N=(0,x.isString)(q)?q.split(" "):q;this.stopListening.apply(this,Y);var a=this.normalizeClasses(N),c=new G.Z([]);return this.set("classes",c,p),c.add(a),c.on("add remove reset",this.__upSymbCls),this.listenTo.apply(this,Y),this}},{key:"initComponents",value:function(){var h=[this,"change:components",this.initComponents];this.stopListening.apply(this,h);var m=new z.Z(null,this.opt);m.parent=this;var p=this.get("components"),y=!this.opt.avoidChildren;return this.set("components",m),y&&p&&m.add((0,x.isFunction)(p)?p(this):p,this.opt),m.on("add remove reset",this.__upSymbComps),this.listenTo.apply(this,h),this}},{key:"initTraits",value:function(h){var m=this.em,p="change:traits";this.off(p,this.initTraits),this.__loadTraits();var y=B({},this.get("attributes")),Z=this.get("traits");return Z.each((function(Y){if(!Y.get("changeProp")){var q=Y.get("name"),N=Y.getInitValue();q&&N&&(y[q]=N)}})),Z.length&&this.set("attributes",y),this.on(p,this.initTraits),h&&m&&m.trigger("component:toggled"),this}},{key:"initScriptProps",value:function(){if(!this.opt.temporary){var h="script-props",m=["change:".concat(h),this.initScriptProps];this.off.apply(this,m);var p=this.previous(h)||[],y=this.get(h)||[],Z=p.map((function(q){return"change:".concat(q)})).join(" "),Y=y.map((function(q){return"change:".concat(q)})).join(" ");Z&&this.off(Z,this.__scriptPropsChange),Y&&this.on(Y,this.__scriptPropsChange),this.on.apply(this,m)}}},{key:"__scriptPropsChange",value:function(h,m){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};p.avoidStore||this.trigger("rerender")}},{key:"append",value:function(h){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=(0,x.isArray)(h)?h:[h],y=p.map((function(Y){return(0,x.isString)(Y)||Y.collection&&Y.collection.remove(Y,{temporary:1}),Y})),Z=this.components().add(y,m);return(0,x.isArray)(Z)?Z:[Z]}},{key:"components",value:function(h){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=this.get("components");return(0,x.isUndefined)(h)?p:(p.reset(null,m),h?this.append(h,m):[])}},{key:"getChildAt",value:function(h){return this.components().at(h||0)||null}},{key:"getLastChild",value:function(){var h=this.components();return h.at(h.length-1)||null}},{key:"empty",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.components().reset(null,h),this}},{key:"parent",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=this.collection||h.prev&&this.prevColl;return m?m.parent:null}},{key:"parents",value:function(){var h=this.parent();return h?[h].concat(h.parents()):[]}},{key:"scriptUpdated",value:function(){this.set("scriptUpdated",1)}},{key:"initToolbar",value:function(){var h=this.em,m=this,p=h&&h.getConfig().stylePrefix||"";if(!m.get("toolbar")&&h){var y=[];m.collection&&y.push({label:h.getIcon("arrowUp"),command:function(Z){return Z.runCommand("core:component-exit",{force:1})}}),m.get("draggable")&&y.push({attributes:{class:"".concat(p,"no-touch-actions"),draggable:!0},label:h.getIcon("move"),command:"tlb-move"}),m.get("copyable")&&y.push({label:h.getIcon("copy"),command:"tlb-clone"}),m.get("removable")&&y.push({label:h.getIcon("delete"),command:"tlb-delete"}
119),m.set("toolbar",y)}}},{key:"__loadTraits",value:function(h){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=h||this.get("traits");if(!(p instanceof j)){p=(0,x.isFunction)(p)?p(this):p;var y=new j([],this.opt);y.setTarget(this),p.length&&(p.forEach((function(Z){return Z.attributes&&delete Z.attributes.value})),y.add(p)),this.set({traits:y},m)}return this}},{key:"getTraits",value:function(){return this.__loadTraits(),(0,D.Z)(this.get("traits").models)}},{key:"setTraits",value:function(h){var m=(0,x.isArray)(h)?h:[h];return this.set({traits:m}),this.getTraits()}},{key:"getTrait",value:function(h){return this.getTraits().filter((function(m){return m.get("id")===h||m.get("name")===h}))[0]||null}},{key:"updateTrait",value:function(h,m){var p,y=this.getTrait(h);return y&&y.set(m),(p=this.em)===null||p===void 0||p.trigger("component:toggled"),this}},{key:"getTraitIndex",value:function(h){var m=this.getTrait(h);return m?this.get("traits").indexOf(m):-1}},{key:"removeTrait",value:function(h){var m,p=this,y=((0,x.isArray)(h)?h:[h]).map((function(q){return p.getTrait(q)})),Z=this.get("traits"),Y=y.length?Z.remove(y):[];return(m=this.em)===null||m===void 0||m.trigger("component:toggled"),(0,x.isArray)(Y)?Y:[Y]}},{key:"addTrait",value:function(h){var m,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.__loadTraits();var y=this.get("traits").add(h,p);return(m=this.em)===null||m===void 0||m.trigger("component:toggled"),(0,x.isArray)(y)?y:[y]}},{key:"normalizeClasses",value:function(h){var m=[],p=this.em,y=p&&p.get("SelectorManager");if(y)return h.models?(0,D.Z)(h.models):(h.forEach((function(Z){return m.push(y.add(Z))})),m)}},{key:"clone",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=this.em,p=B({},this.attributes),y=B({},this.opt),Z=this.getId(),Y=m&&m.get("CssComposer");p.attributes=B({},p.attributes),delete p.attributes.id,p.components=[],p.classes=[],p.traits=[],this.__isSymbolTop()&&(h.symbol=1),this.get("components").each((function(pe,Ce){p.components[Ce]=pe.clone(B(B({},h),{},{_inner:1}))})),this.get("traits").each((function(pe,Ce){p.traits[Ce]=pe.clone()})),this.get("classes").each((function(pe,Ce){p.classes[Ce]=pe.get("name")})),p.status="",y.collection=null;var q=new this.constructor(p,y),N="#".concat(q.getId()),a=Y?Y.getRules("#".concat(Z)):[];a.forEach((function(pe){var Ce=pe.clone();Ce.set("selectors",[N]),Y.getAll().add(Ce)})),q.set(l,0);var c=this.__getSymbol(),C=this.__getSymbols();h.symbol||!c&&!C?c?(c.set(l,[].concat((0,D.Z)(c.__getSymbols()),[q])),q.__initSymb()):h.symbol&&(this.__isSymbol()?(this.set(l,[].concat((0,D.Z)(C),[q])),q.set(f,this),q.__initSymb()):h.symbolInv?(this.set(l,[q]),q.set(f,this),[this,q].map((function(pe){return pe.__initSymb()}))):(q.set(l,[this]),[this,q].map((function(pe){return pe.__initSymb()})),this.set(f,q))):(q.set(f,0),q.set(l,0));var Q="component:clone";return m&&m.trigger(Q,q),this.trigger(Q,q),q}},{key:"getName",value:function(){var h=this.em,m=this.attributes,p=m.type,y=m.tagName,Z=m.name,Y=p||y,q=!p&&y,N="domComponents.names.",a=Z&&h?.t("".concat(N).concat(Z)),c=q&&h?.t("".concat(N).concat(q)),C=h&&(h.t("".concat(N).concat(p))||h.t("".concat(N).concat(y)));return this.get("custom-name")||a||Z||c||(0,A.capitalize)(q)||C||(0,A.capitalize)(Y)}},{key:"getIcon",value:function(){var h=this.get("icon");return h?h+" ":""}},{key:"toHTML",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=this,p=[],y=h.tag,Z=y||m.get("tagName"),Y=m.get("void"),q=h.attributes,N=this.getAttrToHTML();if(delete h.tag,q&&((0,x.isFunction)(q)?N=q(m,N)||{}:(0,A.isObject)(q)&&(N=q)),h.withProps){var a=this.toJSON();(0,x.forEach)(a,(function(xe,de){de[0]!=="_"&&["classes","attributes","components"].indexOf(de)<0&&(N["data-gjs-".concat(de)]=(0,x.isArray)(xe)||(0,A.isObject)(xe)?JSON.stringify(xe):xe)}))}for(var c in N){var C=N[c];if(!(0,x.isUndefined)(C)&&C!==null)if((0,x.isBoolean)(C))C&&p.push(c);else{var Q="";if(h.altQuoteAttr&&(0,x.isString)(C)&&C.indexOf('"')>=0)Q="'".concat(C.replace(/'/g,"'"),"'");else{var pe=(0,x.isString)(C)?C.replace(/"/g,"""):C;Q='"'.concat(pe,'"')}p.push("".concat(c,"=").concat(Q))}}var Ce=p.length?" ".concat(p.join(" ")):"",Se=m.getInnerHTML(h),me="<".concat(Z).concat(Ce).concat(Y?"/":"",">").concat(Se);return!Y&&(me+="</".concat(Z,">")),me}},{key:"getInnerHTML",value:function(h){return this.__innerHTML(h)}},{key:"__innerHTML",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=this.components();return m.length?m.map((function(p){return p.toHTML(h)})).join(""):this.get("content")}},{key:"getAttrToHTML",value:function(){var h=this.getAttributes();return delete h.style,h}},{key:"toJSON",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=re.Model.prototype.toJSON.call(this,h);if(m.attributes=this.getAttributes(),delete m.attributes.class,delete m.toolbar,delete m.traits,delete m.status,delete m.open,!h.fromUndo){var p=m[f],y=m[l];y&&(0,x.isArray)(y)&&(m[l]=y.filter((function(Z){return Z})).map((function(Z){return Z.getId?Z.getId():Z}))),p&&!(0,x.isString)(p)&&(m[f]=p.getId())}return this.em.getConfig().avoidDefaults&&this.getChangedProps(m),m}},{key:"getChangedProps",value:function(h){var m=h||re.Model.prototype.toJSON.apply(this),p=(0,x.result)(this,"defaults");return(0,x.forEach)(p,(function(y,Z){["type"].indexOf(Z)===-1&&m[Z]===y&&delete m[Z]})),(0,x.isEmpty)(m.type)&&delete m.type,(0,x.forEach)(["attributes","style"],(function(y){(0,x.isEmpty)(p[y])&&(0,x.isEmpty)(m[y])&&delete m[y]}
119)),(0,x.forEach)(["classes","components"],(function(y){(!m[y]||(0,x.isEmpty)(p[y])&&!m[y].length)&&delete m[y]})),m}},{key:"getId",value:function(){return(this.get("attributes")||{}).id||this.ccid||this.cid}},{key:"setId",value:function(h,m){var p=B({},this.get("attributes"));return p.id=h,this.set("attributes",p,m),this}},{key:"getEl",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,m=this.getView(h);return m&&m.el}},{key:"getView",value:function(h){var m=this.view,p=this.views;return h&&(m=p.filter((function(y){return y._getFrame()===h.view}))[0]),m}},{key:"getCurrentView",value:function(){var h=(this.em.get("currentFrame")||{}).model;return this.getView(h)}},{key:"__getScriptProps",value:function(){var h=this.props();return(this.get("script-props")||[]).reduce((function(m,p){return m[p]=h[p],m}),{})}},{key:"getScriptString",value:function(h){var m=this,p=h||this.get("script");if(!p)return p;if(this.get("script-props"))p=p.toString().trim();else{if(typeof p=="function"){var y=p.toString().trim();p=(y=y.replace(/^function[\s\w]*\(\)\s?\{/,"").replace(/\}$/,"")).trim()}var Z=this.em.getConfig(),Y=_(Z.tagVarStart||"{[ "),q=_(Z.tagVarEnd||" ]}"),N=new RegExp("".concat(Y,"([\\w\\d-]*)").concat(q),"g");p=p.replace(N,(function(a,c){m.scriptUpdated();var C=m.attributes[c]||"";return(0,x.isArray)(C)||(0,fe.Z)(C)=="object"?JSON.stringify(C):C}))}return p}},{key:"emitUpdate",value:function(h){for(var m=this.em,p=te+(h?":".concat(h):""),y=h&&this.get(h),Z=arguments.length,Y=new Array(Z>1?Z-1:0),q=1;q<Z;q++)Y[q-1]=arguments[q];h&&this.updated.apply(this,[h,y,h&&this.previous(h)].concat(Y)),this.trigger.apply(this,[p].concat(Y)),m&&m.trigger.apply(m,[p,this].concat(Y)),["components","classes"].indexOf(h)>=0&&this.__propSelfToParent({component:this,changed:{[h]:y},options:Y[2]||Y[1]||{}})}},{key:"onAll",value:function(h){return(0,x.isFunction)(h)&&(h(this),this.components().forEach((function(m){return m.onAll(h)}))),this}},{key:"remove",value:function(){var h=this,m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=this.em,y=this.collection,Z=function(){y&&y.remove(h,B(B({},m),{},{action:"remove-component"})),y||(h.components("",m),h.components().removeChildren(h,null,m))},Y=B({},m);return[this,p].map((function(q){return q.trigger("component:remove:before",h,Z,Y)})),!Y.abort&&Z(),this}},{key:"move",value:function(h){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(h){var p=m.at,y=this.index(),Z=h===this.parent(),Y=y===p||y===p-1;Z&&Y||(Z&&p&&p>y&&(m.at=p-1),this.remove({temporary:1}),h.append(this,m),this.emitUpdate())}return this}},{key:"isInstanceOf",value:function(h){var m,p,y=(m=this.em)===null||m===void 0||(p=m.get("DomComponents").getType(h))===null||p===void 0?void 0:p.model;return!!y&&this instanceof y}},{key:"isChildOf",value:function(h){for(var m=(0,x.isString)(h),p=this.parent();p;){if(m){if(p.isInstanceOf(h))return!0}else if(p===h)return!0;p=p.parent()}return!1}},{key:"resetId",value:function(){var h=this.em,m=this.getId();if(m){var p=b.createId(this);this.setId(p);var y=h&&h.get("CssComposer").getIdRule(m),Z=y&&y.get("selectors").at(0);return Z&&Z.set("name",p),this}}},{key:"_getStyleRule",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=h.id,p=this.em,y=m||this.getId();return p&&p.get("CssComposer").getIdRule(y)}},{key:"_getStyleSelector",value:function(h){var m=this._getStyleRule(h);return m&&m.get("selectors").at(0)}},{key:"_idUpdated",value:function(h,m){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!p.idUpdate){var y=this.ccid,Z=this.get("attributes")||{},Y=Z.id,q=(this.previous("attributes")||{}).id||y,N=b.getList(this);if(N[Y]||!Y&&q)return this.setId(q,{idUpdate:1});delete N[q],N[Y]=this,this.ccid=Y;var a=this._getStyleSelector({id:q});a&&a.set({name:Y,label:Y})}}}]),b})($.Z);R.isComponent=function(k){return{tagName:(0,A.toLowerCase)(k.tagName)}},R.ensureInList=function(k){var v=R.getList(k),b=k.getId(),h=v[b];if(h){if(h!==k){var m=R.getIncrementId(b,v);k.setId(m),v[m]=k}}else v[b]=k;
119k.components().forEach((function(p){return R.ensureInList(p)}))},R.createId=function(k){var v,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=R.getList(k),m=b.idMap,p=m===void 0?{}:m,y=k.get("attributes"),Z=y.id;return Z?(v=R.getIncrementId(Z,h,b),k.setId(v),Z!==v&&(p[Z]=v)):v=R.getNewId(h),h[v]=k,v},R.getNewId=function(k){for(var v=Object.keys(k).length.toString().length+2,b=(Math.random()+1.1).toString(36).slice(-v),h="i".concat(b);k[h];)h=R.getNewId(k);return h},R.getIncrementId=function(k,v){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h=b.keepIds,m=h===void 0?[]:h,p=1,y=k;if(m.indexOf(k)<0)for(;v[y];)p++,y="".concat(k,"-").concat(p);return y},R.getList=function(k){var v=k.opt,b=v===void 0?{}:v,h=b.domc,m=b.em,p=h||m&&m.get("DomComponents");return p?p.componentsById:{}},R.checkId=function(k){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},m=(0,x.isArray)(k)?k:[k],p=h.keepIds,y=p===void 0?[]:p;m.forEach((function(Z){var Y=Z.attributes,q=Y===void 0?{}:Y,N=Z.components,a=q.id;if(a&&b[a]&&y.indexOf(a)<0){var c=R.getIncrementId(a,b);q.id=c,(0,x.isArray)(v)&&v.forEach((function(C){var Q=C.selectors;Q.forEach((function(pe,Ce){pe==="#".concat(a)&&(Q[Ce]="#".concat(c))}))}))}N&&R.checkId(N,v,b,h)}))},R.getDefaults=function(){return(0,x.result)(this.prototype,"defaults")},R.prototype.defaults={tagName:"div",type:"",name:"",removable:!0,draggable:!0,droppable:!0,badgable:!0,stylable:!0,"stylable-require":"","style-signature":"",unstylable:"",highlightable:!0,copyable:!0,resizable:!1,editable:!1,layerable:!0,selectable:!0,hoverable:!0,locked:!1,void:!1,state:"",status:"",content:"",icon:"",style:"",styles:"",classes:"",script:"","script-props":"","script-export":"",attributes:"",traits:["id","title"],propagate:"",dmode:"",toolbar:null,[f]:0,[l]:0,[w]:0,_undo:!0,_undoexc:["status","open"]}},8431:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>ye});var fe=S(1002),D=S(2982),ie=S(4925),ce=S(5671),ae=S(3144),se=S(7326),oe=S(9340),W=S(2963),I=S(1120),g=S(4942),P=S(2316),x=S.n(P),A=S(9050),$=S(7375),re=["at"];function z(ee){var O=(function(){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}})();return function(){var j,E=(0,I.Z)(ee);if(O){var B=(0,I.Z)(this).constructor;j=Reflect.construct(E,arguments,B)}else j=E.apply(this,arguments);return(0,W.Z)(this,j)}}function F(ee,O){var j=Object.keys(ee);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(ee);O&&(E=E.filter((function(B){return Object.getOwnPropertyDescriptor(ee,B).enumerable}))),j.push.apply(j,E)}return j}function G(ee){for(var O=1;O<arguments.length;O++){var j=arguments[O]!=null?arguments[O]:{};O%2?F(Object(j),!0).forEach((function(E){(0,g.Z)(ee,E,j[E])})):Object.getOwnPropertyDescriptors?Object.defineProperties(ee,Object.getOwnPropertyDescriptors(j)):F(Object(j)).forEach((function(E){Object.defineProperty(ee,E,Object.getOwnPropertyDescriptor(j,E))}))}return ee}var H=function ee(O){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(!O)return[];var E=(0,A.isArray)(O)||(0,A.isFunction)(O.map)?O:[O];return E.map((function(B){j.push(B.getId()),ee(B.components().models,j)})),j},ne=function ee(O){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},B=(0,A.isArray)(O)?O:[O];return B.map((function(X){var _=X.attributes,M=_===void 0?{}:_,s=X.components,l=X.tagName,f=M.id,w=X;if(f&&j[f]&&(w=j[f],l&&w.set({tagName:l},G(G({},E),{},{silent:!0}))),s){var te=ee(s,j);if((0,A.isFunction)(w.components)){var J=w.components();J.length>0&&J.reset(te,E)}else w.components=te}return w}))},ye=(function(ee){(0,oe.Z)(j,ee);var O=z(j);function j(){var E;(0,ce.Z)(this,j);for(var B=arguments.length,X=new Array(B),_=0;_<B;_++)X[_]=arguments[_];return E=O.call.apply(O,[this].concat(X)),(0,g.Z)((0,se.Z)(E),"__onAddEnd",(0,A.debounce)((function(){}))),E}return(0,ae.Z)(j,[{key:"initialize",value:function(E){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.opt=B,this.listenTo(this,"add",this.onAdd),this.listenTo(this,"remove",this.removeChildren),this.listenTo(this,"reset",this.resetChildren);var X=B.em,_=B.config;this.config=_,this.em=X,this.domc=B.domc||X&&X.get("DomComponents")}},{key:"resetChildren",value:function(E){var B=this,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=this,M=X.previousModels||[],s=M.filter((function(f){return!E.get(f.cid)})),l=H(E);X.keepIds=H(M).filter((function(f){return l.indexOf(f)>=0}
119)),s.forEach((function(f){return B.removeChildren(f,_,X)})),E.each((function(f){return B.onAdd(f)}))}},{key:"resetFromString",value:function(){var E,B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};X.keepIds=H(this);var _=this.domc,M=_?.allById()||{},s=this.parseString(B,X),l=(0,A.isArray)(s)?s:[s],f=ne(l,M,X);this.reset(f,X),(E=this.em)===null||E===void 0||E.trigger("component:content",this.parent,X,B)}},{key:"removeChildren",value:function(E,B){var X=this,_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(E){var M=this.domc,s=this.em,l=_.temporary||_.fromUndo;if(E.prevColl=this,!l){var f=E.getId(),w=s.get("SelectorManager").getAll(),te=s.get("CssComposer").getAll(),J=(_.keepIds||[]).indexOf(f)<0,R=M?M.allById():{};delete R[f];var k=J?te.remove(te.filter((function(h){return h.getSelectors().getFullString()==="#".concat(f)})),_):[];w.remove(k.map((function(h){return h.getSelectors().at(0)}))),E.opt.temporary||(s.get("Commands").run("core:component-style-clear",{target:E}),E.removed(),E.trigger("removed"),s.trigger("component:remove",E));var v=E.components();v.forEach((function(h){return X.removeChildren(h,B,_)}))}var b=E.components();s.stopListening(b),s.stopListening(E),s.stopListening(E.get("classes")),E.__postRemove()}}},{key:"model",value:function(E,B){var X,_=B.collection.opt,M=_.em,s=M.get("DomComponents").componentTypes;B.em=M,B.config=_.config,B.componentTypes=s,B.domc=_.domc;for(var l=0;l<s.length;l++)if(s[l].id==E.type){X=s[l].model;break}return X||(X=s[s.length-1].model,M&&E.type&&M.logWarning("Component type '".concat(E.type,"' not found"),{attrs:E,options:B})),new X(E,B)}},{key:"parseString",value:function(E){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=this.em,_=this.domc,M=X.get("CssComposer"),s=X.get("Parser").parseHtml(E);if($.ZP.checkId(s.html,s.css,_.componentsById,B),s.css&&M&&!B.temporary){B.at;var l=(0,ie.Z)(B,re);M.addCollection(s.css,G(G({},l),{},{extend:1}))}return s.html}},{key:"add",value:function(E){var B=this,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};X.keepIds=[].concat((0,D.Z)(X.keepIds||[]),(0,D.Z)(H(X.previousModels))),(0,A.isString)(E)?E=this.parseString(E,X):(0,A.isArray)(E)&&(E=(0,D.Z)(E)).forEach((function(s,l){if((0,A.isString)(s)){var f=B.parseString(s,X);E[l]=(0,A.isArray)(f)&&!f.length?null:f}}));var _=(0,A.isArray)(E);E=(_?E:[E]).filter((function(s){return s})).map((function(s){return B.processDef(s)})),E=_?(0,A.flatten)(E,1):E[0];var M=x().Collection.prototype.add.apply(this,[E,X]);return this.__firstAdd=M,M}},{key:"processDef",value:function(E){if(E.cid&&E.ccid)return E;var B=this.em,X=this.config,_=(X===void 0?{}:X).processor,M=E;if(_){var s=_(M=G({},M));
119s&&((0,A.each)(M,(function(R,k){return delete M[k]})),(0,A.extend)(M,s))}if(M.$$typeof&&(0,fe.Z)(M.props)=="object"){(M=G({},M)).props=G({},M.props);var l=B.get("DomComponents"),f=B.get("Parser").parserHtml;(0,A.each)(M,(function(R,k){(0,A.includes)(["props","type"],k)||delete M[k]}));var w=M.props,te=w.children;delete w.children,delete M.props;var J=f.splitPropsFromAttr(w);M.attributes=J.attrs,te&&(M.components=te),M.type?l.getType(M.type)||(M.tagName=M.type,delete M.type):M.type="textnode",(0,A.extend)(M,J.props)}return M}},{key:"onAdd",value:function(E,B){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},_=this.domc,M=this.em,s=E.getStyle(),l=M&&M.getConfig().avoidInlineStyle;if(_&&_.Component.ensureInList(E),!(0,A.isEmpty)(s)&&!l&&M&&M.get&&M.getConfig().forceClass&&!X.temporary){var f=E.cid;M.get("CssComposer").setClassRule(f,s),E.setStyle({}),E.addClass(f)}E.__postAdd({recursive:1}),this.__onAddEnd()}}]),j})(x().Collection)},2169:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>G});var fe=S(4942),D=S(5671),ie=S(3144),ce=S(9340),ae=S(2963),se=S(1120),oe=S(2316),W=S.n(oe),I=S(9050),g=S(8431),P=S(3505),x=S(966),A=S(9283),$=S(1163);function re(H,ne){var ye=Object.keys(H);if(Object.getOwnPropertySymbols){var ee=Object.getOwnPropertySymbols(H);ne&&(ee=ee.filter((function(O){return Object.getOwnPropertyDescriptor(H,O).enumerable}))),ye.push.apply(ye,ee)}return ye}function z(H){for(var ne=1;ne<arguments.length;ne++){var ye=arguments[ne]!=null?arguments[ne]:{};ne%2?re(Object(ye),!0).forEach((function(ee){(0,fe.Z)(H,ee,ye[ee])})):Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(ye)):re(Object(ye)).forEach((function(ee){Object.defineProperty(H,ee,Object.getOwnPropertyDescriptor(ye,ee))}))}return H}function F(H){var ne=(function(){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}})();return function(){var ye,ee=(0,se.Z)(H);if(ne){var O=(0,se.Z)(this).constructor;ye=Reflect.construct(ee,arguments,O)}else ye=ee.apply(this,arguments);return(0,ae.Z)(this,ye)}}var G=(function(H){(0,ce.Z)(ye,H);var ne=F(ye);function ye(){return(0,D.Z)(this,ye),ne.apply(this,arguments)}return(0,ie.Z)(ye,[{key:"className",value:function(){return this.getClasses()}},{key:"tagName",value:function(){return this.model.get("tagName")}},{key:"initialize",value:function(){var ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=this.model,j=ee.config||{},E=j.em,B=O.opt||{},X=this.$el,_=this.el;this.opts=ee,this.modelOpt=B,this.config=j,this.em=E||"",this.pfx=j.stylePrefix||"",this.ppfx=j.pStylePrefix||"",this.attr=O.get("attributes"),this.classe=this.attr.class||[],this.listenTo(O,"change:style",this.updateStyle),this.listenTo(O,"change:attributes",this.renderAttributes),this.listenTo(O,"change:highlightable",this.updateHighlight),this.listenTo(O,"change:status change:locked",this.updateStatus),this.listenTo(O,"change:script rerender",this.reset),this.listenTo(O,"change:content",this.updateContent),this.listenTo(O,"change",this.handleChange),this.listenTo(O,"active",this.onActive),this.listenTo(O,"disable",this.onDisable),X.data("model",O),(0,$.setViewEl)(_,this),O.view=this,this._getFrame()&&O.views.push(this),this.initClasses(),this.initComponents({avoidRender:1}),this.events=z(z({},this.constructor.getEvents()),{},{dragstart:"handleDragStart"}),this.delegateEvents(),!B.temporary&&this.init(this._clbObj())}},{key:"__isDraggable",value:function(){var ee=this.model,O=this.config,j=ee.attributes.draggable;return O.draggableComponents&&j}},{key:"_clbObj",value:function(){var ee=this.em,O=this.model,j=this.el;return{editor:ee&&ee.getEditor(),model:O,el:j}}},{key:"init",value:function(){}},{key:"removed",value:function(){}},{key:"onActive",value:function(){}},{key:"onDisable",value:function(){}},{key:"remove",value:function(){var ee;W().View.prototype.remove.apply(this,arguments);var O=this.model,j=this.$el,E=O.views,B=this._getFrame()||{};
119return O.components().forEach((function(X){var _=X.getView(B.model);_?.remove()})),(ee=this.childrenView)===null||ee===void 0||ee.remove(),E.splice(E.indexOf(this),1),this.removed(this._clbObj()),j.data({model:"",collection:"",view:""}),this}},{key:"handleDragStart",value:function(ee){if(!this.__isDraggable())return!1;ee.stopPropagation(),ee.preventDefault(),this.em.get("Commands").run("tlb-move",{target:this.model,event:ee})}},{key:"initClasses",value:function(){var ee=this.model,O="change:classes",j=ee.get("classes");j instanceof x.Z&&(this.stopListening(ee,O,this.initClasses),this.listenTo(ee,O,this.initClasses),this.listenTo(j,"add remove change",this.updateClasses),j.length&&this.importClasses())}},{key:"initComponents",value:function(){var ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=this.model,j=this.$el,E=this.childrenView,B="change:components",X=O.get("components"),_=[O,B,this.initComponents];X instanceof g.Z&&(j.data("collection",X),E&&E.remove(),this.stopListening.apply(this,_),!ee.avoidRender&&this.renderChildren(),this.listenTo.apply(this,_))}},{key:"handleChange",value:function(){var ee=this.model,O=(0,I.keys)(ee.changed);if(O.length!==1||O[0]!=="status")for(var j in ee.emitUpdate(),ee.changed)ee.emitUpdate(j)}},{key:"importClasses",value:function(){var ee=this.config.em.get("SelectorManager");ee&&this.model.get("classes").each((function(O){ee.add(O.get("name"))}))}},{key:"updateStatus",value:function(){var ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=this.em,j=this.el,E=this.ppfx,B=this.model,X=O?O.get("Canvas").getConfig():{},_=X.extHl,M=B.get("status"),s="".concat(E,"selected"),l="".concat(s,"-parent"),f="".concat(E,"freezed"),w="".concat(E,"hovered"),te="".concat(E,"no-pointer"),J=[s,l,f,w,te],R=_&&!ee.noExtHl?"":s;this.$el.removeClass(J.join(" "));var k=j.getAttribute("class")||"",v=[k];switch(M){case"selected":v.push(R);break;case"selected-parent":v.push(l);break;case"freezed":v.push(f);break;case"freezed-selected":v.push(f,R);break;case"hovered":!ee.avoidHover&&v.push(w)}B.get("locked")&&v.push(te);var b=v.filter(Boolean).join(" ");b&&j.setAttribute("class",b)}},{key:"updateHighlight",value:function(){var ee=this.model,O=ee.get("textable"),j=ee.get("highlightable")&&(O||!ee.isChildOf("text"));this.setAttribute("data-gjs-highlightable",!!j||"")}},{key:"updateStyle",value:function(ee,O){var j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},E=this.model,B=this.em;if(B&&B.getConfig().avoidInlineStyle&&!j.inline){var X=E.getStyle();!(0,I.isEmpty)(X)&&E.setStyle(X)}else this.setAttribute("style",E.styleToString(j))}},{key:"updateClasses",value:function(){var ee=this.model.get("classes").pluck("name").join(" ");this.setAttribute("class",ee),this.updateStatus(),this.onAttrUpdate()}},{key:"setAttribute",value:function(ee,O){var j=this.$el;O?j.attr(ee,O):j.removeAttr(ee)}},{key:"getClasses",value:function(){return this.model.getClasses().join(" ")}},{key:"updateAttributes",value:function(){var ee=[],O=this.model,j=this.$el,E=this.el,B=O.attributes,X=B.textable,_=B.type,M=z(z({id:O.getId(),"data-gjs-type":_||"default"},this.__isDraggable()&&{draggable:!0}),X&&{contenteditable:"false"});(0,I.each)(E.attributes,(function(l){return ee.push(l.nodeName)})),ee.forEach((function(l){return j.removeAttr(l)})),this.updateStyle(),this.updateHighlight();var s=z(z({},M),O.getAttributes());(0,I.keys)(s).forEach((function(l){return s[l]===!1&&delete s[l]})),j.attr(s)}},{key:"updateContent",value:function(){var ee=this.model.get("content"),O=this.model.components().length;this.getChildrenContainer().innerHTML=O?"":ee}},{key:"prevDef",value:function(ee){ee.preventDefault()}},{key:"updateScript",value:function(){var ee=this.model,O=this.em;ee.get("script")&&O&&O.get("Canvas").getCanvasView().updateScript(this)}},{key:"getChildrenContainer",value:function(){var ee=this.el;return typeof this.getChildrenSelector=="function"?ee=this.el.querySelector(this.getChildrenSelector()):this.getTemplate,ee}},{key:"getOffsetRect",value:function(){var ee={},O=this.el,j=0,E=0;return(function B(X){var _=X.offsetParent;_?(j+=_.offsetTop,E+=_.offsetLeft,B(_)):(ee.top=O.offsetTop+j,ee.left=O.offsetLeft+E,ee.bottom=ee.top+O.offsetHeight,ee.right=ee.left+O.offsetWidth)})(O),ee}},{key:"isInViewport",value:function(){var ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=ee.rect,j=this.el,E=j.ownerDocument,B=E.body,X=E.defaultView.frameElement,_=O||this.getOffsetRect(),M=_.top,s=_.left,l=this._getFrame().getOffsetRect();return M>=l.scrollTop&&s>=l.scrollLeft&&M<=l.scrollBottom&&s<=X.offsetWidth+B.scrollLeft}},{key:"scrollIntoView",value:function(){var ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=this.getOffsetRect(),j=this.isInViewport({rect:O});if(!j||ee.force){var E=this.el;ee.behavior!=="smooth"?E.ownerDocument.defaultView.scrollTo(0,O.top):E.scrollIntoView(z({behavior:"smooth",block:"nearest"},ee))}}},{key:"reset",value:function(){var ee=this.el;this.el="",this._ensureElement(),this._setData(),(0,A.dL)(ee,this.el),this.render()}},{key:"_setData",value:function(){var ee=this.model,O=ee.components();this.$el.data({model:ee,collection:O,view:this})}},{key:"_getFrame",value:function(){var ee;return(ee=this.config.em)===null||ee===void 0?void 0:ee.get("Canvas").config.frameView}},{key:"renderChildren",value:function(){this.updateContent();var ee=this.getChildrenContainer(),O=this.childrenView||new P.Z({collection:this.model.get("components"),config:this.config,componentTypes:this.opts.componentTypes});O.render(ee),this.childrenView=O;for(var j=Array.prototype.slice.call(O.el.childNodes),E=0,B=j.length;E<B;E++)ee.appendChild(j.shift())}},{key:"renderAttributes",value:function(){this.updateAttributes(),this.updateClasses()}},{key:"onAttrUpdate",value:function(){}},{key:"render",value:function(){return this.renderAttributes(),this.modelOpt.temporary||(this.renderChildren(),this.updateScript(),(0,$.setViewEl)(this.el,this),this.postRender()),this}},{key:"postRender",value:function(){this.modelOpt.temporary||this.onRender(this._clbObj())}},{key:"onRender",value:function(){}}]),ye})(W().View);G.getEvents=function(){return(0,I.result)(this.prototype,"events")}},3505:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>P});var fe=S(5671),D=S(3144),ie=S(9340),ce=S(2963),ae=S(1120),se=S(2316),oe=S.n(se),W=S(9050),I=S(9283);function g(x){var A=(function(){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}})();return function(){var $,re=(0,ae.Z)(x);if(A){var z=(0,ae.Z)(this).constructor;$=Reflect.construct(re,arguments,z)}else $=re.apply(this,arguments);return(0,ce.Z)(this,$)}}var P=(function(x){(0,ie.Z)($,x);var A=g($);function $(){return(0,fe.Z)(this,$),A.apply(this,arguments)}return(0,D.Z)($,[{key:"initialize",value:function(re){this.opts=re||{},this.config=re.config||{},this.em=this.config.em;var z=this.collection;this.listenTo(z,"add",this.addTo),this.listenTo(z,"reset",this.resetChildren),this.listenTo(z,"remove",this.removeChildren)}},{key:"removeChildren",value:function(re,z){var F=this,G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};re.views.forEach((function(ne){if(ne){var ye=ne.childrenView,ee=ne.scriptContainer;ye&&ye.stopListening(),(0,I.L_)(ee),ne.remove.apply(ne)}}));var H=re.components();H.forEach((function(ne){return F.removeChildren(ne,z,G)}))}},{key:"addTo",value:function(re){var z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},F=this.config.em,G=this.collection.indexOf(re);if(this.addToCollection(re,null,G),F&&!z.temporary){var H=function ne(ye){F.trigger("component:add",ye),ye.components().forEac
119h((function(ee){return ne(ee)}))};H(re)}}},{key:"addToCollection",value:function(re,z,F){this.compView||(this.compView=S(2169).Z);for(var G=this.config,H=this.opts,ne=this.em,ye=z||null,ee=G.frameView,O=ee===void 0?{}:ee,j=O.model&&re.getView(O.model),E=H.componentTypes||ne&&ne.get("DomComponents").getTypes(),B=re.get("type")||"default",X=this.compView,_=0;_<E.length;_++)if(E[_].id==B){X=E[_].view;break}var M,s=j||new X({model:re,config:G,componentTypes:E});try{M=s.render().el}catch(te){M=document.createTextNode(""),ne.logError(te)}if(ye)ye.appendChild(M);else{var l=this.parentEl,f=l.childNodes;if((0,W.isUndefined)(F))l.appendChild(M);else{var w=f.length==F;w&&F--,w||!f.length?l.appendChild(M):l.insertBefore(M,f[F])}}return re.opt.temporary||ne==null||ne.trigger("component:mount",re),M}},{key:"resetChildren",value:function(re){var z=this,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},G=F.previousModels,H=G===void 0?[]:G;this.parentEl.innerHTML="",H.forEach((function(ne){return z.removeChildren(ne,z.collection)})),re.each((function(ne){return z.addToCollection(ne)}))}},{key:"render",value:function(re){var z=this,F=this.el,G=document.createDocumentFragment();return this.parentEl=re||this.el,this.collection.each((function(H){return z.addToCollection(H,G)})),F.innerHTML="",F.appendChild(G),this}}]),$})(oe().View)},9524:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>re});var fe=S(5671),D=S(3144),ie=S(7326),ce=S(9340),ae=S(2963),se=S(1120),oe=S(4942),W=S(9050),I=S(1163),g=S(5311),P=S(2316);function x(z,F){var G=Object.keys(z);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(z);F&&(H=H.filter((function(ne){return Object.getOwnPropertyDescriptor(z,ne).enumerable}))),G.push.apply(G,H)}return G}function A(z){for(var F=1;F<arguments.length;F++){var G=arguments[F]!=null?arguments[F]:{};F%2?x(Object(G),!0).forEach((function(H){(0,oe.Z)(z,H,G[H])})):Object.getOwnPropertyDescriptors?Object.defineProperties(z,Object.getOwnPropertyDescriptors(G)):x(Object(G)).forEach((function(H){Object.defineProperty(z,H,Object.getOwnPropertyDescriptor(G,H))}))}return z}function $(z){var F=(function(){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}})();return function(){var G,H=(0,se.Z)(z);if(F){var ne=(0,se.Z)(this).constructor;G=Reflect.construct(H,arguments,ne)}else G=H.apply(this,arguments);return(0,ae.Z)(this,G)}}var re=(function(z){(0,ce.Z)(G,z);var F=$(G);function G(){var H;(0,fe.Z)(this,G);for(var ne=arguments.length,ye=new Array(ne),ee=0;ee<ne;ee++)ye[ee]=arguments[ee];return H=F.call.apply(F,[this].concat(ye)),(0,oe.Z)((0,ie.Z)(H),"parseStyle",(0,g.Z)().parseStyle),H}return(0,D.Z)(G,[{key:"extendStyle",value:function(H){return A(A({},this.getStyle()),H)}},{key:"getStyle",value:function(H){var ne=A({},this.get("style")||{});return H&&(0,W.isString)(H)?ne[H]:ne}},{key:"setStyle",value:function(){var H=this,ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,W.isString)(ne)&&(ne=this.parseStyle(ne));var ee=this.getStyle(ye),O=A({},ne),j=A({},O);(0,W.keys)(j).forEach((function(B){j[B]===""&&delete j[B]})),this.set("style",j,ye);var E=(0,I.shallowDiff)(ee,O);return delete E.__p,(0,W.keys)(E).forEach((function(B){var X=H.em;ye.noEvent||(H.trigger("change:style:".concat(B)),X&&(X.trigger("styleable:change",H,B,ye),X.trigger("styleable:change:".concat(B),H,B,ye)))})),O}},{key:"addStyle",value:function(H){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};typeof H=="string"?H={prop:ne}:ye=ne||{},H=this.extendStyle(H),this.setStyle(H,ye)}},{key:"removeStyle",value:function(H){var ne=this.getStyle();delete ne[H],this.setStyle(ne)}},{key:"styleToString",value:function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ne=[],ye=this.getStyle(H);for(var ee in ye){var O=H.important,j=(0,W.isArray)(O)?O.indexOf(ee)>=0:O,E="".concat(ye[ee]).concat(j?" !important":""),B=ee.substr(0,2)=="__";
119E&&!B&&ne.push("".concat(ee,":").concat(E,";"))}return ne.join("")}},{key:"getSelectors",value:function(){return this.get("selectors")||this.get("classes")}},{key:"getSelectorsString",value:function(H){return this.selectorsToString?this.selectorsToString(H):this.getSelectors().getFullString()}},{key:"_validate",value:function(H,ne){var ye,ee=H.style,O=this.em||ne.em,j=O==null||(ye=O.get("CssComposer"))===null||ye===void 0?void 0:ye.getConfig().onBeforeStyle;if(ee&&j){var E=j(A({},ee));E&&(0,W.keys)(ee).map((function(B){(0,W.isUndefined)(E[B])&&delete H.style[B]})),E&&(0,W.keys)(E).map((function(B){H.style[B]=E[B]}))}return!0}}]),G})(P.Model)},793:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>se});var fe=S(4942),D=S(9050),ie=S(2316);function ce(oe,W){var I=Object.keys(oe);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(oe);W&&(g=g.filter((function(P){return Object.getOwnPropertyDescriptor(oe,P).enumerable}))),I.push.apply(I,g)}return I}function ae(oe){for(var W=1;W<arguments.length;W++){var I=arguments[W]!=null?arguments[W]:{};W%2?ce(Object(I),!0).forEach((function(g){(0,fe.Z)(oe,g,I[g])})):Object.getOwnPropertyDescriptors?Object.defineProperties(oe,Object.getOwnPropertyDescriptors(I)):ce(Object(I)).forEach((function(g){Object.defineProperty(oe,g,Object.getOwnPropertyDescriptor(I,g))}))}return oe}const se={types:[],initialize:function(oe){var W=this,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=I.em;this.em=g,this.opts=I,this.model=function(){var x,A,$,re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(re&&re.type){var F=W.getBaseType();x=($=W.getType(re.type))?$.model:F.model,A=$?$.view:F.view}else{var G=W.recognizeType(re);x=($=G.type).model,A=$.view,re=G.attributes}var H=new x(re,ae(ae({},z),{},{em:g}));return H.typeView=A,H};var P=this.init&&this.init.bind(this);P&&P()},recognizeType:function(oe){for(var W=this.getTypes(),I=0;I<W.length;I++){var g=W[I],P=g.isType(oe);if(P=typeof P=="boolean"&&P?{type:g.id}:P)return{type:g,attributes:P}}return{type:this.getBaseType(),attributes:oe}},getBaseType:function(){var oe=this.getTypes();return oe[oe.length-1]},getTypes:function(){return this.types},getType:function(oe){for(var W=this.getTypes(),I=0;I<W.length;I++){var g=W[I];if(g.id===oe)return g}},addType:function(oe,W){var I=this.getType(oe),g=this.getBaseType(),P=I?I.model:g.model,x=I?I.view:g.view,A=W.model,$=W.view,re=W.isType;A=A instanceof ie.Model||(0,D.isFunction)(A)?A:P.extend(A||{}),$=$ instanceof ie.View||(0,D.isFunction)($)?$:x.extend($||{}),!this.extendViewApi||W.model||W.view||($=$.extend(W)),I?(I.model=A,I.view=$,I.isType=re||I.isType):(W.id=oe,W.model=A,W.view=$,W.isType=re||function(z){if(z&&z.type==oe)return!0},this.getTypes().unshift(W))}}},8659:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>g});var fe=S(5671),D=S(3144),ie=S(9340),ce=S(2963),ae=S(1120),se=S(2316),oe=S.n(se);function W(P){var x=(function(){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}})();return function(){var A,$=(0,ae.Z)(P);if(x){var re=(0,ae.Z)(this).constructor;A=Reflect.construct($,arguments,re)}else A=$.apply(this,arguments);return(0,ce.Z)(this,A)}}var I=oe().$,g=(function(P){(0,ie.Z)(A,P);var x=W(A);function A(){var $,re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,fe.Z)(this,A),$=x.call(this,re);var z=re.ppfx||"";return $.opts=re,$.ppfx=z,$.em=re.target||{},!re.onChange&&$.listenTo($.model,"change:value",$.handleModelChange),$}return(0,D.Z)(A,[{key:"template",value:function(){return'<span class="'.concat(this.holderClass(),'"></span>')}},{key:"inputClass",value:function(){return"".concat(this.ppfx,"field")}},{key:"holderClass",value:function(){return"".concat(this.ppfx,"input-holder")}},{key:"elementUpdated",value:function(){this.model.trigger("el:change")}},{key:"setValue",value:function($){var re=this.model,z=$||re.get("defaults"),F=this.getInputEl();F&&(F.value=z)}},{key:"handleModelChange",value:function($,re,z){this.setValue(re,z)}},{key:"handleChange",value:function($){$.stopPropagation();var re=this.getInputEl().value;this.__onInputChange(re),this.elementUpdated()}},{key:"__onInputChange",value:function($){this.model.set({value:$},{fromInput:1})}},{key:"getInputEl",value:function(){if(!this.inputEl){var $=this.model,re=this.opts.type||"text",z=$.get("placeholder")||$.get("defaults")||$.get("default")||"";this.inputEl=I('<input type="'.concat(re,'" placeholder="').concat(z,'">'))}return this.inputEl.get(0)}},{key:"render",value:function(){this.inputEl=null;var $=this.$el;return $.addClass(this.inputClass()),$.html(this.template()),$.find(".".concat(this.holderClass())).append(this.getInputEl()),this}}]),A})(oe().View);g.prototype.events={change:"handleChange"}},1511:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>G});var fe=S(4942),D=S(5671),ie=S(3144),ce=S(9340),ae=S(2963),se=S(1120),oe=S(2316),W=S.n(oe),I=S(9050),g=S(1002),P=S(1163),x=S(8659);function A(H,ne){var ye=Object.keys(H);if(Object.getOwnPropertySymbols){var ee=Object.getOwnPropertySymbols(H);ne&&(ee=ee.filter((function(O){return Object.getOwnPropertyDescriptor(H,O).enumerable}))),ye.push.apply(ye,ee)}return ye}function $(H){for(var ne=1;
119ne<arguments.length;ne++){var ye=arguments[ne]!=null?arguments[ne]:{};ne%2?A(Object(ye),!0).forEach((function(ee){(0,fe.Z)(H,ee,ye[ee])})):Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(ye)):A(Object(ye)).forEach((function(ee){Object.defineProperty(H,ee,Object.getOwnPropertyDescriptor(ye,ee))}))}return H}function re(H){var ne=(function(){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}})();return function(){var ye,ee=(0,se.Z)(H);if(ne){var O=(0,se.Z)(this).constructor;ye=Reflect.construct(ee,arguments,O)}else ye=ee.apply(this,arguments);return(0,ae.Z)(this,ye)}}var z=W().$;z&&(function(H,ne){if((0,P.hasWin)()){var ye={beforeShow:Y,move:Y,change:Y,show:Y,hide:Y,color:!1,flat:!1,showInput:!1,allowEmpty:!1,showButtons:!0,clickoutFiresChange:!0,showInitial:!1,showPalette:!1,showPaletteOnly:!1,hideAfterPaletteSelect:!1,togglePaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,appendTo:"body",maxSelectionSize:7,cancelText:"cancel",chooseText:"choose",togglePaletteMoreText:"more",togglePaletteLessText:"less",clearText:"Clear Color Selection",noColorSelectedText:"No Color Selected",preferredFormat:!1,className:"",containerClassName:"",replacerClassName:"",showAlpha:!1,theme:"sp-light",palette:[["#ffffff","#000000","#ff0000","#ff8000","#ffff00","#008000","#0000ff","#4b0082","#9400d3"]],selectionPalette:[],disabled:!1,offset:null},ee=[],O=!!/msie/i.exec(window.navigator.userAgent),j=(function(){function Te($e,at){return!!~(""+$e).indexOf(at)}var Ne=document.createElement("div").style;return Ne.cssText="background-color:rgba(0,0,0,.5)",Te(Ne.backgroundColor,"rgba")||Te(Ne.backgroundColor,"hsla")})(),E=["<div class='sp-replacer'>","<div class='sp-preview'><div class='sp-preview-inner'></div></div>","<div class='sp-dd'>▼</div>","</div>"].join(""),B=(function(){var Te="";if(O)for(var Ne=1;Ne<=6;Ne++)Te+="<div class='sp-"+Ne+"'></div>";return["<div class='sp-container sp-hidden'>","<div class='sp-palette-container'>","<div class='sp-palette sp-thumb sp-cf'></div>","<div class='sp-palette-button-container sp-cf'>","<button type='button' class='sp-palette-toggle'></button>","</div>","</div>","<div class='sp-picker-container'>","<div class='sp-top sp-cf'>","<div class='sp-fill'></div>","<div class='sp-top-inner'>","<div class='sp-color'>","<div class='sp-sat'>","<div class='sp-val'>","<div class='sp-dragger'></div>","</div>","</div>","</div>","<div class='sp-clear sp-clear-display'>","</div>","<div class='sp-hue'>","<div class='sp-slider'></div>",Te,"</div>","</div>","<div class='sp-alpha'><div class='sp-alpha-inner'><div class='sp-alpha-handle'></div></div></div>","</div>","<div class='sp-input-container sp-cf'>","<input class='sp-input' type='text' spellcheck='false' />","</div>","<div class='sp-initial sp-thumb sp-cf'></div>","<div class='sp-button-container sp-cf'>","<a class='sp-cancel' href='#'></a>","<button type='button' class='sp-choose'></button>","</div>","</div>","</div>"].join("")})(),X="spectrum.id";H.fn.spectrum=function(Te,Ne){if(typeof Te=="string"){var $e=this,at=Array.prototype.slice.call(arguments,1);return this.each((function(){var tt=ee[H(this).data(X)];if(tt){var wt=tt[Te];if(!wt)throw new Error("Spectrum: no such method: '"+Te+"'");Te=="get"?$e=tt.get():Te=="container"?$e=tt.container:Te=="option"?$e=tt.option.apply(tt,at):Te=="destroy"?(tt.destroy(),H(this).removeData(X)):wt.apply(tt,at)}})),$e}return this.spectrum("destroy").each((function(){var tt=Z(this,H.extend({},Te,H(this).data()));H(this).data(X,tt.id)}))},H.fn.spectrum.load=!0,H.fn.spectrum.loadOpts={},H.fn.spectrum.draggable=a,H.fn.spectrum.defaults=ye,H.fn.spectrum.inputTypeColorSupport=function Te(){if(Te._cachedResult===void 0){var Ne=H("<input type='color'/>")[0];Te._cachedResult=Ne.type==="color"&&Ne.value!==""}return Te._cachedResult},H.spectrum={},H.spectrum.localization={},H.spectrum.palettes={},H.fn.spectrum.processNativeColorInputs=function(){var Te=H("input[type=color]");Te.length&&!c()&&Te.spectrum({preferredFormat:"hex6"})};var _=/^[\s,#]+/,M=/\s+$/,s=0,l=Math,f=l.round,w=l.min,te=l.max,J=l.random,R=function Te(Ne,$e){if($e=$e||{},(Ne=Ne||"")instanceof Te)return Ne;if(!(this instanceof Te))return new Te(Ne,$e);var at=(function(tt){var wt={r:0,g:0,b:0},it=1,Rt=!1,Ut=!1;typeof tt=="string"&&(tt=(function(Bt){Bt=Bt.replace(_,"").replace(M,"").toLowerCase();var ut,Zt=!1;if(h[Bt])Bt=h[Bt],Zt=!0;else if(Bt=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};return(ut=p.rgb.exec(Bt))?{r:ut[1],g:ut[2],b:ut[3]}:(ut=p.rgba.exec(Bt))?{r:ut[1],g:ut[2],b:ut[3],a:ut[4]}:(ut=p.hsl.exec(Bt))?{h:ut[1],s:ut[2],l:ut[3]}:(ut=p.hsla.exec(Bt))?{h:ut[1],s:ut[2],l:ut[3],a:ut[4]}:(ut=p.hsv.exec(Bt))?{h:ut[1],s:ut[2],v:ut[3]}:(ut=p.hsva.exec(Bt))?{h:ut[1],s:ut[2],v:ut[3],a:ut[4]}:(ut=p.hex8.exec(Bt))?{a:rt(ut[1]),r:De(ut[2]),g:De(ut[3]),b:De(ut[4]),format:Zt?"name":"hex8"}:(ut=p.hex6.exec(Bt))?{r:De(ut[1]),g:De(ut[2]),b:De(ut[3]),format:Zt?"name":"hex"}:(ut=p.hex3.exec(Bt))?{r:De(ut[1]+""+ut[1]),g:De(ut[2]+""+ut[2]),b:De(ut[3]+""+ut[3]),format:Zt?"name":"hex"}:!1})(tt)),(0,g.Z)(tt)=="object"&&(tt.hasOwnProperty("r")&&tt.hasOwnProperty("g")&&tt.hasOwnProperty("b")?($t=tt.r,Yt=tt.g,Xt=tt.b,wt={r:255*_t($t,255),g:255*_t(Yt,255),b:255*_t(Xt,255)},Rt=!0,Ut=String(tt.r).substr(-1)==="%"?"prgb":"rgb"):tt.hasOwnProperty("h")&&tt.hasOwnProperty("s")&&tt.hasOwnProperty("v")?(tt.s=Ue(tt.s),tt.v=Ue(tt.v),wt=(function(Bt,ut,Zt){Bt=6*_t(Bt,360),ut=_t(ut,100),Zt=_t(Zt,100);var Sn=l.floor(Bt),yn=Bt-Sn,cn=Zt*(1-ut),sn=Zt*(1-yn*ut),tn=Zt*(1-(1-yn)*ut),un=Sn%6;return{r:255*[Zt,sn,cn,cn,tn,Zt][un],g:255*[tn,Zt,Zt,sn,cn,cn][un],b:255*[cn,cn,tn,Zt,Zt,sn][un]}})(tt.h,tt.s,tt.v),Rt=!0,Ut="hsv"):tt.hasOwnProperty("h")&&tt.hasOwnProperty("s")&&tt.hasOwnProperty("l")&&(tt.s=Ue(tt.s),tt.l=Ue(tt.l),wt=(function(Bt,ut,Zt){var Sn,yn,cn;function sn(In,_n,wn){return wn<0&&(wn+=1),wn>1&&(wn-=1),wn<1/6?In+6*(_n-In)*wn:wn<1/2?_n:wn<2/3?In+(_n-In)*(2/3-wn)*6:In}if(Bt=_t(Bt,360),ut=_t(ut,100),Zt=_t(Zt,100),ut===0)Sn=yn=cn=Zt;else{var tn=Zt<.5?Zt*(1+ut):Zt+ut-Zt*ut,un=2*Zt-tn;Sn=sn(un,tn,Bt+1/3),yn=sn(un,tn,Bt),cn=sn(un,tn,Bt-1/3)}return{r:255*Sn,g:255*yn,b:255*cn}})(tt.h,tt.s,tt.l),Rt=!0,Ut="hsl"),tt.hasOwnProperty("a")&&(it=tt.a));var $t,Yt,Xt;return it=mt(it),{ok:Rt,format:tt.format||Ut,r:w(255,te(wt.r,0)),g:w(255,te(wt.g,0)),b:w(255,te(wt.b,0)),a:it}})(Ne);this._originalInput=Ne,this._r=at.r,this._g=at.g,this._b=at.b,this._a=at.a,this._roundA=f(100*this._a)/100,this._format=$e.format||at.format,this._gradientType=$e.gradientType,this._r<1&&(this._r=f(this._r)),this._g<1&&(this._g=f(this._g)),this._b<1&&(this._b=f(this._b)),this._ok=at.ok,this._tc_id=s++};R.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var Te=this.toRgb();return(299*Te.r+587*Te.g+114*Te.b)/1e3},setAlpha:function(Te){return this._a=mt(Te),this._roundA=f(100*this._a)/100,this},toHsv:function(){var Te=Q(this._r,this._g,this._b);return{h:360*Te.h,s:Te.s,v:Te.v,a:this._a}},toHsvString:function(){var Te=Q(this._r,this._g,this._b),Ne=f(360*Te.h),$e=f(100*Te.s),at=f(100*Te.v);return this._a==1?"hsv("+Ne+", "+$e+"%, "+at+"%)":"hsva("+Ne+", "+$e+"%, "+at+"%, "+this._roundA+")"},toHsl:function(){var Te=C(this._r,this._g,this._b);return{h:360*Te.h,s:Te.s,l:Te.l,a:this._a}},toHslString:function(){var Te=C(this._r,this._g,this._b),Ne=f(360*Te.h),$e=f(100*Te.s),at=f(100*Te.l);return this._a==1?"hsl("+Ne+", "+$e+"%, "+at+"%)":"hsla("+Ne+", "+$e+"%, "+at+"%, "+this._roundA+")"},toHex:function(Te){return pe(this._r,this._g,this._b,Te)},toHexString:function(Te){return"#"+this.toHex(Te)},toHex8:function(){return Ce(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:f(this._r),g:f(this._g),b:f(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+f(this._r)+", "+f(this._g)+", "+f(this._b)+")":"rgba("+f
119(this._r)+", "+f(this._g)+", "+f(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:f(100*_t(this._r,255))+"%",g:f(100*_t(this._g,255))+"%",b:f(100*_t(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+f(100*_t(this._r,255))+"%, "+f(100*_t(this._g,255))+"%, "+f(100*_t(this._b,255))+"%)":"rgba("+f(100*_t(this._r,255))+"%, "+f(100*_t(this._g,255))+"%, "+f(100*_t(this._b,255))+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":!(this._a<1)&&(m[pe(this._r,this._g,this._b,!0)]||!1)},toFilter:function(Te){var Ne="#"+Ce(this._r,this._g,this._b,this._a),$e=Ne,at=this._gradientType?"GradientType = 1, ":"";return Te&&($e=R(Te).toHex8String()),"progid:DXImageTransform.Microsoft.gradient("+at+"startColorstr="+Ne+",endColorstr="+$e+")"},toString:function(Te){var Ne=!!Te;Te=Te||this._format;var $e=!1,at=this._a<1&&this._a>=0;return Ne||!at||Te!=="hex"&&Te!=="hex6"&&Te!=="hex3"&&Te!=="name"?(Te==="rgb"&&($e=this.toRgbString()),Te==="prgb"&&($e=this.toPercentageRgbString()),Te!=="hex"&&Te!=="hex6"||($e=this.toHexString()),Te==="hex3"&&($e=this.toHexString(!0)),Te==="hex8"&&($e=this.toHex8String()),Te==="name"&&($e=this.toName()),Te==="hsl"&&($e=this.toHslString()),Te==="hsv"&&($e=this.toHsvString()),$e||this.toHexString()):Te==="name"&&this._a===0?this.toName():this.toRgbString()},_applyModification:function(Te,Ne){var $e=Te.apply(null,[this].concat([].slice.call(Ne)));return this._r=$e._r,this._g=$e._g,this._b=$e._b,this.setAlpha($e._a),this},lighten:function(){return this._applyModification(de,arguments)},brighten:function(){return this._applyModification(Ee,arguments)},darken:function(){return this._applyModification(Fe,arguments)},desaturate:function(){return this._applyModification(Se,arguments)},saturate:function(){return this._applyModification(me,arguments)},greyscale:function(){return this._applyModification(xe,arguments)},spin:function(){return this._applyModification(He,arguments)},_applyCombination:function(Te,Ne){return Te.apply(null,[this].concat([].slice.call(Ne)))},analogous:function(){return this._applyCombination(bt,arguments)},complement:function(){return this._applyCombination(et,arguments)},monochromatic:function(){return this._applyCombination(Jt,arguments)},splitcomplement:function(){return this._applyCombination(St,arguments)},triad:function(){return this._applyCombination(Ge,arguments)},tetrad:function(){return this._applyCombination(yt,arguments)}},R.fromRatio=function(Te,Ne){if((0,g.Z)(Te)=="object"){var $e={};for(var at in Te)Te.hasOwnProperty(at)&&($e[at]=at==="a"?Te[at]:Ue(Te[at]));Te=$e}return R(Te,Ne)},R.equals=function(Te,Ne){return!(!Te||!Ne)&&R(Te).toRgbString()==R(Ne).toRgbString()},R.random=function(){return R.fromRatio({r:J(),g:J(),b:J()})},R.mix=function(Te,Ne,$e){$e=$e===0?0:$e||50;var at,tt=R(Te).toRgb(),wt=R(Ne).toRgb(),it=$e/100,Rt=2*it-1,Ut=wt.a-tt.a,$t=1-(at=((at=Rt*Ut==-1?Rt:(Rt+Ut)/(1+Rt*Ut))+1)/2),Yt={r:wt.r*at+tt.r*$t,g:wt.g*at+tt.g*$t,b:wt.b*at+tt.b*$t,a:wt.a*it+tt.a*(1-it)};return R(Yt)},R.readability=function(Te,Ne){var $e=R(Te),at=R(Ne),tt=$e.toRgb(),wt=at.toRgb(),it=$e.getBrightness(),Rt=at.getBrightness(),Ut=Math.max(tt.r,wt.r)-Math.min(tt.r,wt.r)+Math.max(tt.g,wt.g)-Math.min(tt.g,wt.g)+Math.max(tt.b,wt.b)-Math.min(tt.b,wt.b);return{brightness:Math.abs(it-Rt),color:Ut}},R.isReadable=function(Te,Ne){var $e=R.readability(Te,Ne);return $e.brightness>125&&$e.color>500},R.mostReadable=function(Te,Ne){for(var $e=null,at=0,tt=!1,wt=0;wt<Ne.length;wt++){var it=R.readability(Te,Ne[wt]),Rt=it.brightness>125&&it.color>500,Ut=3*(it.brightness/125)+it.color/500;(Rt&&!tt||Rt&&tt&&Ut>at||!Rt&&!tt&&Ut>at)&&(tt=Rt,at=Ut,$e=R(Ne[wt]))}return $e};var k,v,b,h=R.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee9
1190",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},m=R.hexNames=(function(Te){var Ne={};for(var $e in Te)Te.hasOwnProperty($e)&&(Ne[Te[$e]]=$e);return Ne})(h),p=(v="[\\s|\\(]+("+(k="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+k+")[,|\\s]+("+k+")\\s*\\)?",b="[\\s|\\(]+("+k+")[,|\\s]+("+k+")[,|\\s]+("+k+")[,|\\s]+("+k+")\\s*\\)?",{rgb:new RegExp("rgb"+v),rgba:new RegExp("rgba"+b),hsl:new RegExp("hsl"+v),hsla:new RegExp("hsla"+b),hsv:new RegExp("hsv"+v),hsva:new RegExp("hsva"
119+b),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});window.tinycolor=R,H((function(){H.fn.spectrum.load&&H.fn.spectrum.processNativeColorInputs()}))}function y(Te,Ne,$e,at){for(var tt=[],wt=0;wt<Te.length;wt++){var it=Te[wt];if(it){var Rt=R(it),Ut=Rt.toHsl().l<.5?"sp-thumb-el sp-thumb-dark":"sp-thumb-el sp-thumb-light";Ut+=R.equals(Ne,it)?" sp-thumb-active":"";var $t=Rt.toString(at.preferredFormat||"rgb"),Yt=j?"background-color:"+Rt.toRgbString():"filter:"+Rt.toFilter();tt.push('<span title="'+$t+'" data-color="'+Rt.toRgbString()+'" class="'+Ut+'"><span class="sp-thumb-inner" style="'+Yt+';"></span></span>')}else tt.push(H("<div />").append(H('<span data-color="" style="background-color:transparent;" class="sp-clear-display"></span>').attr("title",at.noColorSelectedText)).html())}return"<div class='sp-cf "+$e+"'>"+tt.join("")+"</div>"}function Z(Te,Ne){var $e,at,tt,wt,it=(function(Pt,xt){var Lt=H.extend({},ye,Pt);return Lt.callbacks={move:N(Lt.move,xt),change:N(Lt.change,xt),show:N(Lt.show,xt),hide:N(Lt.hide,xt),beforeShow:N(Lt.beforeShow,xt)},Lt})(Ne,Te),Rt=it.flat,Ut=it.showSelectionPalette,$t=it.localStorageKey,Yt=it.theme,Xt=it.callbacks,Bt=($e=mn,at=10,function(){var Pt=this,xt=arguments,Lt=function(){wt=null,$e.apply(Pt,xt)};tt&&clearTimeout(wt),!tt&&wt||(wt=setTimeout(Lt,at))}),ut=!1,Zt=!1,Sn=!0,yn=0,cn=0,sn=0,tn=0,un=0,In=0,_n=0,wn=0,An=0,Tn=0,nn=1,Pn=[],Qn=[],rn={},ht=it.selectionPalette.slice(0),Fn=it.maxSelectionSize,qn="sp-dragging",dn=null,Kt=Te.ownerDocument,Vt=(Kt.body,H(Te)),Rn=!1,Wt=H(B,Kt).addClass(Yt),st=Wt.find(".sp-picker-container"),Nt=Wt.find(".sp-color"),be=Wt.find(".sp-dragger"),Pe=Wt.find(".sp-hue"),Xe=Wt.find(".sp-slider"),gt=Wt.find(".sp-alpha-inner"),kt=Wt.find(".sp-alpha"),ft=Wt.find(".sp-alpha-handle"),qt=Wt.find(".sp-input"),gn=Wt.find(".sp-palette"),kn=Wt.find(".sp-initial"),Vn=Wt.find(".sp-cancel"),er=Wt.find(".sp-clear"),cr=Wt.find(".sp-choose"),Wn=Wt.find(".sp-palette-toggle"),tr=Vt.is("input"),ur=tr&&Vt.attr("type")==="color"&&c(),nr=tr&&!Rt,Qt=nr?H(E).addClass(Yt).addClass(it.className).addClass(it.replacerClassName):H([]),Bn=nr?Qt:Vt,rr=Qt.find(".sp-preview-inner"),fr=it.color||tr&&Vt.val(),L=!1,V=it.preferredFormat,u=!it.showButtons||it.clickoutFiresChange,i=!fr,T=it.allowEmpty&&!ur;function le(){if(it.showPaletteOnly&&(it.showPalette=!0),Wn.text(it.showPaletteOnly?it.togglePaletteMoreText:it.togglePaletteLessText),it.palette){Pn=it.palette.slice(0),Qn=H.isArray(Pn[0])?Pn:[Pn],rn={};for(var Pt=0;Pt<Qn.length;Pt++)for(var xt=0;xt<Qn[Pt].length;xt++){var Lt=R(Qn[Pt][xt]).toRgbString();rn[Lt]=!0}}Wt.toggleClass("sp-flat",Rt),Wt.toggleClass("sp-input-disabled",!it.showInput),Wt.toggleClass("sp-alpha-enabled",it.showAlpha),Wt.toggleClass("sp-clear-enabled",T),Wt.toggleClass("sp-buttons-disabled",!it.showButtons),Wt.toggleClass("sp-palette-buttons-disabled",!it.togglePaletteOnly),Wt.toggleClass("sp-palette-disabled",!it.showPalette),Wt.toggleClass("sp-palette-only",it.showPaletteOnly),Wt.toggleClass("sp-initial-disabled",!it.showInitial),Wt.addClass(it.className).addClass(it.containerClassName),mn()}function ve(){if($t&&window.localStorage){try{var Pt=window.localStorage[$t].split(",#");Pt.length>1&&(delete window.localStorage[$t],H.each(Pt,(function(xt,Lt){_e(Lt)})))}catch{}try{ht=window.localStorage[$t].split(";")}catch{}}}function _e(Pt){if(Ut){var xt=R(Pt).toRgbString();if(!rn[xt]&&H.inArray(xt,ht)===-1)for(ht.push(xt);ht.length>Fn;)ht.shift();if($t&&window.localStorage)try{window.localStorage[$t]=ht.join(";")}catch{}}}function Le(){var Pt=zt(),xt=H.map(Qn,(function(Lt,Dt){return y(Lt,Pt,"sp-palette-row sp-palette-row-"+Dt,it)}));ve(),ht&&xt.push(y((function(){var Lt=[];if(it.showPalette)for(var Dt=0;Dt<ht.length;Dt++){var fn=R(ht[Dt]).toRgbString();rn[fn]||Lt.push(ht[Dt])}return Lt.reverse().slice(0,it.maxSelectionSize)})(),Pt,"sp-palette-row sp-palette-row-selection",it)),gn.html(xt.join(""))}function Ke(){if(it.showInitial){var Pt=L,xt=zt();kn.html(y([Pt,xt],xt,"sp-palette-row-initial",it))}}function qe(){(cn<=0||yn<=0||tn<=0)&&mn(),Zt=!0,Wt.addClass(qn),dn=null,Vt.trigger("dragstart.spectrum",[zt()])}function Je(){Zt=!1,Wt.removeClass(qn),Vt.trigger("dragstop.spectrum",[zt()])}function Qe(){var Pt=qt.val();if(Pt!==null&&Pt!==""||!T){var xt=R(Pt);xt.isValid()?(ln(xt),Gn(!0)):qt.addClass("sp-validation-error")}else ln(null),Gn(!0)}function ct(){ut?Gt():Ct()}function Ct(){var Pt=H.Event("beforeShow.spectrum");if(ut)mn();else if(Vt.trigger("beforeShow.spectrum",[zt()]),Xt.beforeShow(zt())!==!1&&!Pt.isDefaultPrevented()){(function(){for(var Lt=0;Lt<ee.length;Lt++)ee[Lt]&&ee[Lt].hide()})(),ut=!0;var xt=H(Kt);xt.bind("keydown.spectrum",Mt),xt.bind("click.spectrum",It),H(window).bind("resize.spectrum",Bt),Qt.addClass("sp-active"),Wt.removeClass("sp-hidden"),mn(),xn(),L=zt(),Ke(),Xt.show(L),Vt.trigger("show.spectrum",[L])}}function Mt(Pt){Pt.keyCode===27&&Gt()}function It(Pt){Pt.button!=2&&(Zt||(u?Gn(!0):on(),Gt()))}
119function Gt(){ut&&!Rt&&(ut=!1,H(Kt).unbind("keydown.spectrum",Mt),H(Kt).unbind("click.spectrum",It),H(window).unbind("resize.spectrum",Bt),Qt.removeClass("sp-active"),Wt.addClass("sp-hidden"),Xt.hide(zt()),Vt.trigger("hide.spectrum",[zt()]))}function on(){ln(L,!0)}function ln(Pt,xt){var Lt,Dt;R.equals(Pt,zt())?xn():(!Pt&&T?i=!0:(i=!1,Sn=!Pt,Dt=(Lt=R(Pt)).toHsv(),wn=Dt.h%360/360,An=Dt.s,Tn=Dt.v,nn=Dt.a),xn(),Lt&&Lt.isValid()&&!xt&&(V=it.preferredFormat||Lt.getFormat()))}function zt(Pt){return Pt=Pt||{},T&&i?null:R.fromRatio({h:wn,s:An,v:Tn,a:Math.round(100*nn)/100},{format:Pt.format||V})}function an(){xn(),Xt.move(zt()),Vt.trigger("move.spectrum",[zt()])}function xn(){qt.removeClass("sp-validation-error"),hr();var Pt=R.fromRatio({h:wn,s:1,v:1});Nt.css("background-color",Pt.toHexString());var xt=V;nn<1&&(nn!==0||xt!=="name")&&(xt!=="hex"&&xt!=="hex3"&&xt!=="hex6"&&xt!=="name"||(xt="rgb"));var Lt=zt({format:xt}),Dt="";if(rr.removeClass("sp-clear-display"),rr.css("background-color","transparent"),!Lt&&T)rr.addClass("sp-clear-display");else{var fn=Lt.toHexString(),Kn=Lt.toRgbString();if(j||Lt.alpha===1?rr.css("background-color",Kn):(rr.css("background-color","transparent"),rr.css("filter",Lt.toFilter())),it.showAlpha){var dr=Lt.toRgb();dr.a=0;var Yn=R(dr).toRgbString(),Tr="linear-gradient(left, "+Yn+", "+fn+")";O?gt.css("filter",R(Yn).toFilter({gradientType:1},fn)):(gt.css("background","-webkit-"+Tr),gt.css("background","-moz-"+Tr),gt.css("background","-ms-"+Tr),gt.css("background","linear-gradient(to right, "+Yn+", "+fn+")"))}Dt=Lt.toString(xt)}it.showInput&&qt.val(Dt),it.showPalette&&Le(),Ke()}function hr(){var Pt=An,xt=Tn;if(T&&i)ft.hide(),Xe.hide(),be.hide();else{ft.show(),Xe.show(),be.show();var Lt=Pt*yn,Dt=cn-xt*cn;Lt=Math.max(-sn,Math.min(yn-sn,Lt-sn)),Dt=Math.max(-sn,Math.min(cn-sn,Dt-sn)),be.css({top:Dt+"px",left:Lt+"px"});var fn=nn*un;ft.css({left:fn-In/2+"px"});var Kn=wn*tn;Xe.css({top:Kn-_n+"px"})}}function Gn(Pt){var xt=zt(),Lt="",Dt=!!Sn||!R.equals(xt,L);xt&&(Lt=xt.toString(V),!ut&&_e(xt)),tr&&Vt.val(Lt),Pt&&Dt&&(Xt.change(xt),Vt.trigger("change",[xt]))}function mn(){ut&&(yn=Nt.width(),cn=Nt.height(),sn=be.height(),Pe.width(),tn=Pe.height(),_n=Xe.height(),un=kt.width(),In=ft.width(),Rt||(Wt.css("position","absolute"),it.offset?Wt.offset(it.offset):Wt.offset((function(Pt,xt){var Lt=0,Dt=Pt.outerWidth(),fn=Pt.outerHeight(),Kn=xt.outerHeight(),dr=Pt[0].ownerDocument,Yn=dr.documentElement,Tr=Yn.clientWidth,Fr=Yn.clientHeight,Vr=H(dr).scrollLeft(),fi=H(dr).scrollTop(),Mr=Tr+Vr,Br=Fr+fi,br=xt.offset();return br.top+=Kn,br.left-=Math.min(br.left,br.left+Dt>Mr&&Mr>Dt?Math.abs(br.left+Dt-Mr):0),br.top-=Math.min(br.top,br.top+fn>Br&&Br>fn?Math.abs(fn+Kn-Lt):Lt),br})(Wt,Bn))),hr(),it.showPalette&&Le(),Vt.trigger("reflow.spectrum"))}function $n(){Gt(),Rn=!0,Vt.attr("disabled",!0),Bn.addClass("sp-disabled")}(function(){if(O&&Wt.find("*:not(input)").attr("unselectable","on"),le(),nr&&Vt.after(Qt).hide(),T||er.hide(),Rt)Vt.after(Wt).hide();else{var Pt=it.appendTo==="parent"?Vt.parent():H(it.appendTo);Pt.length!==1&&(Pt=H("body")),Pt.append(Wt)}function xt(Dt){return Dt.data&&Dt.data.ignore?(ln(H(Dt.target).closest(".sp-thumb-el").data("color")),an()):(ln(H(Dt.target).closest(".sp-thumb-el").data("color")),an(),it.hideAfterPaletteSelect&&(Gn(!0),Gt())),!1}ve(),Bn.bind("click.spectrum touchstart.spectrum",(function(Dt){Rn||ct(),Dt.stopPropagation(),H(Dt.target).is("input")||Dt.preventDefault()})),(Vt.is(":disabled")||it.disabled===!0)&&$n(),Wt.click(q),qt.change(Qe),qt.bind("paste",(function(){setTimeout(Qe,1)})),qt.keydown((function(Dt){Dt.keyCode==13&&Qe()})),Vn.text(it.cancelText),Vn.bind("click.spectrum",(function(Dt){Dt.stopPropagation(),Dt.preventDefault(),on(),Gt()})),er.attr("title",it.clearText),er.bind("click.spectrum",(function(Dt){Dt.stopPropagation(),Dt.preventDefault(),i=!0,an(),Rt&&Gn(!0)})),cr.text(it.chooseText),cr.bind("click.spectrum",(function(Dt){Dt.stopPropagation(),Dt.preventDefault(),O&&qt.is(":focus")&&qt.trigger("change"),qt.hasClass("sp-validation-error")||(Gn(!0),Gt())})),Wn.text(it.showPaletteOnly?it.togglePaletteMoreText:it.togglePaletteLessText),Wn.bind("click.spectrum",(function(Dt){Dt.stopPropagation(),Dt.preventDefault(),it.showPaletteOnly=!it.showPaletteOnly,it.showPaletteOnly||Rt||Wt.css("left","-="+(st.outerWidth(!0)+5)),le()})),a(kt,(function(Dt,fn,Kn){nn=Dt/un,i=!1,Kn.shiftKey&&(nn=Math.round(10*nn)/10),an()}),qe,Je),a(Pe,(function(Dt,fn){wn=parseFloat(fn/tn),i=!1,it.showAlpha||(nn=1),an()}),qe,Je),a(Nt,(function(Dt,fn,Kn){if(Kn.shiftKey){if(!dn){var dr=An*yn,Yn=cn-Tn*cn,Tr=Math.abs(Dt-dr)>Math.abs(fn-Yn);dn=Tr?"x":"y"}}else dn=null;var Fr=!dn||dn==="y";(!dn||dn==="x")&&(An=parseFloat(Dt/yn)),Fr&&(Tn=parseFloat((cn-fn)/cn)),i=!1,it.showAlpha||(nn=1),an()}),qe,Je),fr?(ln(fr),xn(),V=it.preferredFormat||R(fr).getFormat(),_e(fr)):xn(),Rt&&Ct();var Lt=O?"mousedown.spectrum":"click.spectrum touchstart.spectrum";
119gn.delegate(".sp-thumb-el",Lt,xt),kn.delegate(".sp-thumb-el:nth-child(1)",Lt,{ignore:!0},xt)})();var yr={show:Ct,hide:Gt,toggle:ct,reflow:mn,option:function(Pt,xt){return Pt===ne?H.extend({},it):xt===ne?it[Pt]:(it[Pt]=xt,Pt==="preferredFormat"&&(V=it.preferredFormat),void le())},enable:function(){Rn=!1,Vt.attr("disabled",!1),Bn.removeClass("sp-disabled")},disable:$n,offset:function(Pt){it.offset=Pt,mn()},set:function(Pt){ln(Pt),Gn()},get:zt,destroy:function(){Vt.show(),Bn.unbind("click.spectrum touchstart.spectrum"),Wt.remove(),Qt.remove(),ee[yr.id]=null},container:Wt};return yr.id=ee.push(yr)-1,yr}function Y(){}function q(Te){Te.stopPropagation()}function N(Te,Ne){var $e=Array.prototype.slice,at=$e.call(arguments,2);return function(){return Te.apply(Ne,at.concat($e.call(arguments)))}}function a(Te,Ne,$e,at){Ne=Ne||function(){},$e=$e||function(){},at=at||function(){};var tt=document,wt=!1,it={},Rt=0,Ut=0,$t="ontouchstart"in window,Yt={};function Xt(Zt){Zt.stopPropagation&&Zt.stopPropagation(),Zt.preventDefault&&Zt.preventDefault(),Zt.returnValue=!1}function Bt(Zt){if(wt){if(O&&tt.documentMode<9&&!Zt.button)return ut();var Sn=Zt&&Zt.touches&&Zt.touches[0],yn=Sn&&Sn.pageX||Zt.pageX,cn=Sn&&Sn.pageY||Zt.pageY,sn=Math.max(0,Math.min(yn-it.left,Ut)),tn=Math.max(0,Math.min(cn-it.top,Rt));$t&&Xt(Zt),Ne.apply(Te,[sn,tn,Zt])}}function ut(){wt&&(H(tt).unbind(Yt),H(tt.body).removeClass("sp-dragging"),setTimeout((function(){at.apply(Te,arguments)}),0)),wt=!1}Yt.selectstart=Xt,Yt.dragstart=Xt,Yt["touchmove mousemove"]=Bt,Yt["touchend mouseup"]=ut,H(Te).bind("touchstart mousedown",(function(Zt){var Sn=Zt.which?Zt.which==3:Zt.button==2;Sn||wt||$e.apply(Te,arguments)!==!1&&(wt=!0,Rt=H(Te).height(),Ut=H(Te).width(),it=H(Te).offset(),H(tt).bind(Yt),H(tt.body).addClass("sp-dragging"),Bt(Zt),Xt(Zt))}))}function c(){return H.fn.spectrum.inputTypeColorSupport()}function C(Te,Ne,$e){Te=_t(Te,255),Ne=_t(Ne,255),$e=_t($e,255);var at,tt,wt=te(Te,Ne,$e),it=w(Te,Ne,$e),Rt=(wt+it)/2;if(wt==it)at=tt=0;else{var Ut=wt-it;switch(tt=Rt>.5?Ut/(2-wt-it):Ut/(wt+it),wt){case Te:at=(Ne-$e)/Ut+(Ne<$e?6:0);break;case Ne:at=($e-Te)/Ut+2;break;case $e:at=(Te-Ne)/Ut+4}at/=6}return{h:at,s:tt,l:Rt}}function Q(Te,Ne,$e){Te=_t(Te,255),Ne=_t(Ne,255),$e=_t($e,255);var at,tt,wt=te(Te,Ne,$e),it=w(Te,Ne,$e),Rt=wt,Ut=wt-it;if(tt=wt===0?0:Ut/wt,wt==it)at=0;else{switch(wt){case Te:at=(Ne-$e)/Ut+(Ne<$e?6:0);break;case Ne:at=($e-Te)/Ut+2;break;case $e:at=(Te-Ne)/Ut+4}at/=6}return{h:at,s:tt,v:Rt}}function pe(Te,Ne,$e,at){var tt=[Ze(f(Te).toString(16)),Ze(f(Ne).toString(16)),Ze(f($e).toString(16))];return at&&tt[0].charAt(0)==tt[0].charAt(1)&&tt[1].charAt(0)==tt[1].charAt(1)&&tt[2].charAt(0)==tt[2].charAt(1)?tt[0].charAt(0)+tt[1].charAt(0)+tt[2].charAt(0):tt.join("")}function Ce(Te,Ne,$e,at){var tt;return[Ze((tt=at,Math.round(255*parseFloat(tt)).toString(16))),Ze(f(Te).toString(16)),Ze(f(Ne).toString(16)),Ze(f($e).toString(16))].join("")}function Se(Te,Ne){Ne=Ne===0?0:Ne||10;var $e=R(Te).toHsl();return $e.s-=Ne/100,$e.s=Oe($e.s),R($e)}function me(Te,Ne){Ne=Ne===0?0:Ne||10;var $e=R(Te).toHsl();return $e.s+=Ne/100,$e.s=Oe($e.s),R($e)}function xe(Te){return R(Te).desaturate(100)}function de(Te,Ne){Ne=Ne===0?0:Ne||10;var $e=R(Te).toHsl();return $e.l+=Ne/100,$e.l=Oe($e.l),R($e)}function Ee(Te,Ne){Ne=Ne===0?0:Ne||10;var $e=R(Te).toRgb();return $e.r=te(0,w(255,$e.r-f(255*(-Ne/100)))),$e.g=te(0,w(255,$e.g-f(255*(-Ne/100)))),$e.b=te(0,w(255,$e.b-f(255*(-Ne/100)))),R($e)}function Fe(Te,Ne){Ne=Ne===0?0:Ne||10;var $e=R(Te).toHsl();return $e.l-=Ne/100,$e.l=Oe($e.l),R($e)}function He(Te,Ne){var $e=R(Te).toHsl(),at=(f($e.h)+Ne)%360;return $e.h=at<0?360+at:at,R($e)}function et(Te){var Ne=R(Te).toHsl();return Ne.h=(Ne.h+180)%360,R(Ne)}function Ge(Te){var Ne=R(Te).toHsl(),$e=Ne.h;return[R(Te),R({h:($e+120)%360,s:Ne.s,l:Ne.l}),R({h:($e+240)%360,s:Ne.s,l:Ne.l})]}function yt(Te){var Ne=R(Te).toHsl(),$e=Ne.h;return[R(Te),R({h:($e+90)%360,s:Ne.s,l:Ne.l}),R({h:($e+180)%360,s:Ne.s,l:Ne.l}),R({h:($e+270)%360,s:Ne.s,l:Ne.l})]}function St(Te){var Ne=R(Te).toHsl(),$e=Ne.h;return[R(Te),R({h:($e+72)%360,s:Ne.s,l:Ne.l}),R({h:($e+216)%360,s:Ne.s,l:Ne.l})]}function bt(Te,Ne,$e){Ne=Ne||6,$e=$e||30;var at=R(Te).toHsl(),tt=360/$e,wt=[R(Te)];for(at.h=(at.h-(tt*Ne>>1)+720)%360;--Ne;)at.h=(at.h+tt)%360,wt.push(R(at));return wt}function Jt(Te,Ne){Ne=Ne||6;for(var $e=R(Te).toHsv(),at=$e.h,tt=$e.s,wt=$e.v,it=[],Rt=1/Ne;Ne--;)it.push(R({h:at,s:tt,v:wt})),wt=(wt+Rt)%1;return it}function mt(Te){return Te=parseFloat(Te),(isNaN(Te)||Te<0||Te>1)&&(Te=1),Te}function _t(Te,Ne){(function(at){return typeof at=="string"&&at.indexOf(".")!=-1&&parseFloat(at)===1})(Te)&&(Te="100%");var $e=(function(at){return typeof at=="string"&&at.indexOf("%")!=-1})(Te);return Te=w(Ne,te(0,parseFloat(Te))),$e&&(Te=parseInt(Te*Ne,10)/100),l.abs(Te-Ne)<1e-6?1:Te%Ne/parseFloat(Ne)}function Oe(Te){return w(1,te(0,Te))}function De(Te){return parseInt(Te,16)}function Ze(Te){return Te.length==1?"0"+Te:""+Te}function Ue(Te){return Te<=1&&(Te=100*Te+"%"),Te}function rt(Te){return De(Te)/255}})(z);var F=function(H){var ne=H.getFormat()==="name"&&H.toName(),ye=H.getAlpha()==1?H.toHexString():H.toRgbString();return ne||ye.replace(/ /g,"")},G=(function(H){(0,ce.Z)(ye,H);var ne=re(ye);function ye(){return(0,D.Z)(this,ye),ne.apply(this,arguments)}return(0,ie.Z)(ye,[{key:"template",value:function(){var ee=this.ppfx;return` 120 <div class="`.concat(this.holderClass(),`"></div> 121 <div class="`).concat(ee,`field-colorp"> 122 <div class="`).concat(ee,`field-colorp-c" data-colorp-c> 123 <div class="`).concat(ee,`checker-bg"></div> 124 </div> 125 </div> 126 `)}},{key:"inputClass",value:function(){var ee=this.ppfx;return"".concat(ee,"field ").concat(ee,"field-color")}},{key:"holderClass",value:function(){return"".concat(this.ppfx,"input-holder")}},{key:"remove",value:function(){x.Z.prototype.remove.apply(this,arguments),this.colorEl.spectrum("destroy")}},{key:"handleChange",value:function(ee){ee.stopPropagation();var O=ee.target.value;(0,I.isUndefined)(O)||this.__onInputChange(O)}},{key:"__onInputChange",value:function(ee){var O=this.model,j=this.opts.onChange,E=ee,B=this.getColorEl();if(B){B.spectrum("set",E);var X=B.spectrum("get"),_=E&&F(X);_&&(E=_)}j?j(E):O.set({value:E},{fromInput:1})}},{key:"setValue",value:function(ee){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=this.model,E=(0,I.isUndefined)(O.def)?j.get("defaults"):O.def,B=(0,I.isUndefined)(ee)?(0,I.isUndefined)(E)?"":E:ee,X=this.getInputEl(),_=this.getColorEl(),M=B!="none"?B:"";
126X.value=B,_.get(0).style.backgroundColor=M,(O.fromTarget||O.fromInput&&!O.avoidStore)&&(_.spectrum("set",M),this.noneColor=B=="none")}},{key:"getColorEl",value:function(){if(!this.colorEl){var ee,O=this.em,j=this.model,E=this.opts,B=this,X=this.ppfx,_=E.onChange,M=z('<div class="'.concat(this.ppfx,'field-color-picker"></div>')),s=M.get(0).style,l=O&&O.config?O.config.el:"",f=O&&O.getConfig&&O.getConfig().colorPicker||{},w=!1,te="";this.$el.find("[data-colorp-c]").append(M);var J=function(R){var k=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];_?_(R,!k):(k&&j.setValueFromInput(0,!1),j.setValueFromInput(R,k))};M.spectrum($($($({color:j.getValue()||!1,containerClassName:"".concat(X,"one-bg ").concat(X,"two-color"),appendTo:l||"body",maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"\u2A2F",palette:[]},f),j.get("colorPicker")||{}),{},{move:function(R){var k=F(R);te=k,s.backgroundColor=k,J(k,!1)},change:function(R){w=!0;var k=F(R);s.backgroundColor=k,J(k),B.noneColor=0},show:function(R){w=!1,te="",ee=_?j.getValue({noDefault:!0}):F(R)},hide:function(){w||!ee&&!_||(B.noneColor&&(ee=""),s.backgroundColor=ee,M.spectrum("set",ee),J(ee,!1))}})),O&&O.on&&this.listenTo(O,"component:selected",(function(){te&&J(te),w=!0,te="",M.spectrum("hide")})),this.colorEl=M}return this.colorEl}},{key:"render",value:function(){return x.Z.prototype.render.call(this),this.getColorEl(),this}}]),ye})(x.Z)},7610:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>A});var fe=S(5671),D=S(3144),ie=S(7326),ce=S(9340),ae=S(2963),se=S(1120),oe=S(2316),W=S.n(oe),I=S(9050),g=S(1163),P=S(8659);function x($){var re=(function(){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}})();return function(){var z,F=(0,se.Z)($);if(re){var G=(0,se.Z)(this).constructor;z=Reflect.construct(F,arguments,G)}else z=F.apply(this,arguments);return(0,ae.Z)(this,z)}}W().$;var A=(function($){(0,ce.Z)(z,$);var re=x(z);function z(){var F,G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,fe.Z)(this,z),F=re.call(this,G),(0,I.bindAll)((0,ie.Z)(F),"moveIncrement","upIncrement"),F.doc=document,F.listenTo(F.model,"change:unit",F.handleModelChange),F}return(0,D.Z)(z,[{key:"template",value:function(){var F=this.ppfx;return`
127 <span class="`.concat(F,`input-holder"></span> 128 <span class="`).concat(F,`field-units"></span> 129 <div class="`).concat(F,`field-arrows" data-arrows> 130 <div class="`).concat(F,`field-arrow-u" data-arrow-up></div> 131 <div class="`).concat(F,`field-arrow-d" data-arrow-down></div> 132 </div> 133 `)}},{key:"inputClass",value:function(){var F=this.ppfx;return this.opts.contClass||"".concat(F,"field ").concat(F,"field-integer")}},{key:"setValue",value:function(F,G){var H=G||{},ne=this.validateInputValue(F,{deepCheck:1}),ye={value:ne.value};(ne.unit||ne.force)&&(ye.unit=ne.unit),this.model.set(ye,H),H.silent&&this.handleModelChange()}},{key:"handleChange",value:function(F){F.stopPropagation(),this.setValue(this.getInputEl().value),this.elementUpdated()}},{key:"handleUnitChange",value:function(F){F.stopPropagation();var G=this.getUnitEl().value;this.model.set("unit",G),this.elementUpdated()}},{key:"handleKeyDown",value:function(F){F.key==="ArrowUp"&&(F.preventDefault(),this.upArrowClick()),F.key==="ArrowDown"&&(F.preventDefault(),this.downArrowClick())}},{key:"elementUpdated",value:function(){this.model.trigger("el:change")}},{key:"handleModelChange",value:function(){var F=this.model;this.getInputEl().value=F.get("value");var G=this.getUnitEl();G&&(G.value=F.get("unit")||"")}},{key:"getUnitEl",value:function(){if(!this.unitEl){var F=this.model,G=F.get("units")||[];if(G.length){var H=['<option value="" disabled hidden>-</option>'];G.forEach((function(ye){var ee=ye==F.get("unit")?"selected":"";H.push("<option ".concat(ee,">").concat(ye,"</option>"))}));var ne=document.createElement("div");ne.innerHTML='<select class="'.concat(this.ppfx,'input-unit">').concat(H.join(""),"</select>"),this.unitEl=ne.firstChild}}return this.unitEl}},{key:"upArrowClick",value:function(){var F=this.model,G=F.get("step"),H=parseFloat(F.get("value"));this.setValue(this.normalizeValue(H+G)),this.elementUpdated()}},{key:"downArrowClick",value:function(){var F=this.model,G=F.get("step"),H=parseFloat(F.get("value"));this.setValue(this.normalizeValue(H-G)),this.elementUpdated()}},{key:"downIncrement",value:function(F){F.preventDefault(),this.moved=0;var G=this.model.get("value")||0;G=this.normalizeValue(G),this.current={y:F.pageY,val:G},(0,g.on)(this.doc,"mousemove",this.moveIncrement),(0,g.on)(this.doc,"mouseup",this.upIncrement)}},{key:"moveIncrement",value:function(F){this.moved=1;var G=this.model,H=G.get("step"),ne=this.current,ye=this.normalizeValue(ne.val+(ne.y-F.pageY)*H),ee=this.validateInputValue(ye),O=ee.value,j=ee.unit;return this.prValue=O,G.set({value:O,unit:j},{avoidStore:1}),!1}},{key:"upIncrement",value:function(){var F=this.model,G=F.get("step");if((0,g.off)(this.doc,"mouseup",this.upIncrement),(0,g.off)(this.doc,"mousemove",this.moveIncrement),this.prValue&&this.moved){var H=this.prValue-G;F.set("value",H,{avoidStore:1}).set("value",H+G),this.elementUpdated()}}},{key:"normalizeValue",value:function(F){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,H=this.model,ne=H.get("step"),ye=0;if(isNaN(F))return G;if(F=parseFloat(F),Math.floor(F)!==F){var ee=ne.toString().split(".")[1];ye=ee?ee.length:0}return ye?parseFloat(F.toFixed(ye)):F}},{key:"validateInputValue",value:function(F){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=0,ne=G||{},ye=this.model,ee="",O=(0,I.isUndefined)(F)?ee:F,j=G.units||ye.get("units")||[],E=ye.get("unit")||j.length&&j[0]||"",B=(0,I.isUndefined)(G.max)?ye.get("max"):G.max,X=(0,I.isUndefined)(G.min)?ye.get("min"):G.min,_=!!ye.get("limitlessMax"),M=!!ye.get("limitlessMin");if(ne.deepCheck){var s=ye.get("fixedValues")||[];if(O===""&&(E=""),O){var l=new RegExp("^"+s.join("|"),"g");if(s.length&&l.test(O))O=O.match(l)[0],E="",H=1;else{var f=O+"";O+="",O=parseFloat(O.replace(",",".")),O=isNaN(O)?ee:O;var w=f.replace(O,"");(0,I.indexOf)(j,w)>=0&&(E=w)}}}return _||(0,I.isUndefined)(B)||B===""||(O=O>B?B:O),M||(0,I.isUndefined)(X)||X===""||(O=O<X?X:O),{force:H,value:O,unit:E}}},{key:"render",value:function(){P.Z.prototype.render.call(this),this.unitEl=null;var F=this.getUnitEl();return F&&this.$el.find(".".concat(this.ppfx,"field-units")).get(0).appendChild(F),this}}]),z})(P.Z);A.prototype.events={"change input":"handleChange","change select":"handleUnit
133Change","click [data-arrow-up]":"upArrowClick","click [data-arrow-down]":"downArrowClick","mousedown [data-arrows]":"downIncrement",keydown:"handleKeyDown"}},6602:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>x});var fe=S(5671),D=S(3144),ie=S(7326),ce=S(9340),ae=S(2963),se=S(1120),oe=S(4942),W=S(9050),I=S(2316),g=S.n(I);function P(A){var $=(function(){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}})();return function(){var re,z=(0,se.Z)(A);if($){var F=(0,se.Z)(this).constructor;re=Reflect.construct(z,arguments,F)}else re=z.apply(this,arguments);return(0,ae.Z)(this,re)}}var x=(function(A){(0,ce.Z)(re,A);var $=P(re);function re(){var z,F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},G=arguments.length>1?arguments[1]:void 0,H=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return(0,fe.Z)(this,re),z=$.call(this,F),(0,oe.Z)((0,ie.Z)(z),"itemsView",""),(0,oe.Z)((0,ie.Z)(z),"itemType","type"),(0,oe.Z)((0,ie.Z)(z),"reuseView",!1),z.config=G||F.config||{},H&&z.listenTo(z.collection,"add",z.addTo),z.items=[],z}return(0,D.Z)(re,[{key:"addTo",value:function(z){this.add(z)}},{key:"itemViewNotFound",value:function(z){var F=this.config,G=this.ns,H=F.em,ne="".concat(G?"[".concat(G,"]: "):"","'").concat(z,"' type not found");H&&H.logWarning(ne)}},{key:"add",value:function(z,F){var G,H=this.config,ne=this.reuseView,ye=this.items,ee=this.itemsView,O=ee===void 0?{}:ee,j=F||null,E=this.itemView,B=z.get(this.itemType);O[B]?E=O[B]:!B||O[B]||(0,W.includes)(["button","checkbox","color","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"],B)||this.itemViewNotFound(B),G=z.view&&ne?z.view:new E({model:z,config:H},H),ye&&ye.push(G);var X=G.render().el;j?j.appendChild(X):this.$el.append(X)}},{key:"render",value:function(){var z=document.createDocumentFragment();return this.clearItems(),this.$el.empty(),this.collection.length&&this.collection.each((function(F){this.add(F,z)}),this),this.$el.append(z),this.onRender(),this}},{key:"onRender",value:function(){}},{key:"onRemoveBefore",value:function(){}},{key:"onRemove",value:function(){}},{key:"remove",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},F=this.items;this.onRemoveBefore(F,z),this.clearItems(),g().View.prototype.remove.apply(this,arguments),this.onRemove(F,z)}},{key:"clearItems",value:function(){this.items}}]),re})(g().View);x.prototype.itemView=""},4836:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>g});var fe=S(5671),D=S(3144),ie=S(4942),ce=S(9050),ae=S(1163),se={placeholder:"eg. Text here"};const oe={locale:"en",localeFallback:"en",detectLocale:!0,debug:!1,messages:{en:{assetManager:{addButton:"Add image",inputPlh:"http://path/to/the/image.jpg",modalTitle:"Select Image",uploadTitle:"Drop files here or click to upload"},blockManager:{labels:{},categories:{}},domComponents:{names:{"":"Box",wrapper:"Body",text:"Text",comment:"Comment",image:"Image",video:"Video",label:"Label",link:"Link",map:"Map",tfoot:"Table foot",tbody:"Table body",thead:"Table head",table:"Table",row:"Table row",cell:"Table cell"}},deviceManager:{device:"Device",devices:{desktop:"Desktop",tablet:"Tablet",mobileLandscape:"Mobile Landscape",mobilePortrait:"Mobile Portrait"}},panels:{buttons:{titles:{preview:"Preview",fullscreen:"Fullscreen","sw-visibility":"View components","export-template":"View code","open-sm":"Open Style Manager","open-tm":"Settings","open-layers":"Open Layer Manager","open-blocks":"Open Blocks"}}},selectorManager:{label:"Classes",selected:"Selected",emptyState:"- State -",states:{hover:"Hover",active:"Click","nth-of-type(2n)":"Even/Odd"}},styleManager:{empty:"Select an element before using Style Manager",layer:"Layer",fileButton:"Images",sectors:{general:"General",layout:"Layout",typography:"Typography",decorations:"Decorations",extra:"Extra",flex:"Flex",dimension:"Dimension"}
133,properties:{"text-shadow-h":"X","text-shadow-v":"Y","text-shadow-blur":"Blur","text-shadow-color":"Color","box-shadow-h":"X","box-shadow-v":"Y","box-shadow-blur":"Blur","box-shadow-spread":"Spread","box-shadow-color":"Color","box-shadow-type":"Type","margin-top-sub":"Top","margin-right-sub":"Right","margin-bottom-sub":"Bottom","margin-left-sub":"Left","padding-top-sub":"Top","padding-right-sub":"Right","padding-bottom-sub":"Bottom","padding-left-sub":"Left","border-width-sub":"Width","border-style-sub":"Style","border-color-sub":"Color","border-top-left-radius-sub":"Top Left","border-top-right-radius-sub":"Top Right","border-bottom-right-radius-sub":"Bottom Right","border-bottom-left-radius-sub":"Bottom Left","transform-rotate-x":"Rotate X","transform-rotate-y":"Rotate Y","transform-rotate-z":"Rotate Z","transform-scale-x":"Scale X","transform-scale-y":"Scale Y","transform-scale-z":"Scale Z","transition-property-sub":"Property","transition-duration-sub":"Duration","transition-timing-function-sub":"Timing","background-image-sub":"Image","background-repeat-sub":"Repeat","background-position-sub":"Position","background-attachment-sub":"Attachment","background-size-sub":"Size"}},traitManager:{empty:"Select an element before using Trait Manager",label:"Component settings",traits:{labels:{},attributes:{id:se,alt:se,title:se,href:{placeholder:"eg. https://google.com"}},options:{target:{false:"This window",_blank:"New window"}}}},storageManager:{recover:"Do you want to recover unsaved changes?"}}},messagesAdd:null};function W(P,x){var A=Object.keys(P);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(P);x&&($=$.filter((function(re){return Object.getOwnPropertyDescriptor(P,re).enumerable}))),A.push.apply(A,$)}return A}function I(P){for(var x=1;x<arguments.length;x++){var A=arguments[x]!=null?arguments[x]:{};x%2?W(Object(A),!0).forEach((function($){(0,ie.Z)(P,$,A[$])})):Object.getOwnPropertyDescriptors?Object.defineProperties(P,Object.getOwnPropertyDescriptors(A)):W(Object(A)).forEach((function($){Object.defineProperty(P,$,Object.getOwnPropertyDescriptor(A,$))}))}return P}var g=(function(){function P(){(0,fe.Z)(this,P),(0,ie.Z)(this,"name","I18n")}return(0,D.Z)(P,[{key:"init",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.config=I(I(I({},oe),x),{},{messages:I(I({},oe.messages),x.messages||{})});var A=this.config.messagesAdd;return A&&this.addMessages(A),this.config.detectLocale&&(this.config.locale=this._localLang()),this.em=x.em,this}},{key:"getConfig",value:function(){return this.config}},{key:"setLocale",value:function(x){var A=this.em,$=this.config,re={value:x,valuePrev:$.locale};return A&&A.trigger("i18n:locale",re),$.locale=x,this}},{key:"getLocale",value:function(){return this.config.locale}},{key:"getMessages",value:function(x){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=this.config.messages;return x&&!$[x]&&this._debug("'".concat(x,"' i18n lang not found"),A),x?$[x]:$}},{key:"setMessages",value:function(x){var A=this.em;return this.config.messages=x,A&&A.trigger("i18n:update",x),this}},{key:"addMessages",value:function(x){var A=this.em,$=this.config.messages;return A&&A.trigger("i18n:add",x),this.setMessages((0,ae.deepMerge)($,x)),this}},{key:"t",value:function(x){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=this.config,re=A.params||{},z=A.l||this.getLocale(),F=A.lFlb||$.localeFallback,G=this._getMsg(x,z,A);return G||(G=this._getMsg(x,F,A)),!G&&this._debug("'".concat(x,"' i18n key not found in '").concat(z,"' lang"),A),G=G&&(0,ce.isString)(G)?this._addParams(G,re):G}},{key:"_localLang",value:function(){var x=(0,ae.hasWin)()&&window.navigator||{},A=x.language||x.userLanguage;return A?A.split("-")[0]:"en"}},{key:"_addParams",value:function(x,A){var $=new RegExp("{([\\w\\d-]*)}","g");return x.replace($,(function(re,z){return A[z]||""})).trim()}},{key:"_getMsg",value:function(x,A){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},re=this.getMessages(A,$);if(re){var z=re[x];return!z&&x.indexOf(".")>0&&(z=x.split(".").reduce((function(F,G){if(!(0,ce.isUndefined)(F
133))return F[G]}),re)),z}}},{key:"_debug",value:function(x){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=this.em,re=this.config;(A.debug||re.debug)&&$&&$.logWarning(x)}},{key:"destroy",value:function(){this.config={},this.em={}}}]),P})()},9788:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>X});var fe,D=S(1002),ie=S(4942),ce=S(9050),ae=S(1163),se={},oe={16:!1,18:!1,17:!1,91:!1},W="all",I={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,command:91},g={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,home:36,end:35,pageup:33,pagedown:34,",":188,".":190,"/":191,"`":192,"-":189,"=":187,";":186,"'":222,"[":219,"]":221,"\\":220},P=function(_){return g[_]||_.toUpperCase().charCodeAt(0)},x=[];for(fe=1;fe<20;fe++)g["f"+fe]=111+fe;function A(_,M){for(var s=_.length;s--;)if(_[s]===M)return s;return-1}function $(_,M){if(_.length!=M.length)return!1;for(var s=0;s<_.length;s++)if(_[s]!==M[s])return!1;return!0}var re={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey"};function z(_){for(fe in oe)oe[fe]=_[re[fe]]}function F(_){var M,s=_.keyCode,l=A(x,s);if(l>=0&&x.splice(l,1),s!=93&&s!=224||(s=91),s in oe)for(M in oe[s]=!1,I)I[M]==s&&(H[M]=!1)}function G(){for(fe in oe)oe[fe]=!1;for(fe in I)H[fe]=!1}function H(_,M,s){var l,f;l=ye(_),s===void 0&&(s=M,M="all");for(var w=0;w<l.length;w++)f=[],(_=l[w].split("+")).length>1&&(f=ee(_),_=[_[_.length-1]]),_=_[0],(_=P(_))in se||(se[_]=[]),se[_].push({shortcut:l[w],scope:M,method:s,key:l[w],mods:f})}for(fe in I)H[fe]=!1;function ne(){return W||"all"}function ye(_){var M;return(M=(_=_.replace(/\s/g,"")).split(","))[M.length-1]==""&&(M[M.length-2]+=","),M}function ee(_){for(var M=_.slice(0,_.length-1),s=0;s<M.length;s++)M[s]=I[M[s]];return M}function O(_,M,s){_.addEventListener?_.addEventListener(M,s,!1):_.attachEvent&&_.attachEvent("on"+M,(function(){s(window.event)}))}H.setScope=function(_){W=_||"all"},H.getScope=ne,H.deleteScope=function(_){var M,s,l;for(M in se)for(s=se[M],l=0;l<s.length;)s[l].scope===_?s.splice(l,1):l++},H.filter=function(_){var M=(_.target||_.srcElement).tagName;return!(M=="INPUT"||M=="SELECT"||M=="TEXTAREA")},H.isPressed=function(_){return typeof _=="string"&&(_=P(_)),A(x,_)!=-1},H.getPressedKeyCodes=function(){return x.slice(0)},H.unbind=function(_,M){var s,l,f,w,te,J=[];for(s=ye(_),w=0;w<s.length;w++){if((l=s[w].split("+")).length>1&&(J=ee(l)),_=l[l.length-1],_=P(_),M===void 0&&(M=ne()),!se[_])return;for(f=0;f<se[_].length;f++)(te=se[_][f]).scope===M&&$(te.mods,J)&&(se[_][f]={})}},H.handlers=se,H.init=function(_){O(_.document,"keydown",(function(M){(function(s){var l,f,w,te,J,R;if(l=s.keyCode,A(x,l)==-1&&x.push(l),l!=93&&l!=224||(l=91),l in oe)for(w in oe[l]=!0,I)I[w]==l&&(H[w]=!0);else if(z(s),H.filter.call(this,s)&&l in se){for(R=ne(),te=0;te<se[l].length;te++)if((f=se[l][te]).scope==R||f.scope=="all"){for(w in J=f.mods.length>0,oe)(!oe[w]&&A(f.mods,+w)>-1||oe[w]&&A(f.mods,+w)==-1)&&(J=!1);(f.mods.length!=0||oe[16]||oe[18]||oe[17]||oe[91])&&!J||f.method(s,f)===!1&&(s.preventDefault?s.preventDefault():s.returnValue=!1,s.stopPropagation&&s.stopPropagation(),s.cancelBubble&&(s.cancelBubble=!0))}}})(M)})),O(_.document,"keyup",F),O(_,"focus",G)};const j=H;function E(_,M){var s=Object.keys(_);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(_);M&&(l=l.filter((function(f){return Object.getOwnPropertyDescriptor(_,f).enumerable}))),s.push.apply(s,l)}return s}function B(_){for(var M=1;M<arguments.length;M++){var s=arguments[M]!=null?arguments[M]:{};M%2?E(Object(s),!0).forEach((function(l){(0,ie.Z)(_,l,s[l])})):Object.getOwnPropertyDescriptors?Object.defineProperties(_,Object.getOwnPropertyDescriptors(s)):E(Object(s)).forEach((function(l){Object.defineProperty(_,l,Object.getOwnPropertyDescriptor(s,l))}))}return _}(0,ae.hasWin)()&&j.init(window);const X=function(){var _={defaults:{"core:undo":{keys:"\u2318+z, ctrl+z",handler:"core:undo"},"core:redo":{keys:"\u2318+shift+z, ctrl+shift+z",handler:"core:redo"},"core:copy":{keys:"\u2318+c, ctrl+c",handler:"core:copy"},"core:paste":{keys:"\u2318+v, ctrl+v",handler:"core:paste"},"core:component-next":{keys:"s",handler:"core:component-next"},"core:component-prev":{keys:"w",handler:"core:component-prev"},"core:component-enter":{keys:"d",handler:"core:component-enter"},"core:component-exit":{keys:"a",handler:"core:component-exit"},"core:component-delete":{keys:"backspace, delete",handler:"core:component-delete",opts:{prevent:1}}}};return{keymaster:j,name:"Keymaps",getConfig:function(){return this.config},init:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.config=B(B({},_),M),this.em=this.config.em,this.keymaps={},this},onLoad:function(){var M=this.config.defaults;for(var s in M){var l=M[s];this.add(s,l.keys,l.handler,l.opts||{})}},add:function(M,s,l){var f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},w=this.em,te=w.get("Commands"),J=w.getEditor(),R=w.get("Canvas"),k={id:M,
133keys:s,handler:l},v=this.keymaps[M];return v&&this.remove(M),this.keymaps[M]=k,j(s,(function(b,h){var m={event:b,h};if(l=(0,ce.isString)(l)?te.get(l):l,!w.isEditing()&&!J.Canvas.isInputFocused()||f.force){f.prevent&&R.getCanvasView().preventDefault(b),(0,D.Z)(l)=="object"?te.runCommand(l,m):l(J,0,m);var p=[M,h.shortcut,b];w.trigger.apply(w,["keymap:emit"].concat(p)),w.trigger.apply(w,["keymap:emit:".concat(M)].concat(p))}})),w.trigger("keymap:add",k),k},get:function(M){return this.keymaps[M]},getAll:function(){return this.keymaps},remove:function(M){var s=this.em,l=this.get(M);if(l)return delete this.keymaps[M],l.keys.split(", ").forEach((function(f){return j.unbind(f.trim())})),s&&s.trigger("keymap:remove",l),l},removeAll:function(){var M=this;return Object.keys(this.keymaps).forEach((function(s){return M.remove(s)})),j.handlers={},this},destroy:function(){this.removeAll(),this.keymaps={},this.em={}}}}},2450:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>H});var fe=S(4942),D=S(9050),ie=S(9283);const ce={stylePrefix:"mdl-",title:"",content:"",backdrop:!0,custom:!1,extend:{}};var ae=S(5671),se=S(3144),oe=S(9340),W=S(2963),I=S(1120),g=S(2316);function P(ne){var ye=(function(){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}})();return function(){var ee,O=(0,I.Z)(ne);if(ye){var j=(0,I.Z)(this).constructor;ee=Reflect.construct(O,arguments,j)}else ee=O.apply(this,arguments);return(0,W.Z)(this,ee)}}var x=(function(ne){(0,oe.Z)(ee,ne);var ye=P(ee);function ee(){return(0,ae.Z)(this,ee),ye.apply(this,arguments)}return(0,se.Z)(ee,[{key:"defaults",value:function(){return{title:"",content:"",attributes:{},open:!1}}},{key:"open",value:function(){this.set("open",!0)}},{key:"close",value:function(){this.set("open",!1)}}]),ee})(g.Model);function A(ne,ye){var ee=Object.keys(ne);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(ne);ye&&(O=O.filter((function(j){return Object.getOwnPropertyDescriptor(ne,j).enumerable}))),ee.push.apply(ee,O)}return ee}function $(ne){for(var ye=1;ye<arguments.length;ye++){var ee=arguments[ye]!=null?arguments[ye]:{};ye%2?A(Object(ee),!0).forEach((function(O){(0,fe.Z)(ne,O,ee[O])})):Object.getOwnPropertyDescriptors?Object.defineProperties(ne,Object.getOwnPropertyDescriptors(ee)):A(Object(ee)).forEach((function(O){Object.defineProperty(ne,O,Object.getOwnPropertyDescriptor(ee,O))}))}return ne}function re(ne){var ye=(function(){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}})();return function(){var ee,O=(0,I.Z)(ne);if(ye){var j=(0,I.Z)(this).constructor;ee=Reflect.construct(O,arguments,j)}else ee=O.apply(this,arguments);return(0,W.Z)(this,ee)}}var z=(function(ne){(0,oe.Z)(ee,ne);var ye=re(ee);function ee(){return(0,ae.Z)(this,ee),ye.apply(this,arguments)}return(0,se.Z)(ee,[{key:"template",value:function(O){var j=O.pfx,E=O.ppfx,B=O.content,X=O.title;return'<div class="'.concat(j,"dialog ").concat(E,"one-bg ").concat(E,`two-color"> 134 <div class="`).concat(j,`header"> 135 <div class="`).concat(j,'title">').concat(X,`</div> 136 <div class="`).concat(j,`btn-close" data-close-modal>⨯</div> 137 </div> 138 <div class="`).concat(j,`content"> 139 <div id="`).concat(j,'c">').concat(B,`</div> 140 <div style="clear:both"></div> 141 </div> 142 </div> 143 <div class="`).concat(j,'collector" style="display: none"></div>')}},{key:"events",value:function(){return{click:"onClick","click [data-close-modal]":"hide"}}},{key:"initialize",value:function(O){var j=this.model,E=O.config||{},B=E.stylePrefix||"";this.config=E,this.pfx=B,this.ppfx=E.pStylePrefix||"",this.listenTo(j,"change:open",this.updateOpen),this.listenTo(j,"change:title",this.updateTitle),this.listenTo(j,"change:content",this.updateContent)}},{key:"onClick",value:function(O){this.config.backdrop&&O.target===this.el&&this.hide()}},{key:"getCollector",value:function(){return this.$collector||(this.$collector=this.$el.find("."+this.pfx+"collector")),this.$collector}},{key:"getContent",value:function(){var O=this.pfx;return this.$content||(this.$content=this.$el.find(".".concat(O,"content #").concat(O,"c"))),this.$content}},{key:"getTitle",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.$title||(this.$title=this.$el.find("."+this.pfx+"title")),O.$?this.$title:this.$title.get(0)}},{key:"updateContent",value:function(){var O=this.getContent(),j=O.children(),E=this.getCollector(),B=this.model.get("content");j.length&&E.append(j),O.empty().append(B)}},{key:"updateTitle",value:function(){var O=this.getTitle({$:!0});O&&O.empty().append(this.model.get("title"))}},{key:"updateOpen",value:function(){this.el.style.display=this.model.get("open")?"":"none"}},{key:"hide",value:function(){this.model.close()}},{key:"show",value:function(){this.model.open()}},{key:"updateAttr",value:function(O){var j=this.pfx,E=this.$el,B=this.el,X=[].slice.call(B.attributes).map((function(_){return _.name}));E.removeAttr(X.join(" ")),E.attr($($({},O||{}),{},{class:"".concat(j,"container ").concat(O&&O.class||"").trim()}))}},{key:"render",value:function(){var O=this.$el,j=this.model.toJSON();return j.pfx=this.pfx,j.ppfx=this.ppfx,O.html(this.template(j)),this.updateAttr(),this.updateOpen(),this}}]),ee})(g.View);function F(ne,ye){var ee=Object.keys(ne);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(ne);ye&&(O=O.filter((function(j){return Object.getOwnPropertyDescriptor(ne,j).enumerable}))),ee.push.apply(ee,O)}return ee}function G(ne){for(var ye=1;ye<arguments.length;ye++){var ee=arguments[ye]!=null?arguments[ye]:{};
143ye%2?F(Object(ee),!0).forEach((function(O){(0,fe.Z)(ne,O,ee[O])})):Object.getOwnPropertyDescriptors?Object.defineProperties(ne,Object.getOwnPropertyDescriptors(ee)):F(Object(ee)).forEach((function(O){Object.defineProperty(ne,O,Object.getOwnPropertyDescriptor(ee,O))}))}return ne}const H=function(){var ne,ye,ee={},O=function(j,E){E&&E.trigger("modal:".concat(j?"open":"close"))};return{name:"Modal",getConfig:function(){return ee},init:function(){var j=this,E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},B=(ee=G(G({},ce),E)).em;this.em=B;var X=ee.pStylePrefix;return X&&(ee.stylePrefix=X+ee.stylePrefix),(ne=new x(ee)).on("change:open",(function(_,M){return O(M,B)})),ne.on("change",(0,D.debounce)((function(){var _=j._evData(),M=j.getConfig().custom;(0,D.isFunction)(M)&&M(_),B.trigger("modal",_)}))),this},_evData:function(){var j=this,E=this.getTitle(),B=this.getContent(),X=ne.attributes;return{open:X.open,attributes:X.attributes,title:(0,D.isString)(E)?(0,ie.rw)(E):E,content:(0,D.isString)(B)?(0,ie.rw)(B):B.get?B.get(0):B,close:function(){return j.close()}}},postRender:function(j){var E=j.model.getConfig().el||j.el,B=this.render();B&&B.appendTo(E)},open:function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=j.attributes||{};
143return j.title&&this.setTitle(j.title),j.content&&this.setContent(j.content),ne.set("attributes",E),ne.open(),ye&&ye.updateAttr(E),this},close:function(){return ne.close(),this},onceClose:function(j){return this.em.once("modal:close",j),this},onceOpen:function(j){return this.em.once("modal:open",j),this},isOpen:function(){return!!ne.get("open")},setTitle:function(j){return ne.set("title",j),this},getTitle:function(){return ne.get("title")},setContent:function(j){return ne.set("content"," "),ne.set("content",j),this},getContent:function(){return ne.get("content")},getContentEl:function(){return ye.getContent().get(0)},getModel:function(){return ne},render:function(){if(!this.getConfig().custom){var j=z.extend(ee.extend),E=ye&&ye.el;return(ye=new j({el:E,model:ne,config:ee})).render().$el}},destroy:function(){ye&&ye.remove(),[ee,ne,ye].forEach((function(j){return{}})),this.em={}}}}},4906:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>te});var fe="sw-visibility",D="export-template",ie="open-sm",ce="open-tm",ae="open-layers",se="open-blocks",oe="fullscreen",W="preview";const I={stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{}]},{id:"options",buttons:[{active:!0,id:fe,className:"fa fa-square-o",command:fe,context:fe,attributes:{title:"View components"}},{id:W,className:"fa fa-eye",command:W,context:W,attributes:{title:"Preview"}},{id:oe,className:"fa fa-arrows-alt",command:oe,context:oe,attributes:{title:"Fullscreen"}},{id:D,className:"fa fa-code",command:D,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:ie,className:"fa fa-paint-brush",command:ie,active:!0,togglable:0,attributes:{title:"Open Style Manager"}},{id:ce,className:"fa fa-cog",command:ce,togglable:0,attributes:{title:"Settings"}},{id:ae,className:"fa fa-bars",command:ae,togglable:0,attributes:{title:"Open Layer Manager"}},{id:se,className:"fa fa-th-large",command:se,togglable:0,attributes:{title:"Open Blocks"}}]}],em:null,delayBtnsShow:300};var g=S(5671),P=S(3144),x=S(9340),A=S(2963),$=S(1120),re=S(2316),z=S(2516);function F(J){var R=(function(){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}})();return function(){var k,v=(0,$.Z)(J);if(R){var b=(0,$.Z)(this).constructor;k=Reflect.construct(v,arguments,b)}else k=v.apply(this,arguments);return(0,A.Z)(this,k)}}var G=(function(J){(0,x.Z)(k,J);var R=F(k);function k(){return(0,g.Z)(this,k),R.apply(this,arguments)}return(0,P.Z)(k,[{key:"defaults",value:function(){return{id:"",content:"",visible:!0,buttons:[],attributes:{}}}},{key:"initialize",value:function(v){this.btn=this.get("buttons")||[],this.buttons=new z.Z(this.btn),this.set("buttons",this.buttons)}}]),k})(re.Model);function H(J){var R=(function(){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}})();return function(){var k,v=(0,$.Z)(J);if(R){var b=(0,$.Z)(this).constructor;k=Reflect.construct(v,arguments,b)}else k=v.apply(this,arguments);return(0,A.Z)(this,k)}}var ne=(function(J){(0,x.Z)(k,J);var R=H(k);function k(){return(0,g.Z)(this,k),R.apply(this,arguments)}return(0,P.Z)(k)})(re.Collection);ne.prototype.model=G;var ye=S(4942),ee=S(9050);function O(J,R){var k=Object.keys(J);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(J);R&&(v=v.filter((function(b){return Object.getOwnPropertyDescriptor(J,b).enumerable}))),k.push.apply(k,v)}return k}function j(J){for(var R=1;R<arguments.length;R++){var k=arguments[R]!=null?arguments[R]:{};R%2?O(Object(k),!0).forEach((function(v){(0,ye.Z)(J,v,k[v])})):Object.getOwnPropertyDescriptors?Object.defineProperties(J,Object.getOwnPropertyDescriptors(k)):O(Object(k)).forEach((function(v){Object.defineProperty(J,v,Object.getOwnPropertyDescriptor(k,v))}))}return J}function E(J){var R=(function(){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}})();return function(){var k,v=(0,$.Z)(J);if(R){var b=(0,$.Z)(this).constructor;k=Reflect.construct(v,arguments,b)}else k=v.apply(this,arguments);return(0,A.Z)(this,k)}}var B=(function(J){(0,x.Z)(k,J);var R=E(k);function k(){return(0,g.Z)(this,k),R.apply(this,arguments)}return(0,P.Z)(k,[{key:"tagName",value:function(){return this.model.get("tagName")}},{key:"events",value:function(){return{click:"clicked"}}},{key:"initialize",value:function(v){var b=this.model,h=b.get("className"),m=b.attributes,p=m.command,y=m.listen,Z=v.config||{},Y=Z.em;this.config=Z,this.em=Y;var q=this.config.stylePrefix||"",N=this.config.pStylePrefix||"";if(this.pfx=q,this.ppfx=this.config.pStylePrefix||"",this.id=q+b.get("id"),this.activeCls="".concat(q,"active ").concat(N,"four-color"),this.disableCls="".concat(N,"disabled"),this.btnsVisCls="".concat(q,"visible"),this.className=q+"btn"+(h?" "+h:""),this.listenTo(b,"change",this.render),this.listenTo(b,"change:active updateActive",this.updateActive),this.listenTo(b,"checkActive",this.checkActive),this.listenTo(b,"change:bntsVis",this.updateBtnsVis),this.listenTo(b,"change:attributes",this.updateAttributes),this.listenTo(b,"change:className",this.updateClassName),this.listenTo(b,"change:disable",this.updateDisable),Y&&(0,ee.isString)(p)&&y){var a={fromListen:1};this.listenTo(Y,"run:".concat(p),(function(){return b.set("active",!0,a)})),this.listenTo(Y,"stop:".concat(p),(function(){return b.set("active",!1,a)}))}Y&&Y.get&&(this.commands=Y.get("Commands"))}},{key:"updateClassName",value:function(){var v=this.model,b=this.pfx,h=v.get("
143className"),m=v.get("attributes").class,p="".concat(m||""," ").concat(b,"btn ").concat(h||"");this.$el.attr("class",p.trim())}},{key:"updateAttributes",value:function(){var v=this.em,b=this.model,h=this.$el,m=b.get("attributes")||{},p=v&&v.t&&v.t("panels.buttons.titles.".concat(b.id));h.attr(m),p&&h.attr({title:p}),this.updateClassName()}},{key:"updateBtnsVis",value:function(){this.$buttons&&(this.model.get("bntsVis")?this.$buttons.addClass(this.btnsVisCls):this.$buttons.removeClass(this.btnsVisCls))}},{key:"updateActive",value:function(v,b){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},m=this.model,p=this.commands,y=this.$el,Z=this.activeCls,Y=h.fromCollection,q=h.fromListen,N=m.get("context"),a=m.get("options"),c=m.get("command"),C={};c&&(p&&(0,ee.isString)(c)?C=p.get(c)||{}:(0,ee.isFunction)(c)?C=p.create({run:c}):c!==null&&(0,ee.isObject)(c)&&(C=p.create(c)),m.get("active")?(!Y&&m.collection.deactivateAll(N,m),m.set("active",!0,{silent:!0}).trigger("checkActive"),!q&&p.runCommand(C,j(j({},a),{},{sender:m})),C.noStop&&m.set("active",!1)):(y.removeClass(Z),!q&&p.stopCommand(C,j(j({},a),{},{sender:m,force:1}))))}},{key:"updateDisable",value:function(){var v=this.disableCls,b=this.model.get("disable");this.$el[b?"addClass":"removeClass"](v)}},{key:"checkActive",value:function(){var v=this.model,b=this.$el,h=this.activeCls;v.get("active")?b.addClass(h):b.removeClass(h)}},{key:"clicked",value:function(v){var b=this.model;b.get("bntsVis")||b.get("disable")||!b.get("command")||this.toggleActive()}},{key:"toggleActive",value:function(){var v=this.model,b=this.em,h=v.attributes,m=h.active,p=h.togglable;m&&!p||(v.set("active",!m),m?v.get("runDefaultCommand")&&b.runDefault():v.get("stopDefaultCommand")&&b.stopDefault())}},{key:"render",value:function(){var v=this.model,b=v.get("label"),h=this.$el;return!v.get("el")&&h.empty(),this.updateAttributes(),b&&h.append(b),this.checkActive(),this.updateDisable(),this}}]),k})(re.View);function X(J){var R=(function(){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}})();return function(){var k,v=(0,$.Z)(J);if(R){var b=(0,$.Z)(this).constructor;k=Reflect.construct(v,arguments,b)}else k=v.apply(this,arguments);return(0,A.Z)(this,k)}}var _=(function(J){(0,x.Z)(k,J);var R=X(k);function k(){return(0,g.Z)(this,k),R.apply(this,arguments)}return(0,P.Z)(k,[{key:"initialize",value:function(v){this.opt=v||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"",this.parentM=this.opt.parentM||null,this.listenTo(this.collection,"add",this.addTo),this.listenTo(this.collection,"reset remove",this.render),this.className=this.pfx+"buttons"}},{key:"addTo",value:function(v){this.addToCollection(v)}},{key:"addToCollection",value:function(v,b){var h=b||null,m=new B({el:v.get("el"),model:v,config:this.config,parentM:this.parentM}).render().el;return h?h.appendChild(m):this.$el.append(m),m}},{key:"render",value:function(){var v=document.createDocumentFragment();return this.$el.empty(),this.collection.each((function(b){this.addToCollection(b,v)}),this),this.$el.append(v),this.$el.attr("class",(0,ee.result)(this,"className")),this}}]),k})(re.View);function M(J,R){var k=Object.keys(J);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(J);R&&(v=v.filter((function(b){return Object.getOwnPropertyDescriptor(J,b).enumerable}))),k.push.apply(k,v)}return k}function s(J){var R=(function(){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}})();return function(){var k,v=(0,$.Z)(J);if(R){var b=(0,$.Z)(this).constructor;k=Reflect.construct(v,arguments,b)}else k=v.apply(this,arguments);return(0,A.Z)(this,k)}}var l=(function(J){(0,x.Z)(k,J);var R=s(k);function k(){return(0,g.Z)(this,k),R.apply(this,arguments)}return(0,P.Z)(k,[{key:"initialize",value:function(v){var b=v.config||{},h=this.model;this.config=b,this.pfx=b.stylePrefix||"",this.ppfx=b.pStylePrefix||"",this.buttons=h.get("buttons"),this.className=this.pfx+"panel",this.id=this.pfx+h.get("id"),this.listenTo(h,"change:appendContent",this.appendContent),this.listenTo(h,"change:content",this.updateContent),this.listenTo(h,"change:visible",this.toggleVisible),h.view=this}},{key:"appendContent",value:function(){this.$el.append(this.model.get("appendContent"))}},{key:"updateContent",value:function(){this.$el.html(this.model.get("content"))}},{key:"toggleVisible",value:function(){this.model.get("visible")?this.$el.removeClass("".concat(this.ppfx,"hidden")):this.$el.addClass("".concat(this.ppfx,"hidden"))}},{key:"attributes",value:function(){return this.model.get("attributes")}},{key:"initResize",value:function(){var v=this.config.em,b=v?v.get("Editor"):"",h=this.model.get("resizable");if(b&&h){var m,p,y,Z=h===!0?[1,1,1,1]:h,Y=Z.length,q=0;Y==2?(m=Z[0],y=Z[0],p=Z[1],q=Z[1]):Y==4&&(m=Z[0],p=Z[1],y=Z[2],q=Z[3]);var N=b.Utils.Resizer.init((function(a){for(var c=1;c<arguments.length;c++){var C=arguments[c]!=null?arguments[c]:{};
143c%2?M(Object(C),!0).forEach((function(Q){(0,ye.Z)(a,Q,C[Q])})):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(C)):M(Object(C)).forEach((function(Q){Object.defineProperty(a,Q,Object.getOwnPropertyDescriptor(C,Q))}))}return a})({tc:m,cr:p,bc:y,cl:q,tl:0,tr:0,bl:0,br:0,appendTo:this.el,silentFrames:1,avoidContainerUpdate:1,prefix:b.getConfig().stylePrefix,onEnd:function(){v&&v.trigger("change:canvasOffset")},posFetcher:function(a,c){var C=c.target,Q=a.style,pe=N.getConfig(),Ce=pe.keyWidth,Se=pe.keyHeight,me=a.getBoundingClientRect(),xe=C=="container",de=Q[Ce],Ee=Q[Se];return{left:0,top:0,width:de&&!xe?parseFloat(de):me.width,height:Ee&&!xe?parseFloat(Ee):me.height}}},h));N.blur=function(){},N.focus(this.el)}}},{key:"render",value:function(){var v=this.$el,b=this.ppfx,h="".concat(this.className," ").concat(this.id," ").concat(b,"one-bg ").concat(b,"two-color");if(v.addClass(h),this.toggleVisible(),this.buttons.length){var m=new _({collection:this.buttons,config:this.config});v.append(m.render().el)}return v.append(this.model.get("content")),this}}]),k})(re.View);function f(J){var R=(function(){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}})();return function(){var k,v=(0,$.Z)(J);if(R){var b=(0,$.Z)(this).constructor;k=Reflect.construct(v,arguments,b)}else k=v.apply(this,arguments);return(0,A.Z)(this,k)}}var w=(function(J){(0,x.Z)(k,J);var R=f(k);function k(){return(0,g.Z)(this,k),R.apply(this,arguments)}return(0,P.Z)(k,[{key:"initialize",value:function(v){this.opt=v||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||"";var b=this.collection;this.listenTo(b,"add",this.addTo),this.listenTo(b,"reset",this.render),this.listenTo(b,"remove",this.onRemove),this.className=this.pfx+"panels"}},{key:"onRemove",value:function(v){var b=v.view;b&&b.remove()}},{key:"addTo",value:function(v){this.addToCollection(v)}},{key:"addToCollection",value:function(v,b){var h=b||null,m=this.config,p=v.get("el"),y=new l({el:p,model:v,config:m}),Z=y.render().el,Y=v.get("appendTo");return p||(Y?document.querySelector(Y).appendChild(Z):h?h.appendChild(Z):this.$el.append(Z)),y.initResize(),Z}},{key:"render",value:function(){var v=this,b=this.$el,h=document.createDocumentFragment();return b.empty(),this.collection.each((function(m){return v.addToCollection(m,h)})),b.append(h),b.attr("class",this.className),this}}]),k})(re.View);const te=function(){var J,R,k={};return{name:"Panels",init:function(v){for(var b in k=v||{},I)b in k||(k[b]=I[b]);var h=k.pStylePrefix;return h&&(k.stylePrefix=h+k.stylePrefix),J=new ne(k.defaults),this},getPanels:function(){return J},getPanelsEl:function(){return R&&R.el},addPanel:function(v){return J.add(v)},removePanel:function(v){return J.remove(v)},getPanel:function(v){var b=J.where({id:v});return b.length?b[0]:null},addButton:function(v,b){var h=this.getPanel(v);return h?h.get("buttons").add(b):null},removeButton:function(v,b){var h=this.getPanel(v);return h&&h.get("buttons").remove(b)},getButton:function(v,b){var h=this.getPanel(v);if(h){var m=h.get("buttons").where({id:b});return m.length?m[0]:null}return null},render:function(){return R&&R.remove(),(R=new w({collection:J,config:k})).render().el},active:function(){this.getPanels().each((function(v){v.get("buttons").each((function(b){b.get("active")&&b.trigger("updateActive")}))}))},disableButtons:function(){this.getPanels().each((function(v){v.get("buttons").each((function(b){b.get("disable")&&b.trigger("change:disable")}))}))},destroy:function(){J.reset(),J.stopListening(),R&&R.remove(),[k,J,R].forEach((function(v){return{}}))},Panel:G}}},2516:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>g});var fe=S(5671),D=S(3144),ie=S(9340),ce=S(2963),ae=S(1120),se=S(2316);function oe(P){var x=(function(){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}})();return function(){var A,$=(0,ae.Z)(P);if(x){var re=(0,ae.Z)(this).constructor;A=Reflect.construct($,arguments,re)}else A=$.apply(this,arguments);return(0,ce.Z)(this,A)}}var W=(function(P){(0,ie.Z)(A,P);var x=oe(A);function A(){return(0,fe.Z)(this,A),x.apply(this,arguments)}return(0,D.Z)(A,[{key:"defaults",value:function(){return{id:"",label:"",tagName:"span",className:"",command:"",context:"",buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,togglable:!0,runDefaultCommand:!0,stopDefaultCommand:!1,disable:!1}}},{key:"initialize",value:function($){if(this.get("buttons").length){var re=S(2516).Z;this.set("buttons",new re(this.get("buttons")))}}}]),A})(se.Model);function I(P){var x=(function(){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}})();return function(){var A,$=(0,ae.Z)(P);if(x){var re=(0,ae.Z)(this).constructor;A=Reflect.construct($,arguments,re)}else A=$.apply(this,arguments);return(0,ce.Z)(this,A)}}var g=(function(P){(0,ie.Z)(A,P);var x=I(A);function A(){return(0,fe.Z)(this,A),x.apply(this,arguments)}
143return(0,D.Z)(A,[{key:"deactivateAllExceptOne",value:function($,re){this.forEach((function(z,F){z!==$&&(z.set("active",!1),re&&z.get("buttons").length&&z.get("buttons").deactivateAllExceptOne($,re))}))}},{key:"deactivateAll",value:function($,re){var z=$||"";this.forEach((function(F){F.get("context")==z&&F!==re&&F.set("active",!1,{fromCollection:1})}))}},{key:"disableAllButtons",value:function($){var re=$||"";this.forEach((function(z,F){z.get("context")==re&&z.set("disable",!0)}))}},{key:"disableAllButtonsExceptOne",value:function($,re){this.forEach((function(z,F){z!==$&&(z.set("disable",!0),re&&z.get("buttons").length&&z.get("buttons").disableAllButtonsExceptOne($,re))}))}}]),A})(se.Collection);g.prototype.model=W},4424:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>G});var fe=S(4942);const D={textTags:["br","b","i","u","a","ul","ol"],parserCss:null,parserHtml:null,optionsHtml:{htmlType:null,allowScripts:!1,allowUnsafeAttr:!1}};var ie=S(9050),ce={4:"media",5:"font-face",6:"page",7:"keyframes",11:"counter-style",12:"supports",13:"document",14:"font-feature-values",15:"viewport"},ae=(0,ie.keys)(ce),se=["5","6","11","15"],oe=["font-face","page","counter-style","viewport"],W=function(){for(var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",ne=[],ye=[],ee=H.split(","),O=0,j=ee.length;O<j;O++){var E=ee[O].trim();if(/^(\.{1}[\w\-]+)+(:{1,2}[\w\-()]+)?$/gi.test(E)||/^(#{1}[\w\-]+){1}(:{1,2}[\w\-()]+)?$/gi.test(E)){var B=E.split(".").filter(Boolean);ye.push(B)}else ne.push(E)}return{result:ye,add:ne}},I=function(H){for(var ne=H.style,ye={},ee=0,O=ne.length;ee<O;ee++){var j=ne[ee],E=ne.getPropertyValue(j),B=ne.getPropertyPriority(j);ye[j]="".concat(E).concat(B?" !".concat(B):"")}return ye},g=function(H){return(H.conditionText||H.media&&H.media.mediaText||H.name||H.selectorText||"").trim()},P=function(H){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ee={},O=H.length,j=H[O-1],E=j?j.split(/:(.+)/):[],B=E[1],X=ye.atRule,_=ye.selectorsAdd,M=ye.mediaText,s=oe.indexOf(X)>=0;return s&&(ee.singleAtRule=1),X&&(ee.atRuleType=X),_&&(ee.selectorsAdd=_),M&&(ee.mediaText=M),B&&(H[O-1]=E[0],ee.state=B,E.splice(E.length-1,1)),ee.selectors=H,ee.style=ne,ee},x=function H(ne){for(var ye=[],ee=ne.cssRules||[],O=0,j=ee.length;O<j;O++){var E=ee[O],B=E.type.toString(),X=0,_="",M="",s=E.selectorText||E.keyText,l=se.indexOf(B)>=0;if(l)X=1,_=ce[B],M=g(E);else if(ae.indexOf(B)>=0){var f=H(E);M=g(E);for(var w=0,te=f.length;w<te;w++){var J=f[w];M&&(J.mediaText=M),J.atRuleType=ce[B]}ye=ye.concat(f)}if(s||l){for(var R=I(E),k=W(s),v=k.add,b=void 0,h=0,m=(s=k.result).length;h<m;h++){var p=P(s[h],R,{atRule:ce[B]});ye.push(p),b=p}if(v.length){var y=v.join(", ");if(b)b.selectorsAdd=y;else{var Z={selectors:[],selectorsAdd:y,style:R};X&&(Z.singleAtRule=X),_&&(Z.atRuleType=_),M&&(Z.mediaText=M),ye.push(Z)}}}}return ye};const A=function(H){var ne=document.createElement("style");ne.innerHTML=H,document.head.appendChild(ne);var ye=ne.sheet;return document.head.removeChild(ne),x(ye)},$=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{parse:function(ne){var ye=this,ee=[],O=H.parserCss,j=H.em,E=j&&j.get&&j.get("Editor");return(O?O(ne,E):A(ne)).forEach((function(B){return ee=ee.concat(ye.checkNode(B))})),j&&j.trigger("parse:css",{input:ne,output:ee}),ee},checkNode:function(ne){var ye=ne,ee=ye.selectors,O=ye.style;if((0,ie.isString)(ee)){var j=[],E=W(ee),B=E.result,X=E.add.join(", "),_={atRule:ne.atRule,mediaText:ne.params};B.length?B.forEach((function(M){j.push(P(M,O,_))})):j.push(P([],O,_)),X&&(j[j.length-1].selectorsAdd=X),ne=j}return ne}}};var re=S(5311);function z(H,ne){var ye=Object.keys(H);if(Object.getOwnPropertySymbols){var ee=Object.getOwnPropertySymbols(H);ne&&(ee=ee.filter((function(O){return Object.getOwnPropertyDescriptor(H,O).enumerable}))),ye.push.apply(ye,ee)}return ye}function F(H){for(var ne=1;ne<arguments.length;ne++){var ye=arguments[ne]!=null?arguments[ne]:{};ne%2?z(Object(ye),!0).forEach((function(ee){(0,fe.Z)(H,ee,ye[ee])})):Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(ye)):z(Object(ye)).forEac
143h((function(ee){Object.defineProperty(H,ee,Object.getOwnPropertyDescriptor(ye,ee))}))}return H}const G=function(){var H,ne,ye={};return{compTypes:"",parserCss:null,parserHtml:null,name:"Parser",init:function(){var ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(ye=F(F({},D),ee)).Parser=this,H=new re.Z(ye),ne=new $(ye),this.em=ye.em,this.parserCss=ne,this.parserHtml=H,this},getConfig:function(){return ye},parseHtml:function(ee){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},j=this.em,E=this.compTypes;return H.compTypes=j?j.get("DomComponents").getTypes():E,H.parse(ee,ne,O)},parseCss:function(ee){return ne.parse(ee)},destroy:function(){var ee=this;[ye,H,ne].forEach((function(O){return{}})),["em","parserCss","parserHtml"].forEach((function(O){return ee[O]={}}))}}}},5311:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>I});var fe=S(4942),D=S(1002),ie=S(9050),ce="text/html",ae=ce;const se=function(g){var P,x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=new DOMParser,$=x.htmlType||ae,re=$===ce,z=re?g:"<div>".concat(g,"</div>"),F=A.parseFromString(z,$);if(re){var G=F.head,H=F.body,ne=G.querySelectorAll("script");(0,ie.each)(ne,(function(ee){return H.appendChild(ee)}));var ye=[];(0,ie.each)(G.children,(function(ee){return ye.push(ee)})),(0,ie.each)(ye,(function(ee,O){return H.insertBefore(ee,H.children[O])})),P=H}else P=F.firstChild;return P};function oe(g,P){var x=Object.keys(g);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(g);P&&(A=A.filter((function($){return Object.getOwnPropertyDescriptor(g,$).enumerable}))),x.push.apply(x,A)}return x}function W(g){for(var P=1;P<arguments.length;P++){var x=arguments[P]!=null?arguments[P]:{};P%2?oe(Object(x),!0).forEach((function(A){(0,fe.Z)(g,A,x[A])})):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(x)):oe(Object(x)).forEach((function(A){Object.defineProperty(g,A,Object.getOwnPropertyDescriptor(x,A))}))}return g}const I=function(g){var P=g,x="data-gjs-",A="parse:html";return{compTypes:"",modelAttrStart:x,splitPropsFromAttr:function(){var $=this,re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},z={},F={};return(0,ie.each)(re,(function(G,H){if(H.indexOf($.modelAttrStart)===0){var ne=H.replace(x,""),ye=G.length,ee=G&&(0,ie.isString)(G),O=ee&&G.substr(0,1),j=ee&&G.substr(ye-1);G=(G=G==="true"||G)!=="false"&&G;try{G=O=="{"&&j=="}"||O=="["&&j=="]"?JSON.parse(G):G}catch{}z[ne]=G}else F[H]=G})),{props:z,attrs:F}},parseStyle:function($){for(var re={},z=$.split(";"),F=0,G=z.length;F<G;F++){var H=z[F].trim();if(H){var ne=H.split(":");re[ne[0].trim()]=ne.slice(1).join(":").trim()}}return re},parseClass:function($){for(var re=[],z=$.split(" "),F=0,G=z.length;F<G;F++){var H=z[F].trim();H&&re.push(H)}return re},parseNode:function($){for(var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},z=[],F=$.childNodes,G=0,H=F.length;G<H;G++){var ne=F[G],ye=ne.attributes||[],ee=ye.length,O=z[z.length-1],j=ne.childNodes.length,E=this.compTypes,B={};if(E){var X="",_=ne.getAttribute&&ne.getAttribute("".concat(x,"type"));if(_)B={type:_};else{for(var M=0;M<E.length;M++){var s=E[M];if(X=s.model.isComponent(ne,re)){(0,D.Z)(X)!=="object"&&(X={type:s.id});break}}B=X}}if(!B.tagName){var l=ne.tagName||"",f=ne.namespaceURI||"";B.tagName=l&&f==="http://www.w3.org/1999/xhtml"?l.toLowerCase():l}ee&&(B.attributes={});for(var w=0;w<ee;w++){var te=ye[w].nodeName,J=ye[w].nodeValue;if(te=="style")B.style=this.parseStyle(J);else if(te=="class")B.classes=this.parseClass(J);else{if(te=="contenteditable")continue;if(te.indexOf(x)===0){var R=te.replace(x,""),k=J.length,v=J&&J.substr(0,1),b=J&&J.substr(k-1);J=(J=J==="true"||J)!=="false"&&J;try{J=v=="{"&&b=="}"||v=="["&&b=="]"?JSON.parse(J):J}catch{}B[R]=J}else J===""&&ne[te]===!0&&(J=!0),B.attributes[te]=J}}if(j&&!B.components){var h=ne.childNodes[0];j===1&&h.nodeType===3?(!B.type&&(B.type="text"),B.components={type:"textnode",content:h.nodeValue}):B.components=this.parseNode(ne,W(W({},re),{},{inSvg:re.inSvg||B.type==="svg"}))}if(B.type=="textnode"){if(O&&O.type=="textnode"){O.content+=B.content;continue}if(!g.keepEmptyTextNodes){var m=ne.nodeValue;if(m!=" "&&!m.trim())continue}}j||"".concat(ne.outerHTML).slice(-2)!=="/>"||(B.void=!0);var p=B.components;if(!B.type&&p){for(var y=1,Z=0,Y=0;Y<p.length;Y++){var q=p[Y],N=q.type;if(["text","textnode"].indexOf(N)<0&&P.textTags.indexOf(q.tagName)<0){y=0;break}N=="textnode"&&(Z=1)}y&&Z&&(B.type="text")}(B.tagName||B.type=="textnode")&&z.push(B)}return z},parse:function($,re){var z,F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},G=P.em,H=G&&G.get("Config")||{},ne={html:null,css:null},ye=W(W({},g),F),ee=W(W({},g.optionsHtml),{},{htmlType:((z=g.optionsHtml)===null||z===void 0?void 0:z.htmlType)||g.htmlType},F),O=(0,ie.isFunction)(ye.parserHtml)?ye.parserHtml($,ee):se($,ee),j=O.querySelectorAll("script"),E=j.length,B=(0,ie.isUndefined)(H.allowScripts)?ee.allowScripts:H.allowScripts;if(!B)for(;E--;)j[E].parentNode.removeChild(j[E]);if(ee.allowUnsafeAttr||this.__clearUnsafeAttr(O),re){for(var X=O.querySelectorAll("style"),_=X.length,M="";_--;)M=X[_].innerHTML+M,X[_].parentNode.removeChild(X[_]);M&&(ne.css=re.parse(M))}G&&G.trigger("".concat(A,":root"),{input:$,root:O});var s=this.parseNode(O,ye),l=s.length!==1||P.returnArray?s:s[0];
143return ne.html=l,G&&G.trigger(A,{input:$,output:ne}),ne},__clearUnsafeAttr:function($){var re=this,z=$.attributes||[],F=$.childNodes||[],G=[];(0,ie.each)(z,(function(H){var ne=H.nodeName||"";ne.indexOf("on")===0&&G.push(ne)})),G.map((function(H){return $.removeAttribute(H)})),(0,ie.each)(F,(function(H){return re.__clearUnsafeAttr(H)}))}}}},2012:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>j});var fe=S(5861),D=S(2982),ie=S(4942),ce=S(7757),ae=S.n(ce),se=S(1163),oe=S(5671),W=S(3144),I=S(9050);function g(E,B){var X=Object.keys(E);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(E);B&&(_=_.filter((function(M){return Object.getOwnPropertyDescriptor(E,M).enumerable}))),X.push.apply(X,_)}return X}function P(E){for(var B=1;B<arguments.length;B++){var X=arguments[B]!=null?arguments[B]:{};B%2?g(Object(X),!0).forEach((function(_){(0,ie.Z)(E,_,X[_])})):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(X)):g(Object(X)).forEach((function(_){Object.defineProperty(E,_,Object.getOwnPropertyDescriptor(X,_))}))}return E}var x="_rte",A=1,$=0,re=-1,z=function(E){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"A",X=E.selection(),_=X.anchorNode,M=X.focusNode,s=_?.parentNode,l=M?.parentNode;return s?.nodeName==B||l?.nodeName==B},F="data-selectme",G={bold:{name:"bold",icon:"<b>B</b>",attributes:{title:"Bold"},result:function(E){return E.exec("bold")}},italic:{name:"italic",icon:"<i>I</i>",attributes:{title:"Italic"},result:function(E){return E.exec("italic")}},underline:{name:"underline",icon:"<u>U</u>",attributes:{title:"Underline"},result:function(E){return E.exec("underline")}},strikethrough:{name:"strikethrough",icon:"<s>S</s>",attributes:{title:"Strike-through"},result:function(E){return E.exec("strikeThrough")}},link:{icon:`<svg viewBox="0 0 24 24"> 144 <path fill="currentColor" d="M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z" /> 145 </svg>`,name:"link",attributes:{style:"font-size:1.4rem;padding:0 4px 2px;",title:"Link"},state:function(E){return E&&E.selection()&&z(E)?A:$},result:function(E){z(E)?E.exec("unlink"):E.insertHTML('<a href="" '.concat(F,">").concat(E.selection(),"</a>"),{select:!0})}},wrap:{icon:`<svg viewBox="0 0 24 24">
146 <path fill="currentColor" d="M20.71,4.63L19.37,3.29C19,2.9 18.35,2.9 17.96,3.29L9,12.25L11.75,15L20.71,6.04C21.1,5.65 21.1,5 20.71,4.63M7,14A3,3 0 0,0 4,17C4,18.31 2.84,19 2,19C2.92,20.22 4.5,21 6,21A4,4 0 0,0 10,17A3,3 0 0,0 7,14Z" /> 147 </svg>`,attributes:{title:"Wrap for style"},state:function(E){return E!=null&&E.selection()&&z(E,"SPAN")?re:$},result:function(E){!z(E,"SPAN")&&E.insertHTML("<span ".concat(F,">").concat(E.selection(),"</span>"),{select:!0})}}},H=(function(){function E(){var B=this,X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,oe.Z)(this,E);var _=X.el,M=X.em;if(this.em=M,_[x])return _[x];_[x]=this,this.setEl(_),this.updateActiveActions=this.updateActiveActions.bind(this),this.__onKeydown=this.__onKeydown.bind(this),this.__onPaste=this.__onPaste.bind(this);var s=(X.actions||[]).map((function(J){var R=J;return typeof J=="string"?R=P({},G[J]):G[J.name]&&(R=P(P({},G[J.name]),J)),R})),l=s.length?s:Object.keys(G).map((function(J){return G[J]}));X.classes=P(P({},{actionbar:"actionbar",button:"action",active:"active",disabled:"disabled",inactive:"inactive"}),X.classes);var f=X.classes,w=X.actionbar;if(this.actionbar=w,this.settings=X,this.classes=f,this.actions=l,!w){var te=X.actionbarContainer;(w=document.createElement("div")).className=f.actionbar,te.appendChild(w),this.actionbar=w,l.forEach((function(J){return B.addAction(J)}))}return X.styleWithCSS&&this.exec("styleWithCSS"),this}return(0,W.Z)(E,[{key:"destroy",value:function(){this.el=0,this.doc=0,this.actionbar=0,this.settings={},this.classes={},this.actions=[]}},{key:"setEl",value:function(B){this.el=B,this.doc=B.ownerDocument}},{key:"updateActiveActions",value:function(){var B=this;this.getActions().forEach((function(X){var _=X.btn,M=X.update,s=P({},B.classes),l=s.active,f=s.inactive,w=s.disabled,te=X.state,J=X.name,R=B.doc;if(_.className=_.className.replace(l,"").trim(),_.className=_.className.replace(f,"").trim(),_.className=_.className.replace(w,"").trim(),te)switch(te(B,R)){case A:_.className+=" ".concat(l);break;case $:_.className+=" ".concat(f);break;case re:_.className+=" ".concat(w)}else R.queryCommandSupported(J)&&R.queryCommandState(J)&&(_.className+=" ".concat(l));M&&M(B,X)}))}},{key:"enable",value:function(B){return this.enabled?this:this.__toggleEffects(!0,B)}},{key:"disable",value:function(){return this.__toggleEffects(!1)}},{key:"__toggleEffects",value:function(){var B=arguments.length>0&&arguments[0]!==void 0&&arguments[0],X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=B?se.on:se.off,M=this.el,s=this.doc;if(this.actionbarEl().style.display=B?"":"none",M.contentEditable=!!B,_(M,"mouseup keyup",this.updateActiveActions),_(s,"keydown",this.__onKeydown),_(s,"paste",this.__onPaste),this.enabled=B,B){var l=X.event;if(this.syncActions(),this.updateActiveActions(),l){var f=null;if(s.caretRangeFromPoint){var w=(0,se.getPointerEvent)(l);f=s.caretRangeFromPoint(w.clientX,w.clientY)}else l.rangeParent&&(f=s.createRange()).setStart(l.rangeParent,l.rangeOffset);var te=s.getSelection();te.removeAllRanges(),f&&te.addRange(f)}M.focus()}return this}},{key:"__onKeydown",value:function(B){B.key==="Enter"&&(this.doc.execCommand("insertLineBreak"),B.preventDefault())}},{key:"__onPaste",value:function(B){var X=B.clipboardData||window.clipboardData,_=X.getData("text"),M=X.getData("text/html");if(_&&!M){B.preventDefault();var s=_.replace(/(?:\r\n|\r|\n)/g,"<br/>");this.doc.execCommand("insertHTML",!1,s)}}},{key:"syncActions",value:function(){var B=this;this.getActions().forEach((function(X){if(B.actionbar&&(!X.state||X.state&&X.state(B,B.doc)>=0)){var _=X.event||"click";X.btn["on".concat(_)]=function(M){X.result(B,X),B.updateActiveActions()}}}))}},{key:"addAction",value:function(B){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=X.sync,M=document.createElement("span"),s=B.icon,l=B.attributes||{};for(var f in M.className=this.classes.button,B.btn=M,l)M.setAttribute(f,l[f]);typeof s=="string"?M.innerHTML=s:M.appendChild(s),this.actionbarEl().appendChild(M),_&&(this.actions.push(B),this.syncActions())}},{key:"getActions",value:function(){return this.actions}},{key:"selection",value:function(){return this.doc.getSelection()}},{key:"exec",value:function(B){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.doc.execCommand(B,!1,X)}},{key:"actionbarEl",value:function(){return this.actionbar}},{key:"insertHTML",value:function(B){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}
147,_=X.select,M=this.em,s=this.doc,l=this.el,f=s.getSelection();if(f&&f.rangeCount){var w=(0,se.getModel)(l),te=s.createElement("div"),J=f.getRangeAt(0);J.deleteContents(),(0,I.isString)(B)?te.innerHTML=B:B&&te.appendChild(B),Array.prototype.slice.call(te.childNodes).forEach((function(R){J.insertNode(R)})),f.removeAllRanges(),f.addRange(J),l.focus(),_&&w&&(w.once("rte:disable",(function(){var R=w.find("[".concat(F,"]"))[0];R&&(M.setSelected(R),R.removeAttributes(F))})),w.trigger("disable"))}}}]),E})();const ne={stylePrefix:"rte-",adjustToolbar:1,actions:["bold","italic","underline","strikethrough","link","wrap"]};function ye(E,B){var X=Object.keys(E);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(E);B&&(_=_.filter((function(M){return Object.getOwnPropertyDescriptor(E,M).enumerable}))),X.push.apply(X,_)}return X}function ee(E){for(var B=1;B<arguments.length;B++){var X=arguments[B]!=null?arguments[B]:{};B%2?ye(Object(X),!0).forEach((function(_){(0,ie.Z)(E,_,X[_])})):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(X)):ye(Object(X)).forEach((function(_){Object.defineProperty(E,_,Object.getOwnPropertyDescriptor(X,_))}))}return E}var O="change:canvasOffset frame:scroll component:update";const j=function(){var E,B=function(){var X=E.style,_="-1000px";X.top=_,X.left=_,X.display="none"};return{customRte:null,name:"RichTextEditor",getConfig:function(){return this.config},init:function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_=ee(ee({},ne),X),M=_.pStylePrefix;return M&&(_.stylePrefix=M+_.stylePrefix),this.config=_,this.pfx=_.stylePrefix,this.em=_.em,this.actions=_.actions||[],(0,se.hasWin)()?((E=document.createElement("div")).className="".concat(M,"rte-toolbar ").concat(M,"one-bg"),this.initRte(document.createElement("div")),(0,se.on)(E,"mousedown",(function(s){return s.stopPropagation()})),this):this},destroy:function(){var X,_,M,s=this;(X=this.globalRte)===null||X===void 0||X.destroy(),(_=this.customRte)===null||_===void 0||(M=_.destroy)===null||M===void 0||M.call(_),E=0,["actionbar","actions","em","config","globalRte","lastEl"].map((function(l){delete s[l]}))},postRender:function(X){var _=X.model.get("Canvas");E.style.pointerEvents="all",B(),_.getToolsEl().appendChild(E)},initRte:function(X){var _=this.globalRte,M=this.em,s=this.pfx,l=this.actionbar,f=this.config,w=E,te=this.actions||(0,D.Z)(f.actions),J={actionbar:"".concat(s,"actionbar"),button:"".concat(s,"action"),active:"".concat(s,"active"),inactive:"".concat(s,"inactive"),disabled:"".concat(s,"disabled")};return _?(_.em=M,_.setEl(X)):(_=new H({em:M,el:X,classes:J,actions:te,actionbar:l,actionbarContainer:w}
147),this.globalRte=_),_.actionbar&&(this.actionbar=_.actionbar),_.actions&&(this.actions=_.actions),_},add:function(X){var _,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};M.name=X,(_=this.globalRte)===null||_===void 0||_.addAction(M,{sync:1})},get:function(X){var _,M;return(_=this.globalRte)===null||_===void 0||_.getActions().forEach((function(s){s.name==X&&(M=s)})),M},getAll:function(){var X;return(X=this.globalRte)===null||X===void 0?void 0:X.getActions()},remove:function(X){var _=this.getAll(),M=this.get(X);if(M){var s=M.btn,l=_.indexOf(M);s.parentNode.removeChild(s),_.splice(l,1)}return M},getToolbarEl:function(){return E},updatePosition:function(){var X="px",_=this.em.get("Canvas"),M=E.style,s=_.getTargetToElementFixed(this.lastEl,E,{event:"rteToolbarPosUpdate",left:0});M.top=(s.top||0)+X,M.left=(s.left||0)+X},enable:function(X,_,M){var s=this;return(0,fe.Z)(ae().mark((function l(){var f,w,te,J;return ae().wrap((function(R){for(;;)switch(R.prev=R.next){case 0:return s.lastEl=X.el,f=s.customRte,w=s.em,te=X.getChildrenContainer(),E.style.display="",R.next=6,f?f.enable(te,_):s.initRte(te).enable(M);case 6:return J=R.sent,w&&(setTimeout(s.updatePosition.bind(s),0),w.off(O,s.updatePosition,s),w.on(O,s.updatePosition,s),w.trigger("rte:enable",X,J)),R.abrupt("return",J);case 9:case"end":return R.stop()}}),l)})))()},disable:function(X,_){var M=this.em,s=this.customRte,l=X.getChildrenContainer();s?s.disable(l,_):_&&_.disable(),B(),M&&(M.off(O,this.updatePosition,this),M.trigger("rte:disable",X,_))}}}},4859:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>M});var fe=S(5861),D=S(5671),ie=S(3144),ce=S(7326),ae=S(9340),se=S(2963),oe=S(1120),W=S(4942),I=S(7757),g=S.n(I),P=S(9714);const x={id:"gjs-",type:"local",autosave:!0,autoload:!0,recovery:!1,stepsBeforeSave:1,onStore:function(s){return s},onLoad:function(s){return s},options:{local:{key:"gjsProject",checkLocal:!0},remote:{headers:{},urlStore:"",urlLoad:"",contentTypeJson:!0,fetchOptions:"",credentials:"include",onStore:function(s){return s},onLoad:function(s){return s}}}};var A=S(1163),$=(function(){function s(){(0,D.Z)(this,s)}var l,f;return(0,ie.Z)(s,[{key:"store",value:(f=(0,fe.Z)(g().mark((function w(te){var J,R=arguments;return g().wrap((function(k){for(;;)switch(k.prev=k.next){case 0:J=R.length>1&&R[1]!==void 0?R[1]:{},this.hasLocal(J,!0)&&localStorage.setItem(J.key,JSON.stringify(te));case 2:case"end":return k.stop()}}),w,this)}))),function(w){return f.apply(this,arguments)})},{key:"load",value:(l=(0,fe.Z)(g().mark((function w(){var te,J,R=arguments;return g().wrap((function(k){for(;;)switch(k.prev=k.next){case 0:return te=R.length>0&&R[0]!==void 0?R[0]:{},J={},this.hasLocal(te,!0)&&(J=JSON.parse(localStorage.getItem(te.key)||"{}")),k.abrupt("return",J);case 4:case"end":return k.stop()}}),w,this)}))),function(){return l.apply(this,arguments)})},{key:"hasLocal",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=arguments.length>1?arguments[1]:void 0;if(w.checkLocal&&(!(0,A.hasWin)()||!localStorage)){if(te)throw new Error("localStorage not available");return!1}return!0}}]),s})(),re=S(9050),z=S(9661);function F(s,l){var f=Object.keys(s);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(s);l&&(w=w.filter((function(te){return Object.getOwnPropertyDescriptor(s,te).enumerable}))),f.push.apply(f,w)}return f}function G(s){for(var l=1;l<arguments.length;l++){var f=arguments[l]!=null?arguments[l]:{};l%2?F(Object(f),!0).forEach((function(w){(0,W.Z)(s,w,f[w])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(f)):F(Object(f)).forEach((function(w){Object.defineProperty(s,w,Object.getOwnPropertyDescriptor(f,w))}))}return s}var H=(function(){function s(){(0,D.Z)(this,s)}var l,f;return(0,ie.Z)(s,[{key:"store",value:(f=(0,fe.Z)(g().mark((function w(te){var J,R=arguments;return g().wrap((function(k){for(;;)switch(k.prev=k.next){case 0:return J=R.length>1&&R[1]!==void 0?R[1]:{},k.next=3,this.request(J.urlStore,this.__props(J,te),J);case 3:case"end":return k.stop()}}),w,this)}))),function(w){return f.apply(this,arguments)})},{key:"load",value:(l=(0,fe.Z)(g().mark((function w(te){return g().wrap((function(J){for(;;
147)switch(J.prev=J.next){case 0:return J.next=2,this.request(te.urlLoad,this.__props(te),te);case 2:return J.abrupt("return",J.sent);case 3:case"end":return J.stop()}}),w,this)}))),function(w){return l.apply(this,arguments)})},{key:"request",value:function(w){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(0,z.Z)(w,te).then((function(R){var k=R.text();return(R.status/200|0)==1?k:k.then(Promise.reject)})).then((function(R){var k=R&&(0,re.isString)(R);return J.contentTypeJson&&k?JSON.parse(R):R}))}},{key:"__props",value:function(){var w,te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=arguments.length>1?arguments[1]:void 0,R=te.contentTypeJson,k=te.headers||{},v=te.fetchOptions||{},b="X-Requested-With",h="Content-Type";if((0,re.isUndefined)(k[b])&&(k[b]="XMLHttpRequest"),(0,re.isUndefined)(k[h])&&R&&(k[h]="application/json; charset=utf-8"),J)if(R)w=JSON.stringify(J);else for(var m in w=new FormData,J)w.append(m,J[m]);var p={method:w?"POST":"GET",credentials:te.credentials,headers:k,body:w};return G(G({},p),(0,re.isFunction)(v)?v(p):v)}}]),s})();function ne(s,l){var f=Object.keys(s);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(s);l&&(w=w.filter((function(te){return Object.getOwnPropertyDescriptor(s,te).enumerable}))),f.push.apply(f,w)}return f}function ye(s){for(var l=1;l<arguments.length;l++){var f=arguments[l]!=null?arguments[l]:{};l%2?ne(Object(f),!0).forEach((function(w){(0,W.Z)(s,w,f[w])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(f)):ne(Object(f)).forEach((function(w){Object.defineProperty(s,w,Object.getOwnPropertyDescriptor(f,w))}))}return s}function ee(s){var l=(function(){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}})();return function(){var f,w=(0,oe.Z)(s);if(l){var te=(0,oe.Z)(this).constructor;f=Reflect.construct(w,arguments,te)}else f=w.apply(this,arguments);return(0,se.Z)(this,f)}}var O="storage:start",j="storage:after",E="storage:end",B="storage:error",X="local",_="remote",M=(function(s){(0,ae.Z)(J,s);var l,f,w,te=ee(J);function J(){var R;(0,D.Z)(this,J);for(var k=arguments.length,v=new Array(k),b=0;b<k;b++)v[b]=arguments[b];return R=te.call.apply(te,[this].concat(v)),(0,W.Z)((0,ce.Z)(R),"name","StorageManager"),R}return(0,ie.Z)(J,[{key:"init",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.__initConfig(x,R);var k=this.getConfig();return k._disable&&(k.type=0),this.storages={},this.add(X,new $(k)),this.add(_,new H(k)),this.setCurrent(k.type),this}},{key:"isAutosave",value:function(){return!!this.getConfig().autosave}},{key:"setAutosave",value:function(R){return this.getConfig().autosave=!!R,this}},{key:"getStepsBeforeSave",value:function(){return this.getConfig().stepsBeforeSave}},{key:"setStepsBeforeSave",value:function(R){return this.getConfig().stepsBeforeSave=R,this}},{key:"add",value:function(R,k){return this.storages[R]=k,this}},{key:"get",value:function(R){return this.storages[R]||null}},{key:"getStorages",value:function(){return this.storages}},{key:"getCurrent",value:function(){return this.getConfig().currentStorage}},{key:"setCurrent",value:function(R){return this.getConfig().currentStorage=R,this}},{key:"getCurrentStorage",value:function(){return this.get(this.getCurrent())}},{key:"getStorageOptions",value:function(R){return this.getCurrentOptions(R)}},{key:"store",value:(w=(0,fe.Z)(g().mark((function R(k){var v,b,h,m,p,y=arguments;return g().wrap((function(Z){for(;;)switch(Z.prev=Z.next){case 0:return v=y.length>1&&y[1]!==void 0?y[1]:{},b=this.getCurrentStorage(),h=ye(ye({},this.getCurrentOptions()),v),m=this.getRecoveryStorage(),p=this.getCurrentOptions(X),Z.prev=5,Z.next=8,this.__exec(b,h,k);case 8:if(Z.t0=m,!Z.t0){Z.next=12;break}return Z.next=12,this.__exec(m,p,{});case 12:case 19:Z.next=22;break;case 14:if(Z.prev=14,Z.t1=Z.catch(5),!m){Z.next=21;break}return Z.next=19,this.__exec(m,p,k);case 21:throw Z.t1;case 22:return Z.abrupt("return",k);case 23:case"end":return Z.stop()}}),R,this,[[5,14]])}
147))),function(R){return w.apply(this,arguments)})},{key:"load",value:(f=(0,fe.Z)(g().mark((function R(){var k,v,b,h,m,p,y=arguments;return g().wrap((function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(k=y.length>0&&y[0]!==void 0?y[0]:{},v=this.getCurrentStorage(),b=ye(ye({},this.getCurrentOptions()),k),!(h=this.getRecoveryStorage())){Z.next=17;break}return Z.next=7,this.__exec(h,this.getCurrentOptions(X));case 7:if(p=Z.sent,(0,re.isEmpty)(p)){Z.next=17;break}return Z.prev=9,Z.next=12,this.__askRecovery();case 12:m=p,Z.next=17;break;case 15:Z.prev=15,Z.t0=Z.catch(9);case 17:if(m){Z.next=21;break}return Z.next=20,this.__exec(v,b);case 20:m=Z.sent;case 21:return Z.abrupt("return",m||{});case 22:case"end":return Z.stop()}}),R,this,[[9,15]])}))),function(){return f.apply(this,arguments)})},{key:"__askRecovery",value:function(){var R=this.em,k=this.getRecovery();return new Promise((function(v,b){(0,re.isFunction)(k)?k(v,b,R?.getEditor()):confirm(R?.t("storageManager.recover"))?v():b()}))}},{key:"getRecovery",value:function(){return this.getConfig().recovery}},{key:"getRecoveryStorage",value:function(){return this.getRecovery()&&this.getCurrent()===_&&this.get(X)}},{key:"__exec",value:(l=(0,fe.Z)(g().mark((function R(k,v,b){var h,m,p,y,Z,Y,q,N;return g().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(h=b?"store":"load",m=this.getConfig(),p=m.onStore,y=m.onLoad,this.onStart(h,b),k){a.next=5;break}return a.abrupt("return",b||{});case 5:if(a.prev=5,q=(Y=this.em)===null||Y===void 0?void 0:Y.getEditor(),!b){a.next=31;break}if(a.t1=p,!a.t1){a.next=13;break}return a.next=12,p(b,q);case 12:a.t1=a.sent;case 13:if(a.t0=a.t1,a.t0){a.next=16;break}a.t0=b;case 16:if(N=a.t0,a.t3=v.onStore,!a.t3){a.next=22;break}return a.next=21,v.onStore(N,q);case 21:a.t3=a.sent;case 22:if(a.t2=a.t3,a.t2){a.next=25;break}a.t2=N;case 25:return N=a.t2,a.next=28,k.store(N,v);case 28:Z=b,a.next=53;break;case 31:return a.next=33,k.load(v);case 33:if(Z=a.sent,Z=this.__clearKeys(Z),a.t5=v.onLoad,!a.t5){a.next=40;break}return a.next=39,v.onLoad(Z,q);case 39:a.t5=a.sent;case 40:if(a.t4=a.t5,a.t4){a.next=43;break}a.t4=Z;case 43:if(Z=a.t4,a.t7=y,!a.t7){a.next=49;break}return a.next=48,y(Z,q);case 48:a.t7=a.sent;case 49:if(a.t6=a.t7,a.t6){a.next=52;break}a.t6=Z;case 52:Z=a.t6;case 53:this.onAfter(h,Z),this.onEnd(h,Z),a.next=61;break;case 57:throw a.prev=57,a.t8=a.catch(5),this.onError(h,a.t8),a.t8;case 61:return a.abrupt("return",Z);case 62:case"end":return a.stop()}}),R,this,[[5,57]])}))),function(R,k,v){return l.apply(this,arguments)})},{key:"__clearKeys",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},k=this.getConfig(),v=new RegExp("^".concat(k.id)),b={};for(var h in R){var m=h.replace(v,"");b[m]=R[h]}return b}},{key:"getCurrentOptions",value:function(R){var k=this.getConfig(),v=R||this.getCurrent();return k.options[v]||{}}},{key:"onStart",value:function(R,k){var v=this.em;v&&(v.trigger(O),R&&v.trigger("".concat(O,":").concat(R),k))}},{key:"onAfter",value:function(R,k){var v=this.em;v&&(v.trigger(j),v.trigger("".concat(j,":").concat(R),k),v.trigger("storage:".concat(R),k))}},{key:"onEnd",value:function(R,k){var v=this.em;v&&(v.trigger(E),R&&v.trigger("".concat(E,":").concat(R),k))}},{key:"onError",value:function(R,k){var v=this.em;v&&(v.trigger(B,k),R&&v.trigger("".concat(B,":").concat(R),k),this.onEnd(R,k))}},{key:"canAutoload",value:function(){return this.getCurrentStorage()&&this.getConfig().autoload}},{key:"destroy",value:function(){this.__destroy(),this.storages={}}}]),J})(P.Z)},2326:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>fr,evAll:()=>ft,evCustom:()=>Bn,evLayerSelect:()=>nr,evPfx:()=>qt,evProp:()=>cr,evPropAdd:()=>Wn,evPropRemove:()=>tr,evPropUp:()=>ur,evSector:()=>gn,evSectorAdd:()=>kn,evSectorRemove:()=>Vn,evSectorUpdate:()=>er,evTarget:()=>Qt});var fe=S(2982),D=S(4942),ie=S(9050),ce=S(1163),ae=S(9304),se=S(2316),oe=S.n(se);const W={sectors:[{name:"General",open:!1,properties:["display","float","position","top","right","left","bottom"]},{name:"Flex",open:!1,properties:["flex-direction","flex-wrap","justify-content","align-items","align-content","order","flex-basis","flex-grow","flex-shrink","align-self"]},{name:"Dimension",open:!1,properties:["width","height","max-width","min-height","margin","padding"]},{name:"Typography",open:!1,properties:["font-family","font-size","font-weight","letter-spacing","color","line-height","text-align","text-shadow"]},{name:"Decorations",open:!1,properties:["background-color","border-radius","border","box-shadow","background"]},{name:"Extra",open:!1,properties:["opacity","transition","transform"]}],appendTo:"",stylePrefix:"sm-",custom:!1,hideNotStylable:!0,highlightChanged:!0,highlightComputed:!0,showComputed:!0,clearProperties:!0,avoidComputed:["width","height"]};var I=S(4925),g=S(5671),P=S(3144),x=S(9340),A=S(2963),$=S(1120),re=S(793),z=["partial"];function F(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function G(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};
147V%2?F(Object(u),!0).forEach((function(i){(0,D.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):F(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}function H(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var ne=(function(L){(0,x.Z)(u,L);var V=H(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"initialize",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.em=T.em;var le=this.get("id")||"",ve=this.get("name")||this.get("label")||"";!this.get("property")&&this.set("property",(ve||le).replace(/ /g,"-"));var _e=this.get("property");!this.get("id")&&this.set("id",_e),!ve&&this.set("name",(0,ce.capitalize)(_e).replace(/-/g," ")),this.on("change",this.__upTargets),u.callInit(this,i,T)}},{key:"__getParentProp",value:function(){var i,T;return(i=this.collection)===null||i===void 0||(T=i.opts)===null||T===void 0?void 0:T.parentProp}},{key:"__upTargets",value:function(i){var T=this,le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ve=this.em,_e=ve.get("StyleManager"),Le=this.getName(),Ke=le.__clear,qe=Ke?"":this.__getFullValue(le),Je=this.__getParentProp(),Qe=this.changedAttributes(),ct=(0,ie.keys)(Qe).reduce((function(ln,zt){return ln[zt]=T.previous(zt),ln}),{}),Ct=[].concat((0,fe.Z)((0,ie.keys)(this.__getClearProps())),["__p"]),Mt=(0,ie.keys)(Qe),It=!le.__up&&!Je&&(Ke||Ct.some((function(ln){return Mt.indexOf(ln)>=0}))),Gt=this.get("onChange"),on={property:this,from:ct,to:Qe,value:qe,opts:le};_e.__trgEv(_e.events.propertyUpdate,on),Gt&&Gt(on),It&&this.__upTargetsStyle({[Le]:qe},le)}},{key:"__upTargetsStyle",value:function(i,T){var le,ve=(le=this.em)===null||le===void 0?void 0:le.get("StyleManager");ve?.addStyleTargets(G(G({},i),{},{__p:!!T.avoidStore}),T)}},{key:"_up",value:function(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};T.noTarget&&(T.__up=!0);var le=T.partial,ve=(0,I.Z)(T,z);return i.__p=!(!ve.avoidStore&&!le),this.set(i,G(G({},ve),{},{avoidStore:i.__p}))}},{key:"up",value:function(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.set(i,G(G({},T),{},{__up:!0}))}},{key:"init",value:function(){}},{key:"getId",value:function(){return this.get("id")}},{key:"getType",value:function(){return this.get("type")}},{key:"getName",value:function(){return this.get("property")}},{key:"getLabel",value:function(){var i,T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=T.locale,ve=le===void 0||le,_e=this.getId(),Le=this.get("name")||this.get("label");return ve&&((i=this.em)===null||i===void 0?void 0:i.t("styleManager.properties.".concat(_e)))||Le}},{key:"getValue",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=i.noDefault,le=this.get("value");return this.hasValue()||T?le:this.getDefaultValue()}},{key:"hasValue",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=i.noParent,le=T&&this.getParentTarget(),ve=this.get("value");return!(0,ie.isUndefined)(ve)&&ve!==""&&!le}},{key:"hasValueParent",value:function(){return this.hasValue()&&!this.hasValue({noParent:!0})}},{key:"getStyle",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=this.getName(),le=i.camelCase?(0,ce.camelCase)(T):T;return{[le]:this.__getFullValue(i)}}},{key:"getDefaultValue",value:function(){var i=this.get("default");return"".concat((0,ie.isUndefined)(i)?this.get("defaults"):i)}},{key:"upValue",value:function(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le=i===null||i===""?this.__getClearProps():this.__parseValue(i,T);return this._up(le,T)}},{key:"isVisible",value:function(){return!!this.get("visible")}},{key:"clear",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this._up(this.__getClearProps(),G(G({},i),{},{__clear:!0}))}},{key:"canClear",value:function(){var i=this.getParent();return i?i.__canClearProp(this):this.hasValue({noParent:!0})}},{key:"getParent",value:function(){return this.__getParentProp()||null}},{key:"isFull",value:function(){return!!this.get("full")}},{key:"__parseValue",value:function(i,T){return this.parseValue(i,T)}},{key:"__getClearProps",value:function(){return{value:""}}},{key:"setValue",value:function(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ve=this.parseValue(i),_e=!T;!_e&&this.set({value:void 0},{avoidStore:_e,silent:!0}),this.set(ve,G({avoidStore:_e},le))}},{key:"setValueFromInput",value:function(i,T){var le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.setValue(i,T,G(G({},le),{},{fromInput:1}))}},{key:"parseValue",value:function(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le={value:i},ve="!important";if((0,ie.isString)(i)&&i.indexOf(ve)!==-1&&(le.value=i.replace(ve,"").trim(),le.important=1),!this.get("functionName")&&!T.complete)return le;var _e=[],Le="".concat(le.value),Ke=Le.indexOf("(")+1,qe=Le.lastIndexOf(")"),Je=Le.substring(0,Ke-1);if(Je&&(le.functionName=Je),_e.push(Ke),qe>=0&&_e.push(qe),le.value=String.prototype.substring.apply(Le,_e),T.numeric){var Qe=parseFloat(le.value);le.unit=le.value.replace(Qe,""),le.value=Qe}return le}},{key:"__getFullValue",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=i.withDefault;return!this.hasValue()&&T?this.getDefaultValue():this.getFullValue()}},{key:"getFullValue",value:function(i){var T=this.get("functionName"),le=this.getDefaultValue(),ve=(0,ie.isUndefined)(i)?this.get("value"):i,_e=!(0,ie.isUndefined)(ve)&&ve!=="";if(ve&&le&&ve===le)return le;if(T&&_e){var Le=T==="url"?"'".concat(ve.replace(/'|"/g,""),"'"):ve;ve="".concat(T,"(").concat(Le,")")}return _e&&this.get("important")&&(ve="".concat(ve," !important")),ve||""}},{key:"__setParentTarget",value:function(i){this.up({parentTarget:i})}},{key:"getParentTarget",value:function(){return this.get("parentTarget")||null}},{key:"__parseFn",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",T=i.indexOf("(")+1,le=i.lastIndexOf(")");return{name:i.substring(0,T-1).trim(),value:String.prototype.substring.apply(i,[T,le>=0?le:void 0]).trim()}}},{key:"__checkVisibility",value:function(i){var T=i.target,le=i.component,ve=i.sectors,_e=le||T;if(!_e)return!1;var Le=this.getId(),Ke=this.getName(),qe=this.get("toRequire"),Je=this.get("requires"),Qe=this.get("requiresParent"),ct=_e.get("unstylable"),Ct=_e.get("stylable-require"),Mt=_e.get("stylable");if((0,ie.isArray)(Mt)&&(Mt=Mt.indexOf(Ke)>=0),(0,ie.isArray)(ct)&&(Mt=ct.indexOf(Ke)<0),qe&&(Mt=!T||Ct&&(Ct.indexOf(Le)>=0||Ct.indexOf(Ke)>=0)),ve&&Je){var It=(0,ie.keys)(Je);
147ve.forEach((function(zt){zt.getProperties().forEach((function(an){if((0,ie.includes)(It,an.id)){var xn=Je[an.id];Mt=Mt&&(0,ie.includes)(xn,an.get("value"))}}))}))}if(Qe){var Gt=le&&le.parent(),on=Gt&&Gt.getEl();if(on){var ln=(0,ce.hasWin)()?window.getComputedStyle(on):{};(0,ie.each)(Qe,(function(zt,an){Mt=Mt&&ln[an]&&(0,ie.includes)(zt,ln[an])}))}else Mt=!1}return!!Mt}}]),u})(se.Model);function ye(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function ee(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?ye(Object(u),!0).forEach((function(i){(0,D.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):ye(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}function O(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}ne.callParentInit=function(L,V,u){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};L.prototype.initialize.apply(V,[u,G(G({},i),{},{skipInit:1})])},ne.callInit=function(L,V){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};!u.skipInit&&L.init(V,u)},ne.getDefaults=function(){return(0,ie.result)(this.prototype,"defaults")},ne.prototype.defaults={name:"",property:"",type:"",defaults:"",info:"",value:"",icon:"",functionName:"",status:"",visible:!0,fixedValues:["initial","inherit"],onChange:null,full:0,important:0,toRequire:0,requires:null,requiresParent:null,parentTarget:null};var j=function(L){return L==="integer"||L==="number"},E=(function(L){(0,x.Z)(u,L);var V=O(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"defaults",value:function(){return ee(ee({},ne.getDefaults()),{},{detached:!1,properties:[],separator:" ",join:null,fromStyle:null,toStyle:null,full:!0})}},{key:"initialize",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ne.callParentInit(ne,this,i,T);var le=this.em,ve=new un(this.get("properties")||[],{em:le,parentProp:this});this.set("properties",ve,{silent:1}),this.listenTo(ve,"change",this.__upProperties),ne.callInit(this,i,T)}},{key:"getProperties",value:function(){return(0,fe.Z)(this.get("properties").models)}},{key:"getProperty",value:function(i){return this.get("properties").filter((function(T){return T.getId()===i||T.getName()===i}))[0]||null}},{key:"getPropertyAt",value:function(i){return this.get("properties").at(i)}},{key:"isDetached",value:function(){return!!this.get("detached")}},{key:"getValues",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=i.byName;return this.getProperties().reduce((function(le,ve){return le[T?ve.getName():ve.getId()]="".concat(ve.__getFullValue()),le}),{})}},{key:"getSeparator",value:function(){return this.getSplitSeparator()}},{key:"getJoin",value:function(){return this.__getJoin()}},{key:"getStyleFromProps",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=this.getName(),le=this.__getJoin(),ve=this.get("toStyle"),_e=this.getValues(),Le={};if(ve)Le=ve(_e,{join:le,name:T,property:this});else if(_e=this.getValues({byName:!0}),this.isDetached())Le=_e;else{var Ke=this.getProperties().map((function(qe){return qe.__getFullValue({withDefault:1})})).filter(Boolean).join(le);Le={[T]:Ke}}return this.isDetached()?Le[T]="":(Le[T]=Le[T]||"",Le=ee(ee({},Le),this.getProperties().reduce((function(qe,Je){return qe[Je.getName()]="",qe}),{}))),i.camelCase?Object.keys(Le).reduce((function(qe,Je){return qe[camelCase(Je)]=Le[Je],qe}),{}):Le}},{key:"getSplitSeparator",value:function(){return new RegExp("".concat(this.get("separator"),"(?![^\\(]*\\))"))}},{key:"__upProperties",value:function(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!T.__up&&!T.__clearIn){var le=this.__getParentProp();if(le)return le.__upProperties(this,T);this.__upTargetsStyleProps(T,i)}}},{key:"__upTargetsStyleProps",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=arguments.length>1?arguments[1]:void 0,le=this.getStyleFromProps();if(this.isDetached()&&T){var ve=T.getName();le={[ve]:le[ve]}}this.__upTargetsStyle(le,i)}},{key:"_up",value:function(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.__setProperties(this.__getSplitValue(i.value),T),ne.prototype._up.call(this,i,T)}}
147,{key:"getStyle",value:function(i){return this.getStyleFromProps(i)}},{key:"__getFullValue",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.isDetached()||i.__clear?"":this.getStyleFromProps()[this.getName()]||""}},{key:"__getJoin",value:function(){var i=this.get("join");return(0,ie.isString)(i)?i:this.get("separator")}},{key:"__styleHasProps",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=this.getName(),le=this.getProperties(),ve=le.map((function(Le){return Le.getName()})),_e=[T].concat((0,fe.Z)(ve));return _e.some((function(Le){return!(0,ie.isUndefined)(i[Le])&&i[Le]!==""}))}},{key:"__splitValue",value:function(i,T){return i.split(T).map((function(le){return le.trim()})).filter(Boolean)}},{key:"__splitStyleName",value:function(i,T,le){return this.__splitValue(i[T]||"",le)}},{key:"__getSplitValue",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le=T.byName,ve=this.getProperties(),_e=ve.length===4&&ve.every((function(qe){return j(qe.getType())})),Le=this.__splitValue(i,this.getSplitSeparator()),Ke={};return ve.forEach((function(qe,Je){var Qe=Le[Je],ct=(0,ie.isUndefined)(Qe)?"":Qe;if(_e){var Ct=Le.length;ct=Le[Je]||Le[Je%Ct+(Ct!=1&&Ct%2?1:0)]||ct}var Mt=le?qe.getName():qe.getId();Ke[Mt]=ct||""})),Ke}},{key:"__getPropsFromStyle",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.__styleHasProps(i))return null;var le=T.byName,ve=this.getName(),_e=this.getProperties(),Le=this.getSplitSeparator(),Ke=this.get("fromStyle"),qe=Ke?Ke(i,{property:this,name:ve,separator:Le}):{};return Ke||(qe=this.__getSplitValue(i[ve]||"",{byName:le}),_e.forEach((function(Je){var Qe=i[Je.getName()],ct=le?Je.getName():Je.getId();(0,ie.isUndefined)(Qe)||Qe===""||(qe[ct]=Qe)}))),qe}},{key:"__setProperties",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.getProperties().forEach((function(ve){var _e=i[ve.getId()];ve.__getFullValue()!==_e&&ve.upValue(_e,T)}));var le=(0,ie.keys)(i).map((function(ve){return i[ve]})).join(" ");this.set("value",le,{silent:!0})}},{key:"clear",value:function(){var i=this;return this.getProperties().map((function(T){return T.clear({__clearIn:!i.isDetached()})})),ne.prototype.clear.call(this)}},{key:"hasValue",value:function(i){return this.getProperties().some((function(T){return T.hasValue(i)}))}},{key:"getFullValue",value:function(){return this.__getFullValue()}},{key:"__canClearProp",value:function(i){return this.isDetached()&&i.hasValue({noParent:!0})}}]),u})(ne);function B(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function X(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?B(Object(u),!0).forEach((function(i){(0,D.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):B(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}function _(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var M=(function(L){(0,x.Z)(u,L);var V=_(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"defaults",value:function(){return{values:{}}}},{key:"initialize",value:function(){var i=this.collection;this.prop=i?.prop}},{key:"getId",value:function(){return this.cid}},{key:"getIndex",value:function(){var i=this.collection;return i?i.indexOf(this):-1}},{key:"getValues",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=this.get("values");return i.camelCase?Object.keys(T).reduce((function(le,ve){return le[(0,ce.camelCase)(ve)]=T[ve],le}),{}):T}},{key:"getLabel",value:function(){var i;return(i=this.prop)===null||i===void 0?void 0:i.getLayerLabel(this)}},{key:"isSelected",value:function(){var i;return((i=this.prop)===null||i===void 0?void 0:i.getSelectedLayer())===this}},{key:"select",value:function(){var i;return(i=this.prop)===null||i===void 0?void 0:i.selectLayer(this)}},{key:"remove",value:function(){var i;return(i=this.prop)===null||i===void 0?void 0:i.removeLayer(this)}},{key:"move",value:function(i){var T;return(T=this.prop)===null||T===void 0?void 0:T.moveLayer(this,i)}},{key:"getStylePreview",value:function(){var i,T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(i=this.prop)===null||i===void 0?void 0:i.getStylePreview(this,T)}},{key:"hasPreview",value:function(){var i;return!((i=this.prop)===null||i===void 0||!i.get("preview"))}},{key:"upValues",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.set("values",X(X({},this.getValues()),i))}}]),u})(se.Model);function s(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var l=(function(L){(0,x.Z)(u,L);var V=s(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"initialize",value:function(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prop=T.prop}}]),u})(se.Collection);l.prototype.model=M;var f=["__layers"];function w(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function te(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};
147V%2?w(Object(u),!0).forEach((function(i){(0,D.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):w(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}function J(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var R=/,(?![^\(]*\))/,k=/\s(?![^(]*\))/,v=(function(L){(0,x.Z)(u,L);var V=J(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"defaults",value:function(){return te(te({},E.getDefaults()),{},{layers:[],layerSeparator:", ",layerJoin:"",prepend:0,preview:!1,layerLabel:null,selectedLayer:null})}},{key:"initialize",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.callParentInit(E,this,i,T);var le=this.get("layers"),ve=new l(le,{prop:this});ve.property=this,ve.properties=this.get("properties"),this.set("layers",ve,{silent:!0}),this.on("change:selectedLayer",this.__upSelected),this.listenTo(ve,"add remove",this.__upLayers),E.callInit(this,i,T)}},{key:"getLayers",value:function(){return this.__getLayers().models}},{key:"__getLayers",value:function(){return this.get("layers")}},{key:"getLayer",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.__getLayers().at(i)||null}},{key:"getSelectedLayer",value:function(){var i=this.get("selectedLayer");return i&&i.getIndex()>=0?i:null}},{key:"selectLayer",value:function(i){return this.set("selectedLayer",i,{__select:!0})}},{key:"selectLayerAt",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,T=this.getLayer(i);return T&&this.selectLayer(T)}},{key:"moveLayer",value:function(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,le=i?i.getIndex():-1;le>=0&&(0,ie.isNumber)(T)&&T>=0&&T<this.getLayers().length&&le!==T&&(this.removeLayer(i),this.__getLayers().add(i,{at:T}))}},{key:"addLayer",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le={};this.getProperties().forEach((function(_e){var Le=_e.getId(),Ke=i[Le];le[Le]=(0,ie.isUndefined)(Ke)?_e.getDefaultValue():Ke}));var ve=this.get("layers").push({values:le},T);return ve}},{key:"removeLayer",value:function(i){return this.get("layers").remove(i)}},{key:"removeLayerAt",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,T=this.getLayer(i);return T?this.removeLayer(T):null}},{key:"getLayerLabel",value:function(i){var T="";if(i){var le=this.get("layerLabel"),ve=i.getValues(),_e=i.getIndex();if(le)T=le(i,{index:_e,values:ve,property:this});else{var Le=[];this.getProperties().map((function(Ke){Le.push(ve[Ke.getId()])})),T=Le.filter(Boolean).join(" ")}}return T}},{key:"getStyleFromLayer",value:function(i){var T,le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ve=this.__getJoin(),_e=this.__getJoinLayers(),Le=this.get("toStyle"),Ke=this.getName(),qe=i.getValues();if(Le)T=Le(qe,{join:ve,joinLayers:_e,name:Ke,layer:i,property:this});else{var Je=this.getProperties().map((function(Qe){var ct=Qe.getName(),Ct=qe[Qe.getId()],Mt=(0,ie.isUndefined)(Ct)?Qe.getDefaultValue():Ct;if(le.number&&j(Qe.getType())){var It=Qe.parseValue(Ct,le.number);Mt="".concat(It.value).concat(It.unit)}return{name:ct,value:Mt}}));T=this.isDetached()?Je.reduce((function(Qe,ct){return Qe[ct.name]=ct.value,Qe}),{}):{[this.getName()]:Je.map((function(Qe){return Qe.value})).join(ve)}}return le.camelCase?Object.keys(T).reduce((function(Qe,ct){return Qe[(0,ce.camelCase)(ct)]=T[ct],Qe}),{}):T}},{key:"getStylePreview",value:function(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le={},ve=this.get("preview");return ve&&(le=this.getStyleFromLayer(i,T)),le}},{key:"getLayerSeparator",value:function(){var i=this.get("layerSeparator");return(0,ie.isString)(i)?new RegExp("".concat(i,"(?![^\\(]*\\))")):i}},{key:"__upProperties",value:function(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le=this.getSelectedLayer();le&&(le.upValues({[i.getId()]:i.__getFullValue()}),T.__up||this.__upTargetsStyleProps(T))}},{key:"__upLayers",value:function(i,T,le){this.__upTargetsStyleProps(le||T)}},{key:"__upTargets",value:function(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!T.__select)return ne.prototype.__upTargets.call(this,i,T)}},{key:"__upTargetsStyleProps",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.__upTargetsStyle(this.getStyleFromLayers(),i)}},{key:"__upTargetsStyle",value:function(i,T){return ne.prototype.__upTargetsStyle.call(this,i,T)}},{key:"__upSelected",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=i.noEvent,le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ve=this.em.get("StyleManager"),_e=this.getSelectedLayer(),Le=_e?.getValues();
147Le&&this.getProperties().forEach((function(Ke){var qe,Je=(qe=Le[Ke.getId()])!==null&&qe!==void 0?qe:"";Ke.__getFullValue()!==Je&&Ke.upValue(Je,te(te({},le),{},{__up:!0}))})),!T&&ve.__trgEv(ve.events.layerSelect,{property:this})}},{key:"_up",value:function(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le=i.__layers,ve=le===void 0?[]:le,_e=(0,I.Z)(i,f);return!this.isDetached()&&this.__setLayers(ve),this.__upSelected({noEvent:!0},T),ne.prototype._up.call(this,_e,T)}},{key:"__setLayers",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],T=this.__getLayers(),le=i.map((function(ve){return{values:ve}}));T.length===le.length?le.map((function(ve,_e){var Le;return(Le=T.at(_e))===null||Le===void 0?void 0:Le.upValues(ve.values)})):this.__getLayers().reset(le),this.__upSelected({noEvent:!0})}},{key:"__parseValue",value:function(i){var T=this,le=this.parseValue(i);return le.__layers=i.split(R).map((function(ve){return ve.trim()})).map((function(ve){return T.__parseLayer(ve)})).filter(Boolean),le}},{key:"__parseLayer",value:function(i){var T=this.get("parseLayer"),le=i.split(k),ve=this.getProperties();return T?T({value:i,values:le}):ve.reduce((function(_e,Le,Ke){var qe=le[Ke];return _e[Le.getId()]=(0,ie.isUndefined)(qe)?Le.getDefaultValue():qe,_e}),{})}},{key:"__getLayersFromStyle",value:function(){var i=this,T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.__styleHasProps(T))return null;var le=this.getName(),ve=this.getProperties(),_e=this.getLayerSeparator(),Le=this.get("fromStyle"),Ke=Le?Le(T,{property:this,name:le,separatorLayers:_e}):[];if(!Le){var qe=this.__splitStyleName(T,le,_e).map((function(Je){return Je.split(i.getSplitSeparator())})).map((function(Je){var Qe={};return ve.forEach((function(ct,Ct){var Mt=Je[Ct];Qe[ct.getId()]=(0,ie.isUndefined)(Mt)?ct.getDefaultValue():Mt})),Qe}));ve.forEach((function(Je){var Qe=Je.getId();i.__splitStyleName(T,Je.getName(),_e).map((function(ct){return{[Qe]:ct||Je.getDefaultValue()}})).forEach((function(ct,Ct){qe[Ct]=qe[Ct]?te(te({},qe[Ct]),ct):ct}))})),Ke=qe}return(0,ie.isArray)(Ke)?Ke:[Ke]}},{key:"getStyle",value:function(i){return this.getStyleFromLayers(i)}},{key:"getStyleFromLayers",value:function(i){var T=this,le={},ve=this.getName(),_e=this.getLayers(),Le=this.getProperties();if(_e.map((function(qe){return T.getStyleFromLayer(qe,i)})).forEach((function(qe){(0,ie.keys)(qe).map((function(Je){le[Je]||(le[Je]=[]),le[Je].push(qe[Je])}))})),(0,ie.keys)(le).map((function(qe){le[qe]=le[qe].join(T.__getJoinLayers())})),this.isDetached())le[ve]="",!_e.length&&Le.map((function(qe){le[qe.getName()]=""}));else{var Ke=Le.reduce((function(qe,Je){return qe[Je.getName()]="",qe}),{});le[ve]=le[ve]||"",le=te(te({},le),Ke)}return le}},{key:"__getJoinLayers",value:function(){var i=this.get("layerJoin"),T=this.get("layerSeparator");return i||((0,ie.isString)(T)?T:i)}},{key:"__getFullValue",value:function(){return this.get("detached")?"":this.getStyleFromLayers()[this.getName()]}},{key:"hasValue",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=i.noParent,le=T&&this.getParentTarget();return this.getLayers().length>0&&!le}},{key:"clear",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.__getLayers().reset(),this.__upTargetsStyleProps(i),ne.prototype.clear.call(this)}},{key:"__canClearProp",value:function(){return!1}}]),u})(E),b=["complete","partial"];function h(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function m(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?h(Object(u),!0).forEach((function(i){(0,D.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):h(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}function p(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var y="data-clear-style",Z=(function(L){(0,x.Z)(u,L);var V=p(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"template",value:function(){var i=this.pfx,T=this.ppfx;return` 148 <div class="`.concat(i,`label" data-sm-label></div> 149 <div class="`).concat(T,`fields" data-sm-fields></div> 150 `)}},{key:"templateLabel",value:function(i){var T=this.pfx,le=this.em,ve=i.parent,_e=i.attributes,Le=_e.icon,Ke=Le===void 0?"":Le,qe=_e.info,Je=qe===void 0?"":qe,Qe=le?.getConfig().icons,ct=Qe?.close||"";return`
151 <span class="`.concat(T,"icon ").concat(Ke,'" title="').concat(Je,`"> 152 `).concat(i.getLabel(),` 153 </span> 154 `).concat(ve?"":'<div class="'.concat(T,'clear" style="display: none" ').concat(y,">").concat(ct,"</div>"),` 155 `)}},{key:"templateInput",value:function(i){return` 156 <div class="`.concat(this.ppfx,`field"> 157 <input placeholder="`).concat(i.getDefaultValue(),`"/> 158 </div> 159 `)}},{key:"initialize",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,ie.bindAll)(this,"__change","__updateStyle");var T=i.config||{},le=T.em;this.config=T,this.em=le,this.pfx=T.stylePrefix||"",this.ppfx=T.pStylePrefix||"",this.__destroyFn=this.destroy?this.destroy.bind(this):function(){};var ve=this.model;ve.view=this,this.onValueChange=(0,ie.debounce)(this.onValueChange.bind(this),10),this.updateStatus=(0,ie.debounce)(this.updateStatus.bind(this)),this.listenTo(ve,"destroy remove",this.remove),this.listenTo(ve,"change:visible",this.updateVisibility),this.listenTo(ve,"change:name change:className change:full",this.render),this.listenTo(ve,"change:value",this.onValueChange),this.listenTo(ve,"change:parentTarget",this.updateStatus),this.listenTo(le,"change:device",this.onValueChange);var _e=this.init&&this.init.bind(this);_e&&_e()}},{key:"remove",value:function(){var i=this;se.View.prototype.remove.apply(this,arguments),["em","input","$input","view"].forEach((function(T){return i[T]=null})),this.__destroyFn(this._getClbOpts())}},{key:"updateStatus",value:function(){var i,T=this.model,le=this.pfx,ve=this.ppfx,_e=this.config,Le="".concat(ve,"four-color"),Ke="".concat(ve,"color-warn"),qe=this.$el.children(".".concat(le,"label")),Je=this.getClearEl(),Qe=Je?Je.style:{};qe.removeClass("".concat(Le," ").concat(Ke)),Qe.display="none",T.hasValue({noParent:!0})&&_e.highlightChanged?(qe.addClass(Le),_e.clearProperties&&(Qe.display="")):T.hasValue()&&_e.highlightComputed&&qe.addClass(Ke),(i=this.parent)===null||i===void 0||i.updateStatus()}},{key:"clear",value:function(i){i&&i.stopPropagation(),this.model.clear()}},{key:"getClearEl",value:function(){return this.clearEl||(this.clearEl=this.el.querySelector("[".concat(y,"]"))),this.clearEl}},{key:"inputValueChanged",value:function(i){i&&i.stopPropagation(),this.emit||this.model.upValue(i.target.value)}},{key:"onValueChange",value:function(i,T){this.setValue(this.model.getFullValue()),this.updateStatus()}},{key:"setValue",value:function(i){var T=this.model,le=(0,ie.isUndefined)(i)||i===""?T.getDefaultValue():i;if(this.update)return this.__update(le);this.__setValueInput(le)}
159},{key:"__setValueInput",value:function(i){var T=this.getInputEl();T&&(T.value=i)}},{key:"getInputEl",value:function(){return this.input||(this.input=this.el.querySelector("input")),this.input}},{key:"updateVisibility",value:function(){this.el.style.display=this.model.isVisible()?"":"none"}},{key:"clearCached",value:function(){this.clearEl=null,this.input=null,this.$input=null}},{key:"__unset",value:function(){var i=this.unset&&this.unset.bind(this);i&&i(this._getClbOpts())}},{key:"__update",value:function(i){var T=this.update&&this.update.bind(this);T&&T(m(m({},this._getClbOpts()),{},{value:i}))}},{key:"__change",value:function(){for(var i=this.emit&&this.emit.bind(this),T=arguments.length,le=new Array(T),ve=0;ve<T;ve++)le[ve]=arguments[ve];i&&i.apply(void 0,[this._getClbOpts()].concat(le))}},{key:"__updateStyle",value:function(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le=T.complete,ve=T.partial,_e=((0,I.Z)(T,b),this.model),Le=le!==!1&&ve!==!0;(0,ce.isObject)(i)?_e.__upTargetsStyle(i,{avoidStore:!Le}):_e.upValue(i,{partial:!Le})}},{key:"_getClbOpts",value:function(){var i=this.model;return{el:this.el,createdEl:this.createdEl,property:i,props:i.attributes,change:this.__change,updateStyle:this.__updateStyle}}},{key:"render",value:function(){this.clearCached();var i=this.pfx,T=this.model,le=this.el,ve=this.$el,_e=T.getName(),Le=T.getType(),Ke=T.get("className")||"",qe="".concat(i,"property"),Je=Le==="number"?"".concat(i).concat(Le," ").concat(i,"integer"):"".concat(i).concat(Le);this.createdEl&&this.__destroyFn(this._getClbOpts()),ve.empty().append(this.template(T)),ve.find("[data-sm-label]").append(this.templateLabel(T));var Qe=this.create&&this.create.bind(this);this.createdEl=Qe&&Qe(this._getClbOpts()),ve.find("[data-sm-fields]").append(this.createdEl||this.templateInput(T)),le.className="".concat(qe," ").concat(Je," ").concat(qe,"__").concat(_e," ").concat(Ke).trim(),le.className+=T.isFull()?" ".concat(qe,"--full"):"";var ct=this.onRender&&this.onRender.bind(this);ct&&ct(),this.setValue(T.getValue())}}]),u})(se.View);Z.prototype.events={change:"inputValueChanged",["click [".concat(y,"]")]:"clear"};var Y=S(9283);function q(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var N=(function(L){(0,x.Z)(u,L);var V=q(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"initialize",value:function(i){this.config=i.config||{},this.pfx=this.config.stylePrefix||"",this.properties=[],this.parent=i.parent;var T=this.collection;this.listenTo(T,"add",this.addTo),this.listenTo(T,"reset",this.render)}},{key:"addTo",value:function(i,T,le){this.add(i,null,le)}},{key:"add",value:function(i,T){var le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ve=this.parent,_e=this.config,Le=T||this.el,Ke=new i.typeView({model:i,config:_e});ve&&(Ke.parent=ve),Ke.render();var qe=Ke.el;this.properties.push(Ke),(0,Y.$Q)(Le,qe,le.at)}},{key:"remove",value:function(){se.View.prototype.remove.apply(this,arguments),this.clearItems()}},{key:"clearItems",value:function(){this.properties.forEach((function(i){return i.remove()})),this.properties=[]}},{key:"render",value:function(){var i=this,T=this.$el,le=this.pfx;this.clearItems();var ve=document.createDocumentFragment();return this.collection.forEach((function(_e){return i.add(_e,ve)})),T.empty(),T.append(ve),T.attr("class","".concat(le,"properties")),this}}]),u})(se.View);function a(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function c(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};
159V%2?a(Object(u),!0).forEach((function(i){(0,D.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):a(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}function C(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var Q=(function(L){(0,x.Z)(u,L);var V=C(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"templateInput",value:function(){var i=this.pfx;return` 160 <div class="`.concat(i,"field ").concat(i,`composite"> 161 <span id="`).concat(i,`input-holder"></span> 162 </div> 163 `)}},{key:"remove",value:function(){var i;(i=this.props)===null||i===void 0||i.remove(),Z.prototype.remove.apply(this,arguments)}},{key:"onValueChange",value:function(){}},{key:"onRender",value:function(){var i=this.model,T=this.pfx,le=i.get("properties");if(le.length&&!this.props){var ve=i.isDetached(),_e=new N({config:c(c({},this.config),{},{highlightComputed:ve,highlightChanged:ve}),collection:le,parent:this});_e.render(),this.$el.find("#".concat(T,"input-holder")).append(_e.el),this.props=_e}}},{key:"clearCached",value:function(){Z.prototype.clearCached.apply(this,arguments),this.props=null}}]),u})(Z);function pe(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var Ce=(function(L){(0,x.Z)(u,L);var V=pe(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"events",value:function(){return{click:"select","click [data-close-layer]":"removeItem","mousedown [data-move-layer]":"initSorter","touchstart [data-move-layer]":"initSorter"}}},{key:"template",value:function(){var i=this.pfx,T=this.ppfx,le=this.em,ve=le?.getConfig().icons,_e=ve?.close||"",Le=ve?.move||"";return` 164 <div class="`.concat(i,`label-wrp"> 165 <div id="`).concat(i,'move" class="').concat(T,`no-touch-actions" data-move-layer> 166 `).concat(Le,` 167 </div> 168 <div id="`).concat(i,`label" data-label></div> 169 <div id="`).concat(i,'preview-box" class="').concat(i,`layer-preview" style="display: none" data-preview-box> 170 <div id="`).concat(i,'preview" class="').concat(i,`layer-preview-cnt" data-preview></div> 171 </div> 172 <div id="`).concat(i,'close-layer" class="').concat(i,`btn-close" data-close-layer> 173 `).concat(_e,` 174 </div> 175 </div> 176 <div id="`).concat(i,`inputs" data-properties></div> 177 `)}},{key:"initialize",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=this.model,le=i.config||{};this.em=le.em,this.config=le,this.sorter=i.sorter,this.pfx=le.stylePrefix||"",this.ppfx=le.pStylePrefix||"",this.propertyView=i.propertyView;var ve=this.propertyView.model;this.listenTo(T,"destroy remove",this.remove),this.listenTo(T,"change:values",this.updateLabel),this.listenTo(ve,"change:selectedLayer",this.updateVisibility),T.view=this,T.set({droppable:0,draggable:1}),this.$el.data("model",T)}},{key:"initSorter",value:function(){var i;(i=this.sorter)===null||i===void 0||i.startSort(this.el)}},{key:"removeItem",value:function(i){i&&i.stopPropagation(),this.model.remove()}},{key:"select",value:function(){this.model.select()}},{key:"getPropertiesWrapper",value:function(){return this.propsWrapEl||(this.propsWrapEl=this.el.querySelector("[data-properties]")),this.propsWrapEl}},{key:"getPreviewEl",value:function(){return this.previewEl||(this.previewEl=this.el.querySelector("[data-preview]")),this.previewEl}},{key:"getLabelEl",value:function(){return this.labelEl||(this.labelEl=this.el.querySelector("[data-label]")),this.labelEl}},{key:"updateLabel",value:function(){var i=this.model,T=i.getLabel();if(this.getLabelEl().innerHTML=T,i.hasPreview()){var le=this.getPreviewEl(),ve=i.getStylePreview({number:{min:-3,max:3}}),_e=(0,ie.keys)(ve).map((function(Le){return"".concat(Le,":").concat(ve[Le])})).join(";");le.setAttribute("style",_e)}}},{key:"updateVisibility",value:function(){var i=this.pfx,T=this.model,le=this.propertyView,ve=this.getPropertiesWrapper(),_e=T.isSelected();ve.style.display=_e?"":"none",this.$el[_e?"addClass":"removeClass"]("".concat(i,"active")),_e&&ve.appendChild(le.props.el)}},{key:"render",value:function(){var i=this.el,T=this.pfx,le=this.model;return i.innerHTML=this.template(),i.className="".concat(T,"layer"),le.hasPreview()&&(i.querySelector("[data-preview-box]").style.display=""),this.updateLabel(),this.updateVisibility(),this}}]),u})(se.View);function Se(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var me=(function(L){(0,x.Z)(u,L);var V=Se(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"initialize",value:function(i){var T=this.collection,le=i.config||{},ve=le.em,_e=le.stylePrefix||"",Le=le.pStylePrefix||"";this.config=le,this.pfx=_e,this.ppfx=Le,this.propertyView=i.propertyView,this.className="".concat(_e,"layers ").concat(Le,"field"),this.listenTo(T,"add",this.addTo),this.listenTo(T,"reset",this.reset),this.items=[];var Ke=ve?ve.get("Utils"):"";this.sorter=Ke?new Ke.Sorter({container:this.el,ignoreViewChildren:1,containerSel:".".concat(_e,"layers"),itemSel:".".concat(_e,"layer"),pfx:le.pStylePrefix}):"",T.view=this,this.$el.data("model",T),this.$el.data("collection",T)}},{key:"addTo",value:function(i){var T=this.collection.indexOf(i);this.addToCollection(i,null,T)}},{key:"addToCollection",value:function(i,T,le){var ve=T||null,_e=this.propertyView,Le=this.config,Ke=this.sorter,qe=this.$el,Je=new Ce({model:i,config:Le,sorter:Ke,propertyView:_e}),Qe=Je.render().el;if(this.items.push(Je),ve)ve.appendChild(Qe);else if(le!==void 0){var ct="before";qe.children().length===le&&(le--,ct="after"),le<0?qe.append(Qe):qe.children().eq(le)[ct](Qe)}else qe.append(Qe);return Qe}},{key:"reset",value:function(i,T){this.clearItems(T),this.render()}},{key:"remove",value:function(){this.clearItems(),se.View.prototype.remove.apply(this,arguments)}}
177,{key:"clearItems",value:function(){this.items.forEach((function(i){return i.remove()})),this.items=[]}},{key:"render",value:function(){var i=this,T=this.$el,le=this.sorter,ve=document.createDocumentFragment();return T.empty(),this.collection.forEach((function(_e){return i.addToCollection(_e,ve)})),T.append(ve),T.attr("class",this.className),le&&(le.plh=null),this}}]),u})(se.View);function xe(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function de(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?xe(Object(u),!0).forEach((function(i){(0,D.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):xe(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}function Ee(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var Fe=(function(L){(0,x.Z)(u,L);var V=Ee(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"events",value:function(){return de(de({},Q.prototype.events),{},{"click [data-add-layer]":"addLayer",change:""})}},{key:"templateInput",value:function(){var i=this.pfx,T=this.em,le=T?.getConfig().icons,ve=le?.plus||"+";return` 178 <div class="`.concat(i,"field ").concat(i,`stack"> 179 <button type="button" id="`).concat(i,`add" data-add-layer> 180 `).concat(ve,` 181 </button> 182 <div data-layers-wrapper></div> 183 </div> 184 `)}},{key:"init",value:function(){var i=this.model;this.listenTo(i.__getLayers(),"change reset",this.updateStatus)}},{key:"addLayer",value:function(){this.model.addLayer({},{at:0})}},{key:"setValue",value:function(){}},{key:"remove",value:function(){var i;(i=this.layersView)===null||i===void 0||i.remove(),Q.prototype.remove.apply(this,arguments)}},{key:"clearCached",value:function(){Q.prototype.clearCached.apply(this,arguments),this.layersView=null}},{key:"onRender",value:function(){var i=this.model,T=this.el,le=this.config,ve=i.get("properties");if(ve.length&&!this.props){var _e=new N({config:de(de({},le),{},{highlightComputed:!1,highlightChanged:!1}),collection:ve,parent:this});_e.render();var Le=new me({collection:i.__getLayers(),config:le,propertyView:this});Le.render(),T.querySelector("[data-layers-wrapper]").appendChild(Le.el),this.props=_e,this.layersView=Le}}}]),u})(Q);function He(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function et(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?He(Object(u),!0).forEach((function(i){(0,D.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):He(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}function Ge(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var yt=(function(L){(0,x.Z)(u,L);var V=Ge(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"events",value:function(){return et(et({},Z.prototype.events),{},{"click [data-clear-asset]":"clear","click [data-open-assets]":"openAssetManager"})}},{key:"templateInput",value:function(){var i,T=this.pfx,le=this.em,ve=(i=this.em)===null||i===void 0?void 0:i.getConfig().icons,_e=ve?.close;return` 185 <div class="`.concat(T,"field ").concat(T,`file"> 186 <div id='`).concat(T,`input-holder'> 187 <div class="`).concat(T,`btn-c"> 188 <button class="`).concat(T,'btn" id="').concat(T,`images" type="button" data-open-assets> 189 `).concat(le.t("styleManager.fileButton"),` 190 </button> 191 </div> 192 <div style="clear:both;"></div> 193 </div> 194 <div id="`).concat(T,'preview-box" class="').concat(T,`preview-file" data-preview-box> 195 <div id="`).concat(T,'preview-file" class="').concat(T,`preview-file-cnt" data-preview></div> 196 <div id="`).concat(T,'close" class="').concat(T,'preview-file-close" data-clear-asset>').concat(_e,`</div> 197 </div> 198 </div> 199 `)}},{key:"__setValueInput",value:function(i){var T=this.model,le=this.el,ve=T.getDefaultValue(),_e=le.querySelector("[data-preview-box]"),Le=le.querySelector("[data-preview]");_e.style.display=i&&i!==ve?"":"none",Le.style.backgroundImage=i||T.getDefaultValue()}},{key:"openAssetManager",value:function(){var i,T=this,le=(i=this.em)===null||i===void 0?void 0:i.get("AssetManager");le?.open({select:function(ve,_e){var Le=(0,ie.isString)(ve)?ve:ve.get("src");T.model.upValue(Le,{partial:!_e}),_e&&le.close()},types:["image"],accept:"image/*"})}}]),u})(Z);function St(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var bt=(function(L){(0,x.Z)(u,L);var V=St(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"templateInput",value:function(){return""}},{key:"init",value:function(){var i=this.model;this.listenTo(i,"change:unit",this.onValueChange),this.listenTo(i,"change:units",this.render)}},{key:"setValue",value:function(){}},{key:"onRender",value:function(){var i=this.ppfx,T=this.model,le=this.el;if(!this.inputInst){var ve=T.input;ve.ppfx=i,ve.render(),le.querySelector(".".concat(i,"fields")).appendChild(ve.el),this.input=ve.inputEl.get(0),this.inputInst=ve}}},{key:"clearCached",value:function(){Z.prototype.clearCached.apply(this,arguments),this.inputInst=null}}]),u})(Z),Jt=S(1511);function mt(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var _t=(function(L){(0,x.Z)(u,L);var V=mt(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"setValue",value:function(i){var T;(T=this.inputInst)===null||T===void 0||T.setValue(i,{fromTarget:1,def:this.model.getDefaultValue()})}},{key:"remove",value:function(){var i=this;bt.prototype.remove.apply(this,arguments);var T=this.inputInst;T&&T.remove&&T.remove(),["inputInst","$color"].forEach((function(le){return i[le]=null}))}},{key:"__handleChange",value:function(i,T){this.model.upValue(i,{partial:T})}},{key:"onRender",value:function(){if(!this.inputInst){this.__handleChange=this.__handleChange.bind(this);var i=this.ppfx,T=this.model,le=this.em,ve=this.el,_e=new Jt.Z({target:le,model:T,ppfx:i,onChange:this.__handleChange}).render();ve.querySelector(".".concat(i,"fields")).appendChild(_e.el),this.input=_e.inputEl.get(0),this.inputInst=_e}}}]),u})(bt);function Oe(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function De(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};
199V%2?Oe(Object(u),!0).forEach((function(i){(0,D.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):Oe(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}function Ze(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var Ue=(function(L){(0,x.Z)(u,L);var V=Ze(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"defaults",value:function(){return De(De({},ne.getDefaults()),{},{options:[],full:0})}},{key:"getOptions",value:function(){var i=this.attributes,T=i.options,le=i.list;return(T&&T.length?T:le)||[]}},{key:"getOption",value:function(i){var T=this,le=i||this.getValue();return this.getOptions().filter((function(ve){return T.getOptionId(ve)===le}))[0]||null}},{key:"setOptions",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return this.set("options",i),this}},{key:"addOption",value:function(i){if(i){var T=this.getOptions();this.setOptions([].concat((0,fe.Z)(T),[i]))}return this}},{key:"getOptionId",value:function(i){return(0,ce.isDef)(i.id)?i.id:i.value}},{key:"getOptionLabel",value:function(i){var T,le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ve=le.locale,_e=ve===void 0||ve,Le=((0,ie.isString)(i)?this.getOption(i):i)||{},Ke=this.getOptionId(Le),qe=Le.label||Le.name||Ke,Je=this.getId();return _e&&((T=this.em)===null||T===void 0?void 0:T.t("styleManager.options.".concat(Je,".").concat(Ke)))||qe}},{key:"initialize",value:function(){for(var i=arguments.length,T=new Array(i),le=0;le<i;le++)T[le]=arguments[le];ne.prototype.initialize.apply(this,T),this.listenTo(this,"change:options",this.__onOptionChange)}},{key:"__onOptionChange",value:function(){this.set("list",this.get("options"))}}]),u})(ne);function rt(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var Te=(function(L){(0,x.Z)(u,L);var V=rt(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"templateInput",value:function(){var i=this.pfx,T=this.ppfx;return` 200 <div class="`.concat(T,"field ").concat(T,`select"> 201 <span id="`).concat(i,`input-holder"></span> 202 <div class="`).concat(T,`sel-arrow"> 203 <div class="`).concat(T,`d-s-arrow"></div> 204 </div> 205 </div> 206 `)}},{key:"initialize",value:function(){for(var i=arguments.length,T=new Array(i),le=0;le<i;le++)T[le]=arguments[le];Z.prototype.initialize.apply(this,T),this.listenTo(this.model,"change:options",this.updateOptions)}},{key:"updateOptions",value:function(){this.input=null,this.onRender()}},{key:"onRender",value:function(){var i=this.model,T=this.pfx,le=i.getOptions();if(!this.input){var ve=[];le.forEach((function(Le){var Ke=i.getOptionId(Le),qe=i.getOptionLabel(Ke),Je=Le.style?Le.style.replace(/"/g,"""):"",Qe=Je?'style="'.concat(Je,'"'):"",ct=Ke.replace(/"/g,""");ve.push('<option value="'.concat(ct,'" ').concat(Qe,">").concat(qe,"</option>"))}));var _e=this.el.querySelector("#".concat(T,"input-holder"));_e.innerHTML="<select>".concat(ve.join(""),"</select>"),this.input=_e.firstChild}}},{key:"__setValueInput",value:function(i){var T=this.model,le=this.getInputEl(),ve=T.getOptions()[0],_e=ve?T.getOptionId(ve):"";le&&(le.value=i||_e)}}]),u})(Z);function Ne(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function $e(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};
206V%2?Ne(Object(u),!0).forEach((function(i){(0,D.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):Ne(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}function at(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var tt=(function(L){(0,x.Z)(u,L);var V=at(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"defaults",value:function(){return $e($e({},Ue.getDefaults()),{},{full:1})}}]),u})(Ue);function wt(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var it=(function(L){(0,x.Z)(u,L);var V=wt(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"templateInput",value:function(){var i=this.ppfx;return'<div class="'.concat(i,"field ").concat(i,'field-radio"></div>')}},{key:"onRender",value:function(){var i=this.pfx,T=this.ppfx,le=this.model,ve="".concat(T,"radio-item-label"),_e=le.getName(),Le=le.getOptions(),Ke="".concat(i,"radio ").concat(i,"radio-").concat(_e),qe=le.cid;if(!this.input){var Je=[];Le.forEach((function(ct){var Ct=ct.className?"".concat(ct.className," ").concat(i,"icon ").concat(ve):"",Mt=le.getOptionId(ct),It="".concat(_e,"-").concat(Mt,"-").concat(qe),Gt=Ct?"":le.getOptionLabel(Mt),on=ct.title?'title="'.concat(ct.title,'"'):"",ln=le.getValue()===Mt?"checked":"";Je.push(` 207 <div class="`.concat(T,`radio-item"> 208 <input type="radio" class="`).concat(Ke,'" id="').concat(It,'" name="').concat(_e,"-").concat(qe,'" value="').concat(Mt,'" ').concat(ln,`/> 209 <label class="`).concat(Ct||ve,'" ').concat(on,' for="').concat(It,'">').concat(Gt,`</label> 210 </div> 211 `))}));var Qe=this.el.querySelector(".".concat(T,"field"));Qe.innerHTML='<div class="'.concat(T,'radio-items">').concat(Je.join(""),"</div>"),this.input=Qe.firstChild}}},{key:"__setValueInput",value:function(i){var T,le=this.model,ve=i||le.getDefaultValue(),_e=(T=this.getInputEl())===null||T===void 0?void 0:T.querySelector('[value="'.concat(ve,'"]'));_e&&(_e.checked=!0)}}]),u})(Te),Rt=S(7610);function Ut(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function $t(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?Ut(Object(u),!0).forEach((function(i){(0,D.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):Ut(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}function Yt(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var Xt=(function(L){(0,x.Z)(u,L);var V=Yt(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"defaults",value:function(){return $t($t({},ne.getDefaults()),{},{units:[],unit:"",min:"",max:"",step:1})}},{key:"getUnits",value:function(){return this.get("units")||[]}},{key:"getUnit",value:function(){return this.get("unit")}},{key:"getMin",value:function(){return this.get("min")}},{key:"getMax",value:function(){return this.get("max")}
211},{key:"getStep",value:function(){return this.get("step")}},{key:"upUnit",value:function(i,T){return this._up({unit:i},T)}},{key:"initialize",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ne.callParentInit(ne,this,i,T);var le=this.get("unit"),ve=this.get("units");this.input=(0,ce.hasWin)()&&new Rt.Z({model:this}),ve.length&&!le&&this.set("unit",ve[0],{silent:1}),ne.callInit(this,i,T)}},{key:"__getClearProps",value:function(){return $t($t({},ne.prototype.__getClearProps()),{},{unit:""})}},{key:"parseValue",value:function(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le=ne.prototype.parseValue.apply(this,arguments),ve=this.input.validateInputValue(le.value,$t({deepCheck:1},T)),_e=ve.value,Le=ve.unit;return le.value=_e,le.unit=Le,le}},{key:"getFullValue",value:function(){var i=this.get("value"),T=this.get("unit");return i=(0,ie.isUndefined)(i)?"":i,T=!(0,ie.isUndefined)(T)&&i?T:"",i="".concat(i).concat(T),ne.prototype.getFullValue.apply(this,[i])}}]),u})(ne);function Bt(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function ut(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?Bt(Object(u),!0).forEach((function(i){(0,D.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):Bt(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}function Zt(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var Sn=(function(L){(0,x.Z)(u,L);var V=Zt(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"defaults",value:function(){return ut(ut({},Xt.getDefaults()),{},{showInput:1})}}]),u})(Xt);function yn(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function cn(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?yn(Object(u),!0).forEach((function(i){(0,D.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):yn(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}function sn(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var tn=(function(L){(0,x.Z)(u,L);var V=sn(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"events",value:function(){return cn(cn({},bt.prototype.events),{},{"change [type=range]":"inputValueChanged","input [type=range]":"inputValueChangedSoft",change:""})}},{key:"templateInput",value:function(i){var T=this.ppfx;return` 212 <div class="`.concat(T,"field ").concat(T,`field-range"> 213 <input type="range" min="`).concat(i.get("min"),'" max="').concat(i.get("max"),'" step="').concat(i.get("step"),`"/> 214 </div> 215 `)}},{key:"getSliderEl",value:function(){return this.slider||(this.slider=this.el.querySelector("input[type=range]")),this.slider}},{key:"inputValueChanged",value:function(){this.model.upValue(this.getSliderEl().value)}},{key:"inputValueChangedSoft",value:function(){this.model.upValue(this.getSliderEl().value,{partial:!0})}},{key:"setValue",value:function(i){var T=this.model,le=T.parseValue(i);
215this.getSliderEl().value=i===""?T.getDefaultValue():parseFloat(le.value),bt.prototype.setValue.apply(this,arguments)}},{key:"onRender",value:function(){bt.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")}},{key:"clearCached",value:function(){bt.prototype.clearCached.apply(this,arguments),this.slider=null}}]),u})(bt);const un=oe().Collection.extend(re.Z).extend({extendViewApi:1,init:function(){var L=this.opts,V=this.em,u=L.module||V?.get("StyleManager");u&&(u.__listenAdd(this,u.events.propertyAdd),u.__listenRemove(this,u.events.propertyRemove))},types:[{id:"stack",model:v,view:Fe,isType:function(L){if(L&&L.type=="stack")return L}},{id:"composite",model:E,view:Q,isType:function(L){if(L&&L.type=="composite")return L}},{id:"file",model:ne,view:yt,isType:function(L){if(L&&L.type=="file")return L}},{id:"color",model:ne,view:_t,isType:function(L){if(L&&L.type=="color")return L}},{id:"select",model:Ue,view:Te,isType:function(L){if(L&&L.type=="select")return L}},{id:"radio",model:tt,view:it,isType:function(L){if(L&&L.type=="radio")return L}},{id:"slider",model:Sn,view:tn,isType:function(L){if(L&&L.type=="slider")return L}},{id:"integer",model:Xt,view:bt,isType:function(L){if(L&&L.type=="integer")return L}},{id:"number",model:Xt,view:bt,isType:function(L){if(L&&L.type=="number")return L}},{id:"base",model:ne,view:Z,isType:function(L){return L.type="base",L}}]});var In=["extend"];function _n(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function wn(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?_n(Object(u),!0).forEach((function(i){(0,D.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):_n(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}function An(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var Tn=(function(L){(0,x.Z)(u,L);var V=An(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"defaults",value:function(){return{id:"",name:"",open:!0,visible:!0,buildProps:"",extendBuilded:1,properties:[]}}},{key:"initialize",value:function(i){var T=this,le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ve=le.em;this.em=ve;var _e=i||{},Le=this.buildProperties(_e.buildProps),Ke=this.get("name")||"",qe=[];!this.get("id")&&this.set("id",Ke.replace(/ /g,"_").toLowerCase()),qe=(qe=Le?this.extendProperties(Le):this.get("properties").map((function(Qe){return(0,ie.isString)(Qe)?T.buildProperties(Qe)[0]:Qe})).filter(Boolean)).map((function(Qe){return T.checkExtend(Qe)}));var Je=new un(qe,{em:ve});Je.sector=this,this.set("properties",Je)}},{key:"getId",value:function(){return this.get("id")}},{key:"getName",value:function(){var i,T=this.getId();return((i=this.em)===null||i===void 0?void 0:i.t("styleManager.sectors.".concat(T)))||this.get("name")}},{key:"setName",value:function(i){return this.set("name",i)}},{key:"isOpen",value:function(){return!!this.get("open")}},{key:"setOpen",value:function(i){return this.set("open",i)}},{key:"isVisible",value:function(){return!!this.get("visible")}},{key:"getProperties",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=this.get("properties"),le=T.models?(0,fe.Z)(T.models):T;return le.filter((function(ve){var _e=!0;return i.withValue&&(_e=ve.hasValue({noParent:!0})),i.withParentValue&&(_e=!ve.hasValue({noParent:!0})&&ve.hasValue()),_e}))}},{key:"getProperty",value:function(i){return this.getProperties().filter((function(T){return T.get("id")===i}))[0]||null}},{key:"addProperty",value:function(i,T){return this.get("properties").add(this.checkExtend(i),T)}},{key:"extendProperties",value:function(i,T,le){for(var ve=i.length,_e=T||this.get("properties"),Le=this.get("extendBuilded"),Ke=[],qe=0,Je=_e.length;qe<Je;qe++){for(var Qe=_e[qe],ct=0,Ct=0;Ct<ve;Ct++){var Mt=i[Ct];if(!(Qe.property!=Mt.property&&Qe.id!=Mt.property)){var It=Qe.properties;It&&It.length&&(Qe.properties=this.extendProperties(Mt.properties||[],It,1)),i[Ct]=Le?(0,ie.extend)(Mt,Qe):Qe,Ke[Ct]=i[Ct],ct=1}}ct||(i.push(Qe),Ke.push(Qe))}return le?Ke.filter((function(Gt){return Gt})):i}},{key:"checkExtend",value:function(i){var T=((0,ie.isString)(i)?{extend:i}:i)||{},le=T.extend,ve=(0,I.Z)(T,In);return le?wn(wn({},this.buildProperties([le])[0]||{}),ve):i}},{key:"buildProperties",value:function(i){var T,le=i||[];if(!le.length)return[];var ve=(T=this.em)===null||T===void 0?void 0:T.get("StyleManager").builtIn;return ve?.build(le)}}]),u})(se.Model);function nn(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function Pn(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};
215V%2?nn(Object(u),!0).forEach((function(i){(0,D.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):nn(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}function Qn(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var rn=(function(L){(0,x.Z)(u,L);var V=Qn(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"initialize",value:function(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le=T.module,ve=T.em;this.em=ve,this.module=le,this.listenTo(this,"reset",this.onReset)}},{key:"model",value:function(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le=T.collection.em;return new Tn(i,Pn(Pn({},T),{},{em:le}))}},{key:"onReset",value:function(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le=T.previousModels||[];le.forEach((function(ve){return ve.get("properties").reset()}))}}]),u})(se.Collection),ht=S(885),Fn=["extend"];function qn(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function dn(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?qn(Object(u),!0).forEach((function(i){(0,D.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):qn(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}var Kt,Vt=function(L){return L.map((function(V){return{id:V}}))},Rn=(function(){function L(){(0,g.Z)(this,L),this.typeNumber="number",this.typeColor="color",this.typeRadio="radio",this.typeSelect="select",this.typeFile="file",this.typeSlider="slider",this.typeComposite="composite",this.typeStack="stack",this.unitsSize=["px","%","em","rem","vh","vw"],this.unitsSizeNoPerc=["px","em","rem","vh","vw"],this.unitsTime=["s","ms"],this.unitsAngle=["deg","rad","grad"],this.fixedValues=["initial","inherit","auto"];var V=", sans-serif",u=["flex-start","flex-end","center"],i=[].concat(u,["baseline","stretch"]);this.optsBgSize=Vt(["auto","cover","contain"]),this.optsBgAttach=Vt(["scroll","fixed","local"]),this.optsBgRepeat=Vt(["repeat","repeat-x","repeat-y","no-repeat"]),this.optsWrap=Vt(["nowrap","wrap","wrap-reverse"]),this.optsOverflow=Vt(["visible","hidden","scroll","auto"]),this.optsDir=Vt(["row","row-reverse","column","column-reverse"]),this.opstDisplay=Vt(["block","inline","inline-block","flex","none"]),this.optsTransitFn=Vt(["linear","ease","ease-in","ease-out","ease-in-out"]),this.optsCursor=Vt(["auto","pointer","copy","crosshair","grab","grabbing","help","move","text"]),this.optsFloat=Vt(["none","left","right"]),this.optsPos=Vt(["static","relative","absolute","fixed"]),this.optsTextAlign=Vt(["left","center","right","justify"]),this.optsFlexAlign=Vt(i),this.optsJustCont=Vt([].concat(u,["space-between","space-around","space-evenly"])),this.optsAlignCont=Vt([].concat(u,["space-between","space-around","stretch"])),this.optsAlignSelf=Vt(["auto"].concat((0,fe.Z)(i))),this.optsTransitProp=Vt(["all","width","height","background-color","transform","box-shadow","opacity"]),this.optsBorderStyle=Vt(["none","solid","dotted","dashed","double","groove","ridge","inset","outset"]),this.optsBgPos=Vt(["left top","left center","left bottom","right top","right center","right bottom","center top","center center","center bottom"]),this.optsWeight=[{id:"100",label:"Thin"},{id:"200",label:"Extra-Light"},{id:"300",label:"Light"},{id:"400",label:"Normal"},{id:"500",label:"Medium"},{id:"600",label:"Semi-Bold"},{id:"700",label:"Bold"},{id:"800",label:"Extra-Bold"},{id:"900",label:"Ultra-Bold"}],this.optsShadowType=[{id:"",label:"Outside"},{id:"inset",label:"Inside"}],this.optsFonts=["Arial, Helvetica"+V,"Arial Black, Gadget"+V,"Brush Script MT"+V,"Comic Sans MS, cursive"+V,"Courier New, Courier, monospace","Georgia, serif","Helvetica"+V,"Impact, Charcoal"+V,"Lucida Sans Unicode, Lucida Grande"+V,"Tahoma, Geneva"+V,"Times New Roman, Times, serif","Trebuchet MS, Helvetica"+V,"Verdana, Geneva"+V].map((function(T){return{id:T,label:T.split(",")[0]}})),this.fixedFontSizes=["medium","xx-small","x-small","small","large","x-large","xx-large","smaller","larger","length","initial","inherit"],this.fixedLetSpace=["normal","initial","inherit"],this.requireFlex={display:["flex"]},this.init()}return(0,P.Z)(L,[{key:"__sub",value:function(V){var u=this;return function(){return V.map((function(i){if((0,ie.isString)(i))return u.get(i);var T=i.extend,le=(0,I.Z)(i,Fn);return dn(dn({},u.get(T)),le)}))}}},{key:"init",value:function(){var V=this,u=this.fixedValues,i=this.requireFlex,T=this.typeNumber;return this.props={},[["text-shadow-h",{type:T,default:"0",units:this.unitsSizeNoPerc}],["top",{default:"auto",units:this.unitsSize,fixedValues:u},"text-shadow-h"],["right",{},"top"],["bottom",{},"top"],["left",{},"top"],["margin-top",{default:"0"},"top"],["margin-right",{},"margin-top"],["margin-bottom",{},"margin-top"],["margin-left",{},"margin-top"],["padding-top",{min:0},"margin-top"],["padding-right",{},"padding-top"],["padding-bottom",{},"padding-top"],["padding-left",{},"padding-top"],["width",{min:0},"top"],["min-width",{},"width"],["max-width",{},"width"],["height",{},"width"],["min-height",{},"width"],["max-height",{},"width"],["flex-basis",{requiresParent:i},"width"],["font-size",{default:"medium",fixedValues:this.fixedFontSizes},"width"],["letter-spacing",{default:"normal",fixedValues:this.fixedLetSpace},"top"],["line-height",{},"letter-spacing"],["text-shadow-v",{},"text-shadow-h"],["text-shadow-blur",{min:0},"text-shadow-h"],["border-radius-c",{property:"border-radius",fixedValues:void 0},"padding-top"],["border-top-left-radius",{},"border-radius-c"],["border-top-right-radius",{},"border-radius-c"],["border-bottom-left-radius",{},"border-radius-c"],["border-bottom-right-radius",{},"border-radius-c"],["border-width",{units:this.unitsSizeNoPerc},"border-radius-c"],["box-shadow-h",{},"text-shadow-h"],["box-shadow-v",{},"text-shadow-h"],["box-shadow-blur",{default:"5px"},"text-shadow-blur"],["box-shadow-spread",{},"text-shadow-h"],["transition-duration",{default:"2s",units:this.unitsTime},"border-radius-c"],["perspective",{},"border-radius-c"],["order",{type:T,default:"0",requiresParent:i}],["flex-grow",{},"order"],["flex-shrink",{default:"1"}
215,"order"],["float",{type:this.typeRadio,default:"none",options:this.optsFloat}],["position",{default:"static",options:this.optsPos},"float"],["text-align",{default:"left",options:this.optsTextAlign},"float"],["color",{type:this.typeColor,default:"black"}],["text-shadow-color",{},"color"],["border-color",{},"color"],["box-shadow-color",{},"color"],["background-color",{default:"none"},"color"],["background-image",{type:this.typeFile,functionName:"url",default:"none",full:!0}],["opacity",{type:this.typeSlider,default:"1",min:0,max:1,step:.01}],["display",{type:this.typeSelect,default:"block",options:this.opstDisplay}],["flex-direction",{default:"row",options:this.optsDir,requires:i},"display"],["flex-wrap",{default:"nowrap",options:this.optsWrap},"flex-direction"],["justify-content",{default:"flex-start",options:this.optsJustCont},"flex-wrap"],["align-items",{default:"stretch",options:this.optsFlexAlign},"flex-wrap"],["align-content",{options:this.optsAlignCont},"align-items"],["align-self",{default:"auto",options:this.optsAlignSelf,requiresParent:i},"display"],["font-family",{default:"Arial, Helvetica, sans-serif",options:this.optsFonts},"display"],["font-weight",{default:"400",options:this.optsWeight},"display"],["border-style",{default:"solid",options:this.optsBorderStyle},"display"],["box-shadow-type",{default:"",options:this.optsShadowType},"display"],["background-repeat",{default:"repeat",options:this.optsBgRepeat}
215,"display"],["background-position",{default:"left top",options:this.optsBgPos},"display"],["background-attachment",{default:"scroll",options:this.optsBgAttach},"display"],["background-size",{default:"auto",options:this.optsBgSize},"display"],["transition-property",{default:"width",options:this.optsTransitProp},"display"],["transition-timing-function",{default:"ease",options:this.optsTransitFn},"display"],["cursor",{default:"auto",options:this.optsCursor},"display"],["overflow",{default:"visible",options:this.optsOverflow},"display"],["overflow-x",{},"overflow"],["overflow-y",{},"overflow"],["margin",{type:this.typeComposite,properties:this.__sub([{extend:"margin-top",id:"margin-top-sub"},{extend:"margin-right",id:"margin-right-sub"},{extend:"margin-bottom",id:"margin-bottom-sub"},{extend:"margin-left",id:"margin-left-sub"}])}],["padding",{properties:this.__sub([{extend:"padding-top",id:"padding-top-sub"},{extend:"padding-right",id:"padding-right-sub"},{extend:"padding-bottom",id:"padding-bottom-sub"},{extend:"padding-left",id:"padding-left-sub"}])},"margin"],["border",{properties:this.__sub([{extend:"border-width",id:"border-width-sub"},{extend:"border-style",id:"border-style-sub"},{extend:"border-color",id:"border-color-sub"}])},"margin"],["border-radius",{properties:this.__sub([{extend:"border-top-left-radius",id:"border-top-left-radius-sub"},{extend:"border-top-right-radius",id:"border-top-right-radius-sub"},{extend:"border-bottom-right-radius",id:"border-bottom-right-radius-sub"},{extend:"border-bottom-left-radius",id:"border-bottom-left-radius-sub"}])}
215,"margin"],["transition",{type:this.typeStack,properties:this.__sub([{extend:"transition-property",id:"transition-property-sub"},{extend:"transition-duration",id:"transition-duration-sub"},{extend:"transition-timing-function",id:"transition-timing-function-sub"}])}],["box-shadow",{preview:!0,layerLabel:function(le,ve){var _e=ve.values,Le=_e["box-shadow-h"],Ke=_e["box-shadow-v"],qe=_e["box-shadow-blur"],Je=_e["box-shadow-spread"];return"".concat(Le," ").concat(Ke," ").concat(qe," ").concat(Je)},properties:this.__sub(["box-shadow-h","box-shadow-v","box-shadow-blur","box-shadow-spread","box-shadow-color","box-shadow-type"])},"transition"],["text-shadow",{default:"none",layerLabel:function(le,ve){var _e=ve.values,Le=_e["text-shadow-h"],Ke=_e["text-shadow-v"],qe=_e["text-shadow-blur"];return"".concat(Le," ").concat(Ke," ").concat(qe)},properties:this.__sub(["text-shadow-h","text-shadow-v","text-shadow-blur","text-shadow-color"])},"box-shadow"],["background",{detached:!0,layerLabel:function(le,ve){var _e=ve.values;return[_e["background-repeat-sub"]||"",_e["background-position-sub"]||"",_e["background-attachment-sub"]||"",_e["background-size-sub"]||""].join(" ")},properties:this.__sub([{extend:"background-image",id:"background-image-sub"},{extend:"background-repeat",id:"background-repeat-sub"},{extend:"background-position",id:"background-position-sub"},{extend:"background-attachment",id:"background-attachment-sub"},{extend:"background-size",id:"background-size-sub"}])},"box-shadow"],["transform",{type:"stack",layerSeparator:" ",fromStyle:function(le,ve){var _e=ve.property,Le=le[ve.name]||"",Ke=_e.getLayerSeparator();return Le?Le.split(Ke).map((function(qe){var Je=_e.__parseFn(qe);return{name:Je.name,value:Je.value}})):[]},toStyle:function(le,ve){return{[ve.name]:"".concat(le.name,"(").concat(le.value,")")}},properties:[{property:"name",name:"Type",type:this.typeSelect,default:"rotateZ",full:!0,options:[{id:"scaleX",propValue:{units:[""],step:.01}},{id:"scaleY",propValue:{units:[""],step:.01}},{id:"scaleZ",propValue:{units:[""],step:.01}},{id:"rotateX",propValue:{units:this.unitsAngle,step:1}},{id:"rotateY",propValue:{units:this.unitsAngle,step:1}},{id:"rotateZ",propValue:{units:this.unitsAngle,step:1}},{id:"translateX",propValue:{units:this.unitsSize,step:1}},{id:"translateY",propValue:{units:this.unitsSize,step:1}}],onChange:function(le){var ve=le.property;if(le.to.value){var _e=dn({},ve.getOption().propValue||{}),Le=ve.getParent().getProperty("value"),Ke=Le.getUnit();(!Ke||_e?.units.indexOf(Ke)<0)&&(_e.unit=_e?.units[0]||""),Le.up(_e)}}},{property:"value",type:this.typeNumber,default:"0",full:!0}]}]].forEach((function(le){var ve=(0,ht.Z)(le,3),_e=ve[0],Le=ve[1],Ke=ve[2];V.add(_e,Le||{},{from:Ke})})),this}},{key:"add",value:function(V){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},T=i.from||"",le=this.props[T||V]||{},ve=dn(dn({},le),{},{property:V},u);return ve.properties&&(0,ie.isFunction)(ve.properties)&&(ve.properties=ve.properties()),this.props[V]=ve,ve}},{key:"get",value:function(V){return this.props[V]||null}},{key:"build",value:function(V){var u=this,i=[];return((0,ie.isString)(V)?[V]:V).forEach((function(T){i.push(u.get(T)||{property:T})})),i}}]),L})(),Wt=S(168),st=S(7539);function Nt(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var be=(function(L){(0,x.Z)(u,L);var V=Nt(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"template",value:function(i){var T,le=i.pfx,ve=i.label,_e=(T=this.em)===null||T===void 0?void 0:T.getConfig().icons,Le=_e?.caret||"",Ke="".concat(le,"sector-");return(0,st.Z)(Kt||(Kt=(0,Wt.Z)([` 216 <div class="`,`title" data-sector-title> 217 <div class="`,'caret">$',`</div> 218 <div class="`,'label">',`</div> 219 </div> 220 `])),Ke,Ke,Le,Ke,ve)}},{key:"events",value:function(){return{"click [data-sector-title]":"toggle"}}},{key:"initialize",value:function(i){var T=i.config||{},le=this.model,ve=T.em;this.config=T,this.em=ve,this.pfx=T.stylePrefix||"",this.listenTo(le,"destroy remove",this.remove),this.listenTo(le,"change:open",this.updateOpen),this.listenTo(le,"change:visible",this.updateVisibility)}},{key:"updateOpen",value:function(){var i=this.$el,T=this.model,le=this.pfx,ve=T.isOpen();i[ve?"addClass":"removeClass"]("".concat(le,"open")),this.getPropertiesEl().style.display=ve?"":"none"}},{key:"updateVisibility",value:function(){this.el.style.display=this.model.isVisible()?"":"none"}},{key:"getPropertiesEl",value:function(){var i=this.$el,T=this.pfx;return i.find(".".concat(T,"properties")).get(0)}},{key:"toggle",value:function(){var i=this.model;i.setOpen(!i.get("open"))}},{key:"renderProperties",value:function(){var i=this.model,T=this.config,le=i.get("properties");if(le){var ve=new N({collection:le,config:T});this.$el.append(ve.render().el)}}},{key:"render",value:function(){var i=this.pfx,T=this.model,le=this.$el,ve=T.getId(),_e=T.getName();return le.html(this.template({pfx:i,label:_e})),this.renderProperties(),le.attr("class","".concat(i,"sector ").concat(i,"sector__").concat(ve," no-select")),this.updateOpen(),this}}]),u})(se.View);function Pe(L){var V=(function(){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}})();return function(){var u,i=(0,$.Z)(L);if(V){var T=(0,$.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,A.Z)(this,u)}}var Xe=(function(L){(0,x.Z)(u,L);var V=Pe(u);function u(){return(0,g.Z)(this,u),V.apply(this,arguments)}return(0,P.Z)(u,[{key:"initialize",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=i.module,le=i.config,ve=le===void 0?{}:le,_e=this.collection;this.pfx=ve.stylePrefix||"",this.ppfx=ve.pStylePrefix||"",this.config=ve,this.module=T,this.listenTo(_e,"add",this.addTo),this.listenTo(_e,"reset",this.render)}},{key:"remove",value:function(){var i=this;se.View.prototype.remove.apply(this,arguments),["config","module","em"].forEach((function(T){return i[T]={}}))}},{key:"addTo",value:function(i,T){var le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.addToCollection(i,null,le)}},{key:"addToCollection",value:function(i,T){var le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ve=this.config,_e=this.el,Le=T||_e,Ke=new be({model:i,config:ve}).render().el;return(0,Y.$Q)(Le,Ke,le.at),Ke}},{key:"render",value:function(){var i=this,T=this.$el,le=this.pfx,ve=this.ppfx;T.empty();var _e=document.createDocumentFragment();return this.collection.each((function(Le){return i.addToCollection(Le,_e)})),T.append(_e),T.addClass("".concat(le,"sectors ").concat(ve,"one-bg ").concat(ve,"two-color")),this}}]),u})(se.View);function gt(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function kt(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};
220V%2?gt(Object(u),!0).forEach((function(i){(0,D.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):gt(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}var ft="style",qt="".concat(ft,":"),gn="".concat(qt,"sector"),kn="".concat(gn,":add"),Vn="".concat(gn,":remove"),er="".concat(gn,":update"),cr="".concat(qt,"property"),Wn="".concat(cr,":add"),tr="".concat(cr,":remove"),ur="".concat(cr,":update"),nr="".concat(qt,"layer:select"),Qt="".concat(qt,"target"),Bn="".concat(qt,"custom"),rr=function(L){return L||L===0};const fr=function(){var L,V,u;return kt(kt({},ae.Z),{},{Sector:Tn,events:{all:ft,sectorAdd:kn,sectorRemove:Vn,sectorUpdate:er,propertyAdd:Wn,propertyRemove:tr,propertyUpdate:ur,layerSelect:nr,target:Qt,custom:Bn},name:"StyleManager",init:function(){var i=this,T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,ie.bindAll)(this,"__clearStateTarget"),this.__initConfig(W,T);var le=this.config,ve=le.em,_e=le.pStylePrefix;_e&&(le.stylePrefix=_e+le.stylePrefix),this.builtIn=new Rn,L=new un([],{em:ve,module:this}),V=new rn([],kt(kt({},le),{},{module:this}));var Le=new se.Model({targets:[]});this.model=Le,this.__listenAdd(V,kn),this.__listenRemove(V,Vn),this.__listenUpdate(V,er);var Ke="component:toggled component:update:classes change:state change:device frame:resized selector:type",qe=(0,ie.debounce)((function(){return i.__upSel()}));Le.listenTo(ve,Ke,qe),Le.listenTo(ve,"component:toggled",this.__clearStateTarget);var Je=(0,ie.debounce)((function(){i.__upProps(),i.__trgCustom()}));Le.listenTo(ve,"styleable:change undo redo",Je);var Qe=(0,ie.debounce)((function(){return i.__trgCustom()}));return Le.listenTo(ve,"".concat(nr," ").concat(Qt),Qe),Le.on("change:lastTarget",(function(){return ve.trigger(Qt,i.getSelected())})),this},__upSel:function(){this.select(this.em.getSelectedAll())},__trgCustom:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.__ctn=this.__ctn||i.container,this.em.trigger(this.events.custom,{container:this.__ctn})},__trgEv:function(i){for(var T,le=arguments.length,ve=new Array(le>1?le-1:0),_e=1;_e<le;_e++)ve[_e-1]=arguments[_e];(T=this.em).trigger.apply(T,[i].concat(ve))},__clearStateTarget:function(){var i=this,T=this.em,le=this.__getStateTarget();le&&T?.skip((function(){T.get("CssComposer").remove(le),i.model.set({stateTarget:null})}))},onLoad:function(){V.add(this.config.sectors,{silent:!0})},postRender:function(){this.__appendTo()},addSector:function(i,T){var le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ve=this.getSector(i);return ve||(T.id=i,ve=V.add(T,le)),ve},getSector:function(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le=V.where({id:i})[0];return!le&&T.warn&&this._logNoSector(i),le||null},getSectors:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},T=V&&V.models?i.array?(0,fe.Z)(V.models):V:[];return i.visible?T.filter((function(le){return le.isVisible()})):T},removeSector:function(i){return this.getSectors().remove(this.getSector(i,{warn:1}))},addProperty:function(i,T){var le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ve=this.getSector(i,{warn:1}),_e=null;return ve&&(_e=ve.addProperty(T,le)),_e},getProperty:function(i,T){var le,ve=this.getSector(i,{warn:1});return ve&&(le=ve.get("properties").filter((function(_e){return _e.get("property")===T||_e.get("id")===T}))[0]),le||null},getProperties:function(i){var T=null,le=this.getSector(i,{warn:1});return le&&(T=le.get("properties")),T},removeProperty:function(i,T){var le=this.getProperties(i);return le?le.remove(this.getProperty(i,T)):null},select:function(i){var T=this,le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ve=this.em,_e=(0,ie.isArray)(i)?i:[i],Le=le.stylable,Ke=ve.get("CssComposer"),qe=[];_e.filter(Boolean).forEach((function(It){var Gt=It;if((0,ie.isString)(It)){var on=Ke.getRule(It)||Ke.setRule(It);!(0,ie.isUndefined)(Le)&&on.set({stylable:Le}),Gt=on}qe.push(Gt)}));var Je=le.component||qe.filter((function(It){return(0,ce.isComponent)(It)})).reverse()[0];qe=qe.map((function(It){return T.getModelToStyle(It)}));var Qe=ve.getState(),ct=qe.slice().reverse()[0],Ct=this.getParentRules(ct,{state:Qe,component:Je}),Mt=this.__getStateTarget();return ve.skip((function(){var It;if(Qe&&ct!=null&&(It=ct.getState)!==null&&It!==void 0&&It.call(ct)){var Gt=ct.getStyle();Mt?Mt.setStyle(Gt):Mt=Ke.getAll().add({selectors:"gjs-selected",style:Gt,shallow:!0,important:!0})}else Mt&&(Ke.remove(Mt),Mt=null)})),this.model.set({targets:qe,lastTarget:ct,lastTargetParents:Ct,stateTarget:Mt,component:Je}),this.__upProps(le),qe},getSelected:function(){return this.model.get("lastTarget")||null},getSelectedAll:function(){return this.model.get("targets")},getSelectedParents:function(){return this.model.get("lastTargetParents")||[]},__getStateTarget:function(){return this.model.get("stateTarget")||null}
220,addStyleTargets:function(i,T){this.getSelectedAll().map((function(_e){return _e.addStyle(i,T)}));var le=this.getSelected(),ve=this.__getStateTarget();le&&ve?.setStyle(le.getStyle(),T)},getBuiltIn:function(i){return this.builtIn.get(i)},getBuiltInAll:function(){return this.builtIn.props},addBuiltIn:function(i,T){return this.builtIn.add(i,T)},getModelToStyle:function(i){var T,le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ve=this.em,_e=le.skipAdd;if(ve&&(T=i)!==null&&T!==void 0&&T.toHTML){var Le,Ke=ve.getConfig(),qe=ve.get("UndoManager"),Je=ve.get("CssComposer"),Qe=ve.get("SelectorManager"),ct=Qe?Qe.getConfig():{},Ct=Ke.devicePreviewMode?"":ve.get("state"),Mt=i.get("classes"),It=Mt.getStyleable(),Gt=It.length,on=!ct.componentFirst||le.useClasses,ln={noCount:1},zt={state:Ct,addOpts:ln};if(qe.stop(),Gt&&on){var an=ve.getCurrentMedia();(Le=Je.get(It,Ct,an))||_e||(Le=Je.add(It,Ct,an,{},ln))}else if(Ke.avoidInlineStyle){var xn=i.getId();!(Le=Je.getIdRule(xn,zt))&&!_e&&(Le=Je.setIdRule(xn,{},zt)),i.is("wrapper")&&Le.set("wrapper",1,ln)}Le&&(i=Le),qe.start()}return i},getParentRules:function(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le=T.state,ve=T.component,_e=this.em,Le=[];if(_e&&i){var Ke=ve,qe=_e.get("CssComposer"),Je=_e.get("CodeManager").getGenerator("css"),Qe=i.toHTML?i:i.getComponent(),ct={combination:!0,array:!0},Ct=[],Mt=[],It=[];Qe?(Ct=qe.getRules("#".concat(Qe.getId())),It=(Mt=Ke?qe.getRules(Ke.getSelectors().getFullName(ct)):[]).concat(Ct)):(Ct=Ke?qe.getRules("#".concat(Ke.getId())):[],Mt=qe.getRules(i.getSelectors().getFullName(ct)),It=Ct.concat(Mt));var Gt=It.filter((function(on){return(0,ie.isUndefined)(le)?1:on.get("state")===le})).sort(Je.sortRules).reverse();Le=Gt.slice(Gt.indexOf(i)+1)}return Le},addType:function(i,T){L.addType(i,T)},getType:function(i){return L.getType(i)},getTypes:function(){return L.getTypes()},createType:function(i){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le=T.model,ve=le===void 0?{}:le,_e=T.view,Le=_e===void 0?{}:_e,Ke=this.config,qe=this.getType(i);if(qe)return new qe.view(kt({model:new qe.model(ve),config:Ke},Le))},render:function(){var i=this.config,T=this.em,le=u&&u.el;return(u=new Xe({el:le,em:T,config:i,collection:V,module:this})).render().el},_logNoSector:function(i){var T=this.em;T&&T.logWarning("'".concat(i,"' sector not found"))},__upProps:function(i){var T=this,le=this.getSelected();if(le){var ve=this.model.get("component"),_e=this.getSelectedParents(),Le=le.getStyle(),Ke=_e.map((function(qe){return{target:qe,style:qe.getStyle()}}));V.map((function(qe){qe.getProperties().map((function(Je){T.__upProp(Je,Le,Ke,i)}))})),V.forEach((function(qe){var Je=qe.getProperties();Je.forEach((function(ct){var Ct=ct.__checkVisibility({target:le,component:ve,sectors:V});ct.set("visible",Ct)}));var Qe=Je.some((function(ct){return ct.isVisible()}));qe.set("visible",Qe)}))}},__upProp:function(i,T,le,ve){var _e=this,Le=i.getName(),Ke=T[Le],qe=rr(Ke),Je=i.getType()==="stack",Qe=i.getType()==="composite",ct=kt(kt({},ve),{},{__up:!0}),Ct=!Qe&&!Je,Mt=Je?i.__getLayersFromStyle(T):[],It=Qe?i.__getPropsFromStyle(T):{},Gt=qe?Ke:null,on=null;if(Je&&Mt===null||Qe&&It===null){var ln=Je?"__getLayersFromStyle":"__getPropsFromStyle",zt=le.filter((function($n){return i[ln]($n.style)!==null}))[0];if(zt){Gt=zt.style[Le],on=zt.target;var an=i[ln](zt.style);Je?Mt=an:It=an}}else if(!qe){Gt=null;var xn=le.filter((function($n){return rr($n.style[Le])}))[0];xn&&(Gt=xn.style[Le],on=xn.target)}if(i.__setParentTarget(on),Ct&&i.__getFullValue()!==Gt&&i.upValue(Gt,ct),Je&&i.__setLayers(Mt||[]),Qe){var hr=i.getProperties();if(i.isDetached()){var Gn=i.__getPropsFromStyle(T,{byName:!0})||{},mn=le.map((function($n){return kt(kt({},$n),{},{style:i.__getPropsFromStyle($n.style,{byName:!0})||{}})}));hr.map((function($n){return _e.__upProp($n,Gn,mn,ve)}))}else i.__setProperties(It||{},ct),i.getProperties().map((function($n){return $n.__setParentTarget(on)}))}},destroy:function(){[L,V].forEach((function(i){i.reset(),i.stopListening()})),u&&u.remove(),[L,V,u].forEach((function(i){return{}})),this.em={},this.config={},this.builtIn={},this.model={}}})}},6388:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>m,evAll:()=>v,evCustom:()=>h,evPfx:()=>b});var fe=S(4942),D=S(9050),ie=S(9304),ce=S(2316),ae=S.n(ce);const se={stylePrefix:"trt-",appendTo:"",optionsTarget:[{value:!1},{value:"_blank"}]};
220var oe=S(5671),W=S(3144),I=S(7326),g=S(9340),P=S(2963),x=S(1120),A=S(6602),$=S(885),re=S(1163);function z(p,y){var Z=Object.keys(p);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(p);y&&(Y=Y.filter((function(q){return Object.getOwnPropertyDescriptor(p,q).enumerable}))),Z.push.apply(Z,Y)}return Z}function F(p){for(var y=1;y<arguments.length;y++){var Z=arguments[y]!=null?arguments[y]:{};y%2?z(Object(Z),!0).forEach((function(Y){(0,fe.Z)(p,Y,Z[Y])})):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(Z)):z(Object(Z)).forEach((function(Y){Object.defineProperty(p,Y,Object.getOwnPropertyDescriptor(Z,Y))}))}return p}function G(p){var y=(function(){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}})();return function(){var Z,Y=(0,x.Z)(p);if(y){var q=(0,x.Z)(this).constructor;Z=Reflect.construct(Y,arguments,q)}else Z=Y.apply(this,arguments);return(0,P.Z)(this,Z)}}var H=ae().$,ne=(function(p){(0,g.Z)(Z,p);var y=G(Z);function Z(){var Y,q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,oe.Z)(this,Z),Y=y.call(this,q),(0,fe.Z)((0,I.Z)(Y),"events",{}),(0,fe.Z)((0,I.Z)(Y),"appendInput",!0);var N=q.config,a=N===void 0?{}:N,c=(0,I.Z)(Y),C=c.model,Q=c.eventCapture,pe=C.target,Ce=C.attributes.type;Y.config=a,Y.em=a.em,Y.pfx=a.stylePrefix||"",Y.ppfx=a.pStylePrefix||"",Y.target=pe;var Se=(0,I.Z)(Y),me=Se.ppfx;return Y.clsField="".concat(me,"field ").concat(me,"field-").concat(Ce),[["change:value",Y.onValueChange],["remove",Y.removeView]].forEach((function(xe){var de=(0,$.Z)(xe,2),Ee=de[0],Fe=de[1];C.off(Ee,Fe),Y.listenTo(C,Ee,Fe)})),C.view=(0,I.Z)(Y),Y.listenTo(C,"change:label",Y.render),Y.listenTo(C,"change:placeholder",Y.rerender),Y.events={},Q.forEach((function(xe){return Y.events[xe]="onChange"})),Y.delegateEvents(),Y.init(),Y}return(0,W.Z)(Z,[{key:"attributes",value:function(){return this.model.get("attributes")}},{key:"templateLabel",value:function(){var Y=this.ppfx,q=this.getLabel();return'<div class="'.concat(Y,'label" title="').concat(q,'">').concat(q,"</div>")}},{key:"templateInput",value:function(){var Y=this.clsField;return'<div class="'.concat(Y,'" data-input></div>')}},{key:"getClbOpts",value:function(){return{component:this.target,trait:this.model,elInput:this.getInputElem()}}},{key:"removeView",value:function(){this.remove(),this.removed()}},{key:"init",value:function(){}},{key:"removed",value:function(){}},{key:"onRender",value:function(){}},{key:"onUpdate",value:function(){}},{key:"onEvent",value:function(){}},{key:"onChange",value:function(Y){var q=this.getInputElem();q&&!(0,D.isUndefined)(q.value)&&this.model.set("value",q.value),this.onEvent(F(F({},this.getClbOpts()),{},{event:Y}))}},{key:"getValueForTarget",value:function(){return this.model.get("value")}},{key:"setInputValue",value:function(Y){var q=this.getInputElem();q&&(q.value=Y)}},{key:"onValueChange",value:function(Y,q){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(N.fromTarget)this.setInputValue(Y.get("value")),this.postUpdate();else{var a=this.getValueForTarget();Y.setTargetValue(a,N)}}},{key:"renderLabel",value:function(){var Y=this.$el,q=this.target,N=this.getLabel(),a=this.templateLabel(q);this.createLabel&&(a=this.createLabel({label:N,component:q,trait:this})||""),Y.find("[data-label]").append(a)}},{key:"getLabel",value:function(){var Y=this.em,q=this.model.attributes,N=q.label,a=q.name;return Y.t("traitManager.traits.labels.".concat(a))||(0,re.capitalize)(N||a).replace(/-/g," ")}},{key:"getComponent",value:function(){return this.target}},{key:"getInputEl",value:function(){if(!this.$input){var Y=this.em,q=this.model,N=q,a=q.attributes.name,c=N.get("placeholder")||N.get("default")||"",C=N.get("type")||"text",Q=N.get("min"),pe=N.get("max"),Ce=this.getModelValue(),Se=H('<input type="'.concat(C,'" placeholder="').concat(c,'">')),me=Y.t("traitManager.traits.attributes.".concat(a))||{};Se.attr(me),(0,D.isUndefined)(Ce)||(N.set({value:Ce},{silent:!0}),Se.prop("value",Ce)),Q&&Se.prop("min",Q),pe&&Se.prop("max",pe),this.$input
220=Se}return this.$input.get(0)}},{key:"getInputElem",value:function(){var Y=this.input,q=this.$input;return Y||q&&q.get&&q.get(0)||this.getElInput()}},{key:"getModelValue",value:function(){var Y,q=this.model,N=this.target,a=q.get("name");if(q.get("changeProp"))Y=N.get(a);else{var c=N.get("attributes");Y=q.get("value")||c[a]}return(0,D.isUndefined)(Y)?"":Y}},{key:"getElInput",value:function(){return this.elInput}},{key:"renderField",value:function(){var Y=this.$el,q=this.appendInput,N=this.model,a=Y.find("[data-input]"),c=a[a.length-1],C=N.el;C||(C=this.createInput?this.createInput(this.getClbOpts()):this.getInputEl()),(0,D.isString)(C)?(c.innerHTML=C,this.elInput=c.firstChild):(q?c.appendChild(C):c.insertBefore(C,c.firstChild),this.elInput=C),N.el=this.elInput}},{key:"hasLabel",value:function(){var Y=this.model.attributes.label;return!this.noLabel&&Y!==!1}},{key:"rerender",value:function(){this.model.el=null,this.render()}},{key:"postUpdate",value:function(){this.onUpdate(this.getClbOpts())}},{key:"render",value:function(){var Y=this.$el,q=this.pfx,N=this.ppfx,a=this.model.attributes,c=a.type,C=a.id,Q=this.hasLabel&&this.hasLabel(),pe="".concat(q,"trait");this.$input=null;var Ce='<div class="'.concat(pe," ").concat(pe,"--").concat(c,`"> 221 `).concat(Q?'<div class="'.concat(N,'label-wrp" data-label></div>'):"",` 222 <div class="`).concat(N,"field-wrp ").concat(N,"field-wrp--").concat(c,`" data-input> 223 `).concat(this.templateInput?(0,D.isFunction)(this.templateInput)?this.templateInput(this.getClbOpts()):this.templateInput:"",` 224 </div> 225 </div>`);return Y.empty().append(Ce),Q&&this.renderLabel(),this.renderField(),this.el.className="".concat(pe,"__wrp ").concat(pe,"__wrp-").concat(C),this.postUpdate(),this.onRender(this.getClbOpts()),this}}]),Z})(ae().View);function ye(p){var y=(function(){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}})();return function(){var Z,Y=(0,x.Z)(p);if(y){var q=(0,x.Z)(this).constructor;Z=Reflect.construct(Y,arguments,q)}else Z=Y.apply(this,arguments);return(0,P.Z)(this,Z)}}ne.prototype.eventCapture=["change"];var ee=(function(p){(0,g.Z)(Z,p);var y=ye(Z);function Z(){var Y,q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},N=arguments.length>1?arguments[1]:void 0;(0,oe.Z)(this,Z),Y=y.call(this,q),(0,fe.Z)((0,I.Z)(Y),"reuseView",!0),Y.itemsView=N;var a=q.config||{},c=a.stylePrefix||"",C=q.editor;return Y.config=a,Y.em=C,Y.pfx=c,Y.ppfx=a.pStylePrefix||"",Y.className="".concat(c,"traits"),Y.listenTo(C,"component:toggled",Y.updatedCollection),Y.updatedCollection(),Y}return(0,W.Z)(Z,[{key:"updatedCollection",value:function(){var Y=this.ppfx,q=this.className,N=this.em.getSelected();this.el.className="".concat(q," ").concat(Y,"one-bg ").concat(Y,"two-color"),this.collection=N?N.get("traits"):[],this.render()}}]),Z})(A.Z);function O(p){var y=(function(){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}})();return function(){var Z,Y=(0,x.Z)(p);if(y){var q=(0,x.Z)(this).constructor;Z=Reflect.construct(Y,arguments,q)}else Z=Y.apply(this,arguments);return(0,P.Z)(this,Z)}}ee.prototype.itemView=ne;var j=ae().$,E=(function(p){(0,g.Z)(Z,p);var y=O(Z);function Z(){var Y,q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,oe.Z)(this,Z),(Y=y.call(this,q)).listenTo(Y.model,"change:options",Y.rerender),Y}return(0,W.Z)(Z,[{key:"templateInput",value:function(){var Y=this.ppfx,q=this.clsField;return'<div class="'.concat(q,`"> 226 <div data-input></div> 227 <div class="`).concat(Y,`sel-arrow"> 228 <div class="`).concat(Y,`d-s-arrow"></div> 229 </div> 230 </div>`)}},{key:"getInputEl",value:function(){if(!this.$input){var Y=this.model,q=this.em,N=Y.get("name"),a=Y.get("options")||[],c=[],C="<select>";a.forEach((function(Ce){var Se,me,xe,de="";(0,D.isString)(Ce)?(Se=Ce,me=Ce):(Se=Ce.name||Ce.label||Ce.value,me="".concat((0,D.isUndefined)(Ce.value)?Ce.id:Ce.value).replace(/"/g,"""),de+=(xe=Ce.style?Ce.style.replace(/"/g,"""):"")?' style="'.concat(xe,'"'):"");var Ee=q.t("traitManager.traits.options.".concat(N,".").concat(me))||Se;C+='<option value="'.concat(me,'"').concat(de,">").concat(Ee,"</option>"),c.push(me)}
230)),C+="</select>",this.$input=j(C);var Q=Y.getTargetValue(),pe=c.indexOf(Q)>=0?Q:Y.get("default");!(0,D.isUndefined)(pe)&&this.$input.val(pe)}return this.$input.get(0)}}]),Z})(ne);function B(p){var y=(function(){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}})();return function(){var Z,Y=(0,x.Z)(p);if(y){var q=(0,x.Z)(this).constructor;Z=Reflect.construct(Y,arguments,q)}else Z=Y.apply(this,arguments);return(0,P.Z)(this,Z)}}var X=(function(p){(0,g.Z)(Z,p);var y=B(Z);function Z(){var Y;(0,oe.Z)(this,Z);for(var q=arguments.length,N=new Array(q),a=0;a<q;a++)N[a]=arguments[a];return Y=y.call.apply(y,[this].concat(N)),(0,fe.Z)((0,I.Z)(Y),"appendInput",!1),Y}return(0,W.Z)(Z,[{key:"templateInput",value:function(){var Y=this.ppfx,q=this.clsField;return'<label class="'.concat(q,`" data-input> 231 <i class="`).concat(Y,`chk-icon"></i> 232 </label>`)}},{key:"onChange",value:function(){var Y=this.getInputElem().checked;this.model.set("value",this.getCheckedValue(Y))}},{key:"getCheckedValue",value:function(Y){var q=Y,N=this.model.attributes,a=N.valueTrue,c=N.valueFalse;return q&&!(0,D.isUndefined)(a)&&(q=a),q||(0,D.isUndefined)(c)||(q=c),q}},{key:"getInputEl",value:function(){for(var Y=!this.$input,q=arguments.length,N=new Array(q),a=0;a<q;a++)N[a]=arguments[a];var c=ne.prototype.getInputEl.apply(this,N);if(Y){var C,Q,pe=this.model,Ce=this.target,Se=pe.attributes,me=(Se.valueTrue,Se.valueFalse),xe=pe.get("name");pe.get("changeProp")?Q=C=Ce.get(xe):C=!(!(Q=Ce.get("attributes")[xe])&&Q!==""),(0,D.isUndefined)(me)||Q!==me||(C=!1),c.checked=C}return c}}]),Z})(ne),_=S(7610);function M(p){var y=(function(){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}})();return function(){var Z,Y=(0,x.Z)(p);if(y){var q=(0,x.Z)(this).constructor;Z=Reflect.construct(Y,arguments,q)}else Z=Y.apply(this,arguments);return(0,P.Z)(this,Z)}}var s=(function(p){(0,g.Z)(Z,p);var y=M(Z);function Z(){return(0,oe.Z)(this,Z),y.apply(this,arguments)}return(0,W.Z)(Z,[{key:"getValueForTarget",value:function(){var Y=this.model,q=Y.attributes,N=q.value,a=q.unit;return(0,D.isUndefined)(N)||N===""?Y.get("default"):N+a}},{key:"getInputEl",value:function(){if(!this.input){var Y=this.ppfx,q=this.model,N=this.getModelValue(),a=new _.Z({contClass:"".concat(Y,"field-int"),type:"number",model:q,ppfx:Y});this.input=a.render(),this.$input=this.input.inputEl,this.$unit=this.input.unitEl,q.set("value",N,{fromTarget:1}),this.$input.val(N),this.input=a.el}return this.input}}]),Z})(ne),l=S(1511);function f(p){var y=(function(){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}})();return function(){var Z,Y=(0,x.Z)(p);if(y){var q=(0,x.Z)(this).constructor;Z=Reflect.construct(Y,arguments,q)}else Z=Y.apply(this,arguments);return(0,P.Z)(this,Z)}}var w=(function(p){(0,g.Z)(Z,p);var y=f(Z);function Z(){var Y;(0,oe.Z)(this,Z);for(var q=arguments.length,N=new Array(q),a=0;a<q;a++)N[a]=arguments[a];return Y=y.call.apply(y,[this].concat(N)),(0,fe.Z)((0,I.Z)(Y),"templateInput",""),Y}return(0,W.Z)(Z,[{key:"getInputEl",value:function(){if(!this.input){var Y=this.model,q=this.getModelValue(),N=new l.Z({model:Y,target:this.config.em,contClass:this.ppfx+"field-color",ppfx:this.ppfx}).render();N.setValue(q,{fromTarget:1}),this.input=N.el}return this.input}}]),Z})(ne);function te(p){var y=(function(){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}})();return function(){var Z,Y=(0,x.Z)(p);if(y){var q=(0,x.Z)(this).constructor;Z=Reflect.construct(Y,arguments,q)}else Z=Y.apply(this,arguments);return(0,P.Z)(this,Z)}}var J=(function(p){(0,g.Z)(Z,p);var y=te(Z);function Z(){var Y;(0,oe.Z)(this,Z);for(var q=arguments.length,N=new Array(q),a=0;a<q;a++)N[a]=arguments[a];return Y=y.call.apply(y,[this].concat(N)),(0,fe.Z)((0,I.Z)(Y),"templateInput",""),Y}return(0,W.Z)(Z,[{key:"onChange",value:function(){this.handleClick()}},{key:"handleClick",value:function(){var Y=this.model,q=this.em,N=Y.get("command");N&&((0,D.isString)(N)?q.get("Commands").run(N):N(q.get("Editor"),Y))}},{key:"renderLabel",value:function(){this.model.get("label")&&ne.prototype.renderLabel.apply(this,arguments)}},{key:"getInputEl",value:function(){var Y=this.model,q=this.ppfx,N=Y.props(),a=N.labelButton,c=N.text,C=N.full,Q=a||c,pe="".concat(q,"btn");return'<button type="button" class="'.concat(pe,"-prim").concat(C?" ".concat(pe,"--full"):"",'">').concat(Q,"</button>")}}]),Z})(ne);function R(p,y){var Z=Object.keys(p);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(p);y&&(Y=Y.filter((function(q){return Object.getOwnPropertyDescriptor(p,q).enumerable}))),Z.push.apply(Z,Y)}return Z}function k(p){for(var y=1;y<arguments.length;y++){var Z=arguments[y]!=null?arguments[y]:{};
232y%2?R(Object(Z),!0).forEach((function(Y){(0,fe.Z)(p,Y,Z[Y])})):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(Z)):R(Object(Z)).forEach((function(Y){Object.defineProperty(p,Y,Object.getOwnPropertyDescriptor(Z,Y))}))}return p}J.prototype.eventCapture=["click button"];var v="trait",b="".concat(v,":"),h="".concat(b,"custom");const m=function(){var p={text:ne,number:s,select:E,checkbox:X,color:w,button:J};return k(k({},ie.Z),{},{TraitsView:ee,events:{all:v,custom:h},name:"TraitManager",init:function(){var y=this,Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.__initConfig(se,Z);var Y=this.config,q=new ce.Model;this.model=q;var N=this.em,a=Y.pStylePrefix;this.types=k({},p),a&&(Y.stylePrefix="".concat(a).concat(Y.stylePrefix));var c=(0,D.debounce)((function(){return y.__upSel()}));q.listenTo(N,"component:toggled",c);var C=(0,D.debounce)((function(){return y.__onUp()}));return q.listenTo(N,"trait:update",C),this},__upSel:function(){this.select(this.em.getSelected())},__onUp:function(){this.select(this.getSelected())},select:function(y){var Z=y?y.getTraits():[];this.model.set({component:y,traits:Z}),this.__trgCustom()},getSelected:function(){return this.model.get("component")||null},getCurrent:function(){return this.model.get("traits")||[]},__trgCustom:function(){var y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.__ctn=this.__ctn||y.container,this.em.trigger(this.events.custom,{container:this.__ctn})},postRender:function(){this.__appendTo()},getTraitsViewer:function(){return this.view},addType:function(y,Z){var Y=this.getType("text");this.types[y]=Y.extend(Z)},getType:function(y){return this.getTypes()[y]},getTypes:function(){return this.types},render:function(){var y=this.view,Z=this.getConfig(),Y=y&&y.el;return y=new ee({el:Y,collection:[],editor:Z.em,config:Z},this.getTypes()),this.view=y,y.el},destroy:function(){this.__destroy()}})}},8202:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>W});var fe=S(2982),D=S(4942),ie=S(3410),ce=S.n(ie),ae=S(9050);function se(I,g){var P=Object.keys(I);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(I);g&&(x=x.filter((function(A){return Object.getOwnPropertyDescriptor(I,A).enumerable}))),P.push.apply(P,x)}return P}function oe(I){for(var g=1;g<arguments.length;g++){var P=arguments[g]!=null?arguments[g]:{};g%2?se(Object(P),!0).forEach((function(x){(0,D.Z)(I,x,P[x])})):Object.getOwnPropertyDescriptors?Object.defineProperties(I,Object.getOwnPropertyDescriptors(P)):se(Object(P)).forEach((function(x){Object.defineProperty(I,x,Object.getOwnPropertyDescriptor(P,x))}))}return I}const W=function(){var I,g,P,x,A={maximumStackLength:500,trackSelection:1},$=function(z){return z.avoidStore||z.noUndo},re=function(z){return Object.keys(z.changedAttributes())};return{name:"UndoManager",init:function(){var z=this,F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};P=oe(oe({},A),F),I=P.em,this.em=I,P._disable&&(P=oe(oe({},P),{},{maximumStackLength:0}));var G=!0;return(g=new(ce())(oe({track:!0,register:[]},P))).changeUndoType("change",{condition:function(H){var ne=H.get("_undo");if(ne){var ye=H.get("_undoexc");if((0,ae.isArray)(ye)&&re(H).some((function(ee){return ye.indexOf(ee)>=0})))return!1;if((0,ae.isBoolean)(ne)||(0,ae.isArray)(ne)&&re(H).some((function(ee){return ne.indexOf(ee)>=0})))return!0}return!1},on:function(H,ne,ye){!x&&(x=H.previousAttributes());var ee=ye||ne||{};if(ee.noUndo&&setTimeout((function(){x=null})),!$(ee)){var O=H.toJSON({fromUndo:G}),j={object:H,before:x,after:O};if(x=null,!(0,ae.isEmpty)(O))return j}}}),g.changeUndoType("add",{on:function(H,ne){var ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!$(ye)&&z.isRegistered(ne))return{object:ne,before:void 0,after:H,options:oe(oe({},ye),{},{fromUndo:G})}}}),g.changeUndoType("remove",{on:function(H,ne){var ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!$(ye)&&z.isRegistered(ne))return{object:ne,before:H,after:void 0,options:oe(oe({},ye),{},{fromUndo:G})}}}),g.changeUndoType("reset",{undo:function(H,ne){H.reset(ne,{fromUndo:G})},redo:function(H,ne,ye){H.reset(ye,{fromUndo:G})},on:function(H){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!$(ne)&&z.isRegistered(H))return{object:H,before:ne.previousModels,after:(0,fe.Z)(H.models),options:oe(oe({},ne),{},{fromUndo:G})}}}
232),g.on("undo redo",(function(){I.trigger("change:canvasOffset"),I.getSelectedAll().map((function(H){return H.trigger("rerender:layer")}))})),["undo","redo"].forEach((function(H){return g.on(H,(function(){return I.trigger(H)}))})),this},postLoad:function(){P.trackSelection&&I&&this.add(I.get("selected"))},getConfig:function(){return P},add:function(z){return g.register(z),this},remove:function(z){return g.unregister(z),this},removeAll:function(){return g.unregisterAll(),this},start:function(){return g.startTracking(),this},stop:function(){return g.stopTracking(),this},undo:function(){var z=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return!I.isEditing()&&g.undo(z),this},undoAll:function(){return g.undoAll(),this},redo:function(){var z=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return!I.isEditing()&&g.redo(z),this},redoAll:function(){return g.redoAll(),this},hasUndo:function(){return g.isAvailable("undo")},hasRedo:function(){return g.isAvailable("redo")},isRegistered:function(z){return!!this.getInstance().objectRegistry.isRegistered(z)},getStack:function(){return g.stack},getStackGroup:function(){var z=[],F=[];return this.getStack().forEach((function(G){var H=G.get("magicFusionIndex");F.indexOf(H)<0&&(F.push(H),z.push(G))})),z},skip:function(z){this.stop(),z(),this.start()},getGroupedStack:function(){var z={},F=this.getStack();return F.forEach((function(G,H){var ne=G.get("magicFusionIndex"),ye=(function(ee,O){var j=ee.attributes,E=j.type,B=j.after,X=j.before,_=j.object,M=j.options;return{index:O,type:E,after:B,before:X,object:_,options:M===void 0?{}:M}})(G,H);z[ne]?z[ne].push(ye):z[ne]=[ye]})),Object.keys(z).map((function(G){var H=z[G];return{index:H[H.length-1].index,actions:H,labels:(0,ae.unique)(H.reduce((function(ne,ye){var ee,O=(ee=ye.options)===null||ee===void 0?void 0:ee.action;return O&&ne.push(O),ne}),[]))}}))},goToGroup:function(z){var F=this;if(z){var G=this.getPointer(),H=z.index-G;(0,ae.times)(Math.abs(H),(function(){F[H<0?"undo":"redo"](!1)}))}},getPointer:function(){return this.getStack().pointer},clear:function(){return g.clear(),this},getInstance:function(){return g},destroy:function(){this.clear().removeAll(),[I,g,P,x].forEach((function(z){return{}})),this.em={}}}}},5610:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>W});var fe=S(4942),D=S(5671),ie=S(3144),ce=S(9050),ae=S(1163);function se(I,g){var P=Object.keys(I);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(I);g&&(x=x.filter((function(A){return Object.getOwnPropertyDescriptor(I,A).enumerable}))),P.push.apply(P,x)}return P}function oe(I){for(var g=1;g<arguments.length;g++){var P=arguments[g]!=null?arguments[g]:{};g%2?se(Object(P),!0).forEach((function(x){(0,fe.Z)(I,x,P[x])})):Object.getOwnPropertyDescriptors?Object.defineProperties(I,Object.getOwnPropertyDescriptors(P)):se(Object(P)).forEach((function(x){Object.defineProperty(I,x,Object.getOwnPropertyDescriptor(P,x))}))}return I}var W=(function(){function I(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,D.Z)(this,I),this.opts={container:null,onStart:null,onDrag:null,onEnd:null,setPosition:null,getPosition:null,guidesStatic:null,guidesTarget:null,snapOffset:5,doc:0,scale:1},(0,ce.bindAll)(this,"drag","stop","keyHandle","handleScroll"),this.setOptions(g),this.delta={x:0,y:0},this}return(0,ie.Z)(I,[{key:"setOptions",value:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.opts=oe(oe({},this.opts),g)}},{key:"toggleDrag",value:function(g){var P=this.getDocumentEl(),x=this.getContainerEl(),A=this.getWindowEl(),$=g?"on":"off",re={on:ae.on,off:ae.off};re[$](x,"mousemove dragover",this.drag),re[$](P,"mouseup dragend touchend",this.stop),re[$](P,"keydown",this.keyHandle),re[$](A,"scroll",this.handleScroll)}},{key:"handleScroll",value:function(){var g=this.lastScroll,P=this.delta,x=this.getScrollInfo(),A={x:x.x-g.x,y:x.y-g.y};this.move(P.x+A.x,P.y+A.y),this.lastScrollDiff=A}},{key:"start",value:function(g){var P=this.opts,x=P.onStart;this.toggleDrag(1),this.startPointer=this.getPointerPos(g),this.guidesStatic=(0,ce.result)(P,"guidesStatic")||[],this.guidesTarget=(0,ce.result)(P,"guidesTarget")||[],(0,ce.isFunction)(x)&&x(g,this),this.startPosition=this.getStartPosition(),this.lastScrollDiff={x:0,y:0},this.globScrollDiff={x:0,y:0},this.drag(g)}},{key:"drag",value:function(g){var P=this,x=this.opts,A=this.lastScrollDiff,$=this.globScrollDiff,re=x.onDrag,z=this.startPointer,F=this.getPointerPos(g),G={x:$.x+A.x,y:$.y+A.y};this.globScrollDiff=G;var H={x:F.x-z.x+G.x,y:F.y-z.y+G.y};this.lastScrollDiff={x:0,y:0};var ne=this.lockedAxis;(ne=g.shiftKey?!ne&&this.detectAxisLock(H.x,H.y):null)==="x"?H.x=z.x:ne==="y"&&(H.y=z.y);var ye=function(X){["x","y"].forEach((function(_){return X[_]=X[_]*(0,ce.result)(x,"scale")})),P.delta=X,P.move(X.x,X.y),(0,ce.isFunction)(re)&&re(g,P)},ee=oe({},H);if(this.currentPointer=F,this.lockedAxis=ne,this.lastScroll=this.getScrollInfo(),ye(H),this.guidesTarget.length){var O=this.snapGuides(ee),j=O.newDelta,E=O.trgX,B=O.trgY;(E||B)&&ye(j)}g.which===0&&this.stop(g)}},{key:"snapGuides",value:function(g){var P=this,x=g,A=this.trgX,$=this.trgY;return this.guidesTarget.forEach((function(re){re.x&&P.trgX||re.y&&P.trgY||(re.active=0,P.guidesStatic.forEach((function(z){if(!(re.y&&z.x||re.x&&z.y)){var F=re.y&&z.y,G=F?"y":"x",H=re[G],ne=z[G],ye=g[G],ee=F?$:A;if(P.isPointIn(H,ne)&&(0,ce.isUndefined)(ee)){var O=ye-(H-ne);P.setGuideLock(re,O)}}})))})),A=this.trgX,$=this.trgY,["x","y"].forEach((function(re){var z=re.toUpperCase(),F=P["trg".concat(z)];F&&!P.isPointIn(g[re],F.lock)&&(P.setGuideLock(F,null),F=null),F&&!(0,ce.isUndefined)(F.lock)&&(x[re]=F.lock)})),{newDelta:x,trgX:this.trgX,trgY:this.trgY}}},{key:"isPointIn",value:function(g,P){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},A=x.offset,$=A||this.opts.snapOffset;return g>=P&&g<=P+$||g<=P&&g>=P-$}},{key:"setGuideLock",value:function(g,P){var x=(0,ce.isUndefined)(g.x)?"Y":"X",A="trg".concat(x);return P!==null?(g.active=1,g.lock=P,this[A]=g):(delete g.active,delete g.lock,delete this[A]),g}},{key:"stop",value:function(g){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x=this.delta,A=P.cancel,$=A?0:x.x,re=A?0:x.y;this.toggleDrag(),this.lockedAxis=null,this.move($,re,1);var z=this.opts.onEnd;(0,ce.isFunction)(z)&&z(g,this,{cancelled:A})}},{key:"keyHandle",value:function(g){(0,ae.isEscKey)(g)&&this.stop(g,{c
232ancel:1})}},{key:"move",value:function(g,P,x){var A=this.el,$=this.opts,re=this.startPosition;if(re){var z=$.setPosition,F=re.x+g,G=re.y+P;this.position={x:F,y:G,end:x},(0,ce.isFunction)(z)&&z(this.position),A&&(A.style.left="".concat(F,"px"),A.style.top="".concat(G,"px"))}}},{key:"getContainerEl",value:function(){var g=this.opts.container;return g?[g]:this.getDocumentEl()}},{key:"getWindowEl",value:function(){return this.getContainerEl().map((function(g){var P=g.ownerDocument||g;return P.defaultView||P.parentWindow}))}},{key:"getDocumentEl",value:function(g){var P=this.opts.doc;if(g=g||this.el,!this.docs){var x=[document];g&&x.push(g.ownerDocument),P&&x.push(P),this.docs=x}return this.docs}},{key:"getPointerPos",value:function(g){var P=this.opts.getPointerPosition,x=(0,ae.getPointerEvent)(g);return P?P(g):{x:x.clientX,y:x.clientY}}},{key:"getStartPosition",value:function(){var g=this.el,P=this.opts.getPosition,x={x:0,y:0};return(0,ce.isFunction)(P)?x=P():g&&(x={x:parseFloat(g.style.left),y:parseFloat(g.style.top)}),x}},{key:"getScrollInfo",value:function(){var g=this.opts.doc,P=g&&g.body;return{y:P?P.scrollTop:0,x:P?P.scrollLeft:0}}},{key:"detectAxisLock",value:function(g,P){var x=g,A=P,$=Math.abs(x),re=Math.abs(A);return A>=$||A<=-$?"x":x>re||x<-re?"y":void 0}}]),I})()},2579:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>_t});var fe=typeof document<"u"?document:null,D=typeof window<"u"?window:null,ie=Array.prototype,ce=ie.filter,ae=ie.indexOf,se=ie.map,oe=ie.push,W=ie.reverse,I=ie.slice,g=ie.splice,P=/^#[\w-]*$/,x=/^\.[\w-]*$/,A=/<.+>/,$=/^\w+$/;function re(Oe,De){return De===void 0&&(De=fe),x.test(Oe)?De.getElementsByClassName(Oe.slice(1)):$.test(Oe)?De.getElementsByTagName(Oe):De.querySelectorAll(Oe)}function z(Oe,De){if(De===void 0&&(De=fe),Oe){if(Oe.__cash)return Oe;var Ze=Oe;if(B(Oe)){if(De.__cash&&(De=De[0]),!(Ze=P.test(Oe)?De.getElementById(Oe.slice(1)):A.test(Oe)?bt(Oe):re(Oe,De)))return}else if(E(Oe))return this.ready(Oe);(Ze.nodeType||Ze===D)&&(Ze=[Ze]),this.length=Ze.length;for(var Ue=0,rt=this.length;Ue<rt;Ue++)this[Ue]=Ze[Ue]}}function F(Oe,De){return new z(Oe,De)}var G=F.fn=F.prototype=z.prototype={constructor:F,__cash:!0,length:0,splice:g};G.get=function(Oe){return Oe===void 0?I.call(this):this[Oe<0?Oe+this.length:Oe]},G.eq=function(Oe){return F(this.get(Oe))},G.first=function(){return this.eq(0)},G.last=function(){return this.eq(-1)},G.map=function(Oe){return F(se.call(this,(function(De,Ze){return Oe.call(De,Ze,De)})))},G.slice=function(){return F(I.apply(this,arguments))};var H=/(?:^\w|[A-Z]|\b\w)/g,ne=/[\s-_]+/g;function ye(Oe){return Oe.replace(H,(function(De,Ze){return De[Ze?"toUpperCase":"toLowerCase"]()})).replace(ne,"")}function ee(Oe,De){for(var Ze=0,Ue=Oe.length;Ze<Ue&&De.call(Oe[Ze],Oe[Ze],Ze,Oe)!==!1;Ze++);}F.camelCase=ye,F.each=ee,G.each=function(Oe){return ee(this,(function(De,Ze){return Oe.call(De,Ze,De)})),this},G.removeProp=function(Oe){return this.each((function(De,Ze){delete Ze[Oe]}))},F.extend=G.extend=function(Oe){Oe===void 0&&(Oe=this);for(var De=arguments,Ze=De.length,Ue=Ze<2?0:1;Ue<Ze;Ue++)for(var rt in De[Ue])Oe[rt]=De[Ue][rt];return Oe};var O=1;function j(Oe,De){var Ze=Oe&&(Oe.matches||Oe.webkitMatchesSelector||Oe.mozMatchesSelector||Oe.msMatchesSelector||Oe.oMatchesSelector);return!!Ze&&Ze.call(Oe,De)}function E(Oe){return typeof Oe=="function"}function B(Oe){return typeof Oe=="string"}function X(Oe){return!isNaN(parseFloat(Oe))&&isFinite(Oe)}F.guid=O,F.matches=j,F.isFunction=E,F.isString=B,F.isNumeric=X;var _=Array.isArray;function M(Oe){return B(Oe)?function(De,Ze){return j(Ze,Oe)}:Oe.__cash?function(De,Ze){return Oe.is(Ze)}:function(De,Ze,Ue){return Ze===Ue}}F.isArray=_,G.prop=function(Oe,De){if(Oe){if(B(Oe))return arguments.length<2?this[0]&&this[0][Oe]:this.each((function(Ue,rt){rt[Oe]=De}));for(var Ze in Oe)this.prop(Ze,Oe[Ze]);return this}},G.filter=function(Oe){if(!Oe)return F();var De=E(Oe)?Oe:M(Oe);return F(ce.call(this,(function(Ze,Ue){return De.call(Ze,Ue,Ze,Oe)})))};var s=/\S+/g;function l(Oe){return B(Oe)&&Oe.match(s)||[]}function f(Oe){return Oe.filter((function(De,Ze,Ue){return Ue.indexOf(De)===Ze}))}function w(Oe,De,Ze){if(Oe.nodeType===1){var Ue=D.getComputedStyle(Oe,null);return De?Ze?Ue.getPropertyValue(De):Ue[De]:Ue}}function te(Oe,De){return parseInt(w(Oe,De),10)||0}G.hasClass=function(Oe){var De=l(Oe),Ze=!1;return De.length&&this.each((function(Ue,rt){return!(Ze=rt.classList.contains(De[0]))})),Ze},G.removeAttr=function(Oe){var De=l(Oe);return De.length?this.each((function(Ze,Ue){ee(De,(function(rt){Ue.removeAttribute(rt)}
232))})):this},G.attr=function(Oe,De){if(Oe){if(B(Oe)){if(arguments.length<2){if(!this[0])return;var Ze=this[0].getAttribute(Oe);return Ze===null?void 0:Ze}return De===null?this.removeAttr(Oe):this.each((function(rt,Te){Te.setAttribute(Oe,De)}))}for(var Ue in Oe)this.attr(Ue,Oe[Ue]);return this}},G.toggleClass=function(Oe,De){var Ze=l(Oe),Ue=De!==void 0;return Ze.length?this.each((function(rt,Te){ee(Ze,(function(Ne){Ue?De?Te.classList.add(Ne):Te.classList.remove(Ne):Te.classList.toggle(Ne)}))})):this},G.addClass=function(Oe){return this.toggleClass(Oe,!0)},G.removeClass=function(Oe){return arguments.length?this.toggleClass(Oe,!1):this.attr("class","")},F.unique=f,G.add=function(Oe,De){return F(f(this.get().concat(F(Oe,De).get())))};var J=/^--/;function R(Oe){return J.test(Oe)}var k={},v=fe&&fe.createElement("div"),b=v?v.style:{},h=["webkit","moz","ms","o"];function m(Oe,De){if(De===void 0&&(De=R(Oe)),De)return Oe;if(!k[Oe]){var Ze=ye(Oe),Ue=""+Ze.charAt(0).toUpperCase()+Ze.slice(1);ee((Ze+" "+h.join(Ue+" ")+Ue).split(" "),(function(rt){if(rt in b)return k[Oe]=rt,!1}))}return k[Oe]}F.prefixedProp=m;var p={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function y(Oe,De,Ze){return Ze===void 0&&(Ze=R(Oe)),Ze||p[Oe]||!X(De)?De:De+"px"}G.css=function(Oe,De){if(B(Oe)){var Ze=R(Oe);return Oe=m(Oe,Ze),arguments.length<2?this[0]&&w(this[0],Oe,Ze):Oe?(De=y(Oe,De,Ze),this.each((function(rt,Te){Te.nodeType===1&&(Ze?Te.style.setProperty(Oe,De):Te.style[Oe]=De)}))):this}for(var Ue in Oe)this.css(Ue,Oe[Ue]);return this};var Z="__cashData",Y=/^data-(.*)/;function q(Oe){return Oe[Z]=Oe[Z]||{}}function N(Oe,De){var Ze=q(Oe);if(De){if(!(De in Ze)){var Ue=Oe.dataset?Oe.dataset[De]||Oe.dataset[ye(De)]:F(Oe).attr("data-"+De);if(Ue!==void 0){try{Ue=JSON.parse(Ue)}catch{}Ze[De]=Ue}}return Ze[De]}return Ze}function a(Oe,De){return te(Oe,"border"+(De?"Left":"Top")+"Width")+te(Oe,"padding"+(De?"Left":"Top"))+te(Oe,"padding"+(De?"Right":"Bottom"))+te(Oe,"border"+(De?"Right":"Bottom")+"Width")}function c(Oe,De){for(var Ze=0,Ue=De.length;Ze<Ue;Ze++)if(Oe.indexOf(De[Ze])<0)return!1;return!0}function C(Oe,De,Ze){ee(Oe[Ze],(function(Ue){Ue[0];var rt=Ue[1];De.removeEventListener(Ze,rt)})),delete Oe[Ze]}F.hasData=function(Oe){return Z in Oe},G.data=function(Oe,De){var Ze=this;if(!Oe)return this[0]?(ee(this[0].attributes,(function(rt){var Te=rt.name.match(Y);Te&&Ze.data(Te[1])})),N(this[0])):void 0;if(B(Oe))return De===void 0?this[0]&&N(this[0],Oe):this.each((function(rt,Te){return(function(Ne,$e,at){q(Ne)[$e]=at})(Te,Oe,De)}));for(var Ue in Oe)this.data(Ue,Oe[Ue]);return this},G.removeData=function(Oe){return this.each((function(De,Ze){return(function(Ue,rt){rt===void 0?delete Ue[Z]:delete q(Ue)[rt]})(Ze,Oe)}))},ee(["Width","Height"],(function(Oe){G["inner"+Oe]=function(){if(this[0])return this[0]===D?D["inner"+Oe]:this[0]["client"+Oe]}})),ee(["width","height"],(function(Oe,De){G[Oe]=function(Ze){return this[0]?arguments.length?(Ze=parseInt(Ze,10),this.each((function(Ue,rt){if(rt.nodeType===1){var Te=w(rt,"boxSizing");rt.style[Oe]=y(Oe,Ze+(Te==="border-box"?a(rt,!De):0))}}))):this[0]===D?this[0][ye("outer-"+Oe)]:this[0].getBoundingClientRect()[Oe]-a(this[0],!De):Ze===void 0?void 0:this}})),ee(["Width","Height"],(function(Oe,De){G["outer"+Oe]=function(Ze){if(this[0])return this[0]===D?D["outer"+Oe]:this[0]["offset"+Oe]+(Ze?te(this[0],"margin"+(De?"Top":"Left"))+te(this[0],"margin"+(De?"Bottom":"Right")):0)}}));var Q="__cashEvents",pe=".";function Ce(Oe){return Oe[Q]=Oe[Q]||{}}function Se(Oe){var De=Oe.split(pe);return[De[0],De.slice(1).sort()]}function me(Oe,De,Ze,Ue){var rt=Ce(Oe);if(De){var Te=rt[De];if(!Te)return;Ue&&(Ue.guid=Ue.guid||O++),rt[De]=Te.filter((function(Ne){var $e=Ne[0],at=Ne[1];if(Ue&&at.guid!==Ue.guid||!c($e,Ze))return!0;Oe.removeEventListener(De,at)}))}else if(Ze&&Ze.length)for(De in rt)me(Oe,De,Ze,Ue);else for(De in rt)C(rt,Oe,De)}G.off=function(Oe,De){var Ze=this;return Oe===void 0?this.each((function(Ue,rt){return me(rt)})):ee(l(Oe),(function(Ue){var rt=Se(Ue),Te=rt[0],Ne=rt[1];Ze.each((function($e,at){return me(at,Te,Ne,De)}))})),this},G.on=function(Oe,De,Ze,Ue){var rt=this;if(!B(Oe)){for(var Te in Oe)this.on(Te,De,Oe[Te]);return this}return E(De)&&(Ze=De,De=!1),ee(l(Oe),(function(Ne){var $e=Se(Ne),at=$e[0],tt=$e[1];rt.each((function(wt,it){var Rt=function Ut($t){if(!$t.namespace||c(tt,$t.namespace.split(pe))){var Yt=it;if(De){for(var Xt=$t.target;!j(Xt,De);)if(Xt===it||!(Xt=Xt.parentNode))return;Yt=Xt}$t.namespace=$t.namespace||"";var Bt=Ze.call(Yt,$t,$t.data);Ue&&me(it,at,tt,Ut),Bt===!1&&($t.preventDefault(),$t.stopPropagation())}};Rt.guid=Ze.guid=Ze.guid||O++,(function(Ut,$t,Yt,Xt){Xt.guid=Xt.guid||O++;var Bt=Ce(Ut);Bt[$t]=Bt[$t]||[],Bt[$t].push([Yt,Xt]),Ut.addEventListener($t,Xt)})(it,at,tt,Rt)}))})),this},G.one=function(Oe,De,Ze){return this.on(Oe,De,Ze,!0)},G.ready=function(Oe){var De=function(){return Oe(F)};return fe.readyState!=="loading"?setTimeout(De):fe.addEventListener("DOMContentLoaded",De),this},G.trigger=function(Oe,De){var Ze=Oe;if(B(Oe)){var Ue=Se(Oe),rt=Ue[0],Te=Ue[1];(Ze=fe.createEvent("HTMLEvents")).initEvent(rt,!0,!0),Ze.namespace=Te.join(pe)}return Ze.data=De,this.each((function(Ne,$e){$e.dispatchEvent(Ze)}))};var xe=/select-one/i,de=/select-multiple/i;function Ee(Oe){var De=Oe.type;return xe.test(De)?(function(Ze){return Ze.selectedIndex<0?null:Ze.options[Ze.selectedIndex].value})(Oe):de.test(De)?(function(Ze){var Ue=[];
232return ee(Ze.options,(function(rt){!rt.selected||rt.disabled||rt.parentNode.disabled||Ue.push(rt.value)})),Ue})(Oe):Oe.value}var Fe=/%20/g,He=/file|reset|submit|button|image/i,et=/radio|checkbox/i;G.serialize=function(){var Oe="";return this.each((function(De,Ze){ee(Ze.elements||[Ze],(function(Ue){if(!Ue.disabled&&Ue.name&&Ue.tagName!=="FIELDSET"&&!He.test(Ue.type)&&(!et.test(Ue.type)||Ue.checked)){var rt=Ee(Ue);rt!==void 0&&ee(_(rt)?rt:[rt],(function(Te){Oe+=(function(Ne,$e){return"&"+encodeURIComponent(Ne)+"="+encodeURIComponent($e).replace(Fe,"+")})(Ue.name,Te)}))}}))})),Oe.substr(1)},G.val=function(Oe){return Oe===void 0?this[0]&&Ee(this[0]):this.each((function(De,Ze){var Ue=de.test(Ze.type),rt=Oe===null?Ue?[]:"":Oe;Ue&&_(rt)?ee(Ze.options,(function(Te){Te.selected=rt.indexOf(Te.value)>=0})):Ze.value=rt}))},G.clone=function(){return this.map((function(Oe,De){return De.cloneNode(!0)}))},G.detach=function(){return this.each((function(Oe,De){De.parentNode&&De.parentNode.removeChild(De)}))};var Ge,yt=/^\s*<(\w+)[^>]*>/,St=/^\s*<(\w+)\s*\/?>(?:<\/\1>)?\s*$/;function bt(Oe){if((function(){if(!Ge){var Ue=fe.createElement("table"),rt=fe.createElement("tr");Ge={"*":fe.createElement("div"),tr:fe.createElement("tbody"),td:rt,th:rt,thead:Ue,tbody:Ue,tfoot:Ue}}})(),!B(Oe))return[];if(St.test(Oe))return[fe.createElement(RegExp.$1)];var De=yt.test(Oe)&&RegExp.$1,Ze=Ge[De]||Ge["*"];return Ze.innerHTML=Oe,F(Ze.childNodes).detach().get()}function Jt(Oe,De,Ze){if(De!==void 0){var Ue=B(De);!Ue&&De.length?ee(De,(function(rt){return Jt(Oe,rt,Ze)})):ee(Oe,Ue?function(rt){rt.insertAdjacentHTML(Ze?"afterbegin":"beforeend",De)}:function(rt,Te){return(function(Ne,$e,at){at?Ne.insertBefore($e,Ne.childNodes[0]):Ne.appendChild($e)})(rt,Te?De.cloneNode(!0):De,Ze)})}}F.parseHTML=bt,G.empty=function(){var Oe=this[0];if(Oe)for(;Oe.firstChild;)Oe.removeChild(Oe.firstChild);return this},G.append=function(){var Oe=this;return ee(arguments,(function(De){Jt(Oe,De)})),this},G.appendTo=function(Oe){return Jt(F(Oe),this),this},G.html=function(Oe){if(Oe===void 0)return this[0]&&this[0].innerHTML;var De=Oe.nodeType?Oe[0].outerHTML:Oe;return this.each((function(Ze,Ue){Ue.innerHTML=De}))},G.insertAfter=function(Oe){var De=this;return F(Oe).each((function(Ze,Ue){var rt=Ue.parentNode;De.each((function(Te,Ne){rt.insertBefore(Ze?Ne.cloneNode(!0):Ne,Ue.nextSibling)}))})),this},G.after=function(){var Oe=this;return ee(W.apply(arguments),(function(De){W.apply(F(De).slice()).insertAfter(Oe)})),this},G.insertBefore=function(Oe){var De=this;return F(Oe).each((function(Ze,Ue){var rt=Ue.parentNode;De.each((function(Te,Ne){rt.insertBefore(Ze?Ne.cloneNode(!0):Ne,Ue)}))})),this},G.before=function(){var Oe=this;return ee(arguments,(function(De){F(De).insertBefore(Oe)})),this},G.prepend=function(){var Oe=this;return ee(arguments,(function(De){Jt(Oe,De,!0)})),this},G.prependTo=function(Oe){return Jt(F(Oe),W.apply(this.slice()),!0),this},G.remove=function(){return this.detach().off()},G.replaceWith=function(Oe){var De=this;return this.each((function(Ze,Ue){var rt=Ue.parentNode;if(rt){var Te=Ze?F(Oe).clone():F(Oe);if(!Te[0])return De.remove(),!1;rt.replaceChild(Te[0],Ue),F(Te[0]).after(Te.slice(1))}}))},G.replaceAll=function(Oe){return F(Oe).replaceWith(this),this},G.text=function(Oe){return Oe===void 0?this[0]?this[0].textContent:"":this.each((function(De,Ze){Ze.textContent=Oe}))};var mt=fe&&fe.documentElement;G.offset=function(){var Oe=this[0];if(Oe){var De=Oe.getBoundingClientRect();return{top:De.top+D.pageYOffset-mt.clientTop,left:De.left+D.pageXOffset-mt.clientLeft}}},G.offsetParent=function(){return F(this[0]&&this[0].offsetParent)},G.position=function(){var Oe=this[0];if(Oe)return{left:Oe.offsetLeft,top:Oe.offsetTop}},G.children=function(Oe){var De=[];return this.each((function(Ze,Ue){oe.apply(De,Ue.children)})),De=F(f(De)),Oe?De.filter((function(Ze,Ue){return j(Ue,Oe)})):De},G.contents=function(){var Oe=[];return this.each((function(De,Ze){oe.apply(Oe,Ze.tagName==="IFRAME"?[Ze.contentDocument]:Ze.childNodes)})),F(Oe.length&&f(Oe))},G.find=function(Oe){for(var De=[],Ze=0,Ue=this.length;Ze<Ue;Ze++){var rt=re(Oe,this[Ze]);rt.length&&oe.apply(De,rt)}return F(De.length&&f(De))},G.has=function(Oe){var De=B(Oe)?function(Ze,Ue){return!!re(Oe,Ue).length}:function(Ze,Ue){return Ue.contains(Oe)};return this.filter(De)},G.is=function(Oe){if(!Oe||!this[0])return!1;var De=M(Oe),Ze=!1;return this.each((function(Ue,rt){return!(Ze=De(Ue,rt,Oe))})),Ze},G.next=function(){return F(this[0]&&this[0].nextElementSibling)},G.not=function(Oe){if(!Oe||!this[0])return this;var De=M(Oe);return this.filter((function(Ze,Ue){return!De(Ze,Ue,Oe)}))},G.parent=function(){var Oe=[];return this.each((function(De,Ze){Ze&&Ze.parentNode&&Oe.push(Ze.parentNode)})),F(f(Oe))},G.index=function(Oe){var De=Oe?F(Oe)[0]:this[0],Ze=Oe?this:F(De).parent().children();return ae.call(Ze,De)},G.closest=function(Oe){return Oe&&this[0]?this.is(Oe)?this.filter(Oe):this.parent().closest(Oe):F()},G.parents=function(Oe){var De,Ze=[];return this.each((function(Ue,rt){for(De=rt;De&&De.parentNode&&De!==fe.body.parentNode;)De=De.parentNode,(!Oe||Oe&&j(De,Oe))&&Ze.push(De)})),F(f(Ze))},G.prev=function(){return F(this[0]&&this[0].previousElementSibling)},G.siblings=function(){var Oe=this[0];return this.parent().children().filter((function(De,Ze){return Ze!==Oe}))};const _t=F},9283:(We,ke,S)=>{"use strict";S.d(ke,{$Q:()=>P,FW:()=>W,G1:()=>ce,L_:()=>se,Mx:()=>ae,R3:()=>x,SJ:()=>z,dL:()=>g,pn:()=>I,rw:()=>$,sE:()=>oe,t3:()=>re,ut:()=>A});var fe=S(9050),D="tag",ie="attributes",ce="transitionend oTransitionEnd transitionend webkitTransitionEnd",ae
232=function(F){return F&&F.nodeType===9},se=function(F){var G=F&&F.parentNode;G&&G.removeChild(F)},oe=function(F,G){return F.querySelectorAll(G)},W=function(F){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return F&&F.setAttribute&&(0,fe.each)(G,(function(H,ne){return F.setAttribute(ne,H)}))},I=function(F){return F&&!!(F.offsetWidth||F.offsetHeight||F.getClientRects().length)},g=function(F,G){F.parentNode.replaceChild(G,F)},P=function(F,G,H){var ne=F.childNodes,ye=ne.length,ee=(0,fe.isUndefined)(H)?ye:H;(0,fe.isString)(G)&&(F.insertAdjacentHTML("beforeEnd",G),G=F.lastChild,F.removeChild(G)),ee>=ye?F.appendChild(G):F.insertBefore(G,ne[ee])},x=function(F,G){return P(F,G)},A=function(F){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=arguments.length>2?arguments[2]:void 0,ne=document.createElement(F);return G&&(0,fe.each)(G,(function(ye,ee){return ne.setAttribute(ee,ye)})),H&&((0,fe.isString)(H)?ne.innerHTML=H:ne.appendChild(H)),ne},$=function(F){return document.createTextNode(F)},re=function(F,G){var H,ne=F.type;try{H=new window[G](ne,F)}catch{(H=document.createEvent(G)).initEvent(ne,!0,!0)}return H._parentEvent=F,ne.indexOf("key")===0&&(H.keyCodeVal=F.keyCode,["keyCode","which"].forEach((function(ye){Object.defineProperty(H,ye,{get:function(){return this.keyCodeVal}})}))),H},z=function(F){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],H=Array.isArray(G)?G:[G];H.forEach((function(ne){var ye=ne[D]||"div",ee=ne[ie]||{},O=document.createElement(ye);(0,fe.each)(ee,(function(j,E){O.setAttribute(E,j)})),F.appendChild(O)}))}},9661:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>re});var fe=S(1002);const D=function(z){var F=this.constructor;return this.then((function(G){return F.resolve(z()).then((function(){return G}))}),(function(G){return F.resolve(z()).then((function(){return F.reject(G)}))}))},ie=function(z){return new this((function(F,G){if(!z||z.length===void 0)return G(new TypeError((0,fe.Z)(z)+" "+z+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var H=Array.prototype.slice.call(z);if(H.length===0)return F([]);var ne=H.length;function ye(O,j){if(j&&((0,fe.Z)(j)==="object"||typeof j=="function")){var E=j.then;if(typeof E=="function")return void E.call(j,(function(B){ye(O,B)}),(function(B){H[O]={status:"rejected",reason:B},--ne==0&&F(H)}))}H[O]={status:"fulfilled",value:j},--ne==0&&F(H)}for(var ee=0;ee<H.length;ee++)ye(ee,H[ee])}))};var ce=setTimeout;function ae(z){return!!(z&&z.length!==void 0)}function se(){}function oe(z){if(!(this instanceof oe))throw new TypeError("Promises must be constructed via new");if(typeof z!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],A(z,this)}function W(z,F){for(;z._state===3;)z=z._value;z._state!==0?(z._handled=!0,oe._immediateFn((function(){var G=z._state===1?F.onFulfilled:F.onRejected;if(G!==null){var H;try{H=G(z._value)}catch(ne){return void g(F.promise,ne)}I(F.promise,H)}else(z._state===1?I:g)(F.promise,z._value)}))):z._deferreds.push(F)}function I(z,F){try{if(F===z)throw new TypeError("A promise cannot be resolved with itself.");if(F&&((0,fe.Z)(F)==="object"||typeof F=="function")){var G=F.then;if(F instanceof oe)return z._state=3,z._value=F,void P(z);if(typeof G=="function")return void A((H=G,ne=F,function(){H.apply(ne,arguments)}),z)}z._state=1,z._value=F,P(z)}catch(ye){g(z,ye)}var H,ne}function g(z,F){z._state=2,z._value=F,P(z)}function P(z){z._state===2&&z._deferreds.length===0&&oe._immediateFn((function(){z._handled||oe._unhandledRejectionFn(z._value)}));for(var F=0,G=z._deferreds.length;F<G;F++)W(z,z._deferreds[F]);z._deferreds=null}function x(z,F,G){this.onFulfilled=typeof z=="function"?z:null,this.onRejected=typeof F=="function"?F:null,this.promise=G}function A(z,F){var G=!1;try{z((function(H){G||(G=!0,I(F,H))}),(function(H){G||(G=!0,g(F,H))}))}catch(H){if(G)return;G=!0,g(F,H)}}oe.prototype.catch=function(z){return this.then(null,z)},oe.prototype.then=function(z,F){var G=new this.constructor(se);return W(this,new x(z,F,G)),G},oe.prototype.finally=D,oe.all=function(z){return new oe((function(F,G){if(!ae(z))return G(new TypeError("Promise.all accepts an array"));var H=Array.prototype.slice.call(z);if(H.length===0)return F([]);var ne=H.length;function ye(O,j){try{if(j&&((0,fe.Z)(j)==="object"||typeof j=="function")){var E=j.then;if(typeof E=="function")return void E.call(j,(function(B){ye(O,B)}),G)}H[O]=j,--ne==0&&F(H)}catch(B){G(B)}}for(var ee=0;ee<H.length;ee++)ye(ee,H[ee])}))},oe.allSettled=ie,oe.resolve=function(z){return z&&(0,fe.Z)(z)==="object"&&z.constructor===oe?z:new oe((function(F){F(z)}))},oe.reject=function(z){return new oe((function(F,G){G(z)}))},oe.race=function(z){return new oe((function(F,G){if(!ae(z))return G(new TypeError("Promise.race accepts an array"));for(var H=0,ne=z.length;H<ne;H++)oe.resolve(z[H]).then(F,G)}))},oe._immediateFn=typeof setImmediate=="function"&&function(z){setImmediate(z)}||function(z){ce(z,0)},oe._unhandledRejectionFn=function(z){typeof console<"u"&&console&&console.warn("Possible Unhandled Promise Rejection:",z)};const $=oe;(0,S(1163).hasWin)()&&(window.Promise=window.Promise||$);const re=typeof fetch=="function"?fetch.bind():function(z,F){return new $((function(G,H){var ne=new XMLHttpRequest;for(var ye in ne.open(F.method||"get",z),ne.withCredentials=F.credentials=="include",F.headers||{})ne.setRequestHeader(ye,F.headers[ye]);ne.onload=function(ee){return G({status:ne.status,statusText:ne.statusText,text:function(){return $.resolve(ne.responseText)}})},ne.onerror=H,ne.upload&&F.onProgress&&(ne.upload.onprogress=F.onProgress),F.body?ne.send(F.body):ne.send()}))}},6718:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>ee});var fe=S(4942),D=S(5610),ie=S(2316),ce=S.n(ie),ae=S(9050),se=S(1163);function oe(O,j){var E=Object.keys(O);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(O);j&&(B=B.filter((function(X){return Object.getOwnPropertyDescriptor(O,X).enumerable}))),E.push.apply(E,B)}return E}function W(O){for(var j=1;j<arguments.length;j++){var E=arguments[j]!=null?arguments[j]:{};
232j%2?oe(Object(E),!0).forEach((function(B){(0,fe.Z)(O,B,E[B])})):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(E)):oe(Object(E)).forEach((function(B){Object.defineProperty(O,B,Object.getOwnPropertyDescriptor(E,B))}))}return O}var I=ce().$,g=function(){};const P=ce().View.extend({initialize:function(O){this.opt=O||{},(0,ae.bindAll)(this,"startSort","onMove","endMove","rollback","updateOffset","moveDragHelper");var j=O||{};this.elT=0,this.elL=0,this.borderOffset=j.borderOffset||10;var E=j.container;this.el=typeof E=="string"?document.querySelector(E):E,this.$el=I(this.el),this.containerSel=j.containerSel||"div",this.itemSel=j.itemSel||"div",this.draggable=j.draggable||!0,this.nested=j.nested||0,this.pfx=j.pfx||"",this.ppfx=j.ppfx||"",this.freezeClass=j.freezeClass||this.pfx+"freezed",this.onStart=j.onStart||g,this.onEndMove=j.onEndMove||"",this.customTarget=j.customTarget,this.onEnd=j.onEnd,this.direction=j.direction||"v",this.onMoveClb=j.onMove||"",this.relative=j.relative||0,this.ignoreViewChildren=j.ignoreViewChildren||0,this.ignoreModels=j.ignoreModels||0,this.plh=j.placer||"",this.wmargin=j.wmargin||0,this.offTop=j.offsetTop||0,this.offLeft=j.offsetLeft||0,this.document=j.document||document,this.$document=I(this.document),this.dropContent=null,this.em=j.em||null,this.dragHelper=null,this.canvasRelative=j.canvasRelative||0,this.selectOnEnd=!j.avoidSelectOnEnd,this.scale=j.scale,this.activeTextModel=null,this.em&&this.em.on&&(this.em.on("change:canvasOffset",this.updateOffset),this.updateOffset())},getScale:function(){return(0,ae.result)(this,scale)||1},getContainerEl:function(O){if(O&&(this.el=O),!this.el){var j=this.opt.container;this.el=typeof j=="string"?document.querySelector(j):j,this.$el=I(this.el)}return this.el},getDocuments:function(O){var j=this.em,E=O?O.ownerDocument:j&&j.get("Canvas").getBody().ownerDocument,B=[document];return E&&B.push(E),B},updateOffset:function(){var O,j=((O=this.em)===null||O===void 0?void 0:O.get("canvasOffset"))||{};this.offTop=j.top,this.offLeft=j.left},setDropContent:function(O){this.dropModel=null,this.dropContent=O},updateTextViewCursorPosition:function(O){var j=this.em;if(j){var E=j.get("Canvas"),B=E.getDocument(),X=null;if(B.caretRangeFromPoint){var _=(0,se.getPointerEvent)(O);X=B.caretRangeFromPoint(_.clientX,_.clientY)}else O.rangeParent&&(X=B.createRange()).setStart(O.rangeParent,O.rangeOffset);var M=E.getWindow().getSelection();E.getFrameEl().focus(),M.removeAllRanges(),X&&M.addRange(X),this.setContentEditable(this.activeTextModel,!0)}},setContentEditable:function(O,j){if(O){var E=O.getEl();E.contentEditable!=j&&(E.contentEditable=j)}},toggleSortCursor:function(O){var j=this.em,E=j&&j.get("Canvas");E&&(O?E.startAutoscroll():E.stopAutoscroll())},setDragHelper:function(O,j){for(var E=j||"",B=O.cloneNode(1),X=O.getBoundingClientRect(),_=getComputedStyle(O),M="",s=0;s<_.length;s++){var l=_[s];M+="".concat(l,":").concat(_.getPropertyValue(l),";")}document.body.appendChild(B),B.className+=" ".concat(this.pfx,"bdrag"),B.setAttribute("style",M),this.dragHelper=B,B.style.width="".concat(X.width,"px"),B.style.height="".concat(X.height,"px"),E&&this.moveDragHelper(E),this.em&&I(this.em.get("Canvas").getBody().ownerDocument).off("mousemove",this.moveDragHelper).on("mousemove",this.moveDragHelper),I(document).off("mousemove",this.moveDragHelper).on("mousemove",this.moveDragHelper)},moveDragHelper:function(O){var j=O.target.ownerDocument;if(this.dragHelper&&j){var E=O.pageY,B=O.pageX,X=0,_=0,M=(j.defaultView||j.parentWindow).frameElement,s=this.dragHelper.style;if(M){var l=M.getBoundingClientRect();X=l.top+document.documentElement.scrollTop,_=l.left+document.documentElement.scrollLeft,E=O.clientY,B=O.clientX}s.top=E+X+"px",s.left=B+_+"px"}},matches:function(O,j,E){return se.matches.call(O,j)},closest:function(O,j){if(O){for(var E=O.parentNode;E&&E.nodeType===1;){if(this.matches(E,j))return E;E=E.parentNode}return null}},offset:function(O){var j=O.getBoundingClientRect();return{top:j.top+document.body.scrollTop,left:j.left+document.body.scrollLeft}},createPlaceholder:function(){var O=this.pfx,j=document.createElement("div"),E=document.createElement("div");return j.className=O+"placeholder",j.style.display="none",j.style["pointer-events"]="none",E.className=O+"placeholder-int",j.appendChild(E),j},startSort:function(O){var j,E,B,X,_,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.em,l=this.itemSel,f=this.containerSel,w=this.plh,te=this.getContainerEl(M.container),J=this.getDocuments(O);this.dropModel=null,this.target=null,this.prevTarget=null,this.moved=0,O&&!this.matches(O,"".concat(l,", ").concat(f))&&(O=this.closest(O,l)),this.sourceEl=O,w||(this.plh=this.createPlaceholder(),te.appendChild(this.plh)),O&&((_=this.getSourceModel(O))&&_.set&&_.set("status","freezed"),this.srcM
232odel=_),(0,se.on)(te,"mousemove dragover",this.onMove),(0,se.on)(J,"mouseup dragend touchend",this.endMove),(0,se.on)(J,"keydown",this.rollback),this.onStart({sorter:this,target:_,parent:_&&((j=(E=_).parent)===null||j===void 0?void 0:j.call(E)),index:_&&((B=(X=_).index)===null||B===void 0?void 0:B.call(X))}),s?.clearSelection(),this.toggleSortCursor(1),s?.trigger("sorter:drag:start",O,_)},getTargetModel:function(O){var j=O||this.target;return I(j).data("model")},getSourceModel:function(O){var j=this,E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B=E.target,X=E.avoidChildren,_=X===void 0?1:X,M=this.em,s=this.sourceEl,l=O||s,f=this.dropModel,w=this.dropContent,te=function(v){return v&&B&&v.opt&&v.opt.avoidChildren&&j.isTextableActive(v,B)};if(w&&M){if(te(f)&&(f=null),!f){var J=M.get("DomComponents").getComponents(),R={avoidChildren:_,avoidStore:1,avoidUpdateStyle:1},k=J.add(w,W(W({},R),{},{temporary:1}));if(f=(f=J.remove(k,R))instanceof Array?f[0]:f,this.dropModel=f,te(f))return this.getSourceModel(l,{target:B,avoidChildren:0})}return f}return l&&I(l).data("model")},selectTargetModel:function(O,j){if(!(O instanceof ce().Collection||j&&j===O)){var E=this.targetModel;E&&E!==this.srcModel&&E.set("status",""),O&&O.set&&(O.set("status","selected-parent"),this.targetModel=O)}},onMove:function(O){var j=O,E=this.em,B=this.onMoveClb,X=this.plh,_=this.customTarget;this.moved=1;var M=X.style.display;M&&M!=="none"||(X.style.display="block");var s=this.offset(this.el);this.elT=this.wmargin?Math.abs(s.top):s.top,this.elL=this.wmargin?Math.abs(s.left):s.left;var l=O.pageY-this.elT+this.el.scrollTop,f=O.pageX-this.elL+this.el.scrollLeft;if(this.canvasRelative&&E){var w=E.get("Canvas").getMouseRelativeCanvas(O,{noScroll:1});f=w.x,l=w.y}this.rX=f,this.rY=l,this.eventMove=O;var te=this.getSourceModel(),J=_?_({sorter:this,event:O}):O.target,R=this.dimsFromTarget(J,f,l),k=this.target,v=k&&this.getTargetModel(k);if(this.selectTargetModel(v,te),v||(X.style.display="none"),k){this.lastDims=R;var b=this.findPosition(R,f,l);this.isTextableActive(te,v)?(this.activeTextModel=v,X.style.display="none",this.lastPos=b,this.updateTextViewCursorPosition(j)):(this.disableTextable(),this.activeTextModel=null,this.lastPos&&this.lastPos.index==b.index&&this.lastPos.method==b.method||(this.movePlaceholder(this.plh,R,b,this.prevTargetDim),this.$plh||(this.$plh=I(this.plh)),this.canvasRelative||(this.offTop&&this.$plh.css("top","+="+this.offTop+"px"),this.offLeft&&this.$plh.css("left","+="+this.offLeft+"px")),this.lastPos=b)),(0,ae.isFunction)(B)&&B({event:O,target:te,parent:v,index:b.index+(b.method=="after"?1:0)}),E&&E.trigger("sorter:drag",{target:k,targetModel:v,sourceModel:te,dims:R,pos:b,x:f,y:l})}},isTextableActive:function(O,j){return O&&O.get&&O.get("textable")&&j&&j.is("text")},disableTextable:function(){var O=this.activeTextModel;O&&O.getView().disableEditing(),this.setContentEditable(O,!1)},isInFlow:function(O,j){if(!O)return!1;j=j||document.body;var E=O;return E.offsetHeight,!!this.styleInFlow(E,j)},styleInFlow:function(O,j){if(!(0,se.isTextNode)(O)){var E=O.style||{},B=I(O),X=j&&I(j);if(!E.overflow||E.overflow==="visible"){var _=B.css("float");if(!(_&&_!=="none"||X&&X.css("display")=="flex"&&X.css("flex-direction")!=="column")){switch(E.position){case"static":case"relative":case"":break;default:return}switch(O.tagName){case"TR":case"TBODY":case"THEAD":case"TFOOT":return!0}switch(B.css("display")){case"block":case"list-item":case"table":case"flex":return!0}}}}},validTarget:function(O,j){var E=this.getTargetModel(O),B=this.getSourceModel(j,{target:E}),X={valid:!0,src:j=B&&B.view&&B.view.el,srcModel:B,trg:O=E&&E.view&&E.view.el,trgModel:E};if(!j||!O)return X.valid=!1,X;var _=B.get("draggable");if((0,ae.isFunction)(_)){var M=_(B,E);X.dragInfo=M,X.draggable=M,_=M}else _=_ instanceof Array?_.join(", "):_,X.dragInfo=_,_=(0,ae.isString)(_)?this.matches(O,_):_,X.draggable=_;var s=E.get("droppable");if((0,ae.isFunction)(s)){var l=s(B,E);X.droppable=l,X.dropInfo=l,s=l}else s=(s=s instanceof ce().Collection?1:s)instanceof Array?s.join(", "):s,X.dropInfo=s,s=(0,ae.isString)(s)?this.matches(j,s):s,s=_&&this.isTextableActive(B,E)?1:s,X.droppable=s;return s&&_||(X.valid=!1),X},dimsFromTarget:function(O,j,E){var B=this.em,X=[];if(!O||(this.matches(O,"".concat(this.itemSel,", ").concat(this.containerSel))||(O=this.closest(O,this.itemSel)),this.draggable instanceof Array&&(O=this.closest(O,this.draggable.join(","))),!O))return X;if(this.prevTarget&&this.prevTarget!=O&&(this.prevTarget=null),!this.prevTarget){this.targetP=this.closest(O,this.containerSel);var _=this.validTarget(O);if(B&&B.trigger("sorter:drag:validation",_),!_.valid&&this.targetP)return this.dimsFromTarget(this.targetP,j,E);this.prevTarget=O,this.prevTargetDim=this.getDim(O),this.cacheDimsP=this.getChildrenDim(this.targetP),this.cacheDims=this.getChildrenDim(O)}if(this.prevTarget==O&&(X=this.cacheDims),this.target=this.prevTarget,this.nearBorders(this.prevTargetDim,j,E)||!this.nested&&!this.cacheDims.length){var M=this.targetP;M&&this.validTarget(M).valid&&(X=this.cacheDimsP,this.target=M)}return this.lastPos=null,X},getTargetFromEl:function(O){var j,E=O,B=this.targetPrev,X=this.em,_=this.containerSel,M=this.itemSel;if(this.matches(E,"".concat(M,", ").concat(_))||(E=this.closest(E,M)),this.draggable instanceof Array&&(E=this.closest(E,this.draggable.join(","))),B&&B!=E&&(this.targetPrev=""),!this.targetPrev){j=this.closest(E,_);var s=this.validTarget(E);if(X&&X.trigger("sorter:drag:validation",s),!s.valid&&j)return this.getTargetFromEl(j);this.targetPrev=E}return this.nearElBorders(E)&&(j=this.closest(E,_))&&this.validTarget(j).valid&&(E=j),E},nearElBorders:function(O){var j=10,E=O.getBoundingClientRect(),B=O.ownerDocument.body,X=this.getCurrentPos(),_=X.x,M=X.y,s=E.top+B.scrollTop,l=E.left+B.scrollLeft,f=E.width,w=E.height;if(M<s+j||M>s+w-j||_<l+j||_>l+f-j)return 1},getCurrentPos:function(){var O=this.eventMove;return{x:O.pageX||0,y:O.pageY||0}},getDim:function(O){var j,E,B,X,_=this.em,M=this.canvasRelative,s=_&&_.get("Canvas"),l=s?s.getElementOffsets(O):{};if(M&&_){var f=s.getElementPos(O,{noScroll:1});j=f.top,E=f.left,B=f.height,X=f.width}else{var w=this.offset(O);j=this.relative?O.offsetTop:w.top-(this.wmargin?-1:1)*this.elT,E=this.relative?O.offsetLeft:w.left-(this.wmargin?-1:1)*this.elL,B=O.offsetHeight,X=O.offsetWidth}return{top:j,left:E,height:B,width:X,offsets:l}},getChildrenDim:function(O){var j=this,E=[];if(!O)return E;var B=this.getTargetModel(O);if(B&&B.view&&!this.ignoreViewChildren){var X=B.getCurrentView?B.getCurrentView():B.view;O=X.getChildrenContainer()}return(0,ae.each)(O.children,(function(_,M){var s=(0,se.getModel)(_,I),l=s&&s.index?s.index():M;if((0,se.isTextNode)(_)||j.matches(_,j.itemSel)){var f=j.getDim(_),w=j.direction;w=w=="v"||w!="h"&&j.isInFlow(_,O),f.dir=w,f.el=_,f.indexEl=l,E.push(f)}})),E},nearBorders:function(O,j,E){var B=0,X=this.borderOffset,_=j||0,M=E||0,s=O.top,l=O.left,f=O.height,w=O.width;return(s+X>M||M>s+f-X||l+X>_||_>l+w-X)&&(B=1),!!B},findPosition:function(O,j,E){for(var B={index:0,indexEl:0,method:"before"},X=0,_=0,M=0,s=0,l=0,f=0,w=0,te=0,J=O.length;te<J;te++){var R=w=O[te],k=R.top,v=R.left,b=R.height,h=R.width;if(f=k+b,s=v+h/2,l=k+b/2,!(_&&v>_||M&&l>=M||X&&v+h<X))if(B.index=te,B.indexEl=w.indexEl,w.dir){if(E<l){B.method="before";break}B.method="after"}else E<f&&(M=f),j<s?(_=s,B.method="before"):(X=s,B.method="after")}return B},movePlaceholder:function(O,j,E,B){var X=0,_=0,M=0,s=0,l=0,f="px",w=5,te=E.method,J=j[E.index];if(O.classList.remove("vertical"),O.classList.add("horizontal"),J){var R=J.top,k=J.left,v=J.height,b=J.width;J.dir?(s=b+f,l="auto",_=te=="before"?R-X:R+v-X,M=k):(s="auto",l=v-2*X+f,_=R+X,M=te=="before"?k-X:k+b-X,O.classList.remove("horizontal"),O.classList.add("vertical"))}else{if(!this.nested)return void(O.style.display="none");if(B){var h=B.offsets||{},m=h.paddingTop||w,p=h.paddingLeft||w;_=B.top+m,M=B.left+p,s=parseInt(B.width)-2*p+f,l="auto"}}O.style.top=_+f,O.style.left=M+f,s&&(O.style.width=s),l&&(O.style.height=l)},parents:function(O){return O?[O].concat(this.parents(O.parent())):[]},sort:function(O,j){var E=O.parents.filter((function(X){return j.parents.includes(X)}))[0];if(!E)return j.model.index()-O.model.index();var B=O.parents[O.parents.indexOf(E)-1];return j.parents[j.parents.indexOf(E)-1].index()-B.index()},endMove:function(O){var j,E=this,B=this.sourceEl,X=[],_=this.getDocuments(),M=this.getContainerEl(),s=this.onEndMove,l=this.onEnd,f=this.target,w=this.lastPos;if((0,se.off)(M,"mousemove dragover",this.onMove),(0,se.off)(_,"mouseup dragend touchend",this.endMove),(0,se.off)(_,"keydown",this.rollback),this.plh.style.display="none",B&&(j=this.getSourceModel(),this.selectOnEnd&&j&&j.set&&(j.set("status",""),j.set("status","selected"))),this.moved&&f){var te=this.toMove,J=(0,ae.isArray)(te)?te:te?[te]:[B],R=0;J.length===1?X.push(this.move(f,J[0],w)):J.map((function(b){return{model:b,parents:E.parents(b)}})).sort(this.sort).forEach((function(b){var h=b.model,m=h.index(),p=h.parent().getEl();X.push(E.move(f,h,W(W({},w),{},{indexEl:w.indexEl-R,index:w.index-R}))),p===f&&m<=w.index&&R++}))}this.plh&&(this.plh.style.display="none");var k=this.dragHelper;if(k&&(k.parentNode.removeChild(k),this.dragHelper=null),this.disableTextable(),this.selectTargetModel(),this.toggleSortCursor(),this.toMove=null,this.eventMove=0,this.dropModel=null,(0,ae.isFunction)(s)){var v={target:j,parent:j&&j.parent(),index:j&&j.index()};
232X.length?X.forEach((function(b){return s(b,E,v)})):s(null,this,W(W({},v),{},{cancelled:1}))}(0,ae.isFunction)(l)&&l({sorter:this})},move:function(O,j,E){var B,X,_=this.em,M=this.dropContent,s=(0,se.getElement)(j),l=[],f=E.method==="after"?E.indexEl+1:E.indexEl,w=this.validTarget(O,s),te=I(O).data("collection"),J=w.trgModel,R=w.srcModel,k=w.draggable,v=J instanceof ce().Collection?1:w.droppable;if(te&&v&&k){var b={at:f,action:"move-component"},h=this.isTextableActive(R,J);if(M)B=(0,ae.isFunction)(M)?M():M,b.avoidUpdateStyle=!0,b.action="add-component";else{var m=R.collection.indexOf(R),p=te===R.collection;(!p||!(m===f||m===f-1)||h)&&(B=R.collection.remove(R,{temporary:!0}),p&&f>m&&(b.at=f-1))}B&&(h?(delete b.at,X=J.getView().insertComponent(B,b)):X=te.add(B,b)),this.dropContent=null,this.prevTarget=null}else if(_){var y=w.dropInfo||J?.get("droppable"),Z=w.dragInfo||R?.get("draggable");!te&&l.push("Target collection not found"),!v&&y&&l.push("Target is not droppable, accepts [".concat(y,"]")),!k&&Z&&l.push("Component not draggable, acceptable by [".concat(Z,"]")),_.logWarning("Invalid target position",{errors:l,model:R,context:"sorter",target:J})}return _?.trigger("sorter:drag:end",{targetCollection:te,modelToDrop:B,warns:l,validResult:w,dst:O,srcEl:s}),X},rollback:function(O){(0,se.off)(this.getDocuments(),"keydown",this.rollback),(O.which||O.keyCode)==27&&(this.moved=0,this.endMove())}});var x=S(5671),A=S(3144);function $(O,j){var E=Object.keys(O);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(O);j&&(B=B.filter((function(X){return Object.getOwnPropertyDescriptor(O,X).enumerable}))),E.push.apply(E,B)}return E}function re(O){for(var j=1;j<arguments.length;j++){var E=arguments[j]!=null?arguments[j]:{};j%2?$(Object(E),!0).forEach((function(B){(0,fe.Z)(O,B,E[B])})):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(E)):$(Object(E)).forEach((function(B){Object.defineProperty(O,B,Object.getOwnPropertyDescriptor(E,B))}))}return O}var z={mousePosFetcher:null,updateTarget:null,ratioDefault:0,posFetcher:null,onStart:null,onMove:null,onEnd:null,onUpdateContainer:function(){},step:1,minDim:10,maxDim:"",unitHeight:"px",unitWidth:"px",keyHeight:"height",keyWidth:"width",currentUnit:1,silentFrames:0,avoidContainerUpdate:0,keepAutoHeight:!1,keepAutoWidth:!1,autoHeight:!1,autoWidth:!1,tl:1,tc:1,tr:1,cl:1,cr:1,bl:1,bc:1,br:1},F=function(O,j){var E=j||window,B=O.getBoundingClientRect();return{left:B.left+E.pageXOffset,top:B.top+E.pageYOffset,width:B.width,height:B.height}},G=(function(){function O(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,x.Z)(this,O),this.setOptions(j),(0,ae.bindAll)(this,"handleKeyDown","handleMouseDown","move","stop"),this}return(0,A.Z)(O,[{key:"getConfig",value:function(){return this.opts}},{key:"setOptions",value:function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.opts=(0,ae.defaults)(j,z),this.setup()}},{key:"setup",value:function(){var j=this.opts,E=j.prefix||"",B=j.appendTo||document.body,X=this.container;for(X||((X=document.createElement("div")).className="".concat(E,"resizer-c"),B.appendChild(X),this.container=X);X.firstChild;)X.removeChild(X.firstChild);var _={};for(var M in["tl","tc","tr","cl","cr","bl","bc","br"].forEach((function(l){return _[l]=j[l]?(function(f,w){var te=w.prefix||"",J=document.createElement("i");return J.className=te+"resizer-h "+te+"resizer-h-"+f,J.setAttribute("data-"+te+"handler",f),J})(l,j):""})),_){var s=_[M];s&&X.appendChild(s)}this.handlers=_,this.mousePosFetcher=j.mousePosFetcher,this.updateTarget=j.updateTarget,this.posFetcher=j.posFetcher,this.onStart=j.onStart,this.onMove=j.onMove,this.onEnd=j.onEnd,this.onUpdateContainer=j.onUpdateContainer}},{key:"toggleFrames",value:function(j){if(this.opts.silentFrames){var E=document.querySelectorAll("iframe");(0,ae.each)(E,(function(B){return B.style.pointerEvents=j?"none":""}))}}},{key:"isHandler",value:function(j){var E=this.handlers;for(var B in E)if(E[B]===j)return!0;return!1}},{key:"getFocusedEl",value:function(){return this.el}},{key:"getParentEl",value:function(){return this.el.parentElement}},{key:"getDocumentEl",value:function(){return[this.el.ownerDocument,document]}},{key:"getElementPos",value:function(j){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B=this.posFetcher||"";return B?B(j,E):F(j)}},{key:"focus",value:function(j){j&&j===this.el||(this.el=j,this.updateContainer({forceShow:1}),(0,se.on)(this.getDocumentEl(),"pointerdown",this.handleMouseDown))}},{key:"blur",value:function(){this.container.style.display="none",this.el&&((0,se.off)(this.getDocumentEl(),"pointerdown",this.handleMouseDown),this.el=null)}},{key:"start",value:function(j){if(j.button===0){j.preventDefault(),j.stopPropagation();var E=this.el,B=this.getParentEl(),X=this.opts||{},_="data-"+X.prefix+"handler",M=this.getElementPos(E,{target:"el"}),s=this.getElementPos(B);this.handlerAttr=j.target.getAttribute(_),this.clickedHandler=j.target,this.startDim={t:M.top,l:M.left,w:M.width,h:M.height},this.rectDim={t:M.top,l:M.left,w:M.width,h:M.height},this.startPos={x:j.clientX,y:j.clientY},this.parentDim={t:s.top,l:s.left,w:s.width,h:s.height};var l=this.getDocumentEl();this.docs=l,(0,se.on)(l,"pointermove",this.move),(0,se.on)(l,"keydown",this.handleKeyDown),(0,se.on)(l,"pointerup",this.stop),(0,ae.isFunction)(this.onStart)&&this.onStart(j,{docs:l,config:X,el:E,resizer:this}),this.toggleFrames(1),this.move(j)}}},{key:"move",value:function(j){var E=this.onMove,B=this.mousePosFetcher,X=B?B(j):{x:j.clientX,y:j.clientY};this.currentPos=X,this.delta={x:X.x-this.startPos.x,y:X.y-this.startPos.y},this.keys={shift:j.shiftKey,ctrl:j.ctrlKey,alt:j.altKey},this.rectDim=this.calc(this),this.updateRect(0),E&&E(j)}},{key:"stop",value:function(j){var E=this.opts,B=this.docs||this.getDocumentEl();(0,se.off)(B,"pointermove",this.move),(0,se.off)(B,"keydown",this.handleKeyDown),(0,se.off)(B,"pointerup",this.stop),this.updateRect(1),this.toggleFrames(),(0,ae.isFunction)(this.onEnd)&&this.onEnd(j,{docs:B,config:E}),delete this.docs}},{key:"updateRect",value:function(j){var E=this.el,B=this.opts,X=this.rectDim,_=this.updateTarget,M=this.getSelectedHandler(),s=B.unitHeight,l=B.unitWidth,f=B.keyWidth,w=B.keyHeight;if((0,ae.isFunction)(_))_(E,X,{store:j,selectedHandler:M,resizer:this,config:B});else{var te=E.style;te[f]=X.w+l,te[w]=X.h+s}this.updateContainer()}},{key:"updateContainer",value:function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=this.opts,B=this.container,X=this.el,_=B.style;!E.avoidContainerUpdate&&X&&j.forceShow&&(_.display="block"),this.onUpdateContainer({el:B,resizer:this,opts:re(re({},E),j)})}},{key:"getSelectedHandler",value:function(){var j=this.handlers;if(this.selectedHandler){for(var E in j)if(j[E]===this.selectedHandler)return E}}},{key:"handleKeyDown",value:function(j){j.keyCode===27&&(this.rectDim=this.startDim,this.stop(j))}},{key:"handleMouseDown",value:function(j){var E=j.target;this.isHandler(E)?(this.selectedHandler=E,this.start(j)):E!==this.el&&(this.selectedHandler="",this.blur()
232)}},{key:"calc",value:function(j){var E,B=this.opts||{},X=B.step,_=this.startDim,M=B.minDim,s=B.maxDim,l=j.delta.x,f=j.delta.y,w=this.parentDim.w,te=this.parentDim.h,J=this.opts.unitWidth,R=this.opts.unitHeight,k=J==="%"?_.w/100*w:_.w,v=R==="%"?_.h/100*te:_.h,b={t:0,l:0,w:k,h:v};if(j){var h=j.handlerAttr;~h.indexOf("r")&&(E=J==="%"?(0,se.normalizeFloat)((k+l*X)/w*100,.01):(0,se.normalizeFloat)(k+l*X,X),E=Math.max(M,E),s&&(E=Math.min(s,E)),b.w=E),~h.indexOf("b")&&(E=R==="%"?(0,se.normalizeFloat)((v+f*X)/te*100,.01):(0,se.normalizeFloat)(v+f*X,X),E=Math.max(M,E),s&&(E=Math.min(s,E)),b.h=E),~h.indexOf("l")&&(E=J==="%"?(0,se.normalizeFloat)((k-l*X)/w*100,.01):(0,se.normalizeFloat)(k-l*X,X),E=Math.max(M,E),s&&(E=Math.min(s,E)),b.w=E),~h.indexOf("t")&&(E=R==="%"?(0,se.normalizeFloat)((v-f*X)/te*100,.01):(0,se.normalizeFloat)(v-f*X,X),E=Math.max(M,E),s&&(E=Math.min(s,E)),b.h=E);var m=B.ratioDefault?!j.keys.shift:j.keys.shift;if(h.indexOf("c")<0&&m){var p=_.w/_.h;b.w/b.h>p?b.h=Math.round(b.w/p):b.w=Math.round(b.h*p)}return~h.indexOf("l")&&(b.l=_.w-b.w),~h.indexOf("t")&&(b.t=_.h-b.h),b}}}]),O})();const H={init:function(O){return new G(O)}};function ne(O,j){var E=Object.keys(O);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(O);j&&(B=B.filter((function(X){return Object.getOwnPropertyDescriptor(O,X).enumerable}))),E.push.apply(E,B)}return E}function ye(O){for(var j=1;j<arguments.length;j++){var E=arguments[j]!=null?arguments[j]:{};j%2?ne(Object(E),!0).forEach((function(B){(0,fe.Z)(O,B,E[B])})):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(E)):ne(Object(E)).forEach((function(B){Object.defineProperty(O,B,Object.getOwnPropertyDescriptor(E,B))}))}return O}const ee=function(){return{name:"Utils",init:function(){return this},destroy:function(){},Sorter:P,Resizer:H,Dragger:D.Z,helpers:ye({},se)}}},7904:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>ae});var fe,D=S(2316),ie=S.n(D),ce=(fe=function(se,oe){return fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(W,I){W.__proto__=I}||function(W,I){for(var g in I)Object.prototype.hasOwnProperty.call(I,g)&&(W[g]=I[g])},fe(se,oe)},function(se,oe){if(typeof oe!="function"&&oe!==null)throw new TypeError("Class extends value "+String(oe)+" is not a constructor or null");function W(){this.constructor=se}fe(se,oe),se.prototype=oe===null?Object.create(oe):(W.prototype=oe.prototype,new W)});const ae=(function(se){function oe(W,I,g){var P=se.call(this,I,g)||this;return P._module=W,P}return ce(oe,se),Object.defineProperty(oe.prototype,"module",{get:function(){return this._module},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"config",{get:function(){return this._module.config},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"em",{get:function(){return this._module.em},enumerable:!1,configurable:!0}),oe})(ie().Model)},6434:(We,ke,S)=>{"use strict";S.d(ke,{O:()=>I,Z:()=>W});var fe,D=S(9050),ie=S(1163),ce=(fe=function(g,P){return fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,A){x.__proto__=A}||function(x,A){for(var $ in A)Object.prototype.hasOwnProperty.call(A,$)&&(x[$]=A[$])},fe(g,P)},function(g,P){if(typeof P!="function"&&P!==null)throw new TypeError("Class extends value "+String(P)+" is not a constructor or null");function x(){this.constructor=g}fe(g,P),g.prototype=P===null?Object.create(P):(x.prototype=P.prototype,new x)}),ae=function(){return ae=Object.assign||function(g){for(var P,x=1,A=arguments.length;x<A;x++)for(var $ in P=arguments[x])Object.prototype.hasOwnProperty.call(P,$)&&(g[$]=P[$]);return g},ae.apply(this,arguments)},se=function(g,P,x){if(x||arguments.length===2)for(var A,$=0,re=P.length;$<re;$++)!A&&$ in P||(A||(A=Array.prototype.slice.call(P,0,$)),A[$]=P[$]);return g.concat(A||Array.prototype.slice.call(P))},oe=(function(){function g(P,x,A){this.cls=[],this.isPrivate=!1,this._em=P,this._name=x;var $=this.name.charAt(0).toLowerCase()+this.name.slice(1),re=(0,D.isUndefined)(P.config[$])?P.config[this.name]:P.config[$],z=re===!0?{}:re||{};z.pStylePrefix=P.config.pStylePrefix||"",(0,D.isUndefined)(re)||re||(z._disable=1),z.em=P,this._config=(0,ie.deepMerge)(A||{},z)}return Object.defineProperty(g.prototype,"em",{get:function(){return this._em}
232,enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"config",{get:function(){return this._config},enumerable:!1,configurable:!0}),g.prototype.init=function(P){},g.prototype.postLoad=function(P){},Object.defineProperty(g.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),g.prototype.getConfig=function(P){return P?this.config[P]:this.config},g.prototype.__logWarn=function(P,x){x===void 0&&(x={}),this.em.logWarning("[".concat(this.name,"]: ").concat(P),x)},g.prototype.__appendTo=function(){var P=this.getConfig().appendTo;if(P){var x=(0,D.isElement)(P)?P:document.querySelector(P);if(!x)return this.__logWarn('"appendTo" element not found');x.appendChild(this.render())}},g})();const W=oe;var I=(function(g){function P(x,A,$,re){var z=g.call(this,x,A)||this;return z.cls=[],z.private=!1,z.all=$,z.events=re,z.__initListen(),z}return ce(P,g),P.prototype.postLoad=function(x){},P.prototype.render=function(){},P.prototype.getProjectData=function(x){var A={},$=this.storageKey;return $&&(A[$]=x||this.getAll()),A},P.prototype.loadProjectData=function(x,A){x===void 0&&(x={}),A===void 0&&(A={});var $=A.all,re=A.onResult,z=A.reset,F=this.storageKey,G={action:"load"},H=$||this.all,ne=x[F];if(typeof ne=="string")try{ne=JSON.parse(ne)}catch{this.__logWarn("Data parsing failed",{input:ne})}return z&&ne&&H.reset(void 0,G),re?ne&&re(ne,G):ne&&(0,ie.isDef)(ne.length)&&H.reset(ne,G),ne},P.prototype.clear=function(x){x===void 0&&(x={});var A=this.all;return A&&A.reset(void 0,x),this},P.prototype.getAll=function(){return se([],this.all.models,!0)},P.prototype.getAllMap=function(){return this.getAll().reduce((function(x,A){return x[A.get(A.idAttribute)]=A,x}),{})},P.prototype.__initListen=function(x){x===void 0&&(x={});var A=this,$=A.all,re=A.em,z=A.events;$&&re&&$.on("add",(function(F,G,H){return re.trigger(z.add,F,H)})).on("remove",(function(F,G,H){return re.trigger(z.remove,F,H)})).on("change",(function(F,G){return re.trigger(z.update,F,F.changedAttributes(),G)})).on("all",this.__catchAllEvent,this),this.cls=[$].concat(x.collections||[]),(x.propagate||[]).forEach((function(F){var G=F.entity,H=F.event;G.on("all",(function(ne,ye,ee,O){var j=ae({event:ne},O||ee);[re,$].map((function(E){return E.trigger(H,ye,j)}))}))}))},P.prototype.__remove=function(x,A){var $=this;A===void 0&&(A={});var re=this.em,z=isString(x)?this.get(x):x,F=function(){return z&&$.all.remove(z,A),z};return!A.silent&&re?.trigger(this.events.removeBefore,z,F,A),!A.abort&&F()},P.prototype.__catchAllEvent=function(x,A,$,re){var z=this.em,F=this.events,G=re||$;z&&F.all&&z.trigger(F.all,{event:x,model:A,options:G}),this.__onAllEvent()},P.prototype.__appendTo=function(){var x=this.config.appendTo;if(x){var A=(0,D.isElement)(x)?x:document.querySelector(x);if(!A)return this.__logWarn('"appendTo" element not found');A.appendChild(this.render())}},P.prototype.__onAllEvent=function(){},P.prototype._createId=function(x){x===void 0&&(x=16);var A,$=this.getAll().length+x,re=this.getAllMap();do A=(0,ie.createId)($);while(re[A]);return A},P.prototype.__listenAdd=function(x,A){var $=this;x.on("add",(function(re,z,F){return $.em.trigger(A,re,F)}))},P.prototype.__listenRemove=function(x,A){var $=this;x.on("remove",(function(re,z,F){return $.em.trigger(A,re,F)}))},P.prototype.__listenUpdate=function(x,A){var $=this;x.on("change",(function(re,z){return $.em.trigger(A,re,re.changedAttributes(),z)}))},P.prototype.__destroy=function(){var x;this.cls.forEach((function(A){A.stopListening(),A.reset()})),(x=this.view)===null||x===void 0||x.remove(),this.view=void 0},P})(oe)},9281:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>Y});var fe=S(9050),D=S(6434),ie=S(1163);const ce={stylePrefix:"cv-",scripts:[],styles:[],customBadgeLabel:"",autoscrollLimit:50,extHl:0,frameContent:"<!DOCTYPE html>",frameStyle:` 233 body { background-color: #fff } 234 * ::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.1) } 235 * ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2) } 236 * ::-webkit-scrollbar { width: 10px } 237 `,notTextable:["button","a","input[type=checkbox]","input[type=radio]"]};var ae,se=S(7904),oe=S(7948),W=S(3560),I=(ae=function(q,N){return ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,c){a.__proto__=c}||function(a,c){for(var C in c)Object.prototype.hasOwnProperty.call(c,C)&&(a[C]=c[C])},ae(q,N)},function(q,N){if(typeof N!="function"&&N!==null)throw new TypeError("Class extends value "+String(N)+" is not a constructor or null");function a(){this.constructor=q}
237ae(q,N),q.prototype=N===null?Object.create(N):(a.prototype=N.prototype,new a)}),g=(function(q){function N(a){var c=this,C=a.em,Q=a.config,pe=Q.scripts,Ce=Q.styles;return(c=q.call(this,a,{scripts:pe,styles:Ce})||this).set("frames",new W.Z(a)),c.listenTo(c,"change:zoom",c.onZoomChange),c.listenTo(C,"change:device",c.updateDevice),c.listenTo(C,oe.evPageSelect,c._pageUpdated),c}return I(N,q),N.prototype.defaults=function(){return{frame:"",frames:[],rulers:!1,zoom:100,x:0,y:0,scripts:[],styles:[]}},Object.defineProperty(N.prototype,"frames",{get:function(){return this.get("frames")},enumerable:!1,configurable:!0}),N.prototype.init=function(){var a=this.em.get("PageManager").getMain(),c=a.getMainFrame();this.set("frames",a.getFrames()),this.updateDevice({frame:c})},N.prototype._pageUpdated=function(a,c){var C=this.em;C.setSelected(),C.get("readyCanvas")&&C.stopDefault(),c?.getFrames().map((function(Q){return Q.disable()})),this.set("frames",a.getFrames())},N.prototype.updateDevice=function(a){a===void 0&&(a={});var c=this.em,C=c.getDeviceModel(),Q=a.frame||c.getCurrentFrameModel();if(Q&&C){var pe=C.attributes,Ce=pe.width,Se=pe.height;Q.set({width:Ce,height:Se},{noUndo:1})}},N.prototype.onZoomChange=function(){this.get("zoom")<1&&this.set("zoom",1)},N})(se.Z);const P=g;var x=S(6840),A=S(2316),$=S.n(A),re=(function(){var q=function(N,a){return q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,C){c.__proto__=C}||function(c,C){for(var Q in C)Object.prototype.hasOwnProperty.call(C,Q)&&(c[Q]=C[Q])},q(N,a)};return function(N,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");function c(){this.constructor=N}q(N,a),N.prototype=a===null?Object.create(a):(c.prototype=a.prototype,new c)}})();const z=(function(q){function N(){return q!==null&&q.apply(this,arguments)||this}return re(N,q),Object.defineProperty(N.prototype,"pfx",{get:function(){return this.ppfx+this.config.stylePrefix||""},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"ppfx",{get:function(){return this.em.config.stylePrefix||""},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"module",{get:function(){var a,c;return(c=(a=this.model)===null||a===void 0?void 0:a.module)!==null&&c!==void 0?c:this.collection.module},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"em",{get:function(){return this.module.em},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"config",{get:function(){return this.module.config},enumerable:!1,configurable:!0}),N})($().View);var F=S(9283),G=(function(){var q=function(N,a){return q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,C){c.__proto__=C}||function(c,C){for(var Q in C)Object.prototype.hasOwnProperty.call(C,Q)&&(c[Q]=C[Q])},q(N,a)};return function(N,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");function c(){this.constructor=N}q(N,a),N.prototype=a===null?Object.create(a):(c.prototype=a.prototype,new c)}})();const H=(function(q){function N(a,c){a===void 0&&(a={}),c===void 0&&(c=!1);var C=q.call(this,a)||this;return C.itemsView="",C.itemType="type",C.reuseView=!1,C.viewCollection=[],c&&C.listenTo(C.collection,"add",C.addTo),C}return G(N,q),N.prototype.addTo=function(a){this.add(a)},N.prototype.itemViewNotFound=function(a){},N.prototype.add=function(a,c){var C,Q=this,pe=Q.reuseView,Ce=Q.viewCollection,Se=(Q.itemsView,c||null),me=a.get(this.itemType);C=a.view&&pe?a.view:this.renderView(a,me),Ce.push(C);var xe=C.render().el;Se?Se.appendChild(xe):this.$el.append(xe)},N.prototype.render=function(){var a=this,c=document.createDocumentFragment();return this.clearItems(),this.$el.empty(),this.collection.length&&this.collection.each((function(C){a.add(C,c)}),this),this.$el.append(c),this.onRender(),this},N.prototype.onRender=function(){},N.prototype.onRemoveBefore=function(a,c){},N.prototype.onRemove=function(a,c){},N.prototype.remove=function(a){a===void 0&&(a={});var c=this.viewCollection;return this.onRemoveBefore(c,a),this.clearItems(),$().View.prototype.remove.apply(this,a),this.onRemove(c,a),this},N.prototype.clearItems=function(){this.viewCollection},N})(z);var ne=S(4868),ye=S(4942),ee=S(5671),O=S(3144);function j(q,N){var a=Object.keys(q);
237if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(q);N&&(c=c.filter((function(C){return Object.getOwnPropertyDescriptor(q,C).enumerable}))),a.push.apply(a,c)}return a}var E=(function(){function q(N,a){var c=this;(0,ee.Z)(this,q),this.em=N;var C=a||N.get("Canvas").getFrames().map((function(pe){return pe.getComponent().getEl()})),Q=Array.isArray(C)?C:[C];return this.el=C,this.counter=0,(0,fe.bindAll)(this,"handleDragEnter","handleDragOver","handleDrop","handleDragLeave"),Q.forEach((function(pe){return c.toggleEffects(pe,1)})),this}return(0,O.Z)(q,[{key:"toggleEffects",value:function(N,a){var c={on:ie.on,off:ie.off},C=a?"on":"off";c[C](N,"dragenter",this.handleDragEnter),c[C](N,"dragover",this.handleDragOver),c[C](N,"drop",this.handleDrop),c[C](N,"dragleave",this.handleDragLeave)}},{key:"__customTglEff",value:function(N){var a=N?ie.on:ie.off,c=this.el.ownerDocument,C=c.defaultView.frameElement;this.sortOpts=N?{onStart:function(Q){var pe=Q.sorter;(0,ie.on)(C,"pointermove",pe.onMove)},onEnd:function(Q){var pe=Q.sorter;(0,ie.off)(C,"pointermove",pe.onMove)},customTarget:function(Q){var pe=Q.event;return c.elementFromPoint(pe.clientX,pe.clientY)}}:null,a(C,"pointerenter",this.handleDragEnter),a(C,"pointermove",this.handleDragOver),a(document,"pointerup",this.handleDrop),a(C,"pointerout",this.handleDragLeave)}},{key:"startCustom",value:function(){this.__customTglEff(!0)}},{key:"endCustom",value:function(N){this.over?this.endDrop(N):this.__customTglEff(!1)}},{key:"endDrop",value:function(N,a){var c=this.em,C=this.dragStop;this.counter=0,C&&C(N),this.__customTglEff(!1),c.trigger("canvas:dragend",a)}},{key:"handleDragLeave",value:function(N){this.updateCounter(-1,N)}},{key:"updateCounter",value:function(N,a){this.counter+=N,this.counter===0&&this.endDrop(1,a)}},{key:"handleDragEnter",value:function(N){var a=this,c=this.em,C=N.dataTransfer;if(this.updateCounter(1,N),!this.over){this.over=1;var Q,pe,Ce=c.get("Utils"),Se=c.get("Canvas"),me=c.get("dragContent")||"<br>";if(c.stopDefault(),c.inAbsoluteMode()){var xe=c.get("DomComponents").getWrapper(),de=xe.append({})[0],Ee=c.get("Commands").run("core:component-drag",{event:N,guidesInfo:1,center:1,target:de,onEnd:function(He,et,Ge){var yt;if(!Ge.cancelled){yt=xe.append(me)[0];var St=editor.Canvas.getOffset(),bt=de.getStyle(),Jt=bt.top,mt=bt.left,_t=bt.position;yt.addStyle({left:parseFloat(mt)-St.left+"px",top:parseFloat(Jt)-St.top+"px",position:_t})}a.handleDragEnd(yt,C),de.remove()}});Q=function(He){return Ee.stop(N,{cancel:He})},pe=function(He){return me=He}}else{var Fe=new Ce.Sorter((function(He){for(var et=1;et<arguments.length;et++){var Ge=arguments[et]!=null?arguments[et]:{};et%2?j(Object(Ge),!0).forEach((function(yt){(0,ye.Z)(He,yt,Ge[yt])})):Object.getOwnPropertyDescriptors?Object.defineProperties(He,Object.getOwnPropertyDescriptors(Ge)):j(Object(Ge)).forEach((function(yt){Object.defineProperty(He,yt,Object.getOwnPropertyDescriptor(Ge,yt))}))}return He})({em:c,wmargin:1,nested:1,canvasRelative:1,direction:"a",container:this.el,placer:Se.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:"gjs-",onEndMove:function(He){return a.handleDragEnd(He,C)},document:this.el.ownerDocument},this.sortOpts||{}));Fe.setDropContent(me),Fe.startSort(),this.sorter=Fe,Q=function(He){He&&(Fe.moved=0),Fe.endMove()},pe=function(He){return Fe.setDropContent(He)}}this.dragStop=Q,this.dragContent=pe,c.trigger("canvas:dragenter",C,me)}}},{key:"handleDragEnd",value:function(N,a){var c=this.em;this.over=0,N&&(c.set("dragResult",N),c.trigger("canvas:drop",a,N)),c.runDefault({preserveSelected:1})}},{key:"handleDragOver",value:function(N){N.preventDefault(),this.em.trigger("canvas:dragover",N)}},{key:"handleDrop",value:function(N){N.preventDefault();var a=this.dragContent,c=N.dataTransfer,C=this.getContentByData(c).content;N.target.style.border="",C&&a&&a(C),this.endDrop(!C,N)}},{key:"getContentByData",value:function(N){var a=this.em,c=N&&N.types,C=N&&N.files||[],Q=a.get("dragContent"),pe=N&&N.getData("text");if(C.length){pe=[];for(var Ce=0;Ce<C.length;Ce++){var Se=C[Ce],me=Se.type.split("/")[0];me=="image"&&pe.push({type:me,file:Se,attributes:{alt:Se.name}})}}else if(Q)pe=Q;else if((0,fe.indexOf)(c,"text/html")>=0)pe=N&&N.getData("text/html").replace(/<\/?meta[^>]*>/g,"");
237else if((0,fe.indexOf)(c,"text/uri-list")>=0)pe={type:"link",attributes:{href:pe},content:pe};else if((0,fe.indexOf)(c,"text/json")>=0){var xe=N&&N.getData("text/json");xe&&(pe=JSON.parse(xe))}else c.length===1&&c[0]==="text/plain"&&(pe="<div>".concat(pe,"</div>"));var de={content:pe};return a.trigger("canvas:dragdata",N,de),de}}]),q})(),B=(function(){var q=function(N,a){return q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,C){c.__proto__=C}||function(c,C){for(var Q in C)Object.prototype.hasOwnProperty.call(C,Q)&&(c[Q]=C[Q])},q(N,a)};return function(N,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");function c(){this.constructor=N}q(N,a),N.prototype=a===null?Object.create(a):(c.prototype=a.prototype,new c)}})(),X=function(){return X=Object.assign||function(q){for(var N,a=1,c=arguments.length;a<c;a++)for(var C in N=arguments[a])Object.prototype.hasOwnProperty.call(N,C)&&(q[C]=N[C]);return q},X.apply(this,arguments)},_=function(q,N,a){if(a||arguments.length===2)for(var c,C=0,Q=N.length;C<Q;C++)!c&&C in N||(c||(c=Array.prototype.slice.call(N,0,C)),c[C]=N[C]);return q.concat(c||Array.prototype.slice.call(N))},M=(function(q){function N(a,c){var C=q.call(this,{model:a})||this;C.dragging=!1,C.lastMaxHeight=0,C.tools={},(0,fe.bindAll)(C,"updateClientY","stopAutoscroll","autoscroll","_emitUpdate");var Q=C,pe=Q.el;Q.em,C.module._config=X(X({},C.config||{}),{frameView:C}),C.frameWrapView=c,C.showGlobalTools=(0,fe.debounce)(C.showGlobalTools.bind(C),50);var Ce=C.getCanvasModel();return C.listenTo(a,"change:head",C.updateHead),C.listenTo(Ce,"change:styles",C.renderStyles),a.view=C,(0,ie.setViewEl)(pe,C),C}return B(N,q),Object.defineProperty(N.prototype,"tagName",{get:function(){return"iframe"},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"attributes",{get:function(){return{allowfullscreen:"allowfullscreen"}},enumerable:!1,configurable:!0}),N.prototype.updateHead=function(){var a=this.model,c=this.getHead(),C=[],Q=[],pe=a.head,Ce=a.previous("head"),Se=function(xe){return xe===void 0&&(xe={}),Object.keys(xe).sort().map((function(de){return"[".concat(de,'="').concat(xe[de],'"]')})).join("")},me=function(xe,de,Ee){xe.forEach((function(Fe){var He=Fe.tag,et=Fe.attributes;!de.some((function(Ge){return Ge.tag===He&&Se(Ge.attributes)===Se(et)}))&&Ee.push(Fe)}))};me(pe,Ce,Q),me(Ce,pe,C),C.forEach((function(xe){var de,Ee=c.querySelector("".concat(xe.tag).concat(Se(xe.attributes)));(de=Ee?.parentNode)===null||de===void 0||de.removeChild(Ee)})),(0,F.SJ)(c,Q)},N.prototype.getEl=function(){return this.el},N.prototype.getCanvasModel=function(){return this.em.get("Canvas").getModel()},N.prototype.getWindow=function(){return this.getEl().contentWindow},N.prototype.getDoc=function(){return this.getEl().contentDocument},N.prototype.getHead=function(){return this.getDoc().querySelector("head")},N.prototype.getBody=function(){return this.getDoc().querySelector("body")},N.prototype.getWrapper=function(){return this.getBody().querySelector("[data-gjs-type=wrapper]")},N.prototype.getJsContainer=function(){return this.jsContainer||(this.jsContainer=(0,F.ut)("div",{class:"".concat(this.ppfx,"js-cont")})),this.jsContainer},N.prototype.getToolsEl=function(){var a;return(a=this.frameWrapView)===null||a===void 0?void 0:a.elTools},N.prototype.getGlobalToolsEl=function(){return this.em.get("Canvas").getGlobalToolsEl()},N.prototype.getHighlighter=function(){return this._getTool("[data-hl]")},N.prototype.getBadgeEl=function(){return this._getTool("[data-badge]")},N.prototype.getOffsetViewerEl=function(){return this._getTool("[data-offset]")},N.prototype.getRect=function(){return this.rect||(this.rect=this.el.getBoundingClientRect()),this.rect},N.prototype.getOffsetRect=function(){var a=this.el,c=this.getBody(),C=c.scrollTop,Q=c.scrollLeft,pe=a.offsetHeight,Ce=a.offsetWidth;return{top:a.offsetTop,left:a.offsetLeft,height:pe,width:Ce,scrollTop:C,scrollLeft:Q,scrollBottom:C+pe,scrollRight:Q+Ce}},N.prototype._getTool=function(a){var c=this.tools,C=this.getToolsEl();return c[a]||(c[a]=C.querySelector(a)),c[a]},N.prototype.remove=function(){for(var a=[],c=0;c<arguments.length;c++)a[c]=arguments[c];var C=this.wrapper;return this._toggleEffects(!1),this.tools={},C&&C.remove(),z.prototype.remove.apply(this,a),this},N.prototype.startAutoscroll=function(){var a=this;this.lastMaxHeight=this.getWrapper().offsetHeight-this.el.offsetHeight,setTimeout((function(){a._toggleAutoscrollFx(!0),requestAnimationFrame(a.autoscroll)}),0)},N.prototype.autoscroll=function(){if(this.dragging){var a=this.lastClientY,c=this.em.get("Canvas"),C=this.getWindow(),Q=C.pageYOffset,pe=a||0,Ce=c.getConfig().autoscrollLimit,Se=this.getRect().height-Ce,me=Q;pe<Ce&&(me-=Ce-pe),pe>Se&&(me+=pe-Se),!(0,fe.isUndefined)(a)&&me!==Q&&me>0&&me<this.lastMaxHeight&&(this.getGlobalToolsEl().style.opacity=0,this.showGlobalTools(),C.scrollTo(0,me)),requestAnimationFrame(this.autoscroll)}},N.prototype.updateClientY=function(a){a.preventDefault(),this.lastClientY=(0,ie.getPointerEvent)(a).clientY*this.em.getZoomDecimal()},N.prototype.showGlobalTools=function(){this.getGlobalToolsEl().style.opacity=""},N.prototype.stopAutoscroll=function(){this.dragging&&this._toggleAutoscrollFx(!1)},N.prototype._toggleAutoscrollFx=function(a){this.dragging=a;var c=this.getWindow(),C=a?"on":"off",Q={on:ie.on,off:ie.off};Q[C](c,"mousemove dragover",this.updateClientY),Q[C](c,"mouseup",this.stopAutoscroll)},N.prototype.render=function(){var a=this.$el,c=this.ppfx;return a.attr({class:"".concat(c,"frame")}),this.renderScripts(),this},N.prototype.renderScripts=function(){var a=this,c=this,C=c.el,Q=c.model,pe=c.em,Ce="frame:load",Se={el:C,model:Q,view:this},me=this.getCanvasModel(),xe=function(de){var Ee;if(de.length>0){var Fe=de.shift(),He=(0,F.ut)("script",X({type:"text/javascript"},(0,fe.isString)(Fe)?{src:Fe}:Fe));He.onerror=He.onload=xe.bind(null,de),(Ee=C.contentDocument)===null||Ee===void 0||Ee.head.appendChild(He)}else a.renderBody(),pe&&pe.trigger(Ce,Se)};C.onload=function(){var de=a.config.frameContent;if(de){var Ee=a.getDoc();Ee.open(),Ee.write(de),Ee.close()}pe&&pe.trigger("".concat(Ce,":before"),Se),xe(_([],me.get("scripts"),!0))}},N.prototype.renderStyles=function(a){a===void 0&&(a={});var c=this.getHead(),C=this.getCanvasModel(),Q=function(de){return de.map((function(Ee){return{tag:"link",attributes:X({rel:"stylesheet"},(0,fe.isString)(Ee)?{href:Ee}:Ee)}}))},pe=Q(a.prev||C.previous("styles")),Ce=Q(C.get("styles")),Se=[],me=[],xe=function(de,Ee,Fe){de.forEach((function(He){var et=He.attributes.href;!Ee.some((function(Ge){return Ge.attributes.href===et}))&&Fe.push(He)}))};xe(Ce,pe,me),xe(pe,Ce,Se),Se.forEach((function(de){var Ee,Fe=c.querySelector('link[href="'.concat(de.attributes.href,'"]'));(Ee=Fe?.parentNode)===null||Ee===void 0||Ee.removeChild(Fe)})),(0,F.SJ)(c,me)},N.prototype.renderBody=function(){var a,c,C=this,Q=this,pe=Q.config,Ce=Q.em,Se=Q.model,me=Q.ppfx,xe=this.getDoc(),de=this.getBody(),Ee=this.getWindow(),Fe=Ce.config;Ee._isEditor=!0,this.renderStyles({prev:[]}),(0,F.R3)(de,`<style> 238 `.concat(Fe.baseCss||pe.frameStyle||"",` 239 240 [data-gjs-type="wrapper"] { 241 min-height: 100vh; 242 padding-top: 0.001em; 243 } 244 245 .`).concat(me,`dashed *[data-gjs-highlightable] { 246 outline: 1px dashed rgba(170,170,170,0.7); 247 outline-offset: -2px; 248 } 249 250 .`).concat(me,`selected { 251 outline: 2px solid #3b97e3 !important; 252 outline-offset: -2px; 253 } 254 255 .`).concat(me,`selected-parent { 256 outline: 2px solid `).concat("#ffca6f",` !important 257 } 258 259 .`).concat(me,`no-select { 260 user-select: none; 261 -webkit-user-select:none; 262 -moz-user-select: none; 263 } 264 265 .`).concat(me,`freezed { 266 opacity: 0.5; 267 pointer-events: none; 268 } 269 270 .`).concat(me,`no-pointer { 271 pointer-events: none; 272 } 273 274 .`).concat(me,`plh-image { 275 background: #f5f5f5; 276 border: none; 277 height: 100px; 278 width: 100px; 279 display: block; 280 outline: 3px solid #ffca6f; 281 cursor: pointer; 282 outline-offset: -2px 283 } 284 285 .`).concat(me,`grabbing { 286 cursor: grabbing; 287 cursor: -webkit-grabbing; 288 } 289 290 .`).concat(me,`is__grabbing { 291 overflow-x: hidden; 292 } 293 294 .`).concat(me,`is__grabbing, 295 .`).concat(me,`is__grabbing * { 296 cursor: grabbing !important; 297 } 298 299 `).concat(Fe.canvasCss||"",` 300 `).concat(Fe.protectedCss||"",` 301 </style>`));var He=Se.getComponent(),et=Ce.get("DomComponents").getType("wrapper").view;this.wrapper=new et({model:He,config:X(X({},He.config),{em:Ce,frameView:this})}).render(),(0,F.R3)(de,(a=this.wrapper)===null||a===void 0?void 0:a.el),(0,F.R3)(de,new ne.Z({collection:Se.getStyles(),config:X(X({},Ce.get("CssComposer").getConfig()),{frameView:this})}).render().el),(0,F.R3)(de,this.getJsContainer()),(0,ie.on)(de,"click",(function(Ge){var yt;return Ge&&((yt=Ge.target)===null||yt===void 0?void 0:yt.tagName)=="A"&&Ge.preventDefault()})),(0,ie.on)(de,"submit",(function(Ge){return Ge&&Ge.preventDefault()})),[{event:"keydown keyup keypress",class:"KeyboardEvent"}
301,{event:"mousedown mousemove mouseup",class:"MouseEvent"},{event:"pointerdown pointermove pointerup",class:"PointerEvent"},{event:"wheel",class:"WheelEvent"}].forEach((function(Ge){return Ge.event.split(" ").forEach((function(yt){xe.addEventListener(yt,(function(St){return C.el.dispatchEvent((0,F.t3)(St,Ge.class))}))}))})),this._toggleEffects(!0),this.droppable=(0,ie.hasDnd)(Ce)&&new E(Ce,(c=this.wrapper)===null||c===void 0?void 0:c.el),Se.trigger("loaded")},N.prototype._toggleEffects=function(a){var c=a?ie.on:ie.off,C=this.getWindow();C&&c(C,"".concat(F.G1," resize"),this._emitUpdate)},N.prototype._emitUpdate=function(){this.model._emitUpdated()},N})(z);const s=M;var l=S(5610),f=(function(){var q=function(N,a){return q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,C){c.__proto__=C}||function(c,C){for(var Q in C)Object.prototype.hasOwnProperty.call(C,Q)&&(c[Q]=C[Q])},q(N,a)};return function(N,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");function c(){this.constructor=N}q(N,a),N.prototype=a===null?Object.create(a):(c.prototype=a.prototype,new c)}})(),w=function(){return w=Object.assign||function(q){for(var N,a=1,c=arguments.length;a<c;a++)for(var C in N=arguments[a])Object.prototype.hasOwnProperty.call(N,C)&&(q[C]=N[C]);return q},w.apply(this,arguments)};const te=(function(q){function N(a,c){var C=q.call(this,{model:a})||this;return(0,fe.bindAll)(C,"onScroll","frameLoaded","updateOffset","remove","startDrag"),w(w({},a.config),{frameWrapView:C}),C.cv=c,C.frame=new s(a,C),C.classAnim="".concat(C.ppfx,"frame-wrapper--anim"),C.updateOffset=(0,fe.debounce)(C.updateOffset.bind(C),0),C.updateSize=(0,fe.debounce)(C.updateSize.bind(C),0),C.listenTo(a,"loaded",C.frameLoaded),C.listenTo(a,"change:x change:y",C.updatePos),C.listenTo(a,"change:width change:height",C.updateSize),C.listenTo(a,"destroy remove",C.remove),C.updatePos(),C.setupDragger(),C}return f(N,q),N.prototype.events=function(){return{"click [data-action-remove]":"remove","mousedown [data-action-move]":"startDrag"}},N.prototype.setupDragger=function(){var a,c,C,Q=this,pe=this.module,Ce=this.model,Se=function(me){pe.toggleFramesEvents(me)};this.dragger=new l.Z({onStart:function(){var me=Ce.attributes,xe=me.x,de=me.y;C=Q.em.getZoomMultiplier(),a=xe,c=de,Se(!1)},onEnd:function(){return Se(!0)},setPosition:function(me){Ce.set({x:a+me.x*C,y:c+me.y*C})}})},N.prototype.startDrag=function(a){var c;a&&((c=this.dragger)===null||c===void 0||c.start(a))},N.prototype.__clear=function(a){var c=this.frame;c&&c.remove(a),(0,F.L_)(this.elTools)},N.prototype.remove=function(a){var c=this;return this.__clear(a),z.prototype.remove.apply(this,a),["frame","dragger","cv","elTools"].forEach((function(C){return c[C]=0})),this},N.prototype.updateOffset=function(){var a,c=this,C=c.em,Q=c.$el,pe=c.frame;C&&(C.runDefault({preserveSelected:1}),Q.removeClass(this.classAnim),(a=pe?.model)===null||a===void 0||a._emitUpdated())},N.prototype.updatePos=function(a){var c=this.model,C=this.el,Q=c.attributes,pe=Q.x,Ce=Q.y,Se=C.style;this.frame.rect=void 0,Se.left=isNaN(pe)?pe:"".concat(pe,"px"),Se.top=isNaN(Ce)?Ce:"".concat(Ce,"px"),a&&this.updateOffset()},N.prototype.updateSize=function(){this.updateDim()},N.prototype.updateDim=function(){var a=this,c=a.em,C=a.el,Q=a.$el,pe=a.model,Ce=a.classAnim,Se=a.frame;if(Se){Se.rect=void 0,Q.addClass(Ce);var me=this.__handleSize(),xe=me.noChanges,de=me.width,Ee=me.height;((0,fe.isNull)(de)||(0,fe.isNull)(Ee))&&pe.set(w(w({},de?{}:{width:C.offsetWidth}),Ee?{}:{height:C.offsetHeight}),{silent:1}),c.stopDefault({preserveSelected:1}),xe?this.updateOffset():setTimeout(this.updateOffset,350)}},N.prototype.onScroll=function(){var a=this.frame;this.em.trigger("frame:scroll",{frame:a,body:a.getBody(),target:a.getWindow()})},N.prototype.frameLoaded=function(){this.frame.getWindow().onscroll=this.onScroll,this.updateDim()},N.prototype.__handleSize=function(){var a="px",c=this.model,C=this.el.style,Q=c.attributes,pe=Q.width,Ce=Q.height,Se=C.width||"",me=C.height||"",xe=pe||"",de=Ce||"",Ee=Se==xe&&me==de;return C.width=(0,fe.isNumber)(xe)?"".concat(xe).concat(a):xe,C.height=(0,fe.isNumber)(de)?"".concat(de).concat(a):de,{noChanges:Ee,width:pe,height:Ce,newW:xe,newH:de}},N.prototype.render=function(){var a=this,c=a.frame,C=a.$el,Q=a.ppfx,pe=a.cv,Ce=a.model,Se=a.el,me=Ce.attributes.onRender;this.__clear(),this.__handleSize(),c.render(),C.empty().attr({class:"".concat(Q,"frame-wrapper")}).append(` 302 <div class="`.concat(Q,`frame-wrapper__top gjs-two-color" data-frame-top> 303 <div class="`).concat(Q,`frame-wrapper__name" data-action-move> 304 `).concat(Ce.get("name")||"",` 305 </div> 306 <div class="`).concat(Q,`frame-wrapper__top-r"> 307 <div class="`).concat(Q,`frame-wrapper__icon" data-action-remove style="display: none"> 308 <svg viewBox="0 0 24 24">
308<path d="M19 4h-3.5l-1-1h-5l-1 1H5v2h14M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12z"></path></svg> 309 </div> 310 </div> 311 </div> 312 <div class="`).concat(Q,`frame-wrapper__right" data-frame-right></div> 313 <div class="`).concat(Q,`frame-wrapper__left" data-frame-left></div> 314 <div class="`).concat(Q,`frame-wrapper__bottom" data-frame-bottom></div> 315 `)).append(c.el);var xe=(0,F.ut)("div",{class:"".concat(Q,"tools"),style:"pointer-events:none; display: none"},` 316 <div class="`.concat(Q,`highlighter" data-hl></div> 317 <div class="`).concat(Q,`badge" data-badge></div> 318 <div class="`).concat(Q,`placeholder"> 319 <div class="`).concat(Q,`placeholder-int"></div> 320 </div> 321 <div class="`).concat(Q,`ghost"></div> 322 <div class="`).concat(Q,`toolbar" style="pointer-events:all"></div> 323 <div class="`).concat(Q,`resizer"></div> 324 <div class="`).concat(Q,`offset-v" data-offset> 325 <div class="gjs-marginName" data-offset-m> 326 <div class="gjs-margin-v-el gjs-margin-v-top" data-offset-m-t></div> 327 <div class="gjs-margin-v-el gjs-margin-v-bottom" data-offset-m-b></div> 328 <div class="gjs-margin-v-el gjs-margin-v-left" data-offset-m-l></div> 329 <div class="gjs-margin-v-el gjs-margin-v-right" data-offset-m-r></div> 330 </div> 331 <div class="gjs-paddingName" data-offset-m> 332 <div class="gjs-padding-v-el gjs-padding-v-top" data-offset-p-t></div> 333 <div class="gjs-padding-v-el gjs-padding-v-bottom" data-offset-p-b></div> 334 <div class="gjs-padding-v-el gjs-padding-v-left" data-offset-p-l></div> 335 <div class="gjs-padding-v-el gjs-padding-v-right" data-offset-p-r></div> 336 </div> 337 </div> 338 <div class="`).concat(Q,`offset-fixed-v"></div> 339 `));this.elTools=xe;var de=pe?.toolsWrapper;return de&&de.appendChild(xe),me&&me({el:Se,elTop:Se.querySelector("[data-frame-top]"),elRight:Se.querySelector("[data-frame-right]"),elBottom:Se.querySelector("[data-frame-bottom]"),elLeft:Se.querySelector("[data-frame-left]"),frame:Ce,frameWrapperView:this,remove:this.remove,startDrag:this.startDrag}),this},N})(z);var J=(function(){var q=function(N,a){return q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,C){c.__proto__=C}||function(c,C){for(var Q in C)Object.prototype.hasOwnProperty.call(C,Q)&&(c[Q]=C[Q])},q(N,a)};return function(N,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");function c(){this.constructor=N}q(N,a),N.prototype=a===null?Object.create(a):(c.prototype=a.prototype,new c)}})(),R=(function(q){function N(a,c){a===void 0&&(a={});var C=q.call(this,a,!0)||this;return C.listenTo(C.collection,"reset",C.render),C.canvasView=c.canvasView,C._module=c.module,C}return J(N,q),N.prototype.onRemoveBefore=function(a,c){c===void 0&&(c={}),a.forEach((function(C){return C.remove(c)}))},N.prototype.onRender=function(){var a=this.$el,c=this.ppfx;a.attr({class:"".concat(c,"frames")})},N.prototype.renderView=function(a,c){return new te(a,this.canvasView)},N})(H);const k=R;var v=(function(){var q=function(N,a){return q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,C){c.__proto__=C}||function(c,C){for(var Q in C)Object.prototype.hasOwnProperty.call(C,Q)&&(c[Q]=C[Q])},q(N,a)};return function(N,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");function c(){this.constructor=N}q(N,a),N.prototype=a===null?Object.create(a):(c.prototype=a.prototype,new c)}})(),b=function(){return b=Object.assign||function(q){for(var N,a=1,c=arguments.length;a<c;a++)for(var C in N=arguments[a])Object.prototype.hasOwnProperty.call(N,C)&&(q[C]=N[C]);return q},b.apply(this,arguments)},h=(function(q){function N(a){var c=q.call(this,{model:a})||this;c.ready=!1,(0,fe.bindAll)(c,"clearOff","onKeyPress","onCanvasMove"),c.className=c.pfx+"canvas";var C=c.em;return c._initFrames(),c.listenTo(C,"change:canvasOffset",c.clearOff),c.listenTo(C,"component:selected",c.checkSelected),c.listenTo(a,"change:zoom change:x change:y",c.updateFrames),c.listenTo(a,"change:frames",c._onFramesUpdate),c.toggleListeners(!0),c}return v(N,q),N.prototype.events=function(){return{wheel:"onWheel"}},N.prototype.template=function(){var a=this.pfx;return` 340 <div class="`.concat(a,`canvas__frames" data-frames></div> 341 <div id="`).concat(a,'tools" class="').concat(a,`canvas__tools" data-tools></div> 342 `)},N.prototype._onFramesUpdate=function(){this._initFrames(),this._renderFrames()},N.prototype._initFrames=function(){var a=this,c=a.frames,C=a.model,Q=a.config,pe=a.em,Ce=C.frames;pe.set("readyCanvas",0),Ce.once("loaded:all",(function(){return pe.set("readyCanvas",1)})),c?.remove(),this.frames=new k({collection:Ce},b(b({},Q),{canvasView:this}))},N.prototype.checkSelected=function(a,c){var C;c===void 0&&(c={});var Q=c.scroll,pe=this.em.get("currentFrame");
342Q&&((C=a.views)===null||C===void 0||C.forEach((function(Ce){Ce._getFrame()===pe&&Ce.scrollIntoView(Q)})))},N.prototype.remove=function(){for(var a,c=[],C=0;C<arguments.length;C++)c[C]=arguments[C];return(a=this.frames)===null||a===void 0||a.remove(),this.frames=void 0,z.prototype.remove.apply(this,c),this.toggleListeners(!1),this},N.prototype.preventDefault=function(a){var c;a&&(a.preventDefault(),(c=a._parentEvent)===null||c===void 0||c.preventDefault())},N.prototype.onCanvasMove=function(a){},N.prototype.toggleListeners=function(a){this.el;var c=a?ie.on:ie.off;c(document,"keypress",this.onKeyPress),c(window,"scroll resize",this.clearOff)},N.prototype.onKeyPress=function(a){var c=this.em;(0,ie.getKeyChar)(a)!==" "||c.getZoomDecimal()===1||c.get("Canvas").isInputFocused()||(this.preventDefault(a),c.get("Editor").runCommand("core:canvas-move"))},N.prototype.onWheel=function(a){if((a.ctrlKey||a.metaKey)&&this.em.getConfig().multiFrames){this.preventDefault(a);var c=this.model,C=Math.max(-1,Math.min(1,a.wheelDelta||-a.detail)),Q=c.get("zoom");c.set("zoom",Q+2*C)}},N.prototype.updateFrames=function(a){var c=this.em,C=this.model.attributes,Q=C.x,pe=C.y,Ce=this.getZoom(),Se={preserveSelected:1},me=Ce?1/Ce:1;this.framesArea.style.transform="scale(".concat(Ce,") translate(").concat(Q*me,"px, ").concat(pe*me,"px)"),this.clearOff(),c.stopDefault(Se),c.trigger("canvas:update",a),this.timerZoom&&clearTimeout(this.timerZoom),this.timerZoom=setTimeout((function(){return c.runDefault(Se)}),300)},N.prototype.getZoom=function(){return this.em.getZoomDecimal()},N.prototype.isElInViewport=function(a){var c=(0,ie.getElement)(a),C=(0,ie.getElRect)(c),Q=this.getFrameOffset(c),pe=C.top,Ce=C.left;return pe>=0&&Ce>=0&&pe<=Q.height&&Ce<=Q.width},N.prototype.offset=function(a,c){var C,Q;c===void 0&&(c={});var pe=(0,ie.getElRect)(a),Ce=a?.ownerDocument.body,Se=c.noScroll;return{top:pe.top+(Se?0:(C=Ce?.scrollTop)!==null&&C!==void 0?C:0),left:pe.left+(Se?0:(Q=Ce?.scrollLeft)!==null&&Q!==void 0?Q:0),width:pe.width,height:pe.height}},N.prototype.clearOff=function(){this.frmOff=void 0,this.cvsOff=void 0},N.prototype.getFrameOffset=function(a){var c;if(!this.frmOff||a){var C=(c=this.frame)===null||c===void 0?void 0:c.el,Q=a?.ownerDocument.defaultView,pe=Q?Q.frameElement:C;this.frmOff=this.offset(pe||C)}return this.frmOff},N.prototype.getCanvasOffset=function(){return this.cvsOff||(this.cvsOff=this.offset(this.el)),this.cvsOff},N.prototype.getElementPos=function(a,c){c===void 0&&(c={});var C=this.getZoom(),Q=c||{},pe=this.getFrameOffset(a),Ce=this.el,Se=this.getCanvasOffset(),me=this.offset(a,c),xe=Q.avoidFrameOffset?0:pe.top,de=Q.avoidFrameOffset?0:pe.left;return{top:me.top*C+xe-Se.top+Ce.scrollTop,left:me.left*C+de-Se.left+Ce.scrollLeft,height:me.height*C,width:me.width*C,zoom:C,rect:me}},N.prototype.getElementOffsets=function(a){var c=this;if(!a||(0,ie.isTextNode)(a))return{};var C={},Q=window.getComputedStyle(a);return["marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft"].forEach((function(pe){C[pe]=parseFloat(Q[pe])*c.getZoom()})),C},N.prototype.getPosition=function(a){var c;a===void 0&&(a={});var C=(c=this.frame)===null||c===void 0?void 0:c.el.contentDocument;if(C){var Q=C.body,pe=this.getZoom(),Ce=this.getFrameOffset(),Se=this.getCanvasOffset(),me=a.noScroll;return{top:Ce.top+(me?0:Q.scrollTop)*pe-Se.top,left:Ce.left+(me?0:Q.scrollLeft)*pe-Se.left,width:Se.width,height:Se.height}}},N.prototype.updateScript=function(a){var c=a.model,C=c.getId();a.scriptContainer||(a.scriptContainer=(0,F.ut)("div",{"data-id":C}),this.getJsContainer().appendChild(a.scriptContainer)),a.el.id=C,a.scriptContainer.innerHTML="";var Q=document.createElement("script"),pe=c.getScriptString(),Ce=c.get("script-props")?pe:`function(){ 343`.concat(pe,` 344;}`),Se=JSON.stringify(c.__getScriptProps());Q.innerHTML=` 345 setTimeout(function() { 346 var item = document.getElementById('`.concat(C,`'); 347 if (!item) return; 348 (`).concat(Ce,".bind(item))(").concat(Se,`) 349 }, 1);`),setTimeout((function(){var me=a.scriptContainer;me?.appendChild(Q)}),0)},N.prototype.getJsContainer=function(a){var c=this.getFrameView(a);return c&&c.getJsContainer()},N.prototype.getFrameView=function(a){return a?._getFrame()||this.em.get("currentFrame")},N.prototype._renderFrames=function(){if(this.ready){var a=this,c=a.model,C=a.frames,Q=a.em,pe=a.framesArea,Ce=c.frames;Ce.listenToLoad(),C.render();var Se=Ce.at(0),me=Se?.view;Q.setCurrentFrame(me),pe?.appendChild(C.el),this.frame=me}},N.prototype.render=function(){var a=this,c=a.el,C=a.$el,Q=a.ppfx,pe=a.config,Ce=a.em;C.html(this.template());var Se=C.find("[data-frames]");this.framesArea=Se.get(0);var me=C.find("[data-tools]");this.toolsWrapper=me.get(0),me.append(` 350 <div class="`.concat(Q,"tools ").concat(Q,`tools-gl" style="pointer-events:none"> 351 <div class="`).concat(Q,`placeholder"> 352 <div class="`).concat(Q,`placeholder-int"></div> 353 </div> 354 </div> 355 <div id="`).concat(Q,`tools" style="pointer-events:none"> 356 `).concat(pe.extHl?'<div class="'.concat(Q,'highlighter-sel"></div>'):"",` 357 <div class="`).concat(Q,`badge"></div> 358 <div class="`).concat(Q,`ghost"></div> 359 <div class="`).concat(Q,`toolbar" style="pointer-events:all"></div> 360 <div class="`).concat(Q,`resizer"></div> 361 <div class="`).concat(Q,`offset-v"></div> 362 <div class="`).concat(Q,`offset-fixed-v"></div> 363 </div> 364 `));var xe=c.querySelector("#".concat(Q,"tools"));return this.hlEl=c.querySelector(".".concat(Q,"highlighter")),this.badgeEl=c.querySelector(".".concat(Q,"badge")),this.placerEl=c.querySelector(".".concat(Q,"placeholder")),this.ghostEl=c.querySelector(".".concat(Q,"ghost")),this.toolbarEl=c.querySelector(".".concat(Q,"toolbar")),this.resizerEl=c.querySelector(".".concat(Q,"resizer")),this.offsetEl=c.querySelector(".".concat(Q,"offset-v")),this.fixedOffsetEl=c.querySelector(".".concat(Q,"offset-fixed-v")),this.toolsGlobEl=c.querySelector(".".concat(Q,"tools-gl")),this.toolsEl=xe,this.el.className=(0,ie.getUiClass)(Ce,this.className),this.ready=!0,this._renderFrames(),this},N})(z);const m=h;var p=(function(){var q=function(N,a){return q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,C){c.__proto__=C}||function(c,C){for(var Q in C)Object.prototype.hasOwnProperty.call(C,Q)&&(c[Q]=C[Q])},q(N,a)};return function(N,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");function c(){this.constructor=N}
364q(N,a),N.prototype=a===null?Object.create(a):(c.prototype=a.prototype,new c)}})(),y=function(){return y=Object.assign||function(q){for(var N,a=1,c=arguments.length;a<c;a++)for(var C in N=arguments[a])Object.prototype.hasOwnProperty.call(N,C)&&(q[C]=N[C]);return q},y.apply(this,arguments)},Z=function(q,N,a){if(a||arguments.length===2)for(var c,C=0,Q=N.length;C<Q;C++)!c&&C in N||(c||(c=Array.prototype.slice.call(N,0,C)),c[C]=N[C]);return q.concat(c||Array.prototype.slice.call(N))};const Y=(function(q){function N(a){var c=q.call(this,a,"Canvas",ce)||this;return c.canvas=new P(c),c.model=c.canvas,c.startAutoscroll=c.startAutoscroll.bind(c),c.stopAutoscroll=c.stopAutoscroll.bind(c),c}return p(N,q),N.prototype.getCanvasView=function(){return this.canvasView},N.prototype.init=function(){},N.prototype.onLoad=function(){this.model.init()},N.prototype.getModel=function(){return this.canvas},N.prototype.getElement=function(){return this.getCanvasView().el},N.prototype.getFrame=function(a){return this.getFrames()[a||0]},N.prototype.getFrameEl=function(){var a=(this.canvasView||{}).frame;return a?.el},N.prototype.getFramesEl=function(){var a;return(a=this.canvasView)===null||a===void 0?void 0:a.framesArea},N.prototype.getWindow=function(){var a=(this.canvasView||{}).frame;return a?.getWindow()},N.prototype.getDocument=function(){var a=this.getFrameEl();return a?.contentDocument},N.prototype.getBody=function(){var a=this.getDocument();return a?.body},N.prototype._getLocalEl=function(a,c,C){var Q=a,pe=c?._getFrame();return Q=pe?pe[C]():Q},N.prototype.getGlobalToolsEl=function(){var a;return(a=this.canvasView)===null||a===void 0?void 0:a.toolsGlobEl},N.prototype.getToolsEl=function(a){return this._getLocalEl(this.getCanvasView().toolsEl,a,"getToolsEl")},N.prototype.getHighlighter=function(a){return this._getLocalEl(this.getCanvasView().hlEl,a,"getHighlighter")},N.prototype.getBadgeEl=function(a){return this._getLocalEl(this.getCanvasView().badgeEl,a,"getBadgeEl")},N.prototype.getPlacerEl=function(){return this.getCanvasView().placerEl},N.prototype.getGhostEl=function(){return this.getCanvasView().ghostEl},N.prototype.getToolbarEl=function(){return this.getCanvasView().toolbarEl},N.prototype.getResizerEl=function(){return this.getCanvasView().resizerEl},N.prototype.getOffsetViewerEl=function(a){return this._getLocalEl(this.getCanvasView().offsetEl,a,"getOffsetViewerEl")},N.prototype.getFixedOffsetViewerEl=function(){return this.getCanvasView().fixedOffsetEl},N.prototype.render=function(){var a;return(a=this.canvasView)===null||a===void 0||a.remove(),this.canvasView=new m(this.canvas),this.canvasView.render().el},N.prototype.getOffset=function(){var a=this.offset(this.getFrameEl()),c=this.offset(this.getElement());return{top:a.top-c.top,left:a.left-c.left}},N.prototype.offset=function(a){return this.getCanvasView().offset(a)},N.prototype.setCustomBadgeLabel=function(a){this.config.customBadgeLabel=a},N.prototype.getElementPos=function(a,c){return this.getCanvasView().getElementPos(a,c)},N.prototype.getElementOffsets=function(a){return this.getCanvasView().getElementOffsets(a)},N.prototype.getRect=function(){var a,c=(a=this.getCanvasView().getPosition())!==null&&a!==void 0?a:{},C=c.top,Q=C===void 0?0:C,pe=c.left,Ce=pe===void 0?0:pe;return y(y({},this.getCanvasView().getCanvasOffset()),{topScroll:Q,leftScroll:Ce})},N.prototype.getTargetToElementDim=function(a,c,C){C===void 0&&(C={});var Q=C||{},pe=this.getCanvasView().getPosition();if(pe){var Ce=Q.elPos||this.getCanvasView().getElementPos(c),Se=C.toRight||0,me=Q.targetHeight||a.offsetHeight,xe=Q.targetWidth||a.offsetWidth,de=Q.event||null,Ee=Ce.top-me,Fe=Ce.left;Fe+=Se?Ce.width:0;var He=(Fe=Se?Fe-xe:Fe)<pe.left?pe.left:Fe,et=Ee<pe.top?pe.top:Ee,Ge={top:et=et>Ce.top+Ce.height?Ce.top+Ce.height:et,left:He,elementTop:Ce.top,elementLeft:Ce.left,elementWidth:Ce.width,elementHeight:Ce.height,targetWidth:a.offsetWidth,targetHeight:a.offsetHeight,canvasTop:pe.top,canvasLeft:pe.left,canvasWidth:pe.width,canvasHeight:pe.height};return de&&this.em&&this.em.trigger(de,Ge),Ge}},N.prototype.canvasRectOffset=function(a,c,C){var Q=this;C===void 0&&(C={});var pe=function(Ce,Se,me){Se===void 0&&(Se=1);var xe=Q.em.getZoomDecimal(),de=Se?"top":"left",Ee=Ce.ownerDocument,Fe=C.offset?(function(De){var Ze=De.defaultView;return Ze?.frameElement})(Ee):{},He=Fe.offsetTop,et=He===void 0?0:He,Ge=Fe.offsetLeft,yt=Ge===void 0?0:Ge,St=Ee.body||{},bt=St.scrollTop,Jt=bt===void 0?0:bt,mt=St.scrollLeft,_t=Se?Jt:mt===void 0?0:mt,Oe=Se?et:yt;return me[de]-(_t-Oe)*xe};
364return{top:pe(a,1,c),left:pe(a,0,c)}},N.prototype.getTargetToElementFixed=function(a,c,C){var Q;C===void 0&&(C={});var pe=C.pos||this.getElementPos(a),Ce=C.canvasOff||this.canvasRectOffset(a,pe),Se=c.offsetHeight||0,me=c.offsetWidth||0,xe=pe.left+pe.width,de=this.getCanvasView(),Ee=de.getPosition(),Fe=de.getFrameOffset(a),He=C.event,et=-Se,Ge=(0,fe.isUndefined)(C.left)?pe.width-me:C.left;Ge=pe.left<-Ge?-pe.left:Ge;var yt=(Q=Ee?.width)!==null&&Q!==void 0?Q:0;Ge=xe>yt?Ge-(xe-yt):Ge;var St=pe.height+Se,bt=St<Fe.height;Ce.top<Se&&(bt?et+=St:et=-Ce.top<pe.height?-Ce.top:pe.height);var Jt={top:et,left:Ge,canvasOffsetTop:Ce.top,canvasOffsetLeft:Ce.left};return He&&this.em.trigger(He,Jt),Jt},N.prototype.getMouseRelativePos=function(a,c){c===void 0&&(c={});var C=0,Q=0,pe=c.subWinOffset,Ce=a.target.ownerDocument,Se=Ce.defaultView||Ce.parentWindow,me=Se.frameElement,xe=pe?Se.pageYOffset:0,de=pe?Se.pageXOffset:0;if(me){var Ee=me.getBoundingClientRect();C=Ee.top||0,Q=Ee.left||0}return{y:a.clientY+C-xe,x:a.clientX+Q-de}},N.prototype.getMouseRelativeCanvas=function(a,c){var C,Q=this.getZoomDecimal(),pe=(C=this.getCanvasView().getPosition(c))!==null&&C!==void 0?C:{},Ce=pe.top,Se=Ce===void 0?0:Ce,me=pe.left,xe=me===void 0?0:me;return{y:a.clientY*Q+Se,x:a.clientX*Q+xe}},N.prototype.hasFocus=function(){return this.getDocument().hasFocus()},N.prototype.isInputFocused=function(){var a=this.getDocument(),c=this.getFrameEl(),C=Z(["body"],this.config.notTextable,!0),Q=c&&document.activeElement===c?a&&a.activeElement:document.activeElement;return Q&&!C.some((function(pe){return Q.matches(pe)}))},N.prototype.scrollTo=function(a,c){c===void 0&&(c={});var C=(0,ie.getElement)(a),Q=C&&(0,ie.getViewEl)(C);Q&&Q.scrollIntoView(c)},N.prototype.startAutoscroll=function(a){var c=a&&a.view||this.em.getCurrentFrame();c&&c.startAutoscroll()},N.prototype.stopAutoscroll=function(a){var c=a&&a.view||this.em.getCurrentFrame();c&&c.stopAutoscroll()},N.prototype.setZoom=function(a){return this.canvas.set("zoom",parseFloat(a)),this},N.prototype.getZoom=function(){return parseFloat(this.canvas.get("zoom"))},N.prototype.setCoords=function(a,c){return this.canvas.set({x:parseFloat(a),y:parseFloat(c)}),this},N.prototype.getCoords=function(){var a=this.canvas.attributes;return{x:a.x,y:a.y}},N.prototype.getZoomDecimal=function(){return this.getZoom()/100},N.prototype.getZoomMultiplier=function(){var a=this.getZoomDecimal();return a?1/a:1},N.prototype.toggleFramesEvents=function(a){this.getFramesEl().style.pointerEvents=a?"":"none"},N.prototype.getFrames=function(){return this.canvas.frames.map((function(a){return a}))},N.prototype.addFrame=function(a,c){return a===void 0&&(a={}),c===void 0&&(c={}),this.canvas.frames.add(new x.Z(this,y({},a)),c)},N.prototype.destroy=function(){var a,c=this;this.canvas.stopListening(),(a=this.canvasView)===null||a===void 0||a.remove(),["model","droppable"].forEach((function(C){return c[C]={}}))},N})(D.Z)},6840:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>g});var fe,D=S(9050),ie=S(7904),ce=S(1163),ae=(fe=function(P,x){return fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,$){A.__proto__=$}||function(A,$){for(var re in $)Object.prototype.hasOwnProperty.call($,re)&&(A[re]=$[re])},fe(P,x)},function(P,x){if(typeof x!="function"&&x!==null)throw new TypeError("Class extends value "+String(x)+" is not a constructor or null");function A(){this.constructor=P}fe(P,x),P.prototype=x===null?Object.create(x):(A.prototype=x.prototype,new A)}),se=function(){return se=Object.assign||function(P){for(var x,A=1,$=arguments.length;A<$;A++)for(var re in x=arguments[A])Object.prototype.hasOwnProperty.call(x,re)&&(P[re]=x[re]);return P},se.apply(this,arguments)},oe=function(P,x,A){if(A||arguments.length===2)for(var $,re=0,z=x.length;re<z;re++)!$&&re in x||($||($=Array.prototype.slice.call(x,0,re)),$[re]=x[re]);return P.concat($||Array.prototype.slice.call(x))},W="__aw",I="__ah";const g=(function(P){function x(A,$){var re=P.call(this,A,$)||this,z=re.em,F=re.attributes,G=F.styles,H=F.component,ne=z.get("DomComponents"),ye=ne.getConfig(),ee=z.get("CssComposer").getAll(),O={},j={em:z,config:ye,frame:re,idMap:O};if(!(0,ce.isComponent)(H)){var E=(0,ce.isObject)(H)?H:{components:H};!E.type&&(E.type="wrapper");var B=ne.getType("wrapper").model;re.set("component",new B(E,j))}return G?(0,ce.isObject)(G)||(Object.keys(O).length&&Array.isArray(G)&&G.forEach((function(X){var _=X.selectors;if(_&&_.length==1){var M=_[0],s=M.name&&M.type===2&&M;if(s&&O[s.name])s.name=O[s.name];else if((0,D.isString)(M)&&M[0]==="#"){var l=M.substring(1);l&&O[l]&&(_[0]="#".concat(O[l]))}}})),ee.add(G),re.set("styles",ee)):re.set("styles",ee),!$.width&&re.set(W,1),!$.height&&re.set(I,1),re}return ae(x,P),x.prototype.defaults=function(){return{x:0,y:0,changesCount:0,attributes:{},width:null,height:null,head:[],component:"",styles:"",_undo:!0,_und
364oexc:["changesCount"]}},Object.defineProperty(x.prototype,"head",{get:function(){return this.get("head")},enumerable:!1,configurable:!0}),x.prototype.onRemove=function(){this.getComponent().remove({root:1})},x.prototype.changesUp=function(A){A===void 0&&(A={}),A.temporary||A.noCount||A.avoidStore||this.set("changesCount",this.get("changesCount")+1)},x.prototype.getComponent=function(){return this.get("component")},x.prototype.getStyles=function(){return this.get("styles")},x.prototype.disable=function(){this.trigger("disable")},x.prototype.remove=function(){this.view=void 0;var A=this.collection;return A&&A.remove(this)},x.prototype.getHead=function(){return oe([],this.head,!0)},x.prototype.setHead=function(A){return this.set("head",oe([],A,!0))},x.prototype.addHeadItem=function(A){this.head.push(A)},x.prototype.getHeadByAttr=function(A,$,re){return this.head.filter((function(z){return z.attributes&&z.attributes[A]==$&&(!re||re===z.tag)}))[0]},x.prototype.removeHeadByAttr=function(A,$,re){var z=this.getHeadByAttr(A,$,re),F=this.head.indexOf(z);F>=0&&this.head.splice(F,1)},x.prototype.addLink=function(A){var $="link";!this.getHeadByAttr("href",A,$)&&this.addHeadItem({tag:$,attributes:{href:A,rel:"stylesheet"}})},x.prototype.removeLink=function(A){this.removeHeadByAttr("href",A,"link")},x.prototype.addScript=function(A){var $="script";!this.getHeadByAttr("src",A,$)&&this.addHeadItem({tag:$,attributes:{src:A}})},x.prototype.removeScript=function(A){this.removeHeadByAttr("src",A,"script")},x.prototype.getPage=function(){var A;return(A=this.collection)===null||A===void 0?void 0:A.page},x.prototype._emitUpdated=function(A){A===void 0&&(A={}),this.em.trigger("frame:updated",se({frame:this},A))},x.prototype.toJSON=function(A){A===void 0&&(A={});var $=ie.Z.prototype.toJSON.call(this,A),re=(0,D.result)(this,"defaults");return A.fromUndo&&delete $.component,delete $.styles,delete $.changesCount,$[W]&&delete $.width,$[I]&&delete $.height,(0,D.forEach)($,(function(z,F){F.indexOf("_")===0&&delete $[F]})),(0,D.forEach)(re,(function(z,F){$[F]===z&&delete $[F]})),(0,D.forEach)(["attributes","head"],(function(z){(0,D.isEmpty)($[z])&&delete $[z]})),$},x})(ie.Z)},3560:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>ae});var fe,D=S(9050),ie=S(2316),ce=(fe=function(se,oe){return fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(W,I){W.__proto__=I}||function(W,I){for(var g in I)Object.prototype.hasOwnProperty.call(I,g)&&(W[g]=I[g])},fe(se,oe)},function(se,oe){if(typeof oe!="function"&&oe!==null)throw new TypeError("Class extends value "+String(oe)+" is not a constructor or null");function W(){this.constructor=se}fe(se,oe),se.prototype=oe===null?Object.create(oe):(W.prototype=oe.prototype,new W)});const ae=(function(se){function oe(W,I){I===void 0&&(I=[]);var g=se.call(this,I)||this;return g.loadedItems=0,g.itemsToLoad=0,g.module=W,(0,D.bindAll)(g,"itemLoaded"),g.on("reset",g.onReset),g.on("remove",g.onRemove),g}return ce(oe,se),oe.prototype.onReset=function(W,I){var g=this;(I?.previousModels||[]).map((function(P){return g.onRemove(P)}))},oe.prototype.onRemove=function(W){W?.onRemove()},oe.prototype.itemLoaded=function(){this.loadedItems++,this.loadedItems>=this.itemsToLoad&&(this.trigger("loaded:all"),this.listenToLoadItems(!1))},oe.prototype.listenToLoad=function(){this.loadedItems=0,this.itemsToLoad=this.length,this.listenToLoadItems(!0)},oe.prototype.listenToLoadItems=function(W){var I=this;this.forEach((function(g){return g[W?"on":"off"]("loaded",I.itemLoaded)}))},oe})(ie.Collection)},5819:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>fr});var fe=S(9050);const D={stylePrefix:"comp-",components:[],draggableComponents:1,processor:0,voidElements:["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"]};var ie=S(7375),ce=S(8431),ae=S(2169),se=S(5671),oe=S(3144),W=S(9340),I=S(2963),g=S(1120);function P(L){var V=(function(){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}})();return function(){var u,i=(0,g.Z)(L);if(V){var T=(0,g.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,I.Z)(this,u)}}var x=(function(L){(0,W.Z)(u,L);var V=P(u);function u(){return(0,se.Z)(this,u),V.apply(this,arguments)}return(0,oe.Z)(u,[{key:"tagName",value:function(){return"div"}}]),u})(ae.Z),A=S(3505),$=S(4942),re=S(1163);function z(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function F(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};
364V%2?z(Object(u),!0).forEach((function(i){(0,$.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):z(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}const G=ie.ZP.extend({defaults:F(F({},ie.ZP.prototype.defaults),{},{type:"cell",tagName:"td",draggable:["tr"]})},{isComponent:function(L){return["td","th"].indexOf((0,re.toLowerCase)(L.tagName))>=0}}),H=ae.Z.extend({});function ne(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function ye(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?ne(Object(u),!0).forEach((function(i){(0,$.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):ne(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}var ee="tr";const O=ie.ZP.extend({defaults:ye(ye({},ie.ZP.prototype.defaults),{},{tagName:ee,draggable:["thead","tbody","tfoot"],droppable:["th","td"]})},{isComponent:function(L){return(0,re.toLowerCase)(L.tagName)===ee}}),j=ae.Z.extend({});function E(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function B(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?E(Object(u),!0).forEach((function(i){(0,$.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):E(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}var X="table";const _=ie.ZP.extend({defaults:B(B({},ie.ZP.prototype.defaults),{},{type:X,tagName:X,droppable:["tbody","thead","tfoot"]}),initialize:function(L,V){ie.ZP.prototype.initialize.apply(this,arguments);var u=this.get("components");!u.length&&u.add({type:"tbody"})}},{isComponent:function(L){return(0,re.toLowerCase)(L.tagName)===X}}),M=ae.Z.extend({events:{}});function s(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function l(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?s(Object(u),!0).forEach((function(i){(0,$.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):s(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}var f="tbody";const w=ie.ZP.extend({defaults:l(l({},ie.ZP.prototype.defaults),{},{type:f,tagName:f,draggable:["table"],droppable:["tr"],columns:1,rows:1}),initialize:function(L,V){ie.ZP.prototype.initialize.apply(this,arguments);var u=this.get("components"),i=this.get("columns"),T=this.get("rows");if(!u.length){for(var le=[];T--;){for(var ve=[],_e=i;_e--;)ve.push({type:"cell",classes:["cell"]});le.push({type:"row",classes:["row"],components:ve})}u.add(le)}}},{isComponent:function(L){return(0,re.toLowerCase)(L.tagName)===f}});function te(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function J(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?te(Object(u),!0).forEach((function(i){(0,$.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):te(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}var R="thead";
364const k=w.extend({defaults:J(J({},w.prototype.defaults),{},{type:R,tagName:R})},{isComponent:function(L){return(0,re.toLowerCase)(L.tagName)===R}}),v=ae.Z.extend({});function b(L){var V=(function(){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}})();return function(){var u,i=(0,g.Z)(L);if(V){var T=(0,g.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,I.Z)(this,u)}}var h=(function(L){(0,W.Z)(u,L);var V=b(u);function u(){return(0,se.Z)(this,u),V.apply(this,arguments)}return(0,oe.Z)(u)})(ae.Z);function m(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function p(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?m(Object(u),!0).forEach((function(i){(0,$.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):m(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}var y="tfoot";const Z=w.extend({defaults:p(p({},w.prototype.defaults),{},{type:y,tagName:y})},{isComponent:function(L){return(0,re.toLowerCase)(L.tagName)===y}}),Y=ae.Z.extend({});function q(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function N(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?q(Object(u),!0).forEach((function(i){(0,$.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):q(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}var a='xmlns="http://www.w3.org/2000/svg" width="100" viewBox="0 0 24 24" style="fill: rgba(0,0,0,0.15); transform: scale(0.75)"';const c=ie.ZP.extend({defaults:N(N({},ie.ZP.prototype.defaults),{},{type:"image",tagName:"img",void:!0,droppable:0,editable:1,highlightable:0,resizable:{ratioDefault:1},traits:["alt"],src:"<svg ".concat(a,`> 365 <path d="M8.5 13.5l2.5 3 3.5-4.5 4.5 6H5m16 1V5a2 2 0 0 0-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2z"></path> 366 </svg>`),fallback:"<svg ".concat(a,`> 367 <path d="M2.28 3L1 4.27l2 2V19c0 1.1.9 2 2 2h12.73l2 2L21 21.72 2.28 3m2.55 0L21 19.17V5a2 2 0 0 0-2-2H4.83M8.5 13.5l2.5 3 1-1.25L14.73 18H5l3.5-4.5z"></path> 368 </svg>`),file:""}),initialize:function(L,V){ie.ZP.prototype.initialize.apply(this,arguments);var u=this.get("attributes"),i=u.src;i&&(0,re.buildBase64UrlFromSvg)((0,fe.result)(this,"defaults").src)!==i&&this.set("src",i,{silent:1})},initToolbar:function(){for(var L=arguments.length,V=new Array(L),u=0;u<L;u++)V[u]=arguments[u];ie.ZP.prototype.initToolbar.apply(this,V);var i=this.em;if(i){var T=i.get("Commands"),le="image-editor";if(T.has(le)){for(var ve=!1,_e=this.get("toolbar"),Le=0;Le<_e.length;Le++)if(_e[Le].command==="image-editor"){ve=!0;break}ve||(_e.push({attributes:{class:"fa fa-pencil"},command:le}),this.set("toolbar",_e))}}},getAttrToHTML:function(){for(var L=arguments.length,V=new Array(L),u=0;u<L;u++)V[u]=arguments[u];var i=ie.ZP.prototype.getAttrToHTML.apply(this,V),T=this.getSrcResult();return T&&(i.src=T),i},getSrcResult:function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},V=this.get(L.fallback?"fallback":"src")||"",u=V;return V&&V.substr(0,4)==="<svg"&&(u=(0,re.buildBase64UrlFromSvg)(V)),u},isDefaultSrc:function(){var L=this.get("src"),V=(0,fe.result)(this,"defaults").src;return L===V||L===(0,re.buildBase64UrlFromSvg)(V)},toJSON:function(){for(var L=arguments.length,V=new Array(L),u=0;u<L;u++)V[u]=arguments[u];var i=ie.ZP.prototype.toJSON.apply(this,V);return i.attributes&&i.src===i.attributes.src&&delete i.src,i},parseUri:function(L){var V=document.createElement("a");V.href=L;for(var u={},i=V.search.substring(1).split("&"),T=0;T<i.length;T++){var le=i[T].split("="),ve=decodeURIComponent(le[0]);ve&&(u[ve]=decodeURIComponent(le[1]))}return{hostname:V.hostname,pathname:V.pathname,protocol:V.protocol,search:V.search,hash:V.hash,port:V.port,query:u}}},{isComponent:function(L){return(0,re.toLowerCase)(L.tagName)==="img"}});function C(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function Q(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};
368V%2?C(Object(u),!0).forEach((function(i){(0,$.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):C(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}const pe=c.extend({defaults:Q(Q({},c.prototype.defaults),{},{type:"map",src:"",void:0,mapUrl:"https://maps.google.com/maps",tagName:"iframe",mapType:"q",address:"",zoom:"1",attributes:{frameborder:0},toolbar:ie.ZP.prototype.defaults.toolbar,traits:[{label:"Address",name:"address",placeholder:"eg. London, UK",changeProp:1},{type:"select",label:"Map type",name:"mapType",changeProp:1,options:[{value:"q",name:"Roadmap"},{value:"w",name:"Satellite"}]},{label:"Zoom",name:"zoom",type:"range",min:"1",max:"20",changeProp:1}]}),initialize:function(L,V){this.get("src")?this.parseFromSrc():this.updateSrc(),c.prototype.initialize.apply(this,arguments),this.listenTo(this,"change:address change:zoom change:mapType",this.updateSrc)},updateSrc:function(){this.set("src",this.getMapUrl())},getMapUrl:function(){var L=this,V=L.get("address"),u=L.get("zoom"),i=L.get("mapType");V=V?"&q="+V:"",u=u?"&z="+u:"",i=i?"&t="+i:"";var T=L.get("mapUrl")+"?"+V+u+i;return T+="&output=embed"},parseFromSrc:function(){var L=this.parseUri(this.get("src")).query;L.q&&this.set("address",L.q),L.z&&this.set("zoom",L.z),L.t&&this.set("mapType",L.t)}},{isComponent:function(L){var V="";return(0,re.toLowerCase)(L.tagName)=="iframe"&&/maps\.google\.com/.test(L.src)&&(V={type:"map",src:L.src}),V}});function Ce(L){var V=(function(){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}})();return function(){var u,i=(0,g.Z)(L);if(V){var T=(0,g.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,I.Z)(this,u)}}var Se=(function(L){(0,W.Z)(u,L);var V=Ce(u);function u(){return(0,se.Z)(this,u),V.apply(this,arguments)}return(0,oe.Z)(u,[{key:"tagName",value:function(){return"img"}},{key:"events",value:function(){return{dblclick:"onActive",click:"initResize",error:"onError",load:"onLoad",dragstart:"noDrag"}}},{key:"initialize",value:function(i){ae.Z.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:src",this.updateSrc),this.classEmpty="".concat(this.ppfx,"plh-image"),this.fetchFile()}},{key:"fetchFile",value:function(){if(!this.modelOpt.temporary){var i=this.model,T=this.em,le=i.get("file");if(le&&T){var ve=T.get("AssetManager").FileUploader();ve?.uploadFile({dataTransfer:{files:[le]}},(function(_e){var Le=_e&&_e.data&&_e.data[0],Ke=Le&&((0,fe.isString)(Le)?Le:Le.src);Ke&&i.set({src:Ke})})),i.set("file","")}}}},{key:"updateSrc",value:function(){var i=this.model,T=this.classEmpty,le=this.$el,ve=i.getSrcResult(),_e=ve&&!i.isDefaultSrc();i.addAttributes({src:ve}),le[_e?"removeClass":"addClass"](T)}},{key:"onActive",value:function(i){i&&i.stopPropagation();var T=this.em,le=this.model,ve=T&&T.get("AssetManager");ve&&le.get("editable")&&ve.open({select:function(_e,Le){le.set({src:_e.getSrc()}),Le&&ve.close()},target:le,types:["image"],accept:"image/*"})}},{key:"onError",value:function(){var i=this.model.getSrcResult({fallback:1});i&&(this.el.src=i)}},{key:"onLoad",value:function(){this.em.trigger("change:canvasOffset")}},{key:"noDrag",value:function(i){return i.preventDefault(),!1}},{key:"render",value:function(){if(this.renderAttributes(),this.modelOpt.temporary)return this;this.updateSrc();var i=this.$el,T=this.model,le=i.attr("class")||"";return!T.get("src")&&i.attr("class","".concat(le," ").concat(this.classEmpty).trim()),this.postRender(),this}}]),u})(ae.Z);function me(L){var V=(function(){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}})();return function(){var u,i=(0,g.Z)(L);if(V){var T=(0,g.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,I.Z)(this,u)}}var xe=(function(L){(0,W.Z)(u,L);var V=me(u);function u(){return(0,se.Z)(this,u),V.apply(this,arguments)}return(0,oe.Z)(u,[{key:"tagName",value:function(){return"div"}},{key:"events",value:function(){return{}}},{key:"initialize",value:function(i){Se.prototype.initialize.apply(this,arguments),this.classEmpty=this.ppfx+"plh-map"}},{key:"updateSrc",value:function(){this.getIframe().src=this.model.get("src")}},{key:"getIframe",value:function(){if(!this.iframe){var i=document.createElement("iframe");i.src=this.model.get("src"),i.frameBorder=0,i.style.height="100%",i.style.width="100%",i.className=this.ppfx+"no-pointer",this.iframe=i}return this.iframe}},{key:"render",value:function(){for(var i=arguments.length,T=new Array(i),le=0;le<i;le++)T[le]=arguments[le];return Se.prototype.render.apply(this,T),this.updateClasses(),this.el.appendChild(this.getIframe()),this}}]),u})(Se);function de(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function Ee(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};
368V%2?de(Object(u),!0).forEach((function(i){(0,$.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):de(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}function Fe(L){var V=(function(){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}})();return function(){var u,i=(0,g.Z)(L);if(V){var T=(0,g.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,I.Z)(this,u)}}var He=(function(L){(0,W.Z)(u,L);var V=Fe(u);function u(){return(0,se.Z)(this,u),V.apply(this,arguments)}return(0,oe.Z)(u)})(ie.ZP);function et(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function Ge(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?et(Object(u),!0).forEach((function(i){(0,$.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):et(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}function yt(L){var V=(function(){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}})();return function(){var u,i=(0,g.Z)(L);if(V){var T=(0,g.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,I.Z)(this,u)}}He.prototype.defaults=Ee(Ee({},ie.ZP.getDefaults()),{},{type:"text",droppable:!1,editable:!0});var St="link",bt=(function(L){(0,W.Z)(u,L);var V=yt(u);function u(){return(0,se.Z)(this,u),V.apply(this,arguments)}return(0,oe.Z)(u)})(He);bt.prototype.defaults=Ge(Ge({},He.getDefaults()),{},{type:St,tagName:"a",traits:["title","href","target"]}),bt.isComponent=function(L){var V,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if((0,re.toLowerCase)(L.tagName)==="a"){var i=u.textTags||[];V={type:St,editable:!1};var T=L.childNodes,le=T.length;le||delete V.editable,(0,fe.forEach)(T,(function(ve){var _e=ve.tagName;(ve.nodeType==3&&ve.textContent.trim()!==""||_e&&i.indexOf((0,re.toLowerCase)(_e))>=0)&&delete V.editable}))}return V};var Jt=S(5861),mt=S(7757),_t=S.n(mt);function Oe(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function De(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?Oe(Object(u),!0).forEach((function(i){(0,$.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):Oe(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}function Ze(L){var V=(function(){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}})();return function(){var u,i=(0,g.Z)(L);if(V){var T=(0,g.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,I.Z)(this,u)}}var Ue=ae.Z.prototype,rt=(function(L){(0,W.Z)(T,L);var V,u,i=Ze(T);function T(){return(0,se.Z)(this,T),i.apply(this,arguments)}return(0,oe.Z)(T,[{key:"events",value:function(){return{dblclick:"onActive",input:"onInput"}}},{key:"initialize",value:function(le){Ue.initialize.apply(this,arguments),(0,fe.bindAll)(this,"disableEditing","onDisable");var ve=this.model,_e=this.em;this.listenTo(ve,"focus",this.onActive),this.listenTo(ve,"change:content",this.updateContentText),this.listenTo(ve,"sync:content",this.syncContent),this.rte=_e&&_e.get("RichTextEditor")}},{key:"updateContentText",value:function(le,ve){var _e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};!_e.fromDisable&&this.disableEditing()}},{key:"canActivate",value:function(){var le,ve=this.model,_e=this.rteEnabled,Le=this.em,Ke=Le?.getEditing()===ve,qe=!0,Je=!1;if((_e||!ve.get("editable")||Ke||(Je=ve.isChildOf("text")))&&(qe=!1,Je&&!ve.get("textable"))){for(var Qe=ve.parent();Qe&&!Qe.isInstanceOf("text");)Qe=Qe.parent();Qe&&Qe.get("editable")?le=Qe:qe=!0}return{result:qe,delegate:le}}},{key:"onActive",value:(u=(0,Jt.Z)(_t().mark((function le(ve){var _e,Le,Ke,qe,Je,Qe,ct;return _t().wrap((function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:if(Le=this.rte,Ke=this.em,qe=this.canActivate(),Je=qe.result,Qe=qe.delegate,Je){Ct.next=5;break}return Qe&&(ve==null||(ct=ve.stopPropagation)===null||ct===void 0||ct.call(ve),Ke.setSelected(Qe),Qe.trigger("active",ve)),Ct.abrupt("return");case 5:if(ve==null||(_e=ve.stopPropagation)===null||_e===void 0||_e.call(ve),this.lastContent=this.getContent(),!Le){Ct.
368next=17;break}return Ct.prev=8,Ct.next=11,Le.enable(this,this.activeRte,{event:ve});case 11:this.activeRte=Ct.sent,Ct.next=17;break;case 14:Ct.prev=14,Ct.t0=Ct.catch(8),Ke.logError(Ct.t0);case 17:this.toggleEvents(1);case 18:case"end":return Ct.stop()}}),le,this,[[8,14]])}))),function(le){return u.apply(this,arguments)})},{key:"onDisable",value:function(){this.disableEditing()}},{key:"disableEditing",value:(V=(0,Jt.Z)(_t().mark((function le(){var ve,_e,Le,Ke,qe,Je,Qe=arguments;return _t().wrap((function(ct){for(;;)switch(ct.prev=ct.next){case 0:if(ve=Qe.length>0&&Qe[0]!==void 0?Qe[0]:{},_e=this.model,Le=this.rte,Ke=this.activeRte,qe=this.em,Je=_e&&_e.get("editable"),!Le){ct.next=13;break}return ct.prev=4,ct.next=7,Le.disable(this,Ke);case 7:ct.next=12;break;case 9:ct.prev=9,ct.t0=ct.catch(4),qe.logError(ct.t0);case 12:Je&&this.getContent()!==this.lastContent&&(this.syncContent(ve),this.lastContent="");case 13:this.toggleEvents();case 14:case"end":return ct.stop()}}),le,this,[[4,9]])}))),function(){return V.apply(this,arguments)})},{key:"getContent",value:function(){var le=this.activeRte;return le&&typeof le.getContent=="function"?le.getContent():this.getChildrenContainer().innerHTML}},{key:"syncContent",value:function(){var le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ve=this.model,_e=this.rte,Le=this.rteEnabled;if(Le||le.force){var Ke=this.getContent(),qe=ve.components(),Je=De({fromDisable:1},le);ve.set("content","",Je),_e.customRte?(qe.length&&qe.reset(null,le),ve.set("content",Ke,Je)):qe.resetFromString(Ke,le)}}},{key:"insertComponent",value:function(le){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_e=this.model,Le=this.el,Ke=Le.ownerDocument,qe=Ke.getSelection();if(qe!=null&&qe.rangeCount){var Je,Qe=qe.getRangeAt(0),ct=Qe.startContainer,Ct=Qe.startOffset,Mt=(0,re.getModel)(ct),It=[];if(Mt&&(Je=Mt.is)!==null&&Je!==void 0&&Je.call(Mt,"textnode")){var Gt=Mt.collection;Gt.forEach((function(zt){if(zt===Mt){var an="textnode",xn=zt.get("content");It.push({type:an,content:xn.slice(0,Ct)}),It.push(le),It.push({type:an,content:xn.slice(Ct)})}else It.push(zt)}));var on=It.filter(Boolean),ln=on.indexOf(le);return Gt.reset(on,ve),Gt.at(ln)}}return _e.append(le,ve)}},{key:"onInput",value:function(){var le=this.em,ve="component",_e=["".concat(ve,":update"),"".concat(ve,":input")].join(" ");le&&le.trigger(_e,this.model)}},{key:"disablePropagation",value:function(le){le.stopPropagation()}},{key:"toggleEvents",value:function(le){var ve=this.em,_e=this.model,Le=this.$el,Ke={on:re.on,off:re.off},qe=le?"on":"off";ve.setEditing(le?this:0),this.rteEnabled=!!le;var Je=[this.el.ownerDocument,document];if(Ke.off(Je,"mousedown",this.onDisable),Ke[qe](Je,"mousedown",this.onDisable),ve[qe]("toolbar:run:before",this.onDisable),_e&&(_e[qe]("removed",this.onDisable),_e.trigger("rte:".concat(le?"enable":"disable"))),Le&&Le.off("mousedown",this.disablePropagation),Le&&Le[qe]("mousedown",this.disablePropagation),this.config.draggableComponents)for(var Qe=this.el;Qe;)Qe.draggable=!le,(Qe=Qe.parentNode)&&Qe.tagName=="BODY"&&(Qe=0)}}]),T})(ae.Z);function Te(L){var V=(function(){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}})();return function(){var u,i=(0,g.Z)(L);if(V){var T=(0,g.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,I.Z)(this,u)}}var Ne=(function(L){(0,W.Z)(u,L);var V=Te(u);function u(){return(0,se.Z)(this,u),V.apply(this,arguments)}return(0,oe.Z)(u,[{key:"render",value:function(){for(var i=arguments.length,T=new Array(i),le=0;le<i;le++)T[le]=arguments[le];return rt.prototype.render.apply(this,T),this.el.addEventListener("click",this.prevDef,!0),this}}]),u})(rt);function $e(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function at(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};
368V%2?$e(Object(u),!0).forEach((function(i){(0,$.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):$e(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}var tt="label";const wt=He.extend({defaults:at(at({},He.prototype.defaults),{},{type:tt,tagName:tt,traits:["id","title","for"]})},{isComponent:function(L){return(0,re.toLowerCase)(L.tagName)===tt}});function it(L){var V=(function(){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}})();return function(){var u,i=(0,g.Z)(L);if(V){var T=(0,g.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,I.Z)(this,u)}}var Rt=(function(L){(0,W.Z)(u,L);var V=it(u);function u(){return(0,se.Z)(this,u),V.apply(this,arguments)}return(0,oe.Z)(u,[{key:"tagName",value:function(){return"span"}}]),u})(Ne);function Ut(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function $t(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?Ut(Object(u),!0).forEach((function(i){(0,$.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):Ut(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}var Yt="video",Xt="yt",Bt="vi",ut="ytnc",Zt=function(L){return L&&L!=="0"};const Sn=c.extend({defaults:$t($t({},c.prototype.defaults),{},{type:Yt,tagName:Yt,videoId:"",void:0,provider:"so",ytUrl:"https://www.youtube.com/embed/",ytncUrl:"https://www.youtube-nocookie.com/embed/",viUrl:"https://player.vimeo.com/video/",loop:0,poster:"",muted:0,autoplay:0,controls:1,color:"",list:"",rel:1,modestbranding:0,sources:[],attributes:{allowfullscreen:"allowfullscreen"}}),initialize:function(L,V){this.em=V.em,this.get("src")&&this.parseFromSrc(),this.updateTraits(),this.listenTo(this,"change:provider",this.updateTraits),this.listenTo(this,"change:videoId change:provider",this.updateSrc),c.prototype.initialize.apply(this,arguments)},updateTraits:function(){var L,V="iframe";switch(this.get("provider")){case Xt:case ut:L=this.getYoutubeTraits();break;case Bt:L=this.getVimeoTraits();break;default:V="video",L=this.getSourceTraits()}this.set({tagName:V},{silent:1}),this.set({traits:L}),this.em.trigger("component:toggled")},parseFromSrc:function(){var L=this.get("provider"),V=this.parseUri(this.get("src")),u=V.query;switch(L){case Xt:case ut:case Bt:this.set("videoId",V.pathname.split("/").pop()),u.list&&this.set("list",u.list),Zt(u.autoplay)&&this.set("autoplay",1),Zt(u.loop)&&this.set("loop",1),parseInt(u.controls)===0&&this.set("controls",0),Zt(u.color)&&this.set("color",u.color),u.rel==="0"&&this.set("rel",0),u.modestbranding==="1"&&this.set("modestbranding",1)}},updateSrc:function(){var L="";switch(this.get("provider")){case Xt:L=this.getYoutubeSrc();break;case ut:L=this.getYoutubeNoCookieSrc();break;case Bt:L=this.getVimeoSrc()}this.set({src:L})},getAttrToHTML:function(){for(var L=arguments.length,V=new Array(L),u=0;u<L;u++)V[u]=arguments[u];var i=c.prototype.getAttrToHTML.apply(this,V),T=this.get("provider");switch(T){case Xt:case ut:case Bt:break;default:this.get("loop")&&(i.loop="loop"),this.get("autoplay")&&(i.autoplay="autoplay"),this.get("controls")&&(i.controls="controls")}return i},getProviderTrait:function(){return{type:"select",label:"Provider",name:"provider",changeProp:1,options:[{value:"so",name:"HTML5 Source"},{value:Xt,name:"Youtube"},{value:ut,name:"Youtube (no cookie)"},{value:Bt,name:"Vimeo"}]}},getSourceTraits:function(){return[this.getProviderTrait(),{label:"Source",name:"src",placeholder:"eg. ./media/video.mp4",changeProp:1},{label:"Poster",name:"poster",placeholder:"eg. ./media/image.jpg"},this.getAutoplayTrait(),this.getLoopTrait(),this.getControlsTrait()]},getYoutubeTraits:function(){return[this.getProviderTrait(),{label:"Video ID",name:"videoId",placeholder:"eg. jNQXAC9IVRw",changeProp:1},this.getAutoplayTrait(),this.getLoopTrait(),this.getControlsTrait(),{type:"checkbox",label:"Related",name:"rel",changeProp:1},{type:"checkbox",label:"Modest",name:"modestbranding",changeProp:1}]},getVimeoTraits:function(){return[this.getProviderTrait(),{label:"Video ID",name:"videoId",placeholder:"eg. 123456789",changeProp:1},{label:"Color",name:"color",placeholder:"eg. FF0000",changeProp:1},this.getAutoplayTrait(),this.getLoopTrait()]},getAutoplayTrait:function(){return{type:"checkbox",label:"Autoplay",name:"autoplay",changeProp:1}},getLoopTrait:function(){return{type:"checkbox",label:"Loop",name:"loop",changeProp:1}},getControlsTrait:function(){return{type:"checkbox",label:"Controls",name:"controls",changeProp:1}},getYoutubeSrc:function(){var L=this.get("videoId"),V=this.get("ytUrl"),u=this.get("list");return V+=L+(L.indexOf("?")<0?"?":""),V+=u?"&list=".concat(u):"",V+=this.get("autoplay")?"&autoplay=1":"",V+=this.get("controls")?"":"&controls=0&showinfo=0",V+=this.get("loop")?"&loop=1&playlist=".concat(L):"",V+=this.get("rel")?"":"&rel=0",V+=this.get("modestbranding")?"&modestbranding=1":""},getYoutubeNoCookieSrc:function(){var L=this.getYoutubeSrc();return L=L.replace(this.get("ytUrl"),this.get("ytncUrl"))},getVimeoSrc:function(){var L=this.get("viUrl");return L+=this.get("videoId")+"?",L+=this.get("autoplay")?"&autoplay=1":"",L+=this.get("loop")?"&loop=1":"",L+=this.get("controls")?"":"&title=0&portrait=0&badge=0",L+=this.get("color")?"&color="+this.get("color"):""}},{isComponent:function(L){var V="",u=L.tagName,i=L.src,T=/youtube\.com\/embed/.test(i),le=/youtube-nocookie\.com\/embed/.test(i),ve=/player\.vimeo\.com\/video/.test(i),_e=T||le||ve;return((0,re.toLowerCase)(u)==Yt||(0,re.toLowerCase)(u)=="iframe"&&_e)&&(V={type:"video"}
368,i&&(V.src=i),_e&&(T?V.provider=Xt:le?V.provider=ut:ve&&(V.provider=Bt))),V}});function yn(L){var V=(function(){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}})();return function(){var u,i=(0,g.Z)(L);if(V){var T=(0,g.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,I.Z)(this,u)}}var cn=(function(L){(0,W.Z)(u,L);var V=yn(u);function u(){return(0,se.Z)(this,u),V.apply(this,arguments)}return(0,oe.Z)(u,[{key:"tagName",value:function(){return"div"}},{key:"events",value:function(){return{}}},{key:"initialize",value:function(i){ae.Z.prototype.initialize.apply(this,arguments);var T=this.model,le=["loop","autoplay","controls","color","rel","modestbranding","poster"],ve=le.map((function(_e){return"change:".concat(_e)})).join(" ");this.listenTo(T,"change:provider",this.updateProvider),this.listenTo(T,"change:src",this.updateSrc),this.listenTo(T,ve,this.updateVideo)}},{key:"updateProvider",value:function(){var i=this.model.get("provider");this.el.innerHTML="",this.el.appendChild(this.renderByProvider(i))}},{key:"updateSrc",value:function(){var i=this.model,T=this.videoEl;if(T){var le=i.get("provider"),ve=i.get("src");switch(le){case"yt":ve=i.getYoutubeSrc();break;case"ytnc":ve=i.getYoutubeNoCookieSrc();break;case"vi":ve=i.getVimeoSrc()}T.src=ve}}},{key:"updateVideo",value:function(){var i=this.model.get("provider"),T=this.videoEl,le=this.model;switch(i){case"yt":case"ytnc":case"vi":this.model.trigger("change:videoId");break;default:T.loop=le.get("loop"),T.autoplay=le.get("autoplay"),T.controls=le.get("controls"),T.poster=le.get("poster")}}},{key:"renderByProvider",value:function(i){var T;switch(i){case"yt":T=this.renderYoutube();break;case"ytnc":T=this.renderYoutubeNoCookie();break;case"vi":T=this.renderVimeo();break;default:T=this.renderSource()}return this.videoEl=T,T}},{key:"renderSource",value:function(){var i=document.createElement("video");return i.src=this.model.get("src"),this.initVideoEl(i),i}},{key:"renderYoutube",value:function(){var i=document.createElement("iframe");return i.src=this.model.getYoutubeSrc(),i.frameBorder=0,i.setAttribute("allowfullscreen",!0),this.initVideoEl(i),i}},{key:"renderYoutubeNoCookie",value:function(){var i=document.createElement("iframe");return i.src=this.model.getYoutubeNoCookieSrc(),i.frameBorder=0,i.setAttribute("allowfullscreen",!0),this.initVideoEl(i),i}},{key:"renderVimeo",value:function(){var i=document.createElement("iframe");return i.src=this.model.getVimeoSrc(),i.frameBorder=0,i.setAttribute("allowfullscreen",!0),this.initVideoEl(i),i}},{key:"initVideoEl",value:function(i){i.className=this.ppfx+"no-pointer",i.style.height="100%",i.style.width="100%"}},{key:"render",value:function(){for(var i=arguments.length,T=new Array(i),le=0;le<i;le++)T[le]=arguments[le];Se.prototype.render.apply(this,T),this.updateClasses();var ve=this.model.get("provider");return this.el.appendChild(this.renderByProvider(ve)),this.updateVideo(),this}}]),u})(Se);function sn(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function tn(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?sn(Object(u),!0).forEach((function(i){(0,$.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):sn(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}var un="script";const In=ie.ZP.extend({defaults:tn(tn({},ie.ZP.prototype.defaults),{},{type:un,tagName:un,droppable:!1,draggable:!1,layerable:!1})},{isComponent:function(L){if((0,re.toLowerCase)(L.tagName)==un){var V={type:un};return L.src&&(V.src=L.src,V.onload=L.onload),V}}});function _n(L){var V=(function(){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}})();return function(){var u,i=(0,g.Z)(L);if(V){var T=(0,g.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,I.Z)(this,u)}}var wn=(function(L){(0,W.Z)(u,L);var V=_n(u);function u(){return(0,se.Z)(this,u),V.apply(this,arguments)}return(0,oe.Z)(u,[{key:"tagName",value:function(){return"script"}},{key:"events",value:function(){return{}}},{key:"render",value:function(){var i=this.model,T=this.em,le=i.get("src"),ve=T&&T.get("scriptCount"),_e=ve||0,Le="";if(le){var Ke=i.get("onload"),qe="script".concat(_e),Je="script".concat(_e+1),Qe="".concat(qe,"Start"),ct="".concat(Je,"Start");Le=` 369 var `.concat(qe,` = document.createElement('script'); 370 `).concat(qe,`.onload = function() { 371 `).concat(Ke?"".concat(Ke,`(); 372`):"",` 373 typeof `).concat(ct," == 'function' && ").concat(ct,`(); 374 }; 375 `).concat(qe,".src = '").concat(le,`'; 376 function `).concat(Qe,"() { document.body.appendChild(").concat(qe,`); }; 377 `).concat(_e?"":"".concat(Qe,"();"),` 378 `),T&&T.set("scriptCount",_e+1)}else Le=i.__innerHTML();return this.el.innerHTML=Le,this.postRender(),this}}]),u})(Se);function An(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function Tn(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};
378V%2?An(Object(u),!0).forEach((function(i){(0,$.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):An(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}var nn="svg";const Pn=ie.ZP.extend({defaults:Tn(Tn({},ie.ZP.prototype.defaults),{},{type:nn,tagName:nn,highlightable:0,resizable:{ratioDefault:1}}),getName:function(){var L=this.get("tagName"),V=this.get("custom-name");return L=L.charAt(0).toUpperCase()+L.slice(1),V||L}},{isComponent:function(L){return(0,re.toLowerCase)(L.tagName)===nn}});function Qn(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function rn(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?Qn(Object(u),!0).forEach((function(i){(0,$.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):Qn(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}const ht=Pn.extend({defaults:rn(rn({},Pn.prototype.defaults),{},{selectable:!1,hoverable:!1,layerable:!1})},{isComponent:function(L){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return!!V.inSvg}});function Fn(L){var V=(function(){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}})();return function(){var u,i=(0,g.Z)(L);if(V){var T=(0,g.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,I.Z)(this,u)}}var qn=(function(L){(0,W.Z)(u,L);var V=Fn(u);function u(){return(0,se.Z)(this,u),V.apply(this,arguments)}return(0,oe.Z)(u,[{key:"_createElement",value:function(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}}]),u})(ae.Z);function dn(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function Kt(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?dn(Object(u),!0).forEach((function(i){(0,$.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):dn(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}const Vt=ie.ZP.extend({defaults:Kt(Kt({},ie.ZP.prototype.defaults),{},{tagName:"",droppable:!1,layerable:!1,selectable:!1,editable:!0}),toHTML:function(){var L=this.parent(),V=this.get("content");return L&&L.is("script")?V:(0,re.escape)(V)}},{isComponent:function(L){var V="";return L.nodeType===3&&(V={type:"textnode",content:L.textContent}),V}});function Rn(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}const Wt=Vt.extend({defaults:(function(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?Rn(Object(u),!0).forEach((function(i){(0,$.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):Rn(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L})({},Vt.prototype.defaults),toHTML:function(){return"<!--".concat(this.get("content"),"-->")}},{isComponent:function(L){if(L.nodeType==8)return{tagName:"NULL",type:"comment",content:L.textContent}}});function st(L){var V=(function(){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}})();return function(){var u,i=(0,g.Z)(L);if(V){var T=(0,g.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,I.Z)(this,u)}}var Nt=(function(L){(0,W.Z)(u,L);var V=st(u);function u(){return(0,se.Z)(this,u),V.apply(this,arguments)}return(0,oe.Z)(u,[{key:"initialize",value:function(){ae.Z.prototype.initialize.apply(this,arguments)}},{key:"_setAttributes",value:function(){}},{key:"renderAttributes",value:function(){}},{key:"updateStatus",value:function(){}},{key:"updateClasses",value:function(){}},{key:"setAttribute",value:function(){}},{key:"updateAttributes",value:function(){}},{key:"initClasses",value:function(){}},{key:"initComponents",value:function(){}},{key:"delegateEvents",value:function(){}},{key:"_createElement",value:function(){return document.createTextNode("")}},{key:"render",value:function(){var i=this.model,T=this.el;return i.opt.temporary||(T.textContent=i.get("content")),this}}]),u})(ae.Z);function be(L){var V=(function(){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}})();return function(){var u,i=(0,g.Z)(L);if(V){var T=(0,g.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,I.Z)(this,u)}}var Pe=(function(L){(0,W.Z)(u,L);var V=be(u);function u(){return(0,se.Z)(this,u),V.apply(this,arguments)}return(0,oe.Z)(u,[{key:"_createElement",value:function(){return document.createComment(this.model.get("content"))}}]),u})(Nt);function Xe(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function gt(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};
378V%2?Xe(Object(u),!0).forEach((function(i){(0,$.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):Xe(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}function kt(L){var V=(function(){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}})();return function(){var u,i=(0,g.Z)(L);if(V){var T=(0,g.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,I.Z)(this,u)}}var ft=(function(L){(0,W.Z)(u,L);var V=kt(u);function u(){return(0,se.Z)(this,u),V.apply(this,arguments)}return(0,oe.Z)(u,[{key:"defaults",value:function(){return gt(gt({},ie.ZP.getDefaults()),{},{tagName:"body",removable:!1,copyable:!1,draggable:!1,components:[],traits:[],stylable:["background","background-color","background-image","background-repeat","background-attachment","background-position","background-size"]})}},{key:"__postAdd",value:function(){var i=this.em&&this.em.get("UndoManager");return i&&!this.__hasUm&&i.add(this),ie.ZP.prototype.__postAdd.call(this,arguments)}},{key:"__postRemove",value:function(){var i=this.em&&this.em.get("UndoManager");return i&&i.remove(this),ie.ZP.prototype.__postRemove.call(this,arguments)}}]),u})(ie.ZP);function qt(L,V){var u=Object.keys(L);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(L);V&&(i=i.filter((function(T){return Object.getOwnPropertyDescriptor(L,T).enumerable}))),u.push.apply(u,i)}return u}function gn(L){for(var V=1;V<arguments.length;V++){var u=arguments[V]!=null?arguments[V]:{};V%2?qt(Object(u),!0).forEach((function(i){(0,$.Z)(L,i,u[i])})):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(u)):qt(Object(u)).forEach((function(i){Object.defineProperty(L,i,Object.getOwnPropertyDescriptor(u,i))}))}return L}ft.isComponent=function(){return!1};var kn="iframe";const Vn=ie.ZP.extend({defaults:function(){return gn(gn({},ie.ZP.prototype.defaults),{},{type:kn,tagName:kn,droppable:!1,resizable:!0,traits:["id","title","src"],attributes:{frameborder:"0"}})}},{isComponent:function(L){return(0,re.toLowerCase)(L.tagName)===kn}});var er=S(9283);function cr(L){var V=(function(){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}})();return function(){var u,i=(0,g.Z)(L);if(V){var T=(0,g.Z)(this).constructor;u=Reflect.construct(i,arguments,T)}else u=i.apply(this,arguments);return(0,I.Z)(this,u)}}var Wn,tr=(function(L){(0,W.Z)(u,L);var V=cr(u);function u(){return(0,se.Z)(this,u),V.apply(this,arguments)}return(0,oe.Z)(u,[{key:"tagName",value:function(){return"div"}},{key:"initialize",value:function(){for(var i=arguments.length,T=new Array(i),le=0;le<i;le++)T[le]=arguments[le];ae.Z.prototype.initialize.apply(this,T),this.listenTo(this.model,"change:attributes:src",this.updateSrc)}},{key:"updateSrc",value:function(){var i=(0,er.sE)(this.el,"iframe")[0];i&&(0,er.FW)(i,{src:this.__getSrc()})}},{key:"render",value:function(){for(var i=arguments.length,T=new Array(i),le=0;le<i;le++)T[le]=arguments[le];ae.Z.prototype.render.apply(this,T);var ve=(0,er.ut)("iframe",{class:"".concat(this.ppfx,"no-pointer"),style:"width: 100%; height: 100%; border: none",src:this.__getSrc()});return this.el.appendChild(ve),this}},{key:"__getSrc",value:function(){return this.model.getAttributes().src||""}}]),u})(ae.Z.extend),ur=S(6434),nr=(Wn=function(L,V){return Wn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,i){u.__proto__=i}||function(u,i){for(var T in i)Object.prototype.hasOwnProperty.call(i,T)&&(u[T]=i[T])},Wn(L,V)},function(L,V){if(typeof V!="function"&&V!==null)throw new TypeError("Class extends value "+String(V)+" is not a constructor or null");function u(){this.constructor=L}
378Wn(L,V),L.prototype=V===null?Object.create(V):(u.prototype=V.prototype,new u)}),Qt=function(){return Qt=Object.assign||function(L){for(var V,u=1,i=arguments.length;u<i;u++)for(var T in V=arguments[u])Object.prototype.hasOwnProperty.call(V,T)&&(L[T]=V[T]);return L},Qt.apply(this,arguments)},Bn=function(L,V){var u={};for(var i in L)Object.prototype.hasOwnProperty.call(L,i)&&V.indexOf(i)<0&&(u[i]=L[i]);if(L!=null&&typeof Object.getOwnPropertySymbols=="function"){var T=0;for(i=Object.getOwnPropertySymbols(L);T<i.length;T++)V.indexOf(i[T])<0&&Object.prototype.propertyIsEnumerable.call(L,i[T])&&(u[i[T]]=L[i[T]])}return u},rr=(function(L){function V(u){var i=L.call(this,u,"DomComponents",new ce.Z(void 0,{em:u}))||this;for(var T in i.componentTypes=[{id:"cell",model:G,view:H},{id:"row",model:O,view:j},{id:"table",model:_,view:M},{id:"thead",model:k,view:v},{id:"tbody",model:w,view:h},{id:"tfoot",model:Z,view:Y},{id:"map",model:pe,view:xe},{id:"link",model:bt,view:Ne},{id:"label",model:wt,view:Rt},{id:"video",model:Sn,view:cn},{id:"image",model:c,view:Se},{id:"script",model:In,view:wn},{id:"svg-in",model:ht,view:qn},{id:"svg",model:Pn,view:qn},{id:"iframe",model:Vn,view:tr},{id:"comment",model:Wt,view:Pe},{id:"textnode",model:Vt,view:Nt},{id:"text",model:He,view:rt},{id:"wrapper",model:ft,view:x},{id:"default",model:ie.ZP,view:ae.Z}],i.componentsById={},i.Component=ie.ZP,i.Components=ce.Z,i.ComponentsView=A.Z,i.storageKey="components",u&&(i.config.components=u.config.components||i.config.components),D)T in i.config||(i.config[T]=D[T]);var le=i.config.pStylePrefix;if(le&&(i.config.stylePrefix=le+i.config.stylePrefix),u){i.config.modal=u.get("Modal")||"",i.config.am=u.get("AssetManager")||"",u.get("Parser").compTypes=i.componentTypes,u.on("change:componentHovered",i.componentHovered,i);var ve=u.get("selected");u.listenTo(ve,"add",(function(_e,Le,Ke){return i.selectAdd(ve.getComponent(_e),Ke)})),u.listenTo(ve,"remove",(function(_e,Le,Ke){return i.selectRemove(ve.getComponent(_e),Ke)}))}return i}return nr(V,L),V.prototype.load=function(u){var i=this;return this.loadProjectData(u,{onResult:function(T){var le=i.getWrapper();if(le||(i.em.get("PageManager").add({},{select:!0}),le=i.getWrapper()),(0,fe.isArray)(T))T.length&&le.components(T);else{var ve=T.components,_e=ve===void 0?[]:ve,Le=Bn(T,["components"]);le.set(Le),le.components(_e)}}})},V.prototype.store=function(){return{}},V.prototype.getComponent=function(){var u=this.em.get("PageManager").getSelected(),i=u&&u.getMainFrame();return i&&i.getComponent()},V.prototype.getWrapper=function(){return this.getComponent()},V.prototype.getComponents=function(){var u=this.getWrapper();return u&&u.get("components")},V.prototype.addComponent=function(u,i){return i===void 0&&(i={}),this.getComponents().add(u,i)},V.prototype.render=function(){var u;return(u=this.componentView)===null||u===void 0?void 0:u.render().el},V.prototype.clear=function(u){u===void 0&&(u={});var i=this.getComponents();return i?.filter(Boolean).forEach((function(T){return T.remove(u)})),this},V.prototype.setComponents=function(u,i){i===void 0&&(i={}),this.clear(i).addComponent(u,i)},V.prototype.addType=function(u,i){var T=this.em,le=i.model,ve=le===void 0?{}:le,_e=i.view,Le=_e===void 0?{}:_e,Ke=i.isComponent,qe=i.extend,Je=i.extendView,Qe=i.extendFn,ct=Qe===void 0?[]:Qe,Ct=i.extendFnView,Mt=Ct===void 0?[]:Ct,It=this.getType(u),Gt=this.getType(qe),on=this.getType(Je),ln=Gt||It||this.getType("default"),zt=ln.model,an=on?on.view:ln.view,xn=function(Gn,mn,$n){return Gn.reduce((function(yr,Pt){var xt=mn[Pt],Lt=$n.prototype[Pt];return xt&&Lt&&(yr[Pt]=function(){for(var Dt=[],fn=0;fn<arguments.length;fn++)Dt[fn]=arguments[fn];Lt.bind(this).apply(void 0,Dt),xt.bind(this).apply(void 0,Dt)}),yr}),{})};typeof ve=="object"&&(i.model=zt.extend(Qt(Qt(Qt({},ve),xn(ct,ve,zt)),{defaults:Qt(Qt({},(0,fe.result)(zt.prototype,"defaults")||{}),(0,fe.result)(ve,"defaults")||{})}),{isComponent:!It||Gt||Ke?Ke||function(){return 0}:zt.isComponent})),typeof Le=="object"&&(i.view=an.extend(Qt(Qt({},Le),xn(Mt,Le,an)))),It?(It.model=i.model,It.view=i.view):(i.id=u,this.componentTypes.unshift(i));var hr="component:type:".concat(It?"update":"add");return T?.trigger(hr,It||i),this},V.prototype.getType=function(u){for(var i=this.componentTypes,T=0;T<i.length;T++)if(i[T].id==u)return i[T]},V.prototype.removeType=function(u){var i=this.componentTypes,T=this.getType(u);if(T){var le=i.indexOf(T);return i.splice(le,1),T}},V.prototype.getTypes=function(){return this.componentTypes},V.prototype.selectAdd=function(u,i){var T=this;i===void 0&&(i={}),u&&(u.set({status:"selected"}),["component:selected","component:toggled"].forEach((function(le){return T.em.trigger(le,u,i)})))},V.prototype.selectRemove=function(u,i){var T=this;i===void 0&&(i={}),u&&(this.em,u.set({status:"",state:""}),["component:deselected","component:toggled"].forEach((function(le){return T.em.trigger(le,u,i)})))},V.prototype.componentHovered=function(){var u=this.em,i=u.get("
378componentHovered"),T=u.previous("componentHovered"),le="hovered";T&&T.get("status")==le&&T.set({status:"",state:""}),i&&(0,fe.isEmpty)(i.get("status"))&&i.set("status",le)},V.prototype.getShallowWrapper=function(){var u=this.shallow,i=this.em;if(!u&&i){var T=i.shallow;if(!T)return;var le=T.get("DomComponents");if(le.componentTypes=this.componentTypes,u=le.getWrapper()){var ve=[ie.GN,ie.xH].join(" ");u.on(ve,(0,fe.debounce)((function(){return u?.components("")}),100))}this.shallow=u}return u},V.prototype.canMove=function(u,i,T){var le=T||T===0?T:null,ve={result:!1,reason:0,target:u,source:null};if(!i||!u)return ve;var _e=i.toHTML?i:null;if(!_e){var Le=this.getShallowWrapper();_e=Le?.append(i)[0]}if(ve.source=_e,!_e)return ve;var Ke=_e.get("draggable");if((0,fe.isFunction)(Ke))Ke=!!Ke(_e,u,le);else{var qe=u.getEl();Ke=(0,fe.isArray)(Ke)?Ke.join(","):Ke,Ke=(0,fe.isString)(Ke)?qe?.matches(Ke):Ke}if(!Ke)return Qt(Qt({},ve),{reason:1});var Je=u.get("droppable");(0,fe.isFunction)(Je)?Je=!!Je(_e,u,le):Je===!1&&u.isInstanceOf("text")&&_e.get("textable")?Je=!0:(qe=_e.getEl(),Je=(0,fe.isArray)(Je)?Je.join(","):Je,Je=(0,fe.isString)(Je)?qe?.matches(Je):Je);var Qe=[u].concat(u.parents()).indexOf(_e)>-1;return Qt(Qt({},ve),!Je||Qe?{reason:2}:{result:!0})},V.prototype.allById=function(){return this.componentsById},V.prototype.getById=function(u){return this.componentsById[u]||null},V.prototype.destroy=function(){var u,i=this.allById();
378Object.keys(i).forEach((function(T){return i[T]&&i[T].remove()})),(u=this.componentView)===null||u===void 0||u.remove(),[this.em,this.componentsById,this.componentView].forEach((function(T){return{}}))},V})(ur.O);const fr=rr},7892:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>_,evAll:()=>H,evComponent:()=>ee,evCustom:()=>O,evPfx:()=>ne,evRoot:()=>ye});var fe=S(9050),D=S(7904),ie=S(6434),ce=S(1163);const ae={stylePrefix:"",appendTo:"",sortable:!0,hidable:!0,hideTextnode:!0,root:"",showWrapper:!0,showHover:!0,scrollCanvas:{behavior:"smooth",block:"nearest"},scrollLayers:{behavior:"auto",block:"nearest"},highlightHover:!0,custom:!1,onInit:function(){},onRender:function(){},extend:{}};var se,oe=S(2316),W=S(2169),I=S(7375),g=(se=function(M,s){return se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,f){l.__proto__=f}||function(l,f){for(var w in f)Object.prototype.hasOwnProperty.call(f,w)&&(l[w]=f[w])},se(M,s)},function(M,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function l(){this.constructor=M}se(M,s),M.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}),P=(function(M){function s(l){l===void 0&&(l={});var f=M.call(this,l)||this;f.items=[],f.opt=l;var w=l.config||{};f.config=w,f.parentView=l.parentView;var te=w.stylePrefix||"",J=w.pStylePrefix||"",R=f.collection;f.listenTo(R,"add",f.addTo),f.listenTo(R,"reset resetNavigator",f.render),f.listenTo(R,"remove",f.removeChildren),f.className="".concat(te,"layers");var k=w.em;if(w.sortable&&!f.opt.sorter){var v=k.get("Utils");f.opt.sorter=new v.Sorter({container:w.sortContainer||f.el,containerSel:".".concat(f.className),itemSel:".".concat(te,"layer"),ignoreViewChildren:1,onEndMove:function(b,h,m){var p=h.getSourceModel();k.setSelected(p,{forceChange:1}),k.trigger("".concat(I.OA,":end"),m)},avoidSelectOnEnd:1,nested:1,ppfx:J,pfx:te})}return f.$el.data("collection",R),l.parent&&f.$el.data("model",l.parent),f}return g(s,M),s.prototype.removeChildren=function(l){var f=l.viewLayer;f&&(f.remove(),delete l.viewLayer)},s.prototype.addTo=function(l){var f=this.collection.indexOf(l);this.addToCollection(l,null,f)},s.prototype.addToCollection=function(l,f,w){var te=this,J=te.parentView,R=te.opt,k=te.config,v=R.ItemView,b=R.opened,h=R.module,m=f||null,p=new v({ItemView:v,level:R.level,model:l,parentView:J,config:k,sorter:R.sorter,opened:b,module:h}),y=p.render().el;if(m)m.appendChild(y);else if(w!==void 0){var Z="before";this.$el.children().length==w&&(w--,Z="after"),w<0?this.$el.append(y):this.$el.children().eq(w)[Z](y)}else this.$el.append(y);return this.items.push(p),y},s.prototype.remove=function(){for(var l=[],f=0;f<arguments.length;f++)l[f]=arguments[f];return oe.View.prototype.remove.apply(this,l),this.items.map((function(w){return w.remove()})),this},s.prototype.render=function(){var l=this,f=document.createDocumentFragment(),w=this.el;return w.innerHTML="",this.collection.each((function(te){return l.addToCollection(te,f)})),w.appendChild(f),w.className=this.className,this},s})(oe.View);const x=P;var A=(function(){var M=function(s,l){return M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,w){f.__proto__=w}||function(f,w){for(var te in w)Object.prototype.hasOwnProperty.call(w,te)&&(f[te]=w[te])},M(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function f(){this.constructor=s}M(s,l),s.prototype=l===null?Object.create(l):(f.prototype=l.prototype,new f)}})(),$="contentEditable",re=(function(M){function s(l){var f=M.call(this,l)||this;(0,fe.bindAll)(f,"__render"),f.opt=l,f.module=l.module,f.config=l.config||{},f.sorter=l.sorter||"",f.parentView=l.parentView;var w=f,te=w.model,J=w.pfx,R=w.ppfx,k=te.get("type")||"default";return f.className="".concat(J,"layer ").concat(J,"layer__t-").concat(k," no-select ").concat(R,"two-color"),f.inputNameCls="".concat(R,"layer-name"),f.clsTitleC="".concat(J,"layer-title-c"),f.clsTitle="".concat(J,"layer-title"),f.clsCaret="".concat(J,"layer-caret"),f.clsCount="".concat(J,"layer-count"),f.clsMove="".concat(J,"layer-move"),f.clsChildren="".concat(J,"layer-children"),f.clsNoChild="".concat(J,"layer-no-chld"),f.clsEdit="".concat(f.inputNameCls,"--edit"),f.clsNoEdit="".concat(f.inputNameCls,"--no-edit"),f.initComponent(),f}return A(s,M),s.prototype.events=function(){return{"mousedown [data-toggle-move]":"startSort","touchstart [data-toggle-move]":"startSort","click [data-toggle-visible]":"toggleVisibility","click [data-toggle-open]":"toggleOpening","click [data-toggle-select]":"handleSelect","mouseover [data-toggle-select]":"handleHover","mouseout [data-toggle-select]":"handleHoverOut","dblclick [data-name]":"handleEdit","keydown [data-name]":"handleEditKey","focusout [data-name]":"handleEditEnd"}},s.prototype.template=function(l){var f=this,w=f.pfx,te=f.ppfx,J=f.config,R=f.clsNoEdit,k=f.module,v=f.opt,b=f.em,h=J.hidable,m=k.getComponents(l).length,p=m?"":this.clsNoChild,y="".concat(this.clsTitle," ").concat(p),Z="".concat(this.clsTitleC," ").concat(te,"one-bg"),Y="".concat(this.inputNameCls," ").concat(R," ").concat(te,"no-app"),q=v.level+1,N="".concat(30+10*q,"px"),a=l.getName(),c=l.getIcon(),C="".concat(w,"layer"),Q=(b?.getConfig()).icons,pe=Q.move,Ce=Q.eye,Se=Q.eyeOff,me=Q.chevron;return` 379 `.concat(h?'<i class="'.concat(w,`layer-vis" data-toggle-visible> 380 <i class="`).concat(w,'layer-vis-on">').concat(Ce,`</i> 381 <i class="`).concat(w,'layer-vis-off">').concat(Se,`</i> 382 </i>`):"",` 383 <div class="`).concat(Z,`"> 384 <div class="`).concat(y,'" style="padding-left: ').concat(N,`" data-toggle-select> 385 <div class="`).concat(w,'layer-title-inn" title="').concat(a,`"> 386 <i class="`).concat(this.clsCaret,'" data-toggle-open>').concat(me,`</i> 387 `).concat(c?'<span class="'.concat(C,'__icon">
387').concat(c,"</span>"):"",` 388 <span class="`).concat(Y,'" data-name>').concat(a,`</span> 389 </div> 390 </div> 391 </div> 392 <div class="`).concat(this.clsCount,'" data-count>').concat(m||"",`</div> 393 <div class="`).concat(this.clsMove,'" data-toggle-move>').concat(pe||"",`</div> 394 <div class="`).concat(this.clsChildren,'"></div>')},Object.defineProperty(s.prototype,"em",{get:function(){return this.module.em},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"ppfx",{get:function(){return this.em.getConfig().stylePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"pfx",{get:function(){return this.config.stylePrefix},enumerable:!1,configurable:!0}),s.prototype.initComponent=function(){var l=this,f=this.model,w=this.config.onInit,te=f.components();this.listenTo(te,"remove add reset",this.checkChildren),[["change:status",this.updateStatus],["change:open",this.updateOpening],["change:layerable",this.updateLayerable],["change:style:display",this.updateVisibility],["rerender:layer",this.render],["change:name change:custom-name",this.updateName]].forEach((function(J){return l.listenTo(f,J[0],J[1])})),this.$el.data("model",f),this.$el.data("collection",te),f.viewLayer=this,w.bind(this)({component:f,render:this.__render,listenTo:this.listenTo})},s.prototype.updateName=function(){this.getInputName().innerText=this.model.getName()},s.prototype.getVisibilityEl=function(){return this.eyeEl||(this.eyeEl=this.$el.children(".".concat(this.pfx,"layer-vis"))),this.eyeEl},s.prototype.updateVisibility=function(){var l=this,f=l.pfx,w=l.model,te=l.module,J="".concat(f,"layer-hidden"),R=te.isVisible(w)?"removeClass":"addClass";this.$el[R](J),this.getVisibilityEl()[R]("".concat(f,"layer-off"))},s.prototype.toggleVisibility=function(l){l?.stopPropagation();var f=this.module,w=this.model;f.setVisible(w,!f.isVisible(w))},s.prototype.handleEdit=function(l){l?.stopPropagation();var f=this,w=f.em,te=f.$el,J=f.clsNoEdit,R=f.clsEdit,k=this.getInputName();k[$]="true",k.focus(),document.execCommand("selectAll",!1),w.setEditing(!0),te.find(".".concat(this.inputNameCls)).removeClass(J).addClass(R)},s.prototype.handleEditKey=function(l){l.stopPropagation(),((0,ce.isEscKey)(l)||(0,ce.isEnterKey)(l))&&this.handleEditEnd(l)},s.prototype.handleEditEnd=function(l){l?.stopPropagation();var f=this,w=f.em,te=f.$el,J=f.clsNoEdit,R=f.clsEdit,k=this.getInputName(),v=k.textContent;k.scrollLeft=0,k[$]="false",this.setName(v,{component:this.model,propName:"custom-name"}),w.setEditing(!1),te.find(".".concat(this.inputNameCls)).addClass(J).removeClass(R)},s.prototype.setName=function(l,f){var w=f.propName;this.model.set(w,l)},s.prototype.getInputName=function(){return this.inputName||(this.inputName=this.el.querySelector(".".concat(this.inputNameCls))),this.inputName},s.prototype.updateOpening=function(){var l=this,f=l.$el,w=l.model,te=l.pfx,J="open",R="".concat(te,"layer-open"),k=this.getCaret();this.module.isOpen(w)?(f.addClass(J),k.addClass(R)):(f.removeClass(J),k.removeClass(R))},s.prototype.toggleOpening=function(l){var f=this.model,w=this.module;l?.stopImmediatePropagation(),f.get("components").length&&w.setOpen(f,!w.isOpen(f))},s.prototype.handleSelect=function(l){l?.stopPropagation();var f=this.module,w=this.model;f.setLayerData(w,{selected:!0},{event:l})},s.prototype.handleHover=function(l){l?.stopPropagation();var f=this.module,w=this.model;f.setLayerData(w,{hovered:!0})},s.prototype.handleHoverOut=function(l){l?.stopPropagation();var f=this.module,w=this.model;f.setLayerData(w,{hovered:!1})},s.prototype.startSort=function(l){l.stopPropagation();var f=this.em,w=this.sorter;l.button&&l.button!==0||w&&(w.onStart=function(te){return f.trigger("".concat(I.OA,":start"),te)},w.onMoveClb=function(te){return f.trigger(I.OA,te)},w.startSort(l.target))},s.prototype.updateStatus=function(){W.Z.prototype.updateStatus.apply(this,[{avoidHover:!this.config.highlightHover,noExtHl:1}])},s.prototype.checkChildren=function(){var l=this,f=l.model,w=l.clsNoChild,te=l.$el,J=l.module,R=J.getComponents(f).length,k=te.children(".".concat(this.clsTitleC)).children(".".concat(this.clsTitle)),v=this.cnt;v||(v=te.children("[data-count]").get(0),this.cnt=v),k[R?"removeClass":"addClass"](w),v&&(v.innerHTML=R||""),!R&&J.setOpen(f,!1)},s.prototype.getCaret=function(){return this.caret&&this.caret.length||(this.caret=this.$el.children(".".concat(this.clsTitleC)).find(".".concat(this.clsCaret))),this.caret},s.prototype.setRoot=function(l){l=(0,fe.isString)(l)?this.em.getWrapper().find(l)[0]:l;var f=(0,ce.getModel)(l,0);f&&(this.stopListening(),this.model=f,this.initComponent(),this._rendered&&this.render())},s.prototype.updateLayerable=function(){(this.parentView||this).render()},s.prototype.__clearItems=function(){var l;(l=this.items)===null||l===void 0||l.remove()},s.prototype.remove=function(){for(var l=[],f=0;f<arguments.length;f++)l[f]=arguments[f];return oe.View.prototype.remove.apply(this,l),this.__clearItems(),this},s.prototype.render=function(){var l=this,f=l.model,w=l.config,te=l.pfx,J=l.ppfx,R=l.opt,k=l.sorter;this.__clearItems();var v=R.opened,b=R.module,h=R.ItemView,m=!b.__isLayerable(f),p=this.$el.empty(),y=R.level+1;delete this.inputName,this.items=new x({ItemView:h,collection:f.get("components"),config:w,sorter:k,opened:v,parentView:this,parent:f,level:y,module:b});var Z=this.items.render().$el;return w.showWrapper||y!==1?(p.html(this.template(f)),p.find(".".concat(this.clsChildren)).append(Z)):p.append(Z),f.get("draggable")&&w.sortable||p.children(".".concat(this.clsMove)).remove(),!b.isVisible(f)&&(this.className+=" ".concat(te,"hide")),m&&(this.className+=" ".concat(J,"hidden")),p.attr("class",this.className),this.updateStatus(),this.updateOpening(),this.updateVisibility(),this.__render(),this._rendered=!0,this},s.prototype.__render=function(){var l=this,f=l.model,w=l.config,te={component:f,el:l.el};w.onRender.bind(this)(te),this.em.trigger("layer:render",te)},s})(oe.View);const z=re;
394var F=(function(){var M=function(s,l){return M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,w){f.__proto__=w}||function(f,w){for(var te in w)Object.prototype.hasOwnProperty.call(w,te)&&(f[te]=w[te])},M(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function f(){this.constructor=s}M(s,l),s.prototype=l===null?Object.create(l):(f.prototype=l.prototype,new f)}})(),G=function(){return G=Object.assign||function(M){for(var s,l=1,f=arguments.length;l<f;l++)for(var w in s=arguments[l])Object.prototype.hasOwnProperty.call(s,w)&&(M[w]=s[w]);return M},G.apply(this,arguments)},H="layer",ne="".concat(H,":"),ye="".concat(ne,"root"),ee="".concat(ne,"component"),O="".concat(ne,"custom"),j={all:H,root:ye,component:ee,custom:O},E={mediaText:""},B=["open","status","locked","custom-name","components","classes"].map((function(M){return"component:update:".concat(M)})).join(" "),X=(function(M){function s(l){var f=M.call(this,l,"LayerManager",ae)||this;return f.events=j,(0,fe.bindAll)(f,"componentChanged","__onRootChange","__onComponent"),f.model=new D.Z(f,{opened:{}}),f.config.stylePrefix=f.config.pStylePrefix,f}return F(s,M),s.prototype.onLoad=function(){var l=this,f=this,w=f.em,te=f.config,J=f.model;J.listenTo(w,"component:selected",this.componentChanged),J.on("change:root",this.__onRootChange),J.listenTo(w,B,this.__onComponent),this.componentChanged(),J.listenToOnce(w,"load",(function(){l.setRoot(te.root),l.__appendTo()}))},s.prototype.setRoot=function(l){var f=this.em.getWrapper(),w=(0,ce.isComponent)(l)?l:f;return l&&(0,fe.isString)(l)&&(0,ce.hasWin)()&&(w=f.find(l)[0]||f),this.model.set("root",w),w},s.prototype.getRoot=function(){return this.model.get("root")},s.prototype.getComponents=function(l){var f=this;return l.components().filter((function(w){return f.__isLayerable(w)}))},s.prototype.setOpen=function(l,f){l.set("open",f)},s.prototype.isOpen=function(l){return!!l.get("open")},s.prototype.setVisible=function(l,f){var w="__prev-display",te=l.getStyle(E),J=te.display;if(f){var R=l.get(w);delete te.display,R&&(te.display=R,l.unset(w))}else J&&l.set(w,J),te.display="none";l.setStyle(te,E),this.updateLayer(l),this.em.trigger("component:toggled")},s.prototype.isVisible=function(l){return(f=l.getStyle(E))===void 0&&(f={}),(f.display||"").trim().indexOf("none")!==0;var f},s.prototype.setLocked=function(l,f){l.set("locked",f)},s.prototype.isLocked=function(l){return l.get("locked")},s.prototype.setName=function(l,f){l.set("custom-name",f)},s.prototype.getName=function(l){return l.getName()},s.prototype.getLayerData=function(l){var f=l.get("status");return{name:l.getName(),open:this.isOpen(l),selected:f==="selected",hovered:f==="hovered",visible:this.isVisible(l),locked:this.isLocked(l),components:this.getComponents(l)}},s.prototype.setLayerData=function(l,f,w){var te;w===void 0&&(w={});var J=this.em,R=this.config,k=f.open,v=f.selected,b=f.hovered,h=f.visible,m=f.locked,p=f.name,y=G({fromLayers:!0},w);if((0,ce.isDef)(k)&&this.setOpen(l,k),(0,ce.isDef)(v))if(v){J.setSelected(l,y);var Z=R.scrollCanvas;Z&&((te=l.views)===null||te===void 0||te.forEach((function(Y){return Y.scrollIntoView(Z)})))}else J.removeSelected(l,y);(0,ce.isDef)(b)&&R.showHover&&(b?J.setHovered(l,y):J.setHovered(null,y)),(0,ce.isDef)(h)&&h!==this.isVisible(l)&&this.setVisible(l,h),(0,ce.isDef)(m)&&this.setLocked(l,m),(0,ce.isDef)(p)&&this.setName(l,p)},s.prototype.componentChanged=function(l,f){var w;if(f===void 0&&(f={}),!f.fromLayers){var te=this.em,J=this.config.scrollLayers,R=this.model.get("opened"),k=te.getSelected(),v=k?.parent();for(var b in R)R[b].set("open",!1),delete R[b];for(;v;)v.set("open",!0),R[v.cid]=v,v=v.parent();if(k&&J){var h=(w=k.viewLayer)===null||w===void 0?void 0:w.el;h?.scrollIntoView(J)}}},s.prototype.getAll=function(){return this.view},s.prototype.render=function(){var l,f,w=this.config,te=this.model,J=z.extend(w.extend);return this.view=new J({el:(l=this.view)===null||l===void 0?void 0:l.el,ItemView:J,level:0,config:w,opened:te.get("opened"),model:this.getRoot(),module:this}),(f=this.view)===null||f===void 0?void 0:f.render().el},s.prototype.destroy=function(){var l;(l=this.view)===null||l===void 0||l.remove()},s.prototype.__onRootChange=function(){var l,f=this.getRoot();(l=this.view)===null||l===void 0||l.setRoot(f),this.em.trigger(ye,f)},s.prototype.__onComponent=function(l){this.updateLayer(l)},s.prototype.__isLayerable=function(l){var f=l.get("tagName");return(!this.config.hideTextnode||!l.is("textnode")&&f!=="br")&&l.get("layerable")},s.prototype.__trgCustom=function(l){this.em.trigger(this.events.custom,{container:l.container,root:this.getRoot()})},s.prototype.updateLayer=function(l,f){this.em.trigger(ee,l,f)},s})(ie.Z);const _=X},7948:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>_,evAll:()=>re,evPageAdd:()=>ne,evPageAddBefore:()=>ye,evPageRemove:()=>ee,evPageRemoveBefore:()=>O,evPageSelect:()=>F,evPageSelectBefore:()=>G,evPageUpdate:()=>H,evPfx:()=>z});var fe,D=S(9050),ie=S(1163),ce=S(7904),ae=S(6434),se=S(2316),oe=S(3560),W=S(6840),I=(fe=function(M,s){return fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,f){l.__proto__=f}||function(l,f){for(var w in f)Object.prototype.hasOwnProperty.call(f,w)&&
394(l[w]=f[w])},fe(M,s)},function(M,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function l(){this.constructor=M}fe(M,s),M.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)});const g=(function(M){function s(l,f){f===void 0&&(f={});var w=M.call(this,l,f)||this,te=f.em,J={};w.em=te,l.frames||(J.component=l.component,J.styles=l.styles,["component","styles"].map((function(b){return w.unset(b)})));var R=l.frames||[J],k=new oe.Z(te.get("Canvas"),R?.map((function(b){return new W.Z(te.get("Canvas"),b)})));k.page=w,w.set("frames",k),!w.getId()&&w.set("id",te?.get("PageManager")._createId());var v=te?.get("UndoManager");return v?.add(k),w}return I(s,M),s.prototype.defaults=function(){return{frames:[],_undo:!0}},s.prototype.onRemove=function(){this.getFrames().reset()},s.prototype.getFrames=function(){return this.get("frames")},s.prototype.getId=function(){return this.id},s.prototype.getName=function(){return this.get("name")},s.prototype.setName=function(l){return this.set({name:l})},s.prototype.getAllFrames=function(){return this.getFrames().models||[]},s.prototype.getMainFrame=function(){return this.getFrames().at(0)},s.prototype.getMainComponent=function(){var l=this.getMainFrame();return l?.getComponent()},s.prototype.toJSON=function(l){l===void 0&&(l={});var f=se.Model.prototype.toJSON.call(this,l),w=(0,D.result)(this,"defaults");return(0,D.forEach)(f,(function(te,J){J.indexOf("_")===0&&delete f[J]})),(0,D.forEach)(w,(function(te,J){f[J]===te&&delete f[J]})),f},s})(se.Model);var P=(function(){var M=function(s,l){return M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,w){f.__proto__=w}||function(f,w){for(var te in w)Object.prototype.hasOwnProperty.call(w,te)&&(f[te]=w[te])},M(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function f(){this.constructor=s}M(s,l),s.prototype=l===null?Object.create(l):(f.prototype=l.prototype,new f)}})(),x=function(){return x=Object.assign||function(M){for(var s,l=1,f=arguments.length;l<f;l++)for(var w in s=arguments[l])Object.prototype.hasOwnProperty.call(s,w)&&(M[w]=s[w]);return M},x.apply(this,arguments)};const A=(function(M){function s(l,f){var w=M.call(this,l)||this;return w.on("reset",w.onReset),w.on("remove",w.onRemove),w.model=function(te,J){return J===void 0&&(J={}),new g(te,x(x({},J),{em:f}))},w}return P(s,M),s.prototype.onReset=function(l,f){var w,te=this;(w=f?.previousModels)===null||w===void 0||w.map((function(J){return te.onRemove(J)}))},s.prototype.onRemove=function(l){l?.onRemove()},s})(se.Collection);var $=(function(){var M=function(s,l){return M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,w){f.__proto__=w}||function(f,w){for(var te in w)Object.prototype.hasOwnProperty.call(w,te)&&(f[te]=w[te])},M(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");function f(){this.constructor=s}M(s,l),s.prototype=l===null?Object.create(l):(f.prototype=l.prototype,new f)}})(),re="page",z="".concat(re,":"),F="".concat(z,"select"),G="".concat(F,":before"),H="".concat(z,"update"),ne="".concat(z,"add"),ye="".concat(ne,":before"),ee="".concat(z,"remove"),O="".concat(ee,":before"),j="change:selected",E="main",B={all:re,select:F,selectBefore:G,update:H,add:ne,addBefore:ye,remove:ee,removeBefore:O},X=(function(M){function s(l){var f=M.call(this,l,"PageManager",new A([],l),B)||this;f.storageKey="pages",(0,D.bindAll)(f,"_onPageChange");var w=new ce.Z({_undo:!0});return f.model=w,f.pages.on("reset",(function(te){return te.at(0)&&f.select(te.at(0))})),f.pages.on("all",f.__onChange,f),w.on(j,f._onPageChange),f}return $(s,M),Object.defineProperty(s.prototype,"pages",{get:function(){return this.all},enumerable:!1,configurable:!0}),s.prototype.__onChange=function(l,f,w,te){var J=te||w;this.em.trigger(re,{event:l,page:f,options:J})},s.prototype.onLoad=function(){var l,f=this,w=this.pages,te={silent:!0};w.add(((l=this.config.pages)===null||l===void 0?void 0:l.map((function(R){return new g(R,{em:f.em,config:f.config})})))||[],te);var J=w.length?this.getMain():this.add({type:E},te);J&&this.select(J,te)},s.prototype._onPageChange=function(l,f,w){var te=this.em,J=te.get("LayerManager"),R=f.getMainComponent();J&&R&&J.setRoot(R),te.trigger(F,f,l.previous("selected")),this.__onChange(j,f,w)},s.prototype.postLoad=function(){var l=this.em,f=this.model,w=l.get("UndoManager");w&&w.add(f),w&&w.add(this.pages)},s.prototype.add=function(l,f){var w=this;f===void 0&&(f={});var te=this.em;l.id=l.id||this._createId();var J=function(){var R=w.pages.add(new g(l,{em:w.em,config:w.config}),f);return f.select&&w.select(R),R};return!f.silent&&te.trigger(ye,l,J,f),!f.abort&&J()},s.prototype.remove=function(l,f){var w=this;f===void 0&&(f={});var te=this.em,J=(0,D.isString)(l)?this.get(l):l,R=function(){return J&&w.pages.remove(J,f),J};return!f.silent&&te.trigger(O,J,R,f),!f.abort&&R()},s.prototype.get=function(l){return this.pages.filter((function(f){return f.get(f.idAttribute)===l}))[0]},s.prototype.getMain=function(){var l=this.pages;return l.filter((function(f){return f.get("type")===E}))[0]||l.at(0)},s.prototype.getAllWrappers=function(){var l=this.getAll();return(0,D.unique)((0,D.flatten)(l.map((function(f){return f.getAllFrames().map((function(w){return w.getComponent()}))}))))},s.prototype.select=function(l,f){f===void 0&&(f={});var w=(0,D.isString)(l)?this.get(l):l;return w&&(this.em.trigger(G,w,f),this.model.set("selected",w,f)),this},s.prototype.getSelected=function(){return this.model.get("selected")},s.prototype.destroy=function(){var l=this;this.pages.off().reset(),this.model.stopListening(),this.model.clear({silent:!0}),["selected","model"].map((function(f){return l[f]=0}))},s.prototype.store=function(){return this.getProjectData()},s.prototype.load=function(l){return this.loadProjectData(l,{all:this.pages,reset:!0})},s.prototype._createId=function(){var l,f=this.getAll().length+16,w=this.getAllMap();do l=(0,ie.createId)(f);while(w[l]);return l},s})(ae.O);const _=X},3463:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{default:()=>b,evAdd:()=>w,evAll:()=>l,evCustom:()=>k,evPfx:()=>f,evRemove:()=>J,evRemoveBefore:()=>R,evState:()=>v,evUpdate:()=>te});var fe=S(9050),D=S(1163),ie=S(9714),ce=S(2316);const ae={stylePrefix:"clm-",appendTo:"",selectors:[],states:[{name:"hover"},{name:"active"},{name:"nth-of-type(2n)"}],escapeName:0,selectedName:0,iconAdd:'<svg viewBox="0 0 24 24">
394<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path></svg>',iconSync:'<svg viewBox="0 0 24 24"><path d="M12 18c-3.31 0-6-2.69-6-6 0-1 .25-1.97.7-2.8L5.24 7.74A7.93 7.93 0 0 0 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4m0-11V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1-.25 1.97-.7 2.8l1.46 1.46A7.93 7.93 0 0 0 20 12c0-4.42-3.58-8-8-8z"></path></svg>',iconTagOn:'<svg viewBox="0 0 24 24"><path d="M19 19H5V5h10V3H5c-1.11 0-2 .89-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8h-2m-11.09-.92L6.5 11.5 11 16 21 6l-1.41-1.42L11 13.17l-3.09-3.09z"></path></svg>',iconTagOff:'<svg viewBox="0 0 24 24"><path d="M19 3H5c-1.11 0-2 .89-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5a2 2 0 0 0-2-2m0 2v14H5V5h14z"></path></svg>',iconTagRemove:'<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"></path></svg>',render:0,componentFirst:!1,custom:!1};var se,oe=S(5963),W=S(966),I=(se=function(h,m){return se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,y){p.__proto__=y}||function(p,y){for(var Z in y)Object.prototype.hasOwnProperty.call(y,Z)&&(p[Z]=y[Z])},se(h,m)},function(h,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");function p(){this.constructor=h}se(h,m),h.prototype=m===null?Object.create(m):(p.prototype=m.prototype,new p)}),g=(function(h){function m(){return h!==null&&h.apply(this,arguments)||this}return I(m,h),m.prototype.defaults=function(){return{name:"",label:""}},m.prototype.getName=function(){return this.get("name")},m.prototype.getLabel=function(){return this.get("label")||this.getName()},m})(ce.Model);const P=g;g.prototype.idAttribute="name";var x=S(7539),A=(function(){var h=function(m,p){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,Z){y.__proto__=Z}||function(y,Z){for(var Y in Z)Object.prototype.hasOwnProperty.call(Z,Y)&&(y[Y]=Z[Y])},h(m,p)};return function(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function y(){this.constructor=m}h(m,p),m.prototype=p===null?Object.create(p):(y.prototype=p.prototype,new y)}})(),$=function(h,m){return Object.defineProperty?Object.defineProperty(h,"raw",{value:m}):h.raw=m,h},re="contentEditable";const z=(function(h){function m(p){p===void 0&&(p={});var y=h.call(this,p)||this,Z=p.config||{};return y.config=Z,y.module=p.module,y.coll=p.coll||null,y.pfx=Z.stylePrefix||"",y.ppfx=Z.pStylePrefix||"",y.em=Z.em,y.listenTo(y.model,"change:active",y.updateStatus),y}return A(m,h),m.prototype.template=function(){var p=this,y=p.pfx,Z=p.model,Y=p.config,q=Z.get("label")||"";return(0,x.Z)(F||(F=$([` 395 <span id="`,'checkbox" class="',`tag-status" data-tag-status></span> 396 <span id="`,'tag-label" data-tag-name>',`</span> 397 <span id="`,'close" class="','tag-close" data-tag-remove> $',` </span> 398 `],[` 399 <span id="`,'checkbox" class="',`tag-status" data-tag-status></span> 400 <span id="`,'tag-label" data-tag-name>',`</span> 401 <span id="`,'close" class="','tag-close" data-tag-remove> $',` </span> 402 `])),y,y,y,q,y,y,Y.iconTagRemove)},m.prototype.events=function(){return{"click [data-tag-remove]":"removeTag","click [data-tag-status]":"changeStatus","dblclick [data-tag-name]":"startEditTag","focusout [data-tag-name]":"endEditTag"}},m.prototype.getInputEl=function(){return this.inputEl||(this.inputEl=this.el.querySelector("[data-tag-name]")),this.inputEl},m.prototype.startEditTag=function(){var p=this.em,y=this.getInputEl();y[re]="true",y.focus(),p&&p.setEditing(1)},m.prototype.endEditTag=function(){var p=this.model,y=this.getInputEl(),Z=y.textContent,Y=this.em,q=Y&&Y.get("SelectorManager");if(y[re]="false",Y&&Y.setEditing(0),q){var N=q.escapeName(Z);q.get(N)?y.innerText=p.get("label"):p.set({name:N,label:Z})}},m.prototype.changeStatus=function(){var p=this.model;p.set("active",!p.get("active"))},m.prototype.removeTag=function(){this.module.removeSelected(this.model)},m.prototype.updateStatus=function(){var p=this,y=p.model,Z=p.$el,Y=p.config,q=Y.iconTagOn,N=Y.iconTagOff,a=Z.find("[data-tag-status]");y.get("active")?(a.html(q),Z.removeClass("opac50")):(a.html(N),Z.addClass("opac50"))},m.prototype.render=function(){var p=this.pfx,y=this.ppfx;return this.$el.html(this.template()),this.$el.attr("class","".concat(p,"tag ").concat(y,"three-bg")),this.updateStatus(),this},m})(ce.View);
402var F,G=(function(){var h=function(m,p){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,Z){y.__proto__=Z}||function(y,Z){for(var Y in Z)Object.prototype.hasOwnProperty.call(Z,Y)&&(y[Y]=Z[Y])},h(m,p)};return function(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function y(){this.constructor=m}h(m,p),m.prototype=p===null?Object.create(p):(y.prototype=p.prototype,new y)}})(),H=function(h,m){return Object.defineProperty?Object.defineProperty(h,"raw",{value:m}):h.raw=m,h};const ne=(function(h){function m(p){p===void 0&&(p={});var y=h.call(this,p)||this;y.config=p.config||{},y.pfx=y.config.stylePrefix||"",y.ppfx=y.config.pStylePrefix||"",y.className=y.pfx+"tags",y.stateInputId=y.pfx+"states",y.stateInputC=y.pfx+"input-c",y.states=y.config.states||[];var Z=y.config.em,Y=y.collection;y.target=Z;var q=Z.get("SelectorManager");return y.module=q,y.em=Z,y.componentChanged=(0,fe.debounce)(y.componentChanged.bind(y),0),y.checkSync=(0,fe.debounce)(y.checkSync.bind(y),0),y.listenTo(Z,"component:toggled component:update:classes",y.componentChanged),y.listenTo(Z,"styleManager:update",y.componentChanged),y.listenTo(Z,"component:update:classes change:state",y.__handleStateChange),y.listenTo(Z,"styleable:change change:device",y.checkSync),y.listenTo(Y,"add",y.addNew),y.listenTo(Y,"reset",y.renderClasses),y.listenTo(Y,"remove",y.tagRemoved),y.listenTo(q.getAll(),q.events.state,(0,fe.debounce)((function(){return y.renderStates()}),0)),y.delegateEvents(),y}return G(m,h),m.prototype.template=function(p){var y=p.labelInfo,Z=p.labelHead,Y=p.iconSync,q=p.iconAdd,N=p.pfx,a=p.ppfx;return(0,x.Z)(ye||(ye=H([' <div id="','up" class="',`header"> 403 <div id="`,'label" class="','header-label">',`</div> 404 <div id="`,'status-c" class="',`header-status"> 405 <span id="`,`input-c" data-states-c> 406 <div class="`,"field ",`select"> 407 <span id="`,`input-holder"> 408 <select id="`,`states" data-states></select> 409 </span> 410 <div class="`,`sel-arrow"> 411 <div class="`,`d-s-arrow"></div> 412 </div> 413 </div> 414 </span> 415 </div> 416 </div> 417 <div id="`,'tags-field" class="',`field"> 418 <div id="`,`tags-c" data-selectors></div> 419 <input id="`,`new" data-input /> 420 <span id="`,'add-tag" class="',"tags-btn ",'tags-btn__add" data-add> $',` </span> 421 <span class="`,"tags-btn ",'tags-btn__sync" style="display: none" data-sync-style> $',` </span> 422 </div> 423 <div class="`,`sels-info"> 424 <div class="`,'label-sel">',`:</div> 425 <div class="`,`sels" data-selected></div> 426 </div>`],[' <div id="','up" class="',`header"> 427 <div id="`,'label" class="','header-label">',`</div> 428 <div id="`,'status-c" class="',`header-status"> 429 <span id="`,`input-c" data-states-c> 430 <div class="`,"field ",`select"> 431 <span id="`,`input-holder"> 432 <select id="`,`states" data-states></select> 433 </span> 434 <div class="`,`sel-arrow"> 435 <div class="`,`d-s-arrow"></div> 436 </div> 437 </div> 438 </span> 439 </div> 440 </div> 441 <div id="`,'tags-field" class="',`field"> 442 <div id="`,`tags-c" data-selectors></div> 443 <input id="`,`new" data-input /> 444 <span id="`,'add-tag" class="',"tags-btn ",'tags-btn__add" data-add> $',` </span> 445 <span class="`,"tags-btn ",'tags-btn__sync" style="display: none" data-sync-style> $',` </span> 446 </div> 447 <div class="`,`sels-info"> 448 <div class="`,'label-sel">',`:</div> 449 <div class="`,`sels" data-selected></div> 450 </div>`])),N,N,N,N,Z,N,N,N,a,a,a,N,a,a,N,a,N,N,N,N,N,q,N,N,Y,N,N,y,N)},m.prototype.events=function(){return{"change [data-states]":"stateChanged","click [data-add]":"startNewTag","focusout [data-input]":"endNewTag","keyup [data-input]":"onInputKeyUp","click [data-sync-style]":"syncStyle"}},m.prototype.syncStyle=function(){var p,y=this.em,Z=this.getTarget(),Y=y.get("CssComposer"),q=this.getCommonSelectors({opts:{noDisabled:1}}),N=y.get("state"),a=y.getCurrentMedia(),c=[],C=Y.get(q,N,a)||Y.add(q,N,a);
450this.getTargets().forEach((function(Q){var pe=Y.getIdRule(Q.getId(),{state:N,mediaText:a});p=pe.getStyle(),pe.setStyle({}),c.push(pe)})),p&&C.addStyle(p),y.trigger("component:toggled"),y.trigger("component:sync-style",{component:Z,selectors:q,mediaText:a,rule:C,ruleComponents:c,state:N})},m.prototype.tagRemoved=function(p){this.updateStateVis()},m.prototype.addNew=function(p){this.addToClasses(p)},m.prototype.startNewTag=function(){var p,y;(p=this.$addBtn)===null||p===void 0||p.css({display:"none"}),(y=this.$input)===null||y===void 0||y.show().focus()},m.prototype.endNewTag=function(){var p,y;(p=this.$addBtn)===null||p===void 0||p.css({display:""}),(y=this.$input)===null||y===void 0||y.hide().val("")},m.prototype.onInputKeyUp=function(p){var y;p.keyCode===13?(p.preventDefault(),this.addNewTag((y=this.$input)===null||y===void 0?void 0:y.val())):p.keyCode===27&&this.endNewTag()},m.prototype.checkStates=function(){var p=this.em.getState(),y=this.getStates();y&&y.val(p)},m.prototype.componentChanged=function(p){var y=(p===void 0?{}:p).targets;this.updateSelection(y)},m.prototype.updateSelection=function(p){var y=p||this.getTargets(),Z=[];return(y=(0,fe.isArray)(y)?y:[y])&&y.length&&(Z=this.getCommonSelectors({targets:y}),this.checkSync({validSelectors:Z})),this.collection.reset(Z),this.updateStateVis(y),this.module.__trgCustom(),Z},m.prototype.getCommonSelectors=function(p){var y=p===void 0?{}:p,Z=y.targets,Y=y.opts,q=Y===void 0?{}:Y,N=Z||this.getTargets();return this.module.__getCommonSelectors(N,q)},m.prototype._commonSelectors=function(){for(var p,y=[],Z=0;Z<arguments.length;Z++)y[Z]=arguments[Z];return(p=this.module).__common.apply(p,y)},m.prototype.checkSync=function(){var p,y=this,Z=y.$btnSyncEl,Y=y.config,q=y.collection,N=this.getTarget();if(N&&Y.componentFirst&&q.length){var a=N.getStyle();p=!(0,fe.isEmpty)(a)}Z&&Z[p?"show":"hide"]()},m.prototype.getTarget=function(){return this.target.getSelected()},m.prototype.getTargets=function(){return this.target.getSelectedAll()},m.prototype.updateStateVis=function(p){var y=this.em,Z=y&&y.getConfig().avoidInlineStyle,Y=this.collection.length||Z?"":"none";this.getStatesC().css("display",Y),this.updateSelector(p)},m.prototype.__handleStateChange=function(){this.updateSelector(this.getTargets())},m.prototype.updateSelector=function(p){var y=this,Z=this.el.querySelector("[data-selected]"),Y=[],q=p||this.getTargets();
450(q=(0,fe.isArray)(q)?q:[q]).forEach((function(N){return Y.push(y.__getName(N))})),Z&&(Z.innerHTML=Y.join(", ")),this.checkStates()},m.prototype.__getName=function(p){var y,Z=this,Y=Z.pfx,q=Z.config,N=Z.em,a=q.selectedName,c=q.componentFirst;if((0,fe.isString)(p))y=(0,x.Z)(ee||(ee=H(['<span class="','sel-gen">',"</span>"],['<span class="','sel-gen">',"</span>"])),Y,p);else{var C=p?.getSelectors();if(!C)return"";var Q=C.getStyleable(),pe=N.get("state"),Ce=p.getId?(0,x.Z)(O||(O=H(['<span class="','sel-cmp">',`</span> 451 <span class="`,'sel-id">#',"</span>"],['<span class="','sel-cmp">',`</span> 452 <span class="`,'sel-id">#',"</span>"])),Y,p.getName(),Y,p.getId()):"";y=(y=this.collection.getFullString(Q))?(0,x.Z)(j||(j=H(['<span class="','sel-rule">',"</span>"],['<span class="','sel-rule">',"</span>"])),Y,y):p.get("selectorsAdd")||Ce,y=c&&Ce?Ce:y,y+=pe?(0,x.Z)(E||(E=H(['<span class="','sel-state">:',"</span>"],['<span class="','sel-state">:',"</span>"])),Y,pe):"",y=a?a({result:y,state:pe,target:p}):y}return y&&'<span class="'.concat(Y,'sel">').concat(y,"</span>")},m.prototype.stateChanged=function(p){var y=this.em,Z=p.target.value;y.set("state",Z)},m.prototype.addNewTag=function(p){var y=p.trim();y&&(this.module.addSelected({label:y}),this.endNewTag())},m.prototype.addToClasses=function(p,y){var Z=y,Y=this.getClasses(),q=new z({model:p,config:this.config,coll:this.collection,module:this.module}).render().el;return Z?Z.appendChild(q):Y.append(q),q},m.prototype.renderClasses=function(){var p=this,y=document.createDocumentFragment(),Z=this.getClasses();Z.empty(),this.collection.each((function(Y){return p.addToClasses(Y,y)})),Z.append(y)},m.prototype.getClasses=function(){return this.$el.find("[data-selectors]")},m.prototype.getStates=function(){if(!this.$states){var p=this.$el.find("[data-states]");this.$states=p[0]&&p}return this.$states},m.prototype.getStatesC=function(){return this.$statesC||(this.$statesC=this.$el.find("#"+this.stateInputC)),this.$statesC},m.prototype.renderStates=function(){var p=this.module,y=this.em,Z=y.t("selectorManager.emptyState"),Y=p.getStates().map((function(N){var a=y.t("selectorManager.states.".concat(N.id))||N.getLabel()||N.id;return'<option value="'.concat(N.id,'">').concat(a,"</option>")})).join(""),q=this.getStates();q&&q.html('<option value="">'.concat(Z,"</option>").concat(Y)),this.checkStates()},m.prototype.render=function(){var p=this,y=p.em,Z=p.pfx,Y=p.ppfx,q=p.config,N=p.$el,a=p.el,c=q.render,C={iconSync:q.iconSync,iconAdd:q.iconAdd,labelHead:y.t("selectorManager.label"),labelInfo:y.t("selectorManager.selected"),ppfx:Y,pfx:Z,el:a};N.html(this.template(C));var Q=c&&c(C);return Q&&Q!==a&&N.empty().append(Q),this.$input=N.find("[data-input]"),this.$addBtn=N.find("[data-add]"),this.$classes=N.find("#"+Z+"tags-c"),this.$btnSyncEl=N.find("[data-sync-style]"),this.$input.hide(),this.renderStates(),this.renderClasses(),N.attr("class","".concat(this.className," ").concat(Y,"one-bg ").concat(Y,"two-color")),this},m})(ce.View);var ye,ee,O,j,E,B=(function(){var h=function(m,p){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,Z){y.__proto__=Z}||function(y,Z){for(var Y in Z)Object.prototype.hasOwnProperty.call(Z,Y)&&(y[Y]=Z[Y])},h(m,p)};return function(m,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");function y(){this.constructor=m}h(m,p),m.prototype=p===null?Object.create(p):(y.prototype=p.prototype,new y)}})(),X=function(){return X=Object.assign||function(h){for(var m,p=1,y=arguments.length;p<y;p++)for(var Z in m=arguments[p])Object.prototype.hasOwnProperty.call(m,Z)&&(h[Z]=m[Z]);return h},X.apply(this,arguments)},_=function(h,m,p){if(p||arguments.length===2)for(var y,Z=0,Y=m.length;Z<Y;Z++)!y&&Z in m||(y||(y=Array.prototype.slice.call(m,0,Z)),y[Z]=m[Z]);return h.concat(y||Array.prototype.slice.call(m))},M=function(h){return(0,fe.isString)(h)&&h[0]=="#"},s=function(h){return(0,fe.isString)(h)&&h[0]=="."},l="selector",f="".concat(l,":"),w="".concat(f,"add"),te="".concat(f,"update"),J="".concat(f,"remove"),R="".concat(J,":before"),k="".concat(f,"custom"),v="".concat(f,"state");const b=(function(h){function m(){var p=h!==null&&h.apply(this,arguments)||this;return p.name="SelectorManager",p.Selector=oe.Z,p.Selectors=W.Z,p.events={all:l,update:te,add:w,remove:J,removeBefore:R,state:v,custom:k},p.__update=(0,fe.debounce)((function(){p.__trgCustom()}),0),p}return B(m,h),m.prototype.init=function(p){var y=this;p===void 0&&(p={}
452),this.__initConfig(ae,p);var Z=this.getConfig(),Y=this.em,q=Z.pStylePrefix;return q&&(Z.stylePrefix=q+Z.stylePrefix),this.all=new W.Z(Z.selectors),this.selected=new W.Z([],{em:Y,config:Z}),this.states=new ce.Collection(Z.states.map((function(N){return new P(N)})),{model:P}),this.model=new ce.Model({cFirst:Z.componentFirst,_undo:!0}),this.__initListen({collections:[this.states,this.selected],propagate:[{entity:this.states,event:this.events.state}]}),Y.on("change:state",(function(N,a){return Y.trigger(v,a)})),this.model.on("change:cFirst",(function(N,a){return Y.trigger("selector:type",a)})),this.model.listenTo(Y,"component:toggled component:update:classes change:device styleManager:update selector:state selector:type",(function(){return y.__update()})),this},m.prototype.__trgCustom=function(p){this.em.trigger(this.events.custom,this.__customData(p))},m.prototype.__customData=function(p){p===void 0&&(p={});var y=p.container;return{states:this.getStates(),selected:this.getSelected(),container:y}},m.prototype.postRender=function(){this.__appendTo(),this.__trgCustom()},m.prototype.select=function(p,y){y===void 0&&(y={});var Z=Array.isArray(p)?p:[p],Y=this.em.get("StyleManager").select(Z,y),q=this.selectorTags,N=Y.filter((function(a){return a})).map((function(a){return(0,D.isComponent)(a)||(0,D.isRule)(a)&&!a.get("selectorsAdd")?a:a.getSelectorsString()}));return q&&q.componentChanged({targets:N}),this},m.prototype.addSelector=function(p,y,Z){y===void 0&&(y={}),Z===void 0&&(Z={});var Y=X({},y);(0,fe.isObject)(p)?Y=p:Y.name=p,M(Y.name)?(Y.name=Y.name.substr(1),Y.type=oe.Z.TYPE_ID):s(Y.name)&&(Y.name=Y.name.substr(1)),Y.label&&!Y.name&&(Y.name=this.escapeName(Y.label));var q=Y.name,N=this.getConfig(),a=this.getAll(),c=this.em,C=q?this.get(q,Y.type):a.where(Y)[0];if(!C){var Q=Y instanceof oe.Z?Y:new oe.Z(Y,X(X({},Z),{config:N,em:c}));return a.add(Q,Z)}return C},m.prototype.getSelector=function(p,y){return y===void 0&&(y=oe.Z.TYPE_CLASS),M(p)?(p=p.substr(1),y=oe.Z.TYPE_ID):s(p)&&(p=p.substr(1)),this.getAll().where({name:p,type:y})[0]},m.prototype.add=function(p,y){var Z=this;y===void 0&&(y={});var Y=(0,fe.isString)(p)?{}:y;return(0,fe.isArray)(p)?p.map((function(q){return Z.addSelector(q,y,Y)})):this.addSelector(p,y,Y)},m.prototype.addClass=function(p){var y=this,Z=[];return(0,fe.isString)(p)&&(p=p.trim().split(" ")),p.forEach((function(Y){return Z.push(y.addSelector(Y))})),Z},m.prototype.get=function(p,y){var Z=this;if((0,fe.isArray)(p)){var Y=[];return p.map((function(q){return Z.getSelector(q)})).filter((function(q){return q})).forEach((function(q){return Y.indexOf(q)<0&&Y.push(q)})),Y}return this.getSelector(p,y)||null},m.prototype.remove=function(p,y){return this.__remove(p,y)},m.prototype.setState=function(p){return this.em.setState(p),this},m.prototype.getState=function(){return this.em.getState()},m.prototype.getStates=function(){return _([],this.states.models,!0)},m.prototype.setStates=function(p,y){return this.states.reset(p.map((function(Z){return new P(Z)})),y)},m.prototype.getSelected=function(){return this.__getCommon()},m.prototype.addSelected=function(p){var y=this.add(p);this.em.getSelectedAll().forEach((function(Z){Z.getSelectors().add(y)}))},m.prototype.removeSelected=function(p){this.em.getSelectedAll().forEach((function(y){!p.get("protected")&&y&&y.getSelectors().remove(p)}))},m.prototype.getSelectedTargets=function(){return this.em.get("StyleManager").getSelectedAll()},m.prototype.setComponentFirst=function(p){this.getConfig().componentFirst=p,this.model.set({cFirst:p})},m.prototype.getComponentFirst=function(){return this.getConfig().componentFirst},m.prototype.escapeName=function(p){var y=this.getConfig().escapeName;return y?y(p):oe.Z.escapeName(p)},m.prototype.render=function(p){this.em;var y=this.selectorTags,Z=this.getConfig(),Y=y&&y.el;return this.selected.reset(p),this.selectorTags=new ne({el:Y,collection:this.selected,module:this,config:Z}),this.selectorTags.render().el},m.prototype.destroy=function(){var p=this.selectorTags;this.model.stopListening(),this.__destroy(),p?.remove(),this.selectorTags=void 0},m.prototype.__getCommon=function(){return this.__getCommonSelectors(this.em.getSelectedAll())},m.prototype.__getCommonSelectors=function(p,y){y===void 0&&(y={});var Z=p.map((function(Y){return Y.getSelectors&&Y.getSelectors().getValid(y)}
452)).filter(Boolean);return this.__common.apply(this,Z)},m.prototype.__common=function(){for(var p=this,y=[],Z=0;Z<arguments.length;Z++)y[Z]=arguments[Z];return y.length?y.length===1?y[0]:y.length===2?y[0].filter((function(Y){return y[1].indexOf(Y)>=0})):y.slice(1).reduce((function(Y,q){return p.__common(Y,q)}),y[0]):[]},m})(ie.Z)},5963:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>W});var fe,D=S(9050),ie=S(2316),ce=(fe=function(I,g){return fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,x){P.__proto__=x}||function(P,x){for(var A in x)Object.prototype.hasOwnProperty.call(x,A)&&(P[A]=x[A])},fe(I,g)},function(I,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");function P(){this.constructor=I}fe(I,g),I.prototype=g===null?Object.create(g):(P.prototype=g.prototype,new P)}),ae=1,se=2,oe=(function(I){function g(P,x){x===void 0&&(x={});var A=I.call(this,P,x)||this,$=x.config,re=$===void 0?{}:$,z=A.get("name"),F=A.get("label");z?F||A.set("label",z):A.set("name",F);var G=A.get("name"),H=re.escapeName,ne=H?H(G):g.escapeName(G);return A.set("name",ne),A.em=x.em,A}return ce(g,I),g.prototype.defaults=function(){return{name:"",label:"",type:ae,active:!0,private:!1,protected:!1,_undo:!0}},g.prototype.isId=function(){return this.get("type")===se},g.prototype.isClass=function(){return this.get("type")===ae},g.prototype.getFullName=function(P){P===void 0&&(P={});var x=P.escape,A=this.get("name"),$="";switch(this.get("type")){case ae:$=".";break;case se:$="#"}return $+(x?x(A):A)},g.prototype.toString=function(){return this.getFullName()},g.prototype.getLabel=function(){return this.get("label")},g.prototype.setLabel=function(P){return this.set("label",P)},g.prototype.getActive=function(){return this.get("active")},g.prototype.setActive=function(P){return this.set("active",P)},g.prototype.toJSON=function(P){P===void 0&&(P={});var x=this.em,A=ie.Model.prototype.toJSON.call(this,[P]),$=(0,D.result)(this,"defaults");if(x&&x.getConfig().avoidDefaults){(0,D.forEach)($,(function(z,F){A[F]===z&&delete A[F]})),A.label===A.name&&delete A.label;var re=(0,D.keys)(A).length;re===1&&A.name&&(A=A.name),re===2&&A.name&&A.type&&(A=this.getFullName())}return A},g.escapeName=function(P){return"".concat(P).trim().replace(/([^a-z0-9\w-\:]+)/gi,"-")},g.TYPE_CLASS=ae,g.TYPE_ID=se,g})(ie.Model);const W=oe;oe.prototype.idAttribute="name"},966:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>W});var fe,D=S(9050),ie=S(2316),ce=S(5963),ae=(fe=function(I,g){return fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,x){P.__proto__=x}||function(P,x){for(var A in x)Object.prototype.hasOwnProperty.call(x,A)&&(P[A]=x[A])},fe(I,g)},function(I,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");function P(){this.constructor=I}fe(I,g),I.prototype=g===null?Object.create(g):(P.prototype=g.prototype,new P)}),se=function(I,g){return I.reduce((function(P,x,A){return P.concat(se(I.slice(A+1),"".concat(g).concat(x)))}),[g])},oe=(function(I){function g(){return I!==null&&I.apply(this,arguments)||this}return ae(g,I),g.prototype.modelId=function(P){return"".concat(P.name,"_").concat(P.type||ce.Z.TYPE_CLASS)},g.prototype.getStyleable=function(){return(0,D.filter)(this.models,(function(P){return P.get("active")&&!P.get("private")}))},g.prototype.getValid=function(P){var x=(P===void 0?{}:P).noDisabled;return(0,D.filter)(this.models,(function(A){return!A.get("private")})).filter((function(A){return x?A.get("active"):1}))},g.prototype.getFullString=function(P,x){x===void 0&&(x={});var A=[];return(P||this).forEach((function($){return A.push($.getFullName(x))})),x.sort&&A.sort(),A.join("").trim()},g.prototype.getFullName=function(P){P===void 0&&(P={});var x=P.combination,A=P.array,$=[],re=this.map((function(z){return z.getFullName(P)})).sort();return x?re.forEach((function(z,F){$=$.concat(se(re.slice(F+1),z))})):$=re,A?$:x?$.join(","):$.join("")},g})(ie.Collection);const W=oe;oe.prototype.model=ce.Z},7539:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>D});var fe=S(1163);function D(ie){for(var ce=[],ae=1;ae<arguments.length;ae++)ce[ae-1]=arguments[ae];var se=ie.raw;return se.reduce((function(oe,W,I){var g=ce[I-1],P=se[I-1];return Array.isArray(g)?g=g.join(""):P&&P.slice(-1)==="$"?oe=oe.slice(0,-1):g=(0,fe.escape)(g),oe+g+W}))}},1163:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{appendStyles:()=>P,buildBase64UrlFromSvg:()=>p,camelCase:()=>F,capitalize:()=>R,createId:()=>m,deepMerge:()=>B,escape:()=>E,find:()=>j,getElRect:()=>_,getElement:()=>ne,getGlobal:()=>se,getKeyChar:()=>l,getKeyCode:()=>s,getModel:()=>X,getPointerEvent:()=>M,getUiClass:()=>g,getUnitFromValue:()=>re,getViewEl:()=>b,hasDnd:()=>H,hasWin:()=>ae,isCommentNode:()=>ee,isComponent:()=>k,isDef:()=>ce,isEmptyObj:()=>J,isEnterKey:()=>w,isEscKey:()=>f,isObject:()=>te,isRule:()=>v,isTaggableNode:()=>O,isTextNode:()=>ye,matches:()=>I,normalizeFloat:()=>G,off:()=>$,on:()=>A,setViewEl:()=>h,shallowDiff:()=>x,toLowerCase:()=>oe,upFirst:()=>z});var fe=S(9050),D=function(){return D=Object.assign||function(y){for(var Z,Y=1,q=arguments.length;Y<q;Y++)for(var N in Z=arguments[Y])Object.prototype.hasOwnProperty.call(Z,N)&&(y[N]=Z[N]);return y},D.apply(this,arguments)},ie=function(y,Z,Y){if(Y||arguments.length===2)for(var q,N=0,a=Z.length;N<a;N++)!q&&N in Z||(q||(q=Array.prototype.slice.call(Z,0,N)),q[N]=Z[N]);return y.concat(q||Array.prototype.slice.call(Z))},ce=function(y){return y!==void 0},ae=function(){return typeof window<"u"},se=function(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:S.g},oe=function(y){return(y||"").toLowerCase()},W=ae()?window.Element.prototype:{},I=W.matches||W.webkitMatchesSelector||W.mozMatchesSelector||W.msMatchesSelector,g=function(y,Z){var Y=y.getConfig(),q=Y.stylePrefix;return[Y.customUI&&"".concat(q,"cui"),Z].filter((function(N){return N})).join(" ")},P=function(y,Z){Z===void 0&&(Z={});var Y=(0,fe.isArray)(y)?ie([],y,!0):[y];if(Y.length){var q=Y.shift();if(q&&(!Z.unique||!document.querySelector('link[href="'.concat(q,'"]')))){var N=document.head,a=document.createElement("link");a.href=q,a.rel="stylesheet",Z.prepand?N.insertBefore(a,N.firstChild):N.appendChild(a)}P(Y)}},x=function(y,Z){var Y={},q=(0,fe.keys)(Z);for(var N in y)if(y.hasOwnProperty(N)){var a=y[N],c=Z[N];q.indexOf(N)>=0?a!==c&&(Y[N]=c):Y[N]=null}for(var N in Z)Z.hasOwnProperty(N)&&(0,fe.isUndefined)(y[N])&&(Y[N]=Z[N]);return Y},A=function(y,Z,Y,q){var N=Z.split(/\s+/);y=y instanceof Array?y:[y];
452for(var a=function(C){y.forEach((function(Q){return Q&&Q.addEventListener(N[C],Y,q)}))},c=0;c<N.length;++c)a(c)},$=function(y,Z,Y,q){var N=Z.split(/\s+/);y=y instanceof Array?y:[y];for(var a=function(C){y.forEach((function(Q){return Q&&Q.removeEventListener(N[C],Y,q)}))},c=0;c<N.length;++c)a(c)},re=function(y){return y.replace(parseFloat(y),"")},z=function(y){return y[0].toUpperCase()+y.toLowerCase().slice(1)},F=function(y){return y.replace(/-./g,(function(Z){return Z[1].toUpperCase()}))},G=function(y,Z,Y){Z===void 0&&(Z=1),Y===void 0&&(Y=0);var q=0;if(isNaN(y))return Y;if(y=parseFloat(y),Math.floor(y)!==y){var N=Z.toString().split(".")[1];q=N?N.length:0}return q?parseFloat(y.toFixed(q)):y},H=function(y){return"draggable"in document.createElement("i")&&(y?y.get("Config").nativeDnD:1)},ne=function(y){return(0,fe.isElement)(y)||ye(y)?y:y&&y.getEl?y.getEl():void 0},ye=function(y){return y&&y.nodeType===3},ee=function(y){return y&&y.nodeType===8},O=function(y){return y&&!ye(y)&&!ee(y)},j=function(y,Z){var Y=null;return y.some((function(q,N){return Z(q,N,y)?(Y=q,1):0})),Y},E=function(y){return y===void 0&&(y=""),"".concat(y).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`")},B=function(){for(var y=[],Z=0;Z<arguments.length;Z++)y[Z]=arguments[Z];for(var Y=D({},y[0]),q=1;q<y.length;q++){var N=D({},y[q]);for(var a in N){var c=Y[a],C=N[a];te(c)&&te(C)?Y[a]=B(c,C):Y[a]=C}}return Y},X=function(y,Z){var Y=y;return!Z&&y&&y.__cashData?Y=y.__cashData.model:(0,fe.isElement)(y)&&(Y=Z(y).data("model")),Y},_=function(y){var Z,Y={top:0,left:0,width:0,height:0};if(!y)return Y;if(ye(y)){var q=document.createRange();q.selectNode(y),Z=q.getBoundingClientRect(),q.detach()}return Z||(y.getBoundingClientRect?y.getBoundingClientRect():Y)},M=function(y){return y.touches&&y.touches[0]?y.touches[0]:y},s=function(y){return y.which||y.keyCode},l=function(y){return String.fromCharCode(s(y))},f=function(y){return s(y)===27},w=function(y){return s(y)===13},te=function(y){return y!==null&&!Array.isArray(y)&&typeof y=="object"},J=function(y){return Object.keys(y).length<=0},R=function(y){return y&&y.charAt(0).toUpperCase()+y.substring(1)},k=function(y){return y&&y.toHTML},v=function(y){return y&&y.toCSS},b=function(y){return y.__gjsv},h=function(y,Z){y.__gjsv=Z},m=function(y){y===void 0&&(y=16);for(var Z="",Y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",q=Y.length,N=0;N<y;N++)Z+=Y.charAt(Math.floor(Math.random()*q));return Z},p=function(y){return y&&y.substr(0,4)==="<svg"?"data:image/svg+xml;base64,".concat(window.btoa(y)):y}},5666:We=>{var ke=(function(S){"use strict";var fe,D=Object.prototype,ie=D.hasOwnProperty,ce=typeof Symbol=="function"?Symbol:{},ae=ce.iterator||"@@iterator",se=ce.asyncIterator||"@@asyncIterator",oe=ce.toStringTag||"@@toStringTag";function W(l,f,w){return Object.defineProperty(l,f,{value:w,enumerable:!0,configurable:!0,writable:!0}),l[f]}try{W({},"")}catch{W=function(f,w,te){return f[w]=te}}function I(l,f,w,te){var J=f&&f.prototype instanceof z?f:z,R=Object.create(J.prototype),k=new _(te||[]);return R._invoke=(function(v,b,h){var m=P;return function(p,y){if(m===A)throw new Error("Generator is already running");if(m===$){if(p==="throw")throw y;return s()}for(h.method=p,h.arg=y;;){var Z=h.delegate;if(Z){var Y=E(Z,h);if(Y){if(Y===re)continue;return Y}}if(h.method==="next")h.sent=h._sent=h.arg;else if(h.method==="throw"){if(m===P)throw m=$,h.arg;h.dispatchException(h.arg)}else h.method==="return"&&h.abrupt("return",h.arg);m=A;var q=g(v,b,h);if(q.type==="normal"){if(m=h.done?$:x,q.arg===re)continue;return{value:q.arg,done:h.done}}q.type==="throw"&&(m=$,h.method="throw",h.arg=q.arg)}}})(l,w,k),R}function g(l,f,w){try{return{type:"normal",arg:l.call(f,w)}}catch(te){return{type:"throw",arg:te}}}S.wrap=I;var P="suspendedStart",x="suspendedYield",A="executing",$="completed",re={};function z(){}function F(){}function G(){}var H={};H[ae]=function(){return this};var ne=Object.getPrototypeOf,ye=ne&&ne(ne(M([])));ye&&ye!==D&&ie.call(ye,ae)&&(H=ye);var ee=G.prototype=z.prototype=Object.create(H);function O(l){["next","throw","return"].forEach((function(f){W(l,f,(function(w){return this._invoke(f,w)}))}))}function j(l,f){function w(J,R,k,v){var b=g(l[J],l,R);if(b.type!=="throw"){var h=b.arg,m=h.value;return m&&typeof m=="object"&&ie.call(m,"__await")?f.resolve(m.__await).then((function(p){w("next",p,k,v)}),(function(p){w("throw",p,k,v)})):f.resolve(m).then((function(p){h.value=p,k(h)}),(function(p){return w("throw",p,k,v)}))}v(b.arg)}var te;this._invoke=function(J,R){function k(){return new f((function(v,b){w(J,R,v,b)}))}return te=te?te.then(k,k):k()}}function E(l,f){var w=l.iterator[f.method];if(w===fe){if(f.delegate=null,f.method==="throw"){if(l.iterator.return&&
452(f.method="return",f.arg=fe,E(l,f),f.method==="throw"))return re;f.method="throw",f.arg=new TypeError("The iterator does not provide a 'throw' method")}return re}var te=g(w,l.iterator,f.arg);if(te.type==="throw")return f.method="throw",f.arg=te.arg,f.delegate=null,re;var J=te.arg;return J?J.done?(f[l.resultName]=J.value,f.next=l.nextLoc,f.method!=="return"&&(f.method="next",f.arg=fe),f.delegate=null,re):J:(f.method="throw",f.arg=new TypeError("iterator result is not an object"),f.delegate=null,re)}function B(l){var f={tryLoc:l[0]};1 in l&&(f.catchLoc=l[1]),2 in l&&(f.finallyLoc=l[2],f.afterLoc=l[3]),this.tryEntries.push(f)}function X(l){var f=l.completion||{};f.type="normal",delete f.arg,l.completion=f}function _(l){this.tryEntries=[{tryLoc:"root"}],l.forEach(B,this),this.reset(!0)}function M(l){if(l){var f=l[ae];if(f)return f.call(l);if(typeof l.next=="function")return l;if(!isNaN(l.length)){var w=-1,te=function J(){for(;++w<l.length;)if(ie.call(l,w))return J.value=l[w],J.done=!1,J;return J.value=fe,J.done=!0,J};return te.next=te}}return{next:s}}function s(){return{value:fe,done:!0}}return F.prototype=ee.constructor=G,G.constructor=F,F.displayName=W(G,oe,"GeneratorFunction"),S.isGeneratorFunction=function(l){var f=typeof l=="function"&&l.constructor;return!!f&&(f===F||(f.displayName||f.name)==="GeneratorFunction")},S.mark=function(l){return Object.setPrototypeOf?Object.setPrototypeOf(l,G):(l.__proto__=G,W(l,oe,"GeneratorFunction")),l.prototype=Object.create(ee),l},S.awrap=function(l){return{__await:l}},O(j.prototype),j.prototype[se]=function(){return this},S.AsyncIterator=j,S.async=function(l,f,w,te,J){J===void 0&&(J=Promise);var R=new j(I(l,f,w,te),J);return S.isGeneratorFunction(f)?R:R.next().then((function(k){return k.done?k.value:R.next()}))},O(ee),W(ee,oe,"Generator"),ee[ae]=function(){return this},ee.toString=function(){return"[object Generator]"},S.keys=function(l){var f=[];for(var w in l)f.push(w);return f.reverse(),function te(){for(;f.length;){var J=f.pop();if(J in l)return te.value=J,te.done=!1,te}return te.done=!0,te}},S.values=M,_.prototype={constructor:_,reset:function(l){if(this.prev=0,this.next=0,this.sent=this._sent=fe,this.done=!1,this.delegate=null,this.method="next",this.arg=fe,this.tryEntries.forEach(X),!l)for(var f in this)f.charAt(0)==="t"&&ie.call(this,f)&&!isNaN(+f.slice(1))&&(this[f]=fe)},stop:function(){this.done=!0;var l=this.tryEntries[0].completion;if(l.type==="throw")throw l.arg;return this.rval},dispatchException:function(l){if(this.done)throw l;var f=this;function w(b,h){return R.type="throw",R.arg=l,f.next=b,h&&(f.method="next",f.arg=fe),!!h}for(var te=this.tryEntries.length-1;te>=0;--te){var J=this.tryEntries[te],R=J.completion;if(J.tryLoc==="root")return w("end");if(J.tryLoc<=this.prev){var k=ie.call(J,"catchLoc"),v=ie.call(J,"finallyLoc");if(k&&v){if(this.prev<J.catchLoc)return w(J.catchLoc,!0);if(this.prev<J.finallyLoc)return w(J.finallyLoc)}else if(k){if(this.prev<J.catchLoc)return w(J.catchLoc,!0)}else{if(!v)throw new Error("try statement without catch or finally");if(this.prev<J.finallyLoc)return w(J.finallyLoc)}}}},abrupt:function(l,f){for(var w=this.tryEntries.length-1;w>=0;--w){var te=this.tryEntries[w];if(te.tryLoc<=this.prev&&ie.call(te,"finallyLoc")&&this.prev<te.finallyLoc){var J=te;break}}J&&(l==="break"||l==="continue")&&J.tryLoc<=f&&f<=J.finallyLoc&&(J=null);var R=J?J.completion:{};return R.type=l,R.arg=f,J?(this.method="next",this.next=J.finallyLoc,re):this.complete(R)},complete:function(l,f){if(l.type==="throw")throw l.arg;return l.type==="break"||l.type==="continue"?this.next=l.arg:l.type==="return"?(this.rval=this.arg=l.arg,this.method="return",this.next="end"):l.type==="normal"&&f&&(this.next=f),re},finish:function(l){for(var f=this.tryEntries.length-1;f>=0;--f){var w=this.tryEntries[f];if(w.finallyLoc===l)return this.complete(w.completion,w.afterLoc),X(w),re}},catch:function(l){for(var f=this.tryEntries.length-1;f>=0;--f){var w=this.tryEntries[f];if(w.tryLoc===l){var te=w.completion;if(te.type==="throw"){var J=te.arg;X(w)}return J}}throw new Error("illegal catch attempt")},delegateYield:function(l,f,w){return this.delegate={iterator:M(l),resultName:f,nextLoc:w},this.method==="next"&&(this.arg=fe),re}},S})(We.exports);try{regeneratorRuntime=ke}catch{Function("r","regeneratorRuntime = r")(ke)}},2828:(We,ke,S)=>{var fe={"./CanvasClear":7202,"./CanvasClear.js":7202,"./CanvasMove":327,"./CanvasMove.js":327,"./CommandAbstract":238,"./CommandAbstract.js":238,"./ComponentDelete":5820,"./ComponentDelete.js":5820,"./ComponentDrag":6694,"./ComponentDrag.js":6694,"./ComponentEnter":1947,"./ComponentEnter.js":1947,"./ComponentExit":3888,"./ComponentExit.js":3888,"./ComponentNext":5883,"./ComponentNext.js":5883,"./ComponentPrev":7508,"./ComponentPrev.js":7508,"./ComponentStyleClear":8769,"./ComponentStyleClear.js":8769,"./CopyComponent":2213,"./CopyComponent.js":2213,"./DeleteComponent":5049,"./DeleteComponent.js":5049,"./ExportTemplate":3775,"./ExportTemplate.js":3775,"./Fullscreen":58,"./Fullscreen.js":58,"./MoveComponent":8658,"./MoveComponent.js":8658,"./OpenAssets":9617,"./OpenAssets.js":9617,"./OpenBlocks":5821,"./OpenBlocks.js":5821,"./OpenLayers":3452,"./OpenLayers.js":3452,"./OpenStyleManager":2840,"./OpenStyleManager.js":2840,"./OpenTraitManager":8644,"./OpenTraitManager.js":8644,"./PasteComponent":560,"./PasteComponent.js":560,"./Preview":4944,"./Preview.js":4944,"./Resize":7538,"./Resize.js":7538,"./SelectComponent":2620,"./SelectComponent.js":2620,"./SelectPosition":8463,"./SelectPosition.js":8463,"./ShowOffset":7994,"./ShowOffset.js":7994,"./SwitchVisibility":8352,"./SwitchVisibility.js":8352};function D(ce){var ae=ie(ce);return S(ae)}function ie(ce){if(!S.o(fe,ce)){var ae=new Error("Cannot find module '"+ce+"'");throw ae.code="MODULE_NOT_FOUND",ae}return fe[ce]}D.keys=function(){return Object.keys(fe)},D.resolve=ie,We.exports=D,D.id=2828},907:(We,ke,S)=>{"use strict";function fe(D,ie){(ie==null||ie>D.length)&&(ie=D.length);for(var ce=0,ae=new Array(ie);ce<ie;ce++)ae[ce]=D[ce];return ae}S.d(ke,{Z:()=>fe})},7326:(We,ke,S)=>{"use strict";function fe(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D}S.d(ke,{Z:()=>fe})},5861:(We,ke,S)=>{"use strict";function fe(ie,ce,ae,se,oe,W,I){try{var g=ie[W](I),P=g.value}catch(x){return void ae(x)}
452g.done?ce(P):Promise.resolve(P).then(se,oe)}function D(ie){return function(){var ce=this,ae=arguments;return new Promise((function(se,oe){var W=ie.apply(ce,ae);function I(P){fe(W,se,oe,I,g,"next",P)}function g(P){fe(W,se,oe,I,g,"throw",P)}I(void 0)}))}}S.d(ke,{Z:()=>D})},5671:(We,ke,S)=>{"use strict";function fe(D,ie){if(!(D instanceof ie))throw new TypeError("Cannot call a class as a function")}S.d(ke,{Z:()=>fe})},3144:(We,ke,S)=>{"use strict";function fe(ie,ce){for(var ae=0;ae<ce.length;ae++){var se=ce[ae];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(ie,se.key,se)}}function D(ie,ce,ae){return ce&&fe(ie.prototype,ce),ae&&fe(ie,ae),Object.defineProperty(ie,"prototype",{writable:!1}),ie}S.d(ke,{Z:()=>D})},4942:(We,ke,S)=>{"use strict";function fe(D,ie,ce){return ie in D?Object.defineProperty(D,ie,{value:ce,enumerable:!0,configurable:!0,writable:!0}):D[ie]=ce,D}S.d(ke,{Z:()=>fe})},1120:(We,ke,S)=>{"use strict";function fe(D){return fe=Object.setPrototypeOf?Object.getPrototypeOf:function(ie){return ie.__proto__||Object.getPrototypeOf(ie)},fe(D)}S.d(ke,{Z:()=>fe})},9340:(We,ke,S)=>{"use strict";function fe(ie,ce){return fe=Object.setPrototypeOf||function(ae,se){return ae.__proto__=se,ae},fe(ie,ce)}function D(ie,ce){if(typeof ce!="function"&&ce!==null)throw new TypeError("Super expression must either be null or a function");ie.prototype=Object.create(ce&&ce.prototype,{constructor:{value:ie,writable:!0,configurable:!0}}),Object.defineProperty(ie,"prototype",{writable:!1}),ce&&fe(ie,ce)}S.d(ke,{Z:()=>D})},4925:(We,ke,S)=>{"use strict";function fe(D,ie){if(D==null)return{};var ce,ae,se=(function(W,I){if(W==null)return{};var g,P,x={},A=Object.keys(W);for(P=0;P<A.length;P++)g=A[P],I.indexOf(g)>=0||(x[g]=W[g]);return x})(D,ie);if(Object.getOwnPropertySymbols){var oe=Object.getOwnPropertySymbols(D);for(ae=0;ae<oe.length;ae++)ce=oe[ae],ie.indexOf(ce)>=0||Object.prototype.propertyIsEnumerable.call(D,ce)&&(se[ce]=D[ce])}return se}S.d(ke,{Z:()=>fe})},2963:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>ie});var fe=S(1002),D=S(7326);function ie(ce,ae){if(ae&&((0,fe.Z)(ae)==="object"||typeof ae=="function"))return ae;if(ae!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(0,D.Z)(ce)}},885:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>D});var fe=S(181);function D(ie,ce){return(function(ae){if(Array.isArray(ae))return ae})(ie)||(function(ae,se){var oe=ae==null?null:typeof Symbol<"u"&&ae[Symbol.iterator]||ae["@@iterator"];if(oe!=null){var W,I,g=[],P=!0,x=!1;try{for(oe=oe.call(ae);!(P=(W=oe.next()).done)&&(g.push(W.value),!se||g.length!==se);P=!0);}catch(A){x=!0,I=A}finally{try{P||oe.return==null||oe.return()}finally{if(x)throw I}}return g}})(ie,ce)||(0,fe.Z)(ie,ce)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 453In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}},168:(We,ke,S)=>{"use strict";function fe(D,ie){return ie||(ie=D.slice(0)),Object.freeze(Object.defineProperties(D,{raw:{value:Object.freeze(ie)}}))}S.d(ke,{Z:()=>fe})},2982:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>ie});var fe=S(907),D=S(181);function ie(ce){return(function(ae){if(Array.isArray(ae))return(0,fe.Z)(ae)})(ce)||(function(ae){if(typeof Symbol<"u"&&ae[Symbol.iterator]!=null||ae["@@iterator"]!=null)return Array.from(ae)})(ce)||(0,D.Z)(ce)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 454In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}},1002:(We,ke,S)=>{"use strict";function fe(D){return fe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ie){return typeof ie}:function(ie){return ie&&typeof Symbol=="function"&&ie.constructor===Symbol&&ie!==Symbol.prototype?"symbol":typeof ie},fe(D)}S.d(ke,{Z:()=>fe})},181:(We,ke,S)=>{"use strict";S.d(ke,{Z:()=>D});var fe=S(907);function D(ie,ce){if(ie){if(typeof ie=="string")return(0,fe.Z)(ie,ce);var ae=Object.prototype.toString.call(ie).slice(8,-1);return ae==="Object"&&ie.constructor&&(ae=ie.constructor.name),ae==="Map"||ae==="Set"?Array.from(ie):ae==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ae)?(0,fe.Z)(ie,ce):void 0}}},9050:(We,ke,S)=>{"use strict";S.r(ke),S.d(ke,{VERSION:()=>D,after:()=>_e,all:()=>yr,allKeys:()=>_t,any:()=>Pt,assign:()=>ut,before:()=>Le,bind:()=>nr,bindAll:()=>rr,chain:()=>cr,chunk:()=>uo,clone:()=>cn,collect:()=>an,compact:()=>ao,compose:()=>ve,constant:()=>C,contains:()=>xt,countBy:()=>Br,create:()=>yn,debounce:()=>i,default:()=>ti,defaults:()=>Zt,defer:()=>V,delay:()=>L,detect:()=>on,difference:()=>Mn,drop:()=>Lr,each:()=>zt,escape:()=>Nt,every:()=>yr,extend:()=>Bt,extendOwn:()=>ut,filter:()=>mn,find:()=>on,findIndex:()=>Qe,findKey:()=>qe,findLastIndex:()=>ct,findWhere:()=>ln,first:()=>Cr,flatten:()=>zr,foldl:()=>hr,foldr:()=>
454Gn,forEach:()=>zt,functions:()=>Yt,get:()=>_n,groupBy:()=>fi,has:()=>wn,head:()=>Cr,identity:()=>An,include:()=>xt,includes:()=>xt,indexBy:()=>Mr,indexOf:()=>It,initial:()=>Hr,inject:()=>hr,intersection:()=>lo,invert:()=>$t,invoke:()=>Lt,isArguments:()=>N,isArray:()=>Z,isArrayBuffer:()=>J,isBoolean:()=>B,isDataView:()=>y,isDate:()=>l,isElement:()=>X,isEmpty:()=>He,isEqual:()=>mt,isError:()=>w,isFinite:()=>a,isFunction:()=>v,isMap:()=>at,isMatch:()=>et,isNaN:()=>c,isNull:()=>j,isNumber:()=>s,isObject:()=>O,isRegExp:()=>f,isSet:()=>wt,isString:()=>M,isSymbol:()=>te,isTypedArray:()=>xe,isUndefined:()=>E,isWeakMap:()=>tt,isWeakSet:()=>it,iteratee:()=>rn,keys:()=>Fe,last:()=>oo,lastIndexOf:()=>Gt,map:()=>an,mapObject:()=>Fn,matcher:()=>Tn,matches:()=>Tn,max:()=>Kn,memoize:()=>fr,methods:()=>Yt,min:()=>dr,mixin:()=>di,negate:()=>le,noop:()=>qn,now:()=>Rn,object:()=>hi,omit:()=>ji,once:()=>Ke,pairs:()=>Ut,partial:()=>ur,partition:()=>br,pick:()=>Ei,pluck:()=>Dt,property:()=>nn,propertyOf:()=>dn,random:()=>Vt,range:()=>Ai,reduce:()=>hr,reduceRight:()=>Gn,reject:()=>$n,rest:()=>Lr,restArguments:()=>ee,result:()=>kn,sample:()=>Yn,select:()=>mn,shuffle:()=>Tr,size:()=>ro,some:()=>Pt,sortBy:()=>Fr,sortedIndex:()=>Ct,tail:()=>Lr,take:()=>Cr,tap:()=>sn,template:()=>gn,templateSettings:()=>Pe,throttle:()=>u,times:()=>Kt,toArray:()=>no,toPath:()=>tn,transpose:()=>$r,unescape:()=>be,union:()=>Wr,uniq:()=>Ur,unique:()=>Ur,uniqueId:()=>er,unzip:()=>$r,values:()=>Rt,where:()=>fn,without:()=>so,wrap:()=>T,zip:()=>co});var fe={};S.r(fe),S.d(fe,{VERSION:()=>D,after:()=>_e,all:()=>yr,allKeys:()=>_t,any:()=>Pt,assign:()=>ut,before:()=>Le,bind:()=>nr,bindAll:()=>rr,chain:()=>cr,chunk:()=>uo,clone:()=>cn,collect:()=>an,compact:()=>ao,compose:()=>ve,constant:()=>C,contains:()=>xt,countBy:()=>Br,create:()=>yn,debounce:()=>i,default:()=>fo,defaults:()=>Zt,defer:()=>V,delay:()=>L,detect:()=>on,difference:()=>Mn,drop:()=>Lr,each:()=>zt,escape:()=>Nt,every:()=>yr,extend:()=>Bt,extendOwn:()=>ut,filter:()=>mn,find:()=>on,findIndex:()=>Qe,findKey:()=>qe,findLastIndex:()=>ct,findWhere:()=>ln,first:()=>Cr,flatten:()=>zr,foldl:()=>hr,foldr:()=>Gn,forEach:()=>zt,functions:()=>Yt,get:()=>_n,groupBy:()=>fi,has:()=>wn,head:()=>Cr,identity:()=>An,include:()=>xt,includes:()=>xt,indexBy:()=>Mr,indexOf:()=>It,initial:()=>Hr,inject:()=>hr,intersection:()=>lo,invert:()=>$t,invoke:()=>Lt,isArguments:()=>N,isArray:()=>Z,isArrayBuffer:()=>J,isBoolean:()=>B,isDataView:()=>y,isDate:()=>l,isElement:()=>X,isEmpty:()=>He,isEqual:()=>mt,isError:()=>w,isFinite:()=>a,isFunction:()=>v,isMap:()=>at,isMatch:()=>et,isNaN:()=>c,isNull:()=>j,isNumber:()=>s,isObject:()=>O,isRegExp:()=>f,isSet:()=>wt,isString:()=>M,isSymbol:()=>te,isTypedArray:()=>xe,isUndefined:()=>E,isWeakMap:()=>tt,isWeakSet:()=>it,iteratee:()=>rn,keys:()=>Fe,last:()=>oo,lastIndexOf:()=>Gt,map:()=>an,mapObject:()=>Fn,matcher:()=>Tn,matches:()=>Tn,max:()=>Kn,memoize:()=>fr,methods:()=>Yt,min:()=>dr,mixin:()=>di,negate:()=>le,noop:()=>qn,now:()=>Rn,object:()=>hi,omit:()=>ji,once:()=>Ke,pairs:()=>Ut,partial:()=>ur,partition:()=>br,pick:()=>Ei,pluck:()=>Dt,property:()=>nn,propertyOf:()=>dn,random:()=>Vt,range:()=>Ai,reduce:()=>hr,reduceRight:()=>Gn,reject:()=>$n,rest:()=>Lr,restArguments:()=>ee,result:()=>kn,sample:()=>Yn,select:()=>mn,shuffle:()=>Tr,size:()=>ro,some:()=>Pt,sortBy:()=>Fr,sortedIndex:()=>Ct,tail:()=>Lr,take:()=>Cr,tap:()=>sn,template:()=>gn,templateSettings:()=>Pe,throttle:()=>u,times:()=>Kt,toArray:()=>no,toPath:()=>tn,transpose:()=>$r,unescape:()=>be,union:()=>Wr,uniq:()=>Ur,unique:()=>Ur,uniqueId:()=>er,unzip:()=>$r,values:()=>Rt,where:()=>fn,without:()=>so,wrap:()=>T,zip:()=>co});var D="1.13.1",ie=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},ce=Array.prototype,ae=Object.prototype,se=typeof Symbol<"u"?Symbol.prototype:null,oe=ce.push,W=ce.slice,I=ae.toString,g=ae.hasOwnProperty,P=typeof ArrayBuffer<"u",x=typeof DataView<"u",A=Array.isArray,$=Object.keys,re=Object.create,z=P&&ArrayBuffer.isView,F=isNaN,G=isFinite,H=!{toString:null}.propertyIsEnumerable("toString"),ne=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleStr
454ing"],ye=Math.pow(2,53)-1;function ee(ue,we){return we=we==null?ue.length-1:+we,function(){for(var Re=Math.max(arguments.length-we,0),Me=Array(Re),ze=0;ze<Re;ze++)Me[ze]=arguments[ze+we];switch(we){case 0:return ue.call(this,Me);case 1:return ue.call(this,arguments[0],Me);case 2:return ue.call(this,arguments[0],arguments[1],Me)}var Ie=Array(we+1);for(ze=0;ze<we;ze++)Ie[ze]=arguments[ze];return Ie[we]=Me,ue.apply(this,Ie)}}function O(ue){var we=typeof ue;return we==="function"||we==="object"&&!!ue}function j(ue){return ue===null}function E(ue){return ue===void 0}function B(ue){return ue===!0||ue===!1||I.call(ue)==="[object Boolean]"}function X(ue){return!(!ue||ue.nodeType!==1)}function _(ue){var we="[object "+ue+"]";return function(Re){return I.call(Re)===we}}const M=_("String"),s=_("Number"),l=_("Date"),f=_("RegExp"),w=_("Error"),te=_("Symbol"),J=_("ArrayBuffer");var R=_("Function"),k=ie.document&&ie.document.childNodes;typeof Int8Array!="object"&&typeof k!="function"&&(R=function(ue){return typeof ue=="function"||!1});const v=R,b=_("Object");var h=x&&b(new DataView(new ArrayBuffer(8))),m=typeof Map<"u"&&b(new Map),p=_("DataView");const y=h?function(ue){return ue!=null&&v(ue.getInt8)&&J(ue.buffer)}:p,Z=A||_("Array");function Y(ue,we){return ue!=null&&g.call(ue,we)}var q=_("Arguments");(function(){q(arguments)||(q=function(ue){return Y(ue,"callee")})})();const N=q;function a(ue){return!te(ue)&&G(ue)&&!isNaN(parseFloat(ue))}function c(ue){return s(ue)&&F(ue)}function C(ue){return function(){return ue}}function Q(ue){return function(we){var Re=ue(we);return typeof Re=="number"&&Re>=0&&Re<=ye}}function pe(ue){return function(we){return we?.[ue]}}const Ce=pe("byteLength"),Se=Q(Ce);var me=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;const xe=P?function(ue){return z?z(ue)&&!y(ue):Se(ue)&&me.test(I.call(ue))}:C(!1),de=pe("length");function Ee(ue,we){we=(function(nt){for(var dt={},Ht=nt.length,en=0;en<Ht;++en)dt[nt[en]]=!0;return{contains:function(En){return dt[En]},push:function(En){return dt[En]=!0,nt.push(En)}}})(we);var Re=ne.length,Me=ue.constructor,ze=v(Me)&&Me.prototype||ae,Ie="constructor";for(Y(ue,Ie)&&!we.contains(Ie)&&we.push(Ie);Re--;)(Ie=ne[Re])in ue&&ue[Ie]!==ze[Ie]&&!we.contains(Ie)&&we.push(Ie)}function Fe(ue){if(!O(ue))return[];if($)return $(ue);var we=[];
454for(var Re in ue)Y(ue,Re)&&we.push(Re);return H&&Ee(ue,we),we}function He(ue){if(ue==null)return!0;var we=de(ue);return typeof we=="number"&&(Z(ue)||M(ue)||N(ue))?we===0:de(Fe(ue))===0}function et(ue,we){var Re=Fe(we),Me=Re.length;if(ue==null)return!Me;for(var ze=Object(ue),Ie=0;Ie<Me;Ie++){var nt=Re[Ie];if(we[nt]!==ze[nt]||!(nt in ze))return!1}return!0}function Ge(ue){return ue instanceof Ge?ue:this instanceof Ge?void(this._wrapped=ue):new Ge(ue)}function yt(ue){return new Uint8Array(ue.buffer||ue,ue.byteOffset||0,Ce(ue))}Ge.VERSION=D,Ge.prototype.value=function(){return this._wrapped},Ge.prototype.valueOf=Ge.prototype.toJSON=Ge.prototype.value,Ge.prototype.toString=function(){return String(this._wrapped)};var St="[object DataView]";function bt(ue,we,Re,Me){if(ue===we)return ue!==0||1/ue==1/we;if(ue==null||we==null)return!1;if(ue!=ue)return we!=we;var ze=typeof ue;return(ze==="function"||ze==="object"||typeof we=="object")&&Jt(ue,we,Re,Me)}function Jt(ue,we,Re,Me){ue instanceof Ge&&(ue=ue._wrapped),we instanceof Ge&&(we=we._wrapped);var ze=I.call(ue);if(ze!==I.call(we))return!1;if(h&&ze=="[object Object]"&&y(ue)){if(!y(we))return!1;ze=St}switch(ze){case"[object RegExp]":case"[object String]":return""+ue==""+we;case"[object Number]":return+ue!=+ue?+we!=+we:+ue==0?1/+ue==1/we:+ue==+we;case"[object Date]":case"[object Boolean]":return+ue==+we;case"[object Symbol]":return se.valueOf.call(ue)===se.valueOf.call(we);case"[object ArrayBuffer]":case St:return Jt(yt(ue),yt(we),Re,Me)}var Ie=ze==="[object Array]";if(!Ie&&xe(ue)){if(Ce(ue)!==Ce(we))return!1;if(ue.buffer===we.buffer&&ue.byteOffset===we.byteOffset)return!0;Ie=!0}if(!Ie){if(typeof ue!="object"||typeof we!="object")return!1;var nt=ue.constructor,dt=we.constructor;if(nt!==dt&&!(v(nt)&&nt instanceof nt&&v(dt)&&dt instanceof dt)&&"constructor"in ue&&"constructor"in we)return!1}Me=Me||[];for(var Ht=(Re=Re||[]).length;Ht--;)if(Re[Ht]===ue)return Me[Ht]===we;if(Re.push(ue),Me.push(we),Ie){if((Ht=ue.length)!==we.length)return!1;for(;Ht--;)if(!bt(ue[Ht],we[Ht],Re,Me))return!1}else{var en,En=Fe(ue);if(Ht=En.length,Fe(we).length!==Ht)return!1;for(;Ht--;)if(!Y(we,en=En[Ht])||!bt(ue[en],we[en],Re,Me))return!1}return Re.pop(),Me.pop(),!0}function mt(ue,we){return bt(ue,we)}function _t(ue){if(!O(ue))return[];var we=[];for(var Re in ue)we.push(Re);return H&&Ee(ue,we),we}function Oe(ue){var we=de(ue);return function(Re){if(Re==null)return!1;var Me=_t(Re);if(de(Me))return!1;for(var ze=0;ze<we;ze++)if(!v(Re[ue[ze]]))return!1;return ue!==Ne||!v(Re[De])}}var De="forEach",Ze="has",Ue=["clear","delete"],rt=["get",Ze,"set"],Te=Ue.concat(De,rt),Ne=Ue.concat(rt),$e=["add"].concat(Ue,De,Ze);const at=m?Oe(Te):_("Map"),tt=m?Oe(Ne):_("WeakMap"),wt=m?Oe($e):_("Set"),it=_("WeakSet");function Rt(ue){for(var we=Fe(ue),Re=we.length,Me=Array(Re),ze=0;ze<Re;ze++)Me[ze]=ue[we[ze]];return Me}function Ut(ue){for(var we=Fe(ue),Re=we.length,Me=Array(Re),ze=0;ze<Re;ze++)Me[ze]=[we[ze],ue[we[ze]]];return Me}function $t(ue){for(var we={},Re=Fe(ue),Me=0,ze=Re.length;Me<ze;Me++)we[ue[Re[Me]]]=Re[Me];return we}function Yt(ue){var we=[];for(var Re in ue)v(ue[Re])&&we.push(Re);return we.sort()}function Xt(ue,we){return function(Re){var Me=arguments.length;if(we&&(Re=Object(Re)),Me<2||Re==null)return Re;for(var ze=1;ze<Me;ze++)for(var Ie=arguments[ze],nt=ue(Ie),dt=nt.length,Ht=0;Ht<dt;Ht++){var en=nt[Ht];we&&Re[en]!==void 0||(Re[en]=Ie[en])}return Re}}const Bt=Xt(_t),ut=Xt(Fe),Zt=Xt(_t,!0);function Sn(ue){if(!O(ue))return{};if(re)return re(ue);var we=function(){};we.prototype=ue;var Re=new we;return we.prototype=null,Re}function yn(ue,we){var Re=Sn(ue);return we&&ut(Re,we),Re}function cn(ue){return O(ue)?Z(ue)?ue.slice():Bt({},ue):ue}function sn(ue,we){return we(ue),ue}function tn(ue){return Z(ue)?ue:[ue]}function un(ue){return Ge.toPath(ue)}function In(ue,we){for(var Re=we.length,Me=0;Me<Re;Me++){if(ue==null)return;ue=ue[we[Me]]}return Re?ue:void 0}function _n(ue,we,Re){var Me=In(ue,un(we));return E(Me)?Re:Me}function wn(ue,we){for(var Re=(we=un(we)).length,Me=0;Me<Re;Me++){var ze=we[Me];if(!Y(ue,ze))return!1;ue=ue[ze]}return!!Re}function An(ue){return ue}function Tn(ue){return ue=ut({},ue),function(we){return et(we,ue)}}function nn(ue){return ue=un(ue),function(we){return In(we,ue)}}function Pn(ue,we,Re){if(we===void 0)return ue;switch(Re??3){case 1:return function(Me){return ue.call(we,Me)};case 3:return function(Me,ze,Ie){return ue.call(we,Me,ze,Ie)};case 4:return function(Me,ze,Ie,nt){return ue.call(we,Me,ze,Ie,nt)}}return function(){return ue.apply(we,arguments)}}function Qn(ue,we,Re){return ue==null?An:v(ue)?Pn(ue,we,Re):O(ue)&&!Z(ue)?Tn(ue):nn(ue)}function rn(ue,we){return Qn(ue,we,1/0)}function ht(ue,we,Re){return Ge.iteratee!==rn?Ge.iteratee(ue,we):Qn(ue,we,Re)}function Fn(ue,we,Re){we=ht(we,Re);for(var Me=Fe(ue),ze=Me.length,Ie={},nt=0;nt<ze;nt++){var dt=Me[nt];Ie[dt]=we(ue[dt],dt,ue)}return Ie}function qn(){}function dn(ue){return ue==null?qn:function(we){return _n(ue,we)}}function Kt(ue,we,Re){var Me=Array(Math.max(0,ue));we=Pn(we,Re,1);for(var ze=0;ze<ue;ze++)Me[ze]=we(ze);return Me}
vendor: 5,048 bytes, lines 454-466
454function Vt(ue,we){return we==null&&(we=ue,ue=0),ue+Math.floor(Math.random()*(we-ue+1))}Ge.toPath=tn,Ge.iteratee=rn;const Rn=Date.now||function(){return new Date().getTime()};function Wt(ue){var we=function(Ie){return ue[Ie]},Re="(?:"+Fe(ue).join("|")+")",Me=RegExp(Re),ze=RegExp(Re,"g");return function(Ie){return Ie=Ie==null?"":""+Ie,Me.test(Ie)?Ie.replace(ze,we):Ie}}const st={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Nt=Wt(st),be=Wt($t(st)),Pe=Ge.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Xe=/(.)^/,gt={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},kt=/\\|'|\r|\n|\u2028|\u2029/g;function ft(ue){return"\\"+gt[ue]}var qt=/^\s*(\w|\$)+\s*$/;function gn(ue,we,Re){!we&&Re&&(we=Re),we=Zt({},we,Ge.templateSettings);var Me=RegExp([(we.escape||Xe).source,(we.interpolate||Xe).source,(we.evaluate||Xe).source].join("|")+"|$","g"),ze=0,Ie="__p+='";ue.replace(Me,(function(en,En,wr,Zr,Sr){return Ie+=ue.slice(ze,Sr).replace(kt,ft),ze=Sr+en.length,En?Ie+=`'+ 455((__t=(`+En+`))==null?'':_.escape(__t))+ 456'`:wr?Ie+=`'+ 457((__t=(`+wr+`))==null?'':__t)+ 458'`:Zr&&(Ie+=`'; 459`+Zr+` 460__p+='`),en})),Ie+=`'; 461`;var nt,dt=we.variable;if(dt){if(!qt.test(dt))throw new Error("variable is not a bare identifier: "+dt)}else Ie=`with(obj||{}){ 462`+Ie+`} 463`,dt="obj";Ie=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');}; 464`+Ie+`return __p; 465`;try{nt=new Function(dt,"_",Ie)}catch(en){throw en.source=Ie,en}var Ht=function(en){return nt.call(this,en,Ge)};return Ht.source="function("+dt+`){ 466`+Ie+"}",Ht}function kn(ue,we,Re){var Me=(we=un(we)).length;if(!Me)return v(Re)?Re.call(ue):Re;for(var ze=0;ze<Me;ze++){var Ie=ue?.[we[ze]];Ie===void 0&&(Ie=Re,ze=Me),ue=v(Ie)?Ie.call(ue):Ie}return ue}var Vn=0;function er(ue){var we=++Vn+"";return ue?ue+we:we}function cr(ue){var we=Ge(ue);return we._chain=!0,we}function Wn(ue,we,Re,Me,ze){if(!(Me instanceof we))return ue.apply(Re,ze);var Ie=Sn(ue.prototype),nt=ue.apply(Ie,ze);return O(nt)?nt:Ie}var tr=ee((function(ue,we){var Re=tr.placeholder,Me=function(){for(var ze=0,Ie=we.length,nt=Array(Ie),dt=0;dt<Ie;dt++)nt[dt]=we[dt]===Re?arguments[ze++]:we[dt];for(;ze<arguments.length;)nt.push(arguments[ze++]);return Wn(ue,Me,this,this,nt)};return Me}));tr.placeholder=Ge;const ur=tr,nr=ee((function(ue,we,Re){if(!v(ue))throw new TypeError("Bind must be called on a function");var Me=ee((function(ze){return Wn(ue,Me,we,this,Re.concat(ze))}));return Me})),Qt=Q(de);function Bn(ue,we,Re,Me){if(Me=Me||[],we||we===0){if(we<=0)return Me.concat(ue)}else we=1/0;for(var ze=Me.length,Ie=0,nt=de(ue);Ie<nt;Ie++){var dt=ue[Ie];if(Qt(dt)&&(Z(dt)||N(dt)))if(we>1)Bn(dt,we-1,Re,Me),ze=Me.length;else for(var Ht=0,en=dt.length;Ht<en;)Me[ze++]=dt[Ht++];else Re||(Me[ze++]=dt)}return Me}const rr=ee((function(ue,we){var Re=(we=Bn(we,!1,!1)).length;if(Re<1)throw new Error("bindAll must be passed function names");for(;Re--;){var Me=we[Re];ue[Me]=nr(ue[Me],ue)}return ue}));function fr(ue,we){var Re=function(Me){var ze=Re.cache,Ie=""+(we?we.apply(this,arguments):Me);return Y(ze,Ie)||(ze[Ie]=ue.apply(this,arguments)),ze[Ie]};return Re.cache={},Re}const L=ee((function(ue,we,Re){return setTimeout((function(){return ue.apply(null,Re)}),we)})),V=ur(L,Ge,1);function u(ue,we,Re){var Me,ze,Ie,nt,dt=0;Re||(Re={});var Ht=function(){dt=Re.leading===!1?0:Rn(),Me=null,nt=ue.apply(ze,Ie),Me||(ze=Ie=null)},en=function(){var En=Rn();dt||Re.leading!==!1||(dt=En);var wr=we-(En-dt);return ze=this,Ie=arguments,wr<=0||wr>we?(Me&&(clearTimeout(Me),Me=null),dt=En,nt=ue.apply(ze,Ie),Me||(ze=Ie=null)):Me||Re.trailing===!1||(Me=setTimeout(Ht,wr)),nt};return en.cancel=function(){clearTimeout(Me),dt=0,Me=ze=Ie=null},en}function i(ue,we,Re){var Me,ze,Ie,nt,dt,Ht=function(){var En=Rn()-ze;we>En?Me=setTimeout(Ht,we-En):(Me=null,Re||(nt=ue.apply(dt,Ie)),Me||(Ie=dt=null))},en=ee((function(En){return dt=this,Ie=En,ze=Rn(),Me||(Me=setTimeout(Ht,we),Re&&(nt=ue.apply(dt,Ie))),nt}));return en.cancel=function(){clearTimeout(Me),Me=Ie=dt=null},en}function T(ue,we){return ur(we,ue)}function le(ue){return function(){return!ue.apply(this,arguments)}}function ve(){var ue=arguments,we=ue.length-1;return function(){for(var Re=we,Me=ue[we].apply(this,arguments);Re--;)Me=ue[Re].call(this,Me);return Me}}function _e(ue,we){return function(){if(--ue<1)return we.apply(this,arguments)}}function Le(ue,we){var Re;return function(){return--ue>0&&(Re=we.apply(this,arguments)),ue<=1&&(we=null),Re}}const Ke=ur(Le,2);function qe(ue,we,Re){we=ht(we,Re);for(var Me,ze=Fe(ue),Ie=0,nt=ze.length;Ie<nt;Ie++)if(we(ue[Me=ze[Ie]],Me,ue))return Me}function Je(ue){return function(we,Re,Me){Re=ht(Re,Me);for(var ze=de(we),Ie=ue>0?0:ze-1;Ie>=0&&Ie<ze;Ie+=ue)if(Re(we[Ie],Ie,we))return Ie;return-1}}const Qe=Je(1),ct=Je(-1);function Ct(ue,we,Re,Me){for(var ze=(Re=ht(Re,Me,1))(we),Ie=0,nt=de(ue);Ie<nt;){var dt=Math.floor((Ie+nt)/2);Re(ue[dt])<ze?Ie=dt+1:nt=dt}return Ie}function Mt(ue,we,Re){return function(Me,ze,Ie){var nt=0,dt=de(Me);
466if(typeof Ie=="number")ue>0?nt=Ie>=0?Ie:Math.max(Ie+dt,nt):dt=Ie>=0?Math.min(Ie+1,dt):Ie+dt+1;else if(Re&&Ie&&dt)return Me[Ie=Re(Me,ze)]===ze?Ie:-1;if(ze!=ze)return(Ie=we(W.call(Me,nt,dt),c))>=0?Ie+nt:-1;for(Ie=ue>0?nt:dt-1;Ie>=0&&Ie<dt;Ie+=ue)if(Me[Ie]===ze)return Ie;return-1}}const It=Mt(1,Qe,Ct),Gt=Mt(-1,ct);function on(ue,we,Re){var Me=(Qt(ue)?Qe:qe)(ue,we,Re);if(Me!==void 0&&Me!==-1)return ue[Me]}function ln(ue,we){return on(ue,Tn(we))}function zt(ue,we,Re){var Me,ze;if(we=Pn(we,Re),Qt(ue))for(Me=0,ze=ue.length;Me<ze;Me++)we(ue[Me],Me,ue);else{var Ie=Fe(ue);for(Me=0,ze=Ie.length;Me<ze;Me++)we(ue[Ie[Me]],Ie[Me],ue)}return ue}function an(ue,we,Re){we=ht(we,Re);for(var Me=!Qt(ue)&&Fe(ue),ze=(Me||ue).length,Ie=Array(ze),nt=0;nt<ze;nt++){var dt=Me?Me[nt]:nt;Ie[nt]=we(ue[dt],dt,ue)}return Ie}function xn(ue){var we=function(Re,Me,ze,Ie){var nt=!Qt(Re)&&Fe(Re),dt=(nt||Re).length,Ht=ue>0?0:dt-1;for(Ie||(ze=Re[nt?nt[Ht]:Ht],Ht+=ue);Ht>=0&&Ht<dt;Ht+=ue){var en=nt?nt[Ht]:Ht;ze=Me(ze,Re[en],en,Re)}return ze};return function(Re,Me,ze,Ie){var nt=arguments.length>=3;return we(Re,Pn(Me,Ie,4),ze,nt)}}const hr=xn(1),Gn=xn(-1);function mn(ue,we,Re){var Me=[];return we=ht(we,Re),zt(ue,(function(ze,Ie,nt){we(ze,Ie,nt)&&Me.push(ze)})),Me}function $n(ue,we,Re){return mn(ue,le(ht(we)),Re)}function yr(ue,we,Re){we=ht(we,Re);for(var Me=!Qt(ue)&&Fe(ue),ze=(Me||ue).length,Ie=0;Ie<ze;Ie++){var nt=Me?Me[Ie]:Ie;if(!we(ue[nt],nt,ue))return!1}return!0}function Pt(ue,we,Re){we=ht(we,Re);for(var Me=!Qt(ue)&&Fe(ue),ze=(Me||ue).length,Ie=0;Ie<ze;Ie++){var nt=Me?Me[Ie]:Ie;if(we(ue[nt],nt,ue))return!0}return!1}function xt(ue,we,Re,Me){return Qt(ue)||(ue=Rt(ue)),(typeof Re!="number"||Me)&&(Re=0),It(ue,we,Re)>=0}const Lt=ee((function(ue,we,Re){var Me,ze;return v(we)?ze=we:(we=un(we),Me=we.slice(0,-1),we=we[we.length-1]),an(ue,(function(Ie){var nt=ze;if(!nt){if(Me&&Me.length&&(Ie=In(Ie,Me)),Ie==null)return;nt=Ie[we]}return nt==null?nt:nt.apply(Ie,Re)}))}));function Dt(ue,we){return an(ue,nn(we))}function fn(ue,we){return mn(ue,Tn(we))}function Kn(ue,we,Re){var Me,ze,Ie=-1/0,nt=-1/0;if(we==null||typeof we=="number"&&typeof ue[0]!="object"&&ue!=null)for(var dt=0,Ht=(ue=Qt(ue)?ue:Rt(ue)).length;dt<Ht;dt++)(Me=ue[dt])!=null&&Me>Ie&&(Ie=Me);else we=ht(we,Re),zt(ue,(function(en,En,wr){((ze=we(en,En,wr))>nt||ze===-1/0&&Ie===-1/0)&&(Ie=en,nt=ze)}));return Ie}function dr(ue,we,Re){var Me,ze,Ie=1/0,nt=1/0;if(we==null||typeof we=="number"&&typeof ue[0]!="object"&&ue!=null)for(var dt=0,Ht=(ue=Qt(ue)?ue:Rt(ue)).length;dt<Ht;dt++)(Me=ue[dt])!=null&&Me<Ie&&(Ie=Me);else we=ht(we,Re),zt(ue,(function(en,En,wr){((ze=we(en,En,wr))<nt||ze===1/0&&Ie===1/0)&&(Ie=en,nt=ze)}));return Ie}function Yn(ue,we,Re){if(we==null||Re)return Qt(ue)||(ue=Rt(ue)),ue[Vt(ue.length-1)];var Me=Qt(ue)?cn(ue):Rt(ue),ze=de(Me);we=Math.max(Math.min(we,ze),0);for(var Ie=ze-1,nt=0;nt<we;nt++){var dt=Vt(nt,Ie),Ht=Me[nt];Me[nt]=Me[dt],Me[dt]=Ht}return Me.slice(0,we)}function Tr(ue){return Yn(ue,1/0)}function Fr(ue,we,Re){var Me=0;return we=ht(we,Re),Dt(an(ue,(function(ze,Ie,nt){return{value:ze,index:Me++,criteria:we(ze,Ie,nt)}})).sort((function(ze,Ie){var nt=ze.criteria,dt=Ie.criteria;if(nt!==dt){if(nt>dt||nt===void 0)return 1;if(nt<dt||dt===void 0)return-1}return ze.index-Ie.index})),"value")}function Vr(ue,we){return function(Re,Me,ze){var Ie=we?[[],[]]:{};return Me=ht(Me,ze),zt(Re,(function(nt,dt){var Ht=Me(nt,dt,Re);ue(Ie,nt,Ht)})),Ie}}const fi=Vr((function(ue,we,Re){Y(ue,Re)?ue[Re].push(we):ue[Re]=[we]})),Mr=Vr((function(ue,we,Re){ue[Re]=we})),Br=Vr((function(ue,we,Re){Y(ue,Re)?ue[Re]++:ue[Re]=1})),br=Vr((function(ue,we,Re){ue[Re?0:1].push(we)}),!0);var Lo=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function no(ue){return ue?Z(ue)?W.call(ue):M(ue)?ue.match(Lo):Qt(ue)?an(ue,An):Rt(ue):[]}function ro(ue){return ue==null?0:Qt(ue)?ue.length:Fe(ue).length}function io(ue,we,Re){return we in Re}const Ei=ee((function(ue,we){var Re={},Me=we[0];if(ue==null)return Re;v(Me)?(we.length>1&&(Me=Pn(Me,we[1])),we=_t(ue)):(Me=io,we=Bn(we,!1,!1),ue=Object(ue));for(var ze=0,Ie=we.length;ze<Ie;ze++){var nt=we[ze],dt=ue[nt];Me(dt,nt,ue)&&(Re[nt]=dt)}return Re})),ji=ee((function(ue,we){var Re,Me=we[0];return v(Me)?(Me=le(Me),we.length>1&&(Re=we[1])):(we=an(Bn(we,!1,!1),String),Me=function(ze,Ie){return!xt(we,Ie)}),Ei(ue,Me,Re)}));function Hr(ue,we,Re){return W.call(ue,0,Math.max(0,ue.length-(we==null||Re?1:we)))}function Cr(ue,we,Re){return ue==null||ue.length<1?we==null||Re?void 0:[]:we==null||Re?ue[0]:Hr(ue,ue.length-we)}function Lr(ue,we,Re){return W.call(ue,we==null||Re?1:we)}function oo(ue,we,Re){return ue==null||ue.length<1?we==null||Re?void 0:[]:we==null||Re?ue[ue.length-1]:Lr(ue,Math.max(0,ue.length-we))}function ao(ue){return mn(ue,Boolean)}function zr(ue,we){return Bn(ue,we,!1)}const Mn=ee((function(ue,we){return we=Bn(we,!0,!0),mn(ue,(function(Re){return!xt(we,Re)}))})),so=ee((function(ue,we){return Mn(ue,we)}));function Ur(ue,we,Re,Me){B(we)||(Me=Re,Re=we,we=!1),Re!=null&&(Re=ht(Re,Me));for(var ze=[],Ie=[],nt=0,dt=de(ue);nt<dt;nt++){var Ht=ue[nt],en=Re?Re(Ht,nt,ue):Ht;
466we&&!Re?(nt&&Ie===en||ze.push(Ht),Ie=en):Re?xt(Ie,en)||(Ie.push(en),ze.push(Ht)):xt(ze,Ht)||ze.push(Ht)}return ze}const Wr=ee((function(ue){return Ur(Bn(ue,!0,!0))}));function lo(ue){for(var we=[],Re=arguments.length,Me=0,ze=de(ue);Me<ze;Me++){var Ie=ue[Me];if(!xt(we,Ie)){var nt;for(nt=1;nt<Re&&xt(arguments[nt],Ie);nt++);nt===Re&&we.push(Ie)}}return we}function $r(ue){for(var we=ue&&Kn(ue,de).length||0,Re=Array(we),Me=0;Me<we;Me++)Re[Me]=Dt(ue,Me);return Re}const co=ee($r);function hi(ue,we){for(var Re={},Me=0,ze=de(ue);Me<ze;Me++)we?Re[ue[Me]]=we[Me]:Re[ue[Me][0]]=ue[Me][1];return Re}function Ai(ue,we,Re){we==null&&(we=ue||0,ue=0),Re||(Re=we<ue?-1:1);for(var Me=Math.max(Math.ceil((we-ue)/Re),0),ze=Array(Me),Ie=0;Ie<Me;Ie++,ue+=Re)ze[Ie]=ue;return ze}function uo(ue,we){if(we==null||we<1)return[];for(var Re=[],Me=0,ze=ue.length;Me<ze;)Re.push(W.call(ue,Me,Me+=we));return Re}function Di(ue,we){return ue._chain?Ge(we).chain():we}function di(ue){return zt(Yt(ue),(function(we){var Re=Ge[we]=ue[we];Ge.prototype[we]=function(){var Me=[this._wrapped];return oe.apply(Me,arguments),Di(this,Re.apply(Ge,Me))}})),Ge}zt(["pop","push","reverse","shift","sort","splice","unshift"],(function(ue){var we=ce[ue];Ge.prototype[ue]=function(){var Re=this._wrapped;return Re!=null&&(we.apply(Re,arguments),ue!=="shift"&&ue!=="splice"||Re.length!==0||delete Re[0]),Di(this,Re)}})),zt(["concat","join","slice"],(function(ue){var we=ce[ue];Ge.prototype[ue]=function(){var Re=this._wrapped;return Re!=null&&(Re=we.apply(Re,arguments)),Di(this,Re)}}));const fo=Ge;var Ri=di(fe);Ri._=Ri;const ti=Ri}},pn={};function pt(We){var ke=pn[We];if(ke!==void 0)return ke.exports;var S=pn[We]={exports:{}};return hn[We].call(S.exports,S,S.exports,pt),S.exports}pt.n=We=>{var ke=We&&We.__esModule?()=>We.default:()=>We;return pt.d(ke,{a:ke}),ke},pt.d=(We,ke)=>{for(var S in ke)pt.o(ke,S)&&!pt.o(We,S)&&Object.defineProperty(We,S,{enumerable:!0,get:ke[S]})},pt.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),pt.o=(We,ke)=>Object.prototype.hasOwnProperty.call(We,ke),pt.r=We=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(We,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(We,"__esModule",{value:!0})};var Et={};return(()=>{"use strict";pt.d(Et,{default:()=>J});var We=pt(4942),ke=pt(9050),S=pt(2579),fe=pt(7539);const D={stylePrefix:"gjs-",components:"",style:"",fromElement:!1,projectData:null,noticeOnUnload:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",log:["warning","error"],baseCss:"",protectedCss:"* { box-sizing: border-box; } body {margin: 0;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:!0,showDevices:!0,devicePreviewMode:!1,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",keepEmptyTextNodes:!1,jsInHtml:!0,nativeDnD:!0,multipleSelection:!0,optsHtml:{},optsCss:{},avoidInlineStyle:!0,avoidDefaults:!0,clearStyles:!1,dragMode:0,listenToEl:[],cssIcons:"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css",icons:{close:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"></path></svg>',move:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M13,6V11H18V7.75L22.25,12L18,16.25V13H13V18H16.25L12,22.25L7.75,18H11V13H6V16.25L1.75,12L6,7.75V11H11V6H7.75L12,1.75L16.25,6H13Z"/></svg>',plus:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z" /></svg>',caret:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M7,10L12,15L17,10H7Z" /></svg>',delete:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z" /></svg>',copy:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" /></svg>',arrowUp:'<svg viewBox="0 0 24 24">
466<path fill="currentColor" d="M13,20H11V8L5.5,13.5L4.08,12.08L12,4.16L19.92,12.08L18.5,13.5L13,8V20Z" /></svg>',chevron:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z" /></svg>',eye:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z" /></svg>',eyeOff:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z" /></svg>'},el:"",i18n:{},undoManager:{},assetManager:{},canvas:{},layers:{},storageManager:{},richTextEditor:{},domComponents:{},modal:{},codeManager:{},panels:{},commands:{},cssComposer:{},selectorManager:{},deviceManager:{},styleManager:{},blockManager:{},traitManager:{},textViewCode:"Code",keepUnusedStyles:!1,multiFrames:!1,customUI:!1};var ie=pt(2316),ce=pt.n(ie),ae,se=pt(1163),oe=(ae=function(R,k){return ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,b){v.__proto__=b}||function(v,b){for(var h in b)Object.prototype.hasOwnProperty.call(b,h)&&(v[h]=b[h])},ae(R,k)},function(R,k){if(typeof k!="function"&&k!==null)throw new TypeError("Class extends value "+String(k)+" is not a constructor or null");function v(){this.constructor=R}ae(R,k),R.prototype=k===null?Object.create(k):(v.prototype=k.prototype,new v)}),W=(function(R){function k(){return R!==null&&R.apply(this,arguments)||this}return oe(k,R),k})(ie.Model);const I=(function(R){function k(){return R!==null&&R.apply(this,arguments)||this}return oe(k,R),k.prototype.getByComponent=function(v){var b=this;return this.filter((function(h){return b.getComponent(h)===v}))[0]},k.prototype.addComponent=function(v,b){var h=this,m=((0,ke.isArray)(v)?v:[v]).filter((function(p){return!h.hasComponent(p)})).map((function(p){return new W({component:p})}))[0];return this.push(m,b)},k.prototype.getComponent=function(v){return v.get("component")},k.prototype.hasComponent=function(v){var b=this.getByComponent(v);return b&&this.contains(b)},k.prototype.lastComponent=function(){var v=this.last();return v&&this.getComponent(v)},k.prototype.allComponents=function(){var v=this;return this.map((function(b){return v.getComponent(b)})).filter((function(b){return b}))},k.prototype.removeComponent=function(v,b){var h=this,m=((0,ke.isArray)(v)?v:[v]).map((function(p){return h.getByComponent(p)}));return this.remove(m,b)},k})(ie.Collection);var g=(function(){var R=function(k,v){return R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,h){b.__proto__=h}||function(b,h){for(var m in h)Object.prototype.hasOwnProperty.call(h,m)&&(b[m]=h[m])},R(k,v)};return function(k,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function b(){this.constructor=k}R(k,v),k.prototype=v===null?Object.create(v):(b.prototype=v.prototype,new b)}})(),P=function(){return P=Object.assign||function(R){for(var k,v=1,b=arguments.length;v<b;v++)for(var h in k=arguments[v])Object.prototype.hasOwnProperty.call(k,h)&&(R[h]=k[h]);return R},P.apply(this,arguments)},x=function(R,k,v,b){return new(v||(v=Promise))((function(h,m){function p(Y){try{Z(b.next(Y))}catch(q){m(q)}}function y(Y){try{Z(b.throw(Y))}catch(q){m(q)}}function Z(Y){var q;Y.done?h(Y.value):(q=Y.value,q instanceof v?q:new v((function(N){N(q)}))).then(p,y)}Z((b=b.apply(R,k||[])).next())}))},A=function(R,k){var v,b,h,m,p={label:0,sent:function(){if(1&h[0])throw h[1];return h[1]},trys:[],ops:[]};return m={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function y(Z){return function(Y){return(function(q){if(v)throw new TypeError("Generator is already executing.");for(;p;)try{if(v=1,b&&(h=2&q[0]?b.return:q[0]?b.throw||((h=b.return)&&h.call(b),
4660):b.next)&&!(h=h.call(b,q[1])).done)return h;switch(b=0,h&&(q=[2&q[0],h.value]),q[0]){case 0:case 1:h=q;break;case 4:return p.label++,{value:q[1],done:!1};case 5:p.label++,b=q[1],q=[0];continue;case 7:q=p.ops.pop(),p.trys.pop();continue;default:if(h=p.trys,!((h=h.length>0&&h[h.length-1])||q[0]!==6&&q[0]!==2)){p=0;continue}if(q[0]===3&&(!h||q[1]>h[0]&&q[1]<h[3])){p.label=q[1];break}if(q[0]===6&&p.label<h[1]){p.label=h[1],h=q;break}if(h&&p.label<h[2]){p.label=h[2],p.ops.push(q);break}h[2]&&p.ops.pop(),p.trys.pop();continue}q=k.call(R,p)}catch(N){q=[6,N],b=0}finally{v=h=0}if(5&q[0])throw q[1];return{value:q[0]?q[1]:void 0,done:!0}})([Z,Y])}}},$=function(R,k){var v={};for(var b in R)Object.prototype.hasOwnProperty.call(R,b)&&k.indexOf(b)<0&&(v[b]=R[b]);if(R!=null&&typeof Object.getOwnPropertySymbols=="function"){var h=0;for(b=Object.getOwnPropertySymbols(R);h<b.length;h++)k.indexOf(b[h])<0&&Object.prototype.propertyIsEnumerable.call(R,b[h])&&(v[b[h]]=R[b[h]])}return v},re=function(R,k,v){if(v||arguments.length===2)for(var b,h=0,m=k.length;h<m;h++)!b&&h in k||(b||(b=Array.prototype.slice.call(k,0,h)),b[h]=k[h]);return R.concat(b||Array.prototype.slice.call(k))};ce().$=S.default;var z=[pt(6718),pt(4836),pt(9788),pt(8202),pt(4859),pt(2004),pt(4424),pt(2326),pt(3463),pt(2450),pt(7619),pt(4906),pt(2012),pt(1030),pt(672),pt(7948),pt(6388),pt(5819),pt(7892),pt(9281),pt(289),pt(6407)],F=[];(function(R){var k=R.$;if(k&&k.prototype&&k.prototype.constructor.name!=="jQuery"){var v=k.fn;v.hide=function(){return this.css("display","none")},v.show=function(){return this.css("display","block")},v.focus=function(){var m=this.get(0);return m&&m.focus(),this},v.bind=function(m,p){return this.on(m,p)},v.unbind=function(m,p){if((0,ke.isObject)(m)){for(var y in m)m.hasOwnProperty(y)&&this.off(y,m[y]);return this}return this.off(m,p)},v.click=function(m){return m?this.on("click",m):this.trigger("click")},v.change=function(m){return m?this.on("change",m):this.trigger("change")},v.keydown=function(m){return m?this.on("keydown",m):this.trigger("keydown")},v.delegate=function(m,p,y,Z){return Z||(Z=y),this.on(p,m,(function(Y){Y.data=y,Z(Y)}))},v.scrollLeft=function(){var m=this.get(0),p=(m=m.nodeType==9?m.defaultView:m)instanceof Window?m:null;return p?p.pageXOffset:m.scrollLeft||0},v.scrollTop=function(){var m=this.get(0),p=(m=m.nodeType==9?m.defaultView:m)instanceof Window?m:null;return p?p.pageYOffset:m.scrollTop||0};var b=k.prototype.offset;v.offset=function(m){var p,y;return m&&(p=m.top,y=m.left),p!==void 0&&this.css("top","".concat(p,"px")),y!==void 0&&this.css("left","".concat(y,"px")),b.call(this)},k.map=function(m,p){for(var y=[],Z=0;Z<m.length;Z++)y.push(p(m[Z],Z));return y};var h=Array.prototype.indexOf;k.inArray=function(m,p,y){return p==null?-1:h.call(p,m,y)},k.Event=function(m,p){if(!(this instanceof k.Event))return new k.Event(m,p);this.type=m,this.isDefaultPrevented=function(){return!1}}}})({Backbone:ce(),$:ce().$});var G={debug:console.log,info:console.info,warning:console.warn,error:console.error},H=(function(R){function k(v){v===void 0&&(v={});var b=R.call(this)||this;b.__skip=!1,b.defaultRunning=!1,b.destroyed=!1,b._config=v;var h=b.config;b.set("Config",v),b.set("modules",[]),b.set("toLoad",[]),b.set("storables",[]),b.set("selected",new I),b.set("dmode",h.dragMode);var m=h.el,p=h.log,y=p===!0?(0,ke.keys)(G):(0,ke.isArray)(p)?p:[];return(0,ke.bindAll)(b,"initBaseColorPicker"),m&&h.fromElement&&(h.components=m.innerHTML),b.attrsOrig=m?(0,ke.toArray)(m.attributes).reduce((function(Z,Y){return Z[Y.nodeName]=Y.nodeValue,Z}),{}):"",h.components&&!h.pageManager&&(h.pageManager={pages:[{component:h.components}]}),z.forEach((function(Z){return b.loadModule(Z)})),F.forEach((function(Z){return b.tsLoadModule(Z)})),b.on("change:componentHovered",b.componentHovered,b),b.on("change:changesCount",b.updateChanges,b),b.on("change:readyLoad change:readyCanvas",b._checkReady,b),y.forEach((function(Z){return b.listenLog(Z)})),[{from:"change:selectedComponent",to:"component:toggled"}].forEach((function(Z){var Y=Z.from,q=Z.to;b.listenTo(b,Y,(function(){for(var N=[],a=0;a<arguments.length;a++)N[a]=arguments[a];b.trigger.apply(b,re([q],N,!1)),b.logWarning("The event '".concat(Y,"' is deprecated, replace it with '").concat(q,"'"))}))})),b}return g(k,R),k.prototype.defaults=function(){return{editing:0,selected:0,clipboard:null,dmode:0,componentHovered:null,previousModel:null,changesCount:0,storables:[],modules:[],toLoad:[],opened:{},device:""}},Object.defineProperty(k.prototype,"storables",{get:function(){return this.get("storables")}
466,enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"modules",{get:function(){return this.get("modules")},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"toLoad",{get:function(){return this.get("toLoad")},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"selected",{get:function(){return this.get("selected")},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"shallow",{get:function(){return this.get("shallow")},enumerable:!1,configurable:!0}),k.prototype._checkReady=function(){this.get("readyLoad")&&this.get("readyCanvas")&&!this.get("ready")&&this.set("ready",!0)},k.prototype.getContainer=function(){return this.config.el},k.prototype.listenLog=function(v){this.listenTo(this,"log:".concat(v),G[v])},Object.defineProperty(k.prototype,"config",{get:function(){return this._config},enumerable:!1,configurable:!0}),k.prototype.getConfig=function(v){var b=this.config;return(0,ke.isUndefined)(v)?b:b[v]},k.prototype.loadOnStart=function(){var v=this,b=this.config,h=b.projectData,m=b.headless,p=this.get("StorageManager");this.toLoad.forEach((function(Y){return Y.onLoad()}));var y=function(){v.modules.forEach((function(Y){return Y.postLoad&&Y.postLoad(v)})),v.set("readyLoad",1)};m?(h&&this.loadData(h),y()):setTimeout((function(){return x(v,void 0,void 0,(function(){var Y;return A(this,(function(q){switch(q.label){case 0:return h?(this.loadData(h),[3,5]):[3,1];case 1:if(!p?.canAutoload())return[3,5];q.label=2;case 2:return q.trys.push([2,4,,5]),[4,this.load()];case 3:return q.sent(),[3,5];case 4:return Y=q.sent(),this.logError(Y),[3,5];case 5:return y(),[2]}}))}))}));var Z=new k({noticeOnUnload:!1,storageManager:!1,undoManager:!1});["PageManager","Canvas"].forEach((function(Y){return Z.get(Y).onLoad()})),this.set("shallow",Z)},k.prototype.updateChanges=function(){var v=this,b=this.get("StorageManager"),h=this.getDirtyCount();this.updateItr&&clearTimeout(this.updateItr),this.updateItr=setTimeout((function(){return v.trigger("update")})),this.config.noticeOnUnload&&(window.onbeforeunload=h?function(){return!0}:null),b.isAutosave()&&h>=b.getStepsBeforeSave()&&this.store().catch((function(m){return v.logError(m)}))},k.prototype.loadModule=function(v){var b=this.config,h=new(v.default||v)(this),m=h.name.charAt(0).toLowerCase()+h.name.slice(1),p=(0,ke.isUndefined)(b[m])?b[h.name]:b[m],y=p===!0?{}:p||{};return y.pStylePrefix=b.pStylePrefix||"",(0,ke.isUndefined)(p)||p||(y._disable=1),h.storageKey&&h.store&&h.load&&this.storables.push(h),y.em=this,h.init(P({},y)),!h.private&&this.set(h.name,h),h.onLoad&&this.toLoad.push(h),this.modules.push(h),this},k.prototype.tsLoadModule=function(v){var b=new(v.default||v)(this);return b.storageKey&&b.store&&b.load&&this.storables.push(b),!b.private&&this.set(b.name,b),b.onLoad&&this.toLoad.push(b),this.modules.push(b),this},k.prototype.init=function(v,b){b===void 0&&(b={}),this.destroyed&&(this.initialize(b),this.destroyed=!1),this.set("Editor",v)},k.prototype.getEditor=function(){return this.get("Editor")},k.prototype.handleUpdates=function(v,b,h){var m=this;h===void 0&&(h={}),this.__skip||h.temporary||h.noCount||h.avoidStore||!this.get("ready")||(this.timedInterval&&clearTimeout(this.timedInterval),this.timedInterval=setTimeout((function(){var p=m.getDirtyCount()||0,y=(h.unset,$(h,["unset"]));m.set("changesCount",p+1,y)}),0))},k.prototype.changesUp=function(v){this.handleUpdates(0,0,v)},k.prototype.componentHovered=function(v,b,h){var m=this.previous("componentHovered");m&&this.trigger("component:unhovered",m,h),b&&this.trigger("component:hovered",b,h)},k.prototype.getSelected=function(){return this.selected.lastComponent()},k.prototype.getSelectedAll=function(){return this.selected.allComponents()},k.prototype.setSelected=function(v,b){var h=this;b===void 0&&(b={});var m=b.event,p=m&&(m.ctrlKey||m.metaKey),y=(m||{}).shiftKey,Z=((0,ke.isArray)(v)?v:[v]).map((function(a){return(0,se.getModel)(a,S.default)})),Y=this.getSelectedAll(),q=this.getConfig().multipleSelection,N=(0,ke.isArray)(v);N&&this.removeSelected(Y.filter((function(a){return!(0,ke.contains)(Z,a)}))),Z.forEach((function(a){var c=(0,se.getModel)(a,void 0);if(c&&(h.trigger("component:select:before",c,b),!c.get("selectable")||b.abort)){if(!b.useValid)return;for(var C=c.parent();C&&!C.get("selectable");)C=C.parent();c=C}if(p&&q)return h.toggleSelected(c);if(y&&q){h.clearSelection(h.get("Canvas").getWindow());var Q,pe,Ce=c.collection,Se=c.index();
466if(h.getSelectedAll().forEach((function(me){var xe=me.collection,de=me.index();xe===Ce&&(de<Se?Q=(0,ke.isUndefined)(Q)?de:Math.max(Q,de):de>Se&&(pe=(0,ke.isUndefined)(pe)?de:Math.min(pe,de)))})),!(0,ke.isUndefined)(Q))for(;Q!==Se;)h.addSelected(Ce.at(Q)),Q++;if(!(0,ke.isUndefined)(pe))for(;pe!==Se;)h.addSelected(Ce.at(pe)),pe--;return h.addSelected(c)}!N&&h.removeSelected(Y.filter((function(me){return me!==c}))),h.addSelected(c,b)}))},k.prototype.addSelected=function(v,b){var h=this;b===void 0&&(b={});var m=(0,se.getModel)(v,S.default);((0,ke.isArray)(m)?m:[m]).forEach((function(p){if(!p||p.get("selectable")){var y=h.selected;b.forceChange&&h.removeSelected(p,b),y.addComponent(p,b),p&&h.trigger("component:select",p,b)}}))},k.prototype.removeSelected=function(v,b){b===void 0&&(b={}),this.selected.removeComponent((0,se.getModel)(v,S.default),b)},k.prototype.toggleSelected=function(v,b){var h=this;b===void 0&&(b={});var m=(0,se.getModel)(v,S.default);((0,ke.isArray)(m)?m:[m]).forEach((function(p){h.selected.hasComponent(p)?h.removeSelected(p,b):h.addSelected(p,b)}))},k.prototype.setHovered=function(v,b){if(b===void 0&&(b={}),!v)return this.set("componentHovered","");var h="component:hover",m=(0,se.getModel)(v,void 0);if(m){if(b.forceChange&&this.set("componentHovered",""),this.trigger("".concat(h,":before"),m,b),!m.get("hoverable")){if(!b.useValid||b.abort)return;for(var p=m&&m.parent();p&&!p.get("hoverable");)p=p.parent();m=p}b.abort||(this.set("componentHovered",m,b),this.trigger(h,m,b))}},k.prototype.getHovered=function(){return this.get("componentHovered")},k.prototype.setComponents=function(v,b){return b===void 0&&(b={}),this.get("DomComponents").setComponents(v,b)},k.prototype.getComponents=function(){var v=this.get("DomComponents"),b=this.get("CodeManager");if(v&&b){var h=v.getComponents();return b.getCode(h,"json")}},k.prototype.setStyle=function(v,b){b===void 0&&(b={});var h=this.get("CssComposer");return h.clear(b),h.getAll().add(v,b),this},k.prototype.addStyle=function(v,b){b===void 0&&(b={});var h=this.getStyle().add(v,b);return(0,ke.isArray)(h)?h:[h]},k.prototype.getStyle=function(){return this.get("CssComposer").getAll()},k.prototype.setState=function(v){return this.set("state",v),this},k.prototype.getState=function(){return this.get("state")||""},k.prototype.getHtml=function(v){v===void 0&&(v={});var b=this.config,h=b.optsHtml,m=b.jsInHtml?this.getJs(v):"",p=v.component||this.get("DomComponents").getComponent(),y=p?this.get("CodeManager").getCode(p,"html",P(P({},h),v)):"";return y+=m?"<script>".concat(m,"</script>"):""},k.prototype.getCss=function(v){v===void 0&&(v={});var b=this.config,h=b.optsCss,m=v.avoidProtected,p=(0,ke.isUndefined)(v.keepUnusedStyles)?b.keepUnusedStyles:v.keepUnusedStyles,y=this.get("CssComposer"),Z=v.component||this.get("DomComponents").getComponent(),Y=m?"":b.protectedCss,q=Z&&this.get("CodeManager").getCode(Z,"css",P(P({cssc:y,keepUnusedStyles:p},h),v));return Z?v.json?q:Y+q:""},k.prototype.getJs=function(v){v===void 0&&(v={});var b=v.component||this.get("DomComponents").getWrapper();return b?this.get("CodeManager").getCode(b,"js").trim():""},k.prototype.store=function(v){return x(this,void 0,void 0,(function(){var b;return A(this,(function(h){switch(h.label){case 0:return b=this.storeData(),[4,this.get("StorageManager").store(b,v)];case 1:return h.sent(),this.clearDirtyCount(),[2,b]}}))}))},k.prototype.load=function(v){return x(this,void 0,void 0,(function(){var b;return A(this,(function(h){switch(h.label){case 0:return[4,this.get("StorageManager").load(v)];case 1:return b=h.sent(),this.loadData(b),[2,b]}}))}))},k.prototype.storeData=function(){var v={},b=this.getEditing();return b&&b.trigger("sync:content",{noCount:!0}),this.storables.forEach((function(h){v=P(P({},v),h.store(1))})),JSON.parse(JSON.stringify(v))},k.prototype.loadData=function(v){return v===void 0&&(v={}),(0,se.isEmptyObj)(v)||(this.storables.forEach((function(b){return b.clear()})),this.storables.forEach((function(b){return b.load(v)}))),v},k.prototype.getDeviceModel=function(){var v=this.get("device");return this.get("DeviceManager").get(v)},k.prototype.runDefault=function(v){v===void 0&&(v={});var b=this.get("Commands").get(this.config.defaultCommand);b&&!this.defaultRunning&&(b.stop(this,this,v),b.run(this,this,v),this.defaultRunning=!0)},k.prototype.stopDefault=function(v){v===void 0&&(v={});var b=this.get("Commands").get(this.config.defaultCommand);b&&this.defaultRunning&&(b.stop(this,this,v),this.defaultRunning=!1)},k.prototype.refreshCanvas=function(v){v===void 0&&(v={}),this.set("canvasOffset",null),this.set("canvasOffset",this.get("Canvas").getOffset()),v.tools&&this.trigger("canvas:updateTools")},k.prototype.clearSelection=function(v){var b;(b=(v||window).getSelection())===null||b===void 0||b.removeAllRanges()},k.prototype.getCurrentMedia=function(){var v=this.config,b=this.getDeviceModel(),h=v.mediaCondition,m=v.devicePreviewMode,p=b&&b.get("widthMedia");return b&&p&&!m?"(".concat(h,": ").concat(p,")"):""},k.prototype.getWrapper=function(){return this.get("DomComponents").getWrapper()},k.prototype.setCurrentFrame=function(v){return this.set("currentFrame",v)},k.prototype.getCurrentFrame=function(){return this.get("currentFrame")},k.prototype.getCurrentFrameModel=function(){return(this.getCurrentFrame()||{}).model},k.prototype.getIcon=function(v){return(this.config.icons||{})[v]||""},k.prototype.getDirtyCount=function(){return this.get("changesCount")},k.prototype.clearDirtyCount=function(){return this.set("changesCount",0)},k.prototype.getZoomDecimal=function(){return this.get("Canvas").getZoomDecimal()},k.prototype.getZoomMultiplier=function(){return this.get("Canvas").getZoomMultiplier()},k.prototype.setDragMode=function(v){return this.set("dmode",v)},k.prototype.t=function(){for(var v=[],b=0;b<arguments.length;b++)v[b]=arguments[b];var h=this.get("I18n");return h?.t.apply(h,v)},k.prototype.inAbsoluteMode=function(){return this.get("dmode")==="absolute"},k.prototype.destroyAll=function(){var v=this,b=this.config,h=this.view,m=this.getEditor(),p=(b.grapesjs||{}).editors,y=p===void 0?[]:p,Z=this.get("shallow");Z?.destroyAll(),this.stopListening(),this.stopDefault(),this.modules.slice().reverse().forEac
466h((function(Y){return Y.destroy()})),h&&h.remove(),this.clear({silent:!0}),this.destroyed=!0,["_config","view","_previousAttributes","_events","_listeners"].forEach((function(Y){return v[Y]={}})),y.splice(y.indexOf(m),1),(0,se.hasWin)()&&(0,S.default)(b.el).empty().attr(this.attrsOrig)},k.prototype.getEditing=function(){var v=this.get("editing");return v&&v.model||null},k.prototype.setEditing=function(v){return this.set("editing",v),this},k.prototype.isEditing=function(){return!!this.get("editing")},k.prototype.log=function(v,b){b===void 0&&(b={});var h=b.ns,m=b.level,p=m===void 0?"debug":m;if(this.trigger("log",v,b),p&&this.trigger("log:".concat(p),v,b),h){var y="log-".concat(h);this.trigger(y,v,b),p&&this.trigger("".concat(y,":").concat(p),v,b)}},k.prototype.logInfo=function(v,b){this.log(v,P(P({},b),{level:"info"}))},k.prototype.logWarning=function(v,b){this.log(v,P(P({},b),{level:"warning"}))},k.prototype.logError=function(v,b){this.log(v,P(P({},b),{level:"error"}))},k.prototype.initBaseColorPicker=function(v,b){b===void 0&&(b={});var h=this.config,m=h.colorPicker,p=m===void 0?{}:m,y=h.el,Z=h.stylePrefix;return(0,S.default)(v).spectrum(P(P({containerClassName:"".concat(Z,"one-bg ").concat(Z,"two-color"),appendTo:y||"body",maxSelectionSize:8,showPalette:!0,palette:[],showAlpha:!0,chooseText:"Ok",cancelText:"\u2A2F"},b),p))},k.prototype.skip=function(v){this.__skip=!0;var b=this.get("UndoManager");b?b.skip(v):v(),this.__skip=!1},k.prototype.data=function(v,b,h){var m="_gjs-data";if(v[m]||(v[m]={}),(0,ke.isUndefined)(h))return v[m][b];v[m][b]=h},k})(ie.Model);const ne=H;var ye=(function(){var R=function(k,v){return R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,h){b.__proto__=h}||function(b,h){for(var m in h)Object.prototype.hasOwnProperty.call(h,m)&&(b[m]=h[m])},R(k,v)};return function(k,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function b(){this.constructor=k}R(k,v),k.prototype=v===null?Object.create(v):(b.prototype=v.prototype,new b)}})(),ee=ce().$;const O=(function(R){function k(v){var b=R.call(this,{model:v})||this,h=v.attributes,m=h.Panels,p=h.UndoManager;return v.view=b,v.once("change:ready",(function(){m.active(),m.disableButtons(),p.clear(),setTimeout((function(){v.trigger("load",v.get("Editor")),v.clearDirtyCount()}))})),b}return ye(k,R),k.prototype.render=function(){var v=this,b=this.$el,h=this.model,m=h.attributes,p=m.Panels,y=m.Canvas,Z=h.config,Y=h.modules,q=Z.stylePrefix,N=ee(Z.el||"body ".concat(Z.container));(0,se.appendStyles)(Z.cssIcons,{unique:!0,prepand:!0}),b.empty(),Z.width&&N.css("width",Z.width),Z.height&&N.css("height",Z.height),b.append(y.render()),b.append(p.render());var a=h.get("shallow").get("Canvas").render();return a.style.display="none",b.append(a),b.attr("class","".concat(q,"editor ").concat(q,"one-bg ").concat(q,"two-color")),N.addClass("".concat(q,"editor-cont")).empty().append(b),Y.forEach((function(c){return c.postRender&&c.postRender(v)})),this},k})(ie.View);var j=function(){return j=Object.assign||function(R){for(var k,v=1,b=arguments.length;v<b;v++)for(var h in k=arguments[v])Object.prototype.hasOwnProperty.call(k,h)&&(R[h]=k[h]);return R},j.apply(this,arguments)},E=function(R,k,v,b){return new(v||(v=Promise))((function(h,m){function p(Y){try{Z(b.next(Y))}catch(q){m(q)}}function y(Y){try{Z(b.throw(Y))}catch(q){m(q)}}function Z(Y){var q;Y.done?h(Y.value):(q=Y.value,q instanceof v?q:new v((function(N){N(q)}))).then(p,y)}Z((b=b.apply(R,k||[])).next())}))},B=function(R,k){var v,b,h,m,p={label:0,sent:function(){if(1&h[0])throw h[1];return h[1]},trys:[],ops:[]};return m={next:y(0),throw:y(1),return:y(2)},typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function y(Z){return function(Y){return(function(q){if(v)throw new TypeError("Generator is already executing.");for(;p;)try{if(v=1,b&&(h=2&q[0]?b.return:q[0]?b.throw||((h=b.return)&&h.call(b),0):b.next)&&!(
466h=h.call(b,q[1])).done)return h;switch(b=0,h&&(q=[2&q[0],h.value]),q[0]){case 0:case 1:h=q;break;case 4:return p.label++,{value:q[1],done:!1};case 5:p.label++,b=q[1],q=[0];continue;case 7:q=p.ops.pop(),p.trys.pop();continue;default:if(h=p.trys,!((h=h.length>0&&h[h.length-1])||q[0]!==6&&q[0]!==2)){p=0;continue}if(q[0]===3&&(!h||q[1]>h[0]&&q[1]<h[3])){p.label=q[1];break}if(q[0]===6&&p.label<h[1]){p.label=h[1],h=q;break}if(h&&p.label<h[2]){p.label=h[2],p.ops.push(q);break}h[2]&&p.ops.pop(),p.trys.pop();continue}q=k.call(R,p)}catch(N){q=[6,N],b=0}finally{v=h=0}if(5&q[0])throw q[1];return{value:q[0]?q[1]:void 0,done:!0}})([Z,Y])}}},X=function(R,k,v){if(v||arguments.length===2)for(var b,h=0,m=k.length;h<m;h++)!b&&h in k||(b||(b=Array.prototype.slice.call(k,0,h)),b[h]=k[h]);return R.concat(b||Array.prototype.slice.call(k))};const _=(function(){function R(k,v){k===void 0&&(k={}),v===void 0&&(v={}),this.modules=[],this.html=fe.Z,this.config=j(j(j({},D),k),{pStylePrefix:D.stylePrefix}),this.em=new ne(this.config),this.$=v.$,this.em.init(this),this.editor=this.em}return Object.defineProperty(R.prototype,"I18n",{get:function(){return this.em.get("I18n")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"Utils",{get:function(){return this.em.get("Utils")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"Config",{get:function(){return this.em.config},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"Commands",{get:function(){return this.em.get("Commands")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"Keymaps",{get:function(){return this.em.get("Keymaps")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"Modal",{get:function(){return this.em.get("Modal")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"Panels",{get:function(){return this.em.get("Panels")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"Canvas",{get:function(){return this.em.get("Canvas")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"Parser",{get:function(){return this.em.get("Parser")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"CodeManager",{get:function(){return this.em.get("CodeManager")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"UndoManager",{get:function(){return this.em.get("UndoManager")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"RichTextEditor",{get:function(){return this.em.get("RichTextEditor")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"Pages",{get:function(){return this.em.get("PageManager")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"Components",{get:function(){return this.em.get("DomComponents")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"DomComponents",{get:function(){return this.em.get("DomComponents")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"Layers",{get:function(){return this.em.get("LayerManager")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"LayerManager",{get:function(){return this.em.get("LayerManager")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"Css",{get:function(){return this.em.get("CssComposer")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"CssComposer",{get:function(){return this.em.get("CssComposer")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"Storage",{get:function(){return this.em.get("StorageManager")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"StorageManager",{get:function(){return this.em.get("StorageManager")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"Assets",{get:function(){return this.em.get("AssetManager")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"AssetManager",{get:function(){return this.em.get("AssetManager")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"Blocks",{get:function(){return this.em.get("BlockManager")}
466,enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"BlockManager",{get:function(){return this.em.get("BlockManager")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"Traits",{get:function(){return this.em.get("TraitManager")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"TraitManager",{get:function(){return this.em.get("TraitManager")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"Selectors",{get:function(){return this.em.get("SelectorManager")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"SelectorManager",{get:function(){return this.em.get("SelectorManager")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"Styles",{get:function(){return this.em.get("StyleManager")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"StyleManager",{get:function(){return this.em.get("StyleManager")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"Devices",{get:function(){return this.em.get("DeviceManager")},enumerable:!1,configurable:!0}),Object.defineProperty(R.prototype,"DeviceManager",{get:function(){return this.em.get("DeviceManager")},enumerable:!1,configurable:!0}),R.prototype.getConfig=function(k){var v=this.config;return(0,ke.isUndefined)(k)?v:v[k]},R.prototype.getHtml=function(k){return this.em.getHtml(k)},R.prototype.getCss=function(k){return this.em.getCss(k)},R.prototype.getJs=function(k){return this.em.getJs(k)},R.prototype.getComponents=function(){return this.em.get("DomComponents").getComponents()},R.prototype.getWrapper=function(){return this.em.get("DomComponents").getWrapper()},R.prototype.setComponents=function(k,v){return v===void 0&&(v={}),this.em.setComponents(k,v),this},R.prototype.addComponents=function(k,v){return this.getWrapper().append(k,v)},R.prototype.getStyle=function(){return this.em.get("CssComposer").getAll()},R.prototype.setStyle=function(k,v){return v===void 0&&(v={}),this.em.setStyle(k,v),this},R.prototype.addStyle=function(k,v){return v===void 0&&(v={}),this.em.addStyle(k,v)},R.prototype.getSelected=function(){return this.em.getSelected()},R.prototype.getSelectedAll=function(){return this.em.getSelectedAll()},R.prototype.getSelectedToStyle=function(){var k=this.em.getSelected();if(k)return this.StyleManager.getModelToStyle(k)},R.prototype.select=function(k,v){return this.em.setSelected(k,v),this},R.prototype.selectAdd=function(k){return this.em.addSelected(k),this},R.prototype.selectRemove=function(k){return this.em.removeSelected(k),this},R.prototype.selectToggle=function(k){return this.em.toggleSelected(k),this},R.prototype.getEditing=function(){return this.em.getEditing()},R.prototype.setDevice=function(k){return this.em.set("device",k),this},R.prototype.getDevice=function(){return this.em.get("device")},R.prototype.runCommand=function(k,v){return v===void 0&&(v={}),this.em.get("Commands").run(k,v)},R.prototype.stopCommand=function(k,v){return v===void 0&&(v={}),this.em.get("Commands").stop(k,v)},R.prototype.store=function(k){return E(this,void 0,void 0,(function(){return B(this,(function(v){switch(v.label){case 0:return[4,this.em.store(k)];case 1:return[2,v.sent()]}}))}))},R.prototype.load=function(k){return E(this,void 0,void 0,(function(){return B(this,(function(v){switch(v.label){case 0:return[4,this.em.load(k)];case 1:return[2,v.sent()]}}))}))},R.prototype.getProjectData=function(){return this.em.storeData()},R.prototype.loadProjectData=function(k){return this.em.loadData(k)},R.prototype.storeData=function(){return this.em.storeData()},R.prototype.loadData=function(k){return this.em.loadData(k)},R.prototype.getContainer=function(){return this.config.el},R.prototype.getDirtyCount=function(){return this.em.getDirtyCount()},R.prototype.clearDirtyCount=function(){return this.em.clearDirtyCount()},R.prototype.refresh=function(k){this.em.refreshCanvas(k)},R.prototype.setCustomRte=function(k){this.RichTextEditor.customRte=k},R.prototype.setCustomParserCss=function(k){return this.Parser.getConfig().parserCss=k,this},R.prototype.setDragMode=function(k){return this.em.setDragMode(k),this},R.prototype.log=function(k,v){return v===void 0&&(v={}),this.em.log(k,v),this},R.prototype.t=function(){for(var k,v=[],b=0;b<arguments.length;b++)v[b]=arguments[b];return(k=this.em).t.apply(k,v)},R.prototype.on=function(k,v){return this.em.on(k,v),this},R.prototype.once=function(k,v){return this.em.once(k,v),this},R.prototype.off=function(k,v){return this.em.off(k,v),this},R.prototype.trigger=function(k){for(var v=[],b=1;b<arguments.length;b++)v[b-1]=arguments[b];return this.em.trigger.apply(this.em,X([k],v,!0)),this},R.prototype.destroy=function(){this.em&&(this.em.destroyAll(),this.editorView=void 0)},R.prototype.getEl=function(){var k;return(k=this.editorView)===null||k===void 0?void 0:k.el},R.prototype.getModel=function(){return this.em},R.prototype.render=function(){var k;return(k=this.editorView)===null||k===void 0||k.remove(),this.editorView=new O(this.em),this.editorView.render().el},R.prototype.onReady=function(k){this.em.get("ready")?k(this):this.em.on("load",k)},R})(),M={plugins:[]};function s(R,k){var v=Object.keys(R);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(R);k&&(b=b.filter((function(h){return Object.getOwnPropertyDescriptor(R,h).enumerable}))),v.push.apply(v,b)}return v}function l(R){for(var k=1;k<arguments.length;k++){var v=arguments[k]!=null?arguments[k]:{};
466k%2?s(Object(v),!0).forEach((function(b){(0,We.Z)(R,b,v[b])})):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(v)):s(Object(v)).forEach((function(b){Object.defineProperty(R,b,Object.getOwnPropertyDescriptor(v,b))}))}return R}(function(){if((0,se.hasWin)()&&(function(){for(var k,v=window.navigator.userAgent,b=[["edge",/Edge\/([0-9\._]+)/],["ie",/MSIE\s(7\.0)/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/]],h=0;h<b.length&&!(k=b[h][1].exec(v));h++);return!!k})()){var R=DOMImplementation.prototype.createHTMLDocument;DOMImplementation.prototype.createHTMLDocument=function(k){return k||(k=""),R.apply(document.implementation,[k])}}})();var f=new function(R){var k=R||{};for(var v in M)v in k||(k[v]=M[v]);var b={};return{add:function(h,m){return b[h]?b[h]:(b[h]=m,m)},get:function(h){return b[h]},getAll:function(){return b}}},w=[],te={autorender:1,plugins:[],pluginsOpts:{}};const J={$:S.default,editors:w,plugins:f,version:"0.19.5",init:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},k=R,v=k.headless,b=R.container;if(!b&&!v)throw new Error("'container' is required");(R=l(l(l({},te),R),{},{grapesjs:this})).el=!v&&((0,ke.isElement)(b)?b:document.querySelector(b));var h=new _(R,{$:S.default}),m=h.getModel();return R.plugins.forEach((function(p){var y=(0,ke.isFunction)(p)?p:f.get(p),Z=R.pluginsOpts[p]||{};if(!y){var Y=(0,se.getGlobal)()[p];y=Y?.default||Y}y?y(h,Z):(0,ke.isFunction)(p)?p(h,Z):m.logWarning("Plugin ".concat(p," not found"),{context:"plugins",plugin:p})})),m.loadOnStart(),R.autorender&&!v&&h.render(),w.push(h),h}}})(),Et=Et.default})())); 467//# sourceMappingURL=scripts-K2ULVW2N.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.