text: var xpandableSectionClient=function(){"use strict";function t(){}const e=t=>t;function n(t){return t()}function o(){return Object.create(null)}function s(t){t.forEach(n)}function c(t){return"function"==typeof t}function r(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}const l="undefined"!=typeof window;let i=l?()=>window.performance.now():()=>Date.now(),a=l?t=>requestAnimationFrame(t):t;const u=new Set;function d(t){u.forEach((e=>{e.c(t)||(u.delete(e),e.f())})),0!==u.size&&a(d)}function f(t){let e;return 0===u.size&&a(d),{promise:new Promise((n=>{u.add(e={c:t,f:n})})),abort(){u.delete(e)}}}function m(t,e){t.appendChild(e)}function p(t,e,n){t.insertBefore(e,n||null)}function g(t){t.parentNode.removeChild(t)}function v(t){return document.createElement(t)}function $(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function h(t){return document.createTextNode(t)}function w(){return h(" ")}function b(){return h("")}function y(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function x(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function k(t,e){t.value=null==e?"":e}function _(t,e,n){t.classList[n?"add":"remove"](e)}const z=new Set;let S,E=0;function C(t,e,n,o,s,c,r,l=0){const i=16.666/o;let a="{\n";for(let t=0;t<=1;t+=i){const o=e+(n-e)*c(t);a+=100*t+`%{${r(o,1-o)}}\n`}const u=a+`100% {${r(n,1-n)}}\n}`,d=`__svelte_${function(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}(u)}_${l}`,f=t.ownerDocument;z.add(f);const m=f.__svelte_stylesheet||(f.__svelte_stylesheet=f.head.appendChild(v("style")).sheet),p=f.__svelte_rules||(f.__svelte_rules={});p[d]||(p[d]=!0,m.insertRule(`@keyframes ${d} ${u}`,m.cssRules.length));const g=t.style.animation||"";return t.style.animation=`${g?`${g}, `:""}${d} ${o}ms linear ${s}ms 1 both`,E+=1,d}function H(t,e){const n=(t.style.animation||"").split(", "),o=n.filter(e?t=>t.indexOf(e)<0:t=>-1===t.indexOf("__svelte")),s=n.length-o.length;s&&(t.style.animation=o.join(", "),E-=s,E||a((()=>{E||(z.forEach((t=>{const e=t.__svelte_stylesheet;let n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}})),z.clear())})))}function V(t){S=t}function B(){if(!S)throw new Error("Function called outside component initialization");return S}const L=[],M=[],O=[],A=[],N=Promise.resolve();let R=!1;function q(t){O.push(t)}let j=!1;const D=new Set;function I(){if(!j){j=!0;do{for(let t=0;t<L.length;t+=1){const e=L[t];V(e),J(e.$$)}for(V(null),L.length=0;M.length;)M.pop()();for(let t=0;t<O.length;t+=1){const e=O[t];D.has(e)||(D.add(e),e())}O.length=0}while(L.length);for(;A.length;)A.pop()();R=!1,j=!1,D.clear()}}function J(t){if(null!==t.fragment){t.update(),s(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(q)}}let P;function F(){return P||(P=Promise.resolve(),P.then((()=>{P=null}))),P}function T(t,e,n){t.dispatchEvent(function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!1,e),n}(`${e?"intro":"outro"}${n}`))}const Z=new Set;let G;function K(){G={r:0,c:[],p:G}}function Q(){G.r||s(G.c),G=G.p}function U(t,e){t&&t.i&&(Z.delete(t),t.i(e))}function W(t,e,n,o){if(t&&t.o){if(Z.has(t))return;Z.add(t),G.c.push((()=>{Z.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}const X={duration:0};function Y(n,o,r,l){let a=o(n,r),u=l?0:1,d=null,m=null,p=null;function g(){p&&H(n,p)}function v(t,e){const n=t.b-u;return e*=Math.abs(n),{a:u,b:t.b,d:n,duration:e,start:t.start,end:t.start+e,group:t.group}}function $(o){const{delay:c=0,duration:r=300,easing:l=e,tick:$=t,css:h}=a||X,w={start:i()+c,b:o};o||(w.group=G,G.r+=1),d||m?m=w:(h&&(g(),p=C(n,u,o,r,c,l,h)),o&&$(0,1),d=v(w,r),q((()=>T(n,o,"start"))),f((t=>{if(m&&t>m.start&&(d=v(m,r),m=null,T(n,d.b,"start"),h&&(g(),p=C(n,u,d.b,d.duration,0,l,a.css))),d)if(t>=d.end)$(u=d.b,1-u),T(n,d.b,"end"),m||(d.b?g():--d.group.r||s(d.group.c)),d=null;else if(t>=d.start){const e=t-d.start;u=d.a+d.d*l(e/d.duration),$(u,1-u)}return!(!d&&!m)})))}return{run(t){c(a)?F().then((()=>{a=a(),$(t)})):$(t)},end(){g(),d=m=null}}}function tt(t,e){W(t,1,1,(()=>{e.delete(t.key)}))}function et(t){t&&t.c()}function nt(t,e,o,r){const{fragment:l,on_mount:i,on_destroy:a,after_update:u}=t.$$;l&&l.m(e,o),r||q((()=>{const e=i.map(n).filter(c);a?a.push(...e):s(e),t.$$.on_mount=[]})),u.forEach(q)}function ot(t,e){const n=t.$$;null!==n.fragment&&(s(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function st(t,e){-1===t.$$.dirty[0]&&(L.push(t),R||(R=!0,N.then(I)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ct(e,n,c,r,l,i,a=[-1]){const u=S;V(e);const d=e.$$={fragment:null,ctx:null,props:i,update:t,not_equal:l,bound:o(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:[]),callbacks:o(),dirty:a,skip_bound:!1};let f=!1;if(d.ctx=c?c(e,n.props||{},((t,n,...o)=>{const s=o.length?o[0]:n;return d.ctx&&l(d.ctx[t],d.ctx[t]=s)&&(!d.skip_bound&&d.bound[t]&&d.bound[t](s),f&&st(e,t)),n})):[],d.update(),f=!0,s(d.before_update),d.fragment=!!r&&r(d.ctx),n.target){if(n.hydrate){const t=function(t){return Array.from(t.childNodes)}(n.target);d.fragment&&d.fragment.l(t),t.forEach(g)}else d.fragment&&d.fragment.c();n.intro&&U(e.$$.fragment),nt(e,n.target,n.anchor,n.customElement),I()}V(u)}class rt{$destroy(){ot(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function lt(t,{delay:n=0,duration:o=400,easing:s=e}={}){const c=+getComputedStyle(t).opacity;return{delay:n,duration:o,easing:s,css:t=>"opacity: "+t*c}}function it(e){let n,o;return{c(){n=$("svg"),o=$("path"),x(o,"d","M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"),x(n,"xmlns","http://www.w3.org/2000/svg"),x(n,"viewBox","0 0 448 512"),x(n,"class","svelte-12pvzxi")},m(t,e){p(t,n,e),m(n,o)},p:t,i:t,o:t,d(t){t&&g(n)}}}class at extends rt{constructor(t){super(),ct(this,t,null,it,r,{})}}function ut(e){let n,o;return{c(){n=$("svg"),o=$("path"),x(o,"d","M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"),x(n,"xmlns","http://www.w3.org/2000/svg"),x(n,"viewBox","0 0 448 512"),x(n,"class","svelte-12pvzxi")},m(t,e){p(t,n,e),m(n,o)},p:t,i:t,o:t,d(t){t&&g(n)}}}class dt extends rt{constructor(t){super(),ct(this,t,null,ut,r,{})}}function ft(e){let n,o;return{c(){n=$("svg"),o=$("path"),x(o,"d","M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"),x(n,"xmlns","http://www.w3.org/2000/svg"),x(n,"viewBox","0 0 448 512"),x(n,"class","svelte-12pvzxi")},m(t,e){p(t,n,e),m(n,o)},p:t,i:t,o:t,d(t){t&&g(n)}}}class mt extends rt{constructor(t){super(),ct(this,t,null,ft,r,{})}}function pt(e){let n,o;return{c(){n=$("svg"),o=$("path"),x(o,"d","M255.545 8c-66.269.119-126.438 26.233-170.86 68.685L48.971 40.971C33.851 25.851 8 36.559 8 57.941V192c0 13.255 10.745 24 24 24h134.059c21.382 0 32.09-25.851 16.971-40.971l-41.75-41.75c30.864-28.899 70.801-44.907 113.23-45.273 92.398-.798 170.283 73.977 169.484 169.442C423.236 348.009 349.816 424 256 424c-41.127 0-79.997-14.678-110.63-41.556-4.743-4.161-11.906-3.908-16.368.553L89.34 422.659c-4.872 4.872-4.631 12.815.482 17.433C133.798 479.813 192.074 504 256 504c136.966 0 247.999-111.033 248-247.998C504.001 119.193 392.354 7.755 255.545 8z"),x(n,"xmlns","http://www.w3.org/2000/svg"),x(n,"viewBox","0 0 512 512"),x(n,"class","svelte-12pvzxi")},m(t,e){p(t,n,e),m(n,o)},p:t,i:t,o:t,d(t){t&&g(n)}}}class gt extends rt{constructor(t){super(),ct(this,t,null,pt,r,{})}}function vt(t,e,n){const o=t.slice();return o[13]=e[n],o}function $t(n){let o,r,l,a,u,d,$,h,b,k,_,z,S,E,V;return u=new gt({}),_=new mt({}),{c(){o=v("div"),r=v("div"),l=w(),a=v("div"),et(u.$$.fragment),d=w(),$=v("div"),h=v("b"),h.textContent=`${n[4]["xpandablesection.removemessage"]}`,b=w(),k=v("div"),et(_.$$.fragment),x(r,"class","background svelte-alkb5w"),x(a,"class","button svelte-alkb5w"),x(a,"title",n[4]["xpandablesection.cancelremove"]),x(h,"class","svelte-alkb5w"),x($,"class","item text svelte-alkb5w"),x(k,"class","button destructive svelte-alkb5w"),x(k,"title",n[4]["xpandablesection.confirmremove"]),x(o,"class","group confirmOverlay svelte-alkb5w")},m(t,e){p(t,o,e),m(o,r),m(o,l),m(o,a),nt(u,a,null),m(o,d),m(o,$),m($,h),m(o,b),m(o,k),nt(_,k,null),S=!0,E||(V=[y(a,"click",n[5]),y(k,"click",n[6])],E=!0)},p:t,i(t){S||(U(u.$$.fragment,t),U(_.$$.fragment,t),z&&z.end(1),S=!0)},o(n){W(u.$$.fragment,n),W(_.$$.fragment,n),z=function(n,o,r){let l,a=o(n,r),u=!0;const d=G;function m(){const{delay:o=0,duration:c=300,easing:r=e,tick:m=t,css:p}=a||X;p&&(l=C(n,1,0,c,o,r,p));const g=i()+o,v=g+c;q((()=>T(n,!1,"start"))),f((t=>{if(u){if(t>=v)return m(0,1),T(n,!1,"end"),--d.r||s(d.c),!1;if(t>=g){const e=r((t-g)/c);m(1-e,e)}}return u}))}return d.r+=1,c(a)?F().then((()=>{a=a(),m()})):m(),{end(t){t&&a.tick&&a.tick(1,0),u&&(l&&H(n,l),u=!1)}}}(o,lt,{duration:250}),S=!1},d(t){t&&g(o),ot(u),ot(_),t&&z&&z.end(),E=!1,s(V)}}}function ht(e){let n,o,s,c,r;return o=new mt({}),{c(){n=v("div"),et(o.$$.fragment),x(n,"class","button destructive svelte-alkb5w"),x(n,"title",e[4]["xpandablesection.remove"])},m(t,l){p(t,n,l),nt(o,n,null),s=!0,c||(r=y(n,"click",e[10]),c=!0)},p:t,i(t){s||(U(o.$$.fragment,t),s=!0)},o(t){W(o.$$.fragment,t),s=!1},d(t){t&&g(n),ot(o),c=!1,r()}}}function wt(t){let e,n,o=[],s=new Map,c=t[0].sections;const r=t=>t[13];for(let e=0;e<c.length;e+=1){let n=vt(t,c,e),l=r(n);s.set(l,o[e]=yt(l,n))}return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=b()},m(t,s){for(let e=0;e<o.length;e+=1)o[e].m(t,s);p(t,e,s),n=!0},p(t,n){1&n&&(c=t[0].sections,K(),o=function(t,e,n,o,s,c,r,l,i,a,u,d){let f=t.length,m=c.length,p=f;const g={};for(;p--;)g[t[p].key]=p;const v=[],$=new Map,h=new Map;for(p=m;p--;){const t=d(s,c,p),l=n(t);let i=r.get(l);i?o&&i.p(t,e):(i=a(l,t),i.c()),$.set(l,v[p]=i),l in g&&h.set(l,Math.abs(p-g[l]))}const w=new Set,b=new Set;function y(t){U(t,1),t.m(l,u),r.set(t.key,t),u=t.first,m--}for(;f&&m;){const e=v[m-1],n=t[f-1],o=e.key,s=n.key;e===n?(u=e.first,f--,m--):$.has(s)?!r.has(o)||w.has(o)?y(e):b.has(s)?f--:h.get(o)>h.get(s)?(b.add(o),y(e)):(w.add(s),f--):(i(n,r),f--)}for(;f--;){const e=t[f];$.has(e.key)||i(e,r)}for(;m;)y(v[m-1]);return v}(o,n,r,1,t,c,s,e.parentNode,tt,yt,e,vt),Q())},i(t){if(!n){for(let t=0;t<c.length;t+=1)U(o[t]);n=!0}},o(t){for(let t=0;t<o.length;t+=1)W(o[t]);n=!1},d(t){for(let e=0;e<o.length;e+=1)o[e].d(t);t&&g(e)}}}function bt(e){let n,o;return{c(){n=v("div"),o=v("div"),o.textContent=`${e[4]["xpandablesection.widgetzone"]}`,x(o,"class","group column item svelte-alkb5w"),x(n,"class","widgetZone group item svelte-alkb5w")},m(t,e){p(t,n,e),m(n,o)},p:t,i:t,o:t,d(t){t&&g(n)}}}function yt(t,e){let n,o,s;return o=new _t({props:{section:e[13],removeSection:e[11]}}),{key:t,first:null,c(){n=b(),et(o.$$.fragment),this.first=n},m(t,e){p(t,n,e),nt(o,t,e),s=!0},p(t,n){e=t;const s={};1&n&&(s.section=e[13]),1&n&&(s.removeSection=e[11]),o.$set(s)},i(t){s||(U(o.$$.fragment,t),s=!0)},o(t){W(o.$$.fragment,t),s=!1},d(t){t&&g(n),ot(o,t)}}}function xt(t){let e,n,o,c,r,l,i,a,u,d,f,$,h,b,z,S,E,C,H,V=t[3]&&$t(t);r=new at({}),a=new dt({});let B=void 0!==t[1]&&ht(t);const L=[bt,wt],M=[];function O(t,e){return null===t[0].sections?0:1}return b=O(t),z=M[b]=L[b](t),{c(){e=v("div"),V&&V.c(),n=w(),o=v("div"),c=v("div"),et(r.$$.fragment),l=w(),i=v("div"),et(a.$$.fragment),u=w(),d=v("input"),f=w(),B&&B.c(),$=w(),h=v("div"),z.c(),x(c,"class","button svelte-alkb5w"),x(c,"title",t[4]["xpandablesection.add"]),x(i,"class","button svelte-alkb5w"),x(i,"title",t[4]["xpandablesection.direction"]),_(i,"disabled",null===t[0].sections),_(i,"down",t[0].direction===t[2].Vertical),x(d,"class","item svelte-alkb5w"),x(d,"type","text"),x(d,"placeholder",t[4]["xpandablesection.name"]),x(o,"class","group svelte-alkb5w"),x(h,"class","group context svelte-alkb5w"),_(h,"column",t[0].direction===t[2].Vertical),x(e,"class","item root svelte-alkb5w"),_(e,"zone",null===t[0].sections)},m(s,g){p(s,e,g),V&&V.m(e,null),m(e,n),m(e,o),m(o,c),nt(r,c,null),m(o,l),m(o,i),nt(a,i,null),m(o,u),m(o,d),k(d,t[0].name),m(o,f),B&&B.m(o,null),m(e,$),m(e,h),M[b].m(h,null),E=!0,C||(H=[y(c,"click",t[7]),y(i,"click",t[8]),y(d,"input",t[9])],C=!0)},p(t,[s]){t[3]?V?(V.p(t,s),8&s&&U(V,1)):(V=$t(t),V.c(),U(V,1),V.m(e,n)):V&&(K(),W(V,1,1,(()=>{V=null})),Q()),1&s&&_(i,"disabled",null===t[0].sections),5&s&&_(i,"down",t[0].direction===t[2].Vertical),1&s&&d.value!==t[0].name&&k(d,t[0].name),void 0!==t[1]?B?(B.p(t,s),2&s&&U(B,1)):(B=ht(t),B.c(),U(B,1),B.m(o,null)):B&&(K(),W(B,1,1,(()=>{B=null})),Q());let c=b;b=O(t),b===c?M[b].p(t,s):(K(),W(M[c],1,1,(()=>{M[c]=null})),Q(),z=M[b],z?z.p(t,s):(z=M[b]=L[b](t),z.c()),U(z,1),z.m(h,null)),5&s&&_(h,"column",t[0].direction===t[2].Vertical),1&s&&_(e,"zone",null===t[0].sections)},i(t){E||(U(V),U(r.$$.fragment,t),U(a.$$.fragment,t),U(B),U(z),q((()=>{S||(S=Y(e,lt,{duration:250},!0)),S.run(1)})),E=!0)},o(t){W(V),W(r.$$.fragment,t),W(a.$$.fragment,t),W(B),W(z),S||(S=Y(e,lt,{duration:250},!1)),S.run(0),E=!1},d(t){t&&g(e),V&&V.d(),ot(r),ot(a),B&&B.d(),M[b].d(),t&&S&&S.end(),C=!1,s(H)}}}function kt(t,e,n){var o;!function(t){t[t.Horizontal=0]="Horizontal",t[t.Vertical=1]="Vertical"}(o||(o={}));let{section:s}=e,{removeSection:c}=e,r=!1;const{resources:l,updateValue:i}=(a=St,B().$$.context.get(a));var a;return t.$$set=t=>{"section"in t&&n(0,s=t.section),"removeSection"in t&&n(1,c=t.removeSection)},t.$$.update=()=>{1&t.$$.dirty&&s&&i()},[s,c,o,r,l,()=>n(3,r=!1),()=>c(s),()=>{null===s.sections?n(0,s.sections=[{direction:o.Horizontal,name:"",sections:null},{direction:o.Horizontal,name:"",sections:null}],s):n(0,s.sections=[...s.sections,{direction:o.Horizontal,name:"",sections:null}],s)},()=>{s.direction===o.Horizontal?n(0,s.direction=o.Vertical,s):n(0,s.direction=o.Horizontal,s)},function(){s.name=this.value,n(0,s)},()=>n(3,r=!0),t=>{if(2===s.sections.length)n(0,s.sections=null,s);else if(s.sections.length>2){const e=[];for(const n of s.sections)n!==t&&e.push(n);n(0,s.sections=e,s)}}]}class _t extends rt{constructor(t){super(),ct(this,t,kt,xt,r,{section:0,removeSection:1})}}function zt(e){let n,o,s;return o=new _t({props:{section:e[0]}}),{c(){n=v("main"),et(o.$$.fragment),x(n,"class","svelte-1xrqgi0")},m(t,e){p(t,n,e),nt(o,n,null),s=!0},p:t,i(t){s||(U(o.$$.fragment,t),s=!0)},o(t){W(o.$$.fragment,t),s=!1},d(t){t&&g(n),ot(o)}}}const St={};function Et(t,e,n){let{valueBinding:o}=e,{resources:s}=e,c=JSON.parse(o.value);var r,l,i;return r=St,l={resources:s,updateValue:()=>{n(1,o.value=JSON.stringify(c),o)}},B().$$.context.set(r,l),i=()=>{let t,e=o.parentElement;for(;void 0===t;)null!==e.shadowRoot?t=e.shadowRoot:(e.classList.contains("ktc-form-wrapper")&&e.classList.add("xpanded"),e=e.parentElement);try{t.querySelector(".ktc-form-wrapper").style.width="90%",t.querySelector(".ktc-modal-dialog").style.width="auto"}catch(t){}},B().$$.on_mount.push(i),t.$$set=t=>{"valueBinding"in t&&n(1,o=t.valueBinding),"resources"in t&&n(2,s=t.resources)},[c,o,s]}return new class extends rt{constructor(t){super(),ct(this,t,Et,zt,r,{valueBinding:1,resources:2})}}({target:document.getElementById("xpandableSectionRoot"),props:{valueBinding:document.getElementById("xpandableSectionData"),resources:JSON.parse(document.getElementById("xpandableSectionResources").value)}})}();
  