@poirazis/supercomponents-shared 1.1.8 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +21416 -40369
- package/dist/index.umd.cjs +19 -26
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/src/index.js +4 -0
- package/src/index.ts +3 -0
- package/src/lib/Actions/index.js +3 -3
- package/src/lib/SuperButton/SuperButton.svelte +34 -3
- package/src/lib/SuperForm/InnerForm.svelte +1 -1
- package/src/lib/SuperList/SuperList.svelte +2 -2
- package/src/lib/SuperList/drag-handle.svelte +8 -8
- package/src/lib/SuperTable/SuperTable.css +8 -3
- package/src/lib/SuperTable/SuperTable.svelte +3 -3
- package/src/lib/SuperTable/controls/PaginationLimitOffset.svelte +2 -0
- package/src/lib/SuperTable/controls/SelectionColumn.svelte +18 -49
- package/src/lib/SuperTable/controls/SuperTableWelcome.svelte +1 -1
- package/src/lib/SuperTable/overlays/AddNewRowOverlay.svelte +3 -3
- package/src/lib/SuperTable/overlays/EmptyResultSetOverlay.svelte +1 -1
- package/src/lib/SuperTable/overlays/ScrollbarsOverlay.svelte +43 -43
- package/src/lib/SuperTableCells/CellAttachmentExpanded.svelte +1 -1
- package/src/lib/SuperTableCells/CellAttachmentSlider.svelte +2 -3
- package/src/lib/SuperTableCells/CellBoolean.svelte +1 -1
- package/src/lib/SuperTableCells/CellColor.svelte +7 -7
- package/src/lib/SuperTableCells/CellCommon.css +1 -1
- package/src/lib/SuperTableCells/CellIcon.svelte +7 -7
- package/src/lib/SuperTableCells/CellJSON.svelte +2 -2
- package/src/lib/SuperTableCells/CellLink.svelte +50 -43
- package/src/lib/SuperTableCells/CellLinkAdvanced.svelte +2 -15
- package/src/lib/SuperTableCells/CellLinkPickerSelect.svelte +10 -11
- package/src/lib/SuperTableCells/CellLinkPickerTree.svelte +4 -2
- package/src/lib/SuperTableCells/CellNumber.svelte +24 -5
- package/src/lib/SuperTableCells/CellOptions.svelte +11 -23
- package/src/lib/SuperTableCells/CellOptionsAdvanced.svelte +5 -5
- package/src/lib/SuperTableCells/CellSQLLink.svelte +0 -11
- package/src/lib/SuperTableCells/CellSQLLinkPicker.svelte +9 -9
- package/src/lib/SuperTableCells/CellString.svelte +3 -3
- package/src/lib/SuperTableCells/CellStringMask.svelte +1 -1
- package/src/lib/SuperTableCells/CellTags.svelte +151 -108
- package/src/lib/SuperTableCells/JSDOC_GUIDE.md +163 -3
- package/src/lib/SuperTableCells/types.js +141 -192
- package/src/lib/SuperTableColumn/SuperTableColumn.svelte +1 -1
- package/src/lib/SuperTableColumn/parts/SuperColumnHeader.svelte +2 -2
- package/src/lib/SuperTableColumn/parts/SuperColumnRow.svelte +5 -3
- package/src/lib/SuperTabs/SuperTabs.svelte +2 -2
- package/src/lib/SuperTree/SuperTree.svelte +84 -38
- package/src/lib/UI/elements/Checkbox.svelte +36 -6
- package/src/lib/UI/elements/IconButton.svelte +115 -0
- package/src/lib/UI/elements/Tooltip.svelte +65 -0
package/dist/index.umd.cjs
CHANGED
|
@@ -1,26 +1,19 @@
|
|
|
1
|
-
(function(ct,le){typeof exports=="object"&&typeof module<"u"?le(exports,require("svelte")):typeof define=="function"&&define.amd?define(["exports","svelte"],le):(ct=typeof globalThis<"u"?globalThis:ct||self,le(ct.SupercomponentsShared={},ct.Svelte))})(this,function(ct,le){"use strict";var bS=Object.defineProperty;var wS=(ct,le,ue)=>le in ct?bS(ct,le,{enumerable:!0,configurable:!0,writable:!0,value:ue}):ct[le]=ue;var Es=(ct,le,ue)=>wS(ct,typeof le!="symbol"?le+"":le,ue);function ue(){}const Sm=t=>t;function vs(t,e){for(const n in e)t[n]=e[n];return t}function Ss(t){return t()}function Cs(){return Object.create(null)}function Ve(t){t.forEach(Ss)}function Ge(t){return typeof t=="function"}function Ye(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let fr;function As(t,e){return t===e?!0:(fr||(fr=document.createElement("a")),fr.href=e,t===fr.href)}function Cm(t){return Object.keys(t).length===0}function ft(t,...e){if(t==null){for(const i of e)i(void 0);return ue}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function qt(t){let e;return ft(t,n=>e=n)(),e}function Me(t,e,n){t.$$.on_destroy.push(ft(e,n))}function Ut(t,e,n,i){if(t){const l=Ts(t,e,n,i);return t[0](l)}}function Ts(t,e,n,i){return t[1]&&i?vs(n.ctx.slice(),t[1](i(e))):n.ctx}function Ht(t,e,n,i){if(t[2]&&i){const l=t[2](i(n));if(e.dirty===void 0)return l;if(typeof l=="object"){const r=[],o=Math.max(e.dirty.length,l.length);for(let u=0;u<o;u+=1)r[u]=e.dirty[u]|l[u];return r}return e.dirty|l}return e.dirty}function zt(t,e,n,i,l,r){if(l){const o=Ts(e,n,i,r);t.p(o,l)}}function jt(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let i=0;i<n;i++)e[i]=-1;return e}return-1}function bt(t){return t??""}function Re(t,e,n){return t.set(n),e}const Am=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);function tn(t){return t&&Ge(t.destroy)?t.destroy:ue}function Is(t){const e=typeof t=="string"&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}const Ds=typeof window<"u";let Tm=Ds?()=>window.performance.now():()=>Date.now(),uo=Ds?t=>requestAnimationFrame(t):ue;const El=new Set;function Os(t){El.forEach(e=>{e.c(t)||(El.delete(e),e.f())}),El.size!==0&&uo(Os)}function Im(t){let e;return El.size===0&&uo(Os),{promise:new Promise(n=>{El.add(e={c:t,f:n})}),abort(){El.delete(e)}}}function S(t,e){t.appendChild(e)}function Rs(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Dm(t){const e=v("style");return e.textContent="/* empty */",Om(Rs(t),e),e.sheet}function Om(t,e){return S(t.head||t,e),e.sheet}function A(t,e,n){t.insertBefore(e,n||null)}function C(t){t.parentNode&&t.parentNode.removeChild(t)}function St(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function v(t){return document.createElement(t)}function Rm(t,e){const n={};for(const i in t)Am(t,i)&&e.indexOf(i)===-1&&(n[i]=t[i]);return n}function vl(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Ee(t){return document.createTextNode(t)}function Q(){return Ee(" ")}function Fe(){return Ee("")}function B(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function Et(t){return function(e){return e.preventDefault(),t.call(this,e)}}function Qt(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function Ii(t){return function(e){e.target===this&&t.call(this,e)}}function m(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function ao(t,e,n){const i=e.toLowerCase();i in t?t[i]=typeof t[i]=="boolean"&&n===""?!0:n:e in t?t[e]=typeof t[e]=="boolean"&&n===""?!0:n:m(t,e,n)}function Pm(t){return Array.from(t.childNodes)}function Pe(t,e){e=""+e,t.data!==e&&(t.data=e)}function cr(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Zt(t,e){t.value=e??""}function P(t,e,n,i){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,"")}function dr(t,e,n){for(let i=0;i<t.options.length;i+=1){const l=t.options[i];if(l.__value===e){l.selected=!0;return}}t.selectedIndex=-1}let hr;function Mm(){if(hr===void 0){hr=!1;try{typeof window<"u"&&window.parent&&window.parent.document}catch{hr=!0}}return hr}function fo(t,e){getComputedStyle(t).position==="static"&&(t.style.position="relative");const i=v("iframe");i.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),i.setAttribute("aria-hidden","true"),i.tabIndex=-1;const l=Mm();let r;return l?(i.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",r=B(window,"message",o=>{o.source===i.contentWindow&&e()})):(i.src="about:blank",i.onload=()=>{r=B(i.contentWindow,"resize",e),e()}),S(t,i),()=>{(l||r&&i.contentWindow)&&r(),C(i)}}function p(t,e,n){t.classList.toggle(e,!!n)}function Nm(t,e,{bubbles:n=!1,cancelable:i=!1}={}){return new CustomEvent(t,{detail:e,bubbles:n,cancelable:i})}function Sl(t,e){return new t(e)}const gr=new Map;let mr=0;function Lm(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}function Fm(t,e){const n={stylesheet:Dm(e),rules:{}};return gr.set(t,n),n}function Ps(t,e,n,i,l,r,o,u=0){const s=16.666/i;let a=`{
|
|
2
|
-
`;for(let b=0;b<=1;b+=s){const w=e+(n-e)*r(b);a+=b*100+`%{${o(w,1-w)}}
|
|
3
|
-
|
|
4
|
-
}`,c=`__svelte_${Lm(f)}_${u}`,g=Rs(t),{stylesheet:h,rules:d}=gr.get(g)||Fm(g,t);d[c]||(d[c]=!0,h.insertRule(`@keyframes ${c} ${f}`,h.cssRules.length));const _=t.style.animation||"";return t.style.animation=`${_?`${_}, `:""}${c} ${i}ms linear ${l}ms 1 both`,mr+=1,c}function Vm(t,e){const n=(t.style.animation||"").split(", "),i=n.filter(e?r=>r.indexOf(e)<0:r=>r.indexOf("__svelte")===-1),l=n.length-i.length;l&&(t.style.animation=i.join(", "),mr-=l,mr||Bm())}function Bm(){uo(()=>{mr||(gr.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&C(e)}),gr.clear())})}let co;function Yl(t){co=t}function ti(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(i=>i.call(this,e))}const Cl=[],Be=[];let Al=[];const ho=[],Um=Promise.resolve();let go=!1;function Hm(){go||(go=!0,Um.then(Ms))}function ni(t){Al.push(t)}function Wt(t){ho.push(t)}const mo=new Set;let Tl=0;function Ms(){if(Tl!==0)return;const t=co;do{try{for(;Tl<Cl.length;){const e=Cl[Tl];Tl++,Yl(e),zm(e.$$)}}catch(e){throw Cl.length=0,Tl=0,e}for(Yl(null),Cl.length=0,Tl=0;Be.length;)Be.pop()();for(let e=0;e<Al.length;e+=1){const n=Al[e];mo.has(n)||(mo.add(n),n())}Al.length=0}while(Cl.length);for(;ho.length;)ho.pop()();go=!1,mo.clear(),Yl(t)}function zm(t){if(t.fragment!==null){t.update(),Ve(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(ni)}}function jm(t){const e=[],n=[];Al.forEach(i=>t.indexOf(i)===-1?e.push(i):n.push(i)),n.forEach(i=>i()),Al=e}let Kl;function qm(){return Kl||(Kl=Promise.resolve(),Kl.then(()=>{Kl=null})),Kl}function _o(t,e,n){t.dispatchEvent(Nm(`${e?"intro":"outro"}${n}`))}const _r=new Set;let gi;function He(){gi={r:0,c:[],p:gi}}function ze(){gi.r||Ve(gi.c),gi=gi.p}function U(t,e){t&&t.i&&(_r.delete(t),t.i(e))}function Z(t,e,n,i){if(t&&t.o){if(_r.has(t))return;_r.add(t),gi.c.push(()=>{_r.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}const Wm={duration:0};function Il(t,e,n,i){let r=e(t,n,{direction:"both"}),o=i?0:1,u=null,s=null,a=null,f;function c(){a&&Vm(t,a)}function g(d,_){const b=d.b-o;return _*=Math.abs(b),{a:o,b:d.b,d:b,duration:_,start:d.start,end:d.start+_,group:d.group}}function h(d){const{delay:_=0,duration:b=300,easing:w=Sm,tick:E=ue,css:k}=r||Wm,I={start:Tm()+_,b:d};d||(I.group=gi,gi.r+=1),"inert"in t&&(d?f!==void 0&&(t.inert=f):(f=t.inert,t.inert=!0)),u||s?s=I:(k&&(c(),a=Ps(t,o,d,b,_,w,k)),d&&E(0,1),u=g(I,b),ni(()=>_o(t,d,"start")),Im(O=>{if(s&&O>s.start&&(u=g(s,b),s=null,_o(t,u.b,"start"),k&&(c(),a=Ps(t,o,u.b,u.duration,0,w,r.css))),u){if(O>=u.end)E(o=u.b,1-o),_o(t,u.b,"end"),s||(u.b?c():--u.group.r||Ve(u.group.c)),u=null;else if(O>=u.start){const D=O-u.start;o=u.a+u.d*w(D/u.duration),E(o,1-o)}}return!!(u||s)}))}return{run(d){Ge(r)?qm().then(()=>{r=r({direction:d?"in":"out"}),h(d)}):h(d)},end(){c(),u=s=null}}}function Ce(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function nn(t,e){t.d(1),e.delete(t.key)}function Di(t,e){Z(t,1,1,()=>{e.delete(t.key)})}function Tt(t,e,n,i,l,r,o,u,s,a,f,c){let g=t.length,h=r.length,d=g;const _={};for(;d--;)_[t[d].key]=d;const b=[],w=new Map,E=new Map,k=[];for(d=h;d--;){const N=c(l,r,d),M=n(N);let V=o.get(M);V?k.push(()=>V.p(N,e)):(V=a(M,N),V.c()),w.set(M,b[d]=V),M in _&&E.set(M,Math.abs(d-_[M]))}const I=new Set,O=new Set;function D(N){U(N,1),N.m(u,f),o.set(N.key,N),f=N.first,h--}for(;g&&h;){const N=b[h-1],M=t[g-1],V=N.key,W=M.key;N===M?(f=N.first,g--,h--):w.has(W)?!o.has(V)||I.has(V)?D(N):O.has(W)?g--:E.get(V)>E.get(W)?(O.add(V),D(N)):(I.add(W),g--):(s(M,o),g--)}for(;g--;){const N=t[g];w.has(N.key)||s(N,o)}for(;h;)D(b[h-1]);return Ve(k),b}function Gm(t,e){const n={},i={},l={$$scope:1};let r=t.length;for(;r--;){const o=t[r],u=e[r];if(u){for(const s in o)s in u||(i[s]=1);for(const s in u)l[s]||(n[s]=u[s],l[s]=1);t[r]=u}else for(const s in o)l[s]=1}for(const o in i)o in n||(n[o]=void 0);return n}function Ym(t){return typeof t=="object"&&t!==null?t:{}}function Gt(t,e,n){const i=t.$$.props[e];i!==void 0&&(t.$$.bound[i]=n,n(t.$$.ctx[i]))}function We(t){t&&t.c()}function je(t,e,n){const{fragment:i,after_update:l}=t.$$;i&&i.m(e,n),ni(()=>{const r=t.$$.on_mount.map(Ss).filter(Ge);t.$$.on_destroy?t.$$.on_destroy.push(...r):Ve(r),t.$$.on_mount=[]}),l.forEach(ni)}function qe(t,e){const n=t.$$;n.fragment!==null&&(jm(n.after_update),Ve(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Km(t,e){t.$$.dirty[0]===-1&&(Cl.push(t),Hm(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Qe(t,e,n,i,l,r,o=null,u=[-1]){const s=co;Yl(t);const a=t.$$={fragment:null,ctx:[],props:r,update:ue,not_equal:l,bound:Cs(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(s?s.$$.context:[])),callbacks:Cs(),dirty:u,skip_bound:!1,root:e.target||s.$$.root};o&&o(a.root);let f=!1;if(a.ctx=n?n(t,e.props||{},(c,g,...h)=>{const d=h.length?h[0]:g;return a.ctx&&l(a.ctx[c],a.ctx[c]=d)&&(!a.skip_bound&&a.bound[c]&&a.bound[c](d),f&&Km(t,c)),g}):[],a.update(),f=!0,Ve(a.before_update),a.fragment=i?i(a.ctx):!1,e.target){if(e.hydrate){const c=Pm(e.target);a.fragment&&a.fragment.l(c),c.forEach(C)}else a.fragment&&a.fragment.c();e.intro&&U(t.$$.fragment),je(t,e.target,e.anchor),Ms()}Yl(s)}class Ze{constructor(){Es(this,"$$");Es(this,"$$set")}$destroy(){qe(this,1),this.$destroy=ue}$on(e,n){if(!Ge(n))return ue;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const l=i.indexOf(n);l!==-1&&i.splice(l,1)}}$set(e){this.$$set&&!Cm(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Xm="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Xm);function Qm(t){let e,n,i,l,r,o,u,s,a,f;return{c(){e=v("button"),n=v("i"),l=Q(),r=v("span"),o=Ee(t[0]),m(n,"class",i=bt(t[14])+" svelte-10t38ob"),P(n,"order",t[4]?1:0),P(n,"color",t[8]?"var(--spectrum-global-color-gray-400)":t[5]),m(e,"tabindex",u=t[8]?-1:0),m(e,"class",s=bt(t[9]=="actionButton"?"spectrum-ActionButton spectrum-ActionButton--size"+t[1]:"spectrum-Button spectrum-Button--size"+t[1])+" svelte-10t38ob"),p(e,"super-button",!0),p(e,"xsmall",t[1]=="XS"),p(e,"small",t[1]=="S"),p(e,"large",t[1]=="L"),p(e,"is-selected",t[7]),p(e,"cta",t[10]=="cta"&&!t[8]),p(e,"warning",t[10]=="warning"),p(e,"primary",t[10]=="primary"&&!t[2]),p(e,"secondary",t[10]=="secondary"),p(e,"overBackground",t[10]=="overBackground"),p(e,"ink",t[10]=="ink"),p(e,"menu",t[10]=="menu"),p(e,"quiet",t[6]),p(e,"icon",t[14]),p(e,"iconOnly",t[12]||!t[0]),p(e,"full-width",t[11]),p(e,"menu-item",t[2]),p(e,"menu-item-right",t[2]&&t[3]=="right"),p(e,"disabled",t[8]),p(e,"working",t[13])},m(c,g){A(c,e,g),S(e,n),S(e,l),S(e,r),S(r,o),a||(f=B(e,"click",t[15]),a=!0)},p(c,g){g[0]&16384&&i!==(i=bt(c[14])+" svelte-10t38ob")&&m(n,"class",i),g[0]&16&&P(n,"order",c[4]?1:0),g[0]&288&&P(n,"color",c[8]?"var(--spectrum-global-color-gray-400)":c[5]),g[0]&1&&Pe(o,c[0]),g[0]&256&&u!==(u=c[8]?-1:0)&&m(e,"tabindex",u),g[0]&514&&s!==(s=bt(c[9]=="actionButton"?"spectrum-ActionButton spectrum-ActionButton--size"+c[1]:"spectrum-Button spectrum-Button--size"+c[1])+" svelte-10t38ob")&&m(e,"class",s),g[0]&514&&p(e,"super-button",!0),g[0]&514&&p(e,"xsmall",c[1]=="XS"),g[0]&514&&p(e,"small",c[1]=="S"),g[0]&514&&p(e,"large",c[1]=="L"),g[0]&642&&p(e,"is-selected",c[7]),g[0]&1794&&p(e,"cta",c[10]=="cta"&&!c[8]),g[0]&1538&&p(e,"warning",c[10]=="warning"),g[0]&1542&&p(e,"primary",c[10]=="primary"&&!c[2]),g[0]&1538&&p(e,"secondary",c[10]=="secondary"),g[0]&1538&&p(e,"overBackground",c[10]=="overBackground"),g[0]&1538&&p(e,"ink",c[10]=="ink"),g[0]&1538&&p(e,"menu",c[10]=="menu"),g[0]&578&&p(e,"quiet",c[6]),g[0]&16898&&p(e,"icon",c[14]),g[0]&4611&&p(e,"iconOnly",c[12]||!c[0]),g[0]&2562&&p(e,"full-width",c[11]),g[0]&518&&p(e,"menu-item",c[2]),g[0]&526&&p(e,"menu-item-right",c[2]&&c[3]=="right"),g[0]&770&&p(e,"disabled",c[8]),g[0]&8706&&p(e,"working",c[13])},i:ue,o:ue,d(c){c&&C(e),a=!1,f()}}}function Zm(t){return new Promise(e=>setTimeout(e,t))}function Jm(t,e,n){let i,l,{size:r="M"}=e,{menuItem:o=!1}=e,{menuAlign:u="right"}=e,{icon:s=void 0}=e,{iconAfterText:a=void 0}=e,{iconColor:f=void 0}=e,{text:c=""}=e,{quiet:g=void 0}=e,{selected:h=void 0}=e,{disabled:d=void 0}=e,{onClick:_=void 0}=e,{buttonClass:b="actionButton"}=e,{type:w="primary"}=e,{conditions:E=[]}=e,{actionsMode:k="normal"}=e,{condition:I=void 0}=e,{loopSource:O=void 0}=e,{loopDelay:D=0}=e,{loopEvent:N=void 0}=e,{timerDuration:M=60}=e,{fullWidth:V=void 0}=e,{iconOnly:W=void 0}=e,{onTimer:ne=void 0}=e,{onLoopStart:H=void 0}=e,{onLoopEnd:$=void 0}=e,{onTrueCondition:Y=void 0}=e,{onFalseCondition:G=void 0}=e,oe=!1,ie,J=0;async function q(K){if(!(d||oe)){if(n(13,oe=!0),k=="loop"){if(H&&await H({iterations:O==null?void 0:O.length}),Array.isArray(i)&&N)for(var x=0;x<i.length;x++)await N({idx:x,value:i[x]}),await Zm(D);$&&await $()}else k=="conditional"?I==!0?await(Y==null?void 0:Y()):await(G==null?void 0:G()):_&&await(_==null?void 0:_(K));n(13,oe=!1)}}const j=K=>{if(!K)return;let x=[];try{x=JSON.parse(K),Array.isArray(x)||(x=[K])}catch{x=(K==null?void 0:K.split(","))??[K]}return x};return le.onMount(()=>{k=="timer"&&(n(0,c=M),ie=setInterval(()=>{J+=1,J==M&&(J=0,ne==null||ne()),n(0,c=M-J)},1e3))}),le.onDestroy(()=>{ie&&clearInterval(ie)}),t.$$set=K=>{"size"in K&&n(1,r=K.size),"menuItem"in K&&n(2,o=K.menuItem),"menuAlign"in K&&n(3,u=K.menuAlign),"icon"in K&&n(16,s=K.icon),"iconAfterText"in K&&n(4,a=K.iconAfterText),"iconColor"in K&&n(5,f=K.iconColor),"text"in K&&n(0,c=K.text),"quiet"in K&&n(6,g=K.quiet),"selected"in K&&n(7,h=K.selected),"disabled"in K&&n(8,d=K.disabled),"onClick"in K&&n(17,_=K.onClick),"buttonClass"in K&&n(9,b=K.buttonClass),"type"in K&&n(10,w=K.type),"conditions"in K&&n(18,E=K.conditions),"actionsMode"in K&&n(19,k=K.actionsMode),"condition"in K&&n(20,I=K.condition),"loopSource"in K&&n(21,O=K.loopSource),"loopDelay"in K&&n(22,D=K.loopDelay),"loopEvent"in K&&n(23,N=K.loopEvent),"timerDuration"in K&&n(24,M=K.timerDuration),"fullWidth"in K&&n(11,V=K.fullWidth),"iconOnly"in K&&n(12,W=K.iconOnly),"onTimer"in K&&n(25,ne=K.onTimer),"onLoopStart"in K&&n(26,H=K.onLoopStart),"onLoopEnd"in K&&n(27,$=K.onLoopEnd),"onTrueCondition"in K&&n(28,Y=K.onTrueCondition),"onFalseCondition"in K&&n(29,G=K.onFalseCondition)},t.$$.update=()=>{t.$$.dirty[0]&2097152&&(i=j(O)),t.$$.dirty[0]&73728&&n(14,l=oe?"ph ph-spinner-gap ph-spin":s&&!s.startsWith("ri-")?"ph ph-"+s:s||void 0)},[c,r,o,u,a,f,g,h,d,b,w,V,W,oe,l,q,s,_,E,k,I,O,D,N,M,ne,H,$,Y,G]}class el extends Ze{constructor(e){super(),Qe(this,e,Jm,Qm,Ye,{size:1,menuItem:2,menuAlign:3,icon:16,iconAfterText:4,iconColor:5,text:0,quiet:6,selected:7,disabled:8,onClick:17,buttonClass:9,type:10,conditions:18,actionsMode:19,condition:20,loopSource:21,loopDelay:22,loopEvent:23,timerDuration:24,fullWidth:11,iconOnly:12,onTimer:25,onLoopStart:26,onLoopEnd:27,onTrueCondition:28,onFalseCondition:29},null,[-1,-1])}}function Ns(t){let e,n,i,l,r;function o(f,c){return f[9]&&f[5]?$m:xm}let u=o(t),s=u(t),a=t[6]&&Ls(t);return{c(){e=v("div"),n=v("div"),s.c(),i=Q(),a&&a.c(),m(n,"class","label"),p(n,"showHelp",t[9]),m(e,"class","superlabel svelte-w6ppnj"),p(e,"left",t[0]=="left"),p(e,"tall",t[2]),p(e,"error",t[6]),P(e,"--label-width",t[10])},m(f,c){A(f,e,c),S(e,n),s.m(n,null),S(e,i),a&&a.m(e,null),l||(r=[B(n,"mouseenter",function(){Ge(t[5]?t[14]:null)&&(t[5]?t[14]:null).apply(this,arguments)}),B(n,"mouseleave",function(){Ge(t[5]?t[15]:null)&&(t[5]?t[15]:null).apply(this,arguments)})],l=!0)},p(f,c){t=f,u===(u=o(t))&&s?s.p(t,c):(s.d(1),s=u(t),s&&(s.c(),s.m(n,null))),c&512&&p(n,"showHelp",t[9]),t[6]?a?a.p(t,c):(a=Ls(t),a.c(),a.m(e,null)):a&&(a.d(1),a=null),c&1&&p(e,"left",t[0]=="left"),c&4&&p(e,"tall",t[2]),c&64&&p(e,"error",t[6]),c&1024&&P(e,"--label-width",t[10])},d(f){f&&C(e),s.d(),a&&a.d(),l=!1,Ve(r)}}}function xm(t){let e=(t[3]||t[4])+"",n;return{c(){n=Ee(e)},m(i,l){A(i,n,l)},p(i,l){l&24&&e!==(e=(i[3]||i[4])+"")&&Pe(n,e)},d(i){i&&C(n)}}}function $m(t){let e;return{c(){e=Ee(t[5])},m(n,i){A(n,e,i)},p(n,i){i&32&&Pe(e,n[5])},d(n){n&&C(e)}}}function Ls(t){let e,n;return{c(){e=v("div"),n=Ee(t[6]),m(e,"class","error-message")},m(i,l){A(i,e,l),S(e,n)},p(i,l){l&64&&Pe(n,i[6])},d(i){i&&C(e)}}}function e_(t){let e,n,i,l,r=t[0]&&Ns(t);const o=t[13].default,u=Ut(o,t,t[12],null);return{c(){e=v("div"),r&&r.c(),n=Q(),i=v("div"),u&&u.c(),m(i,"class","inline-cells svelte-w6ppnj"),p(i,"multirow",t[1]),m(e,"class","super-field svelte-w6ppnj"),p(e,"left-label",t[0]=="left"),p(e,"multirow",t[1]),p(e,"tall",t[2]),P(e,"--height",t[7]),P(e,"--max-height",t[8])},m(s,a){A(s,e,a),r&&r.m(e,null),S(e,n),S(e,i),u&&u.m(i,null),l=!0},p(s,[a]){s[0]?r?r.p(s,a):(r=Ns(s),r.c(),r.m(e,n)):r&&(r.d(1),r=null),u&&u.p&&(!l||a&4096)&&zt(u,o,s,s[12],l?Ht(o,s[12],a,null):jt(s[12]),null),(!l||a&2)&&p(i,"multirow",s[1]),(!l||a&1)&&p(e,"left-label",s[0]=="left"),(!l||a&2)&&p(e,"multirow",s[1]),(!l||a&4)&&p(e,"tall",s[2]),a&128&&P(e,"--height",s[7]),a&256&&P(e,"--max-height",s[8])},i(s){l||(U(u,s),l=!0)},o(s){Z(u,s),l=!1},d(s){s&&C(e),r&&r.d(),u&&u.d(s)}}}function t_(t,e,n){let i,{$$slots:l={},$$scope:r}=e,{labelPos:o}=e,{multirow:u}=e,{tall:s}=e,{label:a}=e,{field:f}=e,{helpText:c}=e,{error:g}=e,{labelWidth:h}=e,{height:d}=e,{maxHeight:_}=e,b;const w=()=>n(9,b=!0),E=()=>n(9,b=!1);return t.$$set=k=>{"labelPos"in k&&n(0,o=k.labelPos),"multirow"in k&&n(1,u=k.multirow),"tall"in k&&n(2,s=k.tall),"label"in k&&n(3,a=k.label),"field"in k&&n(4,f=k.field),"helpText"in k&&n(5,c=k.helpText),"error"in k&&n(6,g=k.error),"labelWidth"in k&&n(11,h=k.labelWidth),"height"in k&&n(7,d=k.height),"maxHeight"in k&&n(8,_=k.maxHeight),"$$scope"in k&&n(12,r=k.$$scope)},t.$$.update=()=>{t.$$.dirty&2049&&n(10,i=o=="left"?h||"5rem":"auto")},[o,u,s,a,f,c,g,d,_,b,i,h,r,l,w,E]}class n_ extends Ze{constructor(e){super(),Qe(this,e,t_,e_,Ye,{labelPos:0,multirow:1,tall:2,label:3,field:4,helpText:5,error:6,labelWidth:11,height:7,maxHeight:8})}}const Dl=[];function i_(t,e){return{subscribe:ii(t,e).subscribe}}function ii(t,e=ue){let n;const i=new Set;function l(u){if(Ye(t,u)&&(t=u,n)){const s=!Dl.length;for(const a of i)a[1](),Dl.push(a,t);if(s){for(let a=0;a<Dl.length;a+=2)Dl[a][0](Dl[a+1]);Dl.length=0}}}function r(u){l(u(t))}function o(u,s=ue){const a=[u,s];return i.add(a),i.size===1&&(n=e(l,r)||ue),u(t),()=>{i.delete(a),i.size===0&&n&&(n(),n=null)}}return{set:l,update:r,subscribe:o}}function pr(t,e,n){const i=!Array.isArray(t),l=i?[t]:t;if(!l.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const r=e.length<2;return i_(n,(o,u)=>{let s=!1;const a=[];let f=0,c=ue;const g=()=>{if(f)return;c();const d=e(i?a[0]:a,o,u);r?o(d):c=Ge(d)?d:ue},h=l.map((d,_)=>ft(d,b=>{a[_]=b,f&=~(1<<_),s&&g()},()=>{f|=1<<_}));return s=!0,g(),function(){Ve(h),c(),s=!1}})}var jn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function po(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function l_(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(i){var l=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(n,i,l.get?l:{enumerable:!0,get:function(){return t[i]}})}),n}var bo=Object.defineProperty,r_=Object.getOwnPropertyDescriptor,o_=Object.getOwnPropertyNames,s_=Object.prototype.hasOwnProperty,u_=(t,e)=>{for(var n in e)bo(t,n,{get:e[n],enumerable:!0})},a_=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of o_(e))!s_.call(t,l)&&l!==n&&bo(t,l,{get:()=>e[l],enumerable:!(i=r_(e,l))||i.enumerable});return t},f_=t=>a_(bo({},"__esModule",{value:!0}),t),Fs={};u_(Fs,{AIOperationEnum:()=>Vs,APP_QUOTA_NAMES:()=>$_,AUDIT_LOG_TYPE:()=>ip,AccountSSOProvider:()=>Pu,AccountSSOProviderType:()=>Ru,AnalyticsEvent:()=>k_,AppBackupStatus:()=>sa,AppBackupTrigger:()=>ua,AppBackupType:()=>oa,AppEnvironment:()=>Su,ArrayOperator:()=>fu,AsyncEvents:()=>c_,AuditLogResourceStatus:()=>wa,AuditLogSystemUser:()=>np,AuditedEventFriendlyName:()=>d_,AuthType:()=>Mu,AutoFieldSubType:()=>xu,AutoReason:()=>Ju,AutomationActionStepId:()=>ko,AutomationCustomIOType:()=>Lu,AutomationEventType:()=>zu,AutomationFeature:()=>Vu,AutomationIOType:()=>Nu,AutomationStatus:()=>Uu,AutomationStepIdArray:()=>I_,AutomationStepStatus:()=>Bu,AutomationStepType:()=>Fu,AutomationStoppedReason:()=>Hu,AutomationTriggerStepId:()=>wo,BBReferenceFieldSubType:()=>ta,BREAKDOWN_QUOTA_NAMES:()=>ep,BasicOperator:()=>au,BodyType:()=>Wu,BreakdownQuotaName:()=>ma,CalculationType:()=>na,CommandWord:()=>Cu,ConfigType:()=>ca,ConstantQuotaName:()=>Js,DSPlusOperation:()=>uu,DatasourceFeature:()=>su,DatasourceFieldType:()=>iu,DocumentType:()=>yo,DocumentTypesToImport:()=>z_,EmptyFilterOption:()=>gu,Event:()=>Hs,EventPublishType:()=>ka,Feature:()=>xs,FeatureFlag:()=>vu,FieldType:()=>Ku,FilterGroupLogicalOperator:()=>mu,FilterType:()=>ou,FormulaType:()=>ea,GroupByTypes:()=>Qu,GroupType:()=>js,Hosting:()=>Us,HttpMethod:()=>Gu,INTERNAL_TABLE_SOURCE_ID:()=>D_,IdentityType:()=>qs,IncludeRelationship:()=>ru,InitType:()=>Au,InternalSearchFilterOperator:()=>hu,InternalTable:()=>ra,JsonFieldSubType:()=>$u,JsonTypes:()=>O_,LockName:()=>wu,LockType:()=>bu,LogicalOperator:()=>du,LoginMethod:()=>pu,LoopStepType:()=>ju,MaintenanceType:()=>Sa,MigrationName:()=>eu,MigrationType:()=>$s,MonthlyQuotaName:()=>Zs,NumericTypes:()=>Xu,Operation:()=>tu,OperationFieldTypeEnum:()=>Bs,PASSWORD_REPLACEMENT:()=>__,PLUGIN_TYPE_ARR:()=>x_,PermissionLevel:()=>Tu,PermissionSource:()=>Du,PermissionType:()=>Iu,PingSource:()=>ba,PlanModel:()=>Ys,PlanType:()=>Ws,PluginSource:()=>ga,PluginType:()=>vo,PriceDuration:()=>Gs,QueryType:()=>nu,QuotaType:()=>Xs,QuotaUsageType:()=>Ks,RangeOperator:()=>cu,RelationshipType:()=>Zu,RestAuthType:()=>qu,RowExportFormat:()=>Ou,RowOperations:()=>p_,SEPARATOR:()=>br,SQLiteType:()=>fa,SSOProviderType:()=>da,ScheduleRepeatPeriod:()=>pa,ScheduleType:()=>_a,SearchIndex:()=>ku,ServiceType:()=>va,SortOption:()=>yu,SortOrder:()=>ya,SortType:()=>Ea,SourceName:()=>lu,SqlClient:()=>_u,StaticQuotaName:()=>Qs,TableSourceType:()=>Yu,TenantResolutionStrategy:()=>Eu,UNICODE_MAX:()=>V_,UserGroupSyncEvents:()=>zs,UserStatus:()=>ha,ViewCalculation:()=>la,ViewV2Type:()=>ia,VirtualDocumentType:()=>Eo,WebhookActionType:()=>aa,canGroupBy:()=>P_,getDocumentType:()=>H_,getVirtualDocumentType:()=>q_,isAIConfig:()=>Q_,isAppBackupMetadata:()=>tp,isCloudAccount:()=>v_,isConstantQuota:()=>m_,isCreatePasswordAccount:()=>y_,isDocument:()=>w_,isGoogleConfig:()=>Y_,isLogicalSearchOperator:()=>b_,isManyToMany:()=>N_,isManyToOne:()=>F_,isMonthlyQuota:()=>g_,isNumeric:()=>R_,isOIDCConfig:()=>K_,isOneToMany:()=>L_,isPasswordAccount:()=>E_,isRelationshipField:()=>M_,isSCIMConfig:()=>X_,isSMTPConfig:()=>G_,isSSOAccount:()=>C_,isSSOUser:()=>Z_,isSelfHostAccount:()=>S_,isSettingsConfig:()=>W_,isStaticQuota:()=>h_,isUser:()=>J_,isVerifiableSSOProvider:()=>T_,prefixed:()=>B_});var Ol=f_(Fs),Vs=(t=>(t.SUMMARISE_TEXT="SUMMARISE_TEXT",t.CLEAN_DATA="CLEAN_DATA",t.TRANSLATE="TRANSLATE",t.CATEGORISE_TEXT="CATEGORISE_TEXT",t.SENTIMENT_ANALYSIS="SENTIMENT_ANALYSIS",t.PROMPT="PROMPT",t.SEARCH_WEB="SEARCH_WEB",t))(Vs||{}),Bs=(t=>(t.MULTI_COLUMN="columns",t.COLUMN="column",t.BINDABLE_TEXT="prompt",t))(Bs||{}),Us=(t=>(t.CLOUD="cloud",t.SELF="self",t))(Us||{}),Hs=(t=>(t.USER_CREATED="user:created",t.USER_UPDATED="user:updated",t.USER_DELETED="user:deleted",t.USER_ONBOARDING_COMPLETE="user:onboarding:complete",t.USER_PERMISSION_ADMIN_ASSIGNED="user:admin:assigned",t.USER_PERMISSION_ADMIN_REMOVED="user:admin:removed",t.USER_PERMISSION_BUILDER_ASSIGNED="user:builder:assigned",t.USER_PERMISSION_BUILDER_REMOVED="user:builder:removed",t.USER_INVITED="user:invited",t.USER_INVITED_ACCEPTED="user:invite:accepted",t.USER_PASSWORD_FORCE_RESET="user:password:force:reset",t.USER_PASSWORD_UPDATED="user:password:updated",t.USER_PASSWORD_RESET_REQUESTED="user:password:reset:requested",t.USER_PASSWORD_RESET="user:password:reset",t.USER_DATA_COLLABORATION="user:data:collaboration",t.EMAIL_SMTP_CREATED="email:smtp:created",t.EMAIL_SMTP_UPDATED="email:smtp:updated",t.AI_CONFIG_CREATED="ai:config:created",t.AI_CONFIG_UPDATED="ai:config:updated",t.AUTH_SSO_CREATED="auth:sso:created",t.AUTH_SSO_UPDATED="auth:sso:updated",t.AUTH_SSO_ACTIVATED="auth:sso:activated",t.AUTH_SSO_DEACTIVATED="auth:sso:deactivated",t.AUTH_LOGIN="auth:login",t.AUTH_LOGOUT="auth:logout",t.ORG_NAME_UPDATED="org:info:name:updated",t.ORG_LOGO_UPDATED="org:info:logo:updated",t.ORG_PLATFORM_URL_UPDATED="org:platformurl:updated",t.INSTALLATION_VERSION_CHECKED="installation:version:checked",t.INSTALLATION_VERSION_UPGRADED="installation:version:upgraded",t.INSTALLATION_VERSION_DOWNGRADED="installation:version:downgraded",t.INSTALLATION_FIRST_STARTUP="installation:firstStartup",t.ANALYTICS_OPT_OUT="analytics:opt:out",t.ANALYTICS_OPT_IN="analytics:opt:in",t.APP_CREATED="app:created",t.APP_UPDATED="app:updated",t.APP_DELETED="app:deleted",t.APP_DUPLICATED="app:duplicated",t.APP_PUBLISHED="app:published",t.APP_UNPUBLISHED="app:unpublished",t.APP_TEMPLATE_IMPORTED="app:template:imported",t.APP_FILE_IMPORTED="app:file:imported",t.APP_VERSION_UPDATED="app:version:updated",t.APP_VERSION_REVERTED="app:version:reverted",t.APP_REVERTED="app:reverted",t.APP_EXPORTED="app:exported",t.ROLE_CREATED="role:created",t.ROLE_UPDATED="role:updated",t.ROLE_DELETED="role:deleted",t.ROLE_ASSIGNED="role:assigned",t.ROLE_UNASSIGNED="role:unassigned",t.SERVED_BUILDER="served:builder",t.SERVED_APP="served:app",t.SERVED_APP_PREVIEW="served:app:preview",t.DATASOURCE_CREATED="datasource:created",t.DATASOURCE_UPDATED="datasource:updated",t.DATASOURCE_DELETED="datasource:deleted",t.QUERY_CREATED="query:created",t.QUERY_UPDATED="query:updated",t.QUERY_DELETED="query:deleted",t.QUERY_IMPORT="query:import",t.QUERIES_RUN="queries:run",t.QUERY_PREVIEWED="query:previewed",t.TABLE_CREATED="table:created",t.TABLE_UPDATED="table:updated",t.TABLE_DELETED="table:deleted",t.TABLE_EXPORTED="table:exported",t.TABLE_IMPORTED="table:imported",t.TABLE_DATA_IMPORTED="table:data:imported",t.VIEW_CREATED="view:created",t.VIEW_UPDATED="view:updated",t.VIEW_DELETED="view:deleted",t.VIEW_EXPORTED="view:exported",t.VIEW_FILTER_CREATED="view:filter:created",t.VIEW_FILTER_UPDATED="view:filter:updated",t.VIEW_FILTER_DELETED="view:filter:deleted",t.VIEW_CALCULATION_CREATED="view:calculation:created",t.VIEW_CALCULATION_UPDATED="view:calculation:updated",t.VIEW_CALCULATION_DELETED="view:calculation:deleted",t.ROWS_CREATED="rows:created",t.ROWS_IMPORTED="rows:imported",t.COMPONENT_CREATED="component:created",t.COMPONENT_DELETED="component:deleted",t.SCREEN_CREATED="screen:created",t.SCREEN_DELETED="screen:deleted",t.LAYOUT_CREATED="layout:created",t.LAYOUT_DELETED="layout:deleted",t.AUTOMATION_CREATED="automation:created",t.AUTOMATION_DELETED="automation:deleted",t.AUTOMATION_TESTED="automation:tested",t.AUTOMATIONS_RUN="automations:run",t.AUTOMATION_STEP_CREATED="automation:step:created",t.AUTOMATION_STEP_DELETED="automation:step:deleted",t.AUTOMATION_TRIGGER_UPDATED="automation:trigger:updated",t.LICENSE_PLAN_CHANGED="license:plan:changed",t.LICENSE_ACTIVATED="license:activated",t.LICENSE_PAYMENT_FAILED="license:payment:failed",t.LICENSE_PAYMENT_RECOVERED="license:payment:recovered",t.LICENSE_CHECKOUT_OPENED="license:checkout:opened",t.LICENSE_CHECKOUT_SUCCESS="license:checkout:success",t.LICENSE_PORTAL_OPENED="license:portal:opened",t.ACCOUNT_CREATED="account:created",t.ACCOUNT_DELETED="account:deleted",t.ACCOUNT_VERIFIED="account:verified",t.APP_BACKFILL_SUCCEEDED="app:backfill:succeeded",t.APP_BACKFILL_FAILED="app:backfill:failed",t.TENANT_BACKFILL_SUCCEEDED="tenant:backfill:succeeded",t.TENANT_BACKFILL_FAILED="tenant:backfill:failed",t.INSTALLATION_BACKFILL_SUCCEEDED="installation:backfill:succeeded",t.INSTALLATION_BACKFILL_FAILED="installation:backfill:failed",t.USER_GROUP_CREATED="user_group:created",t.USER_GROUP_UPDATED="user_group:updated",t.USER_GROUP_DELETED="user_group:deleted",t.USER_GROUP_USERS_ADDED="user_group:user_added",t.USER_GROUP_USERS_REMOVED="user_group:users_deleted",t.USER_GROUP_PERMISSIONS_EDITED="user_group:permissions_edited",t.USER_GROUP_ONBOARDING="user_group:onboarding_added",t.PLUGIN_INIT="plugin:init",t.PLUGIN_IMPORTED="plugin:imported",t.PLUGIN_DELETED="plugin:deleted",t.APP_BACKUP_RESTORED="app:backup:restored",t.APP_BACKUP_TRIGGERED="app:backup:triggered",t.ENVIRONMENT_VARIABLE_CREATED="environment_variable:created",t.ENVIRONMENT_VARIABLE_DELETED="environment_variable:deleted",t.ENVIRONMENT_VARIABLE_UPGRADE_PANEL_OPENED="environment_variable:upgrade_panel_opened",t.AUDIT_LOGS_FILTERED="audit_log:filtered",t.AUDIT_LOGS_DOWNLOADED="audit_log:downloaded",t))(Hs||{}),zs=["user:created","user:updated","user:deleted","user:admin:assigned","user:admin:removed","user:builder:assigned","user:builder:removed","user_group:created","user_group:updated","user_group:deleted","user_group:user_added","user_group:users_deleted","user_group:permissions_edited"],c_=[...zs],d_={"user:created":'User "{{ email }}" created{{#if viaScim}} via SCIM{{/if}}',"user:updated":'User "{{ email }}" updated{{#if viaScim}} via SCIM{{/if}}',"user:deleted":'User "{{ email }}" deleted{{#if viaScim}} via SCIM{{/if}}',"user:admin:assigned":'User "{{ email }}" admin role assigned',"user:admin:removed":'User "{{ email }}" admin role removed',"user:builder:assigned":'User "{{ email }}" builder role assigned',"user:builder:removed":'User "{{ email }}" builder role removed',"user:invited":'User "{{ email }}" invited',"user:invite:accepted":'User "{{ email }}" accepted invite',"user:password:updated":'User "{{ email }}" password updated',"user:password:reset:requested":'User "{{ email }}" password reset requested',"user:password:reset":'User "{{ email }}" password reset',"user_group:created":'User group "{{ name }}" created{{#if viaScim}} via SCIM{{/if}}',"user_group:updated":'User group "{{ name }}" updated{{#if viaScim}} via SCIM{{/if}}',"user_group:deleted":'User group "{{ name }}" deleted{{#if viaScim}} via SCIM{{/if}}',"user_group:user_added":'User group "{{ name }}" {{ count }} users added{{#if viaScim}} via SCIM{{/if}}',"user_group:users_deleted":'User group "{{ name }}" {{ count }} users removed{{#if viaScim}} via SCIM{{/if}}',"user_group:permissions_edited":'User group "{{ name }}" permissions edited',"user:password:force:reset":void 0,"user_group:onboarding_added":void 0,"user:onboarding:complete":void 0,"user:data:collaboration":void 0,"email:smtp:created":"Email configuration created","email:smtp:updated":"Email configuration updated","ai:config:created":"AI configuration created","ai:config:updated":"AI configuration updated","auth:sso:created":"SSO configuration created","auth:sso:updated":"SSO configuration updated","auth:sso:activated":"SSO configuration activated","auth:sso:deactivated":"SSO configuration deactivated","auth:login":'User "{{ email }}" logged in',"auth:logout":'User "{{ email }}" logged out',"org:info:name:updated":"Organisation name updated","org:info:logo:updated":"Organisation logo updated","org:platformurl:updated":"Organisation platform URL updated","app:created":'App "{{ name }}" created',"app:updated":'App "{{ name }}" updated',"app:deleted":'App "{{ name }}" deleted',"app:duplicated":'App "{{ name }}" duplicated',"app:published":'App "{{ name }}" published',"app:unpublished":'App "{{ name }}" unpublished',"app:template:imported":'App "{{ name }}" template imported',"app:file:imported":'App "{{ name }}" file imported',"app:version:updated":'App "{{ name }}" version updated',"app:version:reverted":'App "{{ name }}" version reverted',"app:reverted":'App "{{ name }}" reverted',"app:exported":'App "{{ name }}" exported',"app:backup:restored":'App backup "{{ name }}" restored',"app:backup:triggered":'App backup "{{ name }}" triggered',"datasource:created":"Datasource created","datasource:updated":"Datasource updated","datasource:deleted":"Datasource deleted","query:created":"Query created","query:updated":"Query updated","query:deleted":"Query deleted","query:import":"Query import","queries:run":void 0,"query:previewed":void 0,"table:created":'Table "{{ name }}" created',"table:updated":'Table "{{ name }}" updated',"table:deleted":'Table "{{ name }}" deleted',"table:exported":'Table "{{ name }}" exported',"table:imported":'Table "{{ name }}" imported',"table:data:imported":"Data imported to table","rows:created":"Rows created","rows:imported":"Rows imported","automation:created":'Automation "{{ name }}" created',"automation:deleted":'Automation "{{ name }}" deleted',"automation:step:created":'Automation "{{ name }}" step added',"automation:step:deleted":'Automation "{{ name }}" step removed',"automation:tested":void 0,"automations:run":void 0,"automation:trigger:updated":void 0,"screen:created":'Screen "{{ name }}" created',"screen:deleted":'Screen "{{ name }}" deleted',"component:created":"Component created","component:deleted":"Component deleted","environment_variable:created":"Environment variable created","environment_variable:deleted":"Environment variable deleted","environment_variable:upgrade_panel_opened":void 0,"plugin:imported":"Plugin imported","plugin:deleted":"Plugin deleted","plugin:init":void 0,"role:created":void 0,"role:updated":void 0,"role:deleted":void 0,"role:assigned":void 0,"role:unassigned":void 0,"license:plan:changed":void 0,"license:activated":void 0,"license:payment:failed":void 0,"license:payment:recovered":void 0,"license:checkout:opened":void 0,"license:checkout:success":void 0,"license:portal:opened":void 0,"account:created":void 0,"account:deleted":void 0,"account:verified":void 0,"app:backfill:succeeded":void 0,"app:backfill:failed":void 0,"tenant:backfill:succeeded":void 0,"tenant:backfill:failed":void 0,"installation:backfill:succeeded":void 0,"installation:backfill:failed":void 0,"layout:created":void 0,"layout:deleted":void 0,"view:created":void 0,"view:updated":void 0,"view:deleted":void 0,"view:exported":void 0,"view:filter:created":void 0,"view:filter:updated":void 0,"view:filter:deleted":void 0,"view:calculation:created":void 0,"view:calculation:updated":void 0,"view:calculation:deleted":void 0,"served:builder":void 0,"served:app":void 0,"served:app:preview":void 0,"analytics:opt:out":void 0,"analytics:opt:in":void 0,"installation:version:checked":void 0,"installation:version:upgraded":void 0,"installation:version:downgraded":void 0,"installation:firstStartup":void 0,"audit_log:filtered":void 0,"audit_log:downloaded":void 0},js=(t=>(t.TENANT="tenant",t.INSTALLATION="installation",t))(js||{}),qs=(t=>(t.USER="user",t.TENANT="tenant",t.INSTALLATION="installation",t))(qs||{}),Ws=(t=>(t.FREE="free",t.PRO="pro",t.TEAM="team",t.PREMIUM="premium",t.PREMIUM_PLUS="premium_plus",t.PREMIUM_PLUS_TRIAL="premium_plus_trial",t.BUSINESS="business",t.ENTERPRISE_BASIC="enterprise_basic",t.ENTERPRISE_BASIC_TRIAL="enterprise_basic_trial",t.ENTERPRISE="enterprise",t))(Ws||{}),Gs=(t=>(t.MONTHLY="monthly",t.YEARLY="yearly",t))(Gs||{}),Ys=(t=>(t.PER_USER="perUser",t.PER_CREATOR_PER_USER="per_creator_per_user",t.DAY_PASS="dayPass",t))(Ys||{}),Ks=(t=>(t.STATIC="static",t.MONTHLY="monthly",t))(Ks||{}),Xs=(t=>(t.USAGE="usage",t.CONSTANT="constant",t))(Xs||{}),Qs=(t=>(t.ROWS="rows",t.APPS="apps",t.USERS="users",t.CREATORS="creators",t.USER_GROUPS="userGroups",t.PLUGINS="plugins",t.AI_CUSTOM_CONFIGS="aiCustomConfigs",t))(Qs||{}),Zs=(t=>(t.QUERIES="queries",t.AUTOMATIONS="automations",t.DAY_PASSES="dayPasses",t.BUDIBASE_AI_CREDITS="budibaseAICredits",t))(Zs||{}),Js=(t=>(t.AUTOMATION_LOG_RETENTION_DAYS="automationLogRetentionDays",t.APP_BACKUPS_RETENTION_DAYS="appBackupRetentionDays",t))(Js||{}),h_=(t,e,n)=>t==="usage"&&e==="static",g_=(t,e,n)=>t==="usage"&&e==="monthly",m_=(t,e)=>t==="constant",xs=(t=>(t.USER_GROUPS="userGroups",t.APP_BACKUPS="appBackups",t.ENVIRONMENT_VARIABLES="environmentVariables",t.AUDIT_LOGS="auditLogs",t.ENFORCEABLE_SSO="enforceableSSO",t.BRANDING="branding",t.SCIM="scim",t.SYNC_AUTOMATIONS="syncAutomations",t.TRIGGER_AUTOMATION_RUN="triggerAutomationRun",t.APP_BUILDERS="appBuilders",t.OFFLINE="offline",t.EXPANDED_PUBLIC_API="expandedPublicApi",t.VIEW_PERMISSIONS="viewPermissions",t.VIEW_READONLY_COLUMNS="viewReadonlyColumns",t.BUDIBASE_AI="budibaseAI",t.AI_CUSTOM_CONFIGS="aiCustomConfigs",t))(xs||{}),$s=(t=>(t.GLOBAL="global",t.APP="app",t.INSTALLATION="installation",t))($s||{}),eu=(t=>(t.USER_EMAIL_VIEW_CASING="user_email_view_casing",t.APP_URLS="app_urls",t.EVENT_APP_BACKFILL="event_app_backfill",t.EVENT_GLOBAL_BACKFILL="event_global_backfill",t.EVENT_INSTALLATION_BACKFILL="event_installation_backfill",t.GLOBAL_INFO_SYNC_USERS="global_info_sync_users",t.TABLE_SETTINGS_LINKS_TO_ACTIONS="table_settings_links_to_actions",t.SYNC_QUOTAS="sync_quotas_2",t))(eu||{}),__="--secret-value--",tu=(t=>(t.CREATE="CREATE",t.READ="READ",t.UPDATE="UPDATE",t.DELETE="DELETE",t.COUNT="COUNT",t.BULK_CREATE="BULK_CREATE",t.BULK_UPSERT="BULK_UPSERT",t.CREATE_TABLE="CREATE_TABLE",t.UPDATE_TABLE="UPDATE_TABLE",t.DELETE_TABLE="DELETE_TABLE",t))(tu||{}),p_=["CREATE","READ","UPDATE","DELETE","BULK_CREATE","BULK_UPSERT"],nu=(t=>(t.SQL="sql",t.JSON="json",t.FIELDS="fields",t))(nu||{}),iu=(t=>(t.STRING="string",t.CODE="code",t.LONGFORM="longForm",t.BOOLEAN="boolean",t.NUMBER="number",t.PASSWORD="password",t.LIST="list",t.OBJECT="object",t.JSON="json",t.FILE="file",t.FIELD_GROUP="fieldGroup",t.SELECT="select",t))(iu||{}),lu=(t=>(t.POSTGRES="POSTGRES",t.DYNAMODB="DYNAMODB",t.MONGODB="MONGODB",t.ELASTICSEARCH="ELASTICSEARCH",t.COUCHDB="COUCHDB",t.SQL_SERVER="SQL_SERVER",t.S3="S3",t.AIRTABLE="AIRTABLE",t.MYSQL="MYSQL",t.ARANGODB="ARANGODB",t.REST="REST",t.ORACLE="ORACLE",t.GOOGLE_SHEETS="GOOGLE_SHEETS",t.FIRESTORE="FIRESTORE",t.REDIS="REDIS",t.SNOWFLAKE="SNOWFLAKE",t.BUDIBASE="BUDIBASE",t))(lu||{}),ru=(t=>(t[t.INCLUDE=1]="INCLUDE",t[t.EXCLUDE=0]="EXCLUDE",t))(ru||{}),ou=(t=>(t.STRING="string",t.FUZZY="fuzzy",t.RANGE="range",t.EQUAL="equal",t.NOT_EQUAL="notEqual",t.EMPTY="empty",t.NOT_EMPTY="notEmpty",t.ONE_OF="oneOf",t))(ou||{}),su=(t=>(t.CONNECTION_CHECKING="connection",t.FETCH_TABLE_NAMES="fetch_table_names",t.EXPORT_SCHEMA="export_schema",t))(su||{}),uu=(t=>(t.CREATE="create",t.READ="read",t.UPDATE="update",t.DELETE="delete",t))(uu||{}),au=(t=>(t.EQUAL="equal",t.NOT_EQUAL="notEqual",t.EMPTY="empty",t.NOT_EMPTY="notEmpty",t.FUZZY="fuzzy",t.STRING="string",t))(au||{}),fu=(t=>(t.CONTAINS="contains",t.NOT_CONTAINS="notContains",t.CONTAINS_ANY="containsAny",t.ONE_OF="oneOf",t))(fu||{}),cu=(t=>(t.RANGE="range",t))(cu||{}),du=(t=>(t.AND="$and",t.OR="$or",t))(du||{});function b_(t){return t==="$and"||t==="$or"}var hu=(t=>(t.COMPLEX_ID_OPERATOR="_complexIdOperator",t))(hu||{}),gu=(t=>(t.RETURN_ALL="all",t.RETURN_NONE="none",t))(gu||{}),mu=(t=>(t.ALL="all",t.ANY="any",t))(mu||{}),_u=(t=>(t.MS_SQL="mssql",t.POSTGRES="pg",t.MY_SQL="mysql2",t.MARIADB="mariadb",t.ORACLE="oracledb",t.SQL_LITE="sqlite3",t))(_u||{}),pu=(t=>(t.API_KEY="api_key",t.COOKIE="cookie",t))(pu||{}),bu=(t=>(t.TRY_ONCE="try_once",t.TRY_TWICE="try_twice",t.DEFAULT="default",t.DELAY_500="delay_500",t.CUSTOM="custom",t.AUTO_EXTEND="auto_extend",t))(bu||{}),wu=(t=>(t.MIGRATIONS="migrations",t.TRIGGER_QUOTA="trigger_quota",t.SYNC_ACCOUNT_LICENSE="sync_account_license",t.UPDATE_TENANTS_DOC="update_tenants_doc",t.PERSIST_WRITETHROUGH="persist_writethrough",t.QUOTA_USAGE_EVENT="quota_usage_event",t.APP_MIGRATION="app_migrations",t.PROCESS_USER_INVITE="process_user_invite",t))(wu||{}),ku=(t=>(t.ROWS="rows",t.AUDIT="audit",t.USER="user",t))(ku||{}),yu=(t=>(t.ASCENDING="asc",t.DESCENDING="desc",t))(yu||{}),w_=t=>typeof t=="object"&&t._id&&t._rev,Eu=(t=>(t.USER="user",t.HEADER="header",t.QUERY="query",t.SUBDOMAIN="subdomain",t.PATH="path",t))(Eu||{}),vu=(t=>(t.PER_CREATOR_PER_USER_PRICE="PER_CREATOR_PER_USER_PRICE",t.PER_CREATOR_PER_USER_PRICE_ALERT="PER_CREATOR_PER_USER_PRICE_ALERT",t.AUTOMATION_BRANCHING="AUTOMATION_BRANCHING",t.SQS="SQS",t.AI_CUSTOM_CONFIGS="AI_CUSTOM_CONFIGS",t.DEFAULT_VALUES="DEFAULT_VALUES",t.ENRICHED_RELATIONSHIPS="ENRICHED_RELATIONSHIPS",t.TABLES_DEFAULT_ADMIN="TABLES_DEFAULT_ADMIN",t.BUDIBASE_AI="BUDIBASE_AI",t))(vu||{}),Su=(t=>(t.PRODUCTION="production",t.DEVELOPMENT="development",t))(Su||{}),Cu=(t=>(t.BACKUPS="backups",t.HOSTING="hosting",t.ANALYTICS="analytics",t.HELP="help",t.PLUGIN="plugins",t))(Cu||{}),Au=(t=>(t.QUICK="quick",t.DIGITAL_OCEAN="do",t))(Au||{}),k_={OptOut:"analytics:opt:out",OptIn:"analytics:opt:in",SelfHostInit:"hosting:init",PluginInit:"plugin:init"},Tu=(t=>(t.READ="read",t.WRITE="write",t.EXECUTE="execute",t.ADMIN="admin",t))(Tu||{}),Iu=(t=>(t.APP="app",t.TABLE="table",t.USER="user",t.AUTOMATION="automation",t.WEBHOOK="webhook",t.BUILDER="builder",t.CREATOR="creator",t.GLOBAL_BUILDER="globalBuilder",t.QUERY="query",t.VIEW="view",t.LEGACY_VIEW="legacy_view",t))(Iu||{}),Du=(t=>(t.EXPLICIT="EXPLICIT",t.INHERITED="INHERITED",t.BASE="BASE",t))(Du||{}),Ou=(t=>(t.CSV="csv",t.JSON="json",t.JSON_WITH_SCHEMA="jsonWithSchema",t))(Ou||{}),y_=t=>t.authType==="password",E_=t=>t.authType==="password"&&t.hosting==="self",v_=t=>t.hosting==="cloud",S_=t=>t.hosting==="self",C_=t=>t.authType==="sso",Ru=(t=>(t.GOOGLE="google",t.MICROSOFT="microsoft",t))(Ru||{}),Pu=(t=>(t.GOOGLE="google",t.MICROSOFT="microsoft",t))(Pu||{}),A_=["microsoft"];function T_(t){return A_.includes(t)}var Mu=(t=>(t.SSO="sso",t.PASSWORD="password",t))(Mu||{}),Nu=(t=>(t.OBJECT="object",t.STRING="string",t.BOOLEAN="boolean",t.NUMBER="number",t.ARRAY="array",t.JSON="json",t.DATE="date",t.ATTACHMENT="attachment",t))(Nu||{}),Lu=(t=>(t.TABLE="table",t.ROW="row",t.ROWS="rows",t.WIDE="wide",t.QUERY="query",t.QUERY_PARAMS="queryParams",t.QUERY_LIMIT="queryLimit",t.LOOP_OPTION="loopOption",t.ITEM="item",t.CODE="code",t.FILTERS="filters",t.COLUMN="column",t.TRIGGER_SCHEMA="triggerSchema",t.CRON="cron",t.WEBHOOK_URL="webhookUrl",t.AUTOMATION="automation",t.AUTOMATION_FIELDS="automationFields",t.MULTI_ATTACHMENTS="multi_attachments",t.TRIGGER_FILTER="trigger_filter",t))(Lu||{}),wo=(t=>(t.ROW_SAVED="ROW_SAVED",t.ROW_UPDATED="ROW_UPDATED",t.ROW_DELETED="ROW_DELETED",t.WEBHOOK="WEBHOOK",t.APP="APP",t.CRON="CRON",t.ROW_ACTION="ROW_ACTION",t))(wo||{}),Fu=(t=>(t.LOGIC="LOGIC",t.ACTION="ACTION",t.TRIGGER="TRIGGER",t))(Fu||{}),ko=(t=>(t.SEND_EMAIL_SMTP="SEND_EMAIL_SMTP",t.CREATE_ROW="CREATE_ROW",t.UPDATE_ROW="UPDATE_ROW",t.DELETE_ROW="DELETE_ROW",t.EXECUTE_BASH="EXECUTE_BASH",t.OUTGOING_WEBHOOK="OUTGOING_WEBHOOK",t.EXECUTE_SCRIPT="EXECUTE_SCRIPT",t.EXECUTE_QUERY="EXECUTE_QUERY",t.SERVER_LOG="SERVER_LOG",t.DELAY="DELAY",t.FILTER="FILTER",t.QUERY_ROWS="QUERY_ROWS",t.LOOP="LOOP",t.COLLECT="COLLECT",t.OPENAI="OPENAI",t.TRIGGER_AUTOMATION_RUN="TRIGGER_AUTOMATION_RUN",t.BRANCH="BRANCH",t.discord="discord",t.slack="slack",t.zapier="zapier",t.integromat="integromat",t.n8n="n8n",t))(ko||{}),I_=[...Object.values(ko),...Object.values(wo)],Vu=(t=>(t.LOOPING="LOOPING",t))(Vu||{}),Bu=(t=>(t.NO_ITERATIONS="no_iterations",t))(Bu||{}),Uu=(t=>(t.SUCCESS="success",t.ERROR="error",t.STOPPED="stopped",t.STOPPED_ERROR="stopped_error",t.NO_CONDITION_MET="No branch condition met",t))(Uu||{}),Hu=(t=>(t.TRIGGER_FILTER_NOT_MET="Automation did not run. Filter conditions in trigger were not met.",t))(Hu||{}),zu=(t=>(t.ROW_SAVE="row:save",t.ROW_UPDATE="row:update",t.ROW_DELETE="row:delete",t.APP_TRIGGER="app:trigger",t.CRON_TRIGGER="cron:trigger",t.WEBHOOK_TRIGGER="web:trigger",t.ROW_ACTION="row:action",t))(zu||{}),ju=(t=>(t.ARRAY="Array",t.STRING="String",t))(ju||{}),qu=(t=>(t.BASIC="basic",t.BEARER="bearer",t))(qu||{}),Wu=(t=>(t.NONE="none",t.FORM_DATA="form",t.XML="xml",t.ENCODED="encoded",t.JSON="json",t.TEXT="text",t))(Wu||{}),Gu=(t=>(t.GET="GET",t.POST="POST",t.PATCH="PATCH",t.PUT="PUT",t.HEAD="HEAD",t.DELETE="DELETE",t))(Gu||{}),D_="bb_internal",Yu=(t=>(t.EXTERNAL="external",t.INTERNAL="internal",t))(Yu||{}),Ku=(t=>(t.STRING="string",t.LONGFORM="longform",t.OPTIONS="options",t.NUMBER="number",t.BOOLEAN="boolean",t.ARRAY="array",t.DATETIME="datetime",t.ATTACHMENTS="attachment",t.ATTACHMENT_SINGLE="attachment_single",t.LINK="link",t.FORMULA="formula",t.AUTO="auto",t.AI="ai",t.JSON="json",t.INTERNAL="internal",t.BARCODEQR="barcodeqr",t.SIGNATURE_SINGLE="signature_single",t.BIGINT="bigint",t.BB_REFERENCE="bb_reference",t.BB_REFERENCE_SINGLE="bb_reference_single",t))(Ku||{}),O_=["attachment_single","attachment","bb_reference","json","array"],Xu=["number","bigint"];function R_(t){return Xu.includes(t)}var Qu=["string","longform","options","number","boolean","datetime","bigint"];function P_(t){return Qu.includes(t)}var Zu=(t=>(t.ONE_TO_MANY="one-to-many",t.MANY_TO_ONE="many-to-one",t.MANY_TO_MANY="many-to-many",t))(Zu||{}),Ju=(t=>(t.FOREIGN_KEY="foreign_key",t))(Ju||{}),xu=(t=>(t.CREATED_BY="createdBy",t.CREATED_AT="createdAt",t.UPDATED_BY="updatedBy",t.UPDATED_AT="updatedAt",t.AUTO_ID="autoID",t))(xu||{}),$u=(t=>(t.ARRAY="array",t))($u||{}),ea=(t=>(t.STATIC="static",t.DYNAMIC="dynamic",t.AI="ai",t))(ea||{}),ta=(t=>(t.USER="user",t.USERS="users",t))(ta||{});function M_(t){return t.type==="link"}function N_(t){return t.relationshipType==="many-to-many"}function L_(t){return t.relationshipType==="one-to-many"}function F_(t){return t.relationshipType==="many-to-one"}var na=(t=>(t.SUM="sum",t.AVG="avg",t.COUNT="count",t.MIN="min",t.MAX="max",t))(na||{}),ia=(t=>(t.CALCULATION="calculation",t))(ia||{}),la=(t=>(t.SUM="sum",t.COUNT="count",t.STATISTICS="stats",t))(la||{}),br="_",V_="",B_=t=>`${t}${br}`,yo=(t=>(t.USER="us",t.GROUP="gr",t.WORKSPACE="workspace",t.CONFIG="config",t.TEMPLATE="template",t.APP="app",t.DEV="dev",t.APP_DEV="app_dev",t.APP_METADATA="app_metadata",t.ROLE="role",t.MIGRATIONS="migrations",t.DEV_INFO="devinfo",t.AUTOMATION_LOG="log_au",t.ACCOUNT_METADATA="acc_metadata",t.PLUGIN="plg",t.DATASOURCE="datasource",t.DATASOURCE_PLUS="datasource_plus",t.APP_BACKUP="backup",t.TABLE="ta",t.ROW="ro",t.AUTOMATION="au",t.LINK="li",t.WEBHOOK="wh",t.INSTANCE="inst",t.LAYOUT="layout",t.SCREEN="screen",t.QUERY="query",t.DEPLOYMENTS="deployments",t.METADATA="metadata",t.MEM_VIEW="view",t.USER_FLAG="flag",t.AUTOMATION_METADATA="meta_au",t.AUDIT_LOG="al",t.APP_MIGRATION_METADATA="_design/migrations",t.SCIM_LOG="scimlog",t.ROW_ACTIONS="ra",t))(yo||{}),U_=Object.values(yo).sort((t,e)=>e.length-t.length);function H_(t){return U_.find(e=>t.startsWith(`${e}${br}`))}var z_=["role","datasource","datasource_plus","ta","au","wh","screen","query","metadata","view","inst","layout"],ra=(t=>(t.USER_METADATA="ta_users",t))(ra||{}),Eo=(t=>(t.VIEW="view",t.ROW_ACTION="row_action",t))(Eo||{}),j_=Object.values(Eo).sort((t,e)=>e.length-t.length);function q_(t){return j_.find(e=>t.startsWith(`${e}${br}`))}var oa=(t=>(t.BACKUP="backup",t.RESTORE="restore",t))(oa||{}),sa=(t=>(t.STARTED="started",t.PENDING="pending",t.COMPLETE="complete",t.FAILED="failed",t))(sa||{}),ua=(t=>(t.PUBLISH="publish",t.MANUAL="manual",t.SCHEDULED="scheduled",t.RESTORING="restoring",t))(ua||{}),aa=(t=>(t.AUTOMATION="automation",t))(aa||{}),fa=(t=>(t.REAL="REAL",t.TEXT="VARCHAR",t.INT="INTEGER",t.BLOB="BLOB",t.NUMERIC="NUMERIC",t))(fa||{}),W_=t=>t.type==="settings",G_=t=>t.type==="smtp",Y_=t=>t.type==="google",K_=t=>t.type==="oidc",X_=t=>t.type==="scim",Q_=t=>t.type==="ai",ca=(t=>(t.SETTINGS="settings",t.ACCOUNT="account",t.SMTP="smtp",t.GOOGLE="google",t.OIDC="oidc",t.OIDC_LOGOS="logos_oidc",t.SCIM="scim",t.AI="ai",t))(ca||{}),da=(t=>(t.OIDC="oidc",t.GOOGLE="google",t))(da||{});function Z_(t){return!!t.providerType}var ha=(t=>(t.ACTIVE="active",t.INACTIVE="inactive",t))(ha||{});function J_(t){return!!t.roles}var vo=(t=>(t.DATASOURCE="datasource",t.COMPONENT="component",t.AUTOMATION="automation",t))(vo||{}),ga=(t=>(t.NPM="NPM",t.GITHUB="Github",t.URL="URL",t.FILE="File Upload",t))(ga||{}),x_=Object.values(vo),ma=(t=>(t.ROW_QUERIES="rowQueries",t.DATASOURCE_QUERIES="datasourceQueries",t.AUTOMATIONS="automations",t))(ma||{}),$_=["rows","queries","automations"],ep=["queries","automations"],_a=(t=>(t.APP_BACKUP="app_backup",t))(_a||{}),pa=(t=>(t.DAILY="daily",t.WEEKLY="weekly",t.MONTHLY="monthly",t))(pa||{}),tp=(t,e)=>t==="app_backup",np="SYSTEM",ip="auditLog",ba=(t=>(t.BUILDER="builder",t.APP="app",t))(ba||{}),wa=(t=>(t.DELETED="deleted",t))(wa||{}),ka=(t=>(t.ENVIRONMENT_VARIABLE_UPGRADE_PANEL_OPENED="environment_variable_upgrade_panel_opened",t))(ka||{}),ya=(t=>(t.ASCENDING="ascending",t.DESCENDING="descending",t))(ya||{}),Ea=(t=>(t.STRING="string",t.NUMBER="number",t))(Ea||{}),va=(t=>(t.WORKER="worker",t.APPS="apps",t))(va||{}),Sa=(t=>(t.SQS_MISSING="sqs_missing",t))(Sa||{});function lp(t){let e;const n=t[30].default,i=Ut(n,t,t[31],null);return{c(){i&&i.c()},m(l,r){i&&i.m(l,r),e=!0},p(l,r){i&&i.p&&(!e||r[1]&1)&&zt(i,n,l,l[31],e?Ht(n,l[31],r,null):jt(l[31]),null)},i(l){e||(U(i,l),e=!0)},o(l){Z(i,l),e=!1},d(l){i&&i.d(l)}}}function rp(t){let e,n;return e=new t[8]({props:{actions:t[9],data:t[2],$$slots:{default:[op]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&4&&(r.data=i[2]),l[1]&1&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function op(t){let e;const n=t[30].default,i=Ut(n,t,t[31],null);return{c(){i&&i.c()},m(l,r){i&&i.m(l,r),e=!0},p(l,r){i&&i.p&&(!e||r[1]&1)&&zt(i,n,l,l[31],e?Ht(n,l[31],r,null):jt(l[31]),null)},i(l){e||(U(i,l),e=!0)},o(l){Z(i,l),e=!1},d(l){i&&i.d(l)}}}function sp(t){let e,n,i,l;const r=[rp,lp],o=[];function u(s,a){return s[0]?0:1}return e=u(t),n=o[e]=r[e](t),{c(){n.c(),i=Fe()},m(s,a){o[e].m(s,a),A(s,i,a),l=!0},p(s,a){let f=e;e=u(s),e===f?o[e].p(s,a):(He(),Z(o[f],1,1,()=>{o[f]=null}),ze(),n=o[e],n?n.p(s,a):(n=o[e]=r[e](s),n.c()),U(n,1),n.m(i.parentNode,i))},i(s){l||(U(n),l=!0)},o(s){Z(n),l=!1},d(s){s&&C(i),o[e].d(s)}}}function up(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}function So(t){if(t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(So);const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=So(t[n]));return e}function Ca(t,e){if(!t||!e)return;const n=Array.isArray(e)?e:e.split(".");let i=t;for(const l of n){if(i==null)return;i=i[l]}return i}function Aa(t,e,n){if(!t||!e)return;const i=Array.isArray(e)?e:e.split(".");let l=t;for(let r=0;r<i.length-1;r++){const o=i[r];(!l[o]||typeof l[o]!="object")&&(l[o]={}),l=l[o]}l[i[i.length-1]]=n}function ap(t,e,n){let i,l,r,o,u,s,a,f,c=ue,g=()=>(c(),c=ft(s,ce=>n(24,f=ce)),s),h,d=ue,_=()=>(d(),d=ft(R,ce=>n(25,h=ce)),R),b,w=ue,E=()=>(w(),w=ft(u,ce=>n(26,b=ce)),u),k,I=ue,O=()=>(I(),I=ft(r,ce=>n(27,k=ce)),r),D,N=ue,M=()=>(N(),N=ft(i,ce=>n(28,D=ce)),i),V,W=ue,ne=()=>(W(),W=ft(l,ce=>n(29,V=ce)),l);t.$$.on_destroy.push(()=>c()),t.$$.on_destroy.push(()=>d()),t.$$.on_destroy.push(()=>w()),t.$$.on_destroy.push(()=>I()),t.$$.on_destroy.push(()=>N()),t.$$.on_destroy.push(()=>W());let{$$slots:H={},$$scope:$}=e;const Y=le.createEventDispatcher();let{dataSource:G=void 0}=e,{disabled:oe=!1}=e,{readonly:ie=!1}=e,{initialValues:J=void 0}=e,{size:q=void 0}=e,{schema:j=void 0}=e,{definition:K=void 0}=e,{disableSchemaValidation:x=!1}=e,{editAutoColumns:X=!1}=e,{provideContext:F=!0}=e,{currentStep:R}=e;_();let{formValue:z={}}=e;const{Provider:me,ActionTypes:se,createValidatorFromConstraints:Oe}=le.getContext("sdk");let be=[];const Ie=ii({values:{},errors:{},valid:!0,dirty:!1,currentStep:qt(R)});let{form:ve}=e;const fe=(ce,re)=>pr(ce,Ae=>Ae.reduce((Ue,Je)=>({...Ue,[Je.name]:re(Je)}),{})),Ne=(ce,re)=>pr(ce,Ae=>Ae.some(Ue=>{const Je=Ca(re,Ue.name)??Ue.fieldState.defaultValue;return Ue.fieldState.value!==Je})),te=ce=>pr(ce,re=>{const Ae={};return re.forEach(Ue=>{if(Ue.type==="attachment"){const Je=Ue.fieldState.value;let lt=null;Array.isArray(Je)&&Je[0]!=null&&(lt=Je[0].url),Ae[`${Ue.name}_first`]=lt}}),Ae}),ae=(ce,re,Ae)=>{let Ue=So(ce||{});return Object.entries(re||{}).map(([lt,he])=>{var ot;const it=de(lt);return{key:lt,value:he,lastUpdate:((ot=qt(it).fieldState)==null?void 0:ot.lastUpdate)||0}}).sort((lt,he)=>lt.lastUpdate-he.lastUpdate).forEach(({key:lt,value:he})=>{Aa(Ue,lt,he)}),Object.entries(Ae||{}).forEach(([lt,he])=>{Aa(Ue,lt,he)}),Ue},de=ce=>be.find(re=>qt(re).name===ce),Xe=(ce,re,Ae)=>{var Ue;if(Array.isArray(ce)&&Ae==="array"&&re){const Je=((Ue=re==null?void 0:re.constraints)==null?void 0:Ue.inclusion)||[];return ce.map(lt=>String(lt)).filter(lt=>Je.includes(lt))}return ce},Te={registerField:(ce,re,Ae=null,Ue=!1,Je=!1,lt,he=1)=>{var st,we,xe;if(!ce)return;const it=x?null:(st=j==null?void 0:j[ce])==null?void 0:st.constraints,ot=Oe(it,lt,ce,K);Ae=Xe(Ae,j==null?void 0:j[ce],re);let wt=Ca(J,ce)??Ae,Ct=null,ln=`id-${up()}`;const It=de(ce);if(It){const{fieldState:pe}=qt(It);ln=pe.fieldId,pe.value!=null&&pe.value!==""&&(wt=pe.value),pe.error&&(Ct=ot==null?void 0:ot(wt))}const xt=!!((we=j==null?void 0:j[ce])!=null&&we.autocolumn),_e=ii({name:ce,type:re,step:he||1,fieldState:{fieldId:ln,value:wt,error:Ct,disabled:oe||Ue||xt&&!X,readonly:ie||Je||((xe=j==null?void 0:j[ce])==null?void 0:xe.readonly),fieldDisabled:Ue,fieldReadOnly:Je,defaultValue:Ae,validator:ot,lastUpdate:Date.now()},fieldApi:Se(ce),fieldSchema:(j==null?void 0:j[ce])??{}});if(It){const pe=be.filter(_t=>qt(_t).name!==ce);n(22,be=[...pe,_e])}else n(22,be=[...be,_e]);return _e},validate:()=>{const ce=be.filter(Ue=>qt(Ue).step===qt(R));let re=!0,Ae=!1;return ce.forEach(Ue=>{const Je=qt(Ue).fieldApi.validate();re=re&&Je,!re&&!Ae&&(rt({field:qt(Ue)}),Ae=!0)}),re},reset:()=>{be.forEach(ce=>{qt(ce).fieldApi.reset()}),Y("reset")},changeStep:({type:ce,number:re})=>{ce==="next"?R.update(Ae=>Ae+1):ce==="prev"?R.update(Ae=>Math.max(1,Ae-1)):ce==="first"?R.set(1):ce==="specific"&&re&&!isNaN(re)&&R.set(parseInt(re))},setStep:ce=>{ce&&R.set(ce)},setFieldValue:(ce,re)=>{const Ae=de(ce);if(!Ae)return;const{fieldApi:Ue}=qt(Ae);Ue.setValue(re)},resetField:ce=>{const re=de(ce);if(!re)return;const{fieldApi:Ae}=qt(re);Ae.reset()}},Se=ce=>{const re=(he,it=!1)=>{const ot=de(ce),{fieldState:wt}=qt(ot),{validator:Ct}=wt;if(!it&&wt.value===he)return!1;const ln=Ct==null?void 0:Ct(he);return ot.update(It=>(It.fieldState.value=he,It.fieldState.error=ln,It.fieldState.lastUpdate=Date.now(),It)),Y("change",{field:ce,value:he}),!0};return{setValue:re,reset:()=>{const he=de(ce),{fieldState:it}=qt(he),ot=it.defaultValue;he.update(wt=>(wt.fieldState.value=ot,wt.fieldState.error=null,wt.fieldState.lastUpdate=Date.now(),wt))},setDisabled:he=>{de(ce).update(ot=>{var Ct;ot.fieldState.fieldDisabled=he;const wt=!!((Ct=j==null?void 0:j[ot.name])!=null&&Ct.autocolumn);return ot.fieldState.disabled=oe||he||wt&&!X,ot})},setReadOnly:he=>{de(ce).update(ot=>{var wt;return ot.fieldState.fieldReadOnly=he,ot.fieldState.readonly=ie||he||((wt=j==null?void 0:j[ot.name])==null?void 0:wt.readonly),ot})},deregister:()=>{de(ce).update(it=>(it.fieldState.validator=null,it.fieldState.error=null,it))},validate:()=>{const he=de(ce);return re(qt(he).fieldState.value,!0),!qt(he).fieldState.error}}};le.setContext("form",{formState:Ie,formApi:Te,dataSource:G}),le.setContext("form-step",ii(1));const Le=({type:ce,field:re,value:Ae})=>{if(ce==="set")if(re==="_value"){let Ue=Ae;if(typeof Ae=="string")try{Ue=JSON.parse(Ae)}catch{return}typeof Ue=="object"&&Ue!==null&&(Object.keys(Ue).forEach(Je=>{const lt=be.find(he=>qt(he).name.toLowerCase()===Je.toLowerCase());if(lt){const he=qt(lt).name;Te.setFieldValue(he,Ue[Je])}}),Te.validate())}else Te.setFieldValue(re,Ae);else Te.resetField(re)},rt=ce=>{let re;typeof ce.field=="string"?re=qt(de(ce.field)):re=ce.field;const Ae=re.fieldState.fieldId,Ue=document.getElementById(Ae);Ue&&Ue.focus({preventScroll:!0});const Je=document.querySelector(`label[for="${Ae}"]`);Je&&(Je.style.scrollMargin="100px",Je.scrollIntoView({behavior:"smooth",block:"nearest"}))},kt=[{type:se.ValidateForm,callback:Te.validate},{type:se.ClearForm,callback:Te.reset},{type:se.ChangeFormStep,callback:Te.changeStep},{type:se.UpdateFieldValue,callback:Le},{type:se.ScrollTo,callback:rt}],ke=(ce,re)=>{be.length>0&&be.forEach(Ae=>{Ae.update(Ue=>{var lt,he;const Je=!!((lt=j==null?void 0:j[Ue.name])!=null&<.autocolumn);return Ue.fieldState.disabled=ce||Ue.fieldState.fieldDisabled||Je&&!X,Ue.fieldState.readonly=re||Ue.fieldState.fieldReadOnly||((he=j==null?void 0:j[Ue.name])==null?void 0:he.readonly),Ue})})};return t.$$set=ce=>{"dataSource"in ce&&n(12,G=ce.dataSource),"disabled"in ce&&n(13,oe=ce.disabled),"readonly"in ce&&n(14,ie=ce.readonly),"initialValues"in ce&&n(15,J=ce.initialValues),"size"in ce&&n(16,q=ce.size),"schema"in ce&&n(17,j=ce.schema),"definition"in ce&&n(18,K=ce.definition),"disableSchemaValidation"in ce&&n(19,x=ce.disableSchemaValidation),"editAutoColumns"in ce&&n(20,X=ce.editAutoColumns),"provideContext"in ce&&n(0,F=ce.provideContext),"currentStep"in ce&&_(n(1,R=ce.currentStep)),"formValue"in ce&&n(10,z=ce.formValue),"form"in ce&&n(11,ve=ce.form),"$$scope"in ce&&n(31,$=ce.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&4194304&&M(n(7,i=fe(be,ce=>ce.fieldState.value))),t.$$.dirty[0]&268435456&&n(10,z=D),t.$$.dirty[0]&4194304&&ne(n(6,l=fe(be,ce=>ce.fieldState.error))),t.$$.dirty[0]&4194304&&O(n(5,r=te(be))),t.$$.dirty[0]&536870912&&n(23,o=!Object.values(V).some(ce=>ce!=null)),t.$$.dirty[0]&4227072&&E(n(4,u=Ne(be,J))),t.$$.dirty[0]&24576&&ke(oe,ie),t.$$.dirty[0]&4194306&&g(n(3,s=pr([R,...be],([ce,...re])=>!re.filter(Ae=>Ae.step===ce).some(Ae=>Ae.fieldState.error!=null)))),t.$$.dirty[0]&4096&&n(11,ve={formState:Ie,formApi:Te,dataSource:G}),t.$$.dirty[0]&914358272&&Ie.set({values:D,errors:V,valid:o,dirty:b,currentStep:h}),t.$$.dirty[0]&402685952&&n(10,z=ae(J,D,k)),t.$$.dirty[0]&125854720&&n(2,a={...z,__value:z,__valid:o,__dirty:b,__currentStep:h,__currentStepValid:f,__editing:!ie&&!oe})},[F,R,a,s,u,r,l,i,me,kt,z,ve,G,oe,ie,J,q,j,K,x,X,Ie,be,o,f,h,b,k,D,V,H,$]}class fp extends Ze{constructor(e){super(),Qe(this,e,ap,sp,Ye,{dataSource:12,disabled:13,readonly:14,initialValues:15,size:16,schema:17,definition:18,disableSchemaValidation:19,editAutoColumns:20,provideContext:0,currentStep:1,formValue:10,formState:21,form:11},null,[-1,-1])}get formState(){return this.$$.ctx[21]}}function Ta(t){let e=t[15],n,i,l=Ia(t);return{c(){l.c(),n=Fe()},m(r,o){l.m(r,o),A(r,n,o),i=!0},p(r,o){o[0]&32768&&Ye(e,e=r[15])?(He(),Z(l,1,1,ue),ze(),l=Ia(r),l.c(),U(l,1),l.m(n.parentNode,n)):l.p(r,o)},i(r){i||(U(l),i=!0)},o(r){Z(l),i=!1},d(r){r&&C(n),l.d(r)}}}function cp(t){let e;const n=t[24].default,i=Ut(n,t,t[30],null);return{c(){i&&i.c()},m(l,r){i&&i.m(l,r),e=!0},p(l,r){i&&i.p&&(!e||r[0]&1073741824)&&zt(i,n,l,l[30],e?Ht(n,l[30],r,null):jt(l[30]),null)},i(l){e||(U(i,l),e=!0)},o(l){Z(i,l),e=!1},d(l){i&&i.d(l)}}}function Ia(t){let e,n,i,l,r;function o(f){t[25](f)}function u(f){t[26](f)}function s(f){t[27](f)}let a={dataSource:t[3],size:t[4],disabled:t[5],readonly:t[6]||t[7]=="View",schema:t[11],definition:t[13],initialValues:t[12],disableSchemaValidation:t[8],editAutoColumns:t[9],currentStep:t[18],provideContext:t[10],$$slots:{default:[cp]},$$scope:{ctx:t}};return t[0]!==void 0&&(a.form=t[0]),t[1]!==void 0&&(a.formState=t[1]),t[2]!==void 0&&(a.formValue=t[2]),e=new fp({props:a}),Be.push(()=>Gt(e,"form",o)),Be.push(()=>Gt(e,"formState",u)),Be.push(()=>Gt(e,"formValue",s)),e.$on("change",t[28]),e.$on("reset",t[29]),{c(){We(e.$$.fragment)},m(f,c){je(e,f,c),r=!0},p(f,c){const g={};c[0]&8&&(g.dataSource=f[3]),c[0]&16&&(g.size=f[4]),c[0]&32&&(g.disabled=f[5]),c[0]&192&&(g.readonly=f[6]||f[7]=="View"),c[0]&2048&&(g.schema=f[11]),c[0]&8192&&(g.definition=f[13]),c[0]&4096&&(g.initialValues=f[12]),c[0]&256&&(g.disableSchemaValidation=f[8]),c[0]&512&&(g.editAutoColumns=f[9]),c[0]&1024&&(g.provideContext=f[10]),c[0]&1073741824&&(g.$$scope={dirty:c,ctx:f}),!n&&c[0]&1&&(n=!0,g.form=f[0],Wt(()=>n=!1)),!i&&c[0]&2&&(i=!0,g.formState=f[1],Wt(()=>i=!1)),!l&&c[0]&4&&(l=!0,g.formValue=f[2],Wt(()=>l=!1)),e.$set(g)},i(f){r||(U(e.$$.fragment,f),r=!0)},o(f){Z(e.$$.fragment,f),r=!1},d(f){qe(e,f)}}}function dp(t){let e,n,i=t[14]&&Ta(t);return{c(){i&&i.c(),e=Fe()},m(l,r){i&&i.m(l,r),A(l,e,r),n=!0},p(l,r){l[14]?i?(i.p(l,r),r[0]&16384&&U(i,1)):(i=Ta(l),i.c(),U(i,1),i.m(e.parentNode,e)):i&&(He(),Z(i,1,1,()=>{i=null}),ze())},i(l){n||(U(i),n=!0)},o(l){Z(i),n=!1},d(l){l&&C(e),i&&i.d(l)}}}function hp(t,e,n){let i,l,r,o,u,{$$slots:s={},$$scope:a}=e;const f=R=>{let z=0;for(let me=0;me<R.length;me++){const se=R.charCodeAt(me);z=(z<<5)-z+se,z=z&z}return z.toString(16)};let{dataSource:c}=e,{size:g}=e,{disabled:h=!1}=e,{readonly:d=!1}=e,{actionType:_="Create"}=e,{initialFormStep:b=1}=e,{disableSchemaValidation:w=!1}=e,{editAutoColumns:E=!1}=e,{provideContext:k=!0}=e,{form:I}=e,{formState:O}=e,{formValue:D={}}=e,{row:N}=e;const M=le.getContext("context");Me(t,M,R=>n(22,o=R));const V=le.getContext("component");Me(t,V,R=>n(23,u=R));const{fetchDatasourceSchema:W,fetchDatasourceDefinition:ne}=le.getContext("sdk"),H=()=>{const R=parseInt(b.toString());return isNaN(R)?1:R};let $,Y,G=!1,oe=le.getContext("current-step")||ii(H());const ie=(R,z,me,se)=>{var be,Ie;if(R!=="Update"&&R!=="View")return{};const Oe=z==null?void 0:z.type;if(Oe!=="table"&&Oe!=="viewV2")return{};if(N&&Oe==="table"&&(N==null?void 0:N.tableId)===z.tableId)return N;for(let ve of me.toReversed().slice(1))if(z.type==="viewV2"&&((be=se[ve])==null?void 0:be._viewId)===z.id||z.type==="table"&&((Ie=se[ve])==null?void 0:Ie.tableId)===z.tableId)return se[ve];return{}},J=async R=>{try{n(13,$=await ne(R))}catch{n(13,$=void 0)}const z=await W(R);n(11,Y=z||{}),G||n(14,G=!0)},q=R=>{if(!R)return null;const z=Object.keys(R);return z.sort(),z.map(me=>`${me}:${R[me].type}`).join("-")};function j(R){I=R,n(0,I)}function K(R){O=R,n(1,O)}function x(R){D=R,n(2,D)}function X(R){ti.call(this,t,R)}function F(R){ti.call(this,t,R)}return t.$$set=R=>{"dataSource"in R&&n(3,c=R.dataSource),"size"in R&&n(4,g=R.size),"disabled"in R&&n(5,h=R.disabled),"readonly"in R&&n(6,d=R.readonly),"actionType"in R&&n(7,_=R.actionType),"initialFormStep"in R&&n(19,b=R.initialFormStep),"disableSchemaValidation"in R&&n(8,w=R.disableSchemaValidation),"editAutoColumns"in R&&n(9,E=R.editAutoColumns),"provideContext"in R&&n(10,k=R.provideContext),"form"in R&&n(0,I=R.form),"formState"in R&&n(1,O=R.formState),"formValue"in R&&n(2,D=R.formValue),"row"in R&&n(20,N=R.row),"$$scope"in R&&n(30,a=R.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&8&&J(c),t.$$.dirty[0]&2048&&n(21,i=q(Y)),t.$$.dirty[0]&13631624&&n(12,l=ie(_,c,u.path,o)),t.$$.dirty[0]&2101376&&n(15,r=f(i+JSON.stringify(l)+_))},[I,O,D,c,g,h,d,_,w,E,k,Y,l,$,G,r,M,V,oe,b,N,i,o,u,s,j,K,x,X,F,a]}class gp extends Ze{constructor(e){super(),Qe(this,e,hp,dp,Ye,{dataSource:3,size:4,disabled:5,readonly:6,actionType:7,initialFormStep:19,disableSchemaValidation:8,editAutoColumns:9,provideContext:10,form:0,formState:1,formValue:2,row:20},null,[-1,-1])}}function Da(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),n.push.apply(n,i)}return n}function wr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Da(Object(n),!0).forEach(function(i){Pl(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Da(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Rl(t){"@babel/helpers - typeof";return Rl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rl(t)}function Pl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function mp(t,e){if(t==null)return{};var n={},i=Object.keys(t),l,r;for(r=0;r<i.length;r++)l=i[r],!(e.indexOf(l)>=0)&&(n[l]=t[l]);return n}function _p(t,e){if(t==null)return{};var n=mp(t,e),i,l;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(l=0;l<r.length;l++)i=r[l],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function pp(t,e){return wp(t)||yp(t,e)||Co(t,e)||vp()}function qn(t){return bp(t)||kp(t)||Co(t)||Ep()}function bp(t){if(Array.isArray(t))return Ao(t)}function wp(t){if(Array.isArray(t))return t}function kp(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function yp(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i=[],l=!0,r=!1,o,u;try{for(n=n.call(t);!(l=(o=n.next()).done)&&(i.push(o.value),!(e&&i.length===e));l=!0);}catch(s){r=!0,u=s}finally{try{!l&&n.return!=null&&n.return()}finally{if(r)throw u}}return i}}function Co(t,e){if(t){if(typeof t=="string")return Ao(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ao(t,e)}}function Ao(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function Ep(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
5
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
6
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
7
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r=!0,o=!1,u;return{s:function(){n=n.call(t)},n:function(){var s=n.next();return r=s.done,s},e:function(s){o=!0,u=s},f:function(){try{!r&&n.return!=null&&n.return()}finally{if(o)throw u}}}}var Sp="finalize",Cp="consider";function Ml(t,e,n){t.dispatchEvent(new CustomEvent(Sp,{detail:{items:e,info:n}}))}function Oi(t,e,n){t.dispatchEvent(new CustomEvent(Cp,{detail:{items:e,info:n}}))}var kr="draggedEntered",Ql="draggedLeft",yr="draggedOverIndex",To="draggedLeftDocument",Er={LEFT_FOR_ANOTHER:"leftForAnother",OUTSIDE_OF_ANY:"outsideOfAny"};function Ap(t,e,n){t.dispatchEvent(new CustomEvent(kr,{detail:{indexObj:e,draggedEl:n}}))}function Tp(t,e,n){t.dispatchEvent(new CustomEvent(Ql,{detail:{draggedEl:e,type:Er.LEFT_FOR_ANOTHER,theOtherDz:n}}))}function Ip(t,e){t.dispatchEvent(new CustomEvent(Ql,{detail:{draggedEl:e,type:Er.OUTSIDE_OF_ANY}}))}function Dp(t,e,n){t.dispatchEvent(new CustomEvent(yr,{detail:{indexObj:e,draggedEl:n}}))}function Op(t){window.dispatchEvent(new CustomEvent(To,{detail:{draggedEl:t}}))}var bn={DRAG_STARTED:"dragStarted",DRAGGED_ENTERED:kr,DRAGGED_ENTERED_ANOTHER:"dragEnteredAnother",DRAGGED_OVER_INDEX:yr,DRAGGED_LEFT:Ql,DRAGGED_LEFT_ALL:"draggedLeftAll",DROPPED_INTO_ZONE:"droppedIntoZone",DROPPED_INTO_ANOTHER:"droppedIntoAnother",DROPPED_OUTSIDE_OF_ANY:"droppedOutsideOfAny",DRAG_STOPPED:"dragStopped"},vn={POINTER:"pointer",KEYBOARD:"keyboard"},vr="isDndShadowItem",Sr="data-is-dnd-shadow-item-internal",Rp="data-is-dnd-shadow-item-hint",Pp="id:dnd-shadow-placeholder-0000",Mp="dnd-action-dragged-el",un="id",Io=0;function Oa(){Io++}function Ra(){if(Io===0)throw new Error("Bug! trying to decrement when there are no dropzones");Io--}var Do=typeof window>"u";function Oo(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n,i=e?Fp(t):t.getBoundingClientRect(),l=getComputedStyle(t),r=l.transform;if(r){var o,u,s,a;if(r.startsWith("matrix3d("))n=r.slice(9,-1).split(/, /),o=+n[0],u=+n[5],s=+n[12],a=+n[13];else if(r.startsWith("matrix("))n=r.slice(7,-1).split(/, /),o=+n[0],u=+n[3],s=+n[4],a=+n[5];else return i;var f=l.transformOrigin,c=i.x-s-(1-o)*parseFloat(f),g=i.y-a-(1-u)*parseFloat(f.slice(f.indexOf(" ")+1)),h=o?i.width/o:t.offsetWidth,d=u?i.height/u:t.offsetHeight;return{x:c,y:g,width:h,height:d,top:g,right:c+h,bottom:g+d,left:c}}else return i}function Pa(t){var e=Oo(t);return{top:e.top+window.scrollY,bottom:e.bottom+window.scrollY,left:e.left+window.scrollX,right:e.right+window.scrollX}}function Ma(t){var e=t.getBoundingClientRect();return{top:e.top+window.scrollY,bottom:e.bottom+window.scrollY,left:e.left+window.scrollX,right:e.right+window.scrollX}}function Na(t){return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function Np(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Cr(t,e){return t.y<=e.bottom&&t.y>=e.top&&t.x>=e.left&&t.x<=e.right}function Zl(t){return Na(Ma(t))}function La(t,e){var n=Zl(t),i=Pa(e);return Cr(n,i)}function Fa(t,e){var n=Zl(t),i=Zl(e);return Np(n,i)}function Lp(t){var e=Ma(t);return e.right<0||e.left>document.documentElement.scrollWidth||e.bottom<0||e.top>document.documentElement.scrollHeight}function Fp(t){for(var e=t.getBoundingClientRect(),n={top:e.top,bottom:e.bottom,left:e.left,right:e.right},i=t.parentElement;i&&i!==document.body;){var l=i.getBoundingClientRect(),r=window.getComputedStyle(i).overflowY,o=window.getComputedStyle(i).overflowX,u=r==="scroll"||r==="auto",s=o==="scroll"||o==="auto";u&&(n.top=Math.max(n.top,l.top),n.bottom=Math.min(n.bottom,l.bottom)),s&&(n.left=Math.max(n.left,l.left),n.right=Math.min(n.right,l.right)),i=i.parentElement}return n.top=Math.max(n.top,0),n.bottom=Math.min(n.bottom,window.innerHeight),n.left=Math.max(n.left,0),n.right=Math.min(n.right,window.innerWidth),{top:n.top,bottom:n.bottom,left:n.left,right:n.right,width:Math.max(0,n.right-n.left),height:Math.max(0,n.bottom-n.top)}}var Nl;function Ro(){Nl=new Map}Ro();function Vp(t){var e=Array.from(t.children).findIndex(function(n){return n.getAttribute(Sr)});if(e>=0)return Nl.has(t)||Nl.set(t,new Map),Nl.get(t).set(e,Pa(t.children[e])),e}function Bp(t,e){if(!La(t,e))return null;var n=e.children;if(n.length===0)return{index:0,isProximityBased:!0};for(var i=Vp(e),l=0;l<n.length;l++)if(La(t,n[l])){var r=Nl.has(e)&&Nl.get(e).get(l);return r&&!Cr(Zl(t),r)?{index:i,isProximityBased:!1}:{index:l,isProximityBased:!1}}for(var o=Number.MAX_VALUE,u=void 0,s=0;s<n.length;s++){var a=Fa(t,n[s]);a<o&&(o=a,u=s)}if(n.length>0){var f=n.length,c=n[f-1],g=c.cloneNode(!1);g.style.visibility="hidden",g.style.pointerEvents="none",e.appendChild(g);var h=Fa(t,g);h<o&&(u=f),e.removeChild(g)}return{index:u,isProximityBased:!0}}function Jl(t){return JSON.stringify(t,null,2)}function Ar(t){if(!t)throw new Error("cannot get depth of a falsy node");return Va(t,0)}function Va(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.parentElement?Va(t.parentElement,e+1):e-1}function Up(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(!{}.hasOwnProperty.call(e,n)||e[n]!==t[n])return!1;return!0}function Hp(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}var zp=200,Ba=10,Po;function jp(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zp,i=arguments.length>3?arguments[3]:void 0,l,r,o=!1,u,s=Array.from(e).sort(function(f,c){return Ar(c)-Ar(f)});function a(){var f=Zl(t),c=i.multiScrollIfNeeded();if(!c&&u&&Math.abs(u.x-f.x)<Ba&&Math.abs(u.y-f.y)<Ba){Po=window.setTimeout(a,n);return}if(Lp(t)){Op(t);return}u=f;var g=!1,h=Xl(s),d;try{for(h.s();!(d=h.n()).done;){var _=d.value;c&&Ro();var b=Bp(t,_);if(b!==null){var w=b.index;g=!0,_!==l?(l&&Tp(l,t,_),Ap(_,b,t),l=_):w!==r&&(Dp(_,b,t),r=w);break}}}catch(E){h.e(E)}finally{h.f()}!g&&o&&l?(Ip(l,t),l=void 0,r=void 0,o=!1):o=!0,Po=window.setTimeout(a,n)}a()}function qp(){clearTimeout(Po),Ro()}var xl=30;function Wp(){var t;function e(){t={directionObj:void 0,stepPx:0}}e();function n(r){var o=t,u=o.directionObj,s=o.stepPx;u&&(r.scrollBy(u.x*s,u.y*s),window.requestAnimationFrame(function(){return n(r)}))}function i(r){return xl-r}function l(r,o){if(!o)return!1;var u=Gp(r,o),s=!!t.directionObj;if(u===null)return s&&e(),!1;var a=!1,f=!1;return o.scrollHeight>o.clientHeight&&(u.bottom<xl?(a=!0,t.directionObj={x:0,y:1},t.stepPx=i(u.bottom)):u.top<xl&&(a=!0,t.directionObj={x:0,y:-1},t.stepPx=i(u.top)),!s&&a)||o.scrollWidth>o.clientWidth&&(u.right<xl?(f=!0,t.directionObj={x:1,y:0},t.stepPx=i(u.right)):u.left<xl&&(f=!0,t.directionObj={x:-1,y:0},t.stepPx=i(u.left)),!s&&f)?(n(o),!0):(e(),!1)}return{scrollIfNeeded:l,resetScrolling:e}}function Gp(t,e){var n=e===document.scrollingElement?{top:0,bottom:window.innerHeight,left:0,right:window.innerWidth}:e.getBoundingClientRect();return Cr(t,n)?{top:t.y-n.top,bottom:n.bottom-t.y,left:t.x-n.left,right:n.right-t.x}:null}function Yp(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,n=Xp(t),i=Array.from(n).sort(function(s,a){return Ar(a)-Ar(s)}),l=Wp(),r=l.scrollIfNeeded,o=l.resetScrolling;function u(){var s=e();if(!s||!i)return!1;for(var a=i.filter(function(g){return Cr(s,g.getBoundingClientRect())||g===document.scrollingElement}),f=0;f<a.length;f++){var c=r(s,a[f]);if(c)return!0}return!1}return{multiScrollIfNeeded:n.size>0?u:function(){return!1},destroy:function(){return o()}}}function Kp(t){if(!t)return[];for(var e=[],n=t;n;){var i=window.getComputedStyle(n),l=i.overflow;l.split(" ").some(function(r){return r.includes("auto")||r.includes("scroll")})&&e.push(n),n=n.parentElement}return e}function Xp(t){var e=new Set,n=Xl(t),i;try{for(n.s();!(i=n.n()).done;){var l=i.value;Kp(l).forEach(function(r){return e.add(r)})}}catch(r){n.e(r)}finally{n.f()}return(document.scrollingElement.scrollHeight>document.scrollingElement.clientHeight||document.scrollingElement.scrollWidth>document.scrollingElement.clientHeight)&&e.add(document.scrollingElement),e}function Qp(t){var e=t.cloneNode(!0),n=[],i=t.tagName==="SELECT",l=i?[t]:qn(t.querySelectorAll("select")),r=Xl(l),o;try{for(r.s();!(o=r.n()).done;){var u=o.value;n.push(u.value)}}catch(k){r.e(k)}finally{r.f()}if(l.length>0)for(var s=i?[e]:qn(e.querySelectorAll("select")),a=0;a<s.length;a++){var f=s[a],c=n[a],g=f.querySelector('option[value="'.concat(c,'"'));g&&g.setAttribute("selected",!0)}var h=t.tagName==="CANVAS",d=h?[t]:qn(t.querySelectorAll("canvas"));if(d.length>0)for(var _=h?[e]:qn(e.querySelectorAll("canvas")),b=0;b<_.length;b++){var w=d[b],E=_[b];E.width=w.width,E.height=w.height,w.width>0&&w.height>0&&E.getContext("2d").drawImage(w,0,0)}return e}var $l=Object.freeze({USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT:"USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT"}),Zp=Pl({},$l.USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT,!1);function Ua(t){if(!$l[t])throw new Error("Can't get non existing feature flag ".concat(t,"! Supported flags: ").concat(Object.keys($l)));return Zp[t]}var Jp=.2;function tl(t){return"".concat(t," ").concat(Jp,"s ease")}function xp(t,e){var n=t.getBoundingClientRect(),i=Qp(t);Ha(t,i),i.id=Mp,i.style.position="fixed";var l=n.top,r=n.left;if(i.style.top="".concat(l,"px"),i.style.left="".concat(r,"px"),e){var o=Na(n);l-=o.y-e.y,r-=o.x-e.x,window.setTimeout(function(){i.style.top="".concat(l,"px"),i.style.left="".concat(r,"px")},0)}return i.style.margin="0",i.style.boxSizing="border-box",i.style.height="".concat(n.height,"px"),i.style.width="".concat(n.width,"px"),i.style.transition="".concat(tl("top"),", ").concat(tl("left"),", ").concat(tl("background-color"),", ").concat(tl("opacity"),", ").concat(tl("color")," "),window.setTimeout(function(){return i.style.transition+=", ".concat(tl("width"),", ").concat(tl("height"))},0),i.style.zIndex="9999",i.style.cursor="grabbing",i}function $p(t){t.style.cursor="grab"}function e0(t,e,n,i){Ha(e,t);var l=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=l.width-r.width,u=l.height-r.height;if(o||u){var s={left:(n-r.left)/r.width,top:(i-r.top)/r.height};Ua($l.USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT)||(t.style.height="".concat(l.height,"px"),t.style.width="".concat(l.width,"px")),t.style.left="".concat(parseFloat(t.style.left)-s.left*o,"px"),t.style.top="".concat(parseFloat(t.style.top)-s.top*u,"px")}}function Ha(t,e){var n=window.getComputedStyle(t);Array.from(n).filter(function(i){return i.startsWith("background")||i.startsWith("padding")||i.startsWith("font")||i.startsWith("text")||i.startsWith("align")||i.startsWith("justify")||i.startsWith("display")||i.startsWith("flex")||i.startsWith("border")||i==="opacity"||i==="color"||i==="list-style-type"||Ua($l.USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT)&&(i==="width"||i==="height")}).forEach(function(i){return e.style.setProperty(i,n.getPropertyValue(i),n.getPropertyPriority(i))})}function t0(t,e){t.draggable=!1,t.ondragstart=function(){return!1},e?(t.style.userSelect="",t.style.WebkitUserSelect="",t.style.cursor=""):(t.style.userSelect="none",t.style.WebkitUserSelect="none",t.style.cursor="grab")}function za(t){t.style.display="none",t.style.position="fixed",t.style.zIndex="-5"}function n0(t){t.style.visibility="hidden",t.setAttribute(Sr,"true")}function i0(t){t.style.visibility="",t.removeAttribute(Sr)}function Tr(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return[]};t.forEach(function(i){var l=e(i);Object.keys(l).forEach(function(r){i.style[r]=l[r]}),n(i).forEach(function(r){return i.classList.add(r)})})}function Ir(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return[]};t.forEach(function(i){var l=e(i);Object.keys(l).forEach(function(r){i.style[r]=""}),n(i).forEach(function(r){return i.classList.contains(r)&&i.classList.remove(r)})})}function l0(t){var e=t.style.minHeight;t.style.minHeight=window.getComputedStyle(t).getPropertyValue("height");var n=t.style.minWidth;return t.style.minWidth=window.getComputedStyle(t).getPropertyValue("width"),function(){t.style.minHeight=e,t.style.minWidth=n}}var r0="--any--",o0=100,s0=20,Dr=3,u0=80,ja={outline:"rgba(255, 255, 102, 0.7) solid 2px"},qa="data-is-dnd-original-dragged-item",Sn,an,Cn,Or,Lt,Rr,Ri,fn,li,mn,Pi=!1,Mo=!1,No,er=!1,Pr=[],tr,ri,nr=!1,Jn=new Map,Yt=new Map,Lo=new WeakMap;function a0(t,e){Jn.has(e)||Jn.set(e,new Set),Jn.get(e).has(t)||(Jn.get(e).add(t),Oa())}function Wa(t,e){Jn.get(e).delete(t),Ra(),Jn.get(e).size===0&&Jn.delete(e)}function f0(){var t=Jn.get(Or),e=Xl(t),n;try{for(e.s();!(n=e.n()).done;){var i=n.value;i.addEventListener(kr,Ga),i.addEventListener(Ql,Ya),i.addEventListener(yr,Ka)}}catch(o){e.e(o)}finally{e.f()}window.addEventListener(To,Ll);var l=Math.max.apply(Math,qn(Array.from(t.keys()).map(function(o){return Yt.get(o).dropAnimationDurationMs}))),r=l===0?s0:Math.max(l,o0);tr=Yp(t,function(){return mn}),jp(an,t,r*1.07,tr)}function c0(){var t=Jn.get(Or),e=Xl(t),n;try{for(e.s();!(n=e.n()).done;){var i=n.value;i.removeEventListener(kr,Ga),i.removeEventListener(Ql,Ya),i.removeEventListener(yr,Ka)}}catch(l){e.e(l)}finally{e.f()}window.removeEventListener(To,Ll),tr&&(tr.destroy(),tr=void 0),qp()}function Mr(t){return t.findIndex(function(e){return!!e[vr]})}function d0(t){var e;return wr(wr({},t),{},(e={},Pl(e,vr,!0),Pl(e,un,Pp),e))}function Ga(t){var e=Yt.get(t.currentTarget),n=e.items,i=e.dropFromOthersDisabled;if(!(i&&t.currentTarget!==Lt)){if(er=!1,n=n.filter(function(u){return u[un]!==Ri[un]}),Lt!==t.currentTarget){var l=Yt.get(Lt).items,r=l.filter(function(u){return!u[vr]});Oi(Lt,r,{trigger:bn.DRAGGED_ENTERED_ANOTHER,id:Cn[un],source:vn.POINTER})}var o=t.detail.indexObj.index;fn=t.currentTarget,n.splice(o,0,Ri),Oi(t.currentTarget,n,{trigger:bn.DRAGGED_ENTERED,id:Cn[un],source:vn.POINTER})}}function Ya(t){if(Pi){var e=Yt.get(t.currentTarget),n=e.items,i=e.dropFromOthersDisabled;if(!(i&&t.currentTarget!==Lt&&t.currentTarget!==fn)){var l=qn(n),r=Mr(l);r!==-1&&l.splice(r,1);var o=fn;fn=void 0;var u=t.detail,s=u.type,a=u.theOtherDz;if(s===Er.OUTSIDE_OF_ANY||s===Er.LEFT_FOR_ANOTHER&&a!==Lt&&Yt.get(a).dropFromOthersDisabled){er=!0,fn=Lt;var f=o===Lt?l:qn(Yt.get(Lt).items);f.splice(Rr,0,Ri),Oi(Lt,f,{trigger:bn.DRAGGED_LEFT_ALL,id:Cn[un],source:vn.POINTER})}Oi(t.currentTarget,l,{trigger:bn.DRAGGED_LEFT,id:Cn[un],source:vn.POINTER})}}}function Ka(t){var e=Yt.get(t.currentTarget),n=e.items,i=e.dropFromOthersDisabled;if(!(i&&t.currentTarget!==Lt)){var l=qn(n);er=!1;var r=t.detail.indexObj.index,o=Mr(l);o!==-1&&l.splice(o,1),l.splice(r,0,Ri),Oi(t.currentTarget,l,{trigger:bn.DRAGGED_OVER_INDEX,id:Cn[un],source:vn.POINTER})}}function Nr(t){t.preventDefault();var e=t.touches?t.touches[0]:t;mn={x:e.clientX,y:e.clientY},an.style.transform="translate3d(".concat(mn.x-li.x,"px, ").concat(mn.y-li.y,"px, 0)")}function Ll(){Mo=!0,window.removeEventListener("mousemove",Nr),window.removeEventListener("touchmove",Nr),window.removeEventListener("mouseup",Ll),window.removeEventListener("touchend",Ll),c0(),$p(an),fn||(fn=Lt);var t=Yt.get(fn),e=t.items,n=t.type;Ir(Jn.get(n),function(r){return Yt.get(r).dropTargetStyle},function(r){return Yt.get(r).dropTargetClasses});var i=Mr(e);i===-1&&fn===Lt&&(i=Rr),e=e.map(function(r){return r[vr]?Cn:r});function l(){No(),Ml(fn,e,{trigger:er?bn.DROPPED_OUTSIDE_OF_ANY:bn.DROPPED_INTO_ZONE,id:Cn[un],source:vn.POINTER}),fn!==Lt&&Ml(Lt,Yt.get(Lt).items,{trigger:bn.DROPPED_INTO_ANOTHER,id:Cn[un],source:vn.POINTER});var r=Array.from(fn.children).find(function(o){return o.getAttribute(Sr)});r&&i0(r),m0()}Yt.get(fn).dropAnimationDisabled?l():h0(i,l)}function h0(t,e){var n=t>-1?Oo(fn.children[t],!1):Oo(fn,!1),i={x:n.left-parseFloat(an.style.left),y:n.top-parseFloat(an.style.top)},l=Yt.get(fn),r=l.dropAnimationDurationMs,o="transform ".concat(r,"ms ease");an.style.transition=an.style.transition?an.style.transition+","+o:o,an.style.transform="translate3d(".concat(i.x,"px, ").concat(i.y,"px, 0)"),window.setTimeout(e,r)}function g0(t,e){Pr.push({dz:t,destroy:e}),window.requestAnimationFrame(function(){za(t),document.body.appendChild(t)})}function m0(){an&&an.remove&&an.remove(),Sn&&Sn.remove&&Sn.remove(),an=void 0,Sn=void 0,Cn=void 0,Or=void 0,Lt=void 0,Rr=void 0,Ri=void 0,fn=void 0,li=void 0,mn=void 0,Pi=!1,Mo=!1,No=void 0,er=!1,ri&&clearTimeout(ri),ri=void 0,nr=!1,Pr.length&&(Pr.forEach(function(t){var e=t.dz,n=t.destroy;n(),e.remove()}),Pr=[])}function _0(t,e){var n=!1,i={items:void 0,type:void 0,flipDurationMs:0,dragDisabled:!1,morphDisabled:!1,dropFromOthersDisabled:!1,dropTargetStyle:ja,dropTargetClasses:[],transformDraggedElement:function(){},centreDraggedOnCursor:!1,dropAnimationDisabled:!1,delayTouchStartMs:0},l=new Map;function r(){window.addEventListener("mousemove",s,{passive:!1}),window.addEventListener("touchmove",s,{passive:!1,capture:!1}),window.addEventListener("mouseup",u,{passive:!1}),window.addEventListener("touchend",u,{passive:!1})}function o(){window.removeEventListener("mousemove",s),window.removeEventListener("touchmove",s),window.removeEventListener("mouseup",u),window.removeEventListener("touchend",u),ri&&(clearTimeout(ri),ri=void 0,nr=!1)}function u(g){if(o(),Sn=void 0,li=void 0,mn=void 0,g.type==="touchend"){var h=new Event("click",{bubbles:!0,cancelable:!0});g.target.dispatchEvent(h)}}function s(g){var h=!!g.touches,d=h?g.touches[0]:g;if(h&&i.delayTouchStartMs>0&&!nr){mn={x:d.clientX,y:d.clientY},(Math.abs(mn.x-li.x)>=Dr||Math.abs(mn.y-li.y)>=Dr)&&(ri&&(clearTimeout(ri),ri=void 0),u(g));return}g.preventDefault(),mn={x:d.clientX,y:d.clientY},(Math.abs(mn.x-li.x)>=Dr||Math.abs(mn.y-li.y)>=Dr)&&(o(),f())}function a(g){if(!(g.target!==g.currentTarget&&(g.target.value!==void 0||g.target.isContentEditable))&&!g.button&&!Pi){var h=!!g.touches,d=h&&i.delayTouchStartMs>0;d||g.preventDefault(),g.stopPropagation();var _=h?g.touches[0]:g;li={x:_.clientX,y:_.clientY},mn=wr({},li),Sn=g.currentTarget,d&&(nr=!1,ri=window.setTimeout(function(){Sn&&(nr=!0,o(),f())},i.delayTouchStartMs)),r()}}function f(){Pi=!0;var g=l.get(Sn);Rr=g,Lt=Sn.parentElement;var h=Lt.closest("dialog")||Lt.closest("[popover]")||Lt.getRootNode(),d=h.body||h,_=i.items,b=i.type,w=i.centreDraggedOnCursor,E=qn(_);Cn=E[g],Or=b,Ri=d0(Cn),an=xp(Sn,w&&mn),d.appendChild(an);function k(){Sn.parentElement?window.requestAnimationFrame(k):(Sn.setAttribute(qa,!0),d.appendChild(Sn),f0(),za(Sn),Ri[un]=Cn[un],an.focus())}window.requestAnimationFrame(k),Tr(Array.from(Jn.get(i.type)).filter(function(I){return I===Lt||!Yt.get(I).dropFromOthersDisabled}),function(I){return Yt.get(I).dropTargetStyle},function(I){return Yt.get(I).dropTargetClasses}),E.splice(g,1,Ri),No=l0(Lt),Oi(Lt,E,{trigger:bn.DRAG_STARTED,id:Cn[un],source:vn.POINTER}),window.addEventListener("mousemove",Nr,{passive:!1}),window.addEventListener("touchmove",Nr,{passive:!1,capture:!1}),window.addEventListener("mouseup",Ll,{passive:!1}),window.addEventListener("touchend",Ll,{passive:!1})}function c(g){var h=g.items,d=h===void 0?void 0:h,_=g.flipDurationMs,b=_===void 0?0:_,w=g.type,E=w===void 0?r0:w,k=g.dragDisabled,I=k===void 0?!1:k,O=g.morphDisabled,D=O===void 0?!1:O,N=g.dropFromOthersDisabled,M=N===void 0?!1:N,V=g.dropTargetStyle,W=V===void 0?ja:V,ne=g.dropTargetClasses,H=ne===void 0?[]:ne,$=g.transformDraggedElement,Y=$===void 0?function(){}:$,G=g.centreDraggedOnCursor,oe=G===void 0?!1:G,ie=g.dropAnimationDisabled,J=ie===void 0?!1:ie,q=g.delayTouchStart,j=q===void 0?!1:q;i.dropAnimationDurationMs=b;var K=0;j===!0?K=u0:typeof j=="number"&&isFinite(j)&&j>=0&&(K=j),i.delayTouchStartMs=K,i.type&&E!==i.type&&Wa(t,i.type),i.type=E,i.items=qn(d),i.dragDisabled=I,i.morphDisabled=D,i.transformDraggedElement=Y,i.centreDraggedOnCursor=oe,i.dropAnimationDisabled=J,n&&Pi&&!Mo&&(!Up(W,i.dropTargetStyle)||!Hp(H,i.dropTargetClasses))&&(Ir([t],function(){return i.dropTargetStyle},function(){return H}),Tr([t],function(){return W},function(){return H})),i.dropTargetStyle=W,i.dropTargetClasses=qn(H);function x(z,me){return Yt.get(z)?Yt.get(z)[me]:i[me]}n&&Pi&&i.dropFromOthersDisabled!==M&&(M?Ir([t],function(z){return x(z,"dropTargetStyle")},function(z){return x(z,"dropTargetClasses")}):Tr([t],function(z){return x(z,"dropTargetStyle")},function(z){return x(z,"dropTargetClasses")})),i.dropFromOthersDisabled=M,Yt.set(t,i),a0(t,E);for(var X=Pi?Mr(i.items):-1,F=0;F<t.children.length;F++){var R=t.children[F];if(t0(R,I),F===X){D||e0(an,R,mn.x,mn.y),i.transformDraggedElement(an,Cn,F),n0(R);continue}R.removeEventListener("mousedown",Lo.get(R)),R.removeEventListener("touchstart",Lo.get(R)),I||(R.addEventListener("mousedown",a),R.addEventListener("touchstart",a),Lo.set(R,a)),l.set(R,F),n||(n=!0)}}return c(e),{update:function(h){c(h)},destroy:function(){function h(){Wa(t,Yt.get(t).type),Yt.delete(t)}Pi&&!t.closest("[".concat(qa,"]"))?g0(t,h):h()}}}var Lr,Fo={DND_ZONE_ACTIVE:"dnd-zone-active",DND_ZONE_DRAG_DISABLED:"dnd-zone-drag-disabled"},Xa=(Lr={},Pl(Lr,Fo.DND_ZONE_ACTIVE,"Tab to one the items and press space-bar or enter to start dragging it"),Pl(Lr,Fo.DND_ZONE_DRAG_DISABLED,"This is a disabled drag and drop list"),Lr),p0="dnd-action-aria-alert",Jt;function Vo(){Jt||(Jt=document.createElement("div"),function(){Jt.id=p0,Jt.style.position="fixed",Jt.style.bottom="0",Jt.style.left="0",Jt.style.zIndex="-5",Jt.style.opacity="0",Jt.style.height="0",Jt.style.width="0",Jt.setAttribute("role","alert")}(),document.body.prepend(Jt),Object.entries(Xa).forEach(function(t){var e=pp(t,2),n=e[0],i=e[1];return document.body.prepend(k0(n,i))}))}function b0(){return Do?null:(document.readyState==="complete"?Vo():window.addEventListener("DOMContentLoaded",Vo),wr({},Fo))}function w0(){Do||!Jt||(Object.keys(Xa).forEach(function(t){var e;return(e=document.getElementById(t))===null||e===void 0?void 0:e.remove()}),Jt.remove(),Jt=void 0)}function k0(t,e){var n=document.createElement("div");return n.id=t,n.innerHTML="<p>".concat(e,"</p>"),n.style.display="none",n.style.position="fixed",n.style.zIndex="-5",n}function Fl(t){if(!Do){Jt||Vo(),Jt.innerHTML="";var e=document.createTextNode(t);Jt.appendChild(e),Jt.style.display="none",Jt.style.display="inline"}}var y0="--any--",Qa={outline:"rgba(255, 255, 102, 0.7) solid 2px"},Wn=!1,Bo,_n,nl="",il,oi,Mi="",Fr=new WeakSet,Za=new WeakMap,Ja=new WeakMap,Uo=new Map,cn=new Map,xn=new Map,Vr;function E0(t,e){xn.size===0&&(Vr=b0(),window.addEventListener("keydown",$a),window.addEventListener("click",ef)),xn.has(e)||xn.set(e,new Set),xn.get(e).has(t)||(xn.get(e).add(t),Oa())}function xa(t,e){_n===t&&ir(),xn.get(e).delete(t),Ra(),xn.get(e).size===0&&xn.delete(e),xn.size===0&&(window.removeEventListener("keydown",$a),window.removeEventListener("click",ef),Vr=void 0,w0())}function $a(t){if(Wn)switch(t.key){case"Escape":{ir();break}}}function ef(){Wn&&(Fr.has(document.activeElement)||ir())}function v0(t){if(Wn){var e=t.currentTarget;if(e!==_n){nl=e.getAttribute("aria-label")||"";var n=cn.get(_n),i=n.items,l=i.find(function(c){return c[un]===oi}),r=i.indexOf(l),o=i.splice(r,1)[0],u=cn.get(e),s=u.items,a=u.autoAriaDisabled;e.getBoundingClientRect().top<_n.getBoundingClientRect().top||e.getBoundingClientRect().left<_n.getBoundingClientRect().left?(s.push(o),a||Fl("Moved item ".concat(Mi," to the end of the list ").concat(nl))):(s.unshift(o),a||Fl("Moved item ".concat(Mi," to the beginning of the list ").concat(nl)));var f=_n;Ml(f,i,{trigger:bn.DROPPED_INTO_ANOTHER,id:oi,source:vn.KEYBOARD}),Ml(e,s,{trigger:bn.DROPPED_INTO_ZONE,id:oi,source:vn.KEYBOARD}),_n=e}}}function tf(){Uo.forEach(function(t,e){var n=t.update;return n(cn.get(e))})}function ir(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;cn.get(_n).autoAriaDisabled||Fl("Stopped dragging item ".concat(Mi)),Fr.has(document.activeElement)&&document.activeElement.blur(),t&&Oi(_n,cn.get(_n).items,{trigger:bn.DRAG_STOPPED,id:oi,source:vn.KEYBOARD}),Ir(xn.get(Bo),function(e){return cn.get(e).dropTargetStyle},function(e){return cn.get(e).dropTargetClasses}),il=null,oi=null,Mi="",Bo=null,_n=null,nl="",Wn=!1,tf()}function S0(t,e){var n={items:void 0,type:void 0,dragDisabled:!1,zoneTabIndex:0,zoneItemTabIndex:0,dropFromOthersDisabled:!1,dropTargetStyle:Qa,dropTargetClasses:[],autoAriaDisabled:!1};function i(f,c,g){f.length<=1||f.splice(g,1,f.splice(c,1,f[g])[0])}function l(f){switch(f.key){case"Enter":case" ":{if((f.target.disabled!==void 0||f.target.href||f.target.isContentEditable)&&!Fr.has(f.target))return;f.preventDefault(),f.stopPropagation(),Wn?ir():r(f);break}case"ArrowDown":case"ArrowRight":{if(!Wn)return;f.preventDefault(),f.stopPropagation();var c=cn.get(t),g=c.items,h=Array.from(t.children),d=h.indexOf(f.currentTarget);d<h.length-1&&(n.autoAriaDisabled||Fl("Moved item ".concat(Mi," to position ").concat(d+2," in the list ").concat(nl)),i(g,d,d+1),Ml(t,g,{trigger:bn.DROPPED_INTO_ZONE,id:oi,source:vn.KEYBOARD}));break}case"ArrowUp":case"ArrowLeft":{if(!Wn)return;f.preventDefault(),f.stopPropagation();var _=cn.get(t),b=_.items,w=Array.from(t.children),E=w.indexOf(f.currentTarget);E>0&&(n.autoAriaDisabled||Fl("Moved item ".concat(Mi," to position ").concat(E," in the list ").concat(nl)),i(b,E,E-1),Ml(t,b,{trigger:bn.DROPPED_INTO_ZONE,id:oi,source:vn.KEYBOARD}));break}}}function r(f){u(f.currentTarget),_n=t,Bo=n.type,Wn=!0;var c=Array.from(xn.get(n.type)).filter(function(h){return h===_n||!cn.get(h).dropFromOthersDisabled});if(Tr(c,function(h){return cn.get(h).dropTargetStyle},function(h){return cn.get(h).dropTargetClasses}),!n.autoAriaDisabled){var g="Started dragging item ".concat(Mi,". Use the arrow keys to move it within its list ").concat(nl);c.length>1&&(g+=", or tab to another list in order to move the item into it"),Fl(g)}Oi(t,cn.get(t).items,{trigger:bn.DRAG_STARTED,id:oi,source:vn.KEYBOARD}),tf()}function o(f){Wn&&f.currentTarget!==il&&(f.stopPropagation(),ir(!1),r(f))}function u(f){var c=cn.get(t),g=c.items,h=Array.from(t.children),d=h.indexOf(f);il=f,il.tabIndex=n.zoneItemTabIndex,oi=g[d][un],Mi=h[d].getAttribute("aria-label")||""}function s(f){var c=f.items,g=c===void 0?[]:c,h=f.type,d=h===void 0?y0:h,_=f.dragDisabled,b=_===void 0?!1:_,w=f.zoneTabIndex,E=w===void 0?0:w,k=f.zoneItemTabIndex,I=k===void 0?0:k,O=f.dropFromOthersDisabled,D=O===void 0?!1:O,N=f.dropTargetStyle,M=N===void 0?Qa:N,V=f.dropTargetClasses,W=V===void 0?[]:V,ne=f.autoAriaDisabled,H=ne===void 0?!1:ne;n.items=qn(g),n.dragDisabled=b,n.dropFromOthersDisabled=D,n.zoneTabIndex=E,n.zoneItemTabIndex=I,n.dropTargetStyle=M,n.dropTargetClasses=W,n.autoAriaDisabled=H,n.type&&d!==n.type&&xa(t,n.type),n.type=d,E0(t,d),H||(t.setAttribute("aria-disabled",b),t.setAttribute("role","list"),t.setAttribute("aria-describedby",b?Vr.DND_ZONE_DRAG_DISABLED:Vr.DND_ZONE_ACTIVE)),cn.set(t,n),Wn?t.tabIndex=t===_n||il.contains(t)||n.dropFromOthersDisabled||_n&&n.type!==cn.get(_n).type?-1:0:t.tabIndex=n.zoneTabIndex,t.addEventListener("focus",v0);for(var $=function(oe){var ie=t.children[oe];Fr.add(ie),ie.tabIndex=Wn?-1:n.zoneItemTabIndex,H||ie.setAttribute("role","listitem"),ie.removeEventListener("keydown",Za.get(ie)),ie.removeEventListener("click",Ja.get(ie)),b||(ie.addEventListener("keydown",l),Za.set(ie,l),ie.addEventListener("click",o),Ja.set(ie,o)),Wn&&n.items[oe][un]===oi&&(il=ie,il.tabIndex=n.zoneItemTabIndex,ie.focus())},Y=0;Y<t.children.length;Y++)$(Y)}s(e);var a={update:function(c){s(c)},destroy:function(){xa(t,n.type),cn.delete(t),Uo.delete(t)}};return Uo.set(t,a),a}var C0=["items","flipDurationMs","type","dragDisabled","morphDisabled","dropFromOthersDisabled","zoneTabIndex","zoneItemTabIndex","dropTargetStyle","dropTargetClasses","transformDraggedElement","autoAriaDisabled","centreDraggedOnCursor","delayTouchStart","dropAnimationDisabled"];function A0(t,e){if(T0(t))return{update:function(){},destroy:function(){}};nf(e);var n=_0(t,e),i=S0(t,e);return{update:function(r){nf(r),n.update(r),i.update(r)},destroy:function(){n.destroy(),i.destroy()}}}function T0(t){return!!t.closest("[".concat(Rp,'="true"]'))}function nf(t){var e=t.items;t.flipDurationMs,t.type,t.dragDisabled,t.morphDisabled,t.dropFromOthersDisabled;var n=t.zoneTabIndex,i=t.zoneItemTabIndex;t.dropTargetStyle;var l=t.dropTargetClasses;t.transformDraggedElement,t.autoAriaDisabled,t.centreDraggedOnCursor;var r=t.delayTouchStart;t.dropAnimationDisabled;var o=_p(t,C0);if(Object.keys(o).length>0&&console.warn("dndzone will ignore unknown options",o),!e)throw new Error("no 'items' key provided to dndzone");var u=e.find(function(f){return!{}.hasOwnProperty.call(f,un)});if(u)throw new Error("missing '".concat(un,"' property for item ").concat(Jl(u)));if(l&&!Array.isArray(l))throw new Error("dropTargetClasses should be an array but instead it is a ".concat(Rl(l),", ").concat(Jl(l)));if(n&&!lf(n))throw new Error("zoneTabIndex should be a number but instead it is a ".concat(Rl(n),", ").concat(Jl(n)));if(i&&!lf(i))throw new Error("zoneItemTabIndex should be a number but instead it is a ".concat(Rl(i),", ").concat(Jl(i)));if(r!==void 0&&r!==!1){var s=r===!0,a=typeof r=="number"&&isFinite(r)&&r>=0;if(!s&&!a)throw new Error("delayTouchStart should be a boolean (true/false) or a non-negative number but instead it is a ".concat(Rl(r),", ").concat(Jl(r)))}}function lf(t){return!isNaN(t)&&function(e){return(e|0)===e}(parseFloat(t))}var rf={exports:{}},Br=1;function I0(){return Br=(Br*9301+49297)%233280,Br/233280}function D0(t){Br=t}var O0={nextValue:I0,seed:D0},Ho=O0,ll="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-",Ni,of,lr;function zo(){lr=!1}function sf(t){if(!t){Ni!==ll&&(Ni=ll,zo());return}if(t!==Ni){if(t.length!==ll.length)throw new Error("Custom alphabet for shortid must be "+ll.length+" unique characters. You submitted "+t.length+" characters: "+t);var e=t.split("").filter(function(n,i,l){return i!==l.lastIndexOf(n)});if(e.length)throw new Error("Custom alphabet for shortid must be "+ll.length+" unique characters. These characters were not unique: "+e.join(", "));Ni=t,zo()}}function R0(t){return sf(t),Ni}function P0(t){Ho.seed(t),of!==t&&(zo(),of=t)}function M0(){Ni||sf(ll);for(var t=Ni.split(""),e=[],n=Ho.nextValue(),i;t.length>0;)n=Ho.nextValue(),i=Math.floor(n*t.length),e.push(t.splice(i,1)[0]);return e.join("")}function uf(){return lr||(lr=M0(),lr)}function N0(t){var e=uf();return e[t]}function L0(){return Ni||ll}var jo={get:L0,characters:R0,seed:P0,lookup:N0,shuffled:uf},qo=typeof window=="object"&&(window.crypto||window.msCrypto),Wo;!qo||!qo.getRandomValues?Wo=function(t){for(var e=[],n=0;n<t;n++)e.push(Math.floor(Math.random()*256));return e}:Wo=function(t){return qo.getRandomValues(new Uint8Array(t))};var F0=Wo;let V0="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",af=t=>crypto.getRandomValues(new Uint8Array(t)),ff=(t,e,n)=>{let i=(2<<Math.log(t.length-1)/Math.LN2)-1,l=-~(1.6*i*e/t.length);return(r=e)=>{let o="";for(;;){let u=n(l),s=l|0;for(;s--;)if(o+=t[u[s]&i]||"",o.length===r)return o}}};const B0=l_(Object.freeze(Object.defineProperty({__proto__:null,customAlphabet:(t,e=21)=>ff(t,e,af),customRandom:ff,nanoid:(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),""),random:af,urlAlphabet:V0},Symbol.toStringTag,{value:"Module"})));var U0=jo,H0=F0,z0=B0.customRandom;function j0(t){for(var e=0,n,i="";!n;)i=i+z0(U0.get(),1,H0)(),n=t<Math.pow(16,e+1),e++;return i}var q0=j0,Ur=q0,W0=1567752802062,G0=7,Hr,cf;function Y0(t){var e="",n=Math.floor((Date.now()-W0)*.001);return n===cf?Hr++:(Hr=0,cf=n),e=e+Ur(G0),e=e+Ur(t),Hr>0&&(e=e+Ur(Hr)),e=e+Ur(n),e}var K0=Y0,X0=jo;function Q0(t){if(!t||typeof t!="string"||t.length<6)return!1;var e=new RegExp("[^"+X0.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]");return!e.test(t)}var Z0=Q0;(function(t){var e=jo,n=K0,i=Z0,l=0;function r(a){return e.seed(a),t.exports}function o(a){return l=a,t.exports}function u(a){return a!==void 0&&e.characters(a),e.shuffled()}function s(){return n(l)}t.exports=s,t.exports.generate=s,t.exports.seed=r,t.exports.worker=o,t.exports.characters=u,t.exports.isValid=i})(rf);var J0=rf.exports,df=J0;function hf(t,e,n){const i=t.slice();return i[37]=e[n],i[38]=e,i[39]=n,i}function gf(t){let e,n,i,l,r,o;return{c(){e=v("div"),n=vl("svg"),i=vl("path"),m(i,"d","M8.5 7C9.32843 7 10 6.32843 10 5.5C10 4.67157 9.32843 4 8.5 4C7.67157 4 7 4.67157 7 5.5C7 6.32843 7.67157 7 8.5 7ZM8.5 13.5C9.32843 13.5 10 12.8284 10 12C10 11.1716 9.32843 10.5 8.5 10.5C7.67157 10.5 7 11.1716 7 12C7 12.8284 7.67157 13.5 8.5 13.5ZM10 18.5C10 19.3284 9.32843 20 8.5 20C7.67157 20 7 19.3284 7 18.5C7 17.6716 7.67157 17 8.5 17C9.32843 17 10 17.6716 10 18.5ZM15.5 7C16.3284 7 17 6.32843 17 5.5C17 4.67157 16.3284 4 15.5 4C14.6716 4 14 4.67157 14 5.5C14 6.32843 14.6716 7 15.5 7ZM17 12C17 12.8284 16.3284 13.5 15.5 13.5C14.6716 13.5 14 12.8284 14 12C14 11.1716 14.6716 10.5 15.5 10.5C16.3284 10.5 17 11.1716 17 12ZM15.5 20C16.3284 20 17 19.3284 17 18.5C17 17.6716 16.3284 17 15.5 17C14.6716 17 14 17.6716 14 18.5C14 19.3284 14.6716 20 15.5 20Z"),m(n,"xmlns","http://www.w3.org/2000/svg"),m(n,"viewBox","0 0 24 24"),m(n,"width","14"),m(n,"height","18"),m(n,"class","svelte-1l6xq7m"),m(e,"class","handle svelte-1l6xq7m"),m(e,"aria-label","drag-handle"),m(e,"style",l=t[1]?"cursor:grab":"cursor:grabbing"),p(e,"inEdit",t[12])},m(u,s){A(u,e,s),S(e,n),S(n,i),r||(o=[B(e,"mousedown",t[26]),B(e,"mouseup",t[27])],r=!0)},p(u,s){s[0]&2&&l!==(l=u[1]?"cursor:grab":"cursor:grabbing")&&m(e,"style",l),s[0]&4096&&p(e,"inEdit",u[12])},d(u){u&&C(e),r=!1,Ve(o)}}}function mf(t){let e,n,i;function l(){return t[28](t[37])}return{c(){e=v("i"),m(e,"class","ph ph-trash-simple svelte-1l6xq7m")},m(r,o){A(r,e,o),n||(i=B(e,"mousedown",Et(l)),n=!0)},p(r,o){t=r},d(r){r&&C(e),n=!1,i()}}}function _f(t,e){let n,i,l,r,o,u,s=(e[4][e[37].item]||e[37].item)+"",a,f,c=e[37],g,h,d=e[0]&&gf(e),_=!e[8]&&e[12]&&mf(e);function b(){return e[29](e[37])}const w=()=>e[30](n,c),E=()=>e[30](null,c);return{key:t,first:null,c(){n=v("li"),d&&d.c(),i=Q(),l=v("div"),r=v("i"),o=Q(),u=v("span"),a=Ee(s),f=Q(),_&&_.c(),m(r,"class","ri-checkbox-blank-fill svelte-1l6xq7m"),m(l,"class","right-content svelte-1l6xq7m"),p(l,"showColors",e[5]),P(l,"--option-color",e[3][e[37].item]),m(n,"class","svelte-1l6xq7m"),this.first=n},m(k,I){A(k,n,I),d&&d.m(n,null),S(n,i),S(n,l),S(l,r),S(l,o),S(l,u),S(u,a),S(n,f),_&&_.m(n,null),w(),g||(h=B(n,"click",b),g=!0)},p(k,I){e=k,e[0]?d?d.p(e,I):(d=gf(e),d.c(),d.m(n,i)):d&&(d.d(1),d=null),I[0]&2064&&s!==(s=(e[4][e[37].item]||e[37].item)+"")&&Pe(a,s),I[0]&32&&p(l,"showColors",e[5]),I[0]&2056&&P(l,"--option-color",e[3][e[37].item]),!e[8]&&e[12]?_?_.p(e,I):(_=mf(e),_.c(),_.m(n,null)):_&&(_.d(1),_=null),c!==e[37]&&(E(),c=e[37],w())},d(k){k&&C(n),d&&d.d(),_&&_.d(),E(),g=!1,h()}}}function x0(t){let e,n,i;return{c(){e=v("li"),n=v("div"),i=Ee(t[9]),m(n,"class","add-button placeholder svelte-1l6xq7m"),m(e,"class","buttons svelte-1l6xq7m")},m(l,r){A(l,e,r),S(e,n),S(n,i)},p(l,r){r[0]&512&&Pe(i,l[9])},d(l){l&&C(e)}}}function $0(t){let e,n,i=t[14]=="Closed"?t[10]?"All Selected":"Select":"Close",l,r,o,u,s=t[11].length&&pf(t);return{c(){e=v("li"),n=v("div"),l=Ee(i),r=Q(),s&&s.c(),m(n,"class","add-button svelte-1l6xq7m"),p(n,"disabled",t[10]),m(e,"class","buttons svelte-1l6xq7m"),p(e,"inEdit",t[12])},m(a,f){A(a,e,f),S(e,n),S(n,l),S(e,r),s&&s.m(e,null),o||(u=B(n,"click",Et(t[31])),o=!0)},p(a,f){f[0]&17408&&i!==(i=a[14]=="Closed"?a[10]?"All Selected":"Select":"Close")&&Pe(l,i),f[0]&1024&&p(n,"disabled",a[10]),a[11].length?s?s.p(a,f):(s=pf(a),s.c(),s.m(e,null)):s&&(s.d(1),s=null),f[0]&4096&&p(e,"inEdit",a[12])},d(a){a&&C(e),s&&s.d(),o=!1,u()}}}function pf(t){let e,n,i;return{c(){e=v("div"),e.textContent="Clear",m(e,"class","clear-button svelte-1l6xq7m")},m(l,r){A(l,e,r),n||(i=B(e,"click",Et(t[32])),n=!0)},p:ue,d(l){l&&C(e),n=!1,i()}}}function eb(t){let e,n=[],i=new Map,l,r,o,u,s=Ce(t[11]);const a=h=>h[37].id;for(let h=0;h<s.length;h+=1){let d=hf(t,s,h),_=a(d);i.set(_,n[h]=_f(_,d))}function f(h,d){if(h[12]&&!h[8])return $0;if(h[2].length<1)return x0}let c=f(t),g=c&&c(t);return{c(){e=v("ul");for(let h=0;h<n.length;h+=1)n[h].c();l=Q(),g&&g.c(),m(e,"class","list-wrap svelte-1l6xq7m"),p(e,"inEdit",t[12])},m(h,d){A(h,e,d);for(let _=0;_<n.length;_+=1)n[_]&&n[_].m(e,null);S(e,l),g&&g.m(e,null),o||(u=[tn(r=A0.call(null,e,{items:t[11],dropTargetStyle:{outline:"none"},dragDisabled:!t[6]||t[1],type:t[15],dropFromOthersDisabled:!0})),B(e,"finalize",t[19]),B(e,"consider",t[18])],o=!0)},p(h,d){d[0]&1128763&&(s=Ce(h[11]),n=Tt(n,d,a,1,h,s,i,e,nn,_f,l,hf)),c===(c=f(h))&&g?g.p(h,d):(g&&g.d(1),g=c&&c(h),g&&(g.c(),g.m(e,null))),r&&Ge(r.update)&&d[0]&2114&&r.update.call(null,{items:h[11],dropTargetStyle:{outline:"none"},dragDisabled:!h[6]||h[1],type:h[15],dropFromOthersDisabled:!0}),d[0]&4096&&p(e,"inEdit",h[12])},i:ue,o:ue,d(h){h&&C(e);for(let d=0;d<n.length;d+=1)n[d].d();g&&g.d(),o=!1,Ve(u)}}}function tb(t,e,n){let i,l,r=ue,o=()=>(r(),r=ft(b,F=>n(14,l=F)),b);t.$$.on_destroy.push(()=>r());let{items:u=[]}=e,{itemsColors:s=[]}=e,{itemsLabels:a=[]}=e,{showColors:f}=e,{showHandle:c=!0}=e,{listItemKey:g}=e;const h="primaryDisplay";let{draggable:d=!0}=e,{focus:_}=e,{editorState:b}=e;o();const w=void 0;let{reorderOnly:E}=e,{placeholder:k}=e,{fullSelection:I}=e,{readonly:O}=e,D=df.generate(),N=ii({selected:null,actions:{select:F=>{N.update(R=>({...R,selected:F}))}}});const M=le.createEventDispatcher();let V={},W=[],{inactive:ne=!0}=e;const H=F=>F.map(R=>({id:g?R[g]:df.generate(),color:s[R],item:R,type:D})).filter(R=>R.id),$=F=>{n(11,W=F.detail.items)},Y=()=>W.reduce((F,R)=>(F.push(R.item),F),[]),G=F=>{n(1,ne=!0),$(F),M("change",Y())},oe=F=>{let R=W.findIndex(z=>z.id==F);R>-1&&(W.splice(R,1),M("change",Y()))},ie=()=>{n(1,ne=!1)},J=()=>{n(1,ne=!0)},q=F=>oe(F.id),j=F=>{qt(N).actions.select(F.id)};function K(F,R){Be[F?"unshift":"push"](()=>{V[R.id]=F,n(13,V)})}const x=()=>M("togglePicker"),X=()=>M("clear");return t.$$set=F=>{"items"in F&&n(2,u=F.items),"itemsColors"in F&&n(3,s=F.itemsColors),"itemsLabels"in F&&n(4,a=F.itemsLabels),"showColors"in F&&n(5,f=F.showColors),"showHandle"in F&&n(0,c=F.showHandle),"listItemKey"in F&&n(21,g=F.listItemKey),"draggable"in F&&n(6,d=F.draggable),"focus"in F&&n(23,_=F.focus),"editorState"in F&&o(n(7,b=F.editorState)),"reorderOnly"in F&&n(8,E=F.reorderOnly),"placeholder"in F&&n(9,k=F.placeholder),"fullSelection"in F&&n(10,I=F.fullSelection),"readonly"in F&&n(25,O=F.readonly),"inactive"in F&&n(1,ne=F.inactive)},t.$$.update=()=>{t.$$.dirty[0]&8388608&&_&&N&&qt(N).actions.select(_),t.$$.dirty[0]&33554432&&n(12,i=!O),t.$$.dirty[0]&4160&&n(0,c=d&&i),t.$$.dirty[0]&4&&n(11,W=H(u)),t.$$.dirty[0]&2048&&(W==null?void 0:W.length)<1},[c,ne,u,s,a,f,d,b,E,k,I,W,i,V,l,D,N,M,$,G,oe,g,h,_,w,O,ie,J,q,j,K,x,X]}class bf extends Ze{constructor(e){super(),Qe(this,e,tb,eb,Ye,{items:2,itemsColors:3,itemsLabels:4,showColors:5,showHandle:0,listItemKey:21,listItemText:22,draggable:6,focus:23,editorState:7,cellState:24,reorderOnly:8,placeholder:9,fullSelection:10,readonly:25,inactive:1},null,[-1,-1])}get listItemText(){return this.$$.ctx[22]}get cellState(){return this.$$.ctx[24]}}function nb(t){let e,n,i,l,r;const o=t[2].default,u=Ut(o,t,t[1],null);return{c(){e=v("div"),u&&u.c(),e.hidden=!0},m(s,a){A(s,e,a),u&&u.m(e,null),i=!0,l||(r=tn(n=ib.call(null,e,t[0])),l=!0)},p(s,[a]){u&&u.p&&(!i||a&2)&&zt(u,o,s,s[1],i?Ht(o,s[1],a,null):jt(s[1]),null),n&&Ge(n.update)&&a&1&&n.update.call(null,s[0])},i(s){i||(U(u,s),i=!0)},o(s){Z(u,s),i=!1},d(s){s&&C(e),u&&u.d(s),l=!1,r()}}}function ib(t,e="body"){let n;async function i(r){if(e=r,typeof e=="string"){if(n=document.querySelector(e),n===null&&(await le.tick(),n=document.querySelector(e)),n===null)throw new Error(`No element found matching css selector: "${e}"`)}else if(e instanceof HTMLElement)n=e;else throw new TypeError(`Unknown portal target type: ${e===null?"null":typeof e}. Allowed types: string (CSS selector) or HTMLElement.`);n.appendChild(t),t.hidden=!1}function l(){t.parentNode&&t.parentNode.removeChild(t)}return i(e),{update:i,destroy:l}}function lb(t,e,n){let{$$slots:i={},$$scope:l}=e,{target:r="body"}=e;return t.$$set=o=>{"target"in o&&n(0,r=o.target),"$$scope"in o&&n(1,l=o.$$scope)},[r,l,i]}class rb extends Ze{constructor(e){super(),Qe(this,e,lb,nb,Ye,{target:0})}}function wf(t,e){let n,i=e;const l=()=>{r(i)},r=u=>{const{anchor:s,align:a,maxHeight:f,maxWidth:c,minWidth:g=0,useAnchorWidth:h,offset:d=5,customUpdate:_,offsetBelow:b}=u;if(!s)return;const w=s.getBoundingClientRect(),E=t.getBoundingClientRect();let k={maxHeight:null,minWidth:null,maxWidth:c,left:null,top:null};typeof _=="function"?k=_(w,E,k):(a==="right-outside"||a==="left-outside"?k.top=w.top:window.innerHeight-w.bottom<(f||50)?(k.top=w.top-E.height-d,k.maxHeight=f||240):(k.top=w.bottom+(b||d),k.maxHeight=f||window.innerHeight-w.bottom-20),!c&&h&&(k.maxWidth=w.width),h?k.minWidth=Math.max(g,w.width):g&&(k.minWidth=g),a==="right"?k.left=w.left+w.width-E.width:a==="right-outside"?k.left=w.right+d:a==="left-outside"?k.left=w.left-E.width-d:k.left=w.left),Object.entries(k).forEach(([I,O])=>{O!=null?t.style[I]=`${O.toFixed(0)}px`:t.style[I]=null})},o=u=>{i=u,n&&n.disconnect();const{anchor:s}=u;s&&(n=new ResizeObserver(()=>r(u)),n.observe(s),n.observe(t),n.observe(document.body))};return t.style.position="absolute",t.style.zIndex="9999",document.addEventListener("scroll",l,!0),o(e),{update:o,destroy(){n&&n.disconnect(),document.removeEventListener("scroll",l,!0)}}}const ob=[".flatpickr-calendar",".spectrum-Popover",".download-js-link"];let rr=[];const kf=t=>{if(!t.target.closest('[data-ignore-click-outside="true"]')){for(let e of ob)if(t.target.closest(e))return;rr.forEach(e=>{var l;if(e.element.contains(t.target))return;const n=e.anchor.closest(".spectrum-Underlay")!=null;t.target.closest(".spectrum-Underlay")!=null&&!n||(l=e.callback)==null||l.call(e,t)})}};document.documentElement.addEventListener("click",kf,!0),document.documentElement.addEventListener("contextmenu",kf,!0);const sb=(t,e,n,i)=>{let l=rr.find(r=>r.id===t);l?l.callback=i:rr.push({id:t,element:e,anchor:n,callback:i})},ub=t=>{rr=rr.filter(e=>e.id!==t)},yf=(t,e)=>{const n=Math.random(),i=l=>{const r=(l==null?void 0:l.callback)||l,o=(l==null?void 0:l.anchor)||t;sb(n,t,o,r)};return i(e),{update:i,destroy:()=>ub(n)}};function Ef(t){const e=t-1;return e*e*e+1}function vf(t){return--t*t*t*t*t+1}function zr(t,{delay:e=0,duration:n=400,easing:i=Ef,x:l=0,y:r=0,opacity:o=0}={}){const u=getComputedStyle(t),s=+u.opacity,a=u.transform==="none"?"":u.transform,f=s*(1-o),[c,g]=Is(l),[h,d]=Is(r);return{delay:e,duration:n,easing:i,css:(_,b)=>`
|
|
8
|
-
transform: ${a} translate(${(1-_)*c}${g}, ${(1-_)*h}${d});
|
|
9
|
-
opacity: ${s-f*b}`}}function Sf(t,{delay:e=0,duration:n=400,easing:i=Ef,axis:l="y"}={}){const r=getComputedStyle(t),o=+r.opacity,u=l==="y"?"height":"width",s=parseFloat(r[u]),a=l==="y"?["top","bottom"]:["left","right"],f=a.map(w=>`${w[0].toUpperCase()}${w.slice(1)}`),c=parseFloat(r[`padding${f[0]}`]),g=parseFloat(r[`padding${f[1]}`]),h=parseFloat(r[`margin${f[0]}`]),d=parseFloat(r[`margin${f[1]}`]),_=parseFloat(r[`border${f[0]}Width`]),b=parseFloat(r[`border${f[1]}Width`]);return{delay:e,duration:n,easing:i,css:w=>`overflow: hidden;opacity: ${Math.min(w*20,1)*o};${u}: ${w*s}px;padding-${a[0]}: ${w*c}px;padding-${a[1]}: ${w*g}px;margin-${a[0]}: ${w*h}px;margin-${a[1]}: ${w*d}px;border-${a[0]}-width: ${w*_}px;border-${a[1]}-width: ${w*b}px;`}}function Cf(t){let e,n;return e=new rb({props:{target:t[17],$$slots:{default:[ab]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l&131072&&(r.target=i[17]),l&537001983&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function ab(t){let e,n,i,l,r,o,u,s;const a=t[27].default,f=Ut(a,t,t[29],null);return{c(){e=v("div"),f&&f.c(),m(e,"tabindex","0"),m(e,"class",n=bt("spectrum-Popover is-open "+t[16])+" svelte-af3l1o"),m(e,"role","presentation"),P(e,"height",t[11]),P(e,"--customZindex",t[13]),p(e,"customZindex",t[13]),p(e,"hide-popover",t[0]&&!t[15])},m(c,g){A(c,e,g),f&&f.m(e,null),t[28](e),o=!0,u||(s=[tn(i=wf.call(null,e,{anchor:t[2],align:t[3],maxHeight:t[6],maxWidth:t[5],minWidth:t[4],useAnchorWidth:t[7],offset:t[9],offsetBelow:t[10],customUpdate:t[14]})),tn(l=yf.call(null,e,{callback:t[8]?t[18]:Af,anchor:t[2]})),B(e,"keydown",t[19])],u=!0)},p(c,g){t=c,f&&f.p&&(!o||g&536870912)&&zt(f,a,t,t[29],o?Ht(a,t[29],g,null):jt(t[29]),null),(!o||g&65536&&n!==(n=bt("spectrum-Popover is-open "+t[16])+" svelte-af3l1o"))&&m(e,"class",n),(!o||g&2048)&&P(e,"height",t[11]),(!o||g&8192)&&P(e,"--customZindex",t[13]),i&&Ge(i.update)&&g&18172&&i.update.call(null,{anchor:t[2],align:t[3],maxHeight:t[6],maxWidth:t[5],minWidth:t[4],useAnchorWidth:t[7],offset:t[9],offsetBelow:t[10],customUpdate:t[14]}),l&&Ge(l.update)&&g&260&&l.update.call(null,{callback:t[8]?t[18]:Af,anchor:t[2]}),(!o||g&73728)&&p(e,"customZindex",t[13]),(!o||g&98305)&&p(e,"hide-popover",t[0]&&!t[15])},i(c){o||(U(f,c),c&&ni(()=>{o&&(r||(r=Il(e,zr,{y:-20,duration:t[12]?200:0},!0)),r.run(1))}),o=!0)},o(c){Z(f,c),c&&(r||(r=Il(e,zr,{y:-20,duration:t[12]?200:0},!1)),r.run(0)),o=!1},d(c){c&&C(e),f&&f.d(c),t[28](null),c&&r&&r.end(),u=!1,Ve(s)}}}function fb(t){let e,n,i=t[0]&&Cf(t);return{c(){i&&i.c(),e=Fe()},m(l,r){i&&i.m(l,r),A(l,e,r),n=!0},p(l,[r]){l[0]?i?(i.p(l,r),r&1&&U(i,1)):(i=Cf(l),i.c(),U(i,1),i.m(e.parentNode,e)):i&&(He(),Z(i,1,1,()=>{i=null}),ze())},i(l){n||(U(i),n=!0)},o(l){Z(i),n=!1},d(l){l&&C(e),i&&i.d(l)}}}const Af=()=>{};function cb(t,e,n){let i,{$$slots:l={},$$scope:r}=e;const o=le.createEventDispatcher();let{anchor:u}=e,{align:s="right"}=e,{portalTarget:a}=e,{minWidth:f}=e,{maxWidth:c}=e,{maxHeight:g}=e,{open:h=!1}=e,{useAnchorWidth:d=!1}=e,{dismissible:_=!0}=e,{offset:b=5}=e,{offsetBelow:w}=e,{customHeight:E}=e,{animate:k=!0}=e,{customZindex:I}=e,{handlePositionUpdate:O}=e,{showPopover:D=!0}=e,{clickOutsideOverride:N=!1}=e,{ignoreAnchor:M=!0}=e,{popup:V}=e,{className:W}=e;const ne=()=>{o("open"),n(0,h=!0)},H=()=>{o("close"),n(0,h=!1)},$=()=>{h?H():ne()},Y=()=>viewport.matches(":focus-within"),G=J=>{if(!N&&h){let q=J.target,j=!1;for(;!j&&q&&q.parentNode;)j=q===u,q=q.parentNode;(!j||j&&!M)&&H()}};function oe(J){N&&h&&J.key==="Escape"&&H()}function ie(J){Be[J?"unshift":"push"](()=>{V=J,n(1,V)})}return t.$$set=J=>{"anchor"in J&&n(2,u=J.anchor),"align"in J&&n(3,s=J.align),"portalTarget"in J&&n(20,a=J.portalTarget),"minWidth"in J&&n(4,f=J.minWidth),"maxWidth"in J&&n(5,c=J.maxWidth),"maxHeight"in J&&n(6,g=J.maxHeight),"open"in J&&n(0,h=J.open),"useAnchorWidth"in J&&n(7,d=J.useAnchorWidth),"dismissible"in J&&n(8,_=J.dismissible),"offset"in J&&n(9,b=J.offset),"offsetBelow"in J&&n(10,w=J.offsetBelow),"customHeight"in J&&n(11,E=J.customHeight),"animate"in J&&n(12,k=J.animate),"customZindex"in J&&n(13,I=J.customZindex),"handlePositionUpdate"in J&&n(14,O=J.handlePositionUpdate),"showPopover"in J&&n(15,D=J.showPopover),"clickOutsideOverride"in J&&n(21,N=J.clickOutsideOverride),"ignoreAnchor"in J&&n(22,M=J.ignoreAnchor),"popup"in J&&n(1,V=J.popup),"className"in J&&n(16,W=J.className),"$$scope"in J&&n(29,r=J.$$scope)},t.$$.update=()=>{t.$$.dirty&1048576&&n(17,i=a||".spectrum")},[h,V,u,s,f,c,g,d,_,b,w,E,k,I,O,D,W,i,G,oe,a,N,M,ne,H,$,Y,l,ie,r]}class wn extends Ze{constructor(e){super(),Qe(this,e,cb,fb,Ye,{anchor:2,align:3,portalTarget:20,minWidth:4,maxWidth:5,maxHeight:6,open:0,useAnchorWidth:7,dismissible:8,offset:9,offsetBelow:10,customHeight:11,animate:12,customZindex:13,handlePositionUpdate:14,showPopover:15,clickOutsideOverride:21,ignoreAnchor:22,popup:1,className:16,show:23,hide:24,toggle:25,hasFocus:26})}get show(){return this.$$.ctx[23]}get hide(){return this.$$.ctx[24]}get toggle(){return this.$$.ctx[25]}get hasFocus(){return this.$$.ctx[26]}}function Ft(t,e={}){const n=new Set;let i;function l(f){if(!(f instanceof Function))throw new TypeError("callback is not a function");return n.add(f),f(t),()=>n.delete(f)}function r(f,c,g){const h={from:t,to:f,event:c,args:g};o("_exit",h),t=f,n.forEach(d=>d(t)),o("_enter",h)}function o(f,...c){var h,d;const g=((h=e[t])==null?void 0:h[f])??((d=e["*"])==null?void 0:d[f]);return g instanceof Function?g.apply(i,c):g}function u(f,...c){var h;const g=(h=o(f,...c))==null?void 0:h.valueOf();return["string","symbol"].includes(typeof g)&&g!==t&&r(g,f,c),t}const s={};async function a(f,c=100,...g){return clearTimeout(s[f]),c===null?t:(await new Promise(h=>s[f]=setTimeout(h,c)),delete s[f],u(f,...g))}return i=new Proxy({subscribe:l},{get(f,c){return Reflect.has(f,c)||(f[c]=u.bind(null,c),f[c].debounce=a.bind(null,c)),Reflect.get(f,c)}}),o("_enter",{from:null,to:t,event:null,args:[]}),i}const Gn={S:{cellPadding:"0.4rem",rowFontSize:12,rowHeight:32,headerFontSize:10,headerHeight:32,checkboxSize:12},M:{cellPadding:"0.5rem",rowFontSize:13,rowHeight:36,headerFontSize:11,headerHeight:38,checkboxSize:14},L:{cellPadding:"0.85rem",rowFontSize:15,rowHeight:42,headerFontSize:12,headerHeight:48,checkboxSize:14}},Tf={string:"fuzzy",longform:"fuzzy",formula:"fuzzy",array:"contains",options:"equal",datetime:"rangeLow",boolean:"equal",number:"equal",bigint:"equal",link:"fuzzy",bb_reference_single:"equal",bb_reference:"equal"},db={string:!0,longform:!0,array:!0,options:!0,datetime:!0,boolean:!0,number:!0,bigint:!0,link:!0,bb_reference_single:!1,bb_reference:!1},hb={string:!0,longform:!0,formula:!0,array:!0,options:!0,datetime:!0,boolean:!0,number:!0,bigint:!0},gb={string:!0,longform:!0,array:!0,link:!0,json:!0,bb_reference:!0,bb_reference_single:!0,options:!0,datetime:!0,boolean:!0,number:!0,bigint:!0,attachment:!0,attachment_single:!0};function If(t){let e,n,i,l;return{c(){e=v("div"),n=v("div"),m(n,"class","stb-scrollbar-indicator svelte-fhqbbj"),p(n,"dragging",t[12]),P(n,"top",t[19]),P(n,"height",t[18]),m(e,"class","stb-scrollbar svelte-fhqbbj"),p(e,"highlighted",t[1]),P(e,"--offset",t[22]),P(e,"--bottomOffset",t[21])},m(r,o){A(r,e,o),S(e,n),i||(l=B(n,"mousedown",Ii(t[34])),i=!0)},p(r,o){o[0]&4096&&p(n,"dragging",r[12]),o[0]&524288&&P(n,"top",r[19]),o[0]&262144&&P(n,"height",r[18]),o[0]&2&&p(e,"highlighted",r[1]),o[0]&4194304&&P(e,"--offset",r[22]),o[0]&2097152&&P(e,"--bottomOffset",r[21])},d(r){r&&C(e),i=!1,l()}}}function Df(t){let e,n,i,l,r;return{c(){e=v("div"),n=v("div"),m(n,"class","stb-scrollbar-indicator horizontal svelte-fhqbbj"),p(n,"dragging",t[13]),P(n,"left",t[16]),P(n,"width",t[15]),m(e,"class","stb-scrollbar horizontal svelte-fhqbbj"),ni(()=>t[36].call(e)),p(e,"highlighted",t[1]),P(e,"--horizontalOffset",t[2]),P(e,"--horizontalBottomOffset",t[20])},m(o,u){A(o,e,u),S(e,n),i=fo(e,t[36].bind(e)),l||(r=B(n,"mousedown",Ii(t[35])),l=!0)},p(o,u){u[0]&8192&&p(n,"dragging",o[13]),u[0]&65536&&P(n,"left",o[16]),u[0]&32768&&P(n,"width",o[15]),u[0]&2&&p(e,"highlighted",o[1]),u[0]&4&&P(e,"--horizontalOffset",o[2]),u[0]&1048576&&P(e,"--horizontalBottomOffset",o[20])},d(o){o&&C(e),i(),l=!1,r()}}}function mb(t){let e,n,i,l,r=t[10]&&If(t),o=t[11]&&Df(t);return{c(){r&&r.c(),e=Q(),o&&o.c(),n=Fe()},m(u,s){r&&r.m(u,s),A(u,e,s),o&&o.m(u,s),A(u,n,s),i||(l=[B(window,"mouseup",t[32]),B(window,"mousemove",function(){Ge(t[12]||t[13]?t[33]:Of)&&(t[12]||t[13]?t[33]:Of).apply(this,arguments)})],i=!0)},p(u,s){t=u,t[10]?r?r.p(t,s):(r=If(t),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),t[11]?o?o.p(t,s):(o=Df(t),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},i:ue,o:ue,d(u){u&&(C(e),C(n)),r&&r.d(u),o&&o.d(u),i=!1,Ve(l)}}}const Of=()=>{};function _b(t,e,n){let i,l,r,o,u,s,a,f;const c=le.getContext("stbScrollPos");Me(t,c,F=>n(6,a=F));const g=le.getContext("stbHorizontalScrollPos");Me(t,g,F=>n(5,s=F));const h=le.getContext("stbSettings");Me(t,h,F=>n(31,f=F));let{highlighted:d}=e,{horizontalOffset:_="0px"}=e,{clientHeight:b}=e,{scrollHeight:w}=e,{scrollWidth:E}=e,{visible:k}=e,{horizontalVisible:I}=e,{anchor:O}=e;const D=le.createEventDispatcher();let N,M,V,W,ne,H=!1,$=!1,Y=0,G,oe,ie;const J=()=>{O&&(n(10,W=Math.max(w-b,0)),n(11,ne=(O==null?void 0:O.scrollWidth)-(O==null?void 0:O.clientWidth)),n(28,k=W),n(29,I=ne),n(27,E=O==null?void 0:O.scrollWidth),n(15,G=(O==null?void 0:O.clientWidth)/(O==null?void 0:O.scrollWidth)*100+"%"))};le.afterUpdate(()=>{J==null||J()});const q=()=>{n(12,H=!1),n(13,$=!1),n(14,Y=0),n(7,N=0),n(9,V=0)},j=F=>{H&&(F.preventDefault(),F.stopPropagation(),n(14,Y=(F.clientY-N)*(w/b)+M),Y>0&&Y<=W&&Re(c,a=Y,a),D("positionChange")),$&&(F.preventDefault(),F.stopPropagation(),n(14,Y=(F.clientX-V)*((O==null?void 0:O.scrollWidth)/(O==null?void 0:O.clientWidth))+M),Y>0&&Y<=ne&&Re(g,s=Y,s)),n(0,O.scrollLeft=s,O)},K=F=>{n(12,H=!0),n(7,N=F.clientY),n(8,M=a)},x=F=>{n(13,$=!0),n(9,V=F.clientX),n(8,M=s)};function X(){ie=this.clientWidth,n(17,ie)}return t.$$set=F=>{"highlighted"in F&&n(1,d=F.highlighted),"horizontalOffset"in F&&n(2,_=F.horizontalOffset),"clientHeight"in F&&n(3,b=F.clientHeight),"scrollHeight"in F&&n(4,w=F.scrollHeight),"scrollWidth"in F&&n(27,E=F.scrollWidth),"visible"in F&&n(28,k=F.visible),"horizontalVisible"in F&&n(29,I=F.horizontalVisible),"anchor"in F&&n(0,O=F.anchor)},t.$$.update=()=>{t.$$.dirty[1]&1&&n(22,i=f.appearance.headerHeight+8+"px"),t.$$.dirty[1]&1&&n(21,l=f.appearance.footerHeight+16+"px"),t.$$.dirty[1]&1&&n(20,r=f.appearance.footerHeight+8+"px"),t.$$.dirty[0]&80&&n(19,o=a/(w+32)*100+"%"),t.$$.dirty[0]&134217760&&n(16,oe=s/E*100+"%"),t.$$.dirty[0]&24&&n(18,u=b/w*100+"%")},[O,d,_,b,w,s,a,N,M,V,W,ne,H,$,Y,G,oe,ie,u,o,r,l,i,c,g,h,D,E,k,I,J,f,q,j,K,x,X]}class pb extends Ze{constructor(e){super(),Qe(this,e,_b,mb,Ye,{highlighted:1,horizontalOffset:2,clientHeight:3,scrollHeight:4,scrollWidth:27,visible:28,horizontalVisible:29,anchor:0,calculate:30},null,[-1,-1])}get calculate(){return this.$$.ctx[30]}}function Rf(t){let e,n,i,l;return{c(){e=v("div"),n=v("i"),i=Q(),l=Ee(t[3]),m(n,"class","ri-search-line"),m(e,"class","emptyTable"),P(e,"top",t[0]),P(e,"bottom",t[1])},m(r,o){A(r,e,o),S(e,n),S(e,i),S(e,l)},p(r,o){o&8&&Pe(l,r[3]),o&1&&P(e,"top",r[0]),o&2&&P(e,"bottom",r[1])},d(r){r&&C(e)}}}function bb(t){let e,n=t[2]&&Rf(t);return{c(){n&&n.c(),e=Fe()},m(i,l){n&&n.m(i,l),A(i,e,l)},p(i,[l]){i[2]?n?n.p(i,l):(n=Rf(i),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:ue,o:ue,d(i){i&&C(e),n&&n.d(i)}}}function wb(t,e,n){let{top:i}=e,{bottom:l}=e,{isEmpty:r}=e,{message:o="No Records Found"}=e;return t.$$set=u=>{"top"in u&&n(0,i=u.top),"bottom"in u&&n(1,l=u.bottom),"isEmpty"in u&&n(2,r=u.isEmpty),"message"in u&&n(3,o=u.message)},[i,l,r,o]}class kb extends Ze{constructor(e){super(),Qe(this,e,wb,bb,Ye,{top:0,bottom:1,isEmpty:2,message:3})}}function Pf(t){let e,n,i,l,r;function o(a,f){return a[5]=="Saving"?Eb:yb}let u=o(t),s=u(t);return{c(){e=v("div"),e.innerHTML="<span>+</span>",n=Q(),i=v("div"),s.c(),m(e,"class","overlay-button add-row-overlay"),p(e,"highlighted",t[2]),p(e,"footer",t[3]),p(e,"in-insert",t[6]),m(i,"class","overlay-button save-row-overlay"),p(i,"highlighted",t[2]),p(i,"footer",t[3]),p(i,"in-insert",t[6])},m(a,f){A(a,e,f),A(a,n,f),A(a,i,f),s.m(i,null),l||(r=[B(e,"click",t[7]),B(i,"click",function(){Ge(t[1].insertRow)&&t[1].insertRow.apply(this,arguments)})],l=!0)},p(a,f){t=a,f&4&&p(e,"highlighted",t[2]),f&8&&p(e,"footer",t[3]),f&64&&p(e,"in-insert",t[6]),u!==(u=o(t))&&(s.d(1),s=u(t),s&&(s.c(),s.m(i,null))),f&4&&p(i,"highlighted",t[2]),f&8&&p(i,"footer",t[3]),f&64&&p(i,"in-insert",t[6])},d(a){a&&(C(e),C(n),C(i)),s.d(),l=!1,Ve(r)}}}function yb(t){let e;return{c(){e=v("i"),e.innerHTML="",m(e,"class","ri-save-fill")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Eb(t){let e;return{c(){e=v("i"),m(e,"class","ri-loader-2-line")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Mf(t){let e,n,i;return{c(){e=v("div"),e.innerHTML='<i class="ri-filter-off-line"></i>',m(e,"class","overlay-button filter-row-overlay"),p(e,"highlighted",t[2]),p(e,"footer",t[3])},m(l,r){A(l,e,r),n||(i=B(e,"click",function(){Ge(t[0].clear())&&t[0].clear().apply(this,arguments)}),n=!0)},p(l,r){t=l,r&4&&p(e,"highlighted",t[2]),r&8&&p(e,"footer",t[3])},d(l){l&&C(e),n=!1,i()}}}function vb(t){var r;let e,n,i=(t[5]=="Idle"||t[6]||((r=t[4])==null?void 0:r.length))&&Pf(t),l=t[5]=="Filtered"&&Mf(t);return{c(){i&&i.c(),e=Q(),l&&l.c(),n=Fe()},m(o,u){i&&i.m(o,u),A(o,e,u),l&&l.m(o,u),A(o,n,u)},p(o,[u]){var s;o[5]=="Idle"||o[6]||(s=o[4])!=null&&s.length?i?i.p(o,u):(i=Pf(o),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null),o[5]=="Filtered"?l?l.p(o,u):(l=Mf(o),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i:ue,o:ue,d(o){o&&(C(e),C(n)),i&&i.d(o),l&&l.d(o)}}}function Sb(t,e,n){let i,l,r=ue,o=()=>(r(),r=ft(u,h=>n(5,l=h)),u);t.$$.on_destroy.push(()=>r());let{stbState:u}=e;o();let{tableAPI:s}=e,{highlighted:a}=e,{footer:f}=e,{tableActions:c}=e;const g=()=>i?u.cancelAddRow():u.addRow();return t.$$set=h=>{"stbState"in h&&o(n(0,u=h.stbState)),"tableAPI"in h&&n(1,s=h.tableAPI),"highlighted"in h&&n(2,a=h.highlighted),"footer"in h&&n(3,f=h.footer),"tableActions"in h&&n(4,c=h.tableActions)},t.$$.update=()=>{t.$$.dirty&32&&n(6,i=l=="Inserting")},[u,s,a,f,c,l,i,g]}class Cb extends Ze{constructor(e){super(),Qe(this,e,Sb,vb,Ye,{stbState:0,tableAPI:1,highlighted:2,footer:3,tableActions:4})}}function Nf(t,e,n){const i=t.slice();return i[16]=e[n].text,i[17]=e[n].icon,i[18]=e[n].disabled,i[19]=e[n].type,i[20]=e[n].size,i[21]=e[n].onClick,i}function Lf(t){let e,n,i,l,r=t[10].length==1?t[10].length+" "+(t[8]||"Row")+" ":t[10].length+" "+(t[7]||"Rows")+" ",o,u,s,a,f;n=new el({props:{icon:"ri-close-line",quiet:!0,size:"S",type:"secondary",onClick:t[15]}});let c=Ce(t[5]),g=[];for(let d=0;d<c.length;d+=1)g[d]=Ff(Nf(t,c,d));const h=d=>Z(g[d],1,1,()=>{g[d]=null});return{c(){e=v("div"),We(n.$$.fragment),i=Q(),l=v("span"),o=Ee(r),u=Ee(" Selected"),s=Q();for(let d=0;d<g.length;d+=1)g[d].c();m(l,"class","text"),m(e,"class","selected-row-actions-overlay"),p(e,"highlighted",t[3]),p(e,"footer",t[4]),P(e,"bottom",t[9].appearance.footerHeight+20),P(e,"left",t[12])},m(d,_){A(d,e,_),je(n,e,null),S(e,i),S(e,l),S(l,o),S(l,u),S(e,s);for(let b=0;b<g.length;b+=1)g[b]&&g[b].m(e,null);f=!0},p(d,_){const b={};if(_&2048&&(b.onClick=d[15]),n.$set(b),(!f||_&1408)&&r!==(r=d[10].length==1?d[10].length+" "+(d[8]||"Row")+" ":d[10].length+" "+(d[7]||"Rows")+" ")&&Pe(o,r),_&36){c=Ce(d[5]);let w;for(w=0;w<c.length;w+=1){const E=Nf(d,c,w);g[w]?(g[w].p(E,_),U(g[w],1)):(g[w]=Ff(E),g[w].c(),U(g[w],1),g[w].m(e,null))}for(He(),w=c.length;w<g.length;w+=1)h(w);ze()}(!f||_&8)&&p(e,"highlighted",d[3]),(!f||_&16)&&p(e,"footer",d[4]),_&512&&P(e,"bottom",d[9].appearance.footerHeight+20),_&4096&&P(e,"left",d[12])},i(d){if(!f){U(n.$$.fragment,d);for(let _=0;_<c.length;_+=1)U(g[_]);d&&ni(()=>{f&&(a||(a=Il(e,Sf,{delay:25,duration:230,easing:vf,axis:"y"},!0)),a.run(1))}),f=!0}},o(d){Z(n.$$.fragment,d),g=g.filter(Boolean);for(let _=0;_<g.length;_+=1)Z(g[_]);d&&(a||(a=Il(e,Sf,{delay:25,duration:230,easing:vf,axis:"y"},!1)),a.run(0)),f=!1},d(d){d&&C(e),qe(n),St(g,d),d&&a&&a.end()}}}function Ff(t){let e,n;return e=new el({props:{text:t[16],icon:t[17],quiet:!0,type:t[19],disabled:t[18],size:t[20],onClick:t[2].executeSelectedRowsAction(t[21])}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l&32&&(r.text=i[16]),l&32&&(r.icon=i[17]),l&32&&(r.type=i[19]),l&32&&(r.disabled=i[18]),l&32&&(r.size=i[20]),l&36&&(r.onClick=i[2].executeSelectedRowsAction(i[21])),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Ab(t){let e,n,i=t[10].length&&t[13]!="Inserting"&&!t[11]&&Lf(t);return{c(){i&&i.c(),e=Fe()},m(l,r){i&&i.m(l,r),A(l,e,r),n=!0},p(l,[r]){l[10].length&&l[13]!="Inserting"&&!l[11]?i?(i.p(l,r),r&11264&&U(i,1)):(i=Lf(l),i.c(),U(i,1),i.m(e.parentNode,e)):i&&(He(),Z(i,1,1,()=>{i=null}),ze())},i(l){n||(U(i),n=!0)},o(l){Z(i),n=!1},d(l){l&&C(e),i&&i.d(l)}}}function Tb(t,e,n){let i,l,r,o=ue,u=()=>(o(),o=ft(_,V=>n(9,r=V)),_),s,a=ue,f=()=>(a(),a=ft(I,V=>n(10,s=V)),I),c,g=ue,h=()=>(g(),g=ft(d,V=>n(13,c=V)),d);t.$$.on_destroy.push(()=>o()),t.$$.on_destroy.push(()=>a()),t.$$.on_destroy.push(()=>g());let{stbState:d}=e;h();let{stbSettings:_}=e;u();let{tableAPI:b}=e,{highlighted:w}=e,{footer:E}=e,{selectedActions:k}=e,{stbSelected:I}=e;f();let{entityPlural:O="Rows"}=e,{entitySingular:D="Row"}=e,N;const M=()=>n(11,N=!0);return t.$$set=V=>{"stbState"in V&&h(n(0,d=V.stbState)),"stbSettings"in V&&u(n(1,_=V.stbSettings)),"tableAPI"in V&&n(2,b=V.tableAPI),"highlighted"in V&&n(3,w=V.highlighted),"footer"in V&&n(4,E=V.footer),"selectedActions"in V&&n(5,k=V.selectedActions),"stbSelected"in V&&f(n(6,I=V.stbSelected)),"entityPlural"in V&&n(7,O=V.entityPlural),"entitySingular"in V&&n(8,D=V.entitySingular)},t.$$.update=()=>{t.$$.dirty&1024&&s.length==0&&n(11,N=!1),t.$$.dirty&512&&n(14,i=!r.appearance.hideSelectionColumn),t.$$.dirty&16896&&n(12,l=1+(i+r.features.canDelete+r.appearance.numberingColumn)*2+"rem")},[d,_,b,w,E,k,I,O,D,r,s,N,l,c,i,M]}class Ib extends Ze{constructor(e){super(),Qe(this,e,Tb,Ab,Ye,{stbState:0,stbSettings:1,tableAPI:2,highlighted:3,footer:4,selectedActions:5,stbSelected:6,entityPlural:7,entitySingular:8})}}function Db(t){let e;return{c(){e=v("div"),e.innerHTML='<i class="ri-refresh-line"></i>',m(e,"class","overlay-button loader-overlay")},m(n,i){A(n,e,i)},p:ue,i:ue,o:ue,d(n){n&&C(e)}}}class Ob extends Ze{constructor(e){super(),Qe(this,e,null,Db,Ye,{})}}function Vf(t,e,n){const i=t.slice();return i[28]=e[n],i}function Rb(t){let e,n,i=(t[1].displayName??t[1].name)+"",l,r,o;return{c(){var u;e=v("div"),n=v("div"),l=Ee(i),m(n,"class","innerText svelte-tfp4ht"),p(n,"sortable",t[1].canSort),m(e,"class","headerLabel"),P(e,"justify-content",(u=t[1])==null?void 0:u.headerAlign)},m(u,s){A(u,e,s),S(e,n),S(n,l),r||(o=B(e,"click",t[12].headerClicked),r=!0)},p(u,s){var a;s[0]&2&&i!==(i=(u[1].displayName??u[1].name)+"")&&Pe(l,i),s[0]&2&&p(n,"sortable",u[1].canSort),s[0]&2&&P(e,"justify-content",(a=u[1])==null?void 0:a.headerAlign)},i:ue,o:ue,d(u){u&&C(e),r=!1,o()}}}function Pb(t){let e,n,i,l,r=t[1].canFilter=="advanced"&&Bf(t);var o=t[1].headerComponent;function u(s,a){return{props:{cellOptions:{...s[9],placeholder:s[6],disabled:s[6]=="empty"||s[6]=="notEmpty"},value:s[5],fieldSchema:s[1].schema,multi:s[6]=="containsAny"||s[6]=="oneOf"}}}return o&&(n=Sl(o,u(t)),n.$on("change",t[13]),n.$on("cancel",t[12].cancel),n.$on("focusout",t[15])),{c(){r&&r.c(),e=Q(),n&&We(n.$$.fragment),i=Fe()},m(s,a){r&&r.m(s,a),A(s,e,a),n&&je(n,s,a),A(s,i,a),l=!0},p(s,a){if(s[1].canFilter=="advanced"?r?r.p(s,a):(r=Bf(s),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),a[0]&2&&o!==(o=s[1].headerComponent)){if(n){He();const f=n;Z(f.$$.fragment,1,0,()=>{qe(f,1)}),ze()}o?(n=Sl(o,u(s)),n.$on("change",s[13]),n.$on("cancel",s[12].cancel),n.$on("focusout",s[15]),We(n.$$.fragment),U(n.$$.fragment,1),je(n,i.parentNode,i)):n=null}else if(o){const f={};a[0]&576&&(f.cellOptions={...s[9],placeholder:s[6],disabled:s[6]=="empty"||s[6]=="notEmpty"}),a[0]&32&&(f.value=s[5]),a[0]&2&&(f.fieldSchema=s[1].schema),a[0]&64&&(f.multi=s[6]=="containsAny"||s[6]=="oneOf"),n.$set(f)}},i(s){l||(n&&U(n.$$.fragment,s),l=!0)},o(s){n&&Z(n.$$.fragment,s),l=!1},d(s){s&&(C(e),C(i)),r&&r.d(s),n&&qe(n,s)}}}function Bf(t){let e,n,i;return{c(){e=v("i"),m(e,"class","ri-filter-3-line svelte-tfp4ht"),m(e,"tabindex","0"),P(e,"align-self","center"),P(e,"font-size","14px")},m(l,r){A(l,e,r),n||(i=B(e,"click",Et(t[18])),n=!0)},p:ue,d(l){l&&C(e),n=!1,i()}}}function Uf(t){let e,n,i,l=(t[7]||t[0])&&Hf(t);return{c(){e=v("span"),l&&l.c(),m(e,"class","placeholder svelte-tfp4ht")},m(r,o){A(r,e,o),l&&l.m(e,null),n||(i=B(e,"click",t[12].sort),n=!0)},p(r,o){r[7]||r[0]?l?l.p(r,o):(l=Hf(r),l.c(),l.m(e,null)):l&&(l.d(1),l=null)},d(r){r&&C(e),l&&l.d(),n=!1,i()}}}function Hf(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[0]=="ascending"?"ri-sort-asc":"ri-sort-desc")+" svelte-tfp4ht"),p(e,"sorted",t[0])},m(i,l){A(i,e,l)},p(i,l){l[0]&1&&n!==(n=bt(i[0]=="ascending"?"ri-sort-asc":"ri-sort-desc")+" svelte-tfp4ht")&&m(e,"class",n),l[0]&1&&p(e,"sorted",i[0])},d(i){i&&C(e)}}}function zf(t){let e,n;return e=new wn({props:{anchor:t[3],open:t[4],align:"left",minWidth:160,$$slots:{default:[Mb]},$$scope:{ctx:t}}}),e.$on("close",t[23]),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&8&&(r.anchor=i[3]),l[0]&16&&(r.open=i[4]),l[0]&66|l[1]&1&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function jf(t){let e,n,i=t[28].label+"",l,r,o,u;function s(){return t[22](t[28])}return{c(){e=v("li"),n=v("span"),l=Ee(i),r=Q(),m(n,"class","spectrum-Menu-itemLabel"),m(e,"class","spectrum-Menu-item svelte-tfp4ht"),m(e,"role","menuitem"),p(e,"selected",t[28].value==t[6])},m(a,f){A(a,e,f),S(e,n),S(n,l),S(e,r),o||(u=B(e,"mousedown",Et(s)),o=!0)},p(a,f){t=a,f[0]&2&&i!==(i=t[28].label+"")&&Pe(l,i),f[0]&66&&p(e,"selected",t[28].value==t[6])},d(a){a&&C(e),o=!1,u()}}}function Mb(t){let e,n=Ce(t[1].filteringOperators),i=[];for(let l=0;l<n.length;l+=1)i[l]=jf(Vf(t,n,l));return{c(){e=v("ul");for(let l=0;l<i.length;l+=1)i[l].c();m(e,"class","spectrum-Menu"),m(e,"role","menu"),P(e,"background-color","var(--spectrum-global-color-gray-75 )")},m(l,r){A(l,e,r);for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(e,null)},p(l,r){if(r[0]&16450){n=Ce(l[1].filteringOperators);let o;for(o=0;o<n.length;o+=1){const u=Vf(l,n,o);i[o]?i[o].p(u,r):(i[o]=jf(u),i[o].c(),i[o].m(e,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=n.length}},d(l){l&&C(e),St(i,l)}}}function Nb(t){let e,n,i,l,r,o,u,s,a;const f=[Pb,Rb],c=[];function g(_,b){return _[2]=="Entering"||_[2]=="Filtered"?0:1}n=g(t),i=c[n]=f[n](t);let h=t[1].canSort&&t[2]=="Idle"&&Uf(t),d=t[1].canFilter=="advanced"&&t[2]!="Idle"&&zf(t);return{c(){e=v("div"),i.c(),l=Q(),h&&h.c(),r=Q(),d&&d.c(),o=Fe(),m(e,"class","super-column-header svelte-tfp4ht"),p(e,"isEntering",t[8]),p(e,"filtered",t[2]=="Filtered"),p(e,"idle",t[2]!="Entering"&&t[2]!="Filtered"),P(e,"padding-left",t[9].padding),P(e,"padding-right",t[9].padding)},m(_,b){A(_,e,b),c[n].m(e,null),S(e,l),h&&h.m(e,null),t[19](e),A(_,r,b),d&&d.m(_,b),A(_,o,b),u=!0,s||(a=[B(e,"mouseenter",t[20]),B(e,"mouseleave",t[21])],s=!0)},p(_,b){let w=n;n=g(_),n===w?c[n].p(_,b):(He(),Z(c[w],1,1,()=>{c[w]=null}),ze(),i=c[n],i?i.p(_,b):(i=c[n]=f[n](_),i.c()),U(i,1),i.m(e,l)),_[1].canSort&&_[2]=="Idle"?h?h.p(_,b):(h=Uf(_),h.c(),h.m(e,null)):h&&(h.d(1),h=null),(!u||b[0]&256)&&p(e,"isEntering",_[8]),(!u||b[0]&4)&&p(e,"filtered",_[2]=="Filtered"),(!u||b[0]&4)&&p(e,"idle",_[2]!="Entering"&&_[2]!="Filtered"),b[0]&512&&P(e,"padding-left",_[9].padding),b[0]&512&&P(e,"padding-right",_[9].padding),_[1].canFilter=="advanced"&&_[2]!="Idle"?d?(d.p(_,b),b[0]&6&&U(d,1)):(d=zf(_),d.c(),U(d,1),d.m(o.parentNode,o)):d&&(He(),Z(d,1,1,()=>{d=null}),ze())},i(_){u||(U(i),U(d),u=!0)},o(_){Z(i),Z(d),u=!1},d(_){_&&(C(e),C(r),C(o)),c[n].d(),h&&h.d(),t[19](null),d&&d.d(_),s=!1,Ve(a)}}}function Lb(t,e,n){let i,l,r,o,u;const s=le.getContext("stColumnOptions");Me(t,s,G=>n(1,r=G));const a=le.getContext("stHeaderCellOptions");Me(t,a,G=>n(9,u=G));const f=le.getContext("stColumnState");Me(t,f,G=>n(2,o=G));const{API:c}=le.getContext("sdk");let{sorted:g}=e,h,d=!1,_,b=r.defaultFilteringOperator,w,E,k;const I=G=>{G.detail!=null&&G.detail!=null&&G.detail!=""?(n(5,_=G.detail),r.schema.type=="boolean"&&_===!1?f.filter(O("notEqual",!0)):Array.isArray(G.detail)&&G.detail.length==0?f.clear():f.filter(O(b,_))):(n(4,d=!1),n(5,_=null),f.clear())},O=(G,oe)=>{let ie;return G=="oneOf"&&!Array.isArray(oe)?ie=oe.split(","):G!="oneOf"&&G!="containsAny"&&Array.isArray(oe)?(ie=oe[0],n(5,_=ie)):ie=oe,{field:E,operator:G,value:ie,type:i?"string":r.schema.type,valueType:"Value"}},D=G=>{n(6,b=G),(_||G=="empty"||G=="notEmpty")&&f.filter(O(b,_??"")),n(4,d=!1)},N=G=>{h.matches(":focus-within")||f.cancel()},M=async G=>{G&&n(16,w=await c.fetchTableDefinition(G))},V=()=>n(4,d=!d);function W(G){Be[G?"unshift":"push"](()=>{h=G,n(3,h)})}const ne=()=>n(7,k=!0),H=()=>n(7,k=!1),$=G=>D(G.value),Y=()=>{n(4,d=!1),N()};return t.$$set=G=>{"sorted"in G&&n(0,g=G.sorted)},t.$$.update=()=>{t.$$.dirty[0]&2&&n(17,i=r.schema.type=="link"),t.$$.dirty[0]&196610&&i&&!w&&r.canFilter&&M(r.schema.tableId),t.$$.dirty[0]&196610&&(i&&w?E="1:"+r.name+"."+(w==null?void 0:w.primaryDisplay):E=r.name),t.$$.dirty[0]&4&&n(8,l=o=="Entering")},[g,r,o,h,d,_,b,k,l,u,s,a,f,I,D,N,w,i,V,W,ne,H,$,Y]}class Fb extends Ze{constructor(e){super(),Qe(this,e,Lb,Nb,Ye,{sorted:0},null,[-1,-1])}}function Vb(t){let e,n;return e=new t[18]({props:{data:{id:t[15],value:t[11],row:t[0],index:t[1]},scope:t[19].Local,$$slots:{default:[Ub]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&34819&&(r.data={id:i[15],value:i[11],row:i[0],index:i[1]}),l[1]&4096&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Bb(t){let e,n,i,l;var r=t[7].cellComponent;function o(s,a){return{props:{cellOptions:{...s[17],disabled:s[6],error:s[10]},fieldSchema:s[7].schema,ownId:s[0][s[3]],value:s[11]}}}r&&(e=Sl(r,o(t)),e.$on("enteredit",t[35]),e.$on("exitedit",t[21].exitedit),e.$on("change",t[36]),e.$on("linkClick",t[37]));let u=t[10]&&qf(t);return{c(){e&&We(e.$$.fragment),n=Q(),u&&u.c(),i=Fe()},m(s,a){e&&je(e,s,a),A(s,n,a),u&&u.m(s,a),A(s,i,a),l=!0},p(s,a){if(a[0]&128&&r!==(r=s[7].cellComponent)){if(e){He();const f=e;Z(f.$$.fragment,1,0,()=>{qe(f,1)}),ze()}r?(e=Sl(r,o(s)),e.$on("enteredit",s[35]),e.$on("exitedit",s[21].exitedit),e.$on("change",s[36]),e.$on("linkClick",s[37]),We(e.$$.fragment),U(e.$$.fragment,1),je(e,n.parentNode,n)):e=null}else if(r){const f={};a[0]&132160&&(f.cellOptions={...s[17],disabled:s[6],error:s[10]}),a[0]&128&&(f.fieldSchema=s[7].schema),a[0]&9&&(f.ownId=s[0][s[3]]),a[0]&2048&&(f.value=s[11]),e.$set(f)}s[10]?u?u.p(s,a):(u=qf(s),u.c(),u.m(i.parentNode,i)):u&&(u.d(1),u=null)},i(s){l||(e&&U(e.$$.fragment,s),l=!0)},o(s){e&&Z(e.$$.fragment,s),l=!1},d(s){s&&(C(n),C(i)),e&&qe(e,s),u&&u.d(s)}}}function Ub(t){let e;const n=t[34].default,i=Ut(n,t,t[43],null);return{c(){i&&i.c()},m(l,r){i&&i.m(l,r),e=!0},p(l,r){i&&i.p&&(!e||r[1]&4096)&&zt(i,n,l,l[43],e?Ht(n,l[43],r,null):jt(l[43]),null)},i(l){e||(U(i,l),e=!0)},o(l){Z(i,l),e=!1},d(l){i&&i.d(l)}}}function qf(t){let e,n;return{c(){e=v("div"),n=Ee(t[10]),m(e,"class","info svelte-lkaygf"),p(e,"bottom",t[1]==0)},m(i,l){A(i,e,l),S(e,n)},p(i,l){l[0]&1024&&Pe(n,i[10]),l[0]&2&&p(e,"bottom",i[1]==0)},d(i){i&&C(e)}}}function Hb(t){let e,n,i,l,r,o;const u=[Bb,Vb],s=[];function a(f,c){return f[12]?1:0}return n=a(t),i=s[n]=u[n](t),{c(){e=v("div"),i.c(),m(e,"class","super-row"),p(e,"is-selected",t[13]),p(e,"is-hovered",t[14]),p(e,"is-editing",t[4]),p(e,"is-disabled",t[16].disabled),p(e,"isLast",t[5]),P(e,"height",t[16].height+"px"),P(e,"color",t[16].color),P(e,"background-color",t[16].bgcolor),P(e,"justify-content",t[7].align)},m(f,c){A(f,e,c),s[n].m(e,null),t[38](e),l=!0,r||(o=[B(e,"mouseenter",t[39]),B(e,"mouseleave",t[40]),B(e,"click",t[41]),B(e,"contextmenu",Et(t[42]))],r=!0)},p(f,c){let g=n;n=a(f),n===g?s[n].p(f,c):(He(),Z(s[g],1,1,()=>{s[g]=null}),ze(),i=s[n],i?i.p(f,c):(i=s[n]=u[n](f),i.c()),U(i,1),i.m(e,null)),(!l||c[0]&8192)&&p(e,"is-selected",f[13]),(!l||c[0]&16384)&&p(e,"is-hovered",f[14]),(!l||c[0]&16)&&p(e,"is-editing",f[4]),(!l||c[0]&65536)&&p(e,"is-disabled",f[16].disabled),(!l||c[0]&32)&&p(e,"isLast",f[5]),c[0]&65536&&P(e,"height",f[16].height+"px"),c[0]&65536&&P(e,"color",f[16].color),c[0]&65536&&P(e,"background-color",f[16].bgcolor),c[0]&128&&P(e,"justify-content",f[7].align)},i(f){l||(U(i),l=!0)},o(f){Z(i),l=!1},d(f){f&&C(e),s[n].d(),t[38](null),r=!1,Ve(o)}}}function zb(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,{$$slots:_={},$$scope:b}=e;const{Provider:w,ContextScopes:E}=le.getContext("sdk"),k=le.getContext("stColumnOptions");Me(t,k,ve=>n(7,f=ve));const I=le.getContext("stColumnState"),O=le.getContext("stRowCellOptions");Me(t,O,ve=>n(17,d=ve));const D=le.getContext("stbRowMetadata");Me(t,D,ve=>n(32,c=ve));const N=le.getContext("stbHovered");Me(t,N,ve=>n(8,h=ve));const M=le.getContext("stbEditing");Me(t,M,ve=>n(44,a=ve));const V=le.getContext("stbAPI"),W=le.getContext("stbState"),ne=le.getContext("stbMenuID");Me(t,ne,ve=>n(33,g=ve));let{index:H}=e,{row:$}=e,{field:Y}=e,{idField:G}=e,{isEditing:oe}=e,{isLast:ie}=e,{disabled:J}=e,{rowHeight:q}=e,j,K;const x=async ve=>{let fe={...$,[Y]:ve};try{n(11,r="");let Ne=await V.patchRow(fe);n(0,$={...Ne})}catch(Ne){Ne.json.validationErrors?n(10,K=Ne.json.validationErrors[Y][0]):n(10,K=Ne.message),setTimeout(()=>{n(10,K=void 0)},3250)}finally{n(11,r=X($,Y))}},X=(ve,fe)=>{if(ve&&(fe!=null&&fe.includes("."))){for(var Ne=0,fe=fe.split("."),te=fe.length;Ne<te;Ne++)if(ve[fe[Ne]])Array.isArray(ve[fe[Ne]])?ve=ve[fe[Ne]][0]:ve=ve[fe[Ne]];else{ve=null;break}return ve}else return ve[fe]??void 0};le.onDestroy(()=>{a==H&&I.exitedit()});const F=()=>I.enteredit(H),R=ve=>x(ve.detail),z=ve=>{V.executeOnLinkClickAction(Y,ve.detail)};function me(ve){Be[ve?"unshift":"push"](()=>{j=ve,n(9,j)})}const se=()=>Re(N,h=H,h),Oe=()=>Re(N,h=void 0,h),be=()=>W.handleRowClick(H,Y,X($,Y),l),Ie=()=>{V.showContextMenu(H,j)};return t.$$set=ve=>{"index"in ve&&n(1,H=ve.index),"row"in ve&&n(0,$=ve.row),"field"in ve&&n(2,Y=ve.field),"idField"in ve&&n(3,G=ve.idField),"isEditing"in ve&&n(4,oe=ve.isEditing),"isLast"in ve&&n(5,ie=ve.isLast),"disabled"in ve&&n(6,J=ve.disabled),"rowHeight"in ve&&n(31,q=ve.rowHeight),"$$scope"in ve&&n(43,b=ve.$$scope)},t.$$.update=()=>{var ve;t.$$.dirty[0]&2|t.$$.dirty[1]&2&&n(16,i=(c==null?void 0:c[H])??{}),t.$$.dirty[0]&11&&n(15,l=($==null?void 0:$[G])??H),t.$$.dirty[0]&5&&n(11,r=X($,Y)),t.$$.dirty[0]&258|t.$$.dirty[1]&4&&n(14,o=h==H||g==H),t.$$.dirty[0]&2|t.$$.dirty[1]&2&&n(13,u=((ve=c==null?void 0:c[H])==null?void 0:ve.selected)??!1),t.$$.dirty[0]&128&&n(12,s=f.hasChildren>0)},[$,H,Y,G,oe,ie,J,f,h,j,K,r,s,u,o,l,i,d,w,E,k,I,O,D,N,M,V,W,ne,x,X,q,c,g,_,F,R,z,me,se,Oe,be,Ie,b]}class jb extends Ze{constructor(e){super(),Qe(this,e,zb,Hb,Ye,{index:1,row:0,field:2,idField:3,isEditing:4,isLast:5,disabled:6,rowHeight:31},null,[-1,-1])}}function Wf(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[14]+" field-icon")+" svelte-1i7222z"),p(e,"with-error",t[6])},m(i,l){A(i,e,l)},p(i,l){l[0]&16384&&n!==(n=bt(i[14]+" field-icon")+" svelte-1i7222z")&&m(e,"class",n),l[0]&16448&&p(e,"with-error",i[6])},d(i){i&&C(e)}}}function qb(t){let e,n,i=(t[1]||t[0]||t[12])+"",l,r,o,u;return{c(){e=v("div"),n=v("span"),l=Ee(i),m(e,"class","value"),m(e,"tabindex",r=t[2].readonly||t[2].disabled?-1:0),p(e,"placeholder",!t[0]),P(e,"justify-content",t[2].align)},m(s,a){A(s,e,a),S(e,n),S(n,l),o||(u=B(e,"focusin",t[3].focus),o=!0)},p(s,a){a[0]&4099&&i!==(i=(s[1]||s[0]||s[12])+"")&&Pe(l,i),a[0]&4&&r!==(r=s[2].readonly||s[2].disabled?-1:0)&&m(e,"tabindex",r),a[0]&1&&p(e,"placeholder",!s[0]),a[0]&4&&P(e,"justify-content",s[2].align)},d(s){s&&C(e),o=!1,u()}}}function Wb(t){let e,n=(t[1]||t[0]||t[12])+"",i,l,r,o;return{c(){e=v("div"),i=Ee(n),m(e,"class","value textarea svelte-1i7222z"),m(e,"tabindex",l=t[2].readonly||t[2].disabled?-1:0),p(e,"with-icon",t[2].icon||t[6]),p(e,"placeholder",!t[0]&&!t[1]),P(e,"justify-content",t[2].align)},m(u,s){A(u,e,s),S(e,i),r||(o=B(e,"focusin",t[3].focus),r=!0)},p(u,s){s[0]&4099&&n!==(n=(u[1]||u[0]||u[12])+"")&&Pe(i,n),s[0]&4&&l!==(l=u[2].readonly||u[2].disabled?-1:0)&&m(e,"tabindex",l),s[0]&68&&p(e,"with-icon",u[2].icon||u[6]),s[0]&3&&p(e,"placeholder",!u[0]&&!u[1]),s[0]&4&&P(e,"justify-content",u[2].align)},d(u){u&&C(e),r=!1,o()}}}function Gb(t){let e;function n(r,o){return r[11]?Kb:Yb}let i=n(t),l=i(t);return{c(){l.c(),e=Fe()},m(r,o){l.m(r,o),A(r,e,o)},p(r,o){i===(i=n(r))&&l?l.p(r,o):(l.d(1),l=i(r),l&&(l.c(),l.m(e.parentNode,e)))},d(r){r&&C(e),l.d(r)}}}function Yb(t){var a;let e,n,i,l,r,o,u,s=t[4]&&((a=t[2])==null?void 0:a.clearIcon)!==!1&&Gf(t);return{c(){var f;e=v("input"),l=Q(),s&&s.c(),r=Fe(),m(e,"tabindex","0"),m(e,"class","editor"),e.value=n=t[4]??"",m(e,"placeholder",i=((f=t[2])==null?void 0:f.placeholder)??""),p(e,"placeholder",!t[0]&&!t[1]&&!t[4]),P(e,"text-align",t[2].align=="center"?"center":t[2].align=="flex-end"?"right":"left"),P(e,"padding-right",t[2].align!="flex-start"?"2rem":"0.75rem")},m(f,c){A(f,e,c),t[30](e),A(f,l,c),s&&s.m(f,c),A(f,r,c),o||(u=[B(e,"input",t[3].debounce),B(e,"focusout",t[3].focusout),B(e,"keydown",t[3].handleKeyboard),tn(t[19].call(null,e))],o=!0)},p(f,c){var g,h;c[0]&16&&n!==(n=f[4]??"")&&e.value!==n&&(e.value=n),c[0]&4&&i!==(i=((g=f[2])==null?void 0:g.placeholder)??"")&&m(e,"placeholder",i),c[0]&19&&p(e,"placeholder",!f[0]&&!f[1]&&!f[4]),c[0]&4&&P(e,"text-align",f[2].align=="center"?"center":f[2].align=="flex-end"?"right":"left"),c[0]&4&&P(e,"padding-right",f[2].align!="flex-start"?"2rem":"0.75rem"),f[4]&&((h=f[2])==null?void 0:h.clearIcon)!==!1?s?s.p(f,c):(s=Gf(f),s.c(),s.m(r.parentNode,r)):s&&(s.d(1),s=null)},d(f){f&&(C(e),C(l),C(r)),t[30](null),s&&s.d(f),o=!1,Ve(u)}}}function Kb(t){let e,n,i,l,r;return{c(){var o;e=v("textarea"),m(e,"tabindex","0"),m(e,"class","editor textarea svelte-1i7222z"),m(e,"placeholder",n=((o=t[2])==null?void 0:o.placeholder)??""),e.value=i=t[4]??"",p(e,"placeholder",!t[0]&&!t[1]&&!t[4]),P(e,"text-align",t[2].align=="center"?"center":t[2].align=="flex-end"?"right":"left")},m(o,u){A(o,e,u),t[29](e),l||(r=[B(e,"input",t[3].debounce),B(e,"focusout",t[3].focusout),B(e,"keydown",t[3].handleKeyboard),tn(t[19].call(null,e))],l=!0)},p(o,u){var s;u[0]&4&&n!==(n=((s=o[2])==null?void 0:s.placeholder)??"")&&m(e,"placeholder",n),u[0]&16&&i!==(i=o[4]??"")&&(e.value=i),u[0]&19&&p(e,"placeholder",!o[0]&&!o[1]&&!o[4]),u[0]&4&&P(e,"text-align",o[2].align=="center"?"center":o[2].align=="flex-end"?"right":"left")},d(o){o&&C(e),t[29](null),l=!1,Ve(r)}}}function Gf(t){let e,n,i;return{c(){e=v("i"),m(e,"class","ri-close-line clearIcon")},m(l,r){A(l,e,r),n||(i=B(e,"mousedown",Ii(Et(t[3].clear))),n=!0)},p:ue,d(l){l&&C(e),n=!1,i()}}}function Xb(t){let e,n,i=t[14]&&Wf(t);function l(u,s){return u[13]?Gb:u[11]?Wb:qb}let r=l(t),o=r(t);return{c(){e=v("div"),i&&i.c(),n=Q(),o.c(),m(e,"class","superCell svelte-1i7222z"),p(e,"multirow",t[5]=="textarea"),p(e,"textarea",t[5]=="textarea"),p(e,"inEdit",t[13]),p(e,"isDirty",t[8]&&t[15]),p(e,"inline",t[18]=="inlineInput"),p(e,"tableCell",t[18]=="tableCell"),p(e,"formInput",t[18]=="formInput"),p(e,"disabled",t[9]),p(e,"readonly",t[10]),p(e,"error",t[6]),P(e,"color",t[17]),P(e,"background",t[16])},m(u,s){A(u,e,s),i&&i.m(e,null),S(e,n),o.m(e,null)},p(u,s){u[14]?i?i.p(u,s):(i=Wf(u),i.c(),i.m(e,n)):i&&(i.d(1),i=null),r===(r=l(u))&&o?o.p(u,s):(o.d(1),o=r(u),o&&(o.c(),o.m(e,null))),s[0]&32&&p(e,"multirow",u[5]=="textarea"),s[0]&32&&p(e,"textarea",u[5]=="textarea"),s[0]&8192&&p(e,"inEdit",u[13]),s[0]&33024&&p(e,"isDirty",u[8]&&u[15]),s[0]&262144&&p(e,"inline",u[18]=="inlineInput"),s[0]&262144&&p(e,"tableCell",u[18]=="tableCell"),s[0]&262144&&p(e,"formInput",u[18]=="formInput"),s[0]&512&&p(e,"disabled",u[9]),s[0]&1024&&p(e,"readonly",u[10]),s[0]&64&&p(e,"error",u[6]),s[0]&131072&&P(e,"color",u[17]),s[0]&65536&&P(e,"background",u[16])},i:ue,o:ue,d(u){u&&C(e),i&&i.d(),o.d()}}}function Qb(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E,k,I,O,D=ue,N=()=>(D(),D=ft(j,R=>n(28,O=R)),j);t.$$.on_destroy.push(()=>D());const M=le.createEventDispatcher(),{processStringSync:V}=le.getContext("sdk");let{value:W}=e,{formattedValue:ne=void 0}=e,{cellOptions:H={role:"formInput",initialState:"Editing",debounce:250}}=e,{autofocus:$=!1}=e,Y,G,oe,ie=W,J=((H==null?void 0:H.initialState)==="Loading"?"View":H==null?void 0:H.initialState)??"View",q=[];const j=Ft(J??"View",{"*":{goTo(R){return R},reset(R){if(R!=ie)return n(4,ie=W),n(22,oe=void 0),n(23,q=[]),J}},View:{_enter(){n(4,ie=W)},focus(){if(!o&&!r)return"Editing"}},Editing:{_enter(){setTimeout(()=>{G==null||G.focus()},50),M("enteredit")},_exit(){n(22,oe=void 0),M("exitedit")},focus(){G==null||G.focus()},clear(){d&&M("change",null),n(22,oe=new Date),n(4,ie=null),G==null||G.focus(),M("clear",null)},focusout(R){M("focusout"),this.submit()},submit(){return E&&M("change",ie),J},cancel(){return n(4,ie=W),M("cancel"),J},debounce(R){const z=R.target;n(4,ie=z.value),n(22,oe=new Date),d&&(clearTimeout(Y),Y=setTimeout(()=>{M("change",ie)},d))},handleKeyboard(R){R.key==="Enter"&&!R.shiftKey&&this.submit(),R.key==="Escape"&&this.cancel()}}});N();const K={focus:()=>j.focus(),reset:()=>j.reset(W),isEditing:()=>O==="Editing",isDirty:()=>E,getValue:()=>ie,setError:R=>{n(23,q=[...q,R])},clearError:()=>{n(23,q=[])},setValue:R=>{n(0,W=R)}},x=R=>{R==null||R.focus()};le.onMount(()=>{$&&setTimeout(()=>{j.focus()},50)}),le.onDestroy(()=>{Y&&clearTimeout(Y)});function X(R){Be[R?"unshift":"push"](()=>{G=R,n(7,G)})}function F(R){Be[R?"unshift":"push"](()=>{G=R,n(7,G)})}return t.$$set=R=>{"value"in R&&n(0,W=R.value),"formattedValue"in R&&n(1,ne=R.formattedValue),"cellOptions"in R&&n(2,H=R.cellOptions),"autofocus"in R&&n(20,$=R.autofocus)},t.$$.update=()=>{t.$$.dirty[0]&4&&n(5,{controlType:i,role:l,disabled:r,readonly:o,error:u,icon:s,color:a,background:f,showDirty:c,template:g,placeholder:h,debounce:d}=H??{},i,(n(18,l),n(2,H)),(n(9,r),n(2,H)),(n(10,o),n(2,H)),(n(27,u),n(2,H)),(n(26,s),n(2,H)),(n(17,a),n(2,H)),(n(16,f),n(2,H)),(n(15,c),n(2,H)),(n(25,g),n(2,H)),(n(24,h),n(2,H))),t.$$.dirty[0]&142606336&&n(6,_=u||q.length>0),t.$$.dirty[0]&67108928&&n(14,b=_?"ph ph-warning":s),t.$$.dirty[0]&268435456&&n(13,w=O==="Editing"),t.$$.dirty[0]&4194321&&n(8,E=!!oe&&W!==ie),t.$$.dirty[0]&33554433&&n(1,ne=g?V(g,{value:W}):W??void 0),t.$$.dirty[0]&16777216&&n(12,k=h??""),t.$$.dirty[0]&32&&n(11,I=i==="textarea"),t.$$.dirty[0]&1&&j.reset(W)},[W,ne,H,j,ie,i,_,G,E,r,o,I,k,w,b,c,f,a,l,x,$,K,oe,q,h,g,s,u,O,X,F]}class kn extends Ze{constructor(e){super(),Qe(this,e,Qb,Xb,Ye,{value:0,formattedValue:1,cellOptions:2,autofocus:20,cellState:3,cellApi:21},null,[-1,-1])}get cellState(){return this.$$.ctx[3]}get cellApi(){return this.$$.ctx[21]}}function Yf(t){let e,n;return{c(){e=v("i"),m(e,"class",n=t[2].icon+" icon")},m(i,l){A(i,e,l)},p(i,l){l&4&&n!==(n=i[2].icon+" icon")&&m(e,"class",n)},d(i){i&&C(e)}}}function Zb(t){let e,n,i,l,r=(t[0]||t[1]||t[3])+"",o,u=t[2].icon&&Yf(t);return{c(){e=v("div"),u&&u.c(),n=Q(),i=v("div"),l=v("span"),o=Ee(r),m(i,"class","value"),p(i,"with-icon",t[2].icon),p(i,"placeholder",!t[1]),P(i,"justify-content",t[2].align),m(e,"class","superCell"),p(e,"inline",t[2].role=="inlineInput"),p(e,"tableCell",t[2].role=="tableCell"),p(e,"formInput",t[2].role=="formInput"),p(e,"disabled",t[2].disabled),p(e,"readonly",t[2].readonly),p(e,"error",t[2].error),P(e,"color",t[2].color),P(e,"background",t[2].background),P(e,"font-weight",t[2].fontWeight)},m(s,a){A(s,e,a),u&&u.m(e,null),S(e,n),S(e,i),S(i,l),S(l,o)},p(s,[a]){s[2].icon?u?u.p(s,a):(u=Yf(s),u.c(),u.m(e,n)):u&&(u.d(1),u=null),a&11&&r!==(r=(s[0]||s[1]||s[3])+"")&&Pe(o,r),a&4&&p(i,"with-icon",s[2].icon),a&2&&p(i,"placeholder",!s[1]),a&4&&P(i,"justify-content",s[2].align),a&4&&p(e,"inline",s[2].role=="inlineInput"),a&4&&p(e,"tableCell",s[2].role=="tableCell"),a&4&&p(e,"formInput",s[2].role=="formInput"),a&4&&p(e,"disabled",s[2].disabled),a&4&&p(e,"readonly",s[2].readonly),a&4&&p(e,"error",s[2].error),a&4&&P(e,"color",s[2].color),a&4&&P(e,"background",s[2].background),a&4&&P(e,"font-weight",s[2].fontWeight)},i:ue,o:ue,d(s){s&&C(e),u&&u.d()}}}function Jb(t,e,n){let i;const{processStringSync:l}=le.getContext("sdk");let{value:r=null}=e,{formattedValue:o}=e,{cellOptions:u={role:"formInput",initialState:"Editing",debounce:250}}=e;return t.$$set=s=>{"value"in s&&n(1,r=s.value),"formattedValue"in s&&n(0,o=s.formattedValue),"cellOptions"in s&&n(2,u=s.cellOptions)},t.$$.update=()=>{t.$$.dirty&6&&n(0,o=u!=null&&u.template?l(u.template,{value:r}):void 0),t.$$.dirty&4&&n(3,i=u.readonly||u.disabled?"":u.placeholder||"")},[o,r,u,i]}class Go extends Ze{constructor(e){super(),Qe(this,e,Jb,Zb,Ye,{value:1,formattedValue:0,cellOptions:2})}}function Kf(t){let e,n;return{c(){e=v("div"),n=Ee(t[5]),m(e,"class","info svelte-lkaygf"),p(e,"bottom",!0)},m(i,l){A(i,e,l),S(e,n)},p(i,l){l&32&&Pe(n,i[5])},d(i){i&&C(e)}}}function xb(t){let e,n,i,l;var r=t[6];function o(s,a){return{props:{cellOptions:{...s[7],readonly:!1,error:s[5],showDirty:!1},autofocus:s[1],fieldSchema:s[4].schema,value:s[0][s[4].name],multi:s[4].schema.type=="array"}}}r&&(n=Sl(r,o(t)),n.$on("change",t[13]));let u=t[5]&&Kf(t);return{c(){e=v("div"),n&&We(n.$$.fragment),i=Q(),u&&u.c(),m(e,"class","super-row new-row"),p(e,"isLast",t[2]),P(e,"min-height","2rem"),P(e,"color",t[3])},m(s,a){A(s,e,a),n&&je(n,e,null),S(e,i),u&&u.m(e,null),l=!0},p(s,[a]){if(a&64&&r!==(r=s[6])){if(n){He();const f=n;Z(f.$$.fragment,1,0,()=>{qe(f,1)}),ze()}r?(n=Sl(r,o(s)),n.$on("change",s[13]),We(n.$$.fragment),U(n.$$.fragment,1),je(n,e,i)):n=null}else if(r){const f={};a&160&&(f.cellOptions={...s[7],readonly:!1,error:s[5],showDirty:!1}),a&2&&(f.autofocus=s[1]),a&16&&(f.fieldSchema=s[4].schema),a&17&&(f.value=s[0][s[4].name]),a&16&&(f.multi=s[4].schema.type=="array"),n.$set(f)}s[5]?u?u.p(s,a):(u=Kf(s),u.c(),u.m(e,null)):u&&(u.d(1),u=null),(!l||a&4)&&p(e,"isLast",s[2]),a&8&&P(e,"color",s[3])},i(s){l||(n&&U(n.$$.fragment,s),l=!0)},o(s){n&&Z(n.$$.fragment,s),l=!1},d(s){s&&C(e),n&&qe(n),u&&u.d()}}}function $b(t,e,n){let i,l,r,o,u;const s=le.getContext("stColumnOptions");Me(t,s,w=>n(4,r=w));const a=le.getContext("stRowCellOptions");Me(t,a,w=>n(7,u=w));const f=le.getContext("stbState"),c=le.getContext("stbSettings");Me(t,c,w=>n(12,o=w));let{row:g={}}=e,{isFirst:h}=e,{isLast:d}=e,{color:_}=e;const b=w=>{f.setValue(r.name,w.detail)};return t.$$set=w=>{"row"in w&&n(0,g=w.row),"isFirst"in w&&n(1,h=w.isFirst),"isLast"in w&&n(2,d=w.isLast),"color"in w&&n(3,_=w.color)},t.$$.update=()=>{t.$$.dirty&4112&&n(6,i=r.cellComponent===Go&&o.features.canInsert?kn:r.cellComponent),t.$$.dirty&17&&n(5,l=g.errors&&g.errors[r.name])},[g,h,d,_,r,l,i,u,s,a,f,c,o,b]}class ew extends Ze{constructor(e){super(),Qe(this,e,$b,xb,Ye,{row:0,isFirst:1,isLast:2,color:3})}}function Xf(t,e,n){const i=t.slice();return i[20]=e[n],i}function tw(t){let e;const n=t[18].default,i=Ut(n,t,t[19],null);return{c(){i&&i.c()},m(l,r){i&&i.m(l,r),e=!0},p(l,r){i&&i.p&&(!e||r&524288)&&zt(i,n,l,l[19],e?Ht(n,l[19],r,null):jt(l[19]),null)},i(l){e||(U(i,l),e=!0)},o(l){Z(i,l),e=!1},d(l){i&&i.d(l)}}}function Qf(t,e){let n,i,l;return i=new jb({props:{isLast:e[2],index:e[20],row:e[6][e[20]],field:e[0],idField:e[1],disabled:e[10],rowHeight:e[5],$$slots:{default:[tw]},$$scope:{ctx:e}}}),{key:t,first:null,c(){n=Fe(),We(i.$$.fragment),this.first=n},m(r,o){A(r,n,o),je(i,r,o),l=!0},p(r,o){e=r;const u={};o&4&&(u.isLast=e[2]),o&2048&&(u.index=e[20]),o&2112&&(u.row=e[6][e[20]]),o&1&&(u.field=e[0]),o&2&&(u.idField=e[1]),o&1024&&(u.disabled=e[10]),o&32&&(u.rowHeight=e[5]),o&524288&&(u.$$scope={dirty:o,ctx:e}),i.$set(u)},i(r){l||(U(i.$$.fragment,r),l=!0)},o(r){Z(i.$$.fragment,r),l=!1},d(r){r&&C(n),qe(i,r)}}}function Zf(t){let e,n;return e=new ew({props:{isFirst:t[3],isLast:t[2],row:t[12]}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l&8&&(r.isFirst=i[3]),l&4&&(r.isLast=i[2]),l&4096&&(r.row=i[12]),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function nw(t){let e,n=[],i=new Map,l,r,o=Ce(t[11]);const u=a=>a[20];for(let a=0;a<o.length;a+=1){let f=Xf(t,o,a),c=u(f);i.set(c,n[a]=Qf(c,f))}let s=t[10]&&Zf(t);return{c(){e=v("div");for(let a=0;a<n.length;a+=1)n[a].c();l=Q(),s&&s.c(),m(e,"class","super-column-body"),m(e,"tabindex","-1"),p(e,"quiet",t[9]),p(e,"zebra",t[4]),p(e,"inserting",t[10]),p(e,"filtered",t[7]=="Filtered"),p(e,"is-editing",t[8]),P(e,"margin-top","var(--super-column-top-offset)")},m(a,f){A(a,e,f);for(let c=0;c<n.length;c+=1)n[c]&&n[c].m(e,null);S(e,l),s&&s.m(e,null),r=!0},p(a,[f]){f&527463&&(o=Ce(a[11]),He(),n=Tt(n,f,u,1,a,o,i,e,Di,Qf,l,Xf),ze()),a[10]?s?(s.p(a,f),f&1024&&U(s,1)):(s=Zf(a),s.c(),U(s,1),s.m(e,null)):s&&(He(),Z(s,1,1,()=>{s=null}),ze()),(!r||f&512)&&p(e,"quiet",a[9]),(!r||f&16)&&p(e,"zebra",a[4]),(!r||f&1024)&&p(e,"inserting",a[10]),(!r||f&128)&&p(e,"filtered",a[7]=="Filtered"),(!r||f&256)&&p(e,"is-editing",a[8])},i(a){if(!r){for(let f=0;f<o.length;f+=1)U(n[f]);U(s),r=!0}},o(a){for(let f=0;f<n.length;f+=1)Z(n[f]);Z(s),r=!1},d(a){a&&C(e);for(let f=0;f<n.length;f+=1)n[f].d();s&&s.d()}}}function iw(t,e,n){let i,l,r,o,u,s,a,{$$slots:f={},$$scope:c}=e;const g=le.getContext("stColumnOptions");Me(t,g,N=>n(17,o=N));const h=le.getContext("stColumnState");Me(t,h,N=>n(7,u=N));const d=le.getContext("stbVisibleRows");Me(t,d,N=>n(11,s=N));const _=le.getContext("new_row");Me(t,_,N=>n(12,a=N));let{field:b}=e,{idField:w}=e,{isLast:E}=e,{isFirst:k}=e,{zebra:I}=e,{rowHeight:O}=e,{rows:D}=e;return t.$$set=N=>{"field"in N&&n(0,b=N.field),"idField"in N&&n(1,w=N.idField),"isLast"in N&&n(2,E=N.isLast),"isFirst"in N&&n(3,k=N.isFirst),"zebra"in N&&n(4,I=N.zebra),"rowHeight"in N&&n(5,O=N.rowHeight),"rows"in N&&n(6,D=N.rows),"$$scope"in N&&n(19,c=N.$$scope)},t.$$.update=()=>{t.$$.dirty&128&&n(10,i=u=="Inserting"),t.$$.dirty&131072&&n(9,l=o.quiet),t.$$.dirty&131200&&n(8,r=u=="EditingCell"&&(o.highlighters=="vertical"||o.highlighters=="both"))},[b,w,E,k,I,O,D,u,r,l,i,s,a,g,h,d,_,o,f,c]}class lw extends Ze{constructor(e){super(),Qe(this,e,iw,nw,Ye,{field:0,idField:1,isLast:2,isFirst:3,zebra:4,rowHeight:5,rows:6})}}function rw(t){let e,n,i=(t[0]||t[1].displayName||t[1].name)+"",l;return{c(){var r;e=v("div"),n=v("span"),l=Ee(i),m(e,"class","super-column-footer"),P(e,"justify-content",(r=t[1])==null?void 0:r.headerAlign)},m(r,o){A(r,e,o),S(e,n),S(n,l)},p(r,[o]){var u;o&3&&i!==(i=(r[0]||r[1].displayName||r[1].name)+"")&&Pe(l,i),o&2&&P(e,"justify-content",(u=r[1])==null?void 0:u.headerAlign)},i:ue,o:ue,d(r){r&&C(e)}}}function ow(t,e,n){let i;const l=le.getContext("stColumnOptions");Me(t,l,o=>n(1,i=o));let{footerLabel:r}=e;return t.$$set=o=>{"footerLabel"in o&&n(0,r=o.footerLabel)},[r,i,l]}class sw extends Ze{constructor(e){super(),Qe(this,e,ow,rw,Ye,{footerLabel:0})}}function Jf(t,e,n){const i=t.slice();return i[71]=e[n],i[73]=n,i}function xf(t,e,n){const i=t.slice();return i[74]=e[n],i[73]=n,i}function $f(t,e,n){const i=t.slice();return i[74]=e[n],i}function ec(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[22]+" field-icon")+" svelte-gq3v8f"),p(e,"active",t[4])},m(i,l){A(i,e,l)},p(i,l){l[0]&4194304&&n!==(n=bt(i[22]+" field-icon")+" svelte-gq3v8f")&&m(e,"class",n),l[0]&4194320&&p(e,"active",i[4])},d(i){i&&C(e)}}}function uw(t){let e,n,i,l,r;function o(f,c){return f[5]&&!f[21]?hw:f[5]&&f[21]?dw:f[8]=="text"?cw:fw}let u=o(t),s=u(t),a=!t[6]&&(t[30]=="formInput"||t[9])&&nc(t);return{c(){e=v("div"),s.c(),n=Q(),a&&a.c(),i=Fe(),m(e,"class","value"),p(e,"placeholder",t[5]&&!t[4])},m(f,c){A(f,e,c),s.m(e,null),A(f,n,c),a&&a.m(f,c),A(f,i,c),l||(r=B(e,"mousedown",function(){Ge(t[9]?t[33].toggle:null)&&(t[9]?t[33].toggle:null).apply(this,arguments)}),l=!0)},p(f,c){t=f,u===(u=o(t))&&s?s.p(t,c):(s.d(1),s=u(t),s&&(s.c(),s.m(e,null))),c[0]&48&&p(e,"placeholder",t[5]&&!t[4]),!t[6]&&(t[30]=="formInput"||t[9])?a?a.p(t,c):(a=nc(t),a.c(),a.m(i.parentNode,i)):a&&(a.d(1),a=null)},d(f){f&&(C(e),C(n),C(i)),s.d(),a&&a.d(f),l=!1,r()}}}function aw(t){let e,n,i,l,r,o,u=t[0]&&ic(t);return{c(){u&&u.c(),e=Q(),n=v("input"),i=Q(),l=v("div"),l.innerHTML='<i class="ph ph-caret-down"></i>',m(n,"class","editor"),m(n,"placeholder",t[23]),m(l,"class","action-icon svelte-gq3v8f")},m(s,a){u&&u.m(s,a),A(s,e,a),A(s,n,a),t[52](n),Zt(n,t[20]),A(s,i,a),A(s,l,a),r||(o=[B(n,"input",t[53]),B(n,"input",t[54]),tn(t[37].call(null,n)),B(l,"click",t[33].toggle)],r=!0)},p(s,a){s[0]?u?u.p(s,a):(u=ic(s),u.c(),u.m(e.parentNode,e)):u&&(u.d(1),u=null),a[0]&8388608&&m(n,"placeholder",s[23]),a[0]&1048576&&n.value!==s[20]&&Zt(n,s[20])},d(s){s&&(C(e),C(n),C(i),C(l)),u&&u.d(s),t[52](null),r=!1,Ve(o)}}}function fw(t){let e,n=[],i=new Map,l=Ce(t[3]);const r=o=>o[74];for(let o=0;o<l.length;o+=1){let u=xf(t,l,o),s=r(u);i.set(s,n[o]=tc(s,u))}return{c(){e=v("div");for(let o=0;o<n.length;o+=1)n[o].c();m(e,"class","items"),p(e,"pills",t[24]),p(e,"colorText",t[8]=="colorText"),P(e,"justify-content",t[1].align??"flex-start")},m(o,u){A(o,e,u);for(let s=0;s<n.length;s+=1)n[s]&&n[s].m(e,null)},p(o,u){u[0]&67239944|u[1]&17&&(l=Ce(o[3]),n=Tt(n,u,r,1,o,l,i,e,nn,tc,null,xf)),u[0]&16777216&&p(e,"pills",o[24]),u[0]&256&&p(e,"colorText",o[8]=="colorText"),u[0]&2&&P(e,"justify-content",o[1].align??"flex-start")},d(o){o&&C(e);for(let u=0;u<n.length;u+=1)n[u].d()}}}function cw(t){let e,n=(t[0]||t[3].length>1?t[3].join(", "):t[17][t[3][0]]||t[3][0])+"",i;return{c(){e=v("span"),i=Ee(n)},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&131081&&n!==(n=(l[0]||l[3].length>1?l[3].join(", "):l[17][l[3][0]]||l[3][0])+"")&&Pe(i,n)},d(l){l&&C(e)}}}function dw(t){let e,n=(t[4]||"Type to search...")+"",i;return{c(){e=v("span"),i=Ee(n)},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&16&&n!==(n=(l[4]||"Type to search...")+"")&&Pe(i,n)},d(l){l&&C(e)}}}function hw(t){let e,n=(t[4]||t[23])+"",i;return{c(){e=v("span"),i=Ee(n)},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&8388624&&n!==(n=(l[4]||l[23])+"")&&Pe(i,n)},d(l){l&&C(e)}}}function tc(t,e){let n,i,l,r,o=(e[26]?"JSON":e[17][e[74]]||e[74])+"",u,s;return{key:t,first:null,c(){n=v("div"),i=v("i"),l=Q(),r=v("span"),u=Ee(o),s=Q(),m(i,"class","ph-fill ph-square"),m(n,"class","item"),P(n,"--option-color",e[31][e[74]]||e[35][e[73]%e[35].length]),this.first=n},m(a,f){A(a,n,f),S(n,i),S(n,l),S(n,r),S(r,u),S(n,s)},p(a,f){e=a,f[0]&67239944&&o!==(o=(e[26]?"JSON":e[17][e[74]]||e[74])+"")&&Pe(u,o),f[0]&8|f[1]&1&&P(n,"--option-color",e[31][e[74]]||e[35][e[73]%e[35].length])},d(a){a&&C(n)}}}function nc(t){let e,n,i;return{c(){e=v("i"),m(e,"class","ph ph-caret-down control-icon")},m(l,r){A(l,e,r),n||(i=B(e,"mousedown",function(){Ge(t[9]?t[33].toggle:null)&&(t[9]?t[33].toggle:null).apply(this,arguments)}),n=!0)},p(l,r){t=l},d(l){l&&C(e),n=!1,i()}}}function ic(t){let e,n=t[3].length>0&&lc(t);return{c(){n&&n.c(),e=Fe()},m(i,l){n&&n.m(i,l),A(i,e,l)},p(i,l){i[3].length>0?n?n.p(i,l):(n=lc(i),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(i){i&&C(e),n&&n.d(i)}}}function lc(t){let e,n,i=[],l=new Map,r=Ce(t[3]);const o=u=>u[74];for(let u=0;u<r.length;u+=1){let s=$f(t,r,u),a=o(s);l.set(a,i[u]=oc(a,s))}return{c(){e=v("div"),n=v("div");for(let u=0;u<i.length;u+=1)i[u].c();m(n,"class","items"),p(n,"pills",t[24]),P(n,"justify-content",t[1].align??"flex-start"),m(e,"class","value"),P(e,"width","auto"),P(e,"padding-left",t[1].icon?"32px":t[1].padding)},m(u,s){A(u,e,s),S(e,n);for(let a=0;a<i.length;a+=1)i[a]&&i[a].m(n,null)},p(u,s){s[0]&16908296|s[1]&1&&(r=Ce(u[3]),i=Tt(i,s,o,1,u,r,l,n,nn,oc,null,$f)),s[0]&16777216&&p(n,"pills",u[24]),s[0]&2&&P(n,"justify-content",u[1].align??"flex-start"),s[0]&2&&P(e,"padding-left",u[1].icon?"32px":u[1].padding)},d(u){u&&C(e);for(let s=0;s<i.length;s+=1)i[s].d()}}}function rc(t){let e;return{c(){e=v("div"),m(e,"class","loope")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function oc(t,e){let n,i,l,r=(e[17][e[74]]||e[74])+"",o,u,s=e[24]&&rc();return{key:t,first:null,c(){n=v("div"),s&&s.c(),i=Q(),l=v("span"),o=Ee(r),u=Q(),m(n,"class","item"),P(n,"--option-color",e[31][e[74]]),P(n,"min-width","4rem"),this.first=n},m(a,f){A(a,n,f),s&&s.m(n,null),S(n,i),S(n,l),S(l,o),S(n,u)},p(a,f){e=a,e[24]?s||(s=rc(),s.c(),s.m(n,i)):s&&(s.d(1),s=null),f[0]&131080&&r!==(r=(e[17][e[74]]||e[74])+"")&&Pe(o,r),f[0]&8|f[1]&1&&P(n,"--option-color",e[31][e[74]])},d(a){a&&C(n),s&&s.d()}}}function sc(t){let e,n;return e=new wn({props:{anchor:t[15],useAnchorWidth:!0,maxHeight:250,open:t[21],$$slots:{default:[pw]},$$scope:{ctx:t}}}),e.$on("close",t[33].close),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&32768&&(r.anchor=i[15]),l[0]&2097152&&(r.open=i[21]),l[0]&937272|l[1]&1|l[2]&65536&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function uc(t){let e,n,i,l,r;return{c(){e=v("div"),n=v("i"),i=Q(),l=v("span"),r=Ee(t[4]),m(n,"class","search-icon ph ph-magnifying-glass svelte-gq3v8f"),p(n,"active",t[4]),m(l,"class","search-term svelte-gq3v8f"),m(e,"class","searchControl svelte-gq3v8f")},m(o,u){A(o,e,u),S(e,n),S(e,i),S(e,l),S(l,r)},p(o,u){u[0]&16&&p(n,"active",o[4]),u[0]&16&&Pe(r,o[4])},d(o){o&&C(e)}}}function gw(t){let e;return{c(){e=v("div"),e.innerHTML=`<span><i class="ri-close-line"></i>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Loading more...`,m(e,"class","option loading svelte-gq3v8f")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function pw(t){let e,n,i,l,r,o=t[4]&&!t[5]&&uc(t);function u(f,c){var g,h,d,_;return f[11]=="data"&&((g=f[14])!=null&&g.loading)&&!((d=(h=f[14])==null?void 0:h.rows)!=null&&d.length)?_w:(_=f[18])!=null&&_.length?mw:gw}let s=u(t),a=s(t);return{c(){e=v("div"),o&&o.c(),n=Q(),i=v("div"),a.c(),m(i,"class","options svelte-gq3v8f"),m(e,"class","picker svelte-gq3v8f")},m(f,c){A(f,e,c),o&&o.m(e,null),S(e,n),S(e,i),a.m(i,null),l||(r=[B(i,"wheel",ww),B(i,"mouseleave",t[58]),B(i,"scroll",function(){Ge(t[11]=="data"?t[33].handleScroll:null)&&(t[11]=="data"?t[33].handleScroll:null).apply(this,arguments)}),B(e,"mousedown",Qt(Et(t[51])))],l=!0)},p(f,c){t=f,t[4]&&!t[5]?o?o.p(t,c):(o=uc(t),o.c(),o.m(e,n)):o&&(o.d(1),o=null),s===(s=u(t))&&a?a.p(t,c):(a.d(1),a=s(t),a&&(a.c(),a.m(i,null)))},d(f){f&&C(e),o&&o.d(),a.d(),l=!1,Ve(r)}}}function bw(t){let e,n,i,l,r,o,u,s,a=t[22]&&ec(t);function f(d,_){return d[9]&&d[13]=="inputSelect"?aw:uw}let c=f(t),g=c(t),h=t[9]&&sc(t);return{c(){var d;e=v("div"),a&&a.c(),n=Q(),g.c(),l=Q(),h&&h.c(),r=Fe(),m(e,"class","superCell"),m(e,"tabindex",i=(d=t[1])!=null&&d.disabled?-1:0),p(e,"isDirty",t[25]&&t[1].showDirty),p(e,"inEdit",t[9]),p(e,"disabled",t[7]),p(e,"readonly",t[6]),p(e,"error",t[29]),p(e,"inline",t[30]=="inlineInput"),p(e,"tableCell",t[30]=="tableCell"),p(e,"formInput",t[30]=="formInput"),P(e,"color",t[28]),P(e,"background",t[27])},m(d,_){A(d,e,_),a&&a.m(e,null),S(e,n),g.m(e,null),t[55](e),A(d,l,_),h&&h.m(d,_),A(d,r,_),o=!0,u||(s=[B(e,"focusin",t[2].focus),B(e,"focusout",t[2].focusout),B(e,"keydown",t[33].handleKeyboard)],u=!0)},p(d,_){var b;d[22]?a?a.p(d,_):(a=ec(d),a.c(),a.m(e,n)):a&&(a.d(1),a=null),c===(c=f(d))&&g?g.p(d,_):(g.d(1),g=c(d),g&&(g.c(),g.m(e,null))),(!o||_[0]&2&&i!==(i=(b=d[1])!=null&&b.disabled?-1:0))&&m(e,"tabindex",i),(!o||_[0]&33554434)&&p(e,"isDirty",d[25]&&d[1].showDirty),(!o||_[0]&512)&&p(e,"inEdit",d[9]),(!o||_[0]&128)&&p(e,"disabled",d[7]),(!o||_[0]&64)&&p(e,"readonly",d[6]),(!o||_[0]&536870912)&&p(e,"error",d[29]),(!o||_[0]&1073741824)&&p(e,"inline",d[30]=="inlineInput"),(!o||_[0]&1073741824)&&p(e,"tableCell",d[30]=="tableCell"),(!o||_[0]&1073741824)&&p(e,"formInput",d[30]=="formInput"),_[0]&268435456&&P(e,"color",d[28]),_[0]&134217728&&P(e,"background",d[27]),d[9]?h?(h.p(d,_),_[0]&512&&U(h,1)):(h=sc(d),h.c(),U(h,1),h.m(r.parentNode,r)):h&&(He(),Z(h,1,1,()=>{h=null}),ze())},i(d){o||(U(h),o=!0)},o(d){Z(h),o=!1},d(d){d&&(C(e),C(l),C(r)),a&&a.d(),g.d(),t[55](null),h&&h.d(d),u=!1,Ve(s)}}}const ww=t=>t.stopPropagation();function kw(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E,k,I,O,D,N,M,V,W,ne,H,$,Y=ue,G=()=>(Y(),Y=ft(re,we=>n(49,$=we)),re),oe,ie,J=ue,q=()=>(J(),J=ft(w,we=>n(14,ie=we)),w),j,K;t.$$.on_destroy.push(()=>Y()),t.$$.on_destroy.push(()=>J());const x=le.createEventDispatcher(),{API:X,QueryUtils:F,fetchData:R,memo:z,derivedMemo:me}=le.getContext("sdk");let{cellOptions:se}=e,{value:Oe}=e,{fieldSchema:be}=e,{multi:Ie=!1}=e,{autofocus:ve}=e,fe,Ne,te=z([]);Me(t,te,we=>n(63,j=we));let ae={},de={},Xe=[],Te=-1,Se,Le=[],rt="",kt="",ke=15;const ce=we=>l!="data"?z({}):R({API:X,datasource:we,options:{sortColumn:se.sortColumn,sortOrder:se.sortOrder,limit:ke}}),re=Ft("Loading",{"*":{goTo(we){return we},refresh(){return Re(te,j=[],j),"Loading"},loadSchemaOptions(){var we;de=(be==null?void 0:be.optionColors)||{},Re(te,j=((we=be==null?void 0:be.constraints)==null?void 0:we.inclusion)||[],j),n(17,ae={}),n(18,Xe=j)},loadDataOptions(we){Re(te,j=[],j),n(17,ae={}),we&&we.length&&we.forEach(xe=>{var pe;j.push((pe=xe[r])==null?void 0:pe.toString()),n(17,ae[xe[r]]=xe[o||r],ae),s&&(de[xe[r]]=xe[s])}),te.set(j),n(18,Xe=j)},loadCustomOptions(){a!=null&&a.length&&a.forEach(we=>{j.push(we.value||we),n(17,ae[we.value]=we.label||we,ae)}),te.set(j)},clearFilters(){n(18,Xe=j)}},Loading:{_enter(){(se.optionsSource!="data"||ie!=null&&ie.loaded)&&this.goTo.debounce(5,se.initialState||"View")},_exit(){se.optionsSource=="custom"?this.loadCustomOptions():l=="data"?this.loadDataOptions(ie==null?void 0:ie.rows):this.loadSchemaOptions(),n(18,Xe=j)},syncFetch(we){if(we!=null&&we.loaded)return se.initialState||"View"},focus(we){if(!se.readonly&&!se.disabled)return"Editing"}},View:{_enter(){n(4,rt=null)},focus(we){if(!se.readonly&&!se.disabled)return"Editing"}},Editing:{_enter(){n(42,lt=JSON.stringify(Array.isArray(Oe)?Oe:Oe?[Oe]:[])),n(20,kt=Ie?"":ae[Le[0]]||Le[0]||""),Ae.open(),x("enteredit")},_exit(){Ae.close(),Ae.filterOptions(),x("exitedit")},focusout(we){if(!fe.contains(we.relatedTarget))return x("focusout"),se.debounce&&D?(clearTimeout(Se),x("change",Ie?Le:Le[0])):this.submit(),"View"},submit(){D&&!se.debounce&&(Ie?x("change",Le):x("change",Le[0]))},clear(){n(3,Le=[]),fe==null||fe.focus(),se.debounce&&x("change",null)},cancel(){return n(4,rt=null),fe==null||fe.blur(),"View"}}});G();const Ae=Ft("Closed",{"*":{toggleOption(we){if(we<0||se.disabled||se.readonly)return;let xe=Xe[we],pe=Le.indexOf(xe);Ie&&pe>-1?(Le.splice(pe,1),n(3,Le=[...Le])):Ie?n(3,Le=[...Le,xe]):(Le[0]==xe?n(3,Le.length=0,Le):n(3,Le[0]=xe,Le),n(20,kt=ae[Le[0]]||Le[0]||"")),se.debounce&&(clearTimeout(Se),Se=setTimeout(()=>{x("change",Ie?Le:Le[0])},se.debounce??0)),se.autocomplete&&Ie&&this.filterOptions(),Ie||(this.close.debounce(10),se.controlType!="inputSelect"?fe==null||fe.focus():Ne==null||Ne.focus())}},Open:{_enter(){n(4,rt=""),this.filterOptions(),n(19,Te=-1)},filterOptions(we){if(se.optionsSource=="data"){let xe=[];we?xe=[...se.filter||[],{field:o||r,type:"string",operator:"fuzzy",value:we,valueType:"Value"}]:xe=se.filter||[],w==null||w.update({query:F.buildQuery(xe)}),n(18,Xe=j)}else we?n(18,Xe=j.filter(xe=>xe==null?void 0:xe.toLocaleLowerCase().startsWith(we.toLocaleLowerCase()))):n(18,Xe=j)},toggle(){return"Closed"},close(){return"Closed"},handleKeyboard(we){if(we.key==="Backspace"||we.key==="Delete"?(n(4,rt=rt.slice(0,-1)),this.filterOptions(rt)):we.key.length===1&&/[a-zA-Z0-9]/.test(we.key)&&(n(4,rt=rt+we.key),this.filterOptions(rt),rt!=null&&rt.length&&H=="Closed"&&this.toggle()),we.keyCode==32&&(Te>-1?(this.toggleOption(Te,we.preventDefault()),Ie||this.close(we.preventDefault())):k||this.close()),we.key=="Escape")return n(4,rt=null),fe==null||fe.focus(),"Closed";we.key=="Enter"&&(Te>-1&&Xe[Te]&&(Ie||this.toggleOption(Te)),re.submit(),Ae.close()),we.key=="ArrowDown"&&this.highlightNext(),we.key=="ArrowUp"&&this.highlightPrevious()},highlightNext(){n(19,Te+=1),Te>Xe.length-1&&n(19,Te=0),le.tick().then(()=>{const we=optionsList.querySelector(".option.focused");we&&we.scrollIntoView({behavior:"smooth",block:"nearest"})})},highlightPrevious(){n(19,Te-=1),Te<0&&n(19,Te=Xe.length-1),le.tick().then(()=>{const we=optionsList.querySelector(".option.focused");we&&we.scrollIntoView({behavior:"smooth",block:"nearest"})})},fetchMore(){var we;ie!=null&&ie.loading||((we=ie==null?void 0:ie.rows)==null?void 0:we.length)<ke||(n(41,ke+=100),w==null||w.update({limit:ke}))},handleScroll(we){const xe=we.target,pe=xe.scrollTop,_t=xe.scrollHeight,Bt=xe.clientHeight;pe+Bt>=_t-50&&this.fetchMore()}},Closed:{_enter(){n(4,rt=null),n(19,Te=-1)},toggle(){return"Open"},open(){return"Open"},highlightNext(){this.open(),n(19,Te=0),le.tick().then(()=>{const we=optionsList.querySelector(".option.focused");we&&we.scrollIntoView({behavior:"smooth",block:"nearest"})})},handleKeyboard(we){if(we.key=="Escape"){re.cancel();return}we.key=="Enter"&&kt!=null&&kt.trim()&&(Ie?n(3,Le=[...Le,kt.trim()]):n(3,Le=[kt.trim()]),n(20,kt="")),i=="select"&&(this.open(),this.handleKeyboard(we),(we.key=="ArrowDown"||we.keyCode==32)&&this.toggle(),(we.key=="Backspace"||we.key=="Delete")&&(n(3,Le=[]),x("change",Le)))}}});Me(t,Ae,we=>n(48,H=we));const Ue=me(te,we=>{let xe={};return we.forEach((pe,_t)=>xe[pe]=de[pe]??Je[_t%Je.length]),xe});Me(t,Ue,we=>n(31,K=we));const Je=["hsla(175, 90%, 75%, 0.35)","hsla(25, 90%, 75%, 0.35)","hsla(340, 85%, 72%, 0.35)","hsla(75, 80%, 75%, 0.35)","hsla(265, 85%, 70%, 0.35)","hsla(125, 90%, 75%, 0.35)","hsla(0, 90%, 75%, 0.35)","hsla(225, 90%, 75%, 0.35)","hsla(100, 80%, 75%, 0.35)","hsla(315, 85%, 70%, 0.35)","hsla(50, 80%, 75%, 0.35)","hsla(165, 85%, 70%, 0.35)","hsla(200, 90%, 75%, 0.35)","hsla(290, 85%, 72%, 0.35)","hsla(85, 85%, 72%, 0.35)","hsla(140, 85%, 72%, 0.35)","hsla(250, 90%, 75%, 0.35)","hsla(35, 85%, 72%, 0.35)","hsla(190, 85%, 72%, 0.35)","hsla(350, 90%, 75%, 0.35)","hsla(60, 85%, 70%, 0.35)","hsla(150, 90%, 75%, 0.35)","hsla(300, 90%, 75%, 0.35)","hsla(10, 85%, 70%, 0.35)","hsla(215, 85%, 70%, 0.35)","hsla(325, 90%, 75%, 0.35)","hsla(115, 85%, 70%, 0.35)","hsla(240, 85%, 72%, 0.35)","hsla(275, 90%, 75%, 0.35)"];let lt=JSON.stringify(Array.isArray(Oe)?Oe:Oe?[Oe]:[]);const he=z((se==null?void 0:se.datasource)??{});Me(t,he,we=>n(50,oe=we));const it=we=>{we==null||we.focus()};le.onMount(()=>{ve&&setTimeout(()=>{re.focus(),Ne==null||Ne.focus()},30)});function ot(we){ti.call(this,t,we)}function wt(we){Be[we?"unshift":"push"](()=>{Ne=we,n(16,Ne)})}function Ct(){kt=this.value,n(20,kt)}const ln=we=>{var xe;Ie||n(3,Le[0]=(xe=we.target.value)==null?void 0:xe.trim(),Le),Ae.filterOptions(we.target.value)};function It(we){Be[we?"unshift":"push"](()=>{fe=we,n(15,fe)})}const xt=(we,xe)=>Ae.toggleOption(we),_e=we=>n(19,Te=we),st=()=>n(19,Te=-1);return t.$$set=we=>{"cellOptions"in we&&n(1,se=we.cellOptions),"value"in we&&n(38,Oe=we.value),"fieldSchema"in we&&n(39,be=we.fieldSchema),"multi"in we&&n(0,Ie=we.multi),"autofocus"in we&&n(40,ve=we.autofocus)},t.$$.update=()=>{t.$$.dirty[0]&2&&n(13,{controlType:i,optionsSource:l,valueColumn:r,labelColumn:o,iconColumn:u,colorColumn:s,customOptions:a,optionsViewMode:f,role:c,readonly:g,disabled:h,error:d,color:_,background:b}=se,i,(n(11,l),n(1,se)),(n(45,r),n(1,se)),(n(46,o),n(1,se)),(n(10,u),n(1,se)),(n(44,s),n(1,se)),(n(43,a),n(1,se)),(n(8,f),n(1,se)),(n(30,c),n(1,se)),(n(6,g),n(1,se)),(n(7,h),n(1,se)),(n(29,d),n(1,se)),(n(28,_),n(1,se)),(n(27,b),n(1,se))),t.$$.dirty[0]&2&&he.set(se.datasource),t.$$.dirty[1]&524288&&q(n(12,w=ce(oe))),t.$$.dirty[0]&2048&&l=="data"&&n(41,ke=15),t.$$.dirty[0]&2&&n(47,E=F.buildQuery(se.filter)),t.$$.dirty[0]&8192&&(k=i=="inputSelect"),t.$$.dirty[0]&4098|t.$$.dirty[1]&66560&&se.optionsSource=="data"&&w.update({query:E,sortColumn:se.sortColumn,sortOrder:se.sortOrder,limit:ke}),t.$$.dirty[0]&16384&&re.syncFetch(ie),t.$$.dirty[0]&16384&&re.loadDataOptions(ie==null?void 0:ie.rows),t.$$.dirty[0]&3072|t.$$.dirty[1]&585984&&re.refresh(be,l,o,r,u,s,oe,a),t.$$.dirty[1]&128&&n(3,Le=Array.isArray(Oe)?Oe:Oe?[Oe]:[]),t.$$.dirty[0]&8&&n(26,I=!!(Le.length&&typeof Le[0]=="object")),t.$$.dirty[0]&8&&n(5,O=Le.length<1),t.$$.dirty[1]&262144&&n(9,N=$=="Editing"),t.$$.dirty[0]&520|t.$$.dirty[1]&2048&&n(25,D=N&<!==JSON.stringify(Le)),t.$$.dirty[0]&256&&n(24,M=f=="pills"),t.$$.dirty[0]&1|t.$$.dirty[1]&256&&n(0,Ie=be&&be.type?be.type=="array":Ie),t.$$.dirty[0]&194&&n(23,V=h||g?"":se.placeholder||""),t.$$.dirty[0]&50&&n(22,W=rt&&O?"ph ph-magnifying-glass":se.icon),t.$$.dirty[1]&131072&&n(21,ne=H=="Open")},[Ie,se,re,Le,rt,O,g,h,f,N,u,l,w,i,ie,fe,Ne,ae,Xe,Te,kt,ne,W,V,M,D,I,b,_,d,c,K,te,Ae,Ue,Je,he,it,Oe,be,ve,ke,lt,a,s,r,o,E,H,$,oe,ot,wt,Ct,ln,It,xt,_e,st]}class rl extends Ze{constructor(e){super(),Qe(this,e,kw,bw,Ye,{cellOptions:1,value:38,fieldSchema:39,multi:0,autofocus:40,cellState:2},null,[-1,-1,-1])}get cellState(){return this.$$.ctx[2]}}function cc(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[14]+" field-icon")+" svelte-cu0nvz"),p(e,"with-error",t[6])},m(i,l){A(i,e,l)},p(i,l){l[0]&16384&&n!==(n=bt(i[14]+" field-icon")+" svelte-cu0nvz")&&m(e,"class",n),l[0]&16448&&p(e,"with-error",i[6])},d(i){i&&C(e)}}}function yw(t){let e,n=(t[0]!=null?t[12]:t[16]||"")+"",i;return{c(){e=v("div"),i=Ee(n),m(e,"class","value"),p(e,"placeholder",!t[0]&&t[0]!==0),P(e,"padding-right","12px"),P(e,"justify-content",t[1].align??"flex-end")},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&69633&&n!==(n=(l[0]!=null?l[12]:l[16]||"")+"")&&Pe(i,n),r[0]&1&&p(e,"placeholder",!l[0]&&l[0]!==0),r[0]&2&&P(e,"justify-content",l[1].align??"flex-end")},d(l){l&&C(e)}}}function Ew(t){let e,n,i,l,r,o,u,s,a=t[15]&&dc(t);return{c(){e=v("input"),i=Q(),l=v("i"),l.innerHTML="",r=Q(),a&&a.c(),o=Fe(),m(e,"class","editor"),e.value=n=t[3]||"",p(e,"placeholder",!t[3]),P(e,"text-align",t[1].align=="flex-start"?"left":t[1].align=="center"?"center":"right "),m(l,"class","ri-close-line clear-icon visible")},m(f,c){A(f,e,c),t[32](e),A(f,i,c),A(f,l,c),A(f,r,c),a&&a.m(f,c),A(f,o,c),u||(s=[B(e,"keydown",t[33]),B(e,"input",t[34]),B(e,"focusout",t[35]),B(e,"wheel",t[36]),tn(Sw.call(null,e)),B(l,"mousedown",Qt(Et(function(){Ge(t[2].clear)&&t[2].clear.apply(this,arguments)})))],u=!0)},p(f,c){t=f,c[0]&8&&n!==(n=t[3]||"")&&e.value!==n&&(e.value=n),c[0]&8&&p(e,"placeholder",!t[3]),c[0]&2&&P(e,"text-align",t[1].align=="flex-start"?"left":t[1].align=="center"?"center":"right "),t[15]?a?a.p(t,c):(a=dc(t),a.c(),a.m(o.parentNode,o)):a&&(a.d(1),a=null)},d(f){f&&(C(e),C(i),C(l),C(r),C(o)),t[32](null),a&&a.d(f),u=!1,Ve(s)}}}function dc(t){let e,n,i,l,r,o;return{c(){e=v("div"),n=v("i"),i=Q(),l=v("i"),m(n,"class","ph ph-minus svelte-cu0nvz"),m(l,"class","ph ph-plus svelte-cu0nvz"),m(e,"class","controls svelte-cu0nvz")},m(u,s){A(u,e,s),S(e,n),S(e,i),S(e,l),r||(o=[B(n,"mousedown",Qt(Et(t[37]))),B(l,"mousedown",Qt(Et(t[38])))],r=!0)},p:ue,d(u){u&&C(e),r=!1,Ve(o)}}}function vw(t){let e,n,i,l,r,o=t[14]&&cc(t);function u(f,c){return f[7]=="Editing"?Ew:yw}let s=u(t),a=s(t);return{c(){e=v("div"),o&&o.c(),n=Q(),a.c(),m(e,"class","superCell"),m(e,"tabindex",i=t[10]?-1:0),p(e,"error",t[6]),p(e,"readonly",t[11]),p(e,"disabled",t[10]),p(e,"inEdit",t[4]),p(e,"isDirty",t[9]&&t[17]),p(e,"inline",t[13]),p(e,"tableCell",t[5]=="tableCell"),p(e,"formInput",t[5]=="formInput"),P(e,"color",t[19]),P(e,"background",t[18])},m(f,c){A(f,e,c),o&&o.m(e,null),S(e,n),a.m(e,null),l||(r=B(e,"focusin",function(){Ge(t[2].focus)&&t[2].focus.apply(this,arguments)}),l=!0)},p(f,c){t=f,t[14]?o?o.p(t,c):(o=cc(t),o.c(),o.m(e,n)):o&&(o.d(1),o=null),s===(s=u(t))&&a?a.p(t,c):(a.d(1),a=s(t),a&&(a.c(),a.m(e,null))),c[0]&1024&&i!==(i=t[10]?-1:0)&&m(e,"tabindex",i),c[0]&64&&p(e,"error",t[6]),c[0]&2048&&p(e,"readonly",t[11]),c[0]&1024&&p(e,"disabled",t[10]),c[0]&16&&p(e,"inEdit",t[4]),c[0]&131584&&p(e,"isDirty",t[9]&&t[17]),c[0]&8192&&p(e,"inline",t[13]),c[0]&32&&p(e,"tableCell",t[5]=="tableCell"),c[0]&32&&p(e,"formInput",t[5]=="formInput"),c[0]&524288&&P(e,"color",t[19]),c[0]&262144&&P(e,"background",t[18])},i:ue,o:ue,d(f){f&&C(e),o&&o.d(),a.d(),l=!1,r()}}}function Sw(t){setTimeout(()=>t==null?void 0:t.focus(),10)}function Cw(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E,k,I,O,D,N,M,V,W,ne,H,$=ue,Y=()=>($(),$=ft(se,de=>n(7,H=de)),se),G;t.$$.on_destroy.push(()=>$());const{processStringSync:oe}=le.getContext("sdk"),ie=le.getContext("context");Me(t,ie,de=>n(31,G=de));const J=le.createEventDispatcher();let{value:q}=e,{cellOptions:j={}}=e,{autofocus:K=!1}=e,x=q??0,X,F,R,z=(j==null?void 0:j.initialState)??"View";function me(de,Xe,Te){if(!de&&de!==0)return"";const Se=de.toFixed(Te??0);if(!Xe)return Se;const Le=Se.split(".");return Le[0]=Le[0].replace(/\B(?=(\d{3})+(?!\d))/g,Xe),Le.join(".")}let{cellState:se=Ft(z??"View",{"*":{goTo(de){return de}},View:{_enter(){const de=Number(q);n(3,x=isNaN(de)?null:de),n(23,F=void 0)},reset(de){if(de==x)return;const Xe=Number(q);return n(3,x=isNaN(Xe)?null:Xe),n(23,F=void 0),z},focus(){if(!i&&!l)return"Editing"}},Editing:{_enter(){X==null||X.focus(),J("enteredit")},_exit(){n(23,F=void 0),J("exitedit")},clear(){g&&J("change",null),n(23,F=new Date),n(3,x=null)},focusout(de){J("focusout",de),this.submit()},submit(){return M&&J("change",Number(x)),z},cancel(){return n(3,x=q),J("cancel"),z},debouncedDispatch(){g&&(clearTimeout(R),R=setTimeout(()=>{J("change",x)},g))},handleKeyboard(de){const Xe=de.target,Te=de.key;if(["Enter","Escape","ArrowLeft","ArrowRight","Tab","ArrowUp","ArrowDown"].includes(Te)){if(Te==="Enter")return this.submit();if(Te==="Escape")return this.cancel();if(Te==="ArrowUp"){de.preventDefault(),this.increment(de);return}if(Te==="ArrowDown"){de.preventDefault(),this.decrement(de);return}return}(Te.length===1&&!/[\d.-]/.test(Te)||Te==="."&&Xe.value.includes(".")||Te==="."&&(w??0)===0||Te==="-"&&(Xe.value.includes("-")||Xe.selectionStart!==0))&&de.preventDefault()},handleInput(de){const Xe=de.target,Te=Xe.value;if(Te!==""&&Te!=="-"&&!/^-?\d*\.?\d*$/.test(Te)){Xe.value=(x==null?void 0:x.toString())??"";return}if(Te.includes(".")&&Te.split(".")[1].length>(w??0)){Xe.value=(x==null?void 0:x.toString())??"";return}n(3,x=Te===""||Te==="-"?0:Number(Te)||0),n(3,x=Number(x.toFixed(w??0))),_!==void 0&&x<_&&n(3,x=_),b!==void 0&&x>b&&n(3,x=b),n(23,F=new Date),this.debouncedDispatch()},increment(de){const Xe=de.shiftKey?10:1;n(3,x+=ne*Xe),b!==void 0&&x>b&&n(3,x=b),n(23,F=new Date),this.debouncedDispatch()},decrement(de){const Xe=de.shiftKey?10:1;n(3,x-=ne*Xe),_!==void 0&&x<_&&n(3,x=_),n(23,F=new Date),this.debouncedDispatch()},handleWheel(de){de.preventDefault(),de.stopPropagation(),de.shiftKey?de.deltaX<0?this.increment(de):this.decrement(de):de.deltaY<0?this.increment(de):this.decrement(de)}}})}=e;Y();const Oe={focus:()=>se.focus(),reset:()=>se.reset(q),isEditing:()=>H==="Editing",isDirty:()=>M,getValue:()=>x,setError:de=>{},clearError:()=>{},setValue:de=>{n(0,q=de)}};le.onMount(()=>{K&&setTimeout(()=>{se.focus(),X==null||X.focus()},50)}),le.onDestroy(()=>{clearTimeout(R)});function be(de){Be[de?"unshift":"push"](()=>{X=de,n(8,X)})}const Ie=de=>se.handleKeyboard(de),ve=de=>se.handleInput(de),fe=de=>se.focusout(de),Ne=de=>se.handleWheel(de),te=de=>se.decrement(de),ae=de=>se.increment(de);return t.$$set=de=>{"value"in de&&n(0,q=de.value),"cellOptions"in de&&n(1,j=de.cellOptions),"autofocus"in de&&n(21,K=de.autofocus),"cellState"in de&&Y(n(2,se=de.cellState))},t.$$.update=()=>{t.$$.dirty[0]&2&&n(11,{readonly:i,disabled:l,error:r,icon:o,color:u,background:s,showDirty:a,template:f,placeholder:c,debounce:g,showStepper:h,stepSize:d,min:_,max:b,decimals:w,thousandsSeparator:E,role:k}=j??{},i,(n(10,l),n(1,j)),(n(30,r),n(1,j)),(n(29,o),n(1,j)),(n(19,u),n(1,j)),(n(18,s),n(1,j)),(n(17,a),n(1,j)),(n(28,f),n(1,j)),(n(16,c),n(1,j)),(n(15,h),n(1,j)),(n(25,d),n(1,j)),(n(24,w),n(1,j)),(n(26,E),n(1,j)),(n(5,k),n(1,j))),t.$$.dirty[0]&1073741824&&n(6,I=r),t.$$.dirty[0]&536870976&&n(14,O=I?"ph ph-warning":o),t.$$.dirty[0]&128&&n(4,D=H==="Editing"),t.$$.dirty[0]&32&&n(13,N=k==="inlineInput"),t.$$.dirty[0]&8388617&&n(9,M=!!F&&q!==x),t.$$.dirty[0]&25&&n(27,V=D?x:q??0),t.$$.dirty[0]&486539265|t.$$.dirty[1]&1&&n(12,W=f?oe(f,{...G,value:q}):me(V,E,w)),t.$$.dirty[0]&33554432&&(ne=d??1),t.$$.dirty[0]&5&&se.reset(q)},[q,j,se,x,D,k,I,H,X,M,l,i,W,N,O,h,c,a,s,u,ie,K,Oe,F,w,d,E,V,f,o,r,G,be,Ie,ve,fe,Ne,te,ae]}class or extends Ze{constructor(e){super(),Qe(this,e,Cw,vw,Ye,{value:0,cellOptions:1,autofocus:21,cellState:2,cellApi:22},null,[-1,-1])}get cellApi(){return this.$$.ctx[22]}}function hc(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[8]+" field-icon")+" svelte-weopao"),p(e,"with-error",t[7])},m(i,l){A(i,e,l)},p(i,l){l&256&&n!==(n=bt(i[8]+" field-icon")+" svelte-weopao")&&m(e,"class",n),l&384&&p(e,"with-error",i[7])},d(i){i&&C(e)}}}function Aw(t){let e,n,i;function l(u,s){if(u[0])return Dw;if(u[2].showFalse)return Iw}let r=l(t),o=r&&r(t);return{c(){e=v("div"),o&&o.c(),m(e,"class","value"),m(e,"tabindex","0"),p(e,"with-icon",t[2].icon),P(e,"justify-content",t[2].align??"center")},m(u,s){A(u,e,s),o&&o.m(e,null),n||(i=B(e,"focusin",function(){Ge(t[3].focus)&&t[3].focus.apply(this,arguments)}),n=!0)},p(u,s){t=u,r!==(r=l(t))&&(o&&o.d(1),o=r&&r(t),o&&(o.c(),o.m(e,null))),s&4&&p(e,"with-icon",t[2].icon),s&4&&P(e,"justify-content",t[2].align??"center")},d(u){u&&C(e),o&&o.d(),n=!1,i()}}}function Tw(t){let e;function n(r,o){return r[11]?Ow:Rw}let i=n(t),l=i(t);return{c(){e=v("div"),l.c(),m(e,"class","editor"),p(e,"naked-field",!t[10]),P(e,"justify-content",t[2].align??"center")},m(r,o){A(r,e,o),l.m(e,null)},p(r,o){i===(i=n(r))&&l?l.p(r,o):(l.d(1),l=i(r),l&&(l.c(),l.m(e,null))),o&1024&&p(e,"naked-field",!r[10]),o&4&&P(e,"justify-content",r[2].align??"center")},d(r){r&&C(e),l.d()}}}function Iw(t){let e;return{c(){e=v("i"),m(e,"class","ri-close-line valueicon")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Dw(t){let e;return{c(){e=v("i"),m(e,"class","ri-check-line valueicon")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Ow(t){let e,n,i,l,r,o,u=t[9]&&gc(t);return{c(){e=v("input"),i=Q(),u&&u.c(),l=Fe(),m(e,"class","checkbox"),m(e,"type","checkbox"),e.disabled=n=t[2].disabled||t[2].readonly},m(s,a){A(s,e,a),e.checked=t[0],t[19](e),A(s,i,a),u&&u.m(s,a),A(s,l,a),r||(o=[B(e,"change",t[18]),B(e,"focusin",function(){Ge(t[3].focus)&&t[3].focus.apply(this,arguments)}),B(e,"focusout",function(){Ge(t[3].submit)&&t[3].submit.apply(this,arguments)}),B(e,"change",function(){Ge(t[3].change)&&t[3].change.apply(this,arguments)}),tn(t[14].call(null,e))],r=!0)},p(s,a){t=s,a&4&&n!==(n=t[2].disabled||t[2].readonly)&&(e.disabled=n),a&1&&(e.checked=t[0]),t[9]?u?u.p(t,a):(u=gc(t),u.c(),u.m(l.parentNode,l)):u&&(u.d(1),u=null)},d(s){s&&(C(e),C(i),C(l)),t[19](null),u&&u.d(s),r=!1,Ve(o)}}}function Rw(t){let e,n,i,l,r,o,u,s,a=t[9]&&mc(t);return{c(){e=v("div"),n=v("input"),l=Q(),r=v("span"),o=Q(),a&&a.c(),m(n,"class","spectrum-Switch-input"),m(n,"type","checkbox"),n.disabled=i=t[2].disabled||t[2].readonly,m(r,"class","spectrum-Switch-switch"),m(e,"class","spectrum-Switch spectrum-Switch--emphasized svelte-weopao")},m(f,c){A(f,e,c),S(e,n),n.checked=t[0],t[17](n),S(e,l),S(e,r),S(e,o),a&&a.m(e,null),u||(s=[B(n,"change",t[16]),B(n,"focusin",function(){Ge(t[3].focus)&&t[3].focus.apply(this,arguments)}),B(n,"focusout",function(){Ge(t[3].submit)&&t[3].submit.apply(this,arguments)}),B(n,"change",function(){Ge(t[3].change)&&t[3].change.apply(this,arguments)}),tn(t[14].call(null,n))],u=!0)},p(f,c){t=f,c&4&&i!==(i=t[2].disabled||t[2].readonly)&&(n.disabled=i),c&1&&(n.checked=t[0]),t[9]?a?a.p(t,c):(a=mc(t),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(f){f&&C(e),t[17](null),a&&a.d(),u=!1,Ve(s)}}}function gc(t){let e,n;return{c(){e=v("span"),n=Ee(t[9]),m(e,"class","checkbox-label svelte-weopao")},m(i,l){A(i,e,l),S(e,n)},p(i,l){l&512&&Pe(n,i[9])},d(i){i&&C(e)}}}function mc(t){let e,n;return{c(){e=v("span"),n=Ee(t[9]),m(e,"class","spectrum-Switch-label")},m(i,l){A(i,e,l),S(e,n)},p(i,l){l&512&&Pe(n,i[9])},d(i){i&&C(e)}}}function Pw(t){let e,n,i=t[8]&&hc(t);function l(u,s){return u[5]=="Editing"||u[2].role!="tableCell"&&!u[1]?Tw:Aw}let r=l(t),o=r(t);return{c(){e=v("div"),i&&i.c(),n=Q(),o.c(),m(e,"class","superCell"),p(e,"inEdit",t[4]),p(e,"isDirty",t[12]&&t[2].showDirty),p(e,"inline",t[13]),p(e,"tableCell",t[10]),p(e,"disabled",t[2].disabled),p(e,"readonly",t[2].readonly),p(e,"naked-field",!t[10]),P(e,"color",t[2].color),P(e,"background",t[5]=="Editing"&&t[2].role!="inline"?"var(--spectrum-global-color-gray-50)":t[2].background),P(e,"font-weight",t[2].fontWeight)},m(u,s){A(u,e,s),i&&i.m(e,null),S(e,n),o.m(e,null)},p(u,[s]){u[8]?i?i.p(u,s):(i=hc(u),i.c(),i.m(e,n)):i&&(i.d(1),i=null),r===(r=l(u))&&o?o.p(u,s):(o.d(1),o=r(u),o&&(o.c(),o.m(e,null))),s&16&&p(e,"inEdit",u[4]),s&4100&&p(e,"isDirty",u[12]&&u[2].showDirty),s&8192&&p(e,"inline",u[13]),s&1024&&p(e,"tableCell",u[10]),s&4&&p(e,"disabled",u[2].disabled),s&4&&p(e,"readonly",u[2].readonly),s&1024&&p(e,"naked-field",!u[10]),s&4&&P(e,"color",u[2].color),s&36&&P(e,"background",u[5]=="Editing"&&u[2].role!="inline"?"var(--spectrum-global-color-gray-50)":u[2].background),s&4&&P(e,"font-weight",u[2].fontWeight)},i:ue,o:ue,d(u){u&&C(e),i&&i.d(),o.d()}}}function Mw(t,e,n){let i,l,r,o,u,s,a,f,c,g=ue,h=()=>(g(),g=ft(I,W=>n(5,c=W)),I);t.$$.on_destroy.push(()=>g());let{value:d}=e,{formattedValue:_}=e,{cellOptions:b}=e,w=d,E;const k=le.createEventDispatcher();let{cellState:I=Ft(b.initialState??"View",{"*":{goTo(W){return W}},View:{focus(){if(!b.readonly&&!b.disabled)return"Editing";E==null||E.focus()}},Editing:{_enter(){n(15,w=d),E==null||E.focus(),k("enteredit")},_exit(){k("exitedit")},focus(){E==null||E.focus()},change(W){b.debounce&&k("change",d)},submit(){return d!==w&&k("change",d),k("focusout"),"View"},cancel(){return n(0,d=w),"View"}}})}=e;h();const O=W=>{b.role=="tableCell"&&W.focus()};function D(){d=this.checked,n(0,d)}function N(W){Be[W?"unshift":"push"](()=>{E=W,n(6,E)})}function M(){d=this.checked,n(0,d)}function V(W){Be[W?"unshift":"push"](()=>{E=W,n(6,E)})}return t.$$set=W=>{"value"in W&&n(0,d=W.value),"formattedValue"in W&&n(1,_=W.formattedValue),"cellOptions"in W&&n(2,b=W.cellOptions),"cellState"in W&&h(n(3,I=W.cellState))},t.$$.update=()=>{t.$$.dirty&4&&n(13,i=b.role=="inlineInput"),t.$$.dirty&32&&n(4,l=c=="Editing"),t.$$.dirty&32785&&n(12,r=l&&w!==d),t.$$.dirty&4&&n(11,o=(b==null?void 0:b.controlType)=="checkbox"),t.$$.dirty&4&&n(10,u=b.role=="tableCell"),t.$$.dirty&4&&n(9,s=b.inlineLabel),t.$$.dirty&4&&n(8,a=b.error?"ri-error-warning-line":b.icon),t.$$.dirty&4&&n(7,f=b.error)},[d,_,b,I,l,c,E,f,a,s,u,o,r,i,O,w,D,N,M,V]}class Yo extends Ze{constructor(e){super(),Qe(this,e,Mw,Pw,Ye,{value:0,formattedValue:1,cellOptions:2,cellState:3})}}function _c(t){let e,n,i=("00"+t[0].getHours()).slice(-2)+"",l,r,o,u=("00"+t[0].getMinutes()).slice(-2)+"",s,a,f,c,g=t[1]!=="minute"&&pc(t);return{c(){e=v("div"),n=v("span"),l=Ee(i),r=Ee(`:
|
|
13
|
-
`),o=v("span"),s=Ee(u),a=Q(),g&&g.c(),m(n,"role","spinbutton"),m(n,"aria-label","Hours"),m(n,"tabindex","0"),m(n,"contenteditable",""),m(n,"inputmode","numeric"),m(n,"class","svelte-mzlxg7"),m(o,"role","spinbutton"),m(o,"aria-label","Minutes"),m(o,"tabindex","0"),m(o,"contenteditable",""),m(o,"inputmode","numeric"),m(o,"class","svelte-mzlxg7"),m(e,"class","time-picker svelte-mzlxg7"),m(e,"role","none")},m(h,d){A(h,e,d),S(e,n),S(n,l),t[6](n),S(e,r),S(e,o),S(o,s),t[7](o),S(e,a),g&&g.m(e,null),f||(c=[B(n,"keydown",t[3]),B(n,"input",t[4]),B(n,"focus",qr),B(o,"keydown",t[3]),B(o,"input",t[4]),B(o,"focus",qr),B(e,"mousedown",t[10])],f=!0)},p(h,d){d&1&&i!==(i=("00"+h[0].getHours()).slice(-2)+"")&&cr(l,i),d&1&&u!==(u=("00"+h[0].getMinutes()).slice(-2)+"")&&cr(s,u),h[1]!=="minute"?g?g.p(h,d):(g=pc(h),g.c(),g.m(e,null)):g&&(g.d(1),g=null)},d(h){h&&C(e),t[6](null),t[7](null),g&&g.d(),f=!1,Ve(c)}}}function pc(t){let e,n,i=("00"+t[0].getSeconds()).slice(-2)+"",l,r,o,u,s,a=t[1]!=="second"&&bc(t);return{c(){e=Ee(":"),n=v("span"),l=Ee(i),r=Q(),a&&a.c(),o=Fe(),m(n,"role","spinbutton"),m(n,"aria-label","Seconds"),m(n,"tabindex","0"),m(n,"contenteditable",""),m(n,"inputmode","numeric"),m(n,"class","svelte-mzlxg7")},m(f,c){A(f,e,c),A(f,n,c),S(n,l),t[8](n),A(f,r,c),a&&a.m(f,c),A(f,o,c),u||(s=[B(n,"keydown",t[3]),B(n,"input",t[4]),B(n,"focus",qr)],u=!0)},p(f,c){c&1&&i!==(i=("00"+f[0].getSeconds()).slice(-2)+"")&&cr(l,i),f[1]!=="second"?a?a.p(f,c):(a=bc(f),a.c(),a.m(o.parentNode,o)):a&&(a.d(1),a=null)},d(f){f&&(C(e),C(n),C(r),C(o)),t[8](null),a&&a.d(f),u=!1,Ve(s)}}}function bc(t){let e,n,i=("000"+t[0].getMilliseconds()).slice(-3)+"",l,r,o;return{c(){e=Ee("."),n=v("span"),l=Ee(i),m(n,"role","spinbutton"),m(n,"aria-label","Milliseconds"),m(n,"tabindex","0"),m(n,"contenteditable",""),m(n,"inputmode","numeric"),m(n,"class","svelte-mzlxg7")},m(u,s){A(u,e,s),A(u,n,s),S(n,l),t[9](n),r||(o=[B(n,"keydown",t[3]),B(n,"input",t[4]),B(n,"focus",qr)],r=!0)},p(u,s){s&1&&i!==(i=("000"+u[0].getMilliseconds()).slice(-3)+"")&&cr(l,i)},d(u){u&&(C(e),C(n)),t[9](null),r=!1,Ve(o)}}}function Nw(t){let e,n=t[1]&&_c(t);return{c(){n&&n.c(),e=Fe()},m(i,l){n&&n.m(i,l),A(i,e,l)},p(i,[l]){i[1]?n?n.p(i,l):(n=_c(i),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:ue,o:ue,d(i){i&&C(e),n&&n.d(i)}}}function jr(t){const e=window.getSelection(),n=document.createRange();n.selectNodeContents(t),e==null||e.removeAllRanges(),e==null||e.addRange(n)}function Lw(t,e,n){return n&&t<0?e:n&&t>e?0:Math.max(0,Math.min(e,t))}function Ko(t){const e=t.getAttribute("aria-label");if(e==="Hours")return{label:e,len:2,max:23};if(e==="Minutes")return{label:e,len:2,max:59};if(e==="Seconds")return{label:e,len:2,max:59};if(e==="Milliseconds")return{label:e,len:3,max:999};throw new Error("Invalid label "+e)}function Xo(t,e){return parseInt(t.replace(/[^\d]/g,"").slice(-e))}function qr(t){jr(t.currentTarget)}function Fw(t,e,n){let{browseDate:i}=e,{timePrecision:l}=e,{setTime:r}=e,o=[];function u(w){if(w.key==="ArrowUp"||w.key==="ArrowDown"){const E=s(w.currentTarget),k=w.key==="ArrowUp"?1:-1;f(w.currentTarget,E+k,!0),w.preventDefault(),jr(w.currentTarget)}else if(w.key==="ArrowLeft"||w.key==="ArrowRight"||":;-,.".includes(w.key)){const E=o.indexOf(w.currentTarget),k=w.key==="ArrowLeft"?-1:1,I=o[E+k];w.preventDefault(),I&&(I.focus(),jr(I))}}function s(w){const E=Ko(w).label;return E==="Hours"?i.getHours():E==="Minutes"?i.getMinutes():E==="Seconds"?i.getSeconds():i.getMilliseconds()}function a(w){const E=("00"+w.getHours()).slice(-2),k=("00"+w.getMinutes()).slice(-2),I=("00"+w.getSeconds()).slice(-2),O=("000"+w.getMilliseconds()).slice(-3);o[0]&&o[0].innerText!==E&&n(2,o[0].innerText=E,o),o[1]&&o[1].innerText!==k&&n(2,o[1].innerText=k,o),o[2]&&o[2].innerText!==I&&n(2,o[2].innerText=I,o),o[3]&&o[3].innerText!==O&&n(2,o[3].innerText=O,o)}function f(w,E,k=!1){const I=Ko(w);E=Lw(E,I.max,k),I.label==="Hours"?i.setHours(E):I.label==="Minutes"?i.setMinutes(E):I.label==="Seconds"?i.setSeconds(E):I.label==="Milliseconds"&&i.setMilliseconds(E),n(0,i=r(i)),a(i)}function c(w){const E=w,k=Ko(E.currentTarget);let I;if(E.inputType==="insertText"){const O="000"+s(E.currentTarget);I=Xo(O+E.currentTarget.innerText,k.len),I>k.max&&E.data&&(I=Xo(E.data,k.len))}else I=Xo("000"+E.currentTarget.innerText,k.len);f(E.currentTarget,I),jr(E.currentTarget)}function g(w){Be[w?"unshift":"push"](()=>{o[0]=w,n(2,o)})}function h(w){Be[w?"unshift":"push"](()=>{o[1]=w,n(2,o)})}function d(w){Be[w?"unshift":"push"](()=>{o[2]=w,n(2,o)})}function _(w){Be[w?"unshift":"push"](()=>{o[3]=w,n(2,o)})}const b=w=>{w.target instanceof HTMLElement&&w.target.tagName==="SPAN"&&(w.target.focus(),w.preventDefault())};return t.$$set=w=>{"browseDate"in w&&n(0,i=w.browseDate),"timePrecision"in w&&n(1,l=w.timePrecision),"setTime"in w&&n(5,r=w.setTime)},t.$$.update=()=>{t.$$.dirty&1&&a(i)},[i,l,o,u,c,r,g,h,d,_,b]}class Vw extends Ze{constructor(e){super(),Qe(this,e,Fw,Nw,Ye,{browseDate:0,timePrecision:1,setTime:5})}}function Bw(t){return t%4===0&&t%100!==0||t%400===0}function Wr(t,e){return[31,Bw(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]}function Qo(t,e){const n=Wr(t,e),i=[];for(let l=0;l<n;l++)i.push({year:t,month:e,number:l+1});return i}function Uw(t,e){const n=t.getFullYear(),i=t.getMonth(),l=new Date(n,i,1).getDay();let r=[];const o=(l-e+7)%7;if(o>0){let f=i-1,c=n;f===-1&&(f=11,c=n-1),r=Qo(c,f).slice(-o)}r=r.concat(Qo(n,i));let u=i+1,s=n;u===12&&(u=0,s=n+1);const a=42-r.length;return r=r.concat(Qo(s,u).slice(0,a)),r}function wc(t,e){e===null?t.setHours(0,0,0,0):e==="minute"?t.setSeconds(0,0):e==="second"&&t.setMilliseconds(0)}function si(t){return new Date(t)}function Gr(t,e,n,i,l){let r=si(e);return t>e?(Yr(r,-1,n,i,l),r<n&&(r=Kr(r,n,i),Yr(r,1,n,i,l))):r>=t&&(Yr(r,1,n,i,l),r>i&&(r=Kr(r,n,i),Yr(r,-1,n,i,l))),(r<n||r>i)&&(r=Zo(r,n,i)),r}function Yr(t,e,n,i,l){let o=0;for(;l!=null&&l(t)&&t>=n&&t<=i&&o<=36525;)t.setDate(t.getDate()+e),o++}function Zo(t,e,n){return t>n?si(n):t<e?si(e):si(t)}function Kr(t,e,n){const i=Zo(t,e,n);return t=new Date(i.getFullYear(),i.getMonth(),i.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),t>n&&t.setDate(n.getDate()),t<e&&t.setDate(e.getDate()),t}function Hw(){return{weekdays:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekStartsOn:1}}function zw(t){const e=Hw();return typeof t.weekStartsOn=="number"&&(e.weekStartsOn=t.weekStartsOn),t.months&&(e.months=t.months),t.shortMonths&&(e.shortMonths=t.shortMonths),t.weekdays&&(e.weekdays=t.weekdays),e}function kc(t,e,n){const i=t.slice();return i[38]=e[n],i[40]=n,i}function yc(t,e,n){const i=t.slice();return i[41]=e[n],i}function Ec(t,e,n){const i=t.slice();return i[38]=e[n],i[45]=n,i}function vc(t,e,n){const i=t.slice();return i[46]=e[n],i}function Sc(t,e,n){const i=t.slice();return i[46]=e[n],i}function Cc(t,e,n){const i=t.slice();return i[51]=e[n],i[45]=n,i}function Ac(t,e,n){const i=t.slice();return i[51]=e[n],i[45]=n,i}function Tc(t){let e,n=t[51]+"",i,l;return{c(){e=v("option"),i=Ee(n),e.disabled=l=new Date(t[9],t[45],Wr(t[9],t[45]),23,59,59,999)<t[2]||new Date(t[9],t[45])>t[3],e.__value=t[45],Zt(e,e.__value)},m(r,o){A(r,e,o),S(e,i)},p(r,o){o[0]&32&&n!==(n=r[51]+"")&&Pe(i,n),o[0]&588&&l!==(l=new Date(r[9],r[45],Wr(r[9],r[45]),23,59,59,999)<r[2]||new Date(r[9],r[45])>r[3])&&(e.disabled=l)},d(r){r&&C(e)}}}function Ic(t){let e,n=t[51]+"",i,l;return{c(){e=v("option"),i=Ee(n),e.__value=t[45],Zt(e,e.__value),e.selected=l=t[45]===t[8]},m(r,o){A(r,e,o),S(e,i)},p(r,o){o[0]&32&&n!==(n=r[51]+"")&&Pe(i,n),o[0]&256&&l!==(l=r[45]===r[8])&&(e.selected=l)},d(r){r&&C(e)}}}function Dc(t){let e,n=t[46]+"",i,l;return{c(){e=v("option"),i=Ee(n),e.__value=l=t[46],Zt(e,e.__value)},m(r,o){A(r,e,o),S(e,i)},p(r,o){o[0]&64&&n!==(n=r[46]+"")&&Pe(i,n),o[0]&64&&l!==(l=r[46])&&(e.__value=l,Zt(e,e.__value))},d(r){r&&C(e)}}}function Oc(t){let e,n=t[46]+"",i,l,r;return{c(){e=v("option"),i=Ee(n),e.__value=l=t[46],Zt(e,e.__value),e.selected=r=t[46]===t[4].getFullYear()},m(o,u){A(o,e,u),S(e,i)},p(o,u){u[0]&64&&n!==(n=o[46]+"")&&Pe(i,n),u[0]&64&&l!==(l=o[46])&&(e.__value=l,Zt(e,e.__value)),u[0]&80&&r!==(r=o[46]===o[4].getFullYear())&&(e.selected=r)},d(o){o&&C(e)}}}function jw(t){let e,n=t[5].weekdays[t[5].weekStartsOn+t[45]-7]+"",i;return{c(){e=v("div"),i=Ee(n),m(e,"class","header-cell svelte-w239uu")},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&32&&n!==(n=l[5].weekdays[l[5].weekStartsOn+l[45]-7]+"")&&Pe(i,n)},d(l){l&&C(e)}}}function qw(t){let e,n=t[5].weekdays[t[5].weekStartsOn+t[45]]+"",i;return{c(){e=v("div"),i=Ee(n),m(e,"class","header-cell svelte-w239uu")},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&32&&n!==(n=l[5].weekdays[l[5].weekStartsOn+l[45]]+"")&&Pe(i,n)},d(l){l&&C(e)}}}function Rc(t){let e;function n(r,o){return r[45]+r[5].weekStartsOn<7?qw:jw}let i=n(t),l=i(t);return{c(){l.c(),e=Fe()},m(r,o){l.m(r,o),A(r,e,o)},p(r,o){i===(i=n(r))&&l?l.p(r,o):(l.d(1),l=i(r),l&&(l.c(),l.m(e.parentNode,e)))},d(r){r&&C(e),l.d(r)}}}function Pc(t){let e,n,i=t[41].number+"",l,r,o;function u(){return t[29](t[41])}return{c(){e=v("div"),n=v("span"),l=Ee(i),m(n,"class","svelte-w239uu"),m(e,"class","cell svelte-w239uu"),p(e,"disabled",!Jo(t[41],t[2],t[3])||t[12](t[41])),p(e,"selected",t[0]&&t[41].year===t[0].getFullYear()&&t[41].month===t[0].getMonth()&&t[41].number===t[0].getDate()),p(e,"today",t[41].year===t[11].getFullYear()&&t[41].month===t[11].getMonth()&&t[41].number===t[11].getDate()),p(e,"other-month",t[41].month!==t[8])},m(s,a){A(s,e,a),S(e,n),S(n,l),r||(o=B(e,"click",u),r=!0)},p(s,a){t=s,a[0]&128&&i!==(i=t[41].number+"")&&Pe(l,i),a[0]&4236&&p(e,"disabled",!Jo(t[41],t[2],t[3])||t[12](t[41])),a[0]&129&&p(e,"selected",t[0]&&t[41].year===t[0].getFullYear()&&t[41].month===t[0].getMonth()&&t[41].number===t[0].getDate()),a[0]&2176&&p(e,"today",t[41].year===t[11].getFullYear()&&t[41].month===t[11].getMonth()&&t[41].number===t[11].getDate()),a[0]&384&&p(e,"other-month",t[41].month!==t[8])},d(s){s&&C(e),r=!1,o()}}}function Mc(t){let e,n=Ce(t[7].slice(t[40]*7,t[40]*7+7)),i=[];for(let l=0;l<n.length;l+=1)i[l]=Pc(yc(t,n,l));return{c(){e=v("div");for(let l=0;l<i.length;l+=1)i[l].c();m(e,"class","week svelte-w239uu")},m(l,r){A(l,e,r);for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(e,null)},p(l,r){if(r[0]&39309){n=Ce(l[7].slice(l[40]*7,l[40]*7+7));let o;for(o=0;o<n.length;o+=1){const u=yc(l,n,o);i[o]?i[o].p(u,r):(i[o]=Pc(u),i[o].c(),i[o].m(e,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=n.length}},d(l){l&&C(e),St(i,l)}}}function Ww(t){let e,n,i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E,k,I,O,D,N,M,V,W,ne,H,$,Y,G,oe,ie=Ce(t[5].months),J=[];for(let fe=0;fe<ie.length;fe+=1)J[fe]=Tc(Ac(t,ie,fe));let q=Ce(t[5].months),j=[];for(let fe=0;fe<q.length;fe+=1)j[fe]=Ic(Cc(t,q,fe));let K=Ce(t[6]),x=[];for(let fe=0;fe<K.length;fe+=1)x[fe]=Dc(Sc(t,K,fe));let X=Ce(t[6]),F=[];for(let fe=0;fe<X.length;fe+=1)F[fe]=Oc(vc(t,X,fe));let R=Ce(Array(7)),z=[];for(let fe=0;fe<R.length;fe+=1)z[fe]=Rc(Ec(t,R,fe));let me=Ce(Array(6)),se=[];for(let fe=0;fe<me.length;fe+=1)se[fe]=Mc(kc(t,me,fe));function Oe(fe){t[30](fe)}let be={timePrecision:t[1],setTime:t[10]};t[4]!==void 0&&(be.browseDate=t[4]),ne=new Vw({props:be}),Be.push(()=>Gt(ne,"browseDate",Oe));const Ie=t[23].default,ve=Ut(Ie,t,t[22],null);return{c(){e=v("div"),n=v("div"),i=v("div"),l=v("button"),l.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="svelte-w239uu"><path d="M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z" transform="rotate(180, 12, 12)"></path></svg>',r=Q(),o=v("div"),u=v("select");for(let fe=0;fe<J.length;fe+=1)J[fe].c();s=Q(),a=v("select");for(let fe=0;fe<j.length;fe+=1)j[fe].c();f=Q(),c=vl("svg"),g=vl("path"),h=Q(),d=v("div"),_=v("select");for(let fe=0;fe<x.length;fe+=1)x[fe].c();b=Q(),w=v("select");for(let fe=0;fe<F.length;fe+=1)F[fe].c();E=Q(),k=vl("svg"),I=vl("path"),O=Q(),D=v("button"),D.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="svelte-w239uu"><path d="M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z"></path></svg>',N=Q(),M=v("div");for(let fe=0;fe<z.length;fe+=1)z[fe].c();V=Q();for(let fe=0;fe<se.length;fe+=1)se[fe].c();W=Q(),We(ne.$$.fragment),$=Q(),ve&&ve.c(),m(l,"type","button"),m(l,"aria-label","Previous month"),m(l,"class","page-button svelte-w239uu"),m(l,"tabindex","-1"),m(u,"class","svelte-w239uu"),m(a,"class","dummy-select svelte-w239uu"),m(a,"tabindex","-1"),m(g,"d","M6 0l12 12-12 12z"),m(g,"transform","rotate(90, 12, 12)"),m(c,"xmlns","http://www.w3.org/2000/svg"),m(c,"width","24"),m(c,"height","24"),m(c,"viewBox","0 0 24 24"),m(c,"class","svelte-w239uu"),m(o,"class","dropdown month svelte-w239uu"),m(_,"class","svelte-w239uu"),m(w,"class","dummy-select svelte-w239uu"),m(w,"tabindex","-1"),m(I,"d","M6 0l12 12-12 12z"),m(I,"transform","rotate(90, 12, 12)"),m(k,"xmlns","http://www.w3.org/2000/svg"),m(k,"width","24"),m(k,"height","24"),m(k,"viewBox","0 0 24 24"),m(k,"class","svelte-w239uu"),m(d,"class","dropdown year svelte-w239uu"),m(D,"type","button"),m(D,"aria-label","Next month"),m(D,"class","page-button svelte-w239uu"),m(D,"tabindex","-1"),m(i,"class","top svelte-w239uu"),m(M,"class","header svelte-w239uu"),m(n,"class","tab-container svelte-w239uu"),m(n,"tabindex","-1"),m(e,"class","date-time-picker svelte-w239uu"),m(e,"tabindex","0")},m(fe,Ne){A(fe,e,Ne),S(e,n),S(n,i),S(i,l),S(i,r),S(i,o),S(o,u);for(let te=0;te<J.length;te+=1)J[te]&&J[te].m(u,null);dr(u,t[8]),S(o,s),S(o,a);for(let te=0;te<j.length;te+=1)j[te]&&j[te].m(a,null);S(o,f),S(o,c),S(c,g),S(i,h),S(i,d),S(d,_);for(let te=0;te<x.length;te+=1)x[te]&&x[te].m(_,null);dr(_,t[9]),S(d,b),S(d,w);for(let te=0;te<F.length;te+=1)F[te]&&F[te].m(w,null);S(d,E),S(d,k),S(k,I),S(i,O),S(i,D),S(n,N),S(n,M);for(let te=0;te<z.length;te+=1)z[te]&&z[te].m(M,null);S(n,V);for(let te=0;te<se.length;te+=1)se[te]&&se[te].m(n,null);S(n,W),je(ne,n,null),S(n,$),ve&&ve.m(n,null),Y=!0,G||(oe=[B(l,"click",t[25]),B(u,"keydown",t[17]),B(u,"input",t[26]),B(_,"input",t[27]),B(_,"keydown",t[16]),B(D,"click",t[28]),B(e,"focusout",t[24]),B(e,"keydown",t[18])],G=!0)},p(fe,Ne){if(Ne[0]&556){ie=Ce(fe[5].months);let ae;for(ae=0;ae<ie.length;ae+=1){const de=Ac(fe,ie,ae);J[ae]?J[ae].p(de,Ne):(J[ae]=Tc(de),J[ae].c(),J[ae].m(u,null))}for(;ae<J.length;ae+=1)J[ae].d(1);J.length=ie.length}if((!Y||Ne[0]&256)&&dr(u,fe[8]),Ne[0]&288){q=Ce(fe[5].months);let ae;for(ae=0;ae<q.length;ae+=1){const de=Cc(fe,q,ae);j[ae]?j[ae].p(de,Ne):(j[ae]=Ic(de),j[ae].c(),j[ae].m(a,null))}for(;ae<j.length;ae+=1)j[ae].d(1);j.length=q.length}if(Ne[0]&64){K=Ce(fe[6]);let ae;for(ae=0;ae<K.length;ae+=1){const de=Sc(fe,K,ae);x[ae]?x[ae].p(de,Ne):(x[ae]=Dc(de),x[ae].c(),x[ae].m(_,null))}for(;ae<x.length;ae+=1)x[ae].d(1);x.length=K.length}if((!Y||Ne[0]&576)&&dr(_,fe[9]),Ne[0]&80){X=Ce(fe[6]);let ae;for(ae=0;ae<X.length;ae+=1){const de=vc(fe,X,ae);F[ae]?F[ae].p(de,Ne):(F[ae]=Oc(de),F[ae].c(),F[ae].m(w,null))}for(;ae<F.length;ae+=1)F[ae].d(1);F.length=X.length}if(Ne[0]&32){R=Ce(Array(7));let ae;for(ae=0;ae<R.length;ae+=1){const de=Ec(fe,R,ae);z[ae]?z[ae].p(de,Ne):(z[ae]=Rc(de),z[ae].c(),z[ae].m(M,null))}for(;ae<z.length;ae+=1)z[ae].d(1);z.length=R.length}if(Ne[0]&39309){me=Ce(Array(6));let ae;for(ae=0;ae<me.length;ae+=1){const de=kc(fe,me,ae);se[ae]?se[ae].p(de,Ne):(se[ae]=Mc(de),se[ae].c(),se[ae].m(n,W))}for(;ae<se.length;ae+=1)se[ae].d(1);se.length=me.length}const te={};Ne[0]&2&&(te.timePrecision=fe[1]),!H&&Ne[0]&16&&(H=!0,te.browseDate=fe[4],Wt(()=>H=!1)),ne.$set(te),ve&&ve.p&&(!Y||Ne[0]&4194304)&&zt(ve,Ie,fe,fe[22],Y?Ht(Ie,fe[22],Ne,null):jt(fe[22]),null)},i(fe){Y||(U(ne.$$.fragment,fe),U(ve,fe),Y=!0)},o(fe){Z(ne.$$.fragment,fe),Z(ve,fe),Y=!1},d(fe){fe&&C(e),St(J,fe),St(j,fe),St(x,fe),St(F,fe),St(z,fe),St(se,fe),qe(ne),ve&&ve.d(fe),G=!1,Ve(oe)}}}function Jo(t,e,n){const i=new Date(t.year,t.month,t.number),l=new Date(e.getFullYear(),e.getMonth(),e.getDate()),r=new Date(n.getFullYear(),n.getMonth(),n.getDate());return i>=l&&i<=r}function Gw(t,e,n){let i,l,r,o,{$$slots:u={},$$scope:s}=e;const a=le.createEventDispatcher();let{value:f=null}=e;function c(R){R.getTime()!==(f==null?void 0:f.getTime())&&(n(4,O=Gr(f??O,R,w,E,k)),wc(O,b),n(0,f=si(O)))}function g(R){n(4,O=Kr(R,w,E)),!W&&f&&c(O)}function h(R){return n(4,O=Zo(R,w,E)),f&&c(O),O}const d=new Date,_=new Date;let{timePrecision:b=null}=e,{min:w=new Date(_.getFullYear()-20,0,1)}=e,{max:E=new Date(_.getFullYear(),11,31,23,59,59,999)}=e,{isDisabledDate:k=null}=e;function I(R){return k==null?void 0:k(new Date(R.year,R.month,R.number))}let O=si(f||Kr(_,w,E));function D(R){O.getTime()!==(R==null?void 0:R.getTime())&&(n(4,O=R?si(R):O),wc(O,b))}let N=M(w,E);function M(R,z){let me=[];for(let se=R.getFullYear();se<=z.getFullYear();se++)me.push(se);return me}let{locale:V={}}=e,{browseWithoutSelecting:W=!1}=e;function ne(R){O.setFullYear(R),g(O)}function H(R){let z=O.getFullYear();R===12?(R=0,z++):R===-1&&(R=11,z--);const me=Wr(z,R),se=Math.min(O.getDate(),me);g(new Date(z,R,se,O.getHours(),O.getMinutes(),O.getSeconds(),O.getMilliseconds()))}function $(R){Jo(R,w,E)&&!I(R)&&(O.setFullYear(0),O.setMonth(0),O.setDate(1),O.setFullYear(R.year),O.setMonth(R.month),O.setDate(R.number),c(O),a("select",si(O)))}function Y(R){if(R.shiftKey&&R.key==="ArrowUp")ne(O.getFullYear()-1);else if(R.shiftKey&&R.key==="ArrowDown")ne(O.getFullYear()+1);else if(R.shiftKey&&R.key==="ArrowLeft")H(O.getMonth()-1);else if(R.shiftKey&&R.key==="ArrowRight")H(O.getMonth()+1);else return!1;return R.preventDefault(),!0}function G(R){if(R.shiftKey||R.altKey){Y(R);return}else if(R.key==="ArrowUp")ne(O.getFullYear()-1);else if(R.key==="ArrowDown")ne(O.getFullYear()+1);else if(R.key==="ArrowLeft")H(O.getMonth()-1);else if(R.key==="ArrowRight")H(O.getMonth()+1);else{Y(R);return}R.preventDefault()}function oe(R){if(R.shiftKey||R.altKey){Y(R);return}else if(R.key==="ArrowUp"||R.key==="ArrowLeft")H(O.getMonth()-1);else if(R.key==="ArrowDown"||R.key==="ArrowRight")H(O.getMonth()+1);else{Y(R);return}R.preventDefault()}function ie(R){var me,se;let z=R.shiftKey||R.altKey;if(!(((me=R.target)==null?void 0:me.tagName)==="SELECT"||((se=R.target)==null?void 0:se.tagName)==="SPAN")){if(z){Y(R);return}else if(R.key==="ArrowUp")O.setDate(O.getDate()-7),c(O);else if(R.key==="ArrowDown")O.setDate(O.getDate()+7),c(O);else if(R.key==="ArrowLeft")O.setDate(O.getDate()-1),c(O);else if(R.key==="ArrowRight")O.setDate(O.getDate()+1),c(O);else if(R.key==="Enter")c(O),a("select",si(O));else return;R.preventDefault()}}function J(R){ti.call(this,t,R)}const q=()=>H(O.getMonth()-1),j=R=>H(parseInt(R.currentTarget.value)),K=R=>ne(parseInt(R.currentTarget.value)),x=()=>H(O.getMonth()+1),X=R=>$(R);function F(R){O=R,n(4,O)}return t.$$set=R=>{"value"in R&&n(0,f=R.value),"timePrecision"in R&&n(1,b=R.timePrecision),"min"in R&&n(2,w=R.min),"max"in R&&n(3,E=R.max),"isDisabledDate"in R&&n(19,k=R.isDisabledDate),"locale"in R&&n(20,V=R.locale),"browseWithoutSelecting"in R&&n(21,W=R.browseWithoutSelecting),"$$scope"in R&&n(22,s=R.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&524317&&(f&&f>E?c(Gr(f,E,w,E,k)):f&&f<w?c(Gr(f,w,w,E,k)):f&&(k!=null&&k(f))&&c(Gr(O,f,w,E,k))),t.$$.dirty[0]&1&&D(f),t.$$.dirty[0]&12&&n(6,N=M(w,E)),t.$$.dirty[0]&1048576&&n(5,i=zw(V)),t.$$.dirty[0]&16&&n(9,l=O.getFullYear()),t.$$.dirty[0]&16&&n(8,r=O.getMonth()),t.$$.dirty[0]&48&&n(7,o=Uw(O,i.weekStartsOn))},[f,b,w,E,O,i,N,o,r,l,h,d,I,ne,H,$,G,oe,ie,k,V,W,s,u,J,q,j,K,x,X,F]}class xo extends Ze{constructor(e){super(),Qe(this,e,Gw,Ww,Ye,{value:0,timePrecision:1,min:2,max:3,isDisabledDate:19,locale:20,browseWithoutSelecting:21},null,[-1,-1])}}function Nc(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[2].icon+" icon")+" svelte-1bwhbmd")},m(i,l){A(i,e,l)},p(i,l){l&4&&n!==(n=bt(i[2].icon+" icon")+" svelte-1bwhbmd")&&m(e,"class",n)},d(i){i&&C(e)}}}function Yw(t){let e,n,i=(t[1]||t[13])+"",l;return{c(){e=v("div"),n=v("span"),l=Ee(i),m(e,"class","value"),p(e,"with-icon",t[2].icon),p(e,"placeholder",!t[1]),P(e,"justify-content",t[2].align)},m(r,o){A(r,e,o),S(e,n),S(n,l)},p(r,o){o&8194&&i!==(i=(r[1]||r[13])+"")&&Pe(l,i),o&4&&p(e,"with-icon",r[2].icon),o&2&&p(e,"placeholder",!r[1]),o&4&&P(e,"justify-content",r[2].align)},d(r){r&&C(e)}}}function Kw(t){let e,n=(t[1]||t[13])+"",i,l,r,o,u;return{c(){e=v("div"),i=Ee(n),l=Q(),r=v("i"),m(r,"class","ri-calendar-line"),P(r,"font-size","16px"),P(r,"justify-self","flex-end"),m(e,"class","editor"),p(e,"with-icon",t[2].icon),p(e,"placeholder",!t[1])},m(s,a){A(s,e,a),S(e,i),S(e,l),S(e,r),o||(u=B(e,"click",t[20]),o=!0)},p(s,a){a&8194&&n!==(n=(s[1]||s[13])+"")&&Pe(i,n),a&4&&p(e,"with-icon",s[2].icon),a&2&&p(e,"placeholder",!s[1])},d(s){s&&C(e),o=!1,u()}}}function Lc(t){let e,n;return e=new wn({props:{anchor:t[7],dismissible:!1,open:t[10],align:"right",maxHeight:400,$$slots:{default:[Xw]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l&128&&(r.anchor=i[7]),l&1024&&(r.open=i[10]),l&1073760209&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Fc(t){let e,n,i,l;return{c(){e=v("div"),n=v("input"),m(n,"type","time"),m(n,"class","time-input svelte-1bwhbmd"),m(n,"step","900"),m(e,"class","time-section svelte-1bwhbmd")},m(r,o){A(r,e,o),S(e,n),t[24](n),Zt(n,t[14]),i||(l=[B(n,"input",t[25]),B(n,"change",t[15])],i=!0)},p(r,o){o&16384&&Zt(n,r[14])},d(r){r&&C(e),t[24](null),i=!1,Ve(l)}}}function Xw(t){let e,n,i,l,r;function o(a){t[22](a)}let u={};t[6]!==void 0&&(u.value=t[6]),n=new xo({props:u}),Be.push(()=>Gt(n,"value",o)),n.$on("select",t[23]);let s=t[4]&&Fc(t);return{c(){e=v("div"),We(n.$$.fragment),l=Q(),s&&s.c(),m(e,"class","datetime-picker-container svelte-1bwhbmd"),P(e,"--date-picker-background","var(--spectrum-global-color-gray-75)"),P(e,"--date-picker-foreground","var(--spectrum-global-color-gray-800)"),P(e,"--date-picker-selected-background","var(--accent-color)")},m(a,f){A(a,e,f),je(n,e,null),S(e,l),s&&s.m(e,null),t[26](e),r=!0},p(a,f){const c={};!i&&f&64&&(i=!0,c.value=a[6],Wt(()=>i=!1)),n.$set(c),a[4]?s?s.p(a,f):(s=Fc(a),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},i(a){r||(U(n.$$.fragment,a),r=!0)},o(a){Z(n.$$.fragment,a),r=!1},d(a){a&&C(e),qe(n),s&&s.d(),t[26](null)}}}function Qw(t){let e,n,i,l,r,o,u,s,a=t[2].icon&&Nc(t);function f(d,_){return d[5]?Kw:Yw}let c=f(t),g=c(t),h=t[5]&&Lc(t);return{c(){e=v("div"),a&&a.c(),n=Q(),g.c(),l=Q(),h&&h.c(),r=Fe(),m(e,"class","superCell"),m(e,"tabindex",i=t[2].readonly||t[2].disabled?"-1":"0"),p(e,"inEdit",t[5]),p(e,"isDirty",t[11]&&t[2].showDirty),p(e,"inline",t[12]),p(e,"tableCell",t[2].role=="tableCell"),p(e,"formInput",t[2].role=="formInput"),p(e,"disabled",t[2].disabled),p(e,"readonly",t[2].readonly),p(e,"error",t[2].error),P(e,"color",t[2].color),P(e,"background",t[2].background),P(e,"font-weight",t[2].fontWeight)},m(d,_){A(d,e,_),a&&a.m(e,null),S(e,n),g.m(e,null),t[21](e),A(d,l,_),h&&h.m(d,_),A(d,r,_),o=!0,u||(s=[B(e,"focus",function(){Ge(t[3].focus)&&t[3].focus.apply(this,arguments)}),B(e,"keypress",function(){Ge(t[3].handleKeyboard)&&t[3].handleKeyboard.apply(this,arguments)}),B(e,"focusout",function(){Ge(t[3].focusout)&&t[3].focusout.apply(this,arguments)})],u=!0)},p(d,[_]){t=d,t[2].icon?a?a.p(t,_):(a=Nc(t),a.c(),a.m(e,n)):a&&(a.d(1),a=null),c===(c=f(t))&&g?g.p(t,_):(g.d(1),g=c(t),g&&(g.c(),g.m(e,null))),(!o||_&4&&i!==(i=t[2].readonly||t[2].disabled?"-1":"0"))&&m(e,"tabindex",i),(!o||_&32)&&p(e,"inEdit",t[5]),(!o||_&2052)&&p(e,"isDirty",t[11]&&t[2].showDirty),(!o||_&4096)&&p(e,"inline",t[12]),(!o||_&4)&&p(e,"tableCell",t[2].role=="tableCell"),(!o||_&4)&&p(e,"formInput",t[2].role=="formInput"),(!o||_&4)&&p(e,"disabled",t[2].disabled),(!o||_&4)&&p(e,"readonly",t[2].readonly),(!o||_&4)&&p(e,"error",t[2].error),_&4&&P(e,"color",t[2].color),_&4&&P(e,"background",t[2].background),_&4&&P(e,"font-weight",t[2].fontWeight),t[5]?h?(h.p(t,_),_&32&&U(h,1)):(h=Lc(t),h.c(),U(h,1),h.m(r.parentNode,r)):h&&(He(),Z(h,1,1,()=>{h=null}),ze())},i(d){o||(U(h),o=!0)},o(d){Z(h),o=!1},d(d){d&&(C(e),C(l),C(r)),a&&a.d(),g.d(),t[21](null),h&&h.d(d),u=!1,Ve(s)}}}function Zw(t,e){if(!t)return"";if(!e||e==="default")return t==null?void 0:t.toDateString();if(e==="MM/DD/YYYY")return`${(t.getMonth()+1).toString().padStart(2,"0")}/${t.getDate().toString().padStart(2,"0")}/${t.getFullYear()}`;if(e==="DD/MM/YYYY")return`${t.getDate().toString().padStart(2,"0")}/${(t.getMonth()+1).toString().padStart(2,"0")}/${t.getFullYear()}`;if(e==="YYYY-MM-DD")return`${t.getFullYear()}-${(t.getMonth()+1).toString().padStart(2,"0")}-${t.getDate().toString().padStart(2,"0")}`;const i={"MMM DD, YYYY":{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"},"DD MMM YYYY":{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}}[e];return i?t.toLocaleDateString("en-US",i):t==null?void 0:t.toDateString()}function Jw(t,e,n){let i,l,r,o,u,s,a,f,c,g=ue,h=()=>(g(),g=ft(O,q=>n(19,c=q)),O);t.$$.on_destroy.push(()=>g());const d=new le.createEventDispatcher,{processStringSync:_}=le.getContext("sdk");let{value:b}=e,{formattedValue:w}=e,{cellOptions:E}=e,{autofocus:k}=e,I,{cellState:O=Ft("View",{"*":{goTo(q){return q}},View:{focus(){if(!E.readonly)return"Editing"}},Editing:{_enter(){n(17,I=b),n(10,V=!0),d("enteredit")},_exit(){d("exitedit")},handleKeyboard(q){q.keyCode==32&&(q.stopPropagation(),q.preventDefault(),n(10,V=!V))},focusout(q){const j=N==null?void 0:N.contains(q.relatedTarget),K=M==null?void 0:M.contains(q.relatedTarget);if(!j&&!K)return n(10,V=!1),b!=I&&d("change",b),"View"},cancel(){return n(0,b=Array.isArray(I)?[...I]:I),"View"}}})}=e;h();let D,N,M,V;function W(){if(!b)return"00:00";const q=new Date(b);return`${q.getHours().toString().padStart(2,"0")}:${q.getMinutes().toString().padStart(2,"0")}`}le.onMount(()=>{k&&setTimeout(()=>{O.focus(),editor==null||editor.focus()},30)});const ne=q=>{if(!b||!l)return;const j=q.target.value,K=new Date(b),[x,X]=j.split(":").map(Number);K.setHours(x,X,0,0),n(0,b=K.toISOString()),d("change",b)},H=()=>n(10,V=!V);function $(q){Be[q?"unshift":"push"](()=>{D=q,n(7,D)})}function Y(q){o=q,n(6,o),n(0,b)}const G=q=>{n(0,b=q.detail),D==null||D.focus(),n(10,V=!1)};function oe(q){Be[q?"unshift":"push"](()=>{M=q,n(9,M)})}function ie(){r=this.value,n(14,r),n(4,l),n(0,b),n(2,E)}function J(q){Be[q?"unshift":"push"](()=>{N=q,n(8,N)})}return t.$$set=q=>{"value"in q&&n(0,b=q.value),"formattedValue"in q&&n(1,w=q.formattedValue),"cellOptions"in q&&n(2,E=q.cellOptions),"autofocus"in q&&n(16,k=q.autofocus),"cellState"in q&&h(n(3,O=q.cellState))},t.$$.update=()=>{t.$$.dirty&4&&n(18,i=E==null?void 0:E.dateFormat),t.$$.dirty&4&&n(4,l=E==null?void 0:E.showTime),t.$$.dirty&17&&n(14,r=l&&b?W():"00:00"),t.$$.dirty&1&&n(6,o=b?new Date(b):new Date),t.$$.dirty&262213&&n(1,w=E.template&&b?_(E.template,{value:b}):b?Zw(o,i):""),t.$$.dirty&4&&n(13,u=(E==null?void 0:E.placeholder)||""),t.$$.dirty&524288&&n(5,s=c=="Editing"),t.$$.dirty&4&&n(12,a=E.role=="inlineInpur"),t.$$.dirty&131105&&n(11,f=s&&I!=b)},[b,w,E,O,l,s,o,D,N,M,V,f,a,u,r,ne,k,I,i,c,H,$,Y,G,oe,ie,J]}class $o extends Ze{constructor(e){super(),Qe(this,e,Jw,Qw,Ye,{value:0,formattedValue:1,cellOptions:2,autofocus:16,cellState:3})}}function Vc(t,e,n){const i=t.slice();return i[42]=e[n],i[41]=n,i}function Bc(t,e,n){const i=t.slice();return i[39]=e[n],i[41]=n,i}function Uc(t,e,n){const i=t.slice();return i[42]=e[n],i[41]=n,i}function Hc(t){let e;function n(r,o){return r[0]?$w:xw}let i=n(t),l=i(t);return{c(){l.c(),e=Fe()},m(r,o){l.m(r,o),A(r,e,o)},p(r,o){i===(i=n(r))&&l?l.p(r,o):(l.d(1),l=i(r),l&&(l.c(),l.m(e.parentNode,e)))},d(r){r&&C(e),l.d(r)}}}function xw(t){let e,n,i,l=t[8],r,o,u=qc(t);return{c(){e=v("div"),n=v("div"),i=v("div"),u.c(),m(i,"class","options svelte-vbrqk3"),m(n,"class","list svelte-vbrqk3"),m(e,"class","listWrapper svelte-vbrqk3")},m(s,a){A(s,e,a),S(e,n),S(n,i),u.m(i,null),t[30](n),r||(o=[B(n,"scroll",t[14]),B(e,"mousedown",Et(fk))],r=!0)},p(s,a){a[0]&256&&Ye(l,l=s[8])?(u.d(1),u=qc(s),u.c(),u.m(i,null)):u.p(s,a)},d(s){s&&C(e),u.d(s),t[30](null),r=!1,Ve(o)}}}function $w(t){let e,n,i,l=t[8],r,o,u,s,a,f=Kc(t);function c(d,_){return d[8].length?sk:ok}let g=c(t),h=g(t);return{c(){e=v("div"),n=v("div"),i=v("div"),f.c(),r=Q(),o=v("div"),u=v("div"),h.c(),m(i,"class","options svelte-vbrqk3"),m(n,"class","list svelte-vbrqk3"),m(u,"class","options svelte-vbrqk3"),m(o,"class","list listSelected svelte-vbrqk3"),m(e,"class","listWrapper svelte-vbrqk3")},m(d,_){A(d,e,_),S(e,n),S(n,i),f.m(i,null),t[27](n),S(e,r),S(e,o),S(o,u),h.m(u,null),s||(a=[B(n,"scroll",t[14]),B(e,"mousedown",Et(ak))],s=!0)},p(d,_){_[0]&256&&Ye(l,l=d[8])?(f.d(1),f=Kc(d),f.c(),f.m(i,null)):f.p(d,_),g===(g=c(d))&&h?h.p(d,_):(h.d(1),h=g(d),h&&(h.c(),h.m(u,null)))},d(d){d&&C(e),f.d(d),t[27](null),h.d(),s=!1,Ve(a)}}}function ek(t){let e;return{c(){e=v("div"),e.textContent="No Results Found",m(e,"class","option svelte-vbrqk3")},m(n,i){A(n,e,i)},p:ue,d(n){n&&C(e)}}}function tk(t){let e;return{c(){e=v("div"),e.innerHTML=`<i class="ri-loader-2-line rotating"></i>
|
|
14
|
-
|
|
15
|
-
Loading more...`,m(e,"class","option loading svelte-vbrqk3")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function qc(t){let e;function n(r,o){var u,s,a,f,c;return(s=(u=r[3])==null?void 0:u.rows)!=null&&s.length||(a=r[3])!=null&&a.loading&&!((f=r[3])!=null&&f.loaded)?nk:(c=r[3])!=null&&c.loading?tk:ek}let i=n(t),l=i(t);return{c(){l.c(),e=Fe()},m(r,o){l.m(r,o),A(r,e,o)},p(r,o){i===(i=n(r))&&l?l.p(r,o):(l.d(1),l=i(r),l&&(l.c(),l.m(e.parentNode,e)))},d(r){r&&C(e),l.d(r)}}}function ik(t){let e;return{c(){e=v("div"),e.textContent="No Results Found",m(e,"class","option wide svelte-vbrqk3")},m(n,i){A(n,e,i)},p:ue,d(n){n&&C(e)}}}function lk(t){let e;return{c(){e=v("div"),e.innerHTML=`<i class="ri-loader-2-line rotating"></i>
|
|
16
|
-
|
|
17
|
-
Loading more...`,m(e,"class","option wide loading svelte-vbrqk3")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Kc(t){let e;function n(r,o){var u,s,a,f;return(s=(u=r[3])==null?void 0:u.rows)!=null&&s.length||(a=r[3])!=null&&a.loading&&!1?rk:(f=r[3])!=null&&f.loading?lk:ik}let i=n(t),l=i(t);return{c(){l.c(),e=Fe()},m(r,o){l.m(r,o),A(r,e,o)},p(r,o){i===(i=n(r))&&l?l.p(r,o):(l.d(1),l=i(r),l&&(l.c(),l.m(e.parentNode,e)))},d(r){r&&C(e),l.d(r)}}}function ok(t){let e;return{c(){e=v("span"),e.textContent="Nothing Selected",m(e,"class","svelte-vbrqk3")},m(n,i){A(n,e,i)},p:ue,d(n){n&&C(e)}}}function sk(t){let e=[],n=new Map,i,l=Ce(t[8]);const r=o=>o[41];for(let o=0;o<l.length;o+=1){let u=Bc(t,l,o),s=r(u);n.set(s,e[o]=Qc(s,u))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Fe()},m(o,u){for(let s=0;s<e.length;s+=1)e[s]&&e[s].m(o,u);A(o,i,u)},p(o,u){u[0]&5376&&(l=Ce(o[8]),e=Tt(e,u,r,1,o,l,n,i.parentNode,nn,Qc,i,Bc))},d(o){o&&C(i);for(let u=0;u<e.length;u+=1)e[u].d(o)}}}function Xc(t){let e,n=t[39].primaryDisplay+"",i,l,r,o,u,s,a,f;return{c(){e=v("div"),i=Ee(n),l=Q(),r=v("i"),o=Q(),m(r,"class","ri-close-line"),m(e,"class","option wide selected svelte-vbrqk3")},m(c,g){A(c,e,g),S(e,i),S(e,l),S(e,r),S(e,o),s=!0,a||(f=B(e,"mousedown",Qt(Et(function(){Ge(t[12](t[39]))&&t[12](t[39]).apply(this,arguments)}))),a=!0)},p(c,g){t=c,(!s||g[0]&256)&&n!==(n=t[39].primaryDisplay+"")&&Pe(i,n)},i(c){s||(c&&ni(()=>{s&&(u||(u=Il(e,zr,{x:-20,duration:130},!0)),u.run(1))}),s=!0)},o(c){c&&(u||(u=Il(e,zr,{x:-20,duration:130},!1)),u.run(0)),s=!1},d(c){c&&C(e),c&&u&&u.end(),a=!1,f()}}}function Qc(t,e){let n,i=e[10](e[39]),l,r=i&&Xc(e);return{key:t,first:null,c(){n=Fe(),r&&r.c(),l=Fe(),this.first=n},m(o,u){A(o,n,u),r&&r.m(o,u),A(o,l,u)},p(o,u){e=o,u[0]&256&&(i=e[10](e[39])),i?r?(r.p(e,u),u[0]&256&&U(r,1)):(r=Xc(e),r.c(),U(r,1),r.m(l.parentNode,l)):r&&(He(),Z(r,1,1,()=>{r=null}),ze())},d(o){o&&(C(n),C(l)),r&&r.d(o)}}}function uk(t){var g;let e,n,i,l,r,o,u,s,a,f,c=((g=t[3])==null?void 0:g.rows)&&Hc(t);return{c(){var h,d,_,b;e=v("div"),n=v("div"),i=v("i"),r=Q(),o=v("input"),s=Q(),c&&c.c(),m(i,"class",l=t[3].loading&&Xr?"ri-loader-2-line":(h=t[4])!=null&&h.value?"ri-filter-fill":"ri-search-line"),P(i,"color",t[5]?"var(--spectrum-global-color-blue-400)":"var(--spectrum-global-color-gray-700)"),m(o,"class","search"),m(o,"type","text"),m(o,"placeholder",u=(d=t[3])!=null&&d.loading&&!((b=(_=t[3])==null?void 0:_.rows)!=null&&b.length)&&Xr?"Loading...":"Search"),p(o,"placeholder",!t[5]),m(n,"class","searchControl svelte-vbrqk3"),m(e,"class","control svelte-vbrqk3")},m(h,d){A(h,e,d),S(e,n),S(n,i),S(n,r),S(n,o),t[23](o),S(e,s),c&&c.m(e,null),a||(f=[B(o,"input",t[13]),B(o,"keydown",t[15]),B(o,"blur",t[24])],a=!0)},p(h,d){var _,b,w,E,k;d[0]&24&&l!==(l=h[3].loading&&Xr?"ri-loader-2-line":(_=h[4])!=null&&_.value?"ri-filter-fill":"ri-search-line")&&m(i,"class",l),d[0]&32&&P(i,"color",h[5]?"var(--spectrum-global-color-blue-400)":"var(--spectrum-global-color-gray-700)"),d[0]&8&&u!==(u=(b=h[3])!=null&&b.loading&&!((E=(w=h[3])==null?void 0:w.rows)!=null&&E.length)&&Xr?"Loading...":"Search")&&m(o,"placeholder",u),d[0]&32&&p(o,"placeholder",!h[5]),(k=h[3])!=null&&k.rows?c?c.p(h,d):(c=Hc(h),c.c(),c.m(e,null)):c&&(c.d(1),c=null)},i:ue,o:ue,d(h){h&&C(e),t[23](null),c&&c.d(),a=!1,Ve(f)}}}let Xr=!0;const ak=()=>{},fk=()=>{};function ck(t,e,n){let i,l,r,o,u,s,a=ue,f=()=>(a(),a=ft(o,z=>n(3,s=z)),o);t.$$.on_destroy.push(()=>a());const{API:c,fetchData:g}=le.getContext("sdk"),h=le.createEventDispatcher();let{value:d=[]}=e,{fieldSchema:_}=e,{filter:b=[]}=e,{wide:w=!1}=e,{singleSelect:E}=e,k=_.tableId,I=[],O=-1,D,N,M=15,V;const W=z=>{if(d)return d.find(se=>se._id==z._id)},ne=z=>{var me;if(E)((me=r[0])==null?void 0:me._id)==z._id?n(8,r=[]):n(8,r=[{_id:z._id,primaryDisplay:z[u]}]);else{let se=r.findIndex(Oe=>Oe._id==z._id);se>-1?(r.splice(se,1),n(8,r),n(16,d)):(r.push({_id:z._id,primaryDisplay:z[u]}),n(8,r),n(16,d))}h("change",r)},H=z=>{r.splice(r.findIndex(me=>me._id===z._id),1),n(8,r),n(16,d),h("change",r)},$=z=>{n(5,N=z.target.value),z.target.value?I=[...b,{field:u,type:"string",operator:"fuzzy",value:z.target.value,valueType:"Value"}]:I=b??[],o==null||o.update({filter:I})},Y=()=>{s!=null&&s.loading||s.rows.length<M||(M+=100,o==null||o.update({limit:M}))},G=z=>{const me=z.target,se=me.scrollTop,Oe=me.scrollHeight,be=me.clientHeight;se+be>=Oe-50&&Y()},oe=z=>{z.key=="ArrowDown"?(z.preventDefault(),n(1,O+=1),O>s.rows.length-1&&n(1,O=0)):z.key=="ArrowUp"?(z.preventDefault(),n(1,O-=1),O<0&&n(1,O=s.rows.length-1)):z.key=="Enter"&&O>-1&&ne(s.rows[O]),(z.key=="Tab"||z.key=="Escape")&&h("close")},ie={focus:()=>{D==null||D.focus()},hasFocus:()=>document.activeElement===D};function J(z){Be[z?"unshift":"push"](()=>{D=z,n(4,D)})}const q=()=>h("close"),j=z=>n(1,O=z),K=()=>n(1,O=-1);function x(z){Be[z?"unshift":"push"](()=>{V=z,n(2,V)})}const X=z=>n(1,O=z),F=()=>n(1,O=-1);function R(z){Be[z?"unshift":"push"](()=>{V=z,n(2,V)})}return t.$$set=z=>{"value"in z&&n(16,d=z.value),"fieldSchema"in z&&n(17,_=z.fieldSchema),"filter"in z&&n(18,b=z.filter),"wide"in z&&n(0,w=z.wide),"singleSelect"in z&&n(19,E=z.singleSelect)},t.$$.update=()=>{var z,me,se,Oe;t.$$.dirty[0]&131072&&n(22,i=(z=_==null?void 0:_.type)==null?void 0:z.includes("bb_reference")),t.$$.dirty[0]&4325376&&i&&(me=_==null?void 0:_.type)!=null&&me.includes("_single"),t.$$.dirty[0]&4194304&&n(21,l=i?"user":"table"),t.$$.dirty[0]&65536&&n(8,r=Array.isArray(d)?d:[]),t.$$.dirty[0]&2359296&&f(n(6,o=g({API:c,datasource:{type:l,tableId:k},options:{filter:b,limit:15}}))),t.$$.dirty[0]&8&&n(7,u=((se=s==null?void 0:s.definition)==null?void 0:se.primaryDisplay)||"email"),t.$$.dirty[0]&10&&s!=null&&s.rows&&n(1,O=Math.min(O,s.rows.length-1)),t.$$.dirty[0]&12&&((Oe=s==null?void 0:s.rows)==null?void 0:Oe.length)>0},[w,O,V,s,D,N,o,u,r,h,W,ne,H,$,G,oe,d,_,b,E,ie,l,i,J,q,j,K,x,X,F,R]}class Zc extends Ze{constructor(e){super(),Qe(this,e,ck,uk,Ye,{value:16,fieldSchema:17,filter:18,wide:0,singleSelect:19,api:20},null,[-1,-1])}get api(){return this.$$.ctx[20]}}function Jc(t,e,n){const i=t.slice();return i[18]=e[n],i[20]=n,i}function xc(t){let e,n,i;return{c(){e=v("i"),m(e,"class",bt("ri-arrow-right-s-line")+" svelte-1xxn7uq"),p(e,"open",t[0]),P(e,"z-index",1),P(e,"font-size","16px")},m(l,r){A(l,e,r),n||(i=B(e,"mousedown",Ii(Qt(Et(t[8])))),n=!0)},p(l,r){r&1&&p(e,"open",l[0])},d(l){l&&C(e),n=!1,i()}}}function $c(t){let e;return{c(){e=v("i"),m(e,"class",bt("ri-checkbox-circle-fill")+" svelte-1xxn7uq"),P(e,"color","var(--spectrum-global-color-green-500)"),P(e,"font-size","16px")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function ed(t){let e,n,i=Ce(t[1].children),l=[];for(let o=0;o<i.length;o+=1)l[o]=td(Jc(t,i,o));const r=o=>Z(l[o],1,1,()=>{l[o]=null});return{c(){e=v("ul");for(let o=0;o<l.length;o+=1)l[o].c();m(e,"class","spectrum-TreeView")},m(o,u){A(o,e,u);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null);n=!0},p(o,u){if(u&30){i=Ce(o[1].children);let s;for(s=0;s<i.length;s+=1){const a=Jc(o,i,s);l[s]?(l[s].p(a,u),U(l[s],1)):(l[s]=td(a),l[s].c(),U(l[s],1),l[s].m(e,null))}for(He(),s=i.length;s<l.length;s+=1)r(s);ze()}},i(o){if(!n){for(let u=0;u<i.length;u+=1)U(l[u]);n=!0}},o(o){l=l.filter(Boolean);for(let u=0;u<l.length;u+=1)Z(l[u]);n=!1},d(o){o&&C(e),St(l,o)}}}function td(t){let e,n;return e=new es({props:{tree:t[18],nodeSelection:t[2],selectedNodes:t[3],selectedGroups:t[4],open:t[18].open}}),e.$on("nodeSelect",t[14]),e.$on("nodeClick",t[15]),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l&2&&(r.tree=i[18]),l&4&&(r.nodeSelection=i[2]),l&8&&(r.selectedNodes=i[3]),l&16&&(r.selectedGroups=i[4]),l&2&&(r.open=i[18].open),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function dk(t){var b,w;let e,n,i,l,r,o=(t[1].label||"Not Set")+"",u,s,a,f,c,g,h=((b=t[1].children)==null?void 0:b.length)&&xc(t),d=t[7]&&$c(),_=((w=t[1].children)==null?void 0:w.length)&&ed(t);return{c(){var E,k;e=v("li"),n=v("div"),h&&h.c(),i=Q(),l=v("div"),r=v("span"),u=Ee(o),s=Q(),d&&d.c(),a=Q(),_&&_.c(),m(r,"class","spectrum-TreeView-itemLabel"),m(r,"title",t[6]),P(r,"padding-left","0.25rem"),P(l,"z-index",2),P(l,"width","100%"),m(n,"class","spectrum-TreeView-itemLink svelte-1xxn7uq"),P(n,"padding-left",(k=(E=t[1])==null?void 0:E.children)!=null&&k.length?"0.25rem":"1.5rem"),P(n,"padding-right","0.5rem"),m(e,"class","spectrum-TreeView-item svelte-1xxn7uq"),p(e,"is-disabled",t[1].disabled),p(e,"is-open",t[0])},m(E,k){A(E,e,k),S(e,n),h&&h.m(n,null),S(n,i),S(n,l),S(l,r),S(r,u),t[13](r),S(n,s),d&&d.m(n,null),S(e,a),_&&_.m(e,null),f=!0,c||(g=B(l,"mousedown",Qt(Et(t[9]))),c=!0)},p(E,[k]){var I,O,D,N;(I=E[1].children)!=null&&I.length?h?h.p(E,k):(h=xc(E),h.c(),h.m(n,i)):h&&(h.d(1),h=null),(!f||k&2)&&o!==(o=(E[1].label||"Not Set")+"")&&Pe(u,o),(!f||k&64)&&m(r,"title",E[6]),E[7]?d||(d=$c(),d.c(),d.m(n,null)):d&&(d.d(1),d=null),k&2&&P(n,"padding-left",(D=(O=E[1])==null?void 0:O.children)!=null&&D.length?"0.25rem":"1.5rem"),(N=E[1].children)!=null&&N.length?_?(_.p(E,k),k&2&&U(_,1)):(_=ed(E),_.c(),U(_,1),_.m(e,null)):_&&(He(),Z(_,1,1,()=>{_=null}),ze()),(!f||k&2)&&p(e,"is-disabled",E[1].disabled),(!f||k&1)&&p(e,"is-open",E[0])},i(E){f||(U(_),f=!0)},o(E){Z(_),f=!1},d(E){E&&C(e),h&&h.d(),t[13](null),d&&d.d(),_&&_.d(),c=!1,g()}}}function hk(t,e,n){let i,l,r,o,u=ue,s=()=>(u(),u=ft(b,M=>n(11,o=M)),b),a,f=ue,c=()=>(f(),f=ft(w,M=>n(12,a=M)),w);t.$$.on_destroy.push(()=>u()),t.$$.on_destroy.push(()=>f());const g=le.createEventDispatcher();let{tree:h}=e,{open:d=!1}=e,{nodeSelection:_}=e,{selectedNodes:b}=e;s();let{selectedGroups:w}=e;c();let E;const k=M=>{h.disabled||(n(0,d=!d),g("nodeClick",{id:h.id,label:h.label}))},I=M=>{h.selectable&&!h.disabled&&g("nodeSelect",{id:h.id,label:h.label,row:h.row,group:h.group})};function O(M){Be[M?"unshift":"push"](()=>{E=M,n(5,E)})}function D(M){ti.call(this,t,M)}function N(M){ti.call(this,t,M)}return t.$$set=M=>{"tree"in M&&n(1,h=M.tree),"open"in M&&n(0,d=M.open),"nodeSelection"in M&&n(2,_=M.nodeSelection),"selectedNodes"in M&&s(n(3,b=M.selectedNodes)),"selectedGroups"in M&&c(n(4,w=M.selectedGroups))},t.$$.update=()=>{t.$$.dirty&2&&h.disabled&&n(0,d=!1),t.$$.dirty&6146&&n(7,i=h.isGroup?a.includes(h.id):!!o.find(M=>M.id==h.id)),t.$$.dirty&32&&n(10,l=E&&E.scrollWidth>E.clientWidth),t.$$.dirty&1026&&n(6,r=l?h.label||"Not Set":null)},[d,h,_,b,w,E,r,i,k,I,l,o,a,O,D,N]}class es extends Ze{constructor(e){super(),Qe(this,e,hk,dk,Ye,{tree:1,open:0,nodeSelection:2,selectedNodes:3,selectedGroups:4})}}function nd(t,e,n){const i=t.slice();return i[33]=e[n],i[35]=n,i}function id(t){let e,n,i;return n=new kn({props:{autofocus:!0,cellOptions:t[9]}}),n.$on("change",t[8]),n.$on("exitedit",t[20]),{c(){e=v("div"),We(n.$$.fragment),m(e,"class","search svelte-170oceh")},m(l,r){A(l,e,r),je(n,e,null),i=!0},p:ue,i(l){i||(U(n.$$.fragment,l),i=!0)},o(l){Z(n.$$.fragment,l),i=!1},d(l){l&&C(e),qe(n)}}}function gk(t){let e;return{c(){e=v("li"),e.innerHTML='<div class="spectrum-TreeView-itemLink">No Matches</div>',m(e,"class","spectrum-TreeView-item"),p(e,"is-open",!0)},m(n,i){A(n,e,i)},p:ue,i:ue,o:ue,d(n){n&&C(e)}}}function mk(t){let e;return{c(){e=v("li"),e.innerHTML='<div class="spectrum-TreeView-itemLink">Loading</div>',m(e,"class","spectrum-TreeView-item"),p(e,"is-open",!0)},m(n,i){A(n,e,i)},p:ue,i:ue,o:ue,d(n){n&&C(e)}}}function _k(t){var u;let e=[],n=new Map,i,l,r=Ce((u=t[3])==null?void 0:u.children);const o=s=>s[35];for(let s=0;s<r.length;s+=1){let a=nd(t,r,s),f=o(a);n.set(f,e[s]=ld(f,a))}return{c(){for(let s=0;s<e.length;s+=1)e[s].c();i=Fe()},m(s,a){for(let f=0;f<e.length;f+=1)e[f]&&e[f].m(s,a);A(s,i,a),l=!0},p(s,a){var f;a[0]&200&&(r=Ce((f=s[3])==null?void 0:f.children),He(),e=Tt(e,a,o,1,s,r,n,i.parentNode,Di,ld,i,nd),ze())},i(s){if(!l){for(let a=0;a<r.length;a+=1)U(e[a]);l=!0}},o(s){for(let a=0;a<e.length;a+=1)Z(e[a]);l=!1},d(s){s&&C(i);for(let a=0;a<e.length;a+=1)e[a].d(s)}}}function ld(t,e){let n,i,l;return i=new es({props:{tree:e[33],nodeSelection:!0,selectedNodes:e[6]}}),i.$on("nodeSelect",e[7]),{key:t,first:null,c(){n=Fe(),We(i.$$.fragment),this.first=n},m(r,o){A(r,n,o),je(i,r,o),l=!0},p(r,o){e=r;const u={};o[0]&8&&(u.tree=e[33]),i.$set(u)},i(r){l||(U(i.$$.fragment,r),l=!0)},o(r){Z(i.$$.fragment,r),l=!1},d(r){r&&C(n),qe(i,r)}}}function pk(t){let e,n,i,l,r,o,u=t[1]&&id(t);const s=[_k,mk,gk],a=[];function f(c,g){var h;return c[2].loaded&&((h=c[2].rows)!=null&&h.length)?0:c[2].loading?1:2}return l=f(t),r=a[l]=s[l](t),{c(){e=v("div"),u&&u.c(),n=Q(),i=v("ul"),r.c(),m(i,"class","spectrum-TreeView"),P(i,"margin","unset"),p(i,"spectrum-TreeView--quiet",t[0]),m(e,"class","control svelte-170oceh")},m(c,g){A(c,e,g),u&&u.m(e,null),S(e,n),S(e,i),a[l].m(i,null),o=!0},p(c,g){c[1]?u?(u.p(c,g),g[0]&2&&U(u,1)):(u=id(c),u.c(),U(u,1),u.m(e,n)):u&&(He(),Z(u,1,1,()=>{u=null}),ze());let h=l;l=f(c),l===h?a[l].p(c,g):(He(),Z(a[h],1,1,()=>{a[h]=null}),ze(),r=a[l],r?r.p(c,g):(r=a[l]=s[l](c),r.c()),U(r,1),r.m(i,null)),(!o||g[0]&1)&&p(i,"spectrum-TreeView--quiet",c[0])},i(c){o||(U(u),U(r),o=!0)},o(c){Z(u),Z(r),o=!1},d(c){c&&C(e),u&&u.d(),a[l].d()}}}let rd=10;function bk(t,e,n){let i,l,r,o,u,s=ue,a=()=>(s(),s=ft(i,K=>n(2,u=K)),i);t.$$.on_destroy.push(()=>s());const{API:f,fetchData:c,notificationStore:g}=le.getContext("sdk"),h=le.createEventDispatcher();let{value:d=[]}=e,{ownId:_}=e,{fieldSchema:b}=e,{joinColumn:w}=e,{sortColumn:E}=e,{sortOrder:k}=e,{filter:I=[]}=e,{limit:O=250}=e,{multi:D=!1}=e,{quiet:N}=e,{search:M}=e,V=new ii([]);Me(t,V,K=>n(25,o=K));let W=w||b.name,ne=[],H={root:!0,id:"root",label:"Super Tree",children:[]};const $=(K,x)=>{let X=[];return K==null||K.forEach(F=>{F[W]==x[r]&&X.push({id:F[r],disabled:F[r]==_,disableChildren:!0,label:F[u.definition.primaryDisplay],children:$(K,F)})}),X},Y=K=>{n(3,H.children=[],H),K!=null&&K.length&&(K==null||K.forEach(x=>{x[W]||H.children.push({id:x[r],disabled:x[r]==_,disableChildren:!0,label:x[u.definition.primaryDisplay],children:$(K,x)})}),n(3,H))},G=K=>{var x;if(K.detail.id!=_){if(D){let X=o.findIndex(F=>F.id==K.detail.id);X>-1?(o.splice(X,1),V.set(o)):o.length<rd?Re(V,o=[...o,K.detail],o):g.actions.warning("Cannot select more than "+rd+" items")}else Re(V,o=((x=o[0])==null?void 0:x.id)!==K.detail.id?[{id:K.detail.id,label:K.detail.label}]:[],o);J.debounce&&h("change",o.map(X=>({_id:X.id,primaryDisplay:X.label})))}},oe=()=>{d&&d.length&&(Re(V,o=[],o),Re(V,o=d.map(K=>({id:K._id,label:K.primaryDisplay})),o))},ie=K=>{K.detail&&K.detail!=""?ne=[...I,{field:l,type:"string",operator:"fuzzy",value:K.detail,valueType:"Value"}]:ne=I??[],i==null||i.update({filter:ne})};let J={icon:"ri-search-line",initialState:"Editing",role:"inlineInput",debounce:50};const q={},j=()=>h("focusout",{});return t.$$set=K=>{"value"in K&&n(10,d=K.value),"ownId"in K&&n(11,_=K.ownId),"fieldSchema"in K&&n(12,b=K.fieldSchema),"joinColumn"in K&&n(13,w=K.joinColumn),"sortColumn"in K&&n(14,E=K.sortColumn),"sortOrder"in K&&n(15,k=K.sortOrder),"filter"in K&&n(16,I=K.filter),"limit"in K&&n(17,O=K.limit),"multi"in K&&n(18,D=K.multi),"quiet"in K&&n(0,N=K.quiet),"search"in K&&n(1,M=K.search)},t.$$.update=()=>{var K,x,X;t.$$.dirty[0]&249856&&a(n(4,i=c({API:f,datasource:{type:"table",tableId:b.tableId},options:{sortOrder:k,sortColumn:E,filter:I,limit:O}}))),t.$$.dirty[0]&4&&(l=(K=u==null?void 0:u.definition)==null?void 0:K.primaryDisplay),t.$$.dirty[0]&4&&(r=((X=(x=u==null?void 0:u.definition)==null?void 0:x.primary)==null?void 0:X[0])??"_id"),t.$$.dirty[0]&4&&Y(u.rows),t.$$.dirty[0]&1024&&oe()},[N,M,u,H,i,h,V,G,ie,J,d,_,b,w,E,k,I,O,D,q,j]}class Qr extends Ze{constructor(e){super(),Qe(this,e,bk,pk,Ye,{value:10,ownId:11,fieldSchema:12,joinColumn:13,sortColumn:14,sortOrder:15,filter:16,limit:17,multi:18,quiet:0,search:1,api:19},null,[-1,-1])}get api(){return this.$$.ctx[19]}}function od(t,e,n){const i=t.slice();return i[41]=e[n],i[43]=n,i}function sd(t){let e,n;return{c(){e=v("i"),m(e,"class",n=t[2].icon+" field-icon")},m(i,l){A(i,e,l)},p(i,l){l[0]&4&&n!==(n=i[2].icon+" field-icon")&&m(e,"class",n)},d(i){i&&C(e)}}}function wk(t){let e,n,i=t[6].map(hd).join(", ")+"",l,r=t[2].role=="formInput"&&t[6].length>1&&ud(t);return{c(){e=v("span"),r&&r.c(),n=Q(),l=Ee(i)},m(o,u){A(o,e,u),r&&r.m(e,null),S(e,n),S(e,l)},p(o,u){o[2].role=="formInput"&&o[6].length>1?r?r.p(o,u):(r=ud(o),r.c(),r.m(e,n)):r&&(r.d(1),r=null),u[0]&64&&i!==(i=o[6].map(hd).join(", ")+"")&&Pe(l,i)},d(o){o&&C(e),r&&r.d()}}}function kk(t){let e,n,i=Ce(t[6]),l=[];for(let o=0;o<i.length;o+=1)l[o]=ad(od(t,i,o));let r=t[6].length>5&&fd(t);return{c(){e=v("div");for(let o=0;o<l.length;o+=1)l[o].c();n=Q(),r&&r.c(),m(e,"class","items"),p(e,"pills",t[20]),p(e,"links",t[18]),p(e,"isUser",t[7]),p(e,"withCount",t[6].length>5),p(e,"inEdit",t[8])},m(o,u){A(o,e,u);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null);S(e,n),r&&r.m(e,null)},p(o,u){if(u[0]&4980800){i=Ce(o[6]);let s;for(s=0;s<i.length;s+=1){const a=od(o,i,s);l[s]?l[s].p(a,u):(l[s]=ad(a),l[s].c(),l[s].m(e,n))}for(;s<l.length;s+=1)l[s].d(1);l.length=i.length}o[6].length>5?r?r.p(o,u):(r=fd(o),r.c(),r.m(e,null)):r&&(r.d(1),r=null),u[0]&1048576&&p(e,"pills",o[20]),u[0]&262144&&p(e,"links",o[18]),u[0]&128&&p(e,"isUser",o[7]),u[0]&64&&p(e,"withCount",o[6].length>5),u[0]&256&&p(e,"inEdit",o[8])},d(o){o&&C(e),St(l,o),r&&r.d()}}}function yk(t){let e,n;return{c(){e=v("span"),n=Ee(t[14])},m(i,l){A(i,e,l),S(e,n)},p(i,l){l[0]&16384&&Pe(n,i[14])},d(i){i&&C(e)}}}function ud(t){let e,n=t[6].length+"",i,l;return{c(){e=Ee("("),i=Ee(n),l=Ee(")")},m(r,o){A(r,e,o),A(r,i,o),A(r,l,o)},p(r,o){o[0]&64&&n!==(n=r[6].length+"")&&Pe(i,n)},d(r){r&&(C(e),C(i),C(l))}}}function Ek(t){let e,n,i,l,r=t[41].primaryDisplay+"",o,u,s;function a(){return t[33](t[41])}return{c(){e=v("div"),n=v("i"),i=Q(),l=v("span"),o=Ee(r),m(n,"class",t[19]),m(e,"class","item")},m(f,c){A(f,e,c),S(e,n),S(e,i),S(e,l),S(l,o),u||(s=B(e,"click",function(){Ge(t[18]?a:null)&&(t[18]?a:null).apply(this,arguments)}),u=!0)},p(f,c){t=f,c[0]&524288&&m(n,"class",t[19]),c[0]&64&&r!==(r=t[41].primaryDisplay+"")&&Pe(o,r)},d(f){f&&C(e),u=!1,s()}}}function ad(t){let e,n=t[43]<5&&Ek(t);return{c(){n&&n.c(),e=Fe()},m(i,l){n&&n.m(i,l),A(i,e,l)},p(i,l){i[43]<5&&n.p(i,l)},d(i){i&&C(e),n&&n.d(i)}}}function fd(t){let e,n,i=t[6].length-5+"",l,r;return{c(){e=v("span"),n=Ee("(+ "),l=Ee(i),r=Ee(")"),m(e,"class","count")},m(o,u){A(o,e,u),S(e,n),S(e,l),S(e,r)},p(o,u){u[0]&64&&i!==(i=o[6].length-5+"")&&Pe(l,i)},d(o){o&&C(e)}}}function cd(t){let e;return{c(){e=v("i"),m(e,"class","ph ph-caret-down control-icon")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function dd(t){let e,n,i;function l(o){t[37](o)}let r={anchor:t[9],useAnchorWidth:!0,open:t[21]=="Open",$$slots:{default:[Ck]},$$scope:{ctx:t}};return t[10]!==void 0&&(r.popup=t[10]),e=new wn({props:r}),Be.push(()=>Gt(e,"popup",l)),{c(){We(e.$$.fragment)},m(o,u){je(e,o,u),i=!0},p(o,u){const s={};u[0]&512&&(s.anchor=o[9]),u[0]&2097152&&(s.open=o[21]=="Open"),u[0]&6271|u[1]&8192&&(s.$$scope={dirty:u,ctx:o}),!n&&u[0]&1024&&(n=!0,s.popup=o[10],Wt(()=>n=!1)),e.$set(s)},i(o){i||(U(e.$$.fragment,o),i=!0)},o(o){Z(e.$$.fragment,o),i=!1},d(o){qe(e,o)}}}function vk(t){let e,n,i;function l(o){t[35](o)}let r={fieldSchema:t[1],filter:t[3]??[],singleSelect:t[12],value:t[6],search:t[23],wide:t[2].wide&&!t[12]};return t[11]!==void 0&&(r.api=t[11]),e=new Zc({props:r}),Be.push(()=>Gt(e,"api",l)),e.$on("change",t[26]),e.$on("close",t[36]),{c(){We(e.$$.fragment)},m(o,u){je(e,o,u),i=!0},p(o,u){const s={};u[0]&2&&(s.fieldSchema=o[1]),u[0]&8&&(s.filter=o[3]??[]),u[0]&4096&&(s.singleSelect=o[12]),u[0]&64&&(s.value=o[6]),u[0]&4100&&(s.wide=o[2].wide&&!o[12]),!n&&u[0]&2048&&(n=!0,s.api=o[11],Wt(()=>n=!1)),e.$set(s)},i(o){i||(U(e.$$.fragment,o),i=!0)},o(o){Z(e.$$.fragment,o),i=!1},d(o){qe(e,o)}}}function Sk(t){let e,n;return e=new Qr({props:{fieldSchema:t[1],filter:t[3]??[],search:t[23],limit:t[4],joinColumn:t[2].joinColumn,value:t[6],ownId:t[0],multi:t[1].relationshipType=="many-to-many"||t[1].relationshipType=="many-to-one"}}),e.$on("change",t[26]),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&2&&(r.fieldSchema=i[1]),l[0]&8&&(r.filter=i[3]??[]),l[0]&16&&(r.limit=i[4]),l[0]&4&&(r.joinColumn=i[2].joinColumn),l[0]&64&&(r.value=i[6]),l[0]&1&&(r.ownId=i[0]),l[0]&2&&(r.multi=i[1].relationshipType=="many-to-many"||i[1].relationshipType=="many-to-one"),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Ck(t){let e,n,i,l;const r=[Sk,vk],o=[];function u(s,a){return s[1].recursiveTable?0:1}return e=u(t),n=o[e]=r[e](t),{c(){n.c(),i=Fe()},m(s,a){o[e].m(s,a),A(s,i,a),l=!0},p(s,a){let f=e;e=u(s),e===f?o[e].p(s,a):(He(),Z(o[f],1,1,()=>{o[f]=null}),ze(),n=o[e],n?n.p(s,a):(n=o[e]=r[e](s),n.c()),U(n,1),n.m(i.parentNode,i))},i(s){l||(U(n),l=!0)},o(s){Z(n),l=!1},d(s){s&&C(i),o[e].d(s)}}}function Ak(t){var w;let e,n,i,l,r,o,u,s,a,f,c=((w=t[2])==null?void 0:w.icon)&&sd(t);function g(E,k){var I;return((I=E[6])==null?void 0:I.length)<1?yk:E[20]||E[18]?kk:wk}let h=g(t),d=h(t),_=!t[13]&&(t[2].role=="formInput"||t[8])&&cd(),b=t[8]&&dd(t);return{c(){var E,k;e=v("div"),c&&c.c(),n=Q(),i=v("div"),d.c(),l=Q(),_&&_.c(),o=Q(),b&&b.c(),u=Fe(),m(i,"class","value"),p(i,"placeholder",((E=t[6])==null?void 0:E.length)<1),m(e,"class","superCell"),m(e,"tabindex",r=(k=t[2])!=null&&k.disabled?-1:0),p(e,"isDirty",t[17]&&t[2].showDirty),p(e,"inEdit",t[8]),p(e,"inline",t[16]),p(e,"multirow",t[15]),p(e,"tableCell",t[2].role=="tableCell"),p(e,"formInput",t[2].role=="formInput"),p(e,"disabled",t[2].disabled),p(e,"readonly",t[13]),p(e,"error",t[2].error),P(e,"color",t[2].color),P(e,"background",t[2].background),P(e,"font-weight",t[2].fontWeight)},m(E,k){A(E,e,k),c&&c.m(e,null),S(e,n),S(e,i),d.m(i,null),S(e,l),_&&_.m(e,null),t[34](e),A(E,o,k),b&&b.m(E,k),A(E,u,k),s=!0,a||(f=[B(e,"mousedown",t[24].toggle),B(e,"focusin",function(){Ge(t[5].focus)&&t[5].focus.apply(this,arguments)}),B(e,"keydown",Ii(t[25])),B(e,"focusout",function(){Ge(t[5].focusout)&&t[5].focusout.apply(this,arguments)})],a=!0)},p(E,k){var I,O,D;t=E,(I=t[2])!=null&&I.icon?c?c.p(t,k):(c=sd(t),c.c(),c.m(e,n)):c&&(c.d(1),c=null),h===(h=g(t))&&d?d.p(t,k):(d.d(1),d=h(t),d&&(d.c(),d.m(i,null))),(!s||k[0]&64)&&p(i,"placeholder",((O=t[6])==null?void 0:O.length)<1),!t[13]&&(t[2].role=="formInput"||t[8])?_||(_=cd(),_.c(),_.m(e,null)):_&&(_.d(1),_=null),(!s||k[0]&4&&r!==(r=(D=t[2])!=null&&D.disabled?-1:0))&&m(e,"tabindex",r),(!s||k[0]&131076)&&p(e,"isDirty",t[17]&&t[2].showDirty),(!s||k[0]&256)&&p(e,"inEdit",t[8]),(!s||k[0]&65536)&&p(e,"inline",t[16]),(!s||k[0]&32768)&&p(e,"multirow",t[15]),(!s||k[0]&4)&&p(e,"tableCell",t[2].role=="tableCell"),(!s||k[0]&4)&&p(e,"formInput",t[2].role=="formInput"),(!s||k[0]&4)&&p(e,"disabled",t[2].disabled),(!s||k[0]&8192)&&p(e,"readonly",t[13]),(!s||k[0]&4)&&p(e,"error",t[2].error),k[0]&4&&P(e,"color",t[2].color),k[0]&4&&P(e,"background",t[2].background),k[0]&4&&P(e,"font-weight",t[2].fontWeight),t[8]?b?(b.p(t,k),k[0]&256&&U(b,1)):(b=dd(t),b.c(),U(b,1),b.m(u.parentNode,u)):b&&(He(),Z(b,1,1,()=>{b=null}),ze())},i(E){s||(U(b),s=!0)},o(E){Z(b),s=!1},d(E){E&&(C(e),C(o),C(u)),c&&c.d(),d.d(),_&&_.d(),t[34](null),b&&b.d(E),a=!1,Ve(f)}}}const hd=t=>t.primaryDisplay;function Tk(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E,k=ue,I=()=>(k(),k=ft(j,be=>n(32,E=be)),j);t.$$.on_destroy.push(()=>k());const O=le.createEventDispatcher(),{API:D}=le.getContext("sdk");let{value:N}=e,{fieldSchema:M}=e,{cellOptions:V}=e,{simpleView:W=!0}=e,{filter:ne=[]}=e,{limit:H=100}=e,{ownId:$}=e,{isUserSelect:Y}=e,G=JSON.stringify(N),oe,ie,J,q,{cellState:j=Ft(V.initialState??"View",{"*":{goTo(be){return be},reset(be){n(6,s=void 0)}},View:{_enter(){},focus(){if(!V.readonly&&!V.disabled)return"Editing"}},Hovered:{cancel:()=>"View"},Focused:{unfocus(){return"View"}},Error:{check:"View"},Editing:{_enter(){n(30,G=JSON.stringify(s)),K.open(),O("enteredit")},_exit(){K.close(),O("exitedit")},focusout(be){ie!=null&&ie.contains(be==null?void 0:be.relatedTarget)||this.submit()},clear(){n(6,s=[])},submit(){return f&&O("change",d&&s?s[0]:s),"View"},cancel(){return"View"}}})}=e;I();const K=Ft("Closed",{Open:{close(){return"Closed"},toggle(){return"Closed"}},Closed:{open(){return"Open"},toggle(){return"Open"}}});Me(t,K,be=>n(21,w=be));const x=be=>{be.key=="Escape"&&w=="Open"?K.close():be.key=="Escape"?j.cancel():be.keyCode==32&&E=="Editing"?K.toggle():be.key=="Tab"&&w=="Open"?j.focusout():w=="Open"&&(q==null||q.focus())},X=be=>{n(6,s=be.detail),h&&K.close()},F=be=>M.relationshipType=="self"&&be&&!Array.isArray(be)?(D.fetchRow(M.tableId,be,!0).then(Ie=>{n(6,s=[{_id:Ie.id,primaryDisplay:M.primaryDisplay?Ie[M.primaryDisplay]:Ie.name||Ie.id}])}).catch(Ie=>{n(6,s=[])}),s||[]):i?N?[...N]:[]:N?[N]:[],R=be=>{O("linkClick",be)};function z(be){Be[be?"unshift":"push"](()=>{oe=be,n(9,oe)})}function me(be){q=be,n(11,q)}const se=()=>{j.focusout()};function Oe(be){ie=be,n(10,ie)}return t.$$set=be=>{"value"in be&&n(28,N=be.value),"fieldSchema"in be&&n(1,M=be.fieldSchema),"cellOptions"in be&&n(2,V=be.cellOptions),"simpleView"in be&&n(27,W=be.simpleView),"filter"in be&&n(3,ne=be.filter),"limit"in be&&n(4,H=be.limit),"ownId"in be&&n(0,$=be.ownId),"isUserSelect"in be&&n(29,Y=be.isUserSelect),"cellState"in be&&I(n(5,j=be.cellState))},t.$$.update=()=>{var be,Ie;t.$$.dirty[0]&2&&n(31,i=!((be=M==null?void 0:M.type)!=null&&be.includes("_single"))),t.$$.dirty[0]&536870914&&n(7,l=((Ie=M==null?void 0:M.type)==null?void 0:Ie.includes("bb_reference"))||Y),t.$$.dirty[0]&4&&n(20,r=V.relViewMode=="pills"),t.$$.dirty[0]&2&&n(19,o=M.type=="link"?"ri-edit-box-line":"ri-user-line"),t.$$.dirty[0]&132&&n(18,u=V.relViewMode=="links"&&!l),t.$$.dirty[0]&5&&n(0,$=$||(V==null?void 0:V.ownId)),t.$$.dirty[0]&268435456&&n(6,s=F(N)),t.$$.dirty[1]&2&&n(8,a=E=="Editing"),t.$$.dirty[0]&1073742144&&n(17,f=a&&G!=JSON.stringify(s)),t.$$.dirty[0]&4&&n(27,W=V.relViewMode=="text"),t.$$.dirty[0]&4&&n(16,c=V.role=="inlineInput"),t.$$.dirty[0]&324&&n(15,g=V.controlType=="expanded"&&((s==null?void 0:s.length)>1||a)),t.$$.dirty[0]&2|t.$$.dirty[1]&1&&n(12,h=(M==null?void 0:M.relationshipType)=="one-to-many"||(M==null?void 0:M.relationshipType)=="self"||!i),t.$$.dirty[0]&128|t.$$.dirty[1]&1&&(d=l&&!i),t.$$.dirty[0]&4&&n(14,_=V.placeholder||""),t.$$.dirty[0]&4&&n(13,b=V.readonly||V.disabled)},[$,M,V,ne,H,j,s,l,a,oe,ie,q,h,b,_,g,c,f,u,o,r,w,O,J,K,x,X,W,N,Y,G,i,E,R,z,me,se,Oe]}class Zr extends Ze{constructor(e){super(),Qe(this,e,Tk,Ak,Ye,{value:28,fieldSchema:1,cellOptions:2,simpleView:27,filter:3,limit:4,ownId:0,isUserSelect:29,cellState:5},null,[-1,-1])}}function gd(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[2].icon+" icon")+" svelte-riwj21")},m(i,l){A(i,e,l)},p(i,l){l&4&&n!==(n=bt(i[2].icon+" icon")+" svelte-riwj21")&&m(e,"class",n)},d(i){i&&C(e)}}}function Ik(t){let e,n,i,l,r,o;return{c(){e=v("div"),n=v("span"),i=Ee(t[9]),m(n,"class","svelte-riwj21"),m(e,"class","value svelte-riwj21"),m(e,"tabindex",l=t[2].readonly||t[2].disabled?"-1":"0"),p(e,"multiline",t[2].multiline),p(e,"with-icon",t[2].icon),p(e,"placeholder",!t[0]),P(e,"justify-content",t[2].align)},m(u,s){A(u,e,s),S(e,n),S(n,i),r||(o=B(e,"focusin",function(){Ge(t[3].focus)&&t[3].focus.apply(this,arguments)}),r=!0)},p(u,s){t=u,s&512&&Pe(i,t[9]),s&4&&l!==(l=t[2].readonly||t[2].disabled?"-1":"0")&&m(e,"tabindex",l),s&4&&p(e,"multiline",t[2].multiline),s&4&&p(e,"with-icon",t[2].icon),s&1&&p(e,"placeholder",!t[0]),s&4&&P(e,"justify-content",t[2].align)},d(u){u&&C(e),r=!1,o()}}}function Dk(t){var u;let e,n;function i(s,a){return s[2].multiline?Rk:Ok}let l=i(t),r=l(t),o=t[4]&&((u=t[2])==null?void 0:u.clearIcon)!==!1&&md(t);return{c(){r.c(),e=Q(),o&&o.c(),n=Fe()},m(s,a){r.m(s,a),A(s,e,a),o&&o.m(s,a),A(s,n,a)},p(s,a){var f;l===(l=i(s))&&r?r.p(s,a):(r.d(1),r=l(s),r&&(r.c(),r.m(e.parentNode,e))),s[4]&&((f=s[2])==null?void 0:f.clearIcon)!==!1?o?o.p(s,a):(o=md(s),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},d(s){s&&(C(e),C(n)),r.d(s),o&&o.d(s)}}}function Ok(t){let e,n,i,l,r;return{c(){var o;e=v("input"),m(e,"tabindex","0"),m(e,"class","editor svelte-riwj21"),e.value=n=t[4]??"",m(e,"placeholder",i=((o=t[2])==null?void 0:o.placeholder)??""),p(e,"with-icon",t[2].icon),p(e,"placeholder",!t[0]&&!t[1]&&!t[4]),P(e,"text-align",t[2].align=="center"?"center":t[2].align=="flex-end"?"right":"left"),P(e,"padding-right",t[2].align!="flex-start"?"2rem":"0.75rem")},m(o,u){A(o,e,u),t[19](e),l||(r=[B(e,"input",t[10]),B(e,"focusout",function(){Ge(t[3].focusout)&&t[3].focusout.apply(this,arguments)}),B(e,"keydown",function(){Ge(t[3].handleKeyboard)&&t[3].handleKeyboard.apply(this,arguments)}),tn(t[11].call(null,e))],l=!0)},p(o,u){var s;t=o,u&16&&n!==(n=t[4]??"")&&e.value!==n&&(e.value=n),u&4&&i!==(i=((s=t[2])==null?void 0:s.placeholder)??"")&&m(e,"placeholder",i),u&4&&p(e,"with-icon",t[2].icon),u&19&&p(e,"placeholder",!t[0]&&!t[1]&&!t[4]),u&4&&P(e,"text-align",t[2].align=="center"?"center":t[2].align=="flex-end"?"right":"left"),u&4&&P(e,"padding-right",t[2].align!="flex-start"?"2rem":"0.75rem")},d(o){o&&C(e),t[19](null),l=!1,Ve(r)}}}function Rk(t){let e,n,i,l;return{c(){var r;e=v("textarea"),m(e,"tabindex","0"),m(e,"class","editor svelte-riwj21"),e.value=t[9],m(e,"placeholder",n=((r=t[2])==null?void 0:r.placeholder)??""),p(e,"with-icon",t[2].icon),p(e,"placeholder",!t[0]&&!t[1]&&!t[4]),P(e,"text-align",t[2].align=="center"?"center":t[2].align=="flex-end"?"right":"left"),P(e,"padding-right",t[2].align!="flex-start"?"2rem":"0.75rem"),P(e,"white-space","pre-wrap"),P(e,"overflow-wrap","break-word"),P(e,"min-height","8rem"),P(e,"overflow-y","auto"),P(e,"resize","vertical")},m(r,o){A(r,e,o),t[18](e),i||(l=[B(e,"input",t[10]),B(e,"focusout",function(){Ge(t[3].focusout)&&t[3].focusout.apply(this,arguments)}),B(e,"keydown",function(){Ge(t[3].handleKeyboard)&&t[3].handleKeyboard.apply(this,arguments)}),tn(t[11].call(null,e))],i=!0)},p(r,o){var u;t=r,o&512&&(e.value=t[9]),o&4&&n!==(n=((u=t[2])==null?void 0:u.placeholder)??"")&&m(e,"placeholder",n),o&4&&p(e,"with-icon",t[2].icon),o&19&&p(e,"placeholder",!t[0]&&!t[1]&&!t[4]),o&4&&P(e,"text-align",t[2].align=="center"?"center":t[2].align=="flex-end"?"right":"left"),o&4&&P(e,"padding-right",t[2].align!="flex-start"?"2rem":"0.75rem")},d(r){r&&C(e),t[18](null),i=!1,Ve(l)}}}function md(t){let e,n,i;return{c(){e=v("i"),m(e,"class","ri-close-line clearIcon")},m(l,r){A(l,e,r),n||(i=B(e,"mousedown",Ii(Et(function(){Ge(t[3].clear)&&t[3].clear.apply(this,arguments)}))),n=!0)},p(l,r){t=l},d(l){l&&C(e),n=!1,i()}}}function Pk(t){let e,n,i=t[2].icon&&!t[2].multiline&&gd(t);function l(u,s){return u[8]?Dk:Ik}let r=l(t),o=r(t);return{c(){e=v("div"),i&&i.c(),n=Q(),o.c(),m(e,"class","superCell multirow svelte-riwj21"),p(e,"inEdit",t[8]),p(e,"isDirty",t[7]&&t[2].showDirty),p(e,"focused",t[8]),p(e,"inline",t[2].role=="inlineInput"),p(e,"tableCell",t[2].role=="tableCell"),p(e,"formInput",t[2].role=="formInput"),p(e,"disabled",t[2].disabled),p(e,"readonly",t[2].readonly),p(e,"error",t[2].error||!t[5]),p(e,"multirow",t[2].multiline),P(e,"color",t[2].color),P(e,"background",t[2].background),P(e,"font-weight",t[2].fontWeight)},m(u,s){A(u,e,s),i&&i.m(e,null),S(e,n),o.m(e,null)},p(u,[s]){u[2].icon&&!u[2].multiline?i?i.p(u,s):(i=gd(u),i.c(),i.m(e,n)):i&&(i.d(1),i=null),r===(r=l(u))&&o?o.p(u,s):(o.d(1),o=r(u),o&&(o.c(),o.m(e,null))),s&256&&p(e,"inEdit",u[8]),s&132&&p(e,"isDirty",u[7]&&u[2].showDirty),s&256&&p(e,"focused",u[8]),s&4&&p(e,"inline",u[2].role=="inlineInput"),s&4&&p(e,"tableCell",u[2].role=="tableCell"),s&4&&p(e,"formInput",u[2].role=="formInput"),s&4&&p(e,"disabled",u[2].disabled),s&4&&p(e,"readonly",u[2].readonly),s&36&&p(e,"error",u[2].error||!u[5]),s&4&&p(e,"multirow",u[2].multiline),s&4&&P(e,"color",u[2].color),s&4&&P(e,"background",u[2].background),s&4&&P(e,"font-weight",u[2].fontWeight)},i:ue,o:ue,d(u){u&&C(e),i&&i.d(),o.d()}}}function Mk(t,e,n){let i,l,r,o,u,s,a=ue,f=()=>(a(),a=ft(M,$=>n(17,s=$)),M);t.$$.on_destroy.push(()=>a());const c=le.createEventDispatcher(),{processStringSync:g}=le.getContext("sdk");le.getContext("context");let{value:h=null}=e,{formattedValue:d}=e,{cellOptions:_={role:"formInput",initialState:"Editing",debounce:250,multiline:!0}}=e,{autofocus:b}=e,w,E,k=null,I=!0,O,D;const N=$=>{if($==null||$==="")return!0;try{return JSON.parse(typeof $=="string"?$:JSON.stringify($)),!0}catch{return!1}};let{cellState:M=Ft((_==null?void 0:_.initialState)??"View",{"*":{goTo($){return $},reset(){n(4,k=i),n(14,D=void 0),n(5,I=!0)}},View:{_enter(){n(4,k=i),n(5,I=N(h))},focus(){if(!_.readonly&&!_.disabled)return"Editing"}},Editing:{_enter(){n(13,E=i),n(4,k=i),n(5,I=N(h)),c("enteredit")},_exit(){n(13,E=void 0),c("exitedit"),c("focusout")},clear(){_.debounce&&c("change",null),n(0,h=null),n(4,k=null),n(5,I=!0)},focusout($){this.submit()},submit(){return o&&I&&c("change",k),"View"},cancel(){return n(0,h=E),c("cancel"),"View"},handleKeyboard($){$.key=="Enter"&&!_.multiline&&this.submit(),$.key=="Escape"&&this.cancel()}}})}=e;f();const V=$=>{const Y=$.target.value;n(5,I=N(Y)),n(4,k=Y),n(14,D=new Date),_!=null&&_.debounce&&I&&(clearTimeout(w),w=setTimeout(()=>{c("change",k)},_.debounce??0))},W=$=>{$==null||$.focus()};le.onMount(()=>{b&&setTimeout(()=>{M.focus()},50)});function ne($){Be[$?"unshift":"push"](()=>{O=$,n(6,O)})}function H($){Be[$?"unshift":"push"](()=>{O=$,n(6,O)})}return t.$$set=$=>{"value"in $&&n(0,h=$.value),"formattedValue"in $&&n(1,d=$.formattedValue),"cellOptions"in $&&n(2,_=$.cellOptions),"autofocus"in $&&n(12,b=$.autofocus),"cellState"in $&&f(n(3,M=$.cellState))},t.$$.update=()=>{t.$$.dirty&1&&n(16,i=h&&N(h)&&typeof h!="string"?JSON.stringify(h):h),t.$$.dirty&4&&n(15,u=_.readonly||_.disabled?"":_.placeholder||""),t.$$.dirty&98308&&n(9,l=!i||i===""&&u?u:N(i)?_.multiline?JSON.stringify(JSON.parse(i),null,2):JSON.stringify(JSON.parse(i)):"Invalid JSON"),t.$$.dirty&65544&&M.reset(i),t.$$.dirty&131072&&n(8,r=s=="Editing"),t.$$.dirty&24592&&n(7,o=D&&E!==k),t.$$.dirty&65542&&n(1,d=!d&&(_!=null&&_.template)?g(_.template,{value:i}):d)},[h,d,_,M,k,I,O,o,r,l,V,W,b,E,D,u,i,s,ne,H]}class ts extends Ze{constructor(e){super(),Qe(this,e,Mk,Pk,Ye,{value:0,formattedValue:1,cellOptions:2,autofocus:12,cellState:3})}}function _d(t,e,n){const i=t.slice();return i[30]=e[n],i[32]=n,i}function pd(t,e,n){const i=t.slice();return i[33]=e[n],i}function Nk(t){let e,n;return{c(){e=v("span"),n=Ee(t[10])},m(i,l){A(i,e,l),S(e,n)},p(i,l){l[0]&1024&&Pe(n,i[10])},d(i){i&&C(e)}}}function Lk(t){let e,n,i=Ce(t[9].slice(0,5)),l=[];for(let o=0;o<i.length;o+=1)l[o]=wd(pd(t,i,o));let r=t[9].length>5&&kd(t);return{c(){e=v("div");for(let o=0;o<l.length;o+=1)l[o].c();n=Q(),r&&r.c(),m(e,"class","items")},m(o,u){A(o,e,u);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null);S(e,n),r&&r.m(e,null)},p(o,u){if(u[0]&512){i=Ce(o[9].slice(0,5));let s;for(s=0;s<i.length;s+=1){const a=pd(o,i,s);l[s]?l[s].p(a,u):(l[s]=wd(a),l[s].c(),l[s].m(e,n))}for(;s<l.length;s+=1)l[s].d(1);l.length=i.length}o[9].length>5?r?r.p(o,u):(r=kd(o),r.c(),r.m(e,null)):r&&(r.d(1),r=null)},d(o){o&&C(e),St(l,o),r&&r.d()}}}function bd(t){var r,o;let e,n,i=((o=(r=t[33])==null?void 0:r.extension)==null?void 0:o.toUpperCase())+"",l;return{c(){e=v("div"),n=v("span"),l=Ee(i),m(e,"class","item pill svelte-14mmsxx"),P(e,"border","1px solid var(--spectrum-global-color-gray-300)")},m(u,s){A(u,e,s),S(e,n),S(n,l)},p(u,s){var a,f;s[0]&512&&i!==(i=((f=(a=u[33])==null?void 0:a.extension)==null?void 0:f.toUpperCase())+"")&&Pe(l,i)},d(u){u&&C(e)}}}function wd(t){let e,n=t[33]&&bd(t);return{c(){n&&n.c(),e=Fe()},m(i,l){n&&n.m(i,l),A(i,e,l)},p(i,l){i[33]?n?n.p(i,l):(n=bd(i),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(i){i&&C(e),n&&n.d(i)}}}function kd(t){let e,n,i=t[9].length-5+"",l,r;return{c(){e=v("span"),n=Ee("( + "),l=Ee(i),r=Ee(" )"),m(e,"class","remaining-count svelte-14mmsxx")},m(o,u){A(o,e,u),S(e,n),S(e,l),S(e,r)},p(o,u){u[0]&512&&i!==(i=o[9].length-5+"")&&Pe(l,i)},d(o){o&&C(e)}}}function yd(t){let e;return{c(){e=v("i"),m(e,"class","ph ph-caret-down action-icon svelte-14mmsxx")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Ed(t){let e,n;return e=new wn({props:{anchor:t[4],open:t[6],maxHeight:350,useAnchorWidth:!0,$$slots:{default:[Fk]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&16&&(r.anchor=i[4]),l[0]&64&&(r.open=i[6]),l[0]&5029|l[1]&32&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function vd(t){let e=[],n=new Map,i,l=Ce(t[9]);const r=o=>o[32];for(let o=0;o<l.length;o+=1){let u=_d(t,l,o),s=r(u);n.set(s,e[o]=Cd(s,u))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Fe()},m(o,u){for(let s=0;s<e.length;s+=1)e[s]&&e[s].m(o,u);A(o,i,u)},p(o,u){u[0]&37504&&(l=Ce(o[9]),e=Tt(e,u,r,1,o,l,n,i.parentNode,nn,Cd,i,_d))},d(o){o&&C(i);for(let u=0;u<e.length;u+=1)e[u].d(o)}}}function Sd(t){let e,n,i;function l(){return t[21](t[32])}return{c(){e=v("button"),e.innerHTML='<i class="ph ph-trash-simple"></i>',m(e,"class","btn-delete svelte-14mmsxx"),m(e,"tabindex","-1"),m(e,"aria-label","Delete"),m(e,"title","Delete"),m(e,"type","button")},m(r,o){A(r,e,o),n||(i=B(e,"click",l),n=!0)},p(r,o){t=r},d(r){r&&C(e),n=!1,i()}}}function Cd(t,e){var I;let n,i,l,r,o=((I=e[30].extension)==null?void 0:I.toUpperCase())+"",u,s,a,f=e[30].name+"",c,g,h,d,_,b;function w(){return e[20](e[32])}let E=!e[12]&&Sd(e);function k(){return e[22](e[32])}return{key:t,first:null,c(){n=v("div"),i=v("button"),i.innerHTML='<i class="ph ph-download-simple"></i>',l=Q(),r=v("div"),u=Ee(o),s=Q(),a=v("a"),c=Ee(f),h=Q(),E&&E.c(),d=Q(),m(i,"class","btn-delete svelte-14mmsxx"),m(i,"tabindex","-1"),m(i,"aria-label","Delete"),m(i,"title","Delete"),m(i,"type","button"),m(r,"class","pill svelte-14mmsxx"),m(a,"href",g=e[30].url),m(a,"class","filename svelte-14mmsxx"),m(a,"download",""),m(n,"class","attachment svelte-14mmsxx"),p(n,"focused",e[7]===e[32]),this.first=n},m(O,D){A(O,n,D),S(n,i),S(n,l),S(n,r),S(r,u),S(n,s),S(n,a),S(a,c),S(n,h),E&&E.m(n,null),S(n,d),_||(b=[B(i,"click",w),B(n,"mouseenter",k)],_=!0)},p(O,D){var N;e=O,D[0]&512&&o!==(o=((N=e[30].extension)==null?void 0:N.toUpperCase())+"")&&Pe(u,o),D[0]&512&&f!==(f=e[30].name+"")&&Pe(c,f),D[0]&512&&g!==(g=e[30].url)&&m(a,"href",g),e[12]?E&&(E.d(1),E=null):E?E.p(e,D):(E=Sd(e),E.c(),E.m(n,d)),D[0]&640&&p(n,"focused",e[7]===e[32])},d(O){O&&C(n),E&&E.d(),_=!1,Ve(b)}}}function Fk(t){var g;let e,n,i,l,r,o,u,s,a,f,c=((g=t[9])==null?void 0:g.length)&&vd(t);return{c(){e=v("div"),c&&c.c(),n=Q(),i=v("button"),l=v("i"),r=Ee(" Add Attachment"),u=Q(),s=v("input"),m(l,"class","ph ph-plus"),m(i,"class","btn-upload-empty svelte-14mmsxx"),m(i,"aria-label","Upload attachment"),m(i,"type","button"),i.disabled=o=t[0].disabled||t[0].readonly,m(s,"type","file"),s.multiple=t[2],P(s,"display","none"),m(e,"class","attachments svelte-14mmsxx")},m(h,d){A(h,e,d),c&&c.m(e,null),S(e,n),S(e,i),S(i,l),S(i,r),S(e,u),S(e,s),t[24](s),t[25](e),a||(f=[B(i,"click",t[23]),B(s,"change",t[14])],a=!0)},p(h,d){var _;(_=h[9])!=null&&_.length?c?c.p(h,d):(c=vd(h),c.c(),c.m(e,n)):c&&(c.d(1),c=null),d[0]&1&&o!==(o=h[0].disabled||h[0].readonly)&&(i.disabled=o),d[0]&4&&(s.multiple=h[2])},d(h){h&&C(e),c&&c.d(),t[24](null),t[25](null),a=!1,Ve(f)}}}function Vk(t){let e,n,i,l,r,o,u,s,a;function f(_,b){return _[9].length||_[13]?Lk:Nk}let c=f(t),g=c(t),h=!t[12]&&!t[11]&&t[0].role!="tableCell"&&yd(),d=t[13]&&Ed(t);return{c(){e=v("div"),n=v("div"),g.c(),i=Q(),h&&h.c(),r=Q(),d&&d.c(),o=Fe(),m(n,"class","value"),p(n,"placeholder",t[9].length<1),P(n,"padding-left",t[0].icon?"32px":t[0].padding),P(n,"padding-right",t[0].clearValueIcon?"32px":t[0].padding),m(e,"class","superCell"),m(e,"tabindex",l=t[0].readonly||t[0].disabled?-1:0),p(e,"inEdit",t[3]=="Editing"),p(e,"inline",t[0].role=="inlineInput"),p(e,"tableCell",t[0].role=="tableCell"),p(e,"formInput",t[0].role=="formInput"),p(e,"disabled",t[0].disabled),p(e,"readonly",t[0].readonly),P(e,"color",t[0].color),P(e,"background",t[0].background)},m(_,b){A(_,e,b),S(e,n),g.m(n,null),S(n,i),h&&h.m(n,null),t[19](e),A(_,r,b),d&&d.m(_,b),A(_,o,b),u=!0,s||(a=[B(n,"click",function(){Ge(t[1].toggle)&&t[1].toggle.apply(this,arguments)}),B(e,"focusin",function(){Ge(t[1].focus)&&t[1].focus.apply(this,arguments)}),B(e,"focusout",function(){Ge(t[1].focusout)&&t[1].focusout.apply(this,arguments)})],s=!0)},p(_,b){t=_,c===(c=f(t))&&g?g.p(t,b):(g.d(1),g=c(t),g&&(g.c(),g.m(n,i))),!t[12]&&!t[11]&&t[0].role!="tableCell"?h||(h=yd(),h.c(),h.m(n,null)):h&&(h.d(1),h=null),(!u||b[0]&512)&&p(n,"placeholder",t[9].length<1),b[0]&1&&P(n,"padding-left",t[0].icon?"32px":t[0].padding),b[0]&1&&P(n,"padding-right",t[0].clearValueIcon?"32px":t[0].padding),(!u||b[0]&1&&l!==(l=t[0].readonly||t[0].disabled?-1:0))&&m(e,"tabindex",l),(!u||b[0]&8)&&p(e,"inEdit",t[3]=="Editing"),(!u||b[0]&1)&&p(e,"inline",t[0].role=="inlineInput"),(!u||b[0]&1)&&p(e,"tableCell",t[0].role=="tableCell"),(!u||b[0]&1)&&p(e,"formInput",t[0].role=="formInput"),(!u||b[0]&1)&&p(e,"disabled",t[0].disabled),(!u||b[0]&1)&&p(e,"readonly",t[0].readonly),b[0]&1&&P(e,"color",t[0].color),b[0]&1&&P(e,"background",t[0].background),t[13]?d?(d.p(t,b),b[0]&8192&&U(d,1)):(d=Ed(t),d.c(),U(d,1),d.m(o.parentNode,o)):d&&(He(),Z(d,1,1,()=>{d=null}),ze())},i(_){u||(U(d),u=!0)},o(_){Z(d),u=!1},d(_){_&&(C(e),C(r),C(o)),g.d(),h&&h.d(),t[19](null),d&&d.d(_),s=!1,Ve(a)}}}function Bk(t,e,n){let i,l,r,o,u,s,a,f=ue,c=()=>(f(),f=ft(M,q=>n(3,a=q)),M);t.$$.on_destroy.push(()=>f());const g=le.createEventDispatcher(),{API:h}=le.getContext("sdk");let{value:d}=e,{cellOptions:_}=e,{fieldSchema:b}=e,{tableid:w}=e,E=d,k,I,O,D,N,{cellState:M=Ft(_.initialState??"View",{"*":{goTo(q){return q}},View:{_enter(){n(6,O=!1)},focus(){if(!_.readonly)return"Editing"}},Editing:{_enter(){E=d,g("enteredit")},_exit(){g("exitedit")},toggle(){n(6,O=!O)},focusout(q){if(!(k!=null&&k.contains(q.relatedTarget))&&!(I!=null&&I.contains(q.relatedTarget)))return d!==E&&g("change",d),"View"},change(q){_.debounce&&g("change",d)},submit(q){if(!I.contains(q.relatedTarget))return d!==E&&g("change",d),g("focusout"),"View"},cancel(){return n(16,d=E),"View"}}})}=e;c();const V=async q=>{let j=new FormData;for(let K=0;K<q.length;K++)j.append("file",q[K]);try{let K=await h.uploadAttachment(w,j);return n(9,l=[...l,...K]),g("change",[...l]),K}catch(K){return console.error("Upload failed:",K),[]}};function W(q){const j=q.target,K=Array.from(j.files||[]);V(K)}async function ne(q){l.splice(q,1),n(9,l),n(16,d),n(2,i),n(17,b),g("change",l)}function H(q){Be[q?"unshift":"push"](()=>{k=q,n(4,k)})}const $=q=>ne(q),Y=q=>ne(q),G=q=>n(7,D=q),oe=()=>N==null?void 0:N.click();function ie(q){Be[q?"unshift":"push"](()=>{N=q,n(8,N)})}function J(q){Be[q?"unshift":"push"](()=>{I=q,n(5,I)})}return t.$$set=q=>{"value"in q&&n(16,d=q.value),"cellOptions"in q&&n(0,_=q.cellOptions),"fieldSchema"in q&&n(17,b=q.fieldSchema),"tableid"in q&&n(18,w=q.tableid),"cellState"in q&&c(n(1,M=q.cellState))},t.$$.update=()=>{var q;t.$$.dirty[0]&131072&&n(2,i=((q=b==null?void 0:b.type)==null?void 0:q.includes("single"))!==!0),t.$$.dirty[0]&65540&&n(9,l=d&&i?d:d?[d]:[]),t.$$.dirty[0]&8&&n(13,r=a=="Editing"),t.$$.dirty[0]&1&&n(12,o=_.readonly),t.$$.dirty[0]&1&&n(11,u=_.disabled),t.$$.dirty[0]&1&&n(10,s=_.placeholder??"")},[_,M,i,a,k,I,O,D,N,l,s,u,o,r,W,ne,d,b,w,H,$,Y,G,oe,ie,J]}class ns extends Ze{constructor(e){super(),Qe(this,e,Bk,Vk,Ye,{value:16,cellOptions:0,fieldSchema:17,tableid:18,cellState:1},null,[-1,-1])}}function Ad(t){let e,n,i;return{c(){e=v("div"),m(e,"class","grabber"),P(e,"height",t[5].headerHeight-16)},m(l,r){A(l,e,r),n||(i=[B(e,"mousedown",t[3].startResizing),B(e,"dblclick",t[3].resetSize),B(e,"mouseenter",t[33]),B(e,"mouseleave",t[34])],n=!0)},p(l,r){r[0]&32&&P(e,"height",l[5].headerHeight-16)},d(l){l&&C(e),n=!1,Ve(i)}}}function Td(t){let e,n;return e=new Fb({props:{sorted:t[4]}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&16&&(r.sorted=i[4]),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Uk(t){let e;const n=t[30].default,i=Ut(n,t,t[37],null);return{c(){i&&i.c()},m(l,r){i&&i.m(l,r),e=!0},p(l,r){i&&i.p&&(!e||r[1]&64)&&zt(i,n,l,l[37],e?Ht(n,l[37],r,null):jt(l[37]),null)},i(l){e||(U(i,l),e=!0)},o(l){Z(i,l),e=!1},d(l){i&&i.d(l)}}}function Id(t){let e,n;return e=new sw({props:{footerLabel:t[10]}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&1024&&(r.footerLabel=i[10]),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Hk(t){var g;let e,n,i,l,r,o,u,s,a=t[5].showHeader&&t[5].canResize&&Ad(t),f=t[5].showHeader&&Td(t);l=new lw({props:{rows:(g=t[6])==null?void 0:g.rows,rowHeight:t[14].appearance.rowHeight,field:t[5].name,idField:t[14].data.idColumn,zebra:t[14].appearance.zebraColors,isLast:t[5].isLast,isFirst:t[5].isFirst,$$slots:{default:[Uk]},$$scope:{ctx:t}}});let c=t[5].showFooter&&Id(t);return{c(){e=v("div"),a&&a.c(),n=Q(),f&&f.c(),i=Q(),We(l.$$.fragment),r=Q(),c&&c.c(),m(e,"class","super-column"),p(e,"sticky",t[0]&&t[1]),p(e,"resizing",t[7]),p(e,"considerResizing",t[8]&&!t[7]),p(e,"isLast",t[5].isLast),P(e,"max-width",t[12]),P(e,"min-width",t[11])},m(h,d){A(h,e,d),a&&a.m(e,null),S(e,n),f&&f.m(e,null),S(e,i),je(l,e,null),S(e,r),c&&c.m(e,null),t[35](e),o=!0,u||(s=[B(window,"mouseup",function(){Ge(t[5].canResize?t[31]:null)&&(t[5].canResize?t[31]:null).apply(this,arguments)}),B(window,"mousemove",function(){Ge(t[5].canResize?t[32]:null)&&(t[5].canResize?t[32]:null).apply(this,arguments)}),B(e,"mouseleave",t[36])],u=!0)},p(h,d){var b;t=h,t[5].showHeader&&t[5].canResize?a?a.p(t,d):(a=Ad(t),a.c(),a.m(e,n)):a&&(a.d(1),a=null),t[5].showHeader?f?(f.p(t,d),d[0]&32&&U(f,1)):(f=Td(t),f.c(),U(f,1),f.m(e,i)):f&&(He(),Z(f,1,1,()=>{f=null}),ze());const _={};d[0]&64&&(_.rows=(b=t[6])==null?void 0:b.rows),d[0]&16384&&(_.rowHeight=t[14].appearance.rowHeight),d[0]&32&&(_.field=t[5].name),d[0]&16384&&(_.idField=t[14].data.idColumn),d[0]&16384&&(_.zebra=t[14].appearance.zebraColors),d[0]&32&&(_.isLast=t[5].isLast),d[0]&32&&(_.isFirst=t[5].isFirst),d[1]&64&&(_.$$scope={dirty:d,ctx:t}),l.$set(_),t[5].showFooter?c?(c.p(t,d),d[0]&32&&U(c,1)):(c=Id(t),c.c(),U(c,1),c.m(e,null)):c&&(He(),Z(c,1,1,()=>{c=null}),ze()),(!o||d[0]&3)&&p(e,"sticky",t[0]&&t[1]),(!o||d[0]&128)&&p(e,"resizing",t[7]),(!o||d[0]&384)&&p(e,"considerResizing",t[8]&&!t[7]),(!o||d[0]&32)&&p(e,"isLast",t[5].isLast),d[0]&4096&&P(e,"max-width",t[12]),d[0]&2048&&P(e,"min-width",t[11])},i(h){o||(U(f),U(l.$$.fragment,h),U(c),o=!0)},o(h){Z(f),Z(l.$$.fragment,h),Z(c),o=!1},d(h){h&&C(e),a&&a.d(),f&&f.d(),qe(l),c&&c.d(),t[35](null),u=!1,Ve(s)}}}function zk(t,e,n){var ke,ce;let i,l,r,o,u,s,a,f,c,g,h,d=ue,_=()=>(d(),d=ft(K,re=>n(6,h=re)),K),b,w,E;t.$$.on_destroy.push(()=>d());let{$$slots:k={},$$scope:I}=e;const{memo:O,derivedMemo:D,processStringSync:N,builderStore:M}=le.getContext("sdk");Me(t,M,re=>n(29,b=re));const V=le.getContext("stbSettings");Me(t,V,re=>n(14,E=re));const W=le.getContext("stbSortColumn");Me(t,W,re=>n(27,c=re));const ne=le.getContext("stbSortOrder");Me(t,ne,re=>n(28,g=re));const H=le.getContext("stbHovered");Me(t,H,re=>n(13,w=re));const $=le.getContext("stbEditing");Me(t,$,re=>n(41,f=re));const Y=le.getContext("stbState"),G=le.getContext("stbAPI"),oe={string:kn,longform:kn,number:or,bigint:or,options:rl,array:rl,jsonarray:rl,boolean:Yo,datetime:$o,link:Zr,json:ts,attachment_single:ns,attachment:ns,bb_reference_single:Zr,bb_reference:Zr},ie={string:kn,number:or,bigint:or,options:rl,array:rl,jsonarray:rl,boolean:Yo,datetime:$o,link:kn,json:ts,attachment_single:null,attachment:null,bb_reference_single:kn,bb_reference:kn};let{columnOptions:J}=e,{sticky:q}=e,{scrollPos:j}=e,{stbData:K}=e;_();let x=Math.random()*100,X,F,R,z=0,me,se,Oe=O(0);Me(t,Oe,re=>n(26,s=re));const be=O({...J,cellComponent:oe[(ke=J==null?void 0:J.schema)==null?void 0:ke.type]??kn,headerComponent:ie[(ce=J==null?void 0:J.schema)==null?void 0:ce.type]??kn});Me(t,be,re=>n(5,a=re));const Ie=D(be,re=>({role:"tableCell",showDirty:!0,readonly:!re.canEdit,align:re.align,template:re.template,optionsViewMode:re.optionsViewMode,relViewMode:re.relViewMode,padding:re.isFirst?"1rem":"0.5rem",background:re.background,color:re.color,controlType:"checkbox"})),ve=D(be,re=>({align:re==null?void 0:re.align,color:re==null?void 0:re.color,background:"var(--spectrum-global-color-gray-50)",fontWeight:re==null?void 0:re.fontWeight,padding:re==null?void 0:re.cellPadding,placeholder:re.defaultFilteringOperator,clearValueIcon:!0,optionsViewMode:"text",optionsSource:"schema",debounce:250,controlType:"select",initialState:"Editing",role:"inlineInput"})),fe=Ft("Idle",{"*":{reset(){return"Idle"},headerClicked(){a.canFilter?this.filter():this.sort()},sort(){J.canSort&&(Y.sortBy(J.name,me=="ascending"?"descending":"ascending"),n(4,me="descending"))},lockWidth(){X||Re(Oe,s=se==null?void 0:se.clientWidth,s)},unlockWidth(){X||(Re(Oe,s=0,s),J.asComponent||this.lockWidth.debounce(50))},startResizing(re){re.stopPropagation(),re.preventDefault(),n(7,X=!0),R=re.clientX,z=se.clientWidth,Re(Oe,s=z,s)},resize(re){Re(Oe,s=z+re.clientX-R,s)},stopResizing(re){re.preventDefault(),re.stopPropagation(),n(7,X=!1),R=void 0},resetSize(re){re.preventDefault(),re.stopPropagation(),Re(Oe,s=0,s)}},Idle:{_enter(){Re(Oe,s=0,s)},filter(){return J.canFilter?"Entering":"Idle"},enteredit(re){if(!i)return Re($,f=re,f),Y.edit(),"EditingCell"},addRow(){return"Inserting"}},Entering:{_enter(){Re(Oe,s=se.clientWidth,s)},filter(re){return Y.addFilter({...re,id:x}),"Filtered"},cancel(){return"Idle"},clear(){return"Idle"}},Filtered:{filter(re){Y.removeFilter(x),Y.addFilter({...re,id:x})},clear(){return Y.clearFilter(x),"Entering"}},EditingCell:{_enter(){Re(Oe,s=se.clientWidth,s),Y.edit.debounce(30)},patchRow(re,Ae,Ue,Je,lt){Y.patchRow(re,Ae,Ue,Je,lt)},exitedit(re){return Re($,f=-1,f),Y.endEdit.debounce(50),"Idle"}},Inserting:{_enter(){Re(Oe,s=se.clientWidth,s)},_exit(){Re(Oe,s=0,s)},cancelAddRow(){return"Idle"}}}),Ne=(re,Ae)=>{if(re&&(Ae!=null&&Ae.includes("."))){for(var Ue=0,Ae=Ae.split("."),Je=Ae.length;Ue<Je;Ue++)if(re[Ae[Ue]])re=re[Ae[Ue]];else{re=null;break}return re}else return re[Ae]??void 0},te=(re,Ae)=>re>0?re:Ae.widthOverride?Ae.widthOverride:Ae.sizing=="fixed"?Ae.fixedWidth:Ae.minWidth,ae=(re,Ae)=>re>0?re:Ae.widthOverride?Ae.widthOverride:Ae.sizing=="fixed"?Ae.fixedWidth:"unset",de=re=>{let Ae,Ue=J.canEdit;return(re==null?void 0:re.type)=="json",Ae=oe[re==null?void 0:re.type]||kn,Ae==kn&&!Ue&&(Ae=Go),Ae};le.setContext("stColumnOptions",be),le.setContext("stRowCellOptions",Ie),le.setContext("stHeaderCellOptions",ve),le.setContext("stColumnState",fe),le.onMount(()=>{G==null||G.registerSuperColumn(x,fe),(a.sizing==="flexible"||a.sizing==="flex")&&a.sizing!=="fixed"&&setTimeout(()=>{se&&s===0&&!J.asComponent&&Re(Oe,s=se.clientWidth,s)},0)}),le.onDestroy(()=>{G==null||G.unregisterSuperColumn(x)});const Xe=re=>{X&&fe.stopResizing(re)},Te=re=>{X&&fe.resize(re)},Se=()=>n(8,F=!0),Le=()=>n(8,F=!1);function rt(re){Be[re?"unshift":"push"](()=>{se=re,n(9,se)})}const kt=()=>Re(H,w=null,w);return t.$$set=re=>{"columnOptions"in re&&n(23,J=re.columnOptions),"sticky"in re&&n(0,q=re.sticky),"scrollPos"in re&&n(1,j=re.scrollPos),"stbData"in re&&_(n(2,K=re.stbData)),"$$scope"in re&&n(37,I=re.$$scope)},t.$$.update=()=>{var re,Ae;t.$$.dirty[0]&536870912&&n(24,i=b==null?void 0:b.inBuilder),t.$$.dirty[0]&25165827&&be.set({...J,inBuilder:i,cellComponent:de(J.schema),headerComponent:ie[(re=J==null?void 0:J.schema)==null?void 0:re.type]??kn,background:q&&j?"var(--spectrum-global-color-gray-75)":J.quiet?"transparent":J.background}),t.$$.dirty[0]&67108896&&n(12,l=ae(s,a)),t.$$.dirty[0]&67108896&&n(11,r=te(s,a)),t.$$.dirty[0]&96&&n(25,u=(Ae=h==null?void 0:h.rows)==null?void 0:Ae.map(Ue=>Ne(Ue,a.name))),t.$$.dirty[0]&33554464&&n(10,o=a.footerTemplate?N(a.footerTemplate,{values:u}):void 0),t.$$.dirty[0]&402653232&&(c==a.name?n(4,me=g):c!=a.name&&me&&n(4,me=void 0))},[q,j,K,fe,me,a,h,X,F,se,o,r,l,w,E,M,V,W,ne,H,$,Oe,be,J,i,u,s,c,g,b,k,Xe,Te,Se,Le,rt,kt,I]}class is extends Ze{constructor(e){super(),Qe(this,e,zk,Hk,Ye,{columnOptions:23,sticky:0,scrollPos:1,stbData:2,columnState:3},null,[-1,-1])}get columnState(){return this.$$.ctx[3]}}function Dd(t,e,n){const i=t.slice();return i[39]=e[n].text,i[40]=e[n].icon,i[41]=e[n].disabled,i[42]=e[n].onClick,i[43]=e[n].size,i}function Od(t,e,n){const i=t.slice();return i[46]=e[n],i}function Rd(t,e,n){const i=t.slice();return i[49]=e[n].conditions,i[50]=e[n].disabledTemplate,i[42]=e[n].onClick,i[41]=e[n].disabled,i[51]=Rm(e[n],["conditions","disabledTemplate","onClick","disabled"]),i}function Pd(t){let e;return{c(){e=v("div"),e.innerHTML="<span></span>",m(e,"class","super-column-header")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Md(t){let e,n,i=Ce(t[7]),l=[];for(let o=0;o<i.length;o+=1)l[o]=Ld(Rd(t,i,o));const r=o=>Z(l[o],1,1,()=>{l[o]=null});return{c(){for(let o=0;o<l.length;o+=1)l[o].c();e=Fe()},m(o,u){for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(o,u);A(o,e,u),n=!0},p(o,u){if(u[0]&134455424){i=Ce(o[7]);let s;for(s=0;s<i.length;s+=1){const a=Rd(o,i,s);l[s]?(l[s].p(a,u),U(l[s],1)):(l[s]=Ld(a),l[s].c(),U(l[s],1),l[s].m(e.parentNode,e))}for(He(),s=i.length;s<l.length;s+=1)r(s);ze()}},i(o){if(!n){for(let u=0;u<i.length;u+=1)U(l[u]);n=!0}},o(o){l=l.filter(Boolean);for(let u=0;u<l.length;u+=1)Z(l[u]);n=!1},d(o){o&&C(e),St(l,o)}}}function Nd(t){var o,u;let e,n;function i(){return t[33](t[46],t[42])}const l=[t[51],{disabled:t[41]||t[16]==t[46]||t[15][t[46]].disabled||t[27].shouldDisableButton(t[50],t[27].enrichContext((u=(o=t[17])==null?void 0:o.rows)==null?void 0:u[t[46]]))},{onClick:i}];let r={};for(let s=0;s<l.length;s+=1)r=vs(r,l[s]);return e=new el({props:r}),{c(){We(e.$$.fragment)},m(s,a){je(e,s,a),n=!0},p(s,a){var c,g;t=s;const f=a[0]&134455424?Gm(l,[a[0]&128&&Ym(t[51]),{disabled:t[41]||t[16]==t[46]||t[15][t[46]].disabled||t[27].shouldDisableButton(t[50],t[27].enrichContext((g=(c=t[17])==null?void 0:c.rows)==null?void 0:g[t[46]]))},a[0]&134226048&&{onClick:i}]):{};e.$set(f)},i(s){n||(U(e.$$.fragment,s),n=!0)},o(s){Z(e.$$.fragment,s),n=!1},d(s){qe(e,s)}}}function Ld(t){var r,o;let e=t[27].shouldShowButton(t[49]||[],t[27].enrichContext((o=(r=t[17])==null?void 0:r.rows)==null?void 0:o[t[46]])),n,i,l=e&&Nd(t);return{c(){l&&l.c(),n=Fe()},m(u,s){l&&l.m(u,s),A(u,n,s),i=!0},p(u,s){var a,f;s[0]&139392&&(e=u[27].shouldShowButton(u[49]||[],u[27].enrichContext((f=(a=u[17])==null?void 0:a.rows)==null?void 0:f[u[46]]))),e?l?(l.p(u,s),s[0]&139392&&U(l,1)):(l=Nd(u),l.c(),U(l,1),l.m(n.parentNode,n)):l&&(He(),Z(l,1,1,()=>{l=null}),ze())},i(u){i||(U(l),i=!0)},o(u){Z(l),i=!1},d(u){u&&C(n),l&&l.d(u)}}}function Fd(t){let e,n;function i(...l){return t[34](t[46],...l)}return e=new el({props:{size:"S",icon:t[10],text:"",quiet:"true",type:"secondary",onClick:i}}),{c(){We(e.$$.fragment)},m(l,r){je(e,l,r),n=!0},p(l,r){t=l;const o={};r[0]&1024&&(o.icon=t[10]),r[0]&8192&&(o.onClick=i),e.$set(o)},i(l){n||(U(e.$$.fragment,l),n=!0)},o(l){Z(e.$$.fragment,l),n=!1},d(l){qe(e,l)}}}function Vd(t){var c,g;let e,n,i,l,r,o,u,s=t[1]&&((c=t[7])==null?void 0:c.length)&&Md(t),a=t[1]&&((g=t[6])==null?void 0:g.length)&&Fd(t);function f(){return t[35](t[46])}return{c(){e=v("div"),n=v("div"),s&&s.c(),i=Q(),a&&a.c(),l=Q(),m(n,"class","row-buttons svelte-jgskq3"),P(n,"gap",t[7].length>1?"0.5rem":"0rem"),m(e,"class","super-row"),p(e,"is-selected",t[15][t[46]].selected),p(e,"is-hovered",t[14]==t[46]||t[12]==t[46]),p(e,"is-editing",t[16]==t[46]),p(e,"is-disabled",t[15][t[46]].disabled),P(e,"min-height",t[15][t[46]].height),P(e,"padding-right",t[2]&&t[0]?"1.5rem":"0.5rem")},m(h,d){A(h,e,d),S(e,n),s&&s.m(n,null),S(n,i),a&&a.m(n,null),S(e,l),r=!0,o||(u=[B(e,"mouseenter",f),B(e,"mouseleave",t[36])],o=!0)},p(h,d){var _,b;t=h,t[1]&&((_=t[7])!=null&&_.length)?s?(s.p(t,d),d[0]&130&&U(s,1)):(s=Md(t),s.c(),U(s,1),s.m(n,i)):s&&(He(),Z(s,1,1,()=>{s=null}),ze()),t[1]&&((b=t[6])!=null&&b.length)?a?(a.p(t,d),d[0]&66&&U(a,1)):(a=Fd(t),a.c(),U(a,1),a.m(n,null)):a&&(He(),Z(a,1,1,()=>{a=null}),ze()),d[0]&128&&P(n,"gap",t[7].length>1?"0.5rem":"0rem"),(!r||d[0]&40960)&&p(e,"is-selected",t[15][t[46]].selected),(!r||d[0]&28672)&&p(e,"is-hovered",t[14]==t[46]||t[12]==t[46]),(!r||d[0]&73728)&&p(e,"is-editing",t[16]==t[46]),(!r||d[0]&40960)&&p(e,"is-disabled",t[15][t[46]].disabled),d[0]&40960&&P(e,"min-height",t[15][t[46]].height),d[0]&5&&P(e,"padding-right",t[2]&&t[0]?"1.5rem":"0.5rem")},i(h){r||(U(s),U(a),r=!0)},o(h){Z(s),Z(a),r=!1},d(h){h&&C(e),s&&s.d(),a&&a.d(),o=!1,Ve(u)}}}function Bd(t){let e;return{c(){e=v("div"),m(e,"class","add-row"),P(e,"padding","unset")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Ud(t){let e;return{c(){e=v("div"),m(e,"class","super-column-footer")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Hd(t){let e,n;return e=new wn({props:{open:!0,anchor:t[4],minWidth:150,align:t[0]?"right":"left",$$slots:{default:[jk]},$$scope:{ctx:t}}}),e.$on("close",t[38]),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&16&&(r.anchor=i[4]),l[0]&1&&(r.align=i[0]?"right":"left"),l[0]&4193|l[1]&8388608&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function zd(t){let e,n,i=Ce(t[6]),l=[];for(let o=0;o<i.length;o+=1)l[o]=jd(Dd(t,i,o));const r=o=>Z(l[o],1,1,()=>{l[o]=null});return{c(){e=v("div");for(let o=0;o<l.length;o+=1)l[o].c();m(e,"class","action-menu svelte-jgskq3")},m(o,u){A(o,e,u);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null);n=!0},p(o,u){if(u[0]&134221921){i=Ce(o[6]);let s;for(s=0;s<i.length;s+=1){const a=Dd(o,i,s);l[s]?(l[s].p(a,u),U(l[s],1)):(l[s]=jd(a),l[s].c(),U(l[s],1),l[s].m(e,null))}for(He(),s=i.length;s<l.length;s+=1)r(s);ze()}},i(o){if(!n){for(let u=0;u<i.length;u+=1)U(l[u]);n=!0}},o(o){l=l.filter(Boolean);for(let u=0;u<l.length;u+=1)Z(l[u]);n=!1},d(o){o&&C(e),St(l,o)}}}function jd(t){let e,n;function i(){return t[37](t[42])}return e=new el({props:{size:t[43],icon:t[40],text:t[39],disabled:t[41],menuItem:!0,menuAlign:t[0]?"right":"left",onClick:i}}),{c(){We(e.$$.fragment)},m(l,r){je(e,l,r),n=!0},p(l,r){t=l;const o={};r[0]&64&&(o.size=t[43]),r[0]&64&&(o.icon=t[40]),r[0]&64&&(o.text=t[39]),r[0]&64&&(o.disabled=t[41]),r[0]&1&&(o.menuAlign=t[0]?"right":"left"),r[0]&4192&&(o.onClick=i),e.$set(o)},i(l){n||(U(e.$$.fragment,l),n=!0)},o(l){Z(e.$$.fragment,l),n=!1},d(l){qe(e,l)}}}function jk(t){var l;let e,n,i=((l=t[6])==null?void 0:l.length)&&zd(t);return{c(){i&&i.c(),e=Fe()},m(r,o){i&&i.m(r,o),A(r,e,o),n=!0},p(r,o){var u;(u=r[6])!=null&&u.length?i?(i.p(r,o),o[0]&64&&U(i,1)):(i=zd(r),i.c(),U(i,1),i.m(e.parentNode,e)):i&&(He(),Z(i,1,1,()=>{i=null}),ze())},i(r){n||(U(i),n=!0)},o(r){Z(i),n=!1},d(r){r&&C(e),i&&i.d(r)}}}function qk(t){let e,n,i,l,r,o,u,s,a=t[3].showHeader&&Pd(),f=Ce(t[13]),c=[];for(let b=0;b<f.length;b+=1)c[b]=Vd(Od(t,f,b));const g=b=>Z(c[b],1,1,()=>{c[b]=null});let h=t[8]&&Bd(),d=t[3].showFooter&&Ud(),_=t[5]&&Hd(t);return{c(){e=v("div"),a&&a.c(),n=Q(),i=v("div");for(let b=0;b<c.length;b+=1)c[b].c();l=Q(),h&&h.c(),r=Q(),d&&d.c(),o=Q(),_&&_.c(),u=Fe(),m(i,"class","super-column-body"),p(i,"quiet",t[11]),p(i,"sticky",t[9]),p(i,"zebra",t[3].appearance.zebraColors),P(i,"margin-top","var(--super-column-top-offset)"),m(e,"class","super-column"),p(e,"right",t[0]),p(e,"sticky",t[9]),P(e,"flex","none")},m(b,w){A(b,e,w),a&&a.m(e,null),S(e,n),S(e,i);for(let E=0;E<c.length;E+=1)c[E]&&c[E].m(i,null);S(e,l),h&&h.m(e,null),S(e,r),d&&d.m(e,null),A(b,o,w),_&&_.m(b,w),A(b,u,w),s=!0},p(b,w){if(b[3].showHeader?a||(a=Pd(),a.c(),a.m(e,n)):a&&(a.d(1),a=null),w[0]&402912455){f=Ce(b[13]);let E;for(E=0;E<f.length;E+=1){const k=Od(b,f,E);c[E]?(c[E].p(k,w),U(c[E],1)):(c[E]=Vd(k),c[E].c(),U(c[E],1),c[E].m(i,null))}for(He(),E=f.length;E<c.length;E+=1)g(E);ze()}(!s||w[0]&2048)&&p(i,"quiet",b[11]),(!s||w[0]&512)&&p(i,"sticky",b[9]),(!s||w[0]&8)&&p(i,"zebra",b[3].appearance.zebraColors),b[8]?h||(h=Bd(),h.c(),h.m(e,r)):h&&(h.d(1),h=null),b[3].showFooter?d||(d=Ud(),d.c(),d.m(e,null)):d&&(d.d(1),d=null),(!s||w[0]&1)&&p(e,"right",b[0]),(!s||w[0]&512)&&p(e,"sticky",b[9]),b[5]?_?(_.p(b,w),w[0]&32&&U(_,1)):(_=Hd(b),_.c(),U(_,1),_.m(u.parentNode,u)):_&&(He(),Z(_,1,1,()=>{_=null}),ze())},i(b){if(!s){for(let w=0;w<f.length;w+=1)U(c[w]);U(_),s=!0}},o(b){c=c.filter(Boolean);for(let w=0;w<c.length;w+=1)Z(c[w]);Z(_),s=!1},d(b){b&&(C(e),C(o),C(u)),a&&a.d(),St(c,b),h&&h.d(),d&&d.d(),_&&_.d(b)}}}function Wk(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b,w;const E=le.getContext("stbSettings");Me(t,E,z=>n(3,g=z));const k=le.getContext("stbState");Me(t,k,z=>n(31,f=z));const I=le.getContext("stbData");Me(t,I,z=>n(17,w=z));const O=le.getContext("stbHorizontalScrollPos");Me(t,O,z=>n(32,c=z));const D=le.getContext("stbHovered");Me(t,D,z=>n(14,d=z));const N=le.getContext("stbEditing");Me(t,N,z=>n(16,b=z));const M=le.getContext("stbMenuID");Me(t,M,z=>n(12,a=z));const V=le.getContext("stbRowMetadata");Me(t,V,z=>n(15,_=z));const W=le.getContext("stbVisibleRows");Me(t,W,z=>n(13,h=z));const ne=le.getContext("stbAPI");let{right:H}=e,{rowMenu:$}=e,{rowMenuItems:Y}=e,{menuItemsVisible:G=0}=e,{canScroll:oe}=e,ie,J;const q=(z,me)=>{n(4,ie=z.target),n(5,J=!J),Re(M,a=J?me:-1,a)},j=(z,me)=>{ne.executeRowButtonAction(z,me)},K=(z,me)=>q(me,z),x=z=>Re(D,d=z,d),X=()=>Re(D,d=null,d),F=z=>{ne.executeRowButtonAction(a,z),n(5,J=!1),Re(M,a=void 0,a)},R=()=>{n(5,J=!1),Re(M,a=void 0,a)};return t.$$set=z=>{"right"in z&&n(0,H=z.right),"rowMenu"in z&&n(1,$=z.rowMenu),"rowMenuItems"in z&&n(29,Y=z.rowMenuItems),"menuItemsVisible"in z&&n(30,G=z.menuItemsVisible),"canScroll"in z&&n(2,oe=z.canScroll)},t.$$.update=()=>{t.$$.dirty[0]&8&&n(11,i=g.appearance.quiet),t.$$.dirty[0]&8&&n(10,l=g.rowMenuIcon),t.$$.dirty[0]&1|t.$$.dirty[1]&2&&n(9,r=c>0&&!H),t.$$.dirty[1]&1&&n(8,o=f=="Inserting"),t.$$.dirty[0]&1610612736&&n(7,u=G<(Y==null?void 0:Y.length)?Y.slice(0,G):Y),t.$$.dirty[0]&1610612736&&n(6,s=G<(Y==null?void 0:Y.length)?Y.slice(G,Y.length):[])},[H,$,oe,g,ie,J,s,u,o,r,l,i,a,h,d,_,b,w,E,k,I,O,D,N,M,V,W,ne,q,Y,G,f,c,j,K,x,X,F,R]}class qd extends Ze{constructor(e){super(),Qe(this,e,Wk,qk,Ye,{right:0,rowMenu:1,rowMenuItems:29,menuItemsVisible:30,canScroll:2},null,[-1,-1])}}function Gk(t){let e;return{c(){e=v("i"),m(e,"class","ph ph-minus svelte-ba31wf")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Yk(t){let e;return{c(){e=v("i"),m(e,"class","ph ph-check svelte-ba31wf")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Kk(t){let e,n,i;function l(u,s){if(u[0])return Yk;if(u[1])return Gk}let r=l(t),o=r&&r(t);return{c(){e=v("button"),o&&o.c(),m(e,"class","svelte-ba31wf"),p(e,"checked",t[0])},m(u,s){A(u,e,s),o&&o.m(e,null),n||(i=B(e,"click",t[2]),n=!0)},p(u,[s]){r!==(r=l(u))&&(o&&o.d(1),o=r&&r(u),o&&(o.c(),o.m(e,null))),s&1&&p(e,"checked",u[0])},i:ue,o:ue,d(u){u&&C(e),o&&o.d(),n=!1,i()}}}function Xk(t,e,n){const i=le.createEventDispatcher();let{checked:l=!1}=e,{partial:r=!1}=e,{disabled:o=!1}=e;function u(){o||(n(0,l=!l),i("change",{checked:l}))}return t.$$set=s=>{"checked"in s&&n(0,l=s.checked),"partial"in s&&n(1,r=s.partial),"disabled"in s&&n(3,o=s.disabled)},[l,r,u,o]}class Wd extends Ze{constructor(e){super(),Qe(this,e,Xk,Kk,Ye,{checked:0,partial:1,disabled:3})}}function Gd(t,e,n){var r;const i=t.slice();i[34]=e[n];const l=(r=i[14][i[34]])==null?void 0:r.selected;return i[35]=l,i}function Yd(t){var d;let e,n,i,l=[],r=new Map,o,u,s,a=((d=t[6])==null?void 0:d.showHeader)&&Kd(t),f=Ce(t[5]);const c=_=>_[34];for(let _=0;_<f.length;_+=1){let b=Gd(t,f,_),w=c(b);r.set(w,l[_]=eh(w,b))}let g=t[17]=="Inserting"&&th(),h=t[6].showFooter&&nh();return{c(){e=v("div"),a&&a.c(),n=Q(),i=v("div");for(let _=0;_<l.length;_+=1)l[_].c();o=Q(),g&&g.c(),u=Q(),h&&h.c(),m(i,"class","super-column-body"),p(i,"zebra",t[10]),p(i,"quiet",t[9]),p(i,"sticky",t[0]),P(i,"margin-top","var(--super-column-top-offset)"),m(e,"class","super-column control-column"),p(e,"sticky",t[0])},m(_,b){A(_,e,b),a&&a.m(e,null),S(e,n),S(e,i);for(let w=0;w<l.length;w+=1)l[w]&&l[w].m(i,null);S(i,o),g&&g.m(i,null),S(e,u),h&&h.m(e,null),s=!0},p(_,b){var w;(w=_[6])!=null&&w.showHeader?a?(a.p(_,b),b[0]&64&&U(a,1)):(a=Kd(_),a.c(),U(a,1),a.m(e,n)):a&&(He(),Z(a,1,1,()=>{a=null}),ze()),b[0]&16892026&&(f=Ce(_[5]),He(),l=Tt(l,b,c,1,_,f,r,i,Di,eh,o,Gd),ze()),_[17]=="Inserting"?g||(g=th(),g.c(),g.m(i,null)):g&&(g.d(1),g=null),(!s||b[0]&1024)&&p(i,"zebra",_[10]),(!s||b[0]&512)&&p(i,"quiet",_[9]),(!s||b[0]&1)&&p(i,"sticky",_[0]),_[6].showFooter?h||(h=nh(),h.c(),h.m(e,null)):h&&(h.d(1),h=null),(!s||b[0]&1)&&p(e,"sticky",_[0])},i(_){if(!s){U(a);for(let b=0;b<f.length;b+=1)U(l[b]);s=!0}},o(_){Z(a);for(let b=0;b<l.length;b+=1)Z(l[b]);s=!1},d(_){_&&C(e),a&&a.d();for(let b=0;b<l.length;b+=1)l[b].d();g&&g.d(),h&&h.d()}}}function Kd(t){let e,n,i,l,r=t[4]&&Xd(),o=t[8]&&Qd(t),u=t[3]&&Zd(t);return{c(){e=v("div"),r&&r.c(),n=Q(),o&&o.c(),i=Q(),u&&u.c(),m(e,"class","control-column-header"),P(e,"gap","1rem")},m(s,a){A(s,e,a),r&&r.m(e,null),S(e,n),o&&o.m(e,null),S(e,i),u&&u.m(e,null),l=!0},p(s,a){s[4]?r||(r=Xd(),r.c(),r.m(e,n)):r&&(r.d(1),r=null),s[8]?o?(o.p(s,a),a[0]&256&&U(o,1)):(o=Qd(s),o.c(),U(o,1),o.m(e,i)):o&&(He(),Z(o,1,1,()=>{o=null}),ze()),s[3]?u?u.p(s,a):(u=Zd(s),u.c(),u.m(e,null)):u&&(u.d(1),u=null)},i(s){l||(U(o),l=!0)},o(s){Z(o),l=!1},d(s){s&&C(e),r&&r.d(),o&&o.d(),u&&u.d()}}}function Xd(t){let e;return{c(){e=v("span"),m(e,"class","row-number")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Qd(t){let e,n;return e=new Wd({props:{checked:t[12],partial:t[13]}}),e.$on("change",t[24].selectAllRows),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&4096&&(r.checked=i[12]),l[0]&8192&&(r.partial=i[13]),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Zd(t){let e;function n(r,o){return r[7].length?Zk:Qk}let i=n(t),l=i(t);return{c(){l.c(),e=Fe()},m(r,o){l.m(r,o),A(r,e,o)},p(r,o){i===(i=n(r))&&l?l.p(r,o):(l.d(1),l=i(r),l&&(l.c(),l.m(e.parentNode,e)))},d(r){r&&C(e),l.d(r)}}}function Qk(t){let e;return{c(){e=v("i"),m(e,"class","ri-delete-bin-line disabled svelte-1hh0zkn")},m(n,i){A(n,e,i)},p:ue,d(n){n&&C(e)}}}function Zk(t){let e,n,i;return{c(){e=v("i"),m(e,"class","ri-delete-bin-line delete svelte-1hh0zkn")},m(l,r){A(l,e,r),n||(i=B(e,"click",t[24].deleteSelectedRows),n=!0)},p:ue,d(l){l&&C(e),n=!1,i()}}}function Jd(t){let e,n=t[34]+1+"",i;return{c(){e=v("div"),i=Ee(n),m(e,"class","row-number")},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&32&&n!==(n=l[34]+1+"")&&Pe(i,n)},d(l){l&&C(e)}}}function xd(t){var l;let e,n;function i(){return t[30](t[34])}return e=new Wd({props:{checked:t[35],disabled:(l=t[14][t[34]])==null?void 0:l.disabled}}),e.$on("change",i),{c(){We(e.$$.fragment)},m(r,o){je(e,r,o),n=!0},p(r,o){var s;t=r;const u={};o[0]&16416&&(u.checked=t[35]),o[0]&16416&&(u.disabled=(s=t[14][t[34]])==null?void 0:s.disabled),e.$set(u)},i(r){n||(U(e.$$.fragment,r),n=!0)},o(r){Z(e.$$.fragment,r),n=!1},d(r){qe(e,r)}}}function $d(t){let e,n,i;function l(...r){return t[31](t[34],...r)}return{c(){e=v("i"),m(e,"class","ri-delete-bin-line delete svelte-1hh0zkn"),p(e,"selected",t[35])},m(r,o){A(r,e,o),n||(i=B(e,"click",l),n=!0)},p(r,o){t=r,o[0]&16416&&p(e,"selected",t[35])},d(r){r&&C(e),n=!1,i()}}}function eh(t,e){let n,i,l,r,o,u,s=e[4]&&Jd(e),a=e[6].features.canSelect&&!e[1]&&xd(e),f=e[3]&&$d(e);function c(){return e[32](e[34])}return{key:t,first:null,c(){var g,h;n=v("div"),s&&s.c(),i=Q(),a&&a.c(),l=Q(),f&&f.c(),m(n,"class","super-row selection svelte-1hh0zkn"),p(n,"is-selected",e[35]),p(n,"is-hovered",e[15]==e[34]||e[16]==e[34]),p(n,"is-disabled",(g=e[14][e[34]])==null?void 0:g.disabled),P(n,"min-height",(h=e[14][e[34]])==null?void 0:h.height),this.first=n},m(g,h){A(g,n,h),s&&s.m(n,null),S(n,i),a&&a.m(n,null),S(n,l),f&&f.m(n,null),r=!0,o||(u=[B(n,"mouseenter",c),B(n,"mouseleave",e[33])],o=!0)},p(g,h){var d,_;e=g,e[4]?s?s.p(e,h):(s=Jd(e),s.c(),s.m(n,i)):s&&(s.d(1),s=null),e[6].features.canSelect&&!e[1]?a?(a.p(e,h),h[0]&66&&U(a,1)):(a=xd(e),a.c(),U(a,1),a.m(n,l)):a&&(He(),Z(a,1,1,()=>{a=null}),ze()),e[3]?f?f.p(e,h):(f=$d(e),f.c(),f.m(n,null)):f&&(f.d(1),f=null),(!r||h[0]&16416)&&p(n,"is-selected",e[35]),(!r||h[0]&98336)&&p(n,"is-hovered",e[15]==e[34]||e[16]==e[34]),(!r||h[0]&16416)&&p(n,"is-disabled",(d=e[14][e[34]])==null?void 0:d.disabled),h[0]&16416&&P(n,"min-height",(_=e[14][e[34]])==null?void 0:_.height)},i(g){r||(U(a),r=!0)},o(g){Z(a),r=!1},d(g){g&&C(n),s&&s.d(),a&&a.d(),f&&f.d(),o=!1,Ve(u)}}}function th(t){let e;return{c(){e=v("div"),m(e,"class","add-row"),P(e,"padding","unset")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function nh(t){let e;return{c(){e=v("div"),m(e,"class","super-column-footer"),P(e,"padding","unset")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function Jk(t){let e,n,i=t[11]&&Yd(t);return{c(){i&&i.c(),e=Fe()},m(l,r){i&&i.m(l,r),A(l,e,r),n=!0},p(l,r){l[11]?i?(i.p(l,r),r[0]&2048&&U(i,1)):(i=Yd(l),i.c(),U(i,1),i.m(e.parentNode,e)):i&&(He(),Z(i,1,1,()=>{i=null}),ze())},i(l){n||(U(i),n=!0)},o(l){Z(i),n=!1},d(l){l&&C(e),i&&i.d(l)}}}function xk(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b=ue,w=()=>(b(),b=ft(J,X=>n(29,_=X)),J),E,k,I,O,D;t.$$.on_destroy.push(()=>b());const N=le.getContext("stbState");Me(t,N,X=>n(17,D=X));const M=le.getContext("stbSettings");Me(t,M,X=>n(6,h=X));const V=le.getContext("stbHorizontalScrollPos");Me(t,V,X=>n(28,d=X));const W=le.getContext("stbHovered");Me(t,W,X=>n(15,I=X));const ne=le.getContext("stbMenuID");Me(t,ne,X=>n(16,O=X));const H=le.getContext("stbSelected");Me(t,H,X=>n(7,E=X));const $=le.getContext("stbAPI"),Y=le.getContext("stbVisibleRows");Me(t,Y,X=>n(5,g=X));const G=le.getContext("stbRowMetadata");Me(t,G,X=>n(14,k=X));let{sticky:oe}=e,{hideSelectionColumn:ie}=e,{stbData:J}=e;w();const q=X=>$.selectRow(X),j=(X,F)=>$.deleteRow(X),K=X=>Re(W,I=X,I),x=()=>Re(W,I=null,I);return t.$$set=X=>{"sticky"in X&&n(0,oe=X.sticky),"hideSelectionColumn"in X&&n(1,ie=X.hideSelectionColumn),"stbData"in X&&w(n(2,J=X.stbData))},t.$$.update=()=>{var X,F,R;t.$$.dirty[0]&536871040&&n(13,i=E.length&&E.length!=((X=_==null?void 0:_.rows)==null?void 0:X.length)),t.$$.dirty[0]&536871040&&n(12,l=E.length==((F=_==null?void 0:_.rows)==null?void 0:F.length)&&((R=_==null?void 0:_.rows)==null?void 0:R.length)>0),t.$$.dirty[0]&64&&n(4,r=h.appearance.numberingColumn),t.$$.dirty[0]&66&&n(27,o=h.features.canSelect&&!ie),t.$$.dirty[0]&64&&n(3,u=h.features.canDelete),t.$$.dirty[0]&268435456&&n(0,oe=d>0),t.$$.dirty[0]&134217752&&n(11,s=r||o||u),t.$$.dirty[0]&64&&n(10,a=h.appearance.zebraColors),t.$$.dirty[0]&64&&n(9,f=h.appearance.quiet),t.$$.dirty[0]&134217824&&n(8,c=o&&h.features.maxSelected!=1&&g.length>0)},[oe,ie,J,u,r,g,h,E,c,f,a,s,l,i,k,I,O,D,N,M,V,W,ne,H,$,Y,G,o,d,_,q,j,K,x]}class $k extends Ze{constructor(e){super(),Qe(this,e,xk,Jk,Ye,{sticky:0,hideSelectionColumn:1,stbData:2},null,[-1,-1])}}function ih(t,e,n){const i=t.slice();return i[12]=e[n].text,i[13]=e[n].icon,i[14]=e[n].disabled,i[15]=e[n].onClick,i[16]=e[n].size,i[17]=e[n].type,i[18]=e[n].conditions,i}function lh(t){let e,n;return e=new wn({props:{open:!0,anchor:t[1],align:t[0]?"right":"left",ignoreAnchor:!1,$$slots:{default:[e2]},$$scope:{ctx:t}}}),e.$on("close",t[11]),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l&2&&(r.anchor=i[1]),l&1&&(r.align=i[0]?"right":"left"),l&2097173&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function rh(t){let e,n;function i(){return t[10](t[15])}return e=new el({props:{size:t[16],type:t[17],icon:t[13],text:t[12],disabled:t[14],quiet:!0,menuItem:!0,menuAlign:t[0]?"right":"left",onClick:i}}),{c(){We(e.$$.fragment)},m(l,r){je(e,l,r),n=!0},p(l,r){t=l;const o={};r&4&&(o.size=t[16]),r&4&&(o.type=t[17]),r&4&&(o.icon=t[13]),r&4&&(o.text=t[12]),r&4&&(o.disabled=t[14]),r&1&&(o.menuAlign=t[0]?"right":"left"),r&20&&(o.onClick=i),e.$set(o)},i(l){n||(U(e.$$.fragment,l),n=!0)},o(l){Z(e.$$.fragment,l),n=!1},d(l){qe(e,l)}}}function e2(t){let e,n,i=Ce(t[2]),l=[];for(let o=0;o<i.length;o+=1)l[o]=rh(ih(t,i,o));const r=o=>Z(l[o],1,1,()=>{l[o]=null});return{c(){e=v("div");for(let o=0;o<l.length;o+=1)l[o].c();m(e,"class","action-menu svelte-6lzro5")},m(o,u){A(o,e,u);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null);n=!0},p(o,u){if(u&53){i=Ce(o[2]);let s;for(s=0;s<i.length;s+=1){const a=ih(o,i,s);l[s]?(l[s].p(a,u),U(l[s],1)):(l[s]=rh(a),l[s].c(),U(l[s],1),l[s].m(e,null))}for(He(),s=i.length;s<l.length;s+=1)r(s);ze()}},i(o){if(!n){for(let u=0;u<i.length;u+=1)U(l[u]);n=!0}},o(o){l=l.filter(Boolean);for(let u=0;u<l.length;u+=1)Z(l[u]);n=!1},d(o){o&&C(e),St(l,o)}}}function t2(t){var l;let e,n,i=t[3]&&((l=t[2])==null?void 0:l.length)&&lh(t);return{c(){i&&i.c(),e=Fe()},m(r,o){i&&i.m(r,o),A(r,e,o),n=!0},p(r,[o]){var u;r[3]&&((u=r[2])!=null&&u.length)?i?(i.p(r,o),o&12&&U(i,1)):(i=lh(r),i.c(),U(i,1),i.m(e.parentNode,e)):i&&(He(),Z(i,1,1,()=>{i=null}),ze())},i(r){n||(U(i),n=!0)},o(r){Z(i),n=!1},d(r){r&&C(e),i&&i.d(r)}}}function n2(t,e,n){let i,l,r,o;const u=le.getContext("stbAPI"),s=le.getContext("stbMenuID");Me(t,s,_=>n(4,o=_));const a=le.getContext("stbMenuAnchor");Me(t,a,_=>n(1,r=_));let{rowContextMenuItems:f}=e,{right:c=!0}=e,{row:g}=e;const h=_=>{u.executeRowContextMenuAction(o,_)},d=()=>{Re(s,o=-1,o),Re(a,r=-1,r)};return t.$$set=_=>{"rowContextMenuItems"in _&&n(8,f=_.rowContextMenuItems),"right"in _&&n(0,c=_.right),"row"in _&&n(9,g=_.row)},t.$$.update=()=>{t.$$.dirty&2&&n(3,i=r!=-1),t.$$.dirty&768&&n(2,l=f==null?void 0:f.filter(({conditions:_})=>u.shouldShowButton(_||[],u.enrichContext(g))))},[c,r,l,i,o,u,s,a,f,g,h,d]}class i2 extends Ze{constructor(e){super(),Qe(this,e,n2,t2,Ye,{rowContextMenuItems:8,right:0,row:9})}}function l2(t){let e,n;const i=t[1].default,l=Ut(i,t,t[0],null);return{c(){e=v("div"),l&&l.c(),m(e,"class","st-control-columns")},m(r,o){A(r,e,o),l&&l.m(e,null),n=!0},p(r,[o]){l&&l.p&&(!n||o&1)&&zt(l,i,r,r[0],n?Ht(i,r[0],o,null):jt(r[0]),null)},i(r){n||(U(l,r),n=!0)},o(r){Z(l,r),n=!1},d(r){r&&C(e),l&&l.d(r)}}}function r2(t,e,n){let{$$slots:i={},$$scope:l}=e;return t.$$set=r=>{"$$scope"in r&&n(0,l=r.$$scope)},[l,i]}class oh extends Ze{constructor(e){super(),Qe(this,e,r2,l2,Ye,{})}}function sh(t,e,n){const i=t.slice();return i[13]=e[n],i[15]=n,i}function uh(t){let e;const n=t[11].default,i=Ut(n,t,t[10],null);return{c(){i&&i.c()},m(l,r){i&&i.m(l,r),e=!0},p(l,r){i&&i.p&&(!e||r&1024)&&zt(i,n,l,l[10],e?Ht(n,l[10],r,null):jt(l[10]),null)},i(l){e||(U(i,l),e=!0)},o(l){Z(i,l),e=!1},d(l){i&&i.d(l)}}}function o2(t){let e=[],n=new Map,i,l,r=Ce(t[8]);const o=u=>u[15];for(let u=0;u<r.length;u+=1){let s=sh(t,r,u),a=o(s);n.set(a,e[u]=ah(a,s))}return{c(){for(let u=0;u<e.length;u+=1)e[u].c();i=Fe()},m(u,s){for(let a=0;a<e.length;a+=1)e[a]&&e[a].m(u,s);A(u,i,s),l=!0},p(u,s){s&880&&(r=Ce(u[8]),He(),e=Tt(e,s,o,1,u,r,n,i.parentNode,Di,ah,i,sh),ze())},i(u){if(!l){for(let s=0;s<r.length;s+=1)U(e[s]);l=!0}},o(u){for(let s=0;s<e.length;s+=1)Z(e[s]);l=!1},d(u){u&&C(i);for(let s=0;s<e.length;s+=1)e[s].d(u)}}}function s2(t){let e;return{c(){e=v("div"),e.textContent="No columns defined. Please add columns to the Super Table.",m(e,"class","no-columns-placeholder")},m(n,i){A(n,e,i)},p:ue,i:ue,o:ue,d(n){n&&C(e)}}}function ah(t,e){let n,i,l;return i=new is({props:{stbData:e[6],columnOptions:{...e[9],...e[13],isFirst:e[15]==0,isLast:e[15]==e[8].length-1&&!e[4]&&e[5]}}}),{key:t,first:null,c(){n=Fe(),We(i.$$.fragment),this.first=n},m(r,o){A(r,n,o),je(i,r,o),l=!0},p(r,o){e=r;const u={};o&64&&(u.stbData=e[6]),o&816&&(u.columnOptions={...e[9],...e[13],isFirst:e[15]==0,isLast:e[15]==e[8].length-1&&!e[4]&&e[5]}),i.$set(u)},i(r){l||(U(i.$$.fragment,r),l=!0)},o(r){Z(i.$$.fragment,r),l=!1},d(r){r&&C(n),qe(i,r)}}}function fh(t){let e;const n=t[11].default,i=Ut(n,t,t[10],null);return{c(){i&&i.c()},m(l,r){i&&i.m(l,r),e=!0},p(l,r){i&&i.p&&(!e||r&1024)&&zt(i,n,l,l[10],e?Ht(n,l[10],r,null):jt(l[10]),null)},i(l){e||(U(i,l),e=!0)},o(l){Z(i,l),e=!1},d(l){i&&i.d(l)}}}function u2(t){let e,n,i,l,r,o,u=t[7].superColumnsPos=="first"&&uh(t);const s=[s2,o2],a=[];function f(g,h){return g[8].length===0?0:1}i=f(t),l=a[i]=s[i](t);let c=t[7].superColumnsPos=="last"&&fh(t);return{c(){e=v("div"),u&&u.c(),n=Q(),l.c(),r=Q(),c&&c.c(),m(e,"class","st-master-columns"),m(e,"tabindex","-1")},m(g,h){A(g,e,h),u&&u.m(e,null),S(e,n),a[i].m(e,null),S(e,r),c&&c.m(e,null),t[12](e),o=!0},p(g,[h]){g[7].superColumnsPos=="first"?u?(u.p(g,h),h&128&&U(u,1)):(u=uh(g),u.c(),U(u,1),u.m(e,n)):u&&(He(),Z(u,1,1,()=>{u=null}),ze());let d=i;i=f(g),i===d?a[i].p(g,h):(He(),Z(a[d],1,1,()=>{a[d]=null}),ze(),l=a[i],l?l.p(g,h):(l=a[i]=s[i](g),l.c()),U(l,1),l.m(e,r)),g[7].superColumnsPos=="last"?c?(c.p(g,h),h&128&&U(c,1)):(c=fh(g),c.c(),U(c,1),c.m(e,null)):c&&(He(),Z(c,1,1,()=>{c=null}),ze())},i(g){o||(U(u),U(l),U(c),o=!0)},o(g){Z(u),Z(l),Z(c),o=!1},d(g){g&&C(e),u&&u.d(),a[i].d(),c&&c.d(),t[12](null)}}}function a2(t,e,n){let i,l=ue,r=()=>(l(),l=ft(b,D=>n(7,i=D)),b),o,u=ue,s=()=>(u(),u=ft(d,D=>n(8,o=D)),d),a,f=ue,c=()=>(f(),f=ft(_,D=>n(9,a=D)),_);t.$$.on_destroy.push(()=>l()),t.$$.on_destroy.push(()=>u()),t.$$.on_destroy.push(()=>f());let{$$slots:g={},$$scope:h}=e,{superColumns:d}=e;s();let{commonColumnOptions:_}=e;c();let{stbSettings:b}=e;r();let{columnsViewport:w}=e,{showActionColumn:E}=e,{canScroll:k}=e,{stbData:I}=e;function O(D){Be[D?"unshift":"push"](()=>{w=D,n(0,w)})}return t.$$set=D=>{"superColumns"in D&&s(n(1,d=D.superColumns)),"commonColumnOptions"in D&&c(n(2,_=D.commonColumnOptions)),"stbSettings"in D&&r(n(3,b=D.stbSettings)),"columnsViewport"in D&&n(0,w=D.columnsViewport),"showActionColumn"in D&&n(4,E=D.showActionColumn),"canScroll"in D&&n(5,k=D.canScroll),"stbData"in D&&n(6,I=D.stbData),"$$scope"in D&&n(10,h=D.$$scope)},[w,d,_,b,E,k,I,i,o,a,h,g,O]}class f2 extends Ze{constructor(e){super(),Qe(this,e,a2,u2,Ye,{superColumns:1,commonColumnOptions:2,stbSettings:3,columnsViewport:0,showActionColumn:4,canScroll:5,stbData:6})}}function ch(t){var W,ne;let e,n,i,l,r,o,u,s,a,f,c,g,h,d,_,b,w=t[0]+(((ne=(W=t[3])==null?void 0:W.rows)==null?void 0:ne.length)||0)+"",E,k,I,O,D,N,M,V;return{c(){e=v("div"),n=v("div"),i=v("button"),l=v("i"),o=Q(),u=v("button"),s=v("i"),f=Q(),c=v("span"),g=Ee("Page "),h=Ee(t[5]),d=Ee(`
|
|
18
|
-
( `),_=Ee(t[0]),b=Ee(" - "),E=Ee(w),k=Ee(" )"),I=Q(),O=v("button"),D=v("i"),m(l,"class","ph ph-caret-double-left"),m(i,"class","pagination-btn svelte-133l4q0"),i.disabled=r=t[5]<=1,m(i,"title","First Page"),m(s,"class","ph ph-caret-left"),m(u,"class","pagination-btn svelte-133l4q0"),u.disabled=a=t[5]<=1,m(u,"title","Previous Page"),m(c,"class","pagination-info svelte-133l4q0"),m(D,"class","ph ph-caret-right"),m(O,"class","pagination-btn svelte-133l4q0"),O.disabled=N=!t[4],m(O,"title","Next Page"),m(n,"class","pagination-controls svelte-133l4q0"),m(e,"class","pagination-limit-offset svelte-133l4q0")},m(H,$){A(H,e,$),S(e,n),S(n,i),S(i,l),S(n,o),S(n,u),S(u,s),S(n,f),S(n,c),S(c,g),S(c,h),S(c,d),S(c,_),S(c,b),S(c,E),S(c,k),S(n,I),S(n,O),S(O,D),M||(V=[B(i,"click",t[9]),B(u,"click",t[7]),B(O,"click",t[8])],M=!0)},p(H,$){var Y,G;$&32&&r!==(r=H[5]<=1)&&(i.disabled=r),$&32&&a!==(a=H[5]<=1)&&(u.disabled=a),$&32&&Pe(h,H[5]),$&1&&Pe(_,H[0]),$&9&&w!==(w=H[0]+(((G=(Y=H[3])==null?void 0:Y.rows)==null?void 0:G.length)||0)+"")&&Pe(E,w),$&16&&N!==(N=!H[4])&&(O.disabled=N)},d(H){H&&C(e),M=!1,Ve(V)}}}function c2(t){let e,n=t[6]&&ch(t);return{c(){n&&n.c(),e=Fe()},m(i,l){n&&n.m(i,l),A(i,e,l)},p(i,[l]){i[6]?n?n.p(i,l):(n=ch(i),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:ue,o:ue,d(i){i&&C(e),n&&n.d(i)}}}function d2(t,e,n){let i,l,r,o,u=ue,s=()=>(u(),u=ft(_,D=>n(12,o=D)),_),a,f=ue,c=()=>(f(),f=ft(b,D=>n(3,a=D)),b);t.$$.on_destroy.push(()=>u()),t.$$.on_destroy.push(()=>f()),le.createEventDispatcher();let{limit:g=50}=e,{pagination:h="none"}=e,{currentOffset:d=0}=e,{dataSource:_=null}=e;s();let{fetch:b=null}=e;c();function w(){d>0&&(n(0,d=Math.max(0,d-g)),I())}function E(){r&&(n(0,d+=g),I())}function k(){n(0,d=0),I()}function I(){_&&Re(_,o={...o,queryParams:{...o.queryParams,offset:d}},o)}const O=D=>{if(!D||!D.parameters)return!1;const N=D.parameters.map(M=>M.name.toLowerCase());return N.includes("offset")&&N.includes("limit")};return t.$$set=D=>{"limit"in D&&n(10,g=D.limit),"pagination"in D&&n(11,h=D.pagination),"currentOffset"in D&&n(0,d=D.currentOffset),"dataSource"in D&&s(n(1,_=D.dataSource)),"fetch"in D&&c(n(2,b=D.fetch))},t.$$.update=()=>{var D;t.$$.dirty&6144&&n(6,i=O(o)&&h==="limitOffset"),t.$$.dirty&1025&&n(5,l=Math.floor(d/g)+1),t.$$.dirty&1032&&n(4,r=((D=a==null?void 0:a.rows)==null?void 0:D.length)>=g)},[d,_,b,a,r,l,i,w,E,k,g,h,o]}class h2 extends Ze{constructor(e){super(),Qe(this,e,d2,c2,Ye,{limit:10,pagination:11,currentOffset:0,dataSource:1,fetch:2})}}function dh(t){let e,n;return e=new qd({props:{rowMenuItems:t[4],menuItemsVisible:t[5],rowMenu:t[3]}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&16&&(r.rowMenuItems=i[4]),l[0]&32&&(r.menuItemsVisible=i[5]),l[0]&8&&(r.rowMenu=i[3]),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function hh(t){var i;let e,n;return e=new is({props:{stbData:t[15],sticky:!0,scrollPos:t[36],columnOptions:{...t[43][0],...t[44],overflow:t[26],isFirst:!0,isLast:((i=t[43])==null?void 0:i.length)==1&&!t[30]&&t[21]}}}),{c(){We(e.$$.fragment)},m(l,r){je(e,l,r),n=!0},p(l,r){var u;const o={};r[0]&32768&&(o.stbData=l[15]),r[1]&32&&(o.scrollPos=l[36]),r[0]&1142947840|r[1]&12288&&(o.columnOptions={...l[43][0],...l[44],overflow:l[26],isFirst:!0,isLast:((u=l[43])==null?void 0:u.length)==1&&!l[30]&&l[21]}),e.$set(o)},i(l){n||(U(e.$$.fragment,l),n=!0)},o(l){Z(e.$$.fragment,l),n=!1},d(l){qe(e,l)}}}function g2(t){let e,n,i,l,r;e=new $k({props:{stbData:t[15],hideSelectionColumn:t[7]}});let o=t[29]&&dh(t),u=t[8]&&t[43].length>1&&hh(t);return{c(){We(e.$$.fragment),n=Q(),o&&o.c(),i=Q(),u&&u.c(),l=Fe()},m(s,a){je(e,s,a),A(s,n,a),o&&o.m(s,a),A(s,i,a),u&&u.m(s,a),A(s,l,a),r=!0},p(s,a){const f={};a[0]&32768&&(f.stbData=s[15]),a[0]&128&&(f.hideSelectionColumn=s[7]),e.$set(f),s[29]?o?(o.p(s,a),a[0]&536870912&&U(o,1)):(o=dh(s),o.c(),U(o,1),o.m(i.parentNode,i)):o&&(He(),Z(o,1,1,()=>{o=null}),ze()),s[8]&&s[43].length>1?u?(u.p(s,a),a[0]&256|a[1]&4096&&U(u,1)):(u=hh(s),u.c(),U(u,1),u.m(l.parentNode,l)):u&&(He(),Z(u,1,1,()=>{u=null}),ze())},i(s){r||(U(e.$$.fragment,s),U(o),U(u),r=!0)},o(s){Z(e.$$.fragment,s),Z(o),Z(u),r=!1},d(s){s&&(C(n),C(i),C(l)),qe(e,s),o&&o.d(s),u&&u.d(s)}}}function gh(t){let e;const n=t[147].default,i=Ut(n,t,t[157],null);return{c(){i&&i.c()},m(l,r){i&&i.m(l,r),e=!0},p(l,r){i&&i.p&&(!e||r[5]&4)&&zt(i,n,l,l[157],e?Ht(n,l[157],r,null):jt(l[157]),null)},i(l){e||(U(i,l),e=!0)},o(l){Z(i,l),e=!1},d(l){i&&i.d(l)}}}function m2(t){let e=t[10],n,i,l=gh(t);return{c(){l.c(),n=Fe()},m(r,o){l.m(r,o),A(r,n,o),i=!0},p(r,o){o[0]&1024&&Ye(e,e=r[10])?(He(),Z(l,1,1,ue),ze(),l=gh(r),l.c(),U(l,1),l.m(n.parentNode,n)):l.p(r,o)},i(r){i||(U(l),i=!0)},o(r){Z(l),i=!1},d(r){r&&C(n),l.d(r)}}}function mh(t){let e,n;return e=new oh({props:{$$slots:{default:[_2]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&2097208|l[5]&4&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function _2(t){let e,n;return e=new qd({props:{rowMenuItems:t[4],menuItemsVisible:t[5],rowMenu:t[3],canScroll:t[21],right:!0}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&16&&(r.rowMenuItems=i[4]),l[0]&32&&(r.menuItemsVisible=i[5]),l[0]&8&&(r.rowMenu=i[3]),l[0]&2097152&&(r.canScroll=i[21]),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function _h(t){let e,n;return e=new Cb({props:{stbState:t[69],tableAPI:t[68],highlighted:t[19],tableActions:t[1],footer:t[39].showFooter}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&524288&&(r.highlighted=i[19]),l[0]&2&&(r.tableActions=i[1]),l[1]&256&&(r.footer=i[39].showFooter),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function ph(t){let e,n;return e=new Ib({props:{stbSettings:t[54],selectedActions:t[9],stbSelected:t[64],tableAPI:t[68],stbState:t[69],highlighted:t[19],entitySingular:t[12],entityPlural:t[13]}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&512&&(r.selectedActions=i[9]),l[0]&524288&&(r.highlighted=i[19]),l[0]&4096&&(r.entitySingular=i[12]),l[0]&8192&&(r.entityPlural=i[13]),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function bh(t){let e,n;return e=new Ob({}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function p2(t){var J,q,j,K;let e,n,i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E,k,I,O,D,N,M,V;i=new t[45]({props:{actions:t[32],data:t[31]}}),r=new oh({props:{$$slots:{default:[g2]},$$scope:{ctx:t}}});function W(x){t[148](x)}let ne={stbData:t[15],stbSettings:t[54],superColumns:t[34],commonColumnOptions:t[70],canScroll:t[21],$$slots:{default:[m2]},$$scope:{ctx:t}};t[25]!==void 0&&(ne.columnsViewport=t[25]),u=new f2({props:ne}),Be.push(()=>Gt(u,"columnsViewport",W));let H=t[30]&&!t[27]&&mh(t);function $(x){t[149](x)}let Y={anchor:t[25],clientHeight:t[23],scrollHeight:t[20],highlighted:t[19],isEmpty:t[27]};t[22]!==void 0&&(Y.horizontalVisible=t[22]),c=new pb({props:Y}),Be.push(()=>Gt(c,"horizontalVisible",$)),c.$on("positionChange",t[69].calculateRowBoundaries),d=new kb({props:{isEmpty:t[27],message:t[39].data.emptyMessage,top:(J=t[43])!=null&&J.length?t[39].appearance.headerHeight+16:16,bottom:t[22]?24:16}}),b=new i2({props:{rowContextMenuItems:t[6],row:(j=(q=t[17])==null?void 0:q.rows)==null?void 0:j[t[40]]}});let G=(t[39].features.canInsert||t[38]=="Filtered")&&_h(t),oe=t[39].features.canSelect&&((K=t[9])==null?void 0:K.length)&&ph(t),ie=t[17].loading&&t[17].loaded&&bh();return D=new h2({props:{pagination:t[18],limit:t[0],dataSource:t[49],fetch:t[15]}}),{c(){e=v("div"),n=v("div"),We(i.$$.fragment),l=Q(),We(r.$$.fragment),o=Q(),We(u.$$.fragment),a=Q(),H&&H.c(),f=Q(),We(c.$$.fragment),h=Q(),We(d.$$.fragment),_=Q(),We(b.$$.fragment),w=Q(),G&&G.c(),E=Q(),oe&&oe.c(),k=Q(),ie&&ie.c(),O=Q(),We(D.$$.fragment),m(n,"class","super-table"),ni(()=>t[151].call(n)),p(n,"quiet",t[11]),p(n,"initializing",t[28]),P(n,"font-size",Gn[t[2]].rowFontSize),P(n,"--super-table-devider-color",t[41].color),P(n,"--super-table-body-height",t[23]),P(n,"--super-table-header-height",t[41].headerHeight),P(n,"--super-table-footer-height",t[41].footerHeight),P(n,"--super-table-horizontal-dividers",t[41].horizontal),P(n,"--super-table-vertical-dividers",t[41].vertical),P(n,"--super-table-cell-padding",Gn[t[2]].cellPadding),P(n,"--super-column-top-offset",t[37]*-1),m(e,"class","wrapper svelte-1upmu2i")},m(x,X){A(x,e,X),S(e,n),je(i,n,null),S(n,l),je(r,n,null),S(n,o),je(u,n,null),S(n,a),H&&H.m(n,null),S(n,f),je(c,n,null),S(n,h),je(d,n,null),S(n,_),je(b,n,null),S(n,w),G&&G.m(n,null),S(n,E),oe&&oe.m(n,null),S(n,k),ie&&ie.m(n,null),t[150](n),I=fo(n,t[151].bind(n)),S(e,O),je(D,e,null),N=!0,M||(V=[B(n,"mouseenter",t[152]),B(n,"mouseleave",t[153]),B(n,"keydown",t[69].handleKeyboard),B(n,"wheel",t[69].handleWheel),B(n,"touchstart",t[154]),B(n,"touchmove",t[155]),B(n,"touchend",t[156])],M=!0)},p(x,X){var Ie,ve,fe,Ne;const F={};X[1]&2&&(F.actions=x[32]),X[1]&1&&(F.data=x[31]),i.$set(F);const R={};X[0]&1679851960|X[1]&12320|X[5]&4&&(R.$$scope={dirty:X,ctx:x}),r.$set(R);const z={};X[0]&32768&&(z.stbData=x[15]),X[1]&8&&(z.superColumns=x[34]),X[0]&2097152&&(z.canScroll=x[21]),X[0]&1024|X[5]&4&&(z.$$scope={dirty:X,ctx:x}),!s&&X[0]&33554432&&(s=!0,z.columnsViewport=x[25],Wt(()=>s=!1)),u.$set(z),x[30]&&!x[27]?H?(H.p(x,X),X[0]&1207959552&&U(H,1)):(H=mh(x),H.c(),U(H,1),H.m(n,f)):H&&(He(),Z(H,1,1,()=>{H=null}),ze());const me={};X[0]&33554432&&(me.anchor=x[25]),X[0]&8388608&&(me.clientHeight=x[23]),X[0]&1048576&&(me.scrollHeight=x[20]),X[0]&524288&&(me.highlighted=x[19]),X[0]&134217728&&(me.isEmpty=x[27]),!g&&X[0]&4194304&&(g=!0,me.horizontalVisible=x[22],Wt(()=>g=!1)),c.$set(me);const se={};X[0]&134217728&&(se.isEmpty=x[27]),X[1]&256&&(se.message=x[39].data.emptyMessage),X[1]&4352&&(se.top=(Ie=x[43])!=null&&Ie.length?x[39].appearance.headerHeight+16:16),X[0]&4194304&&(se.bottom=x[22]?24:16),d.$set(se);const Oe={};X[0]&64&&(Oe.rowContextMenuItems=x[6]),X[0]&131072|X[1]&512&&(Oe.row=(fe=(ve=x[17])==null?void 0:ve.rows)==null?void 0:fe[x[40]]),b.$set(Oe),x[39].features.canInsert||x[38]=="Filtered"?G?(G.p(x,X),X[1]&384&&U(G,1)):(G=_h(x),G.c(),U(G,1),G.m(n,E)):G&&(He(),Z(G,1,1,()=>{G=null}),ze()),x[39].features.canSelect&&((Ne=x[9])!=null&&Ne.length)?oe?(oe.p(x,X),X[0]&512|X[1]&256&&U(oe,1)):(oe=ph(x),oe.c(),U(oe,1),oe.m(n,k)):oe&&(He(),Z(oe,1,1,()=>{oe=null}),ze()),x[17].loading&&x[17].loaded?ie?X[0]&131072&&U(ie,1):(ie=bh(),ie.c(),U(ie,1),ie.m(n,null)):ie&&(He(),Z(ie,1,1,()=>{ie=null}),ze()),(!N||X[0]&2048)&&p(n,"quiet",x[11]),(!N||X[0]&268435456)&&p(n,"initializing",x[28]),X[0]&4&&P(n,"font-size",Gn[x[2]].rowFontSize),X[1]&1024&&P(n,"--super-table-devider-color",x[41].color),X[0]&8388608&&P(n,"--super-table-body-height",x[23]),X[1]&1024&&P(n,"--super-table-header-height",x[41].headerHeight),X[1]&1024&&P(n,"--super-table-footer-height",x[41].footerHeight),X[1]&1024&&P(n,"--super-table-horizontal-dividers",x[41].horizontal),X[1]&1024&&P(n,"--super-table-vertical-dividers",x[41].vertical),X[0]&4&&P(n,"--super-table-cell-padding",Gn[x[2]].cellPadding),X[1]&64&&P(n,"--super-column-top-offset",x[37]*-1);const be={};X[0]&262144&&(be.pagination=x[18]),X[0]&1&&(be.limit=x[0]),X[0]&32768&&(be.fetch=x[15]),D.$set(be)},i(x){N||(U(i.$$.fragment,x),U(r.$$.fragment,x),U(u.$$.fragment,x),U(H),U(c.$$.fragment,x),U(d.$$.fragment,x),U(b.$$.fragment,x),U(G),U(oe),U(ie),U(D.$$.fragment,x),N=!0)},o(x){Z(i.$$.fragment,x),Z(r.$$.fragment,x),Z(u.$$.fragment,x),Z(H),Z(c.$$.fragment,x),Z(d.$$.fragment,x),Z(b.$$.fragment,x),Z(G),Z(oe),Z(ie),Z(D.$$.fragment,x),N=!1},d(x){x&&C(e),qe(i),qe(r),qe(u),H&&H.d(),qe(c),qe(d),qe(b),G&&G.d(),oe&&oe.d(),ie&&ie.d(),t[150](null),I(),qe(D),M=!1,Ve(V)}}}function wh(t){const e=Number(t);return isNaN(e)?null:e}function b2(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_=ue,b=()=>(_(),_=ft(y,T=>n(17,d=T)),y),w,E,k,I,O=ue,D=()=>(O(),O=ft(l,T=>n(139,I=T)),l),N,M,V=ue,W=()=>(V(),V=ft(s,T=>n(141,M=T)),s),ne,H,$,Y,G,oe,ie,J,q,j,K,x,X,F,R,z,me,se,Oe,be,Ie=ue,ve=()=>(Ie(),Ie=ft(u,T=>n(43,be=T)),u),fe;t.$$.on_destroy.push(()=>_()),t.$$.on_destroy.push(()=>O()),t.$$.on_destroy.push(()=>V()),t.$$.on_destroy.push(()=>Ie());let{$$slots:Ne={},$$scope:te}=e;const{API:ae,processStringSync:de,notificationStore:Xe,enrichButtonActions:Te,ActionTypes:Se,Provider:Le,fetchData:rt,QueryUtils:kt,memo:ke,derivedMemo:ce,builderStore:re}=le.getContext("sdk");Me(t,re,T=>n(146,me=T));const Ae=le.getContext("context");Me(t,Ae,T=>n(170,oe=T));const Ue=le.getContext("component");Me(t,Ue,T=>n(138,k=T));let{comp_id:Je}=e,{inBuilder:lt}=e,{dataSource:he}=e,{sortColumn:it}=e,{sortOrder:ot}=e,{limit:wt=50}=e,{autoRefreshRate:Ct}=e,{paginate:ln}=e,{filter:It}=e,{columnList:xt}=e,{tableActions:_e}=e,{showFooter:st}=e,{showHeader:we=!0}=e,{size:xe="M"}=e,{canInsert:pe,canDelete:_t,canEdit:Bt,canResize:Kn,canFilter:ui,canSelect:Mn}=e,{insertFieldsConfig:ai}=e,{superColumnsPos:Nn}=e,{showAutoColumns:fl}=e,{showSpecialColumns:cl}=e,{debounce:dl=750}=e,{rowMenu:_i}=e,{rowMenuItems:Tn}=e,{rowMenuIcon:Kt="ri-more-fill"}=e,{menuItemsVisible:Wl=0}=e,{rowContextMenuItems:pi}=e,{preselectedIds:hl}=e,{hideSelectionColumn:Fi}=e,{numberingColumn:gl}=e,{stickFirstColumn:rn=!1}=e,{maxSelected:Ln=0}=e,{selectedActions:Gl}=e,{beautifyLabels:Vi}=e,{columnSizing:Bi="flex"}=e,{columnMinWidth:Ui="7rem"}=e,{columnMaxWidth:on="auto"}=e,{columnFixedWidth:Hi="7rem"}=e,{dividers:ml="horizontal"}=e,{dividersColor:_l}=e,{rowColorTemplate:zi,rowBGColorTemplate:ji,rowDisabledTemplate:$n}=e,{rowHeight:fi}=e,{footerColorTemplate:ci,footerBGColorTemplate:In}=e,{useOptionColors:bi=!0}=e,{optionsViewMode:qi="colorText"}=e,{relViewMode:Wi="pills"}=e,{zebraColors:Gi=!1}=e,{quiet:Yi}=e,{highlighters:Ki}=e,{entitySingular:ei="Row"}=e,{entityPlural:Fn="Rows"}=e,{onRowSelect:Xn}=e,{onCellChange:Xi}=e,{onRowClick:wi}=e,{onCellClick:Qi}=e,{onLinkClick:pl}=e,{onInsert:Vn}=e,{afterInsert:Zi}=e,{onDelete:Bn}=e,{afterDelete:ki}=e,{afterEdit:bl}=e,{onRefresh:Un}=e;const yn=ke(he);Me(t,yn,T=>n(137,E=T));const Dn=ke(xt);Me(t,Dn,T=>n(135,h=T));const dn=ii([]);Me(t,dn,T=>n(174,F=T));const wl=ke(It);Me(t,wl,T=>n(144,$=T));let $t,En,di,yi=!1,Ei,Ji,Rt,vi,sn=[],Qn,Si,en,Ci,Pt,Ai=0,xi=0,Hn,hi,Zn=wt,kl=!1,$i,y=ii({rows:[],count:0,definition:{}});b();let L=!1,ee=0,ye=new Set,at={},et;const dt=ii({});Me(t,dt,T=>n(140,N=T));let pt;const At=ke({});Me(t,At,T=>n(39,X=T));const yt=ke({});Me(t,yt,T=>n(136,w=T));const Nt=ke(0);Me(t,Nt,T=>n(169,G=T));const Xt=ke(0);Me(t,Xt,T=>n(37,q=T));const Vt=ke(0);Me(t,Vt,T=>n(173,x=T));const Dt=ke(0);Me(t,Dt,T=>n(36,J=T));const Mt=ke(0);Me(t,Mt,T=>n(172,j=T));const On=ke([]);Me(t,On,T=>n(171,ie=T));const pn=ke(-1);Me(t,pn,T=>n(40,z=T));const Rn=ke(-1);Me(t,Rn,T=>n(175,R=T));const hn=ke([]);Me(t,hn,T=>n(145,Y=T));const yl=ke(Ln),Ti=ke(-1);Me(t,Ti,T=>n(42,Oe=T));const oS=ke(-1),oo=ke({});Me(t,oo,T=>n(143,H=T));const so=ke({});Me(t,so,T=>n(142,ne=T));const ym=["created_by","created_at","updated_by","updated_at","deleted_by","deleted_at"],sS=T=>(T.parameters&&(T={...T,queryParams:{...T.queryParams,limit:wt}}),rt({API:ae,datasource:T,options:{query:o,sortColumn:it,sortOrder:ot,limit:wt,paginate:!0}})),gt={unflattenObject:(T,ge=".")=>T?Object.keys(T).reduce((De,Ke)=>{const tt=Ke.split(ge);return tt.reduce((nt,$e,vt)=>{if(vt===tt.length-1)return nt[$e]=T[Ke],nt;const ht=tt[vt+1];return nt[$e]||(nt[$e]=isNaN(Number(ht))?{}:[]),nt[$e]},De),De},{}):{},populateColumns:(T,ge,De,Ke)=>{let tt=[],nt=[],$e=[],vt=[];return n(127,En=gt.detectPK(d)),T?(ge!=null&&ge.length?vt=ge.map(ht=>gt.enrichColumn(T,{...ht,field:ht.name})):(De&&(nt=Object.keys(T).filter(ht=>{var zn;return(zn=T[ht])==null?void 0:zn.autocolumn}).map(ht=>gt.enrichColumn(T,T[ht]))),Ke&&($e=Object.keys(T).filter(ht=>ym.includes(ht)).map(ht=>gt.enrichColumn(T,T[ht]))),tt=Object.keys(T).filter(ht=>T[ht].nestedJSON).map(ht=>gt.enrichColumn(T,T[ht])),vt=Object.keys(T).filter(ht=>{var zn;return!T[ht].autocolumn&&!ym.includes(ht)&&!T[ht].nestedJSON&&((zn=T[ht])==null?void 0:zn.visible)!=!1&&ht!=En}).map(ht=>gt.enrichColumn(T,T[ht]))),[...nt,...vt,...tt,...$e].sort((ht,zn)=>ht.order-zn.order)):[]},enrichColumn:(T,ge)=>{var $e,vt;let De,Ke,tt,nt=he==null?void 0:he.tableId;if(ge.name.includes(".")){let ht=ge.name.split("."),zn=($e=T[ht[0]])==null?void 0:$e.schema;zn&&zn[ht[1]]?(Ke=zn[ht[1]],De=Ke.type):(De="string",Ke={})}else Ke=T[ge.name],Ke?De=Ke.type:(De="string",Ke={}),ge.name.startsWith("fk_self_")&&(tt=!0,De="link",ge.displayName=ge.displayName||ge.name.replace("fk_self_","").replace("_id","").replace(/_/g," "),Ke={...Ke,tableId:nt,relationshipType:"self",recursiveTable:!0,primaryDisplay:(vt=d==null?void 0:d.definition)==null?void 0:vt.primaryDisplay,type:"link"});return{...ge,widthOverride:ge.width,readonly:Ke==null?void 0:Ke.readonly,canEdit:!lt&&nt&&gb[De]&&Bt&&!(Ke!=null&&Ke.readonly)&&!tt&&!ge.autocolumn,canFilter:db[De]?ui:!1,canSort:hb[De],filteringOperators:kt.getValidOperatorsForType({type:De}),defaultFilteringOperator:Tf[De],headerAlign:ge.align?ge.align:"flex-start",type:De,displayName:gt.beautifyLabel(ge.displayName??ge.name),schema:Ke}},enrichContext:T=>({...oe,[Je]:{...oe[Je],row:T}}),registerSuperColumn:(T,ge)=>{n(129,sn=[...sn,{id:T,state:ge}])},unregisterSuperColumn:T=>{let ge=sn.findIndex(De=>De.id==T);ge>-1&&(sn.splice(ge,1),n(129,sn))},shouldDisableButton:(T,ge)=>T?de(T,ge):!1,shouldShowButton:(T,ge)=>{function De($e,vt){switch(vt.toLowerCase()){case"number":return Number($e);case"string":return String($e);case"boolean":return $e==="true"||$e===!0;default:return $e}}function Ke($e,vt,ht){switch(vt.toLowerCase()){case"equal":case"equals":return $e==ht;case"not equal":case"not equals":return $e!=ht;case"greater than":return $e>ht;case"less than":return $e<ht;case"greater than or equal":return $e>=ht;case"less than or equal":return $e<=ht;case"contains":return typeof $e=="string"&&$e.includes(ht);case"not contains":return typeof $e=="string"&&!$e.includes(ht);case"starts with":return typeof $e=="string"&&$e.startsWith(ht);case"ends with":return typeof $e=="string"&&$e.endsWith(ht);case"is empty":return $e==null||$e==="";case"is not empty":return $e!=null&&$e!=="";default:return!1}}if(!T||T.length===0)return!0;let nt=!T.some($e=>$e.action.toLowerCase()==="show");for(const $e of T){const vt=de($e.referenceValue,ge),ht=de($e.newValue,ge),zn=De(vt,$e.type),pS=De(ht,$e.valueType);Ke(zn,$e.operator,pS)&&(nt=$e.action.toLowerCase()==="show")}return nt},executeRowButtonAction:async(T,ge)=>{let De=Te(ge,gt.enrichContext(d==null?void 0:d.rows[T]));await(De==null?void 0:De())},executeRowOnClickAction:async T=>{await gt.executeRowButtonAction(T,wi)},executeCellOnClickAction:async(T,ge,De,Ke)=>{let tt=Te(Qi,gt.enrichContext(d==null?void 0:d.rows[T]));await(tt==null?void 0:tt({column:ge,value:De,id:Ke}))},executeOnLinkClickAction:async(T,ge)=>{let De=Te(pl,{column:T,id:ge._id,primaryDisplay:ge.primaryDisplay});await(De==null?void 0:De({column:T,id:ge._id,primaryDisplay:ge.primaryDisplay}))},executeRowOnSelectAction:async T=>{await le.tick();let ge=Te(Xn,gt.enrichContext(d==null?void 0:d.rows[T]));await(ge==null?void 0:ge())},showContextMenu:(T,ge)=>{pi!=null&&pi.length&&z!=T?(Re(pn,z=T,z),Re(Rn,R=ge,R)):(Re(pn,z=-1,z),Re(Rn,R=-1,R))},executeRowContextMenuAction:async(T,ge)=>{await gt.executeRowButtonAction(T,ge),Re(pn,z=-1,z),Re(Rn,R=-1,R)},executeSelectedRowsAction:async T=>{gt.executeRowButtonAction(null,T)},selectRow:T=>{let ge=gt.getRowId(d==null?void 0:d.rows[T],T);F[T].disabled,Ln!=1?Y.includes(ge)?(Y.splice(Y.indexOf(ge),1),hn.set(Y)):Ln==0||Y.length<Ln?Re(hn,Y=[...Y,ge],Y):Xe.actions.warning("Cannot select more than "+Ln+" "+(Fn||"Rows")):Y.includes(ge)?Re(hn,Y=[],Y):Re(hn,Y=[ge],Y),Y.length&>.executeRowOnSelectAction(T)},selectAllRows:()=>{Y.length!=(d==null?void 0:d.rows.length)?Re(hn,Y=d==null?void 0:d.rows.map((T,ge)=>gt.getRowId(T,ge)),Y):Re(hn,Y=[],Y)},clearSelection:()=>{Re(hn,Y=[],Y)},insertRow:async T=>{Te(Zi,oe);let ge;if(Vn&&Vn.length){let De=Te(Vn,oe);await(De==null?void 0:De())}else{gn.startSave();try{ge=await ae.saveRow({...N,tableId:$t},{suppressErrors:!0}),Re(dt,N.errors={},N),dt.set(N),gn.refresh();let De={...oe,[Je]:{row:ge}},Ke=Te(Zi,De);return await(Ke==null?void 0:Ke({row:ge})),gn.endSave(),ge}catch(De){if(pt&&clearTimeout(pt),pt=setTimeout(()=>{Re(dt,N={...N,errors:{}},N)},2e3),Re(dt,N.errors={},N),De.json&&De.json.validationErrors){const Ke=De.json.validationErrors;Object.keys(Ke).forEach(tt=>{Re(dt,N.errors[tt]=Ke[tt][0]||"Validation error",N)})}else De.details||De.errors?(De.details||De.errors).forEach(tt=>{tt.field&&Re(dt,N.errors[tt.field]=tt.message||"Validation error",N)}):Re(dt,N.errors={general:De.message||"Save failed"},N)}}},deleteRow:async T=>{let ge=d==null?void 0:d.rows[T];Re(dn,F[T].disabled=!0,F),await le.tick();let De=ge[En];if(!De||!$t)return;let Ke=[{parameters:{confirm:!0,notificationOverride:!1,customTitleText:"Delete "+(ei||"Row")+" ?",confirmText:"Are you sure you want to delete this "+(ei||"Row")+"ID"+De+" ?",tableId:$t,rowId:De},"##eventHandlerType":"Delete Row"}],tt,nt=Te(ki,gt.enrichContext(d==null?void 0:d.rows[T]));Bn!=null&&Bn.length?tt=Te(Bn,gt.enrichContext(d==null?void 0:d.rows[T])):tt=Te(Ke,{}),await(tt==null?void 0:tt({row:ge})),await(nt==null?void 0:nt({row:ge})),Y.includes(gt.getRowId(ge,T))&&(Y.splice(Y.indexOf(gt.getRowId(ge,T)),1),hn.set(Y)),y.refresh()},deleteSelectedRows:async()=>{let T=Y.map(nt=>gt.getRowById(nt)).filter(nt=>nt),ge=T.map(nt=>nt._id);T.forEach(nt=>{const $e=d.rows.indexOf(nt);$e!==-1&&Re(dn,F[$e].disabled=!0,F)}),await le.tick();let De=[{parameters:{confirm:!0,notificationOverride:!0,customTitleText:"Delete "+Y.length+" "+(Fn||"Rows")+" ?",confirmText:"Are you sure you want to delete these "+(Fn||"Rows")+" ?",tableId:$t,rowId:ge.map(nt=>({_id:nt.toString()}))},"##eventHandlerType":"Delete Row"}],Ke=Te(De,{}),tt=Te(ki,oe);await(Ke==null?void 0:Ke()),await(tt==null?void 0:tt()),y.refresh()},patchRow:async T=>{if(!$t)return;T=gt.unflattenObject(T);let ge;ge=await ae.patchRow({tableId:$t,...T},!0),gn.refresh();let De={...oe,[Je]:{row:ge}},Ke=Te(bl,De);return await(Ke==null?void 0:Ke({row:ge})),ge},getRowId:(T,ge)=>{var De;return En?((De=T[En])==null?void 0:De.toString())??ge.toString():ge.toString()},getRowById:T=>En?d.rows.find(ge=>{var De;return((De=ge[En])==null?void 0:De.toString())===T}):d.rows[parseInt(T)],extendQuery:(T,ge)=>{var Ke,tt;if(!Object.keys(ge).length)return T;const De={[Ol.LogicalOperator.AND]:{conditions:[...T?[T]:[],...Object.values(ge||{})]},onEmptyFilter:Ol.EmptyFilterOption.RETURN_NONE};return(((tt=(Ke=De[Ol.LogicalOperator.AND])==null?void 0:Ke.conditions)==null?void 0:tt.length)??0)>0?De:{}},addQueryExtension:(T,ge)=>{!T||!ge||n(130,at={...at,[T]:ge})},removeQueryExtension:T=>{if(!T)return;const ge={...at};delete ge[T],n(130,at=ge)},beautifyLabel:T=>{if(!Vi||!T)return T;let ge=T.split(".");return ge.forEach((De,Ke)=>{let tt=De.split("_");tt.forEach((nt,$e)=>{var vt;nt&&(tt[$e]=((vt=nt[0])==null?void 0:vt.toUpperCase())+(nt==null?void 0:nt.slice(1)))}),ge[Ke]=tt.join(" ")}),ge.join(" - ")},detectPK:T=>{var De,Ke,tt;if(((Ke=(De=T==null?void 0:T.definition)==null?void 0:De.primary)==null?void 0:Ke.length)===1)return T.definition.primary[0];const ge=((tt=T==null?void 0:T.definition)==null?void 0:tt.schema)||(T==null?void 0:T.schema)||{};return"id"in ge?"id":"_id"in ge?"_id":null},loadPreSelections:T=>{Re(hn,Y=Array.isArray(T)?T.map(ge=>ge.toString()):typeof T=="string"?T.split(",").map(ge=>ge.trim()):T?[T]:[],Y)},decidePagination:T=>{if(!T){n(18,di="none");return}if(T.parameters&&T.parameters.length){const ge=T.parameters.map(De=>De.name.toLowerCase());ge.includes("offset")&&ge.includes("limit")&&n(18,di="limitOffset")}else he.tableId?n(18,di="cursor"):n(18,di="none");n(128,yi=di=="cursor")}},gn=Ft("Init",{"*":{init(){return"Init"},refresh(){y==null||y.refresh()},enrichRows(T,ge,De,Ke,tt,nt){var $e;T!=null&&T.loading||Re(dn,F=(($e=T==null?void 0:T.rows)==null?void 0:$e.map((vt,ht)=>({height:Ke&&wh(de(Ke,{...oe,[Je]:{row:vt}}))||X.appearance.rowHeight,bgcolor:ge?de(ge,{...oe,[Je]:{row:vt}}):void 0,color:De?de(De,{...oe,[Je]:{row:vt}}):void 0,disabled:tt?de(tt,{...oe,[Je]:{row:vt}}):void 0,selected:nt.includes(gt.getRowId(vt,ht))})))||[{}],F)},lockColumnWidths(){L||(L=!0,sn.forEach(({state:T})=>T.lockWidth()))},unlockColumnWidths(){L&&(L=!1,sn.forEach(({state:T})=>T.unlockWidth()))},scrollToTop(){Re(Nt,G=0,G),Re(Xt,q=0,q),this.calculateRowBoundaries()},scrollTo(T){Re(Nt,G=T,G),this.calculateRowBoundaries()},scrollToEnd(){Re(Nt,G=Rt>en?Rt-en:G,G),this.calculateRowBoundaries()},calculateBoundaries(){if(!(d==null?void 0:d.rows)||!Ci)return;const ge=X.appearance.rowHeight;n(20,Rt=(M[M.length-1]||0)+(pe?4*ge:2*ge)),n(23,en=Ci.clientHeight-X.appearance.headerHeight-X.appearance.footerHeight+ge),n(21,Qn=Rt>en),n(26,Hn=Qn),Re(Vt,x=Rt>en?G/(Rt-en):0,x),this.calculateRowBoundaries()},calculateRowBoundaries(){var tt;let T=0,ge=0,De=(d==null?void 0:d.rows)||[];ge=De.length;for(let nt=0;nt<De.length;nt++)if(M[nt]>G){T=nt;break}for(let nt=T;nt<De.length;nt++)if(M[nt]>=G+en){ge=nt+1;break}Re(On,ie=d==null?void 0:d.rows.slice(T,ge).map((nt,$e)=>$e+T),ie);const Ke=T>0?M[T-1]:0;if(Re(Xt,q=G-Ke,q),yi&&De.length>0){const $e=M[De.length-1]-(G+en),vt=!((tt=d.info)!=null&&tt.total)||De.length<d.info.total;$e<en&&De.length===Zn&&vt&&G>0&&gn.fetchMoreRows(wt)}},handleVerticalScroll(T){this.lockColumnWidths(),Re(Nt,G=Math.max(Math.min(G+T,Math.max(0,Rt-en)),0),G),Re(Vt,x=Rt>en?G/(Rt-en):0,x),window.requestAnimationFrame(()=>this.calculateRowBoundaries())},handleWheel(T){if(K=="Inserting"){T.preventDefault(),T.stopPropagation();return}if(T.deltaY&&Qn)T.preventDefault(),T.stopPropagation(),this.handleVerticalScroll(T.deltaY);else if(T.deltaX){if(this.lockColumnWidths(),J+T.deltaX<0){Re(Dt,J=0,J),Re(Mt,j=0,j);return}if(J+T.deltaX>(Pt==null?void 0:Pt.scrollWidth)-Pt.clientWidth){Re(Dt,J=(Pt==null?void 0:Pt.scrollWidth)-Pt.clientWidth,J),Re(Mt,j=1,j);return}Re(Dt,J+=T.deltaX,J),Re(Mt,j=J/Pt.scrollWidth,j)}},handleKeyboard(T){},handleTouch(T,ge){if(d.loading||K==="Inserting"){T.preventDefault();return}if(ge==="start")Ai=T.touches[0].clientY,xi=T.touches[0].clientX;else if(ge==="move"&&Qn){const De=T.touches[0].clientY,Ke=T.touches[0].clientX,tt=Ai-De,nt=xi-Ke;Math.abs(tt)>Math.abs(nt)?(T.preventDefault(),this.handleVerticalScroll(tt*.5),Ai=De):Math.abs(nt)>Math.abs(tt)&&(this.lockColumnWidths(),J+nt<0?(Re(Dt,J=0,J),Re(Mt,j=0,j)):J+nt>(Pt==null?void 0:Pt.scrollWidth)-Pt.clientWidth?(Re(Dt,J=(Pt==null?void 0:Pt.scrollWidth)-Pt.clientWidth,J),Re(Mt,j=1,j)):(Re(Dt,J+=nt,J),Re(Mt,j=J/Pt.scrollWidth,j)),xi=Ke)}},sortBy(T,ge){n(72,it=T),n(73,ot=ge),Re(oo,H=T,H),Re(so,ne=ge,ne)},handleRowClick(T,ge,De,Ke){Mn&&!Bt&>.selectRow(T),Qi&>.executeCellOnClickAction(T,ge,De,Ke),gt.executeRowOnClickAction(T)},addRow(){if(!Vn||(Vn==null?void 0:Vn.length)==0)return"Inserting";gt.insertRow()},edit(){return"Editing"}},Init:{_enter(){Ei&&clearInterval(Ei),$i&&clearTimeout($i),Re(Nt,G=0,G),Re(Xt,q=0,q),Re(Dt,J=0,J),Re(hn,Y=[],Y),Re(On,ie=[],ie),Zn!=wt&&(Zn=wt),b(n(15,y=sS(E))),$i=setTimeout(()=>{n(28,kl=!0)},130)},synch(T){if(n(126,$t=E.tableId),gt.loadPreSelections(hl),T.loaded)return Ct&&!lt&&(Ei=setInterval(()=>{d!=null&&d.loading||y==null||y.refresh(),Un==null||Un()},Ct*1e3)),"Idle"}},Idle:{_enter(){clearTimeout($i),n(28,kl=!1),n(27,hi=(d==null?void 0:d.rows.length)<1),this.calculateRowBoundaries()},_exit(){},synch(T){T.loading&&!T.loaded||(n(27,hi=!(d!=null&&d.rows.length)),T.loaded&&this.calculateRowBoundaries())},addFilter(T){let ge=kt.buildQuery([{...T}]);return ye.add(T.id),gt.addQueryExtension(T.id,ge),"Filtered"},fetchMoreRows(T){Zn=Zn+T,y.update({limit:Zn})}},Filtered:{_enter(){},_exit(){},addFilter(T){let ge=kt.buildQuery([{...T}]);gt.removeQueryExtension(T.id),ye.add(T.id),gt.addQueryExtension(T.id,ge)},removeFilter(T){ye.delete(T),gt.removeQueryExtension(T)},clearFilter(T){return ye.delete(T),gt.removeQueryExtension(T),"Idle"},clear(){return ye.forEach(T=>{gt.removeQueryExtension(T)}),ye.clear(),sn.forEach(({state:T})=>T.reset()),"Idle"},synch(T){T.loaded&&(n(27,hi=T.rows.length<1),this.calculateRowBoundaries())}},Editing:{async patchRow(T,ge,De,Ke,tt){let nt={_id:ge,_rev:De,[Ke]:tt};return await gt.patchRow(T,nt),gn.refresh(),"Idle"},endEdit(){return"Idle"}},Inserting:{_enter(){n(27,hi=!1),sn.forEach(({state:T})=>T.addRow()),Re(dt,N={},N),ai==null||ai.forEach(T=>{T.defaultValue&&Re(dt,N[T.field]=de(T.defaultValue,oe),N)}),et=G,this.scrollToEnd()},_exit(){sn.forEach(({state:T})=>T.cancelAddRow()),this.scrollTo(et)},cancelAddRow(){return"Idle"},endSave(){return this.refresh(),"Idle"},setValue(T,ge){Re(dt,N[T]=ge,N),N.errors&&N.errors[T]&&(delete N.errors[T],pt&&(clearTimeout(pt),pt=null)),Re(dt,N={...N},N)}}});Me(t,gn,T=>n(38,K=T));const Em=ce(At,T=>{var ge;return{hasChildren:!1,maxWidth:on||"auto",minWidth:Ui||"7rem",fixedWidth:Hi||"7rem",sizing:Bi,canResize:Kn,canEdit:lt?!1:Bt,showFooter:st,showHeader:we,cellPadding:Gn[xe].cellPadding,headerHeight:Gn[xe].headerHeight,rowHeight:Gn[xe].rowHeight,highlighters:Ki,useOptionColors:((ge=T==null?void 0:T.appearance)==null?void 0:ge.useOptionColors)||!1,optionsViewMode:qi,relViewMode:Wi,zebraColors:Gi,quiet:Yi}});Me(t,Em,T=>n(44,fe=T));const vm=ce(At,T=>{var ge,De;return{color:T.dividersColor??"var(--spectrum-global-color-gray-200)",horizontal:T.dividers=="both"||T.dividers=="horizontal"?"1px solid var(--super-table-devider-color)":"1px solid transparent",vertical:T.dividers=="both"||T.dividers=="vertical"?"1px solid var(--super-table-devider-color)":"none",headerHeight:((ge=T.appearance)==null?void 0:ge.headerHeight)||"0px",footerHeight:((De=T.appearance)==null?void 0:De.footerHeight)||"0px"}});Me(t,vm,T=>n(41,se=T)),le.setContext("stbScrollPos",Nt),le.setContext("stbScrollOffset",Xt),le.setContext("stbHorizontalScrollPos",Dt),le.setContext("stbHovered",Ti),le.setContext("stbSelected",hn),le.setContext("stbEditing",oS),le.setContext("stbState",gn),le.setContext("stbSettings",At),le.setContext("stbSortColumn",oo),le.setContext("stbSortOrder",so),le.setContext("stbMenuID",pn),le.setContext("stbMenuAnchor",Rn),le.setContext("stbAPI",gt),le.setContext("stbVisibleRows",On),le.setContext("stbRowMetadata",dn),le.onDestroy(()=>{Ei&&clearInterval(Ei)});let ys=0;function uS(T){Pt=T,n(25,Pt)}function aS(T){Si=T,n(22,Si)}function fS(T){Be[T?"unshift":"push"](()=>{Ci=T,n(24,Ci)})}function cS(){ee=this.clientWidth,vi=this.clientHeight,n(16,ee),n(14,vi)}const dS=()=>n(19,Ji=!0),hS=()=>{n(19,Ji=!1),Re(Ti,Oe=null,Oe)},gS=T=>gn.handleTouch(T,"start"),mS=T=>gn.handleTouch(T,"move"),_S=T=>gn.handleTouch(T,"end");return t.$$set=T=>{"comp_id"in T&&n(74,Je=T.comp_id),"inBuilder"in T&&n(75,lt=T.inBuilder),"dataSource"in T&&n(76,he=T.dataSource),"sortColumn"in T&&n(72,it=T.sortColumn),"sortOrder"in T&&n(73,ot=T.sortOrder),"limit"in T&&n(0,wt=T.limit),"autoRefreshRate"in T&&n(77,Ct=T.autoRefreshRate),"paginate"in T&&n(78,ln=T.paginate),"filter"in T&&n(79,It=T.filter),"columnList"in T&&n(80,xt=T.columnList),"tableActions"in T&&n(1,_e=T.tableActions),"showFooter"in T&&n(81,st=T.showFooter),"showHeader"in T&&n(82,we=T.showHeader),"size"in T&&n(2,xe=T.size),"canInsert"in T&&n(83,pe=T.canInsert),"canDelete"in T&&n(84,_t=T.canDelete),"canEdit"in T&&n(85,Bt=T.canEdit),"canResize"in T&&n(86,Kn=T.canResize),"canFilter"in T&&n(87,ui=T.canFilter),"canSelect"in T&&n(88,Mn=T.canSelect),"insertFieldsConfig"in T&&n(89,ai=T.insertFieldsConfig),"superColumnsPos"in T&&n(90,Nn=T.superColumnsPos),"showAutoColumns"in T&&n(91,fl=T.showAutoColumns),"showSpecialColumns"in T&&n(92,cl=T.showSpecialColumns),"debounce"in T&&n(93,dl=T.debounce),"rowMenu"in T&&n(3,_i=T.rowMenu),"rowMenuItems"in T&&n(4,Tn=T.rowMenuItems),"rowMenuIcon"in T&&n(94,Kt=T.rowMenuIcon),"menuItemsVisible"in T&&n(5,Wl=T.menuItemsVisible),"rowContextMenuItems"in T&&n(6,pi=T.rowContextMenuItems),"preselectedIds"in T&&n(95,hl=T.preselectedIds),"hideSelectionColumn"in T&&n(7,Fi=T.hideSelectionColumn),"numberingColumn"in T&&n(96,gl=T.numberingColumn),"stickFirstColumn"in T&&n(8,rn=T.stickFirstColumn),"maxSelected"in T&&n(97,Ln=T.maxSelected),"selectedActions"in T&&n(9,Gl=T.selectedActions),"beautifyLabels"in T&&n(98,Vi=T.beautifyLabels),"columnSizing"in T&&n(10,Bi=T.columnSizing),"columnMinWidth"in T&&n(99,Ui=T.columnMinWidth),"columnMaxWidth"in T&&n(100,on=T.columnMaxWidth),"columnFixedWidth"in T&&n(101,Hi=T.columnFixedWidth),"dividers"in T&&n(102,ml=T.dividers),"dividersColor"in T&&n(103,_l=T.dividersColor),"rowColorTemplate"in T&&n(104,zi=T.rowColorTemplate),"rowBGColorTemplate"in T&&n(105,ji=T.rowBGColorTemplate),"rowDisabledTemplate"in T&&n(106,$n=T.rowDisabledTemplate),"rowHeight"in T&&n(107,fi=T.rowHeight),"footerColorTemplate"in T&&n(108,ci=T.footerColorTemplate),"footerBGColorTemplate"in T&&n(109,In=T.footerBGColorTemplate),"useOptionColors"in T&&n(110,bi=T.useOptionColors),"optionsViewMode"in T&&n(111,qi=T.optionsViewMode),"relViewMode"in T&&n(112,Wi=T.relViewMode),"zebraColors"in T&&n(113,Gi=T.zebraColors),"quiet"in T&&n(11,Yi=T.quiet),"highlighters"in T&&n(114,Ki=T.highlighters),"entitySingular"in T&&n(12,ei=T.entitySingular),"entityPlural"in T&&n(13,Fn=T.entityPlural),"onRowSelect"in T&&n(115,Xn=T.onRowSelect),"onCellChange"in T&&n(116,Xi=T.onCellChange),"onRowClick"in T&&n(117,wi=T.onRowClick),"onCellClick"in T&&n(118,Qi=T.onCellClick),"onLinkClick"in T&&n(119,pl=T.onLinkClick),"onInsert"in T&&n(120,Vn=T.onInsert),"afterInsert"in T&&n(121,Zi=T.afterInsert),"onDelete"in T&&n(122,Bn=T.onDelete),"afterDelete"in T&&n(123,ki=T.afterDelete),"afterEdit"in T&&n(124,bl=T.afterEdit),"onRefresh"in T&&n(125,Un=T.onRefresh),"$$scope"in T&&n(157,te=T.$$scope)},t.$$.update=()=>{var T;t.$$.dirty[2]&16384&&yn.set(he),t.$$.dirty[4]&8192&>.decidePagination(E),t.$$.dirty[2]&131072&&wl.set(It),t.$$.dirty[0]&131072&&yt.set((T=d==null?void 0:d.definition)==null?void 0:T.schema),t.$$.dirty[2]&262144&&Dn.set(xt||[]),t.$$.dirty[0]&4|t.$$.dirty[2]&4096|t.$$.dirty[3]&16384&&n(134,i=fi&&wh(de(fi,{[Je]:{row:{}}}))||Gn[xe].rowHeight),t.$$.dirty[3]&16&&yl.set(Ln),t.$$.dirty[0]&11397|t.$$.dirty[2]&2012990464|t.$$.dirty[3]&1644150779|t.$$.dirty[4]&4195356&&At.set({inBuilder:me==null?void 0:me.inBuilder,showAutoColumns:fl,showSpecialColumns:cl,superColumnsPos:Nn,columnSizing:Bi||"flexible",columnMaxWidth:on||"auto",columnMinWidth:Ui||"7rem",columnFixedWidth:Hi||"7rem",debounce:dl,hideSelectionColumn:Fi,dividers:ml,dividersColor:_l,showFooter:st,showHeader:we,rowMenuIcon:Kt,features:{canSelect:Mn,maxSelected:Ln,canFilter:ui,canEdit:Bt,canDelete:_t&&$t,canInsert:pe,canResize:Kn},data:{dataSource:he,idColumn:En,filter:It,sortColumn:it,sortOrder:ot,limit:wt,emptyMessage:Fn?"No "+Fn+" found":"No Rows Found",paginate:ln,autoRefreshRate:Ct,fetchOnScroll:yi},appearance:{size:xe,headerHeight:we?Gn[xe].headerHeight:0,footerHeight:st?Gn[xe].headerHeight:0,rowHeight:i,numberingColumn:gl,hideSelectionColumn:Fi,quiet:Yi,useOptionColors:bi,optionsViewMode:qi,relViewMode:Wi,zebraColors:Gi,dynamicColors:!0,highlighters:Ki,rowColorTemplate:zi,rowBGColorTemplate:ji,rowDisabledTemplate:$n,footerColorTemplate:ci,footerBGColorTemplate:In,cellPadding:Gn[xe].cellPadding,beautifyLabels:Vi},events:{onRowClick:wi,onCellChange:Xi,onRowSelect:Xn,onDelete:Bn,afterDelete:ki}}),t.$$.dirty[4]&8192&&gn.init(E),t.$$.dirty[0]&131072&&gn.synch(d),t.$$.dirty[0]&131072|t.$$.dirty[3]&30720|t.$$.dirty[4]&2097152&&gn.enrichRows(d,ji,zi,fi,$n,Y),t.$$.dirty[0]&32768&&D(n(35,l=ce([y,hn,yl],([ge,De,Ke])=>{var nt;ge!=null&&ge.rows&&(De=De.filter($e=>ge.rows.some((vt,ht)=>gt.getRowId(vt,ht)===$e)));const tt=(nt=ge==null?void 0:ge.rows)==null?void 0:nt.filter(($e,vt)=>De==null?void 0:De.includes(gt.getRowId($e,vt)));return Ke===1?tt.length>0?tt[0]:[]:tt}))),t.$$.dirty[4]&1048576&&n(133,r=kt.buildQuery($)),t.$$.dirty[4]&576&&n(132,o=gt.extendQuery(r,at)),t.$$.dirty[4]&256&&gn.scrollToTop(o),t.$$.dirty[0]&32768|t.$$.dirty[2]&3072|t.$$.dirty[4]&256&&(y==null||y.update({query:o,sortColumn:it,sortOrder:ot})),t.$$.dirty[0]&16384|t.$$.dirty[2]&2097152|t.$$.dirty[4]&917520&&gn.calculateBoundaries(vi,pe,H,yi,H,ne,M),t.$$.dirty[0]&32768&&n(32,a=[{type:Se.ClearRowSelection,callback:gt.clearSelection},{type:Se.RefreshDatasource,callback:y==null?void 0:y.refresh},{type:Se.AddDataProviderQueryExtension,callback:gt.addQueryExtension},{type:Se.RemoveDataProviderQueryExtension,callback:gt.removeQueryExtension}]),t.$$.dirty[0]&131072|t.$$.dirty[2]&8192|t.$$.dirty[4]&126984&&n(31,f={row:lt?d==null?void 0:d.rows[0]:{},newRow:N,rows:d==null?void 0:d.rows,selectedRows:I,selectedIds:Array.isArray(I)?I.map(ge=>ge[En]):I&&typeof I=="object"?[I[En]]:[],id:k.id,info:d==null?void 0:d.info,datasource:E||{},schema:w,state:{query:d.query},loaded:d==null?void 0:d.loaded,rowsLength:d==null?void 0:d.rows.length,pageNumber:(d==null?void 0:d.pageNumber)+1}),t.$$.dirty[0]&24&&n(30,c=_i=="columnRight"&&(Tn==null?void 0:Tn.length)),t.$$.dirty[0]&24&&n(29,g=_i=="columnLeft"&&(Tn==null?void 0:Tn.length)),t.$$.dirty[0]&32768&&le.setContext("stbData",y),t.$$.dirty[0]&65536|t.$$.dirty[4]&2208&&(ee>0&&ee!==ys||h)&&(n(131,ys=ee),sn==null||sn.forEach(({state:ge})=>ge.unlockWidth()))},ve(n(34,u=ce([yt,Dn,At],([T,ge,De])=>gt.populateColumns(T,ge,De.showAutoColumns,De.showSpecialColumns)))),W(n(33,s=ce(dn,T=>T==null?void 0:T.map((ge,De)=>T.slice(0,De+1).reduce((Ke,tt)=>Ke+Math.max(tt.height,0),0))))),le.setContext("stbSchema",yt),le.setContext("new_row",dt),[wt,_e,xe,_i,Tn,Wl,pi,Fi,rn,Gl,Bi,Yi,ei,Fn,vi,y,ee,d,di,Ji,Rt,Qn,Si,en,Ci,Pt,Hn,hi,kl,g,c,f,a,s,u,l,J,q,K,X,z,se,Oe,be,fe,Le,re,Ae,Ue,yn,Dn,dn,wl,dt,At,yt,Nt,Xt,Vt,Dt,Mt,On,pn,Rn,hn,Ti,oo,so,gt,gn,Em,vm,it,ot,Je,lt,he,Ct,ln,It,xt,st,we,pe,_t,Bt,Kn,ui,Mn,ai,Nn,fl,cl,dl,Kt,hl,gl,Ln,Vi,Ui,on,Hi,ml,_l,zi,ji,$n,fi,ci,In,bi,qi,Wi,Gi,Ki,Xn,Xi,wi,Qi,pl,Vn,Zi,Bn,ki,bl,Un,$t,En,yi,sn,at,ys,o,r,i,h,w,E,k,I,N,M,ne,H,$,Y,me,Ne,uS,aS,fS,cS,dS,hS,gS,mS,_S,te]}class w2 extends Ze{constructor(e){super(),Qe(this,e,b2,p2,Ye,{comp_id:74,inBuilder:75,dataSource:76,sortColumn:72,sortOrder:73,limit:0,autoRefreshRate:77,paginate:78,filter:79,columnList:80,tableActions:1,showFooter:81,showHeader:82,size:2,canInsert:83,canDelete:84,canEdit:85,canResize:86,canFilter:87,canSelect:88,insertFieldsConfig:89,superColumnsPos:90,showAutoColumns:91,showSpecialColumns:92,debounce:93,rowMenu:3,rowMenuItems:4,rowMenuIcon:94,menuItemsVisible:5,rowContextMenuItems:6,preselectedIds:95,hideSelectionColumn:7,numberingColumn:96,stickFirstColumn:8,maxSelected:97,selectedActions:9,beautifyLabels:98,columnSizing:10,columnMinWidth:99,columnMaxWidth:100,columnFixedWidth:101,dividers:102,dividersColor:103,rowColorTemplate:104,rowBGColorTemplate:105,rowDisabledTemplate:106,rowHeight:107,footerColorTemplate:108,footerBGColorTemplate:109,useOptionColors:110,optionsViewMode:111,relViewMode:112,zebraColors:113,quiet:11,highlighters:114,entitySingular:12,entityPlural:13,onRowSelect:115,onCellChange:116,onRowClick:117,onCellClick:118,onLinkClick:119,onInsert:120,afterInsert:121,onDelete:122,afterDelete:123,afterEdit:124,onRefresh:125},null,[-1,-1,-1,-1,-1,-1,-1])}}function kh(t,e,n){const i=t.slice();return i[19]=e[n],i[21]=n,i}function yh(t){let e,n,i,l=[],r=new Map,o=t[2]==="list"&&t[7]&&Eh(t),u=Ce(t[0]);const s=a=>a[21];for(let a=0;a<u.length;a+=1){let f=kh(t,u,a),c=s(f);r.set(c,l[a]=Ah(c,f))}return{c(){e=v("div"),n=v("div"),o&&o.c(),i=Q();for(let a=0;a<l.length;a+=1)l[a].c();m(n,"class","tabs svelte-12yvhlq"),p(n,"vertical",t[12]),p(n,"buttons",t[10]),p(n,"list",t[2]==="list"),p(n,"wide",t[2]==="wideButtons"&&t[8]),P(n,"justify-content",t[4]),P(n,"--tab-alignment",t[3]),P(n,"--tab-track-thickness","1px"),m(e,"class","outer-tabs svelte-12yvhlq"),p(e,"quietTabs",t[9]),p(e,"list",t[2]==="list"),p(e,"vertical",t[12]),p(e,"wide",t[2]==="wideButtons"&&t[8]),P(e,"justify-content",t[11])},m(a,f){A(a,e,f),S(e,n),o&&o.m(n,null),S(n,i);for(let c=0;c<l.length;c+=1)l[c]&&l[c].m(n,null)},p(a,f){a[2]==="list"&&a[7]?o?o.p(a,f):(o=Eh(a),o.c(),o.m(n,i)):o&&(o.d(1),o=null),f&13367&&(u=Ce(a[0]),l=Tt(l,f,s,1,a,u,r,n,nn,Ah,null,kh)),f&4096&&p(n,"vertical",a[12]),f&1024&&p(n,"buttons",a[10]),f&4&&p(n,"list",a[2]==="list"),f&260&&p(n,"wide",a[2]==="wideButtons"&&a[8]),f&16&&P(n,"justify-content",a[4]),f&8&&P(n,"--tab-alignment",a[3]),f&512&&p(e,"quietTabs",a[9]),f&4&&p(e,"list",a[2]==="list"),f&4096&&p(e,"vertical",a[12]),f&260&&p(e,"wide",a[2]==="wideButtons"&&a[8]),f&2048&&P(e,"justify-content",a[11])},d(a){a&&C(e),o&&o.d();for(let f=0;f<l.length;f+=1)l[f].d()}}}function Eh(t){let e,n,i,l=t[6]&&vh(t);return{c(){e=v("div"),l&&l.c(),n=Q(),i=Ee(t[7]),m(e,"class","tab list-title svelte-12yvhlq")},m(r,o){A(r,e,o),l&&l.m(e,null),S(e,n),S(e,i)},p(r,o){r[6]?l?l.p(r,o):(l=vh(r),l.c(),l.m(e,n)):l&&(l.d(1),l=null),o&128&&Pe(i,r[7])},d(r){r&&C(e),l&&l.d()}}}function vh(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[6])+" svelte-12yvhlq")},m(i,l){A(i,e,l)},p(i,l){l&64&&n!==(n=bt(i[6])+" svelte-12yvhlq")&&m(e,"class",n)},d(i){i&&C(e)}}}function Sh(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[19].icon)+" svelte-12yvhlq"),P(e,"font-size",t[5]?"20px":null),P(e,"color",t[19].color)},m(i,l){A(i,e,l)},p(i,l){l&1&&n!==(n=bt(i[19].icon)+" svelte-12yvhlq")&&m(e,"class",n),l&32&&P(e,"font-size",i[5]?"20px":null),l&1&&P(e,"color",i[19].color)},d(i){i&&C(e)}}}function Ch(t){let e,n=(t[19].title||"Tab "+t[21])+"",i;return{c(){e=v("span"),i=Ee(n),m(e,"class","tab-text svelte-12yvhlq")},m(l,r){A(l,e,r),S(e,i)},p(l,r){r&1&&n!==(n=(l[19].title||"Tab "+l[21])+"")&&Pe(i,n)},d(l){l&&C(e)}}}function Ah(t,e){let n,i,l,r,o,u=e[19].icon&&Sh(e),s=(!e[5]||!e[19].icon)&&Ch(e);function a(){return e[18](e[19])}return{key:t,first:null,c(){n=v("button"),u&&u.c(),i=Q(),s&&s.c(),l=Q(),m(n,"class","tab svelte-12yvhlq"),p(n,"vertical",e[12]),p(n,"button",e[10]),p(n,"list",e[2]==="list"),p(n,"selected",e[19].id===e[1]),p(n,"disabled",e[19].disabled),p(n,"list-section",e[19].isTabSection),P(n,"flex",e[4]=="stretch"?"1":null),this.first=n},m(f,c){A(f,n,c),u&&u.m(n,null),S(n,i),s&&s.m(n,null),S(n,l),r||(o=B(n,"click",a),r=!0)},p(f,c){e=f,e[19].icon?u?u.p(e,c):(u=Sh(e),u.c(),u.m(n,i)):u&&(u.d(1),u=null),!e[5]||!e[19].icon?s?s.p(e,c):(s=Ch(e),s.c(),s.m(n,l)):s&&(s.d(1),s=null),c&4096&&p(n,"vertical",e[12]),c&1024&&p(n,"button",e[10]),c&4&&p(n,"list",e[2]==="list"),c&3&&p(n,"selected",e[19].id===e[1]),c&1&&p(n,"disabled",e[19].disabled),c&1&&p(n,"list-section",e[19].isTabSection),c&16&&P(n,"flex",e[4]=="stretch"?"1":null)},d(f){f&&C(n),u&&u.d(),s&&s.d(),r=!1,o()}}}function k2(t){var i;let e,n=((i=t[0])==null?void 0:i.length)&&yh(t);return{c(){n&&n.c(),e=Fe()},m(l,r){n&&n.m(l,r),A(l,e,r)},p(l,[r]){var o;(o=l[0])!=null&&o.length?n?n.p(l,r):(n=yh(l),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:ue,o:ue,d(l){l&&C(e),n&&n.d(l)}}}function y2(t,e,n){let i,l,r;const o=le.createEventDispatcher();let{containers:u}=e,{direction:s}=e,{selectedTab:a}=e,{hAlign:f}=e,{vAlign:c}=e,{theme:g="buttons"}=e,{tabsPosition:h="top"}=e,{tabsAlignment:d}=e,{buttonsAlignment:_="flex-start"}=e,{tabsIconsOnly:b}=e,{list_icon:w}=e,{list_title:E}=e,{wide:k=!0}=e,{quietTabs:I}=e;const O=D=>{!D.disabled&&!D.isTabSection&&o("change",D)};return t.$$set=D=>{"containers"in D&&n(0,u=D.containers),"direction"in D&&n(14,s=D.direction),"selectedTab"in D&&n(1,a=D.selectedTab),"hAlign"in D&&n(15,f=D.hAlign),"vAlign"in D&&n(16,c=D.vAlign),"theme"in D&&n(2,g=D.theme),"tabsPosition"in D&&n(17,h=D.tabsPosition),"tabsAlignment"in D&&n(3,d=D.tabsAlignment),"buttonsAlignment"in D&&n(4,_=D.buttonsAlignment),"tabsIconsOnly"in D&&n(5,b=D.tabsIconsOnly),"list_icon"in D&&n(6,w=D.list_icon),"list_title"in D&&n(7,E=D.list_title),"wide"in D&&n(8,k=D.wide),"quietTabs"in D&&n(9,I=D.quietTabs)},t.$$.update=()=>{t.$$.dirty&131076&&n(12,i=h=="left"||g==="list"),t.$$.dirty&114688&&n(11,l=s==="row"?f:c),t.$$.dirty&4&&n(10,r=g==="buttons"||g==="wideButtons")},[u,a,g,d,_,b,w,E,k,I,r,l,i,o,s,f,c,h,O]}class E2 extends Ze{constructor(e){super(),Qe(this,e,y2,k2,Ye,{containers:0,direction:14,selectedTab:1,hAlign:15,vAlign:16,theme:2,tabsPosition:17,tabsAlignment:3,buttonsAlignment:4,tabsIconsOnly:5,list_icon:6,list_title:7,wide:8,quietTabs:9})}}function Th(t,e,n){const i=t.slice();return i[16]=e[n],i[18]=n,i}function Ih(t){var Y;let e,n,i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E,k,I,O,D,N;function M(G,oe){return oe&128&&(o=null),o==null&&(o=!!G[6].isImage(G[7])),o?S2:v2}let V=M(t,-1),W=V(t),ne=((Y=t[3])==null?void 0:Y.length)>1&&Dh(t),H=t[4]&&Rh(t),$=t[5]&&Ph(t);return{c(){var G;e=v("div"),n=v("div"),i=v("div"),l=v("button"),l.textContent="×",r=Q(),W.c(),u=Q(),s=v("div"),a=v("div"),f=v("button"),c=v("i"),h=Q(),ne&&ne.c(),d=Q(),_=v("button"),b=v("i"),E=Q(),k=v("div"),H&&H.c(),I=Q(),$&&$.c(),m(l,"class","modal-close svelte-1xx8aus"),m(l,"aria-label","Close modal"),m(l,"type","button"),m(c,"class","ph ph-caret-left"),m(f,"class","btn-nav large svelte-1xx8aus"),m(f,"aria-label","Previous image"),m(f,"type","button"),f.disabled=g=!t[9],m(b,"class","ph ph-caret-right"),m(_,"class","btn-nav large svelte-1xx8aus"),m(_,"aria-label","Next image"),m(_,"type","button"),_.disabled=w=!t[8],m(a,"class","modal-navigation svelte-1xx8aus"),m(k,"class","modal-actions svelte-1xx8aus"),m(s,"class","modal-controls svelte-1xx8aus"),m(i,"class","modal-image-container svelte-1xx8aus"),m(i,"aria-label",O="Image "+(t[0]+1)+" of "+(((G=t[3])==null?void 0:G.length)||1)+". Use arrow keys to navigate, Home/End for first/last, numbers 1-9 to jump to images, Space for next, Escape to close."),p(i,"selected",t[2].has(t[0])),m(n,"class","image-modal-content svelte-1xx8aus"),m(n,"tabindex","0"),m(e,"class","image-modal svelte-1xx8aus"),m(e,"role","dialog"),m(e,"aria-modal","true"),m(e,"aria-labelledby","modal-title"),m(e,"tabindex","-1")},m(G,oe){A(G,e,oe),S(e,n),S(n,i),S(i,l),S(i,r),W.m(i,null),S(i,u),S(i,s),S(s,a),S(a,f),S(f,c),S(a,h),ne&&ne.m(a,null),S(a,d),S(a,_),S(_,b),S(s,E),S(s,k),H&&H.m(k,null),S(k,I),$&&$.m(k,null),D||(N=[B(l,"click",t[6].closeModal),B(f,"click",t[6].navigatePrev),B(_,"click",t[6].navigateNext),B(n,"click",Qt(t[12])),B(n,"keydown",t[6].handleKeydown),tn(t[11].call(null,n)),B(e,"click",t[6].closeModal)],D=!0)},p(G,oe){var ie,J;V===(V=M(G,oe))&&W?W.p(G,oe):(W.d(1),W=V(G),W&&(W.c(),W.m(i,u))),oe&512&&g!==(g=!G[9])&&(f.disabled=g),((ie=G[3])==null?void 0:ie.length)>1?ne?ne.p(G,oe):(ne=Dh(G),ne.c(),ne.m(a,d)):ne&&(ne.d(1),ne=null),oe&256&&w!==(w=!G[8])&&(_.disabled=w),G[4]?H?H.p(G,oe):(H=Rh(G),H.c(),H.m(k,I)):H&&(H.d(1),H=null),G[5]?$?$.p(G,oe):($=Ph(G),$.c(),$.m(k,null)):$&&($.d(1),$=null),oe&9&&O!==(O="Image "+(G[0]+1)+" of "+(((J=G[3])==null?void 0:J.length)||1)+". Use arrow keys to navigate, Home/End for first/last, numbers 1-9 to jump to images, Space for next, Escape to close.")&&m(i,"aria-label",O),oe&5&&p(i,"selected",G[2].has(G[0]))},d(G){G&&C(e),W.d(),ne&&ne.d(),H&&H.d(),$&&$.d(),D=!1,Ve(N)}}}function v2(t){var a,f,c;let e,n,i=((f=(a=t[7])==null?void 0:a.extension)==null?void 0:f.toUpperCase())+"",l,r,o,u=((c=t[7])==null?void 0:c.name)+"",s;return{c(){e=v("div"),n=v("div"),l=Ee(i),r=Q(),o=v("span"),s=Ee(u),m(n,"class","pill svelte-1xx8aus"),m(o,"class","filename svelte-1xx8aus"),m(e,"class","modal-fallback svelte-1xx8aus")},m(g,h){A(g,e,h),S(e,n),S(n,l),S(e,r),S(e,o),S(o,s)},p(g,h){var d,_,b;h&128&&i!==(i=((_=(d=g[7])==null?void 0:d.extension)==null?void 0:_.toUpperCase())+"")&&Pe(l,i),h&128&&u!==(u=((b=g[7])==null?void 0:b.name)+"")&&Pe(s,u)},d(g){g&&C(e)}}}function S2(t){let e,n,i;return{c(){e=v("img"),As(e.src,n=t[7].url)||m(e,"src",n),m(e,"alt",i=t[7].name),m(e,"class","modal-image svelte-1xx8aus")},m(l,r){A(l,e,r)},p(l,r){r&128&&!As(e.src,n=l[7].url)&&m(e,"src",n),r&128&&i!==(i=l[7].name)&&m(e,"alt",i)},d(l){l&&C(e)}}}function Dh(t){let e,n=Ce(t[3]),i=[];for(let l=0;l<n.length;l+=1)i[l]=Oh(Th(t,n,l));return{c(){e=v("div");for(let l=0;l<i.length;l+=1)i[l].c();m(e,"class","modal-indicators svelte-1xx8aus")},m(l,r){A(l,e,r);for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(e,null)},p(l,r){if(r&73){n=Ce(l[3]);let o;for(o=0;o<n.length;o+=1){const u=Th(l,n,o);i[o]?i[o].p(u,r):(i[o]=Oh(u),i[o].c(),i[o].m(e,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=n.length}},d(l){l&&C(e),St(i,l)}}}function Oh(t){let e,n,i;function l(){return t[13](t[18])}return{c(){e=v("button"),m(e,"class","indicator large svelte-1xx8aus"),m(e,"aria-label","Go to image "+(t[18]+1)),m(e,"type","button"),p(e,"active",t[18]===t[0])},m(r,o){A(r,e,o),n||(i=B(e,"click",l),n=!0)},p(r,o){t=r,o&1&&p(e,"active",t[18]===t[0])},d(r){r&&C(e),n=!1,i()}}}function Rh(t){let e,n,i,l,r,o;return{c(){e=v("button"),n=v("i"),m(n,"class",i="ph "+(t[2].has(t[0])?"ph-check-square":"ph-square")),m(e,"class","btn-nav large btn-modal-select svelte-1xx8aus"),m(e,"aria-label",l=t[2].has(t[0])?"Deselect":"Select"),m(e,"type","button"),p(e,"selected",t[2].has(t[0]))},m(u,s){A(u,e,s),S(e,n),r||(o=B(e,"click",t[14]),r=!0)},p(u,s){s&5&&i!==(i="ph "+(u[2].has(u[0])?"ph-check-square":"ph-square"))&&m(n,"class",i),s&5&&l!==(l=u[2].has(u[0])?"Deselect":"Select")&&m(e,"aria-label",l),s&5&&p(e,"selected",u[2].has(u[0]))},d(u){u&&C(e),r=!1,o()}}}function Ph(t){let e,n,i;return{c(){e=v("button"),e.innerHTML='<i class="ph ph-trash-simple"></i>',m(e,"class","btn-nav large btn-modal-delete svelte-1xx8aus"),m(e,"aria-label","Delete"),m(e,"type","button")},m(l,r){A(l,e,r),n||(i=B(e,"click",t[15]),n=!0)},p:ue,d(l){l&&C(e),n=!1,i()}}}function C2(t){let e,n=t[1]&&Ih(t);return{c(){n&&n.c(),e=Fe()},m(i,l){n&&n.m(i,l),A(i,e,l)},p(i,[l]){i[1]?n?n.p(i,l):(n=Ih(i),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:ue,o:ue,d(i){i&&C(e),n&&n.d(i)}}}function A2(t,e,n){let i,l,r,{items:o=[]}=e,{currentIndex:u=0}=e,{open:s=!1}=e,{selectedIndices:a=new Set}=e,{canSelect:f=!0}=e,{canDelete:c=!1}=e;const g=le.createEventDispatcher(),h={navigateNext(){(o==null?void 0:o.length)>1&&n(0,u=(u+1)%o.length)},navigatePrev(){(o==null?void 0:o.length)>1&&n(0,u=(u-1+o.length)%o.length)},navigateTo(k){k>=0&&k<(o==null?void 0:o.length)&&n(0,u=k)},toggleSelection(k){const I=new Set(a);I.has(k)?I.delete(k):I.add(k),n(2,a=I)},closeModal(){n(1,s=!1),g("close")},handleKeydown(k){switch(k.key){case"Escape":h.closeModal();break;case"ArrowLeft":k.preventDefault(),h.navigatePrev();break;case"ArrowRight":case" ":k.preventDefault(),h.navigateNext();break;case"Home":k.preventDefault(),h.navigateTo(0);break;case"End":k.preventDefault(),h.navigateTo((o==null?void 0:o.length)-1||0);break;case"PageUp":k.preventDefault(),h.navigatePrev();break;case"PageDown":k.preventDefault(),h.navigateNext();break;default:if(k.key>="1"&&k.key<="9"){const I=parseInt(k.key)-1;I<((o==null?void 0:o.length)||0)&&(k.preventDefault(),h.navigateTo(I))}break}},isImage(k){var O;return["jpg","jpeg","png","gif","bmp","webp"].includes((O=k==null?void 0:k.extension)==null?void 0:O.toLowerCase())}},d=k=>{k.focus()};function _(k){ti.call(this,t,k)}const b=k=>h.navigateTo(k),w=()=>h.toggleSelection(u),E=()=>g("delete",{index:u,item:o[u]});return t.$$set=k=>{"items"in k&&n(3,o=k.items),"currentIndex"in k&&n(0,u=k.currentIndex),"open"in k&&n(1,s=k.open),"selectedIndices"in k&&n(2,a=k.selectedIndices),"canSelect"in k&&n(4,f=k.canSelect),"canDelete"in k&&n(5,c=k.canDelete)},t.$$.update=()=>{t.$$.dirty&9&&n(9,i=(o==null?void 0:o.length)>1&&u>0),t.$$.dirty&9&&n(8,l=(o==null?void 0:o.length)>1&&u<((o==null?void 0:o.length)-1||0)),t.$$.dirty&9&&n(7,r=o==null?void 0:o[u])},[u,s,a,o,f,c,h,r,l,i,g,d,_,b,w,E]}class ls extends Ze{constructor(e){super(),Qe(this,e,A2,C2,Ye,{items:3,currentIndex:0,open:1,selectedIndices:2,canSelect:4,canDelete:5,lightboxAPI:6})}get lightboxAPI(){return this.$$.ctx[6]}}function Mh(t,e,n){const i=t.slice();return i[38]=e[n],i}function Nh(t,e,n){const i=t.slice();return i[41]=e[n],i}function Lh(t,e,n){const i=t.slice();return i[38]=e[n],i}function Fh(t){let e,n;return e=new wn({props:{anchor:t[5],open:t[4],align:"left",offset:t[3],$$slots:{default:[T2]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&32&&(r.anchor=i[5]),l[0]&16&&(r.open=i[4]),l[0]&8&&(r.offset=i[3]),l[0]&14725|l[1]&32768&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Vh(t){let e;return{c(){e=v("i"),m(e,"class","ri-check-line svelte-urnaoo"),P(e,"color",t[12])},m(n,i){A(n,e,i)},p(n,i){i[0]&4096&&P(e,"color",n[12])},d(n){n&&C(e)}}}function Bh(t){let e,n,i,l,r,o,u=t[0]===`var(--spectrum-global-color-${t[38]})`&&Vh(t);function s(){return t[26](t[38])}function a(...f){return t[27](t[38],...f)}return{c(){e=v("div"),n=v("div"),u&&u.c(),m(n,"class",i="color-fill "+(t[2]||"")+" svelte-urnaoo"),P(n,"background","var(--spectrum-global-color-"+t[38]+")"),m(e,"class","color-swatch svelte-urnaoo"),m(e,"title",l=t[15](t[38],t[41])),m(e,"role","button"),m(e,"tabindex","0")},m(f,c){A(f,e,c),S(e,n),u&&u.m(n,null),r||(o=[B(e,"click",s),B(e,"keydown",a)],r=!0)},p(f,c){t=f,t[0]===`var(--spectrum-global-color-${t[38]})`?u?u.p(t,c):(u=Vh(t),u.c(),u.m(n,null)):u&&(u.d(1),u=null),c[0]&4&&i!==(i="color-fill "+(t[2]||"")+" svelte-urnaoo")&&m(n,"class",i),c[0]&128&&P(n,"background","var(--spectrum-global-color-"+t[38]+")"),c[0]&128&&l!==(l=t[15](t[38],t[41]))&&m(e,"title",l)},d(f){f&&C(e),u&&u.d(),r=!1,Ve(o)}}}function Uh(t){let e,n,i=t[41].label+"",l,r,o,u=Ce(t[41].colors),s=[];for(let a=0;a<u.length;a+=1)s[a]=Bh(Lh(t,u,a));return{c(){e=v("div"),n=v("div"),l=Ee(i),r=Q(),o=v("div");for(let a=0;a<s.length;a+=1)s[a].c();m(n,"class","heading svelte-urnaoo"),m(o,"class","colors svelte-urnaoo"),m(e,"class","category")},m(a,f){A(a,e,f),S(e,n),S(n,l),S(e,r),S(e,o);for(let c=0;c<s.length;c+=1)s[c]&&s[c].m(o,null)},p(a,f){if(f[0]&128&&i!==(i=a[41].label+"")&&Pe(l,i),f[0]&118917){u=Ce(a[41].colors);let c;for(c=0;c<u.length;c+=1){const g=Lh(a,u,c);s[c]?s[c].p(g,f):(s[c]=Bh(g),s[c].c(),s[c].m(o,null))}for(;c<s.length;c+=1)s[c].d(1);s.length=u.length}},d(a){a&&C(e),St(s,a)}}}function Hh(t){let e,n,i,l,r=t[8].label+"",o,u,s,a=Ce(t[8].colors),f=[];for(let c=0;c<a.length;c+=1)f[c]=jh(Mh(t,a,c));return{c(){e=v("div"),n=v("div"),i=v("i"),l=Q(),o=Ee(r),u=Q(),s=v("div");for(let c=0;c<f.length;c+=1)f[c].c();m(i,"class","ri-palette-line heading-icon svelte-urnaoo"),m(n,"class","heading svelte-urnaoo"),m(s,"class","colors svelte-urnaoo"),m(e,"class","category")},m(c,g){A(c,e,g),S(e,n),S(n,i),S(n,l),S(n,o),S(e,u),S(e,s);for(let h=0;h<f.length;h+=1)f[h]&&f[h].m(s,null)},p(c,g){if(g[0]&256&&r!==(r=c[8].label+"")&&Pe(o,r),g[0]&119045){a=Ce(c[8].colors);let h;for(h=0;h<a.length;h+=1){const d=Mh(c,a,h);f[h]?f[h].p(d,g):(f[h]=jh(d),f[h].c(),f[h].m(s,null))}for(;h<f.length;h+=1)f[h].d(1);f.length=a.length}},d(c){c&&C(e),St(f,c)}}}function zh(t){let e;return{c(){e=v("i"),m(e,"class","ri-check-line svelte-urnaoo"),P(e,"color",t[12])},m(n,i){A(n,e,i)},p(n,i){i[0]&4096&&P(e,"color",n[12])},d(n){n&&C(e)}}}function jh(t){let e,n,i,l,r,o,u,s=t[0]===t[38]&&zh(t);function a(){return t[28](t[38])}function f(...c){return t[29](t[38],...c)}return{c(){e=v("div"),n=v("div"),s&&s.c(),l=Q(),m(n,"class",i="color-fill "+(t[2]||"")+" svelte-urnaoo"),P(n,"background",t[38]),m(e,"class","color-swatch svelte-urnaoo"),m(e,"title",r=t[15](t[38],t[8])),m(e,"role","button"),m(e,"tabindex","0")},m(c,g){A(c,e,g),S(e,n),s&&s.m(n,null),S(e,l),o||(u=[B(e,"click",a),B(e,"keydown",f)],o=!0)},p(c,g){t=c,t[0]===t[38]?s?s.p(t,g):(s=zh(t),s.c(),s.m(n,null)):s&&(s.d(1),s=null),g[0]&4&&i!==(i="color-fill "+(t[2]||"")+" svelte-urnaoo")&&m(n,"class",i),g[0]&256&&P(n,"background",t[38]),g[0]&256&&r!==(r=t[15](t[38],t[8]))&&m(e,"title",r)},d(c){c&&C(e),s&&s.d(),o=!1,Ve(u)}}}function qh(t){let e,n,i,l,r,o,u,s,a;return{c(){e=v("div"),n=v("div"),n.textContent="Custom",i=Q(),l=v("div"),r=v("input"),o=Q(),u=v("button"),u.innerHTML='<i class="ri-close-line"></i>',m(n,"class","heading svelte-urnaoo"),m(r,"type","text"),m(r,"class","custom-input svelte-urnaoo"),m(r,"placeholder","Enter custom color"),m(u,"class","clear-value svelte-urnaoo"),m(l,"class","custom svelte-urnaoo"),m(e,"class","category category--custom svelte-urnaoo")},m(f,c){A(f,e,c),S(e,n),S(e,i),S(e,l),S(l,r),Zt(r,t[13]),S(l,o),S(l,u),s||(a=[B(r,"input",t[30]),B(r,"change",t[31]),B(u,"click",t[32])],s=!0)},p(f,c){c[0]&8192&&r.value!==f[13]&&Zt(r,f[13])},d(f){f&&C(e),s=!1,Ve(a)}}}function T2(t){let e,n,i,l=Ce(t[7]),r=[];for(let s=0;s<l.length;s+=1)r[s]=Uh(Nh(t,l,s));let o=t[8].colors.length>0&&Hh(t),u=t[11]&&qh(t);return{c(){e=v("div");for(let s=0;s<r.length;s+=1)r[s].c();n=Q(),o&&o.c(),i=Q(),u&&u.c(),m(e,"class","container svelte-urnaoo")},m(s,a){A(s,e,a);for(let f=0;f<r.length;f+=1)r[f]&&r[f].m(e,null);S(e,n),o&&o.m(e,null),S(e,i),u&&u.m(e,null)},p(s,a){if(a[0]&118917){l=Ce(s[7]);let f;for(f=0;f<l.length;f+=1){const c=Nh(s,l,f);r[f]?r[f].p(c,a):(r[f]=Uh(c),r[f].c(),r[f].m(e,n))}for(;f<r.length;f+=1)r[f].d(1);r.length=l.length}s[8].colors.length>0?o?o.p(s,a):(o=Hh(s),o.c(),o.m(e,i)):o&&(o.d(1),o=null),s[11]?u?u.p(s,a):(u=qh(s),u.c(),u.m(e,null)):u&&(u.d(1),u=null)},d(s){s&&C(e),St(r,s),o&&o.d(),u&&u.d()}}}function I2(t){let e,n,i,l,r,o,u,s,a,f,c=t[6]&&Fh(t);return{c(){e=v("div"),n=v("div"),o=Q(),c&&c.c(),u=Fe(),m(n,"class",i="preview-fill "+(t[2]||"")+" svelte-urnaoo"),m(n,"style",l=t[0]?`background: ${t[0]};`:""),p(n,"circle",t[10]),p(n,"placeholder",!t[0]),m(e,"class",r="preview-swatch size--"+(t[1]||"M")+" svelte-urnaoo"),m(e,"role","button"),m(e,"tabindex","0"),p(e,"circle",t[10]),p(e,"readonly",t[9])},m(g,h){A(g,e,h),S(e,n),t[23](e),A(g,o,h),c&&c.m(g,h),A(g,u,h),s=!0,a||(f=[B(e,"click",function(){Ge(t[9]?null:t[24])&&(t[9]?null:t[24]).apply(this,arguments)}),B(e,"keydown",t[25])],a=!0)},p(g,h){t=g,(!s||h[0]&4&&i!==(i="preview-fill "+(t[2]||"")+" svelte-urnaoo"))&&m(n,"class",i),(!s||h[0]&1&&l!==(l=t[0]?`background: ${t[0]};`:""))&&m(n,"style",l),(!s||h[0]&1028)&&p(n,"circle",t[10]),(!s||h[0]&5)&&p(n,"placeholder",!t[0]),(!s||h[0]&2&&r!==(r="preview-swatch size--"+(t[1]||"M")+" svelte-urnaoo"))&&m(e,"class",r),(!s||h[0]&1026)&&p(e,"circle",t[10]),(!s||h[0]&514)&&p(e,"readonly",t[9]),t[6]?c?(c.p(t,h),h[0]&64&&U(c,1)):(c=Fh(t),c.c(),U(c,1),c.m(u.parentNode,u)):c&&(He(),Z(c,1,1,()=>{c=null}),ze())},i(g){s||(U(c),s=!0)},o(g){Z(c),s=!1},d(g){g&&(C(e),C(o),C(u)),t[23](null),c&&c.d(g),a=!1,Ve(f)}}}function D2(t,e,n){let i,l,r,o,u,s,a,f,c,g,{value:h}=e,{size:d="M"}=e,{spectrumTheme:_}=e,{offset:b}=e,{align:w}=e,{cellState:E}=e,{cellOptions:k={}}=e,I=!1,O,D=!1;const N=le.createEventDispatcher();function M(R,z){return[...R?[{label:"Theme colors",colors:["red-100","orange-100","yellow-100","green-100","seafoam-100","blue-100","indigo-100","magenta-100","red-400","orange-400","yellow-400","green-400","seafoam-400","blue-400","indigo-400","magenta-400","red-500","orange-500","yellow-500","green-500","seafoam-500","blue-500","indigo-500","magenta-500","red-600","orange-600","yellow-600","green-600","seafoam-600","blue-600","indigo-600","magenta-600","red-700","orange-700","yellow-700","green-700","seafoam-700","blue-700","indigo-700","magenta-700","gray-50","gray-75","gray-100","gray-200","gray-300","gray-400","gray-500","gray-600","gray-700","gray-800","gray-900"]}]:[],...z?[{label:"Static colors",colors:["static-red-400","static-orange-400","static-yellow-400","static-green-400","static-seafoam-400","static-blue-400","static-indigo-400","static-magenta-400","static-red-800","static-orange-800","static-yellow-800","static-green-800","static-seafoam-800","static-blue-800","static-indigo-800","static-magenta-800","static-red-1200","static-orange-1200","static-yellow-1200","static-green-1200","static-seafoam-1200","static-blue-1200","static-indigo-1200","static-magenta-1200","static-white","static-black"]}]:[]]}function V(R){return{label:"Palette",colors:R.map(z=>z.value),customLabels:R.reduce((z,me)=>(z[me.value]=me.label,z),{})}}const W=R=>{const z=R===h?null:R;n(0,h=z),N("change",z),n(4,I=!1),n(6,D=!1)},ne=R=>R&&((c==null?void 0:c.some(me=>me.colors.some(se=>`var(--spectrum-global-color-${se})`===R)))?null:R),H=(R,z)=>z.customLabels&&z.customLabels[R]?z.customLabels[R]:R.split("-").join(" "),$=R=>R?R.includes("-gray-")?/^.*(gray-(50|75|100|200|300|400|500))\)$/.test(R)?"var(--spectrum-global-color-gray-900)":"var(--spectrum-global-color-gray-50)":R.includes("-100")?"var(--spectrum-global-color-gray-900)":R.includes("static-black")?"var(--spectrum-global-color-static-gray-50)":"var(--spectrum-global-color-static-gray-900)":"var(--spectrum-global-color-static-gray-900)",Y=(R,z,me)=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),W(me?z:`var(--spectrum-global-color-${z})`))};function G(R){Be[R?"unshift":"push"](()=>{O=R,n(5,O)})}const oe=()=>{n(6,D=!0),n(4,I=!I)},ie=R=>{(R.key==="Enter"||R.key===" "&&!u)&&(n(6,D=!0),n(4,I=!I))},J=R=>W(`var(--spectrum-global-color-${R})`),q=(R,z)=>Y(z,R,!1),j=R=>W(R),K=(R,z)=>Y(z,R,!0);function x(){i=this.value,n(13,i),n(0,h)}const X=()=>{i&&W(i)},F=()=>W(null);return t.$$set=R=>{"value"in R&&n(0,h=R.value),"size"in R&&n(1,d=R.size),"spectrumTheme"in R&&n(2,_=R.spectrumTheme),"offset"in R&&n(3,b=R.offset),"align"in R&&n(17,w=R.align),"cellState"in R&&n(18,E=R.cellState),"cellOptions"in R&&n(19,k=R.cellOptions)},t.$$.update=()=>{t.$$.dirty[0]&1&&n(13,i=ne(h)),t.$$.dirty[0]&1&&n(12,l=$(h)),t.$$.dirty[0]&524288&&n(11,r=(k==null?void 0:k.allowCustom)!==!1),t.$$.dirty[0]&524288&&n(10,o=(k==null?void 0:k.swatch)==="circle"),t.$$.dirty[0]&524288&&n(9,u=(k==null?void 0:k.readonly)||(k==null?void 0:k.disabled)),t.$$.dirty[0]&524288&&n(20,s=(k==null?void 0:k.customColors)||[]),t.$$.dirty[0]&524288&&n(22,a=(k==null?void 0:k.themeColors)!==!1),t.$$.dirty[0]&524288&&n(21,f=(k==null?void 0:k.staticColors)!==!1),t.$$.dirty[0]&6291456&&n(7,c=M(a,f)),t.$$.dirty[0]&1048576&&n(8,g=V(s))},[h,d,_,b,I,O,D,c,g,u,o,r,l,i,W,H,Y,w,E,k,s,f,a,G,oe,ie,J,q,j,K,x,X,F]}class O2 extends Ze{constructor(e){super(),Qe(this,e,D2,I2,Ye,{value:0,size:1,spectrumTheme:2,offset:3,align:17,cellState:18,cellOptions:19},null,[-1,-1])}}function Wh(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[1].icon+" icon")+" svelte-u7nack")},m(i,l){A(i,e,l)},p(i,l){l[0]&2&&n!==(n=bt(i[1].icon+" icon")+" svelte-u7nack")&&m(e,"class",n)},d(i){i&&C(e)}}}function R2(t){let e,n;function i(o,u){return o[19]?N2:M2}let l=i(t),r=l(t);return{c(){e=v("div"),n=v("span"),r.c(),m(e,"class","value"),p(e,"with-icon",t[1].icon),p(e,"placeholder",!t[0]),P(e,"justify-content",t[1].align)},m(o,u){A(o,e,u),S(e,n),r.m(n,null)},p(o,u){l===(l=i(o))&&r?r.p(o,u):(r.d(1),r=l(o),r&&(r.c(),r.m(n,null))),u[0]&2&&p(e,"with-icon",o[1].icon),u[0]&1&&p(e,"placeholder",!o[0]),u[0]&2&&P(e,"justify-content",o[1].align)},d(o){o&&C(e),r.d()}}}function P2(t){let e,n,i,l,r,o,u,s,a=t[0]&&t[1].showDirty!=!1&&Gh(t);return{c(){e=v("div"),n=v("span"),i=Ee(t[19]),l=Q(),r=v("i"),o=Q(),a&&a.c(),m(r,"class","ri-calendar-line"),P(r,"font-size","16px"),P(r,"justify-self","flex-end"),m(e,"class","editor svelte-u7nack"),p(e,"with-icon",t[1].icon),p(e,"placeholder",!t[0])},m(f,c){A(f,e,c),S(e,n),S(n,i),S(e,l),S(e,r),S(e,o),a&&a.m(e,null),u||(s=B(e,"click",t[33]),u=!0)},p(f,c){c[0]&524288&&Pe(i,f[19]),f[0]&&f[1].showDirty!=!1?a?a.p(f,c):(a=Gh(f),a.c(),a.m(e,null)):a&&(a.d(1),a=null),c[0]&2&&p(e,"with-icon",f[1].icon),c[0]&1&&p(e,"placeholder",!f[0])},d(f){f&&C(e),a&&a.d(),u=!1,s()}}}function M2(t){let e;return{c(){e=Ee(t[4])},m(n,i){A(n,e,i)},p(n,i){i[0]&16&&Pe(e,n[4])},d(n){n&&C(e)}}}function N2(t){let e;return{c(){e=Ee(t[19])},m(n,i){A(n,e,i)},p(n,i){i[0]&524288&&Pe(e,n[19])},d(n){n&&C(e)}}}function Gh(t){let e,n,i;return{c(){e=v("button"),m(e,"class","clear-button ri-close-line svelte-u7nack"),P(e,"font-size","14px"),P(e,"color","var(--spectrum-global-color-gray-500)"),m(e,"aria-label","Clear date range")},m(l,r){A(l,e,r),n||(i=B(e,"click",Qt(t[25])),n=!0)},p:ue,d(l){l&&C(e),n=!1,i()}}}function Yh(t){let e,n;return e=new wn({props:{anchor:t[10],dismissible:!1,open:t[12],align:"right",$$slots:{default:[L2]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&1024&&(r.anchor=i[10]),l[0]&4096&&(r.open=i[12]),l[0]&1174496|l[1]&65536&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Kh(t){let e,n,i,l;return{c(){e=v("div"),n=v("input"),m(n,"type","time"),m(n,"class","time-input svelte-u7nack"),m(n,"step","900"),m(e,"class","time-section svelte-u7nack")},m(r,o){A(r,e,o),S(e,n),t[36](n),Zt(n,t[9]),i||(l=[B(n,"input",t[37]),B(n,"change",t[23])],i=!0)},p(r,o){o[0]&512&&Zt(n,r[9])},d(r){r&&C(e),t[36](null),i=!1,Ve(l)}}}function Xh(t){let e,n,i,l;return{c(){e=v("div"),n=v("input"),m(n,"type","time"),m(n,"class","time-input svelte-u7nack"),m(n,"step","900"),m(e,"class","time-section svelte-u7nack")},m(r,o){A(r,e,o),S(e,n),t[39](n),Zt(n,t[6]),i||(l=[B(n,"input",t[40]),B(n,"change",t[24])],i=!0)},p(r,o){o[0]&64&&Zt(n,r[6])},d(r){r&&C(e),t[39](null),i=!1,Ve(l)}}}function Qh(t){let e;return{c(){e=v("div"),e.innerHTML='<i class="ri-error-warning-line" style="color: var(--spectrum-global-color-red-500);"></i> <span style="color: var(--spectrum-global-color-red-500); font-size: 12px;">End date cannot be before start date</span>',m(e,"class","range-error svelte-u7nack")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function L2(t){let e,n,i,l,r,o,u,s,a,f,c,g,h,d,_,b,w;u=new xo({props:{value:t[8]}}),u.$on("select",t[21]);let E=t[7]&&Kh(t);d=new xo({props:{value:t[5],min:t[8]}}),d.$on("select",t[22]);let k=t[7]&&Xh(t),I=!t[20]&&Qh();return{c(){e=v("div"),n=v("div"),i=v("div"),l=v("label"),l.textContent="From:",r=Q(),o=v("div"),We(u.$$.fragment),s=Q(),E&&E.c(),a=Q(),f=v("div"),c=v("label"),c.textContent="To:",g=Q(),h=v("div"),We(d.$$.fragment),_=Q(),k&&k.c(),b=Q(),I&&I.c(),m(l,"class","range-label svelte-u7nack"),m(i,"class","range-section svelte-u7nack"),m(c,"class","range-label svelte-u7nack"),m(f,"class","range-section svelte-u7nack"),m(n,"class","datepickers-container svelte-u7nack"),m(e,"class","range-picker-container svelte-u7nack"),P(e,"--date-picker-background","var(--spectrum-global-color-gray-75)"),P(e,"--date-picker-foreground","var(--spectrum-global-color-gray-800)"),P(e,"--date-picker-selected-background","var(--accent-color)")},m(O,D){A(O,e,D),S(e,n),S(n,i),S(i,l),S(i,r),S(i,o),je(u,o,null),t[35](o),S(i,s),E&&E.m(i,null),S(n,a),S(n,f),S(f,c),S(f,g),S(f,h),je(d,h,null),t[38](h),S(f,_),k&&k.m(f,null),S(e,b),I&&I.m(e,null),t[41](e),w=!0},p(O,D){const N={};D[0]&256&&(N.value=O[8]),u.$set(N),O[7]?E?E.p(O,D):(E=Kh(O),E.c(),E.m(i,null)):E&&(E.d(1),E=null);const M={};D[0]&32&&(M.value=O[5]),D[0]&256&&(M.min=O[8]),d.$set(M),O[7]?k?k.p(O,D):(k=Xh(O),k.c(),k.m(f,null)):k&&(k.d(1),k=null),O[20]?I&&(I.d(1),I=null):I||(I=Qh(),I.c(),I.m(e,null))},i(O){w||(U(u.$$.fragment,O),U(d.$$.fragment,O),w=!0)},o(O){Z(u.$$.fragment,O),Z(d.$$.fragment,O),w=!1},d(O){O&&C(e),qe(u),t[35](null),E&&E.d(),qe(d),t[38](null),k&&k.d(),I&&I.d(),t[41](null)}}}function F2(t){let e,n,i,l,r,o,u,s,a=t[1].icon&&Wh(t);function f(d,_){return d[3]?P2:R2}let c=f(t),g=c(t),h=t[3]&&Yh(t);return{c(){e=v("div"),a&&a.c(),n=Q(),g.c(),l=Q(),h&&h.c(),r=Fe(),m(e,"class","superCell"),m(e,"tabindex",i=t[1].readonly||t[1].disabled?"-1":"0"),p(e,"inEdit",t[3]),p(e,"isDirty",t[17]&&t[1].showDirty),p(e,"inline",t[18]),p(e,"tableCell",t[1].role=="tableCell"),p(e,"formInput",t[1].role=="formInput"),p(e,"disabled",t[1].disabled),p(e,"readonly",t[1].readonly),p(e,"error",t[1].error),P(e,"color",t[1].color),P(e,"background",t[1].background),P(e,"font-weight",t[1].fontWeight)},m(d,_){A(d,e,_),a&&a.m(e,null),S(e,n),g.m(e,null),t[34](e),A(d,l,_),h&&h.m(d,_),A(d,r,_),o=!0,u||(s=[B(e,"focus",function(){Ge(t[2].focus)&&t[2].focus.apply(this,arguments)}),B(e,"keypress",function(){Ge(t[2].handleKeyboard)&&t[2].handleKeyboard.apply(this,arguments)}),B(e,"focusout",function(){Ge(t[2].focusout)&&t[2].focusout.apply(this,arguments)})],u=!0)},p(d,_){t=d,t[1].icon?a?a.p(t,_):(a=Wh(t),a.c(),a.m(e,n)):a&&(a.d(1),a=null),c===(c=f(t))&&g?g.p(t,_):(g.d(1),g=c(t),g&&(g.c(),g.m(e,null))),(!o||_[0]&2&&i!==(i=t[1].readonly||t[1].disabled?"-1":"0"))&&m(e,"tabindex",i),(!o||_[0]&8)&&p(e,"inEdit",t[3]),(!o||_[0]&131074)&&p(e,"isDirty",t[17]&&t[1].showDirty),(!o||_[0]&262144)&&p(e,"inline",t[18]),(!o||_[0]&2)&&p(e,"tableCell",t[1].role=="tableCell"),(!o||_[0]&2)&&p(e,"formInput",t[1].role=="formInput"),(!o||_[0]&2)&&p(e,"disabled",t[1].disabled),(!o||_[0]&2)&&p(e,"readonly",t[1].readonly),(!o||_[0]&2)&&p(e,"error",t[1].error),_[0]&2&&P(e,"color",t[1].color),_[0]&2&&P(e,"background",t[1].background),_[0]&2&&P(e,"font-weight",t[1].fontWeight),t[3]?h?(h.p(t,_),_[0]&8&&U(h,1)):(h=Yh(t),h.c(),U(h,1),h.m(r.parentNode,r)):h&&(He(),Z(h,1,1,()=>{h=null}),ze())},i(d){o||(U(h),o=!0)},o(d){Z(h),o=!1},d(d){d&&(C(e),C(l),C(r)),a&&a.d(),g.d(),t[34](null),h&&h.d(d),u=!1,Ve(s)}}}function V2(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E=ue,k=()=>(E(),E=ft(ne,te=>n(32,w=te)),ne);t.$$.on_destroy.push(()=>E());const I=new le.createEventDispatcher,{processStringSync:O}=le.getContext("sdk");let{value:D}=e,{formattedValue:N}=e,{cellOptions:M}=e,{autofocus:V}=e,W,{cellState:ne=Ft("View",{"*":{goTo(te){return te}},View:{focus(){if(!M.readonly)return"Editing"}},Editing:{_enter(){n(28,W=D?{...D}:null),n(12,Y=!0),I("enteredit")},_exit(){I("exitedit")},handleKeyboard(te){te.keyCode==32&&(te.stopPropagation(),te.preventDefault(),n(12,Y=!Y))},focusout(te){const ae=$==null?void 0:$.contains(te.relatedTarget),de=ie!=null&&ie.contains?ie==null?void 0:ie.contains(te.relatedTarget):!1,Xe=J!=null&&J.contains?J==null?void 0:J.contains(te.relatedTarget):!1;if(!ae&&!de&&!Xe)return n(12,Y=!1),JSON.stringify(D)!=JSON.stringify(W)&&I("change",D),"View"},cancel(){return n(0,D=W?{...W}:null),"View"}}})}=e;k();let H,$,Y=!1,G,oe,ie,J;function q(te,ae,de,Xe,Te,Se){const Le=j(te,te,de).from+" "+Xe,rt=j(ae,ae,de).to+" "+Te;return{from:Le,to:rt}}function j(te,ae,de){if(console.log("🔍 formatDateRange called with:",{fromDate:te,toDate:ae,dateFormat:de}),!de||de==="default")return console.log("➡️ Using default format"),{from:te.toDateString(),to:ae.toDateString()};if(de==="MM/DD/YYYY"){const Se=`${(te.getMonth()+1).toString().padStart(2,"0")}/${te.getDate().toString().padStart(2,"0")}/${te.getFullYear()}`,Le=`${(ae.getMonth()+1).toString().padStart(2,"0")}/${ae.getDate().toString().padStart(2,"0")}/${ae.getFullYear()}`;return console.log("✅ MM/DD/YYYY formatted:",{from:Se,to:Le}),{from:Se,to:Le}}if(de==="DD/MM/YYYY"){const Se=`${te.getDate().toString().padStart(2,"0")}/${(te.getMonth()+1).toString().padStart(2,"0")}/${te.getFullYear()}`,Le=`${ae.getDate().toString().padStart(2,"0")}/${(ae.getMonth()+1).toString().padStart(2,"0")}/${ae.getFullYear()}`;return console.log("✅ DD/MM/YYYY formatted:",{from:Se,to:Le}),{from:Se,to:Le}}if(de==="YYYY-MM-DD"){const Se=`${te.getFullYear()}-${(te.getMonth()+1).toString().padStart(2,"0")}-${te.getDate().toString().padStart(2,"0")}`,Le=`${ae.getFullYear()}-${(ae.getMonth()+1).toString().padStart(2,"0")}-${ae.getDate().toString().padStart(2,"0")}`;return console.log("✅ YYYY-MM-DD formatted:",{from:Se,to:Le}),{from:Se,to:Le}}const Te={"MMM DD, YYYY":{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"},"DD MMM YYYY":{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}}[de];if(console.log("📅 Format object:",Te),Te){const Se=te.toLocaleDateString("en-US",Te),Le=ae.toLocaleDateString("en-US",Te);return console.log("✅ Formatted result:",{from:Se,to:Le}),{from:Se,to:Le}}return console.log("⚠️ Format not found, using fallback"),{from:te.toDateString(),to:ae.toDateString()}}le.onMount(()=>{V&&setTimeout(()=>{ne.focus()},30)});const K=te=>{const ae=te.detail;n(0,D={...D,from:ae}),D.to&&new Date(D.to)<ae&&n(0,D={...D,to:null}),I("change",D)},x=te=>{const ae=te.detail;n(0,D={...D,to:ae}),I("change",D)},X=te=>{const ae=te.target.value;n(0,D={...D,fromTime:ae}),I("change",D)},F=te=>{const ae=te.target.value;n(0,D={...D,toTime:ae}),I("change",D)},R=()=>{n(0,D=null),I("change",null)},z=()=>n(12,Y=!Y);function me(te){Be[te?"unshift":"push"](()=>{H=te,n(10,H)})}function se(te){Be[te?"unshift":"push"](()=>{G=te,n(13,G)})}function Oe(te){Be[te?"unshift":"push"](()=>{ie=te,n(15,ie)})}function be(){r=this.value,n(9,r),n(7,l),n(0,D),n(1,M)}function Ie(te){Be[te?"unshift":"push"](()=>{oe=te,n(14,oe)})}function ve(te){Be[te?"unshift":"push"](()=>{J=te,n(16,J)})}function fe(){o=this.value,n(6,o),n(7,l),n(0,D),n(1,M)}function Ne(te){Be[te?"unshift":"push"](()=>{$=te,n(11,$)})}return t.$$set=te=>{"value"in te&&n(0,D=te.value),"formattedValue"in te&&n(26,N=te.formattedValue),"cellOptions"in te&&n(1,M=te.cellOptions),"autofocus"in te&&n(27,V=te.autofocus),"cellState"in te&&k(n(2,ne=te.cellState))},t.$$.update=()=>{t.$$.dirty[0]&2&&n(29,i=M==null?void 0:M.dateFormat),t.$$.dirty[0]&2&&n(7,l=M==null?void 0:M.showTime),t.$$.dirty[0]&129&&n(9,r=l&&(D!=null&&D.fromTime)?D.fromTime:"00:00"),t.$$.dirty[0]&129&&n(6,o=l&&(D!=null&&D.toTime)?D.toTime:"00:00"),t.$$.dirty[0]&1&&n(8,u=D!=null&&D.from?new Date(D.from):new Date),t.$$.dirty[0]&1&&n(5,s=D!=null&&D.to?new Date(D.to):new Date),t.$$.dirty[0]&897&&n(31,a=l&&(D!=null&&D.from)?new Date(`${u.toISOString().split("T")[0]}T${r}`):u),t.$$.dirty[0]&225&&n(30,f=l&&(D!=null&&D.to)?new Date(`${s.toISOString().split("T")[0]}T${o}`):s),t.$$.dirty[0]&1073742241|t.$$.dirty[1]&1&&n(20,c=!(D!=null&&D.from)||!(D!=null&&D.to)?!0:l?a<=f:u<=s),t.$$.dirty[0]&3&&n(26,N=M.template&&D?O(M.template,{value:D}):void 0),t.$$.dirty[0]&2&&n(4,h=M.readonly||M.disabled?"":M.placeholder||"Select date range"),t.$$.dirty[0]&603980785&&n(19,g=(()=>{if(N)return N;if(!(D!=null&&D.from)&&!(D!=null&&D.to))return h;const te=i;let ae=h,de=h;return D!=null&&D.from&&(te==="default"||!te?ae=l?u.toDateString()+" "+r:u.toDateString():l?ae=q(u,u,te,r,r).from:ae=j(u,u,te).from),D!=null&&D.to&&(te==="default"||!te?de=l?s.toDateString()+" "+o:s.toDateString():l?de=q(s,s,te,o,o).to:de=j(s,s,te).to),D!=null&&D.from&&(D!=null&&D.to)?`${ae} - ${de}`:D!=null&&D.from?`${ae} - [Select end date]`:D!=null&&D.to?`[Select start date] - ${de}`:h})()),t.$$.dirty[1]&2&&n(3,d=w=="Editing"),t.$$.dirty[0]&2&&n(18,_=M.role=="inlineInput"),t.$$.dirty[0]&268435465&&n(17,b=d&&JSON.stringify(D)!=JSON.stringify(W))},[D,M,ne,d,h,s,o,l,u,r,H,$,Y,G,oe,ie,J,b,_,g,c,K,x,X,F,R,N,V,W,i,f,a,w,z,me,se,Oe,be,Ie,ve,fe,Ne]}class B2 extends Ze{constructor(e){super(),Qe(this,e,V2,F2,Ye,{value:0,formattedValue:26,cellOptions:1,autofocus:27,cellState:2},null,[-1,-1])}}const U2={all:"All Icons",business:"Business",communication:"Communication",design:"Design",development:"Development",document:"Document",editor:"Editor",finance:"Finance",health:"Health",logistics:"Logistics",map:"Maps",media:"Media",system:"System",user:"User",weather:"Weather"},H2={all:["acorn","address-book","address-book-tabs","air-traffic-control","airplane","airplane-in-flight","airplane-landing","airplane-takeoff","airplane-taxiing","airplane-tilt","airplay","alarm","alien","align-bottom","align-bottom-simple","align-center-horizontal","align-center-horizontal-simple","align-center-vertical","align-center-vertical-simple","align-left","align-left-simple","align-right","align-right-simple","align-top","align-top-simple","amazon-logo","ambulance","anchor","anchor-simple","android-logo","angle","angular-logo","aperture","app-store-logo","app-window","apple-logo","apple-podcasts-logo","approximate-equals","archive","armchair","arrow-arc-left","arrow-arc-right","arrow-bend-double-up-left","arrow-bend-double-up-right","arrow-bend-down-left","arrow-bend-down-right","arrow-bend-left-down","arrow-bend-left-up","arrow-bend-right-down","arrow-bend-right-up","arrow-bend-up-left","arrow-bend-up-right","arrow-circle-down","arrow-circle-down-left","arrow-circle-down-right","arrow-circle-left","arrow-circle-right","arrow-circle-up","arrow-circle-up-left","arrow-circle-up-right","arrow-clockwise","arrow-counter-clockwise","arrow-down","arrow-down-left","arrow-down-right","arrow-elbow-down-left","arrow-elbow-down-right","arrow-elbow-left","arrow-elbow-left-down","arrow-elbow-left-up","arrow-elbow-right","arrow-elbow-right-down","arrow-elbow-right-up","arrow-elbow-up-left","arrow-elbow-up-right","arrow-fat-down","arrow-fat-left","arrow-fat-line-down","arrow-fat-line-left","arrow-fat-line-right","arrow-fat-line-up","arrow-fat-lines-down","arrow-fat-lines-left","arrow-fat-lines-right","arrow-fat-lines-up","arrow-fat-right","arrow-fat-up","arrow-left","arrow-line-down","arrow-line-down-left","arrow-line-down-right","arrow-line-left","arrow-line-right","arrow-line-up","arrow-line-up-left","arrow-line-up-right","arrow-right","arrow-square-down","arrow-square-down-left","arrow-square-down-right","arrow-square-in","arrow-square-left","arrow-square-out","arrow-square-right","arrow-square-up","arrow-square-up-left","arrow-square-up-right","arrow-u-down-left","arrow-u-down-right","arrow-u-left-down","arrow-u-left-up","arrow-u-right-down","arrow-u-right-up","arrow-u-up-left","arrow-u-up-right","arrow-up","arrow-up-left","arrow-up-right","arrows-clockwise","arrows-counter-clockwise","arrows-down-up","arrows-horizontal","arrows-in","arrows-in-cardinal","arrows-in-line-horizontal","arrows-in-line-vertical","arrows-in-simple","arrows-left-right","arrows-merge","arrows-out","arrows-out-cardinal","arrows-out-line-horizontal","arrows-out-line-vertical","arrows-out-simple","arrows-split","arrows-vertical","article","article-medium","article-ny-times","asclepius","caduceus","asterisk","asterisk-simple","at","atom","avocado","axe","baby","baby-carriage","backpack","backspace","bag","bag-simple","balloon","bandaids","bank","barbell","barcode","barn","barricade","baseball","baseball-cap","baseball-helmet","basket","basketball","bathtub","battery-charging","battery-charging-vertical","battery-empty","battery-full","battery-high","battery-low","battery-medium","battery-plus","battery-plus-vertical","battery-vertical-empty","battery-vertical-full","battery-vertical-high","battery-vertical-low","battery-vertical-medium","battery-warning","battery-warning-vertical","beach-ball","beanie","bed","beer-bottle","beer-stein","behance-logo","bell","bell-ringing","bell-simple","bell-simple-ringing","bell-simple-slash","bell-simple-z","bell-slash","bell-z","belt","bezier-curve","bicycle","binary","binoculars","biohazard","bird","blueprint","bluetooth","bluetooth-connected","bluetooth-slash","bluetooth-x","boat","bomb","bone","book","book-bookmark","book-open","book-open-text","book-open-user","bookmark","bookmark-simple","bookmarks","bookmarks-simple","books","boot","boules","bounding-box","bowl-food","bowl-steam","bowling-ball","box-arrow-down","archive-box","box-arrow-up","boxing-glove","brackets-angle","brackets-curly","brackets-round","brackets-square","brain","brandy","bread","bridge","briefcase","briefcase-metal","broadcast","broom","browser","browsers","bug","bug-beetle","bug-droid","building","building-apartment","building-office","buildings","bulldozer","bus","butterfly","cable-car","cactus","cake","calculator","calendar","calendar-blank","calendar-check","calendar-dot","calendar-dots","calendar-heart","calendar-minus","calendar-plus","calendar-slash","calendar-star","calendar-x","call-bell","camera","camera-plus","camera-rotate","camera-slash","campfire","car","car-battery","car-profile","car-simple","cardholder","cards","cards-three","caret-circle-double-down","caret-circle-double-left","caret-circle-double-right","caret-circle-double-up","caret-circle-down","caret-circle-left","caret-circle-right","caret-circle-up","caret-circle-up-down","caret-double-down","caret-double-left","caret-double-right","caret-double-up","caret-down","caret-left","caret-line-down","caret-line-left","caret-line-right","caret-line-up","caret-right","caret-up","caret-up-down","carrot","cash-register","cassette-tape","castle-turret","cat","cell-signal-full","cell-signal-high","cell-signal-low","cell-signal-medium","cell-signal-none","cell-signal-slash","cell-signal-x","cell-tower","certificate","chair","chalkboard","chalkboard-simple","chalkboard-teacher","champagne","charging-station","chart-bar","chart-bar-horizontal","chart-donut","chart-line","chart-line-down","chart-line-up","chart-pie","chart-pie-slice","chart-polar","chart-scatter","chat","chat-centered","chat-centered-dots","chat-centered-slash","chat-centered-text","chat-circle","chat-circle-dots","chat-circle-slash","chat-circle-text","chat-dots","chat-slash","chat-teardrop","chat-teardrop-dots","chat-teardrop-slash","chat-teardrop-text","chat-text","chats","chats-circle","chats-teardrop","check","check-circle","check-fat","check-square","check-square-offset","checkerboard","checks","cheers","cheese","chef-hat","cherries","church","cigarette","cigarette-slash","circle","circle-dashed","circle-half","circle-half-tilt","circle-notch","circles-four","circles-three","circles-three-plus","circuitry","city","clipboard","clipboard-text","clock","clock-afternoon","clock-clockwise","clock-countdown","clock-counter-clockwise","clock-user","closed-captioning","cloud","cloud-arrow-down","cloud-arrow-up","cloud-check","cloud-fog","cloud-lightning","cloud-moon","cloud-rain","cloud-slash","cloud-snow","cloud-sun","cloud-warning","cloud-x","clover","club","coat-hanger","coda-logo","code","code-block","code-simple","codepen-logo","codesandbox-logo","coffee","coffee-bean","coin","coin-vertical","coins","columns","columns-plus-left","columns-plus-right","command","compass","compass-rose","compass-tool","computer-tower","confetti","contactless-payment","control","cookie","cooking-pot","copy","copy-simple","copyleft","copyright","corners-in","corners-out","couch","court-basketball","cow","cowboy-hat","cpu","crane","crane-tower","credit-card","cricket","crop","cross","crosshair","crosshair-simple","crown","crown-cross","crown-simple","cube","cube-focus","cube-transparent","currency-btc","currency-circle-dollar","currency-cny","currency-dollar","currency-dollar-simple","currency-eth","currency-eur","currency-gbp","currency-inr","currency-jpy","currency-krw","currency-kzt","currency-ngn","currency-rub","cursor","cursor-click","cursor-text","cylinder","database","desk","desktop","desktop-tower","detective","dev-to-logo","device-mobile","device-mobile-camera","device-mobile-slash","device-mobile-speaker","device-rotate","device-tablet","device-tablet-camera","device-tablet-speaker","devices","diamond","diamonds-four","dice-five","dice-four","dice-one","dice-six","dice-three","dice-two","disc","disco-ball","discord-logo","divide","dna","dog","door","door-open","dot","dot-outline","dots-nine","dots-six","dots-six-vertical","dots-three","dots-three-circle","dots-three-circle-vertical","dots-three-outline","dots-three-outline-vertical","dots-three-vertical","download","download-simple","dress","dresser","dribbble-logo","drone","drop","drop-half","drop-half-bottom","drop-simple","drop-slash","dropbox-logo","ear","ear-slash","egg","egg-crack","eject","eject-simple","elevator","engine","envelope","envelope-open","envelope-simple","envelope-simple-open","equalizer","equals","eraser","escalator-down","escalator-up","exam","exclamation-mark","exclude","exclude-square","export","eye","eye-closed","eye-slash","eyedropper","eyedropper-sample","eyeglasses","eyes","face-mask","facebook-logo","factory","faders","faders-horizontal","fallout-shelter","fan","farm","fast-forward","fast-forward-circle","feather","fediverse-logo","figma-logo","file","file-archive","file-arrow-down","file-arrow-up","file-audio","file-c","file-c-sharp","file-cloud","file-code","file-cpp","file-css","file-csv","file-dashed","file-dotted","file-doc","file-html","file-image","file-ini","file-jpg","file-js","file-jsx","file-lock","file-magnifying-glass","file-search","file-md","file-minus","file-pdf","file-plus","file-png","file-ppt","file-py","file-rs","file-sql","file-svg","file-text","file-ts","file-tsx","file-txt","file-video","file-vue","file-x","file-xls","file-zip","files","film-reel","film-script","film-slate","film-strip","fingerprint","fingerprint-simple","finn-the-human","fire","fire-extinguisher","fire-simple","fire-truck","first-aid","first-aid-kit","fish","fish-simple","flag","flag-banner","flag-banner-fold","flag-checkered","flag-pennant","flame","flashlight","flask","flip-horizontal","flip-vertical","floppy-disk","floppy-disk-back","flow-arrow","flower","flower-lotus","flower-tulip","flying-saucer","folder","folder-notch","folder-dashed","folder-dotted","folder-lock","folder-minus","folder-notch-minus","folder-open","folder-notch-open","folder-plus","folder-notch-plus","folder-simple","folder-simple-dashed","folder-simple-dotted","folder-simple-lock","folder-simple-minus","folder-simple-plus","folder-simple-star","folder-simple-user","folder-star","folder-user","folders","football","football-helmet","footprints","fork-knife","four-k","frame-corners","framer-logo","function","funnel","funnel-simple","funnel-simple-x","funnel-x","game-controller","garage","gas-can","gas-pump","gauge","gavel","gear","gear-fine","gear-six","gender-female","gender-intersex","gender-male","gender-neuter","gender-nonbinary","gender-transgender","ghost","gif","gift","git-branch","git-commit","git-diff","git-fork","git-merge","git-pull-request","github-logo","gitlab-logo","gitlab-logo-simple","globe","globe-hemisphere-east","globe-hemisphere-west","globe-simple","globe-simple-x","globe-stand","globe-x","goggles","golf","goodreads-logo","google-cardboard-logo","google-chrome-logo","google-drive-logo","google-logo","google-photos-logo","google-play-logo","google-podcasts-logo","gps","gps-fix","gps-slash","gradient","graduation-cap","grains","grains-slash","graph","graphics-card","greater-than","greater-than-or-equal","grid-four","grid-nine","guitar","hair-dryer","hamburger","hammer","hand","hand-arrow-down","hand-arrow-up","hand-coins","hand-deposit","hand-eye","hand-fist","hand-grabbing","hand-heart","hand-palm","hand-peace","hand-pointing","hand-soap","hand-swipe-left","hand-swipe-right","hand-tap","hand-waving","hand-withdraw","handbag","handbag-simple","hands-clapping","hands-praying","handshake","hard-drive","hard-drives","hard-hat","hash","hash-straight","head-circuit","headlights","headphones","headset","heart","heart-break","heart-half","heart-straight","heart-straight-break","heartbeat","hexagon","high-definition","high-heel","highlighter","highlighter-circle","hockey","hoodie","horse","hospital","hourglass","hourglass-high","hourglass-low","hourglass-medium","hourglass-simple","hourglass-simple-high","hourglass-simple-low","hourglass-simple-medium","house","house-line","house-simple","hurricane","ice-cream","identification-badge","identification-card","image","image-broken","image-square","images","images-square","infinity","lemniscate","info","instagram-logo","intersect","intersect-square","intersect-three","intersection","invoice","island","jar","jar-label","jeep","joystick","kanban","key","key-return","keyboard","keyhole","knife","ladder","ladder-simple","lamp","lamp-pendant","laptop","lasso","lastfm-logo","layout","leaf","lectern","lego","lego-smiley","less-than","less-than-or-equal","letter-circle-h","letter-circle-p","letter-circle-v","lifebuoy","lightbulb","lightbulb-filament","lighthouse","lightning","lightning-a","lightning-slash","line-segment","line-segments","line-vertical","link","link-break","link-simple","link-simple-break","link-simple-horizontal","link-simple-horizontal-break","linkedin-logo","linktree-logo","linux-logo","list","list-bullets","list-checks","list-dashes","list-heart","list-magnifying-glass","list-numbers","list-plus","list-star","lock","lock-key","lock-key-open","lock-laminated","lock-laminated-open","lock-open","lock-simple","lock-simple-open","lockers","log","magic-wand","magnet","magnet-straight","magnifying-glass","magnifying-glass-minus","magnifying-glass-plus","mailbox","map-pin","map-pin-area","map-pin-line","map-pin-plus","map-pin-simple","map-pin-simple-area","map-pin-simple-line","map-trifold","markdown-logo","marker-circle","martini","mask-happy","mask-sad","mastodon-logo","math-operations","matrix-logo","medal","medal-military","medium-logo","megaphone","megaphone-simple","member-of","memory","messenger-logo","meta-logo","meteor","metronome","microphone","microphone-slash","microphone-stage","microscope","microsoft-excel-logo","microsoft-outlook-logo","microsoft-powerpoint-logo","microsoft-teams-logo","microsoft-word-logo","minus","minus-circle","minus-square","money","money-wavy","monitor","monitor-arrow-up","monitor-play","moon","moon-stars","moped","moped-front","mosque","motorcycle","mountains","mouse","mouse-left-click","mouse-middle-click","mouse-right-click","mouse-scroll","mouse-simple","music-note","music-note-simple","music-notes","music-notes-minus","music-notes-plus","music-notes-simple","navigation-arrow","needle","network","network-slash","network-x","newspaper","newspaper-clipping","not-equals","not-member-of","not-subset-of","not-superset-of","notches","note","note-blank","note-pencil","notebook","notepad","notification","notion-logo","nuclear-plant","number-circle-eight","number-circle-five","number-circle-four","number-circle-nine","number-circle-one","number-circle-seven","number-circle-six","number-circle-three","number-circle-two","number-circle-zero","number-eight","number-five","number-four","number-nine","number-one","number-seven","number-six","number-square-eight","number-square-five","number-square-four","number-square-nine","number-square-one","number-square-seven","number-square-six","number-square-three","number-square-two","number-square-zero","number-three","number-two","number-zero","numpad","nut","ny-times-logo","octagon","office-chair","onigiri","open-ai-logo","option","orange","orange-slice","oven","package","paint-brush","paint-brush-broad","paint-brush-household","paint-bucket","paint-roller","palette","panorama","pants","paper-plane","paper-plane-right","paper-plane-tilt","paperclip","paperclip-horizontal","parachute","paragraph","parallelogram","park","password","path","patreon-logo","pause","pause-circle","paw-print","paypal-logo","peace","pen","pen-nib","pen-nib-straight","pencil","pencil-circle","pencil-line","pencil-ruler","pencil-simple","pencil-simple-line","pencil-simple-slash","pencil-slash","pentagon","pentagram","pepper","percent","person","person-arms-spread","person-simple","person-simple-bike","person-simple-circle","person-simple-hike","person-simple-run","person-simple-ski","person-simple-snowboard","person-simple-swim","person-simple-tai-chi","person-simple-throw","person-simple-walk","perspective","phone","phone-call","phone-disconnect","phone-incoming","phone-list","phone-outgoing","phone-pause","phone-plus","phone-slash","phone-transfer","phone-x","phosphor-logo","pi","piano-keys","picnic-table","picture-in-picture","piggy-bank","pill","ping-pong","pint-glass","pinterest-logo","pinwheel","pipe","pipe-wrench","pix-logo","pizza","placeholder","planet","plant","play","play-circle","play-pause","playlist","plug","plug-charging","plugs","plugs-connected","plus","plus-circle","plus-minus","plus-square","poker-chip","police-car","polygon","popcorn","popsicle","potted-plant","power","prescription","presentation","presentation-chart","printer","prohibit","prohibit-inset","projector-screen","projector-screen-chart","pulse","activity","push-pin","push-pin-simple","push-pin-simple-slash","push-pin-slash","puzzle-piece","qr-code","question","question-mark","queue","quotes","rabbit","racquet","radical","radio","radio-button","radioactive","rainbow","rainbow-cloud","ranking","read-cv-logo","receipt","receipt-x","record","rectangle","rectangle-dashed","recycle","reddit-logo","repeat","repeat-once","replit-logo","resize","rewind","rewind-circle","road-horizon","robot","rocket","rocket-launch","rows","rows-plus-bottom","rows-plus-top","rss","rss-simple","rug","ruler","sailboat","scales","scan","scan-smiley","scissors","scooter","screencast","screwdriver","scribble","scribble-loop","scroll","seal","circle-wavy","seal-check","circle-wavy-check","seal-percent","circle-wavy-question","seal-warning","circle-wavy-warning","seat","seatbelt","security-camera","selection","selection-all","selection-background","selection-foreground","selection-inverse","selection-plus","selection-slash","shapes","share","share-fat","share-network","shield","shield-check","shield-checkered","shield-chevron","shield-plus","shield-slash","shield-star","shield-warning","shipping-container","shirt-folded","shooting-star","shopping-bag","shopping-bag-open","shopping-cart","shopping-cart-simple","shovel","shower","shrimp","shuffle","shuffle-angular","shuffle-simple","sidebar","sidebar-simple","sigma","sign-in","sign-out","signature","signpost","sim-card","siren","sketch-logo","skip-back","skip-back-circle","skip-forward","skip-forward-circle","skull","skype-logo","slack-logo","sliders","sliders-horizontal","slideshow","smiley","smiley-angry","smiley-blank","smiley-meh","smiley-melting","smiley-nervous","smiley-sad","smiley-sticker","smiley-wink","smiley-x-eyes","snapchat-logo","sneaker","sneaker-move","snowflake","soccer-ball","sock","solar-panel","solar-roof","sort-ascending","sort-descending","soundcloud-logo","spade","sparkle","speaker-hifi","speaker-high","speaker-low","speaker-none","speaker-simple-high","speaker-simple-low","speaker-simple-none","speaker-simple-slash","speaker-simple-x","speaker-slash","speaker-x","speedometer","sphere","spinner","spinner-ball","spinner-gap","spiral","split-horizontal","split-vertical","spotify-logo","spray-bottle","square","square-half","square-half-bottom","square-logo","square-split-horizontal","square-split-vertical","squares-four","stack","stack-minus","stack-overflow-logo","stack-plus","stack-simple","stairs","stamp","standard-definition","star","star-and-crescent","star-four","star-half","star-of-david","steam-logo","steering-wheel","steps","stethoscope","sticker","stool","stop","stop-circle","storefront","strategy","stripe-logo","student","subset-of","subset-proper-of","subtitles","subtitles-slash","subtract","subtract-square","subway","suitcase","suitcase-rolling","suitcase-simple","sun","sun-dim","sun-horizon","sunglasses","superset-of","superset-proper-of","swap","swatches","swimming-pool","sword","synagogue","syringe","t-shirt","table","tabs","tag","tag-chevron","tag-simple","target","taxi","tea-bag","telegram-logo","television","television-simple","tennis-ball","tent","terminal","terminal-window","test-tube","text-a-underline","text-aa","text-align-center","text-align-justify","text-align-left","text-align-right","text-b","text-bolder","text-columns","text-h","text-h-five","text-h-four","text-h-one","text-h-six","text-h-three","text-h-two","text-indent","text-italic","text-outdent","text-strikethrough","text-subscript","text-superscript","text-t","text-t-slash","text-underline","textbox","thermometer","thermometer-cold","thermometer-hot","thermometer-simple","threads-logo","three-d","thumbs-down","thumbs-up","ticket","tidal-logo","tiktok-logo","tilde","timer","tip-jar","tipi","tire","toggle-left","toggle-right","toilet","toilet-paper","toolbox","tooth","tornado","tote","tote-simple","towel","tractor","trademark","trademark-registered","traffic-cone","traffic-sign","traffic-signal","train","train-regional","train-simple","tram","translate","trash","trash-simple","tray","tray-arrow-down","archive-tray","tray-arrow-up","treasure-chest","tree","tree-evergreen","tree-palm","tree-structure","tree-view","trend-down","trend-up","triangle","triangle-dashed","trolley","trolley-suitcase","trophy","truck","truck-trailer","tumblr-logo","twitch-logo","twitter-logo","umbrella","umbrella-simple","union","unite","unite-square","upload","upload-simple","usb","user","user-check","user-circle","user-circle-check","user-circle-dashed","user-circle-gear","user-circle-minus","user-circle-plus","user-focus","user-gear","user-list","user-minus","user-plus","user-rectangle","user-sound","user-square","user-switch","users","users-four","users-three","van","vault","vector-three","vector-two","vibrate","video","video-camera","video-camera-slash","video-conference","vignette","vinyl-record","virtual-reality","virus","visor","voicemail","volleyball","wall","wallet","warehouse","warning","warning-circle","warning-diamond","warning-octagon","washing-machine","watch","wave-sawtooth","wave-sine","wave-square","wave-triangle","waveform","waveform-slash","waves","webcam","webcam-slash","webhooks-logo","wechat-logo","whatsapp-logo","wheelchair","wheelchair-motion","wifi-high","wifi-low","wifi-medium","wifi-none","wifi-slash","wifi-x","wind","windmill","windows-logo","wine","wrench","x","x-circle","x-square","yarn","yin-yang","youtube-logo"],business:["briefcase","briefcase-fill","building","building-fill","chart-bar","chart-bar-fill","chart-line","chart-line-fill","currency-dollar","currency-dollar-fill","presentation","presentation-fill","users","users-fill"],communication:["chat","chat-fill","envelope","envelope-fill","phone","phone-fill","video-camera","video-camera-fill","microphone","microphone-fill","speaker","speaker-fill"],design:["palette","palette-fill","paint-brush","paint-brush-fill","scissors","scissors-fill","crop","crop-fill"],development:["code","code-fill","terminal","terminal-fill","bug","bug-fill","git-branch","git-branch-fill"],document:["file","file-fill","file-text","file-text-fill","file-pdf","file-pdf-fill","folder","folder-fill"],editor:["pencil","pencil-fill","text-b","text-b-fill","text-italic","text-italic-fill","list","list-fill"],finance:["currency-dollar","currency-dollar-fill","credit-card","credit-card-fill","bank","bank-fill"],health:["heart","heart-fill","stethoscope","stethoscope-fill","pill","pill-fill"],logistics:["truck","truck-fill","package","package-fill","map-pin","map-pin-fill"],map:["map","map-fill","map-pin","map-pin-fill","navigation","navigation-fill"],media:["play","play-fill","pause","pause-fill","stop","stop-fill","image","image-fill","video-camera","video-camera-fill"],system:["gear","gear-fill","settings","settings-fill","cog","cog-fill"],user:["user","user-fill","users","users-fill","user-circle","user-circle-fill"],weather:["sun","sun-fill","cloud","cloud-fill","rain","rain-fill","snow","snow-fill"]};function Zh(t,e,n){const i=t.slice();return i[23]=e[n],i}const z2=t=>({item:t&16}),Jh=t=>({item:t[23].data});function j2(t){let e;return{c(){e=Ee("Missing template")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function xh(t,e){let n,i,l;const r=e[14].default,o=Ut(r,e,e[13],Jh),u=o||j2();return{key:t,first:null,c(){n=v("svelte-virtual-list-row"),u&&u.c(),i=Q(),ao(n,"class","svelte-1tqh76q"),this.first=n},m(s,a){A(s,n,a),u&&u.m(n,null),S(n,i),l=!0},p(s,a){e=s,o&&o.p&&(!l||a&8208)&&zt(o,r,e,e[13],l?Ht(r,e[13],a,z2):jt(e[13]),Jh)},i(s){l||(U(u,s),l=!0)},o(s){Z(u,s),l=!1},d(s){s&&C(n),u&&u.d(s)}}}function q2(t){let e,n,i=[],l=new Map,r,o,u,s,a=Ce(t[4]);const f=c=>c[23].index;for(let c=0;c<a.length;c+=1){let g=Zh(t,a,c),h=f(g);l.set(h,i[c]=xh(h,g))}return{c(){e=v("svelte-virtual-list-viewport"),n=v("svelte-virtual-list-contents");for(let c=0;c<i.length;c+=1)i[c].c();P(n,"padding-top",t[5]+"px"),P(n,"padding-bottom",t[6]+"px"),ao(n,"class","svelte-1tqh76q"),P(e,"height",t[0]),ao(e,"class","svelte-1tqh76q"),ni(()=>t[17].call(e))},m(c,g){A(c,e,g),S(e,n);for(let h=0;h<i.length;h+=1)i[h]&&i[h].m(n,null);t[15](n),t[16](e),r=fo(e,t[17].bind(e)),o=!0,u||(s=B(e,"scroll",t[7]),u=!0)},p(c,[g]){g&8208&&(a=Ce(c[4]),He(),i=Tt(i,g,f,1,c,a,l,n,Di,xh,null,Zh),ze()),(!o||g&32)&&P(n,"padding-top",c[5]+"px"),(!o||g&64)&&P(n,"padding-bottom",c[6]+"px"),(!o||g&1)&&P(e,"height",c[0])},i(c){if(!o){for(let g=0;g<a.length;g+=1)U(i[g]);o=!0}},o(c){for(let g=0;g<i.length;g+=1)Z(i[g]);o=!1},d(c){c&&C(e);for(let g=0;g<i.length;g+=1)i[g].d();t[15](null),t[16](null),r(),u=!1,s()}}}function W2(t,e,n){let{$$slots:i={},$$scope:l}=e,{items:r}=e,{height:o="100%"}=e,{itemHeight:u=void 0}=e,{start:s=0}=e,{end:a=0}=e,f=[],c,g,h,d=0,_,b,w=0,E=0,k;async function I(V,W,ne){const{scrollTop:H}=g;await le.tick();let $=w-H,Y=s;for(;$<W&&Y<V.length;){let oe=c[Y-s];oe||(n(9,a=Y+1),await le.tick(),oe=c[Y-s]);const ie=f[Y]=ne||oe.offsetHeight;$+=ie,Y+=1}n(9,a=Y);const G=V.length-a;k=(w+$)/a,n(6,E=G*k),f.length=V.length}async function O(){const{scrollTop:V}=g,W=s;for(let Y=0;Y<c.length;Y+=1)f[s+Y]=u||c[Y].offsetHeight;let ne=0,H=0;for(;ne<r.length;){const Y=f[ne]||k;if(H+Y>V){n(8,s=ne),n(5,w=H);break}H+=Y,ne+=1}for(;ne<r.length&&(H+=f[ne]||k,ne+=1,!(H>V+d)););n(9,a=ne);const $=r.length-a;for(k=H/a;ne<r.length;)f[ne++]=k;if(n(6,E=$*k),s<W){await le.tick();let Y=0,G=0;for(let ie=s;ie<W;ie+=1)c[ie-s]&&(Y+=f[ie],G+=u||c[ie-s].offsetHeight);const oe=G-Y;g.scrollTo(0,V+oe)}}le.onMount(()=>{c=h.getElementsByTagName("svelte-virtual-list-row"),n(12,b=!0)});function D(V){Be[V?"unshift":"push"](()=>{h=V,n(3,h)})}function N(V){Be[V?"unshift":"push"](()=>{g=V,n(2,g)})}function M(){d=this.offsetHeight,n(1,d)}return t.$$set=V=>{"items"in V&&n(10,r=V.items),"height"in V&&n(0,o=V.height),"itemHeight"in V&&n(11,u=V.itemHeight),"start"in V&&n(8,s=V.start),"end"in V&&n(9,a=V.end),"$$scope"in V&&n(13,l=V.$$scope)},t.$$.update=()=>{t.$$.dirty&1792&&n(4,_=r.slice(s,a).map((V,W)=>({index:W+s,data:V}))),t.$$.dirty&7170&&b&&I(r,d,u)},[o,d,g,h,_,w,E,O,s,a,r,u,b,l,i,D,N,M]}class G2 extends Ze{constructor(e){super(),Qe(this,e,W2,q2,Ye,{items:10,height:0,itemHeight:11,start:8,end:9})}}function $h(t,e,n){const i=t.slice();return i[36]=e[n],i}function e1(t,e,n){const i=t.slice();return i[39]=e[n],i}function Y2(t){let e;return{c(){e=v("div"),e.innerHTML='<i class="ph ph-image"></i>',m(e,"class","empty-state svelte-1wt5me1")},m(n,i){A(n,e,i)},p:ue,d(n){n&&C(e)}}}function K2(t){let e,n;return{c(){e=v("i"),m(e,"class",n="ph ph-"+t[10]+" svelte-1wt5me1")},m(i,l){A(i,e,l)},p(i,l){l[0]&1024&&n!==(n="ph ph-"+i[10]+" svelte-1wt5me1")&&m(e,"class",n)},d(i){i&&C(e)}}}function t1(t){let e,n=Ce(t[5]),i=[];for(let l=0;l<n.length;l+=1)i[l]=n1(e1(t,n,l));return{c(){e=v("div");for(let l=0;l<i.length;l+=1)i[l].c();m(e,"class","category-tabs svelte-1wt5me1")},m(l,r){A(l,e,r);for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(e,null)},p(l,r){if(r[0]&48){n=Ce(l[5]);let o;for(o=0;o<n.length;o+=1){const u=e1(l,n,o);i[o]?i[o].p(u,r):(i[o]=n1(u),i[o].c(),i[o].m(e,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=n.length}},d(l){l&&C(e),St(i,l)}}}function n1(t){let e,n=t[39].label+"",i,l,r,o,u;function s(){return t[23](t[39])}return{c(){e=v("button"),i=Ee(n),l=Q(),m(e,"aria-label",r=`Show ${t[39].label} icons`),m(e,"class","svelte-1wt5me1"),p(e,"selected",t[4]===t[39].id)},m(a,f){A(a,e,f),S(e,i),S(e,l),o||(u=B(e,"click",s),o=!0)},p(a,f){t=a,f[0]&32&&n!==(n=t[39].label+"")&&Pe(i,n),f[0]&32&&r!==(r=`Show ${t[39].label} icons`)&&m(e,"aria-label",r),f[0]&48&&p(e,"selected",t[4]===t[39].id)},d(a){a&&C(e),o=!1,u()}}}function i1(t){let e,n,i;return{c(){e=v("button"),e.innerHTML='<i class="ph ph-x"></i>',m(e,"class","clear-search svelte-1wt5me1"),m(e,"aria-label","Clear search")},m(l,r){A(l,e,r),n||(i=B(e,"click",t[25]),n=!0)},p:ue,d(l){l&&C(e),n=!1,i()}}}function X2(t){let e;return{c(){e=v("div"),e.innerHTML='<i class="ph ph-magnifying-glass svelte-1wt5me1"></i> <p>No icons found</p>',m(e,"class","no-results svelte-1wt5me1")},m(n,i){A(n,e,i)},p:ue,i:ue,o:ue,d(n){n&&C(e)}}}function Q2(t){let e,n;return e=new G2({props:{items:t[11],itemHeight:t[14],height:t[12],width:"100%",$$slots:{default:[Z2,({item:i,index:l,style:r})=>({33:i,34:l,35:r}),({item:i,index:l,style:r})=>[0,(i?4:0)|(l?8:0)|(r?16:0)]]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&2048&&(r.items=i[11]),l[0]&4096&&(r.height=i[12]),l[0]&1536|l[1]&2068&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function l1(t){let e,n,i,l,r,o,u;function s(){return t[26](t[36])}function a(...c){return t[27](t[36],...c)}function f(){return t[28](t[36])}return{c(){e=v("button"),n=v("i"),l=Q(),m(n,"class",i="ph ph-"+t[36]+" svelte-1wt5me1"),m(e,"class","icon-button svelte-1wt5me1"),m(e,"aria-label",r=`Select ${t[36]} icon`),m(e,"tabindex","0"),p(e,"selected",t[10]===t[36])},m(c,g){A(c,e,g),S(e,n),S(e,l),o||(u=[B(e,"click",s),B(e,"keydown",a),B(e,"mouseenter",f),B(e,"mouseleave",t[29])],o=!0)},p(c,g){t=c,g[1]&4&&i!==(i="ph ph-"+t[36]+" svelte-1wt5me1")&&m(n,"class",i),g[1]&4&&r!==(r=`Select ${t[36]} icon`)&&m(e,"aria-label",r),g[0]&1024|g[1]&4&&p(e,"selected",t[10]===t[36])},d(c){c&&C(e),o=!1,Ve(u)}}}function Z2(t){let e,n,i=Ce(t[33]),l=[];for(let r=0;r<i.length;r+=1)l[r]=l1($h(t,i,r));return{c(){e=v("div");for(let r=0;r<l.length;r+=1)l[r].c();m(e,"class","icons-row svelte-1wt5me1"),m(e,"style",n=t[35])},m(r,o){A(r,e,o);for(let u=0;u<l.length;u+=1)l[u]&&l[u].m(e,null)},p(r,o){if(o[0]&460288|o[1]&4){i=Ce(r[33]);let u;for(u=0;u<i.length;u+=1){const s=$h(r,i,u);l[u]?l[u].p(s,o):(l[u]=l1(s),l[u].c(),l[u].m(e,null))}for(;u<l.length;u+=1)l[u].d(1);l.length=i.length}o[1]&16&&n!==(n=r[35])&&m(e,"style",n)},d(r){r&&C(e),St(l,r)}}}function r1(t){let e,n,i;return{c(){e=v("button"),e.innerHTML='<i class="ph ph-x"></i> Clear',m(e,"class","clear-button svelte-1wt5me1")},m(l,r){A(l,e,r),n||(i=B(e,"click",t[19]),n=!0)},p:ue,d(l){l&&C(e),n=!1,i()}}}function J2(t){let e,n,i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E=t[1].showCategories&&t1(t),k=t[3]&&i1(t);const I=[Q2,X2],O=[];function D(M,V){return M[11].length>0?0:1}c=D(t),g=O[c]=I[c](t);let N=t[0]&&r1(t);return{c(){e=v("div"),n=v("div"),E&&E.c(),i=Q(),l=v("div"),r=v("i"),o=Q(),u=v("input"),s=Q(),k&&k.c(),a=Q(),f=v("div"),g.c(),h=Q(),d=v("div"),N&&N.c(),m(r,"class","ph ph-magnifying-glass search-icon svelte-1wt5me1"),m(u,"type","text"),m(u,"placeholder","Search icons..."),m(u,"class","search-input svelte-1wt5me1"),m(u,"aria-label","Search icons"),m(l,"class","search-container svelte-1wt5me1"),m(n,"class","header svelte-1wt5me1"),m(f,"class","icons-grid-container svelte-1wt5me1"),m(d,"class","footer svelte-1wt5me1"),m(e,"class","icon-picker svelte-1wt5me1"),P(e,"--icon-size",ty),P(e,"--icon-padding",o1),P(e,"--items-per-row",t[6]),P(e,"--row-height",t[15]),p(e,"with-categories",t[1].showCategories)},m(M,V){A(M,e,V),S(e,n),E&&E.m(n,null),S(n,i),S(n,l),S(l,r),S(l,o),S(l,u),Zt(u,t[3]),S(l,s),k&&k.m(l,null),S(e,a),S(e,f),O[c].m(f,null),S(e,h),S(e,d),N&&N.m(d,null),_=!0,b||(w=B(u,"input",t[24]),b=!0)},p(M,V){M[1].showCategories?E?E.p(M,V):(E=t1(M),E.c(),E.m(n,i)):E&&(E.d(1),E=null),V[0]&8&&u.value!==M[3]&&Zt(u,M[3]),M[3]?k?k.p(M,V):(k=i1(M),k.c(),k.m(l,null)):k&&(k.d(1),k=null);let W=c;c=D(M),c===W?O[c].p(M,V):(He(),Z(O[W],1,1,()=>{O[W]=null}),ze(),g=O[c],g?g.p(M,V):(g=O[c]=I[c](M),g.c()),U(g,1),g.m(f,null)),M[0]?N?N.p(M,V):(N=r1(M),N.c(),N.m(d,null)):N&&(N.d(1),N=null),(!_||V[0]&64)&&P(e,"--items-per-row",M[6]),(!_||V[0]&2)&&p(e,"with-categories",M[1].showCategories)},i(M){_||(U(g),_=!0)},o(M){Z(g),_=!1},d(M){M&&C(e),E&&E.d(),k&&k.d(),O[c].d(),N&&N.d(),b=!1,w()}}}function x2(t){let e,n,i,l,r,o,u;function s(c,g){return c[0]?K2:Y2}let a=s(t),f=a(t);return l=new wn({props:{open:t[7],anchor:t[8],align:t[2],$$slots:{default:[J2]},$$scope:{ctx:t}}}),l.$on("close",t[30]),{c(){e=v("div"),f.c(),i=Q(),We(l.$$.fragment),m(e,"class","preview-icon svelte-1wt5me1"),m(e,"tabindex",n=t[13]?-1:0),m(e,"role","button"),m(e,"aria-haspopup","dialog"),m(e,"aria-expanded",t[7]),m(e,"aria-label","Select icon"),p(e,"readonly",t[13])},m(c,g){A(c,e,g),f.m(e,null),t[20](e),A(c,i,g),je(l,c,g),r=!0,o||(u=[B(e,"click",function(){Ge(t[13]?null:t[21])&&(t[13]?null:t[21]).apply(this,arguments)}),B(e,"keydown",t[22])],o=!0)},p(c,g){t=c,a===(a=s(t))&&f?f.p(t,g):(f.d(1),f=a(t),f&&(f.c(),f.m(e,null))),(!r||g[0]&8192&&n!==(n=t[13]?-1:0))&&m(e,"tabindex",n),(!r||g[0]&128)&&m(e,"aria-expanded",t[7]),(!r||g[0]&8192)&&p(e,"readonly",t[13]);const h={};g[0]&128&&(h.open=t[7]),g[0]&256&&(h.anchor=t[8]),g[0]&4&&(h.align=t[2]),g[0]&7803|g[1]&2048&&(h.$$scope={dirty:g,ctx:t}),l.$set(h)},i(c){r||(U(l.$$.fragment,c),r=!0)},o(c){Z(l.$$.fragment,c),r=!1},d(c){c&&(C(e),C(i)),f.d(),t[20](null),qe(l,c),o=!1,Ve(u)}}}const rs=32,$2=8,ey=8,ty=24,o1=4;function ny(t,e,n){let i,l,r,o,{value:u}=e,{cellOptions:s={}}=e,{align:a="left"}=e,f=!1,c,g="",h="all",d="";const _=le.createEventDispatcher();let b="";const w=rs,E=rs+o1*2;let k=[];function I(j,K,x,X){const F=i.find(me=>me.id===x);if(!F)return[];let R=[...F.icons];if(X){const me=X.toLowerCase();R=R.filter(se=>se.replace(/-line|-fill$/,"").toLowerCase().includes(me))}const z=[];for(let me=0;me<R.length;me+=K)z.push(R.slice(me,me+K));return z}const O=j=>{const K=j,x=K===u?"":K;n(0,u=x),_("change",x),n(7,f=!1)};function D(j){n(9,d=`ph ph-${j}`)}const N=(j,K)=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),O(K))},M=()=>{n(0,u=""),_("change",null),n(9,d=null)};function V(j){Be[j?"unshift":"push"](()=>{c=j,n(8,c)})}const W=()=>{n(7,f=!f)},ne=j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),l||n(7,f=!f))},H=j=>n(4,h=j.id);function $(){g=this.value,n(3,g)}const Y=()=>n(3,g=""),G=j=>O(j),oe=(j,K)=>N(K,j),ie=j=>D(j),J=()=>n(9,d=""),q=()=>n(7,f=!1);return t.$$set=j=>{"value"in j&&n(0,u=j.value),"cellOptions"in j&&n(1,s=j.cellOptions),"align"in j&&n(2,a=j.align)},t.$$.update=()=>{if(t.$$.dirty[0]&48&&i.length>0&&!h&&n(4,h="all"),t.$$.dirty[0]&2&&n(13,l=(s==null?void 0:s.readonly)||(s==null?void 0:s.disabled)),t.$$.dirty[0]&1)if(u){let j=u.startsWith("ph-")?u.slice(3):u;n(10,b=j)}else n(10,b="");t.$$.dirty[0]&2&&n(6,r=s!=null&&s.showCategories?9:6),t.$$.dirty[0]&89&&n(11,k=I(u,r,h,g))},n(5,i=Object.entries(U2).map(([j,K])=>({id:j,label:K,icons:H2[j]||[]}))),n(12,o=rs*$2+ey*2),[u,s,a,g,h,i,r,f,c,d,b,k,o,l,w,E,O,D,N,M,V,W,ne,H,$,Y,G,oe,ie,J,q]}class iy extends Ze{constructor(e){super(),Qe(this,e,ny,x2,Ye,{value:0,cellOptions:1,align:2},null,[-1,-1])}}function s1(t,e,n){const i=t.slice();return i[55]=e[n],i[66]=e,i[57]=n,i}function u1(t,e,n){const i=t.slice();return i[55]=e[n],i[67]=e,i[57]=n,i}function a1(t,e,n){const i=t.slice();return i[55]=e[n],i[56]=e,i[57]=n,i}function f1(t,e,n){const i=t.slice();return i[58]=e[n],i}function c1(t,e,n){const i=t.slice();return i[55]=e[n],i[61]=e,i[57]=n,i}function d1(t,e,n){const i=t.slice();return i[58]=e[n],i}function h1(t,e,n){const i=t.slice();return i[58]=e[n],i}function ly(t){let e,n=[],i=new Map,l,r=Ce(t[4]);const o=f=>f[55][f[12]];for(let f=0;f<r.length;f+=1){let c=u1(t,r,f),g=o(c);i.set(g,n[f]=g1(g,c))}function u(f,c){var g;return f[5]&&f[5].loaded?uy:(g=f[5])!=null&&g.loading&&!f[5].loaded?sy:oy}let s=u(t),a=s(t);return{c(){e=v("div");for(let f=0;f<n.length;f+=1)n[f].c();l=Q(),a.c(),m(e,"class","options svelte-azp8h9")},m(f,c){A(f,e,c);for(let g=0;g<n.length;g+=1)n[g]&&n[g].m(e,null);S(e,l),a.m(e,null)},p(f,c){c[0]&25622&&(r=Ce(f[4]),n=Tt(n,c,o,1,f,r,i,e,nn,g1,l,u1)),s===(s=u(f))&&a?a.p(f,c):(a.d(1),a=s(f),a&&(a.c(),a.m(e,null)))},d(f){f&&C(e);for(let c=0;c<n.length;c+=1)n[c].d();a.d()}}}function ry(t){let e,n,i,l,r,o=[],u=new Map,s,a,f,c,g=Ce(t[0]),h=[];for(let I=0;I<g.length;I+=1)h[I]=w1(h1(t,g,I));let d=Ce(t[4]);const _=I=>I[55][I[12]];for(let I=0;I<d.length;I+=1){let O=c1(t,d,I),D=_(O);u.set(D,o[I]=y1(D,O))}let b=t[5]&&t[5].loaded&&E1(t);function w(I,O){var D,N,M,V,W;if((D=I[5])!=null&&D.loading)return cy;if((N=I[5])!=null&&N.loading&&!I[5].loaded)return fy;if(!((M=I[5])!=null&&M.loading)&&((V=I[5])!=null&&V.loaded)&&!((W=I[5].rows)!=null&&W.length))return ay}let E=w(t),k=E&&E(t);return{c(){e=v("div"),n=v("div");for(let I=0;I<h.length;I+=1)h[I].c();i=Q(),l=v("div"),r=Q();for(let I=0;I<o.length;I+=1)o[I].c();s=Q(),b&&b.c(),a=Q(),k&&k.c(),m(l,"class","header-cell check svelte-azp8h9"),m(n,"class","header-row svelte-azp8h9"),m(e,"class","grid-container svelte-azp8h9"),P(e,"--num-cols",t[9])},m(I,O){A(I,e,O),S(e,n);for(let D=0;D<h.length;D+=1)h[D]&&h[D].m(n,null);S(n,i),S(n,l),S(e,r);for(let D=0;D<o.length;D+=1)o[D]&&o[D].m(e,null);S(e,s),b&&b.m(e,null),S(e,a),k&&k.m(e,null),f||(c=B(e,"scroll",t[16]),f=!0)},p(I,O){if(O[0]&1){g=Ce(I[0]);let D;for(D=0;D<g.length;D+=1){const N=h1(I,g,D);h[D]?h[D].p(N,O):(h[D]=w1(N),h[D].c(),h[D].m(n,i))}for(;D<h.length;D+=1)h[D].d(1);h.length=g.length}O[0]&24599&&(d=Ce(I[4]),o=Tt(o,O,_,1,I,d,u,e,nn,y1,s,c1)),I[5]&&I[5].loaded?b?b.p(I,O):(b=E1(I),b.c(),b.m(e,a)):b&&(b.d(1),b=null),E!==(E=w(I))&&(k&&k.d(1),k=E&&E(I),k&&(k.c(),k.m(e,null))),O[0]&512&&P(e,"--num-cols",I[9])},d(I){I&&C(e),St(h,I);for(let O=0;O<o.length;O+=1)o[O].d();b&&b.d(),k&&k.d(),f=!1,c()}}}function g1(t,e){let n,i=(e[55].primaryDisplay||e[55][e[10]])+"",l,r,o,u=e[57],s,a;const f=()=>e[39](n,u),c=()=>e[39](null,u);function g(){return e[40](e[57])}function h(){return e[42](e[55])}return{key:t,first:null,c(){n=v("div"),l=Ee(i),r=Q(),o=v("i"),m(o,"class","ri-check-line"),m(n,"class","option svelte-azp8h9"),p(n,"selected",e[13](e[55])),p(n,"highlighted",e[1]==e[57]),this.first=n},m(d,_){A(d,n,_),S(n,l),S(n,r),S(n,o),f(),s||(a=[B(n,"mouseenter",g),B(n,"mouseleave",e[41]),B(n,"mousedown",Qt(Et(h)))],s=!0)},p(d,_){e=d,_[0]&1040&&i!==(i=(e[55].primaryDisplay||e[55][e[10]])+"")&&Pe(l,i),u!==e[57]&&(c(),u=e[57],f()),_[0]&8208&&p(n,"selected",e[13](e[55])),_[0]&18&&p(n,"highlighted",e[1]==e[57])},d(d){d&&C(n),c(),s=!1,Ve(a)}}}function oy(t){let e;return{c(){e=v("div"),e.textContent="No Results Found",m(e,"class","option svelte-azp8h9")},m(n,i){A(n,e,i)},p:ue,d(n){n&&C(e)}}}function sy(t){let e;return{c(){e=v("div"),e.innerHTML=`<i class="ri-loader-2-line rotating"></i>
|
|
19
|
-
|
|
20
|
-
Loading more...`,m(e,"class","option loading svelte-azp8h9")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function w1(t){let e,n=t[58].displayName+"",i;return{c(){e=v("div"),i=Ee(n),m(e,"class","header-cell svelte-azp8h9")},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&1&&n!==(n=l[58].displayName+"")&&Pe(i,n)},d(l){l&&C(e)}}}function k1(t){let e,n=(t[55][t[58].name]||"")+"",i;return{c(){e=v("div"),i=Ee(n),m(e,"class","data-cell svelte-azp8h9")},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&17&&n!==(n=(l[55][l[58].name]||"")+"")&&Pe(i,n)},d(l){l&&C(e)}}}function y1(t,e){let n,i,l,r=e[57],o,u,s=Ce(e[0]),a=[];for(let d=0;d<s.length;d+=1)a[d]=k1(d1(e,s,d));const f=()=>e[31](n,r),c=()=>e[31](null,r);function g(){return e[32](e[57])}function h(){return e[34](e[55])}return{key:t,first:null,c(){n=v("div");for(let d=0;d<a.length;d+=1)a[d].c();i=Q(),l=v("div"),l.innerHTML='<i class="ri-check-line svelte-azp8h9"></i>',m(l,"class","data-cell check svelte-azp8h9"),m(n,"class","data-row svelte-azp8h9"),p(n,"selected",e[13](e[55])),p(n,"highlighted",e[1]==e[57]),this.first=n},m(d,_){A(d,n,_);for(let b=0;b<a.length;b+=1)a[b]&&a[b].m(n,null);S(n,i),S(n,l),f(),o||(u=[B(n,"mouseenter",g),B(n,"mouseleave",e[33]),B(n,"mousedown",Et(h))],o=!0)},p(d,_){if(e=d,_[0]&17){s=Ce(e[0]);let b;for(b=0;b<s.length;b+=1){const w=d1(e,s,b);a[b]?a[b].p(w,_):(a[b]=k1(w),a[b].c(),a[b].m(n,i))}for(;b<a.length;b+=1)a[b].d(1);a.length=s.length}r!==e[57]&&(c(),r=e[57],f()),_[0]&8208&&p(n,"selected",e[13](e[55])),_[0]&18&&p(n,"highlighted",e[1]==e[57])},d(d){d&&C(n),St(a,d),c(),o=!1,Ve(u)}}}function E1(t){let e=t[4].length,n,i=A1(t);return{c(){i.c(),n=Fe()},m(l,r){i.m(l,r),A(l,n,r)},p(l,r){r[0]&16&&Ye(e,e=l[4].length)?(i.d(1),i=A1(l),i.c(),i.m(n.parentNode,n)):i.p(l,r)},d(l){l&&C(n),i.d(l)}}}function v1(t){let e,n,i,l,r=t[57],o,u,s=Ce(t[0]),a=[];for(let d=0;d<s.length;d+=1)a[d]=S1(f1(t,s,d));const f=()=>t[35](e,r),c=()=>t[35](null,r);function g(){return t[36](t[57])}function h(){return t[38](t[55])}return{c(){e=v("div");for(let d=0;d<a.length;d+=1)a[d].c();n=Q(),i=v("div"),i.innerHTML='<i class="ri-check-line svelte-azp8h9"></i>',l=Q(),m(i,"class","data-cell check svelte-azp8h9"),m(e,"class","data-row svelte-azp8h9"),p(e,"highlighted",t[1]==t[57]+t[4].length)},m(d,_){A(d,e,_);for(let b=0;b<a.length;b+=1)a[b]&&a[b].m(e,null);S(e,n),S(e,i),S(e,l),f(),o||(u=[B(e,"mouseenter",g),B(e,"mouseleave",t[37]),B(e,"mousedown",Et(h))],o=!0)},p(d,_){if(t=d,_[0]&33){s=Ce(t[0]);let b;for(b=0;b<s.length;b+=1){const w=f1(t,s,b);a[b]?a[b].p(w,_):(a[b]=S1(w),a[b].c(),a[b].m(e,n))}for(;b<a.length;b+=1)a[b].d(1);a.length=s.length}r!==t[57]&&(c(),r=t[57],f()),_[0]&50&&p(e,"highlighted",t[1]==t[57]+t[4].length)},d(d){d&&C(e),St(a,d),c(),o=!1,Ve(u)}}}function S1(t){let e,n=(t[55][t[58].name]||"")+"",i;return{c(){e=v("div"),i=Ee(n),m(e,"class","data-cell svelte-azp8h9")},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&33&&n!==(n=(l[55][l[58].name]||"")+"")&&Pe(i,n)},d(l){l&&C(e)}}}function C1(t,e){let n,i=!e[13](e[55]),l,r=i&&v1(e);return{key:t,first:null,c(){n=Fe(),r&&r.c(),l=Fe(),this.first=n},m(o,u){A(o,n,u),r&&r.m(o,u),A(o,l,u)},p(o,u){e=o,u[0]&32&&(i=!e[13](e[55])),i?r?r.p(e,u):(r=v1(e),r.c(),r.m(l.parentNode,l)):r&&(r.d(1),r=null)},d(o){o&&(C(n),C(l)),r&&r.d(o)}}}function A1(t){let e=[],n=new Map,i,l=Ce(t[5].rows);const r=o=>o[55][o[12]];for(let o=0;o<l.length;o+=1){let u=a1(t,l,o),s=r(u);n.set(s,e[o]=C1(s,u))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Fe()},m(o,u){for(let s=0;s<e.length;s+=1)e[s]&&e[s].m(o,u);A(o,i,u)},p(o,u){u[0]&24631&&(l=Ce(o[5].rows),e=Tt(e,u,r,1,o,l,n,i.parentNode,nn,C1,i,a1))},d(o){o&&C(i);for(let u=0;u<e.length;u+=1)e[u].d(o)}}}function ay(t){let e;return{c(){e=v("div"),e.innerHTML='<div class="data-cell svelte-azp8h9" style="grid-column: 1 / -1;">No Results Found</div>',m(e,"class","data-row svelte-azp8h9")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function fy(t){let e;return{c(){e=v("div"),e.innerHTML='<div class="data-cell svelte-azp8h9" style="grid-column: 1 / -1;"><i class="ri-loader-2-line rotating svelte-azp8h9"></i> Loading...</div>',m(e,"class","data-row loading svelte-azp8h9")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function cy(t){let e;return{c(){e=v("div"),e.innerHTML='<div class="data-cell svelte-azp8h9" style="grid-column: 1 / -1;"><i class="ri-loader-2-line rotating svelte-azp8h9"></i> Loading more...</div>',m(e,"class","data-row loading svelte-azp8h9")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function dy(t){let e,n,i,l,r,o,u,s,a,f,c,g;function h(b,w){return b[0]&&b[0].length>1?ry:ly}let d=h(t),_=d(t);return{c(){var b,w,E,k,I;e=v("div"),n=v("div"),i=v("i"),r=Q(),o=v("input"),s=Q(),a=v("div"),f=v("div"),_.c(),m(i,"class",l=(b=t[5])!=null&&b.loading&&Jr?"ri-loader-2-line":(w=t[6])!=null&&w.value?"ri-filter-fill":"ri-search-line"),P(i,"color",t[7]?"var(--spectrum-global-color-blue-400)":"var(--spectrum-global-color-gray-700)"),m(o,"class","search"),m(o,"type","text"),m(o,"placeholder",u=(E=t[5])!=null&&E.loading&&!((I=(k=t[5])==null?void 0:k.rows)!=null&&I.length)&&Jr?"Loading...":"Search"),p(o,"placeholder",!t[7]),m(n,"class","searchControl svelte-azp8h9"),m(f,"class","list svelte-azp8h9"),p(f,"table-mode",t[0]&&t[0].length>0),m(a,"class","listWrapper svelte-azp8h9"),m(e,"class","control svelte-azp8h9")},m(b,w){A(b,e,w),S(e,n),S(n,i),S(n,r),S(n,o),t[29](o),S(e,s),S(e,a),S(a,f),_.m(f,null),t[47](f),c||(g=[B(o,"input",t[15]),B(o,"keydown",t[17]),B(o,"blur",t[30]),B(f,"scroll",t[16]),B(a,"mousedown",Et(hy))],c=!0)},p(b,w){var E,k,I,O,D;w[0]&96&&l!==(l=(E=b[5])!=null&&E.loading&&Jr?"ri-loader-2-line":(k=b[6])!=null&&k.value?"ri-filter-fill":"ri-search-line")&&m(i,"class",l),w[0]&128&&P(i,"color",b[7]?"var(--spectrum-global-color-blue-400)":"var(--spectrum-global-color-gray-700)"),w[0]&32&&u!==(u=(I=b[5])!=null&&I.loading&&!((D=(O=b[5])==null?void 0:O.rows)!=null&&D.length)&&Jr?"Loading...":"Search")&&m(o,"placeholder",u),w[0]&128&&p(o,"placeholder",!b[7]),d===(d=h(b))&&_?_.p(b,w):(_.d(1),_=d(b),_&&(_.c(),_.m(f,null))),w[0]&1&&p(f,"table-mode",b[0]&&b[0].length>0)},i:ue,o:ue,d(b){b&&C(e),t[29](null),_.d(),t[47](null),c=!1,Ve(g)}}}let os=15,Jr=!0;const hy=()=>{};function gy(t,e,n){let i,l,r,o,u,s,a,f,c=ue,g=()=>(c(),c=ft(Y,ke=>n(5,f=ke)),Y);t.$$.on_destroy.push(()=>c());const{API:h,fetchData:d,QueryUtils:_}=le.getContext("sdk"),b=le.createEventDispatcher();let{value:w=[]}=e,{fieldSchema:E}=e,{filter:k=[]}=e,{relatedColumns:I=(E==null?void 0:E.relatedColumns)||[]}=e,{multi:O=!1}=e,D=E.tableId,N=(E==null?void 0:E.relatedField)||"id",M=-1,V,W,ne,H=!0,$=[],Y,G,oe=os;const ie=(ke,ce)=>{var Ae,Ue;if(!Object.keys(ce).length)return ke;const re={[Ol.LogicalOperator.AND]:{conditions:[...ke?[ke]:[],...Object.values(ce||{})]},onEmptyFilter:Ol.EmptyFilterOption.RETURN_NONE};return(((Ue=(Ae=re[Ol.LogicalOperator.AND])==null?void 0:Ae.conditions)==null?void 0:Ue.length)??0)>0?re:{}},J=ke=>{if(w)return w.find(re=>re[N]==ke[N])},q=ke=>{var Ae;const ce=I&&I.length>0?ke[I[0].name]:ke[u],re={[N]:ke[N],primaryDisplay:ce};if(!O)((Ae=i[0])==null?void 0:Ae[N])==ke[N]?n(4,i=[]):n(4,i=[re]);else{let Ue=i.findIndex(Je=>Je[N]==ke[N]);Ue>-1?(i.splice(Ue,1),n(4,i),n(18,w)):(i.push(re),n(4,i),n(18,w))}b("change",i)},j=ke=>{n(7,W=ke.target.value),ke.target.value?n(23,G=[{field:u,type:"string",operator:"fuzzy",value:ke.target.value,valueType:"Value"}]):n(23,G=void 0),n(24,oe=os)},K=()=>{f!=null&&f.loading||!H||n(24,oe+=100)},x=ke=>{const ce=ke.target,re=ce.scrollTop,Ae=ce.scrollHeight,Ue=ce.clientHeight;re+Ue>=Ae-50&&K()},X=ke=>{if(ke.key=="ArrowDown")ke.preventDefault(),n(1,M+=1),M>s-1&&n(1,M=0);else if(ke.key=="ArrowUp")ke.preventDefault(),n(1,M-=1),M<0&&n(1,M=s-1);else if(ke.key=="Enter"&&M>-1){const ce=M<i.length?i[M]:f.rows[M-i.length];q(ce)}(ke.key=="Tab"||ke.key=="Escape")&&b("close")},F={focus:()=>{V==null||V.focus()},hasFocus:()=>document.activeElement===V,setSearch:ke=>{n(7,W=ke),V==null||V.focus()},focusList:()=>{ne==null||ne.focus()}};function R(ke){Be[ke?"unshift":"push"](()=>{V=ke,n(6,V)})}const z=()=>b("close");function me(ke,ce){Be[ke?"unshift":"push"](()=>{$[ce]=ke,n(2,$)})}const se=ke=>n(1,M=ke),Oe=()=>n(1,M=-1),be=ke=>q(ke);function Ie(ke,ce){Be[ke?"unshift":"push"](()=>{$[ce+i.length]=ke,n(2,$)})}const ve=ke=>n(1,M=ke+i.length),fe=()=>n(1,M=-1),Ne=ke=>q(ke);function te(ke,ce){Be[ke?"unshift":"push"](()=>{$[ce]=ke,n(2,$)})}const ae=ke=>n(1,M=ke),de=()=>n(1,M=-1),Xe=ke=>q(ke);function Te(ke,ce){Be[ke?"unshift":"push"](()=>{$[ce+i.length]=ke,n(2,$)})}const Se=ke=>n(1,M=ke+i.length),Le=()=>n(1,M=-1),rt=ke=>q(ke);function kt(ke){Be[ke?"unshift":"push"](()=>{ne=ke,n(8,ne)})}return t.$$set=ke=>{"value"in ke&&n(18,w=ke.value),"fieldSchema"in ke&&n(19,E=ke.fieldSchema),"filter"in ke&&n(20,k=ke.filter),"relatedColumns"in ke&&n(0,I=ke.relatedColumns),"multi"in ke&&n(21,O=ke.multi)},t.$$.update=()=>{var ke,ce;t.$$.dirty[0]&262144&&n(4,i=Array.isArray(w)?w:[]),t.$$.dirty[0]&1048576&&n(27,l=_.buildQuery(k)),t.$$.dirty[0]&8388608&&n(28,r=G?{search:_.buildQuery(G)}:{}),t.$$.dirty[0]&402653184&&n(26,o=ie(l,r)),t.$$.dirty[0]&134217728&&g(n(3,Y=d({API:h,datasource:{type:"table",tableId:D},options:{query:l,limit:os}}))),t.$$.dirty[0]&83886088&&(Y==null||Y.update({query:o,limit:oe})),t.$$.dirty[0]&32&&n(10,u=((ke=f==null?void 0:f.definition)==null?void 0:ke.primaryDisplay)||"id"),t.$$.dirty[0]&16777248&&f!=null&&f.loaded&&(H=f.rows.length>=oe),t.$$.dirty[0]&48&&n(25,s=i.length+(((ce=f==null?void 0:f.rows)==null?void 0:ce.length)||0)),t.$$.dirty[0]&33554434&&n(1,M=Math.min(M,s-1)),t.$$.dirty[0]&6&&M>=0&&$[M]&&le.tick().then(()=>{$[M].scrollIntoView({block:"nearest"})}),t.$$.dirty[0]&1&&n(9,a=I.length)},[I,M,$,Y,i,f,V,W,ne,a,u,b,N,J,q,j,x,X,w,E,k,O,F,G,oe,s,o,l,r,R,z,me,se,Oe,be,Ie,ve,fe,Ne,te,ae,de,Xe,Te,Se,Le,rt,kt]}class my extends Ze{constructor(e){super(),Qe(this,e,gy,dy,Ye,{value:18,fieldSchema:19,filter:20,relatedColumns:0,multi:21,api:22},null,[-1,-1,-1])}get api(){return this.$$.ctx[22]}}function T1(t,e,n){const i=t.slice();return i[36]=e[n],i[38]=n,i}function I1(t){let e,n;return{c(){e=v("i"),m(e,"class",n=t[2].icon+" field-icon")},m(i,l){A(i,e,l)},p(i,l){l[0]&4&&n!==(n=i[2].icon+" field-icon")&&m(e,"class",n)},d(i){i&&C(e)}}}function _y(t){let e,n,i=t[7].map(N1).join(", ")+"",l,r=t[2].role=="formInput"&&t[7].length>1&&D1(t);return{c(){e=v("span"),r&&r.c(),n=Q(),l=Ee(i)},m(o,u){A(o,e,u),r&&r.m(e,null),S(e,n),S(e,l)},p(o,u){o[2].role=="formInput"&&o[7].length>1?r?r.p(o,u):(r=D1(o),r.c(),r.m(e,n)):r&&(r.d(1),r=null),u[0]&128&&i!==(i=o[7].map(N1).join(", ")+"")&&Pe(l,i)},d(o){o&&C(e),r&&r.d()}}}function py(t){let e,n,i=Ce(t[7]),l=[];for(let o=0;o<i.length;o+=1)l[o]=O1(T1(t,i,o));let r=t[7].length>5&&R1(t);return{c(){e=v("div");for(let o=0;o<l.length;o+=1)l[o].c();n=Q(),r&&r.c(),m(e,"class","items"),p(e,"pills",t[16]),p(e,"withCount",t[7].length>5),p(e,"inEdit",t[8])},m(o,u){A(o,e,u);for(let s=0;s<l.length;s+=1)l[s]&&l[s].m(e,null);S(e,n),r&&r.m(e,null)},p(o,u){if(u[0]&128){i=Ce(o[7]);let s;for(s=0;s<i.length;s+=1){const a=T1(o,i,s);l[s]?l[s].p(a,u):(l[s]=O1(a),l[s].c(),l[s].m(e,n))}for(;s<l.length;s+=1)l[s].d(1);l.length=i.length}o[7].length>5?r?r.p(o,u):(r=R1(o),r.c(),r.m(e,null)):r&&(r.d(1),r=null),u[0]&65536&&p(e,"pills",o[16]),u[0]&128&&p(e,"withCount",o[7].length>5),u[0]&256&&p(e,"inEdit",o[8])},d(o){o&&C(e),St(l,o),r&&r.d()}}}function by(t){let e,n;return{c(){e=v("span"),n=Ee(t[13])},m(i,l){A(i,e,l),S(e,n)},p(i,l){l[0]&8192&&Pe(n,i[13])},d(i){i&&C(e)}}}function D1(t){let e,n=t[7].length+"",i,l;return{c(){e=Ee("("),i=Ee(n),l=Ee(")")},m(r,o){A(r,e,o),A(r,i,o),A(r,l,o)},p(r,o){o[0]&128&&n!==(n=r[7].length+"")&&Pe(i,n)},d(r){r&&(C(e),C(i),C(l))}}}function wy(t){let e,n,i=t[36].primaryDisplay+"",l;return{c(){e=v("div"),n=v("span"),l=Ee(i),m(e,"class","item")},m(r,o){A(r,e,o),S(e,n),S(n,l)},p(r,o){o[0]&128&&i!==(i=r[36].primaryDisplay+"")&&Pe(l,i)},d(r){r&&C(e)}}}function O1(t){let e,n=t[38]<5&&wy(t);return{c(){n&&n.c(),e=Fe()},m(i,l){n&&n.m(i,l),A(i,e,l)},p(i,l){i[38]<5&&n.p(i,l)},d(i){i&&C(e),n&&n.d(i)}}}function R1(t){let e,n,i=t[7].length-5+"",l,r;return{c(){e=v("span"),n=Ee("(+ "),l=Ee(i),r=Ee(")"),m(e,"class","count")},m(o,u){A(o,e,u),S(e,n),S(e,l),S(e,r)},p(o,u){u[0]&128&&i!==(i=o[7].length-5+"")&&Pe(l,i)},d(o){o&&C(e)}}}function P1(t){let e;return{c(){e=v("i"),m(e,"class","ph ph-caret-down control-icon")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function M1(t){let e,n,i;function l(o){t[29](o)}let r={anchor:t[9],useAnchorWidth:!0,open:t[17]=="Open",$$slots:{default:[Ey]},$$scope:{ctx:t}};return t[10]!==void 0&&(r.popup=t[10]),e=new wn({props:r}),Be.push(()=>Gt(e,"popup",l)),{c(){We(e.$$.fragment)},m(o,u){je(e,o,u),i=!0},p(o,u){const s={};u[0]&512&&(s.anchor=o[9]),u[0]&131072&&(s.open=o[17]=="Open"),u[0]&2303|u[1]&256&&(s.$$scope={dirty:u,ctx:o}),!n&&u[0]&1024&&(n=!0,s.popup=o[10],Wt(()=>n=!1)),e.$set(s)},i(o){i||(U(e.$$.fragment,o),i=!0)},o(o){Z(e.$$.fragment,o),i=!1},d(o){qe(e,o)}}}function ky(t){let e,n,i;function l(o){t[27](o)}let r={fieldSchema:t[0],filter:t[3],multi:t[5],value:t[7]};return t[11]!==void 0&&(r.api=t[11]),e=new my({props:r}),Be.push(()=>Gt(e,"api",l)),e.$on("change",t[21]),e.$on("close",t[28]),{c(){We(e.$$.fragment)},m(o,u){je(e,o,u),i=!0},p(o,u){const s={};u[0]&1&&(s.fieldSchema=o[0]),u[0]&8&&(s.filter=o[3]),u[0]&32&&(s.multi=o[5]),u[0]&128&&(s.value=o[7]),!n&&u[0]&2048&&(n=!0,s.api=o[11],Wt(()=>n=!1)),e.$set(s)},i(o){i||(U(e.$$.fragment,o),i=!0)},o(o){Z(e.$$.fragment,o),i=!1},d(o){qe(e,o)}}}function yy(t){let e,n;return e=new Qr({props:{fieldSchema:t[0],filter:t[3]??[],search:t[18],limit:t[4],joinColumn:t[2].joinColumn,value:t[7],ownId:t[1],multi:t[5]}}),e.$on("change",t[21]),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&1&&(r.fieldSchema=i[0]),l[0]&8&&(r.filter=i[3]??[]),l[0]&16&&(r.limit=i[4]),l[0]&4&&(r.joinColumn=i[2].joinColumn),l[0]&128&&(r.value=i[7]),l[0]&2&&(r.ownId=i[1]),l[0]&32&&(r.multi=i[5]),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Ey(t){let e,n,i,l;const r=[yy,ky],o=[];function u(s,a){return s[0].recursiveTable?0:1}return e=u(t),n=o[e]=r[e](t),{c(){n.c(),i=Fe()},m(s,a){o[e].m(s,a),A(s,i,a),l=!0},p(s,a){let f=e;e=u(s),e===f?o[e].p(s,a):(He(),Z(o[f],1,1,()=>{o[f]=null}),ze(),n=o[e],n?n.p(s,a):(n=o[e]=r[e](s),n.c()),U(n,1),n.m(i.parentNode,i))},i(s){l||(U(n),l=!0)},o(s){Z(n),l=!1},d(s){s&&C(i),o[e].d(s)}}}function vy(t){var w;let e,n,i,l,r,o,u,s,a,f,c=((w=t[2])==null?void 0:w.icon)&&I1(t);function g(E,k){var I;return((I=E[7])==null?void 0:I.length)<1?by:E[16]?py:_y}let h=g(t),d=h(t),_=!t[12]&&(t[2].role=="formInput"||t[8])&&P1(),b=t[8]&&M1(t);return{c(){var E,k;e=v("div"),c&&c.c(),n=Q(),i=v("div"),d.c(),l=Q(),_&&_.c(),o=Q(),b&&b.c(),u=Fe(),m(i,"class","value"),p(i,"placeholder",((E=t[7])==null?void 0:E.length)<1),m(e,"class","superCell"),m(e,"tabindex",r=(k=t[2])!=null&&k.disabled?-1:0),p(e,"isDirty",t[15]&&t[2].showDirty),p(e,"inEdit",t[8]),p(e,"inline",t[14]),p(e,"tableCell",t[2].role=="tableCell"),p(e,"formInput",t[2].role=="formInput"),p(e,"disabled",t[2].disabled),p(e,"readonly",t[12]),p(e,"error",t[2].error),P(e,"color",t[2].color),P(e,"background",t[2].background),P(e,"font-weight",t[2].fontWeight)},m(E,k){A(E,e,k),c&&c.m(e,null),S(e,n),S(e,i),d.m(i,null),S(e,l),_&&_.m(e,null),t[26](e),A(E,o,k),b&&b.m(E,k),A(E,u,k),s=!0,a||(f=[B(e,"mousedown",t[19].toggle),B(e,"focusin",function(){Ge(t[6].focus)&&t[6].focus.apply(this,arguments)}),B(e,"keydown",Ii(t[20])),B(e,"focusout",function(){Ge(t[6].focusout)&&t[6].focusout.apply(this,arguments)})],a=!0)},p(E,k){var I,O,D;t=E,(I=t[2])!=null&&I.icon?c?c.p(t,k):(c=I1(t),c.c(),c.m(e,n)):c&&(c.d(1),c=null),h===(h=g(t))&&d?d.p(t,k):(d.d(1),d=h(t),d&&(d.c(),d.m(i,null))),(!s||k[0]&128)&&p(i,"placeholder",((O=t[7])==null?void 0:O.length)<1),!t[12]&&(t[2].role=="formInput"||t[8])?_||(_=P1(),_.c(),_.m(e,null)):_&&(_.d(1),_=null),(!s||k[0]&4&&r!==(r=(D=t[2])!=null&&D.disabled?-1:0))&&m(e,"tabindex",r),(!s||k[0]&32772)&&p(e,"isDirty",t[15]&&t[2].showDirty),(!s||k[0]&256)&&p(e,"inEdit",t[8]),(!s||k[0]&16384)&&p(e,"inline",t[14]),(!s||k[0]&4)&&p(e,"tableCell",t[2].role=="tableCell"),(!s||k[0]&4)&&p(e,"formInput",t[2].role=="formInput"),(!s||k[0]&4)&&p(e,"disabled",t[2].disabled),(!s||k[0]&4096)&&p(e,"readonly",t[12]),(!s||k[0]&4)&&p(e,"error",t[2].error),k[0]&4&&P(e,"color",t[2].color),k[0]&4&&P(e,"background",t[2].background),k[0]&4&&P(e,"font-weight",t[2].fontWeight),t[8]?b?(b.p(t,k),k[0]&256&&U(b,1)):(b=M1(t),b.c(),U(b,1),b.m(u.parentNode,u)):b&&(He(),Z(b,1,1,()=>{b=null}),ze())},i(E){s||(U(b),s=!0)},o(E){Z(b),s=!1},d(E){E&&(C(e),C(o),C(u)),c&&c.d(),d.d(),_&&_.d(),t[26](null),b&&b.d(E),a=!1,Ve(f)}}}const N1=t=>t.primaryDisplay;function Sy(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d=ue,_=()=>(d(),d=ft(G,F=>n(25,h=F)),G);t.$$.on_destroy.push(()=>d());const b=le.createEventDispatcher(),{API:w}=le.getContext("sdk");let{value:E}=e,{fieldSchema:k}=e,{cellOptions:I}=e,{simpleView:O=!0}=e,{filter:D=[]}=e,{limit:N=100}=e,{multi:M=!1}=e,{ownId:V}=e,W=JSON.stringify(E),ne,H,$,Y,{cellState:G=Ft(I.initialState??"View",{"*":{goTo(F){return F},reset(F){n(7,o=void 0)}},View:{_enter(){},focus(){if(!I.readonly&&!I.disabled)return"Editing"}},Hovered:{cancel:()=>"View"},Focused:{unfocus(){return"View"}},Error:{check:"View"},Editing:{_enter(){n(24,W=JSON.stringify(o)),oe.open(),b("enteredit")},_exit(){oe.close(),b("exitedit")},focusout(F){H!=null&&H.contains(F==null?void 0:F.relatedTarget)||this.submit()},clear(){n(7,o=[])},submit(){return s&&b("change",o),"View"},cancel(){return"View"}}})}=e;_();const oe=Ft("Closed",{Open:{close(){return"Closed"},toggle(){return"Closed"}},Closed:{open(){return"Open"},toggle(){return"Open"}}});Me(t,oe,F=>n(17,g=F));const ie=F=>{F.key=="Escape"?g=="Open"?oe.close():G.focusout(F):F.keyCode==32&&h=="Editing"?oe.toggle():F.key=="Tab"&&g=="Open"?G.focusout(F):g=="Open"&&(F.key==="ArrowUp"?(F.preventDefault(),Y==null||Y.focusPrev(),Y==null||Y.scrollIntoView()):F.key==="ArrowDown"?(F.preventDefault(),Y==null||Y.focusNext(),Y==null||Y.scrollIntoView()):F.key.length==1&&F.key.match(/\S/)&&(Y==null||Y.setSearch(F.key)))},J=F=>{n(7,o=F.detail),M||oe.close()},q=F=>{if(Array.isArray(F)&&M){const R=o?o.map(me=>me[i]):[],z=F.filter(me=>!R.includes(me));return z.length>0&&(w.fetchTableDefinition(l).then(me=>{n(0,k.primaryDisplay=me.primaryDisplay,k)}),Promise.all(z.map(me=>w.fetchRow(l,me,!0))).then(me=>{const se=me.map(Oe=>({[i]:Oe[i],primaryDisplay:k.primaryDisplay?Oe[k.primaryDisplay]:Oe.name||Oe.id}));n(7,o=[...o||[],...se])}).catch(me=>{})),o||[]}else return F&&!Array.isArray(F)?(o&&o.find(z=>z[i]===F)||(w.fetchTableDefinition(l).then(z=>{n(0,k.primaryDisplay=z.primaryDisplay,k)}),w.fetchRow(l,F,!0).then(z=>{n(7,o=[{[i]:z[i],primaryDisplay:k.primaryDisplay?z[k.primaryDisplay]:z.name||z.id}])}).catch(z=>{n(7,o=[])})),o||[]):M?E&&Array.isArray(E)?E:[]:E?[E]:[]};function j(F){Be[F?"unshift":"push"](()=>{ne=F,n(9,ne)})}function K(F){Y=F,n(11,Y)}const x=()=>{G.focusout(null)};function X(F){H=F,n(10,H)}return t.$$set=F=>{"value"in F&&n(23,E=F.value),"fieldSchema"in F&&n(0,k=F.fieldSchema),"cellOptions"in F&&n(2,I=F.cellOptions),"simpleView"in F&&n(22,O=F.simpleView),"filter"in F&&n(3,D=F.filter),"limit"in F&&n(4,N=F.limit),"multi"in F&&n(5,M=F.multi),"ownId"in F&&n(1,V=F.ownId),"cellState"in F&&_(n(6,G=F.cellState))},t.$$.update=()=>{t.$$.dirty[0]&1&&(i=(k==null?void 0:k.relatedField)||"id"),t.$$.dirty[0]&1&&(l=k==null?void 0:k.tableId),t.$$.dirty[0]&1&&k!=null&&k.relatedColumns,t.$$.dirty[0]&4&&n(16,r=I.relViewMode=="pills"),t.$$.dirty[0]&6&&n(1,V=V||(I==null?void 0:I.ownId)),t.$$.dirty[0]&8388608&&n(7,o=q(E)),t.$$.dirty[0]&33554432&&n(8,u=h=="Editing"),t.$$.dirty[0]&16777600&&n(15,s=u&&W!=JSON.stringify(o)),t.$$.dirty[0]&4&&n(22,O=I.relViewMode=="text"),t.$$.dirty[0]&4&&n(14,a=I.role=="inlineInput"),t.$$.dirty[0]&4&&n(13,f=I.placeholder||""),t.$$.dirty[0]&4&&n(12,c=I.readonly||I.disabled)},[k,V,I,D,N,M,G,o,u,ne,H,Y,c,f,a,s,r,g,$,oe,ie,J,O,E,W,h,j,K,x,X]}class Cy extends Ze{constructor(e){super(),Qe(this,e,Sy,vy,Ye,{value:23,fieldSchema:0,cellOptions:2,simpleView:22,filter:3,limit:4,multi:5,ownId:1,cellState:6},null,[-1,-1])}}function L1(t,e,n){const i=t.slice();return i[35]=e[n],i}function F1(t){let e,n;return{c(){e=v("i"),m(e,"class",n=bt(t[2].icon+" icon")+" svelte-1uxy76n")},m(i,l){A(i,e,l)},p(i,l){l[0]&4&&n!==(n=bt(i[2].icon+" icon")+" svelte-1uxy76n")&&m(e,"class",n)},d(i){i&&C(e)}}}function Ay(t){let e,n=Ce(t[6]),i=[];for(let l=0;l<n.length;l+=1)i[l]=B1(L1(t,n,l));return{c(){e=v("div");for(let l=0;l<i.length;l+=1)i[l].c();m(e,"class","items"),p(e,"pills",t[15])},m(l,r){A(l,e,r);for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(e,null)},p(l,r){if(r[0]&67){n=Ce(l[6]);let o;for(o=0;o<n.length;o+=1){const u=L1(l,n,o);i[o]?i[o].p(u,r):(i[o]=B1(u),i[o].c(),i[o].m(e,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=n.length}r[0]&32768&&p(e,"pills",l[15])},d(l){l&&C(e),St(i,l)}}}function Ty(t){let e,n=(t[2].placeholder??null)+"",i;return{c(){e=v("span"),i=Ee(n)},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&4&&n!==(n=(l[2].placeholder??null)+"")&&Pe(i,n)},d(l){l&&C(e)}}}function V1(t){let e,n;return{c(){e=v("i"),m(e,"class",n=t[1].type=="link"?"ri-links-line":"ri-user-line")},m(i,l){A(i,e,l)},p(i,l){l[0]&2&&n!==(n=i[1].type=="link"?"ri-links-line":"ri-user-line")&&m(e,"class",n)},d(i){i&&C(e)}}}function B1(t){let e,n,i,l=t[35].primaryDisplay+"",r,o,u=!t[0]&&V1(t);return{c(){e=v("div"),u&&u.c(),n=Q(),i=v("span"),r=Ee(l),o=Q(),m(e,"class","item svelte-1uxy76n"),p(e,"rel-bb-reference",!t[0]&&t[1].type!="link")},m(s,a){A(s,e,a),u&&u.m(e,null),S(e,n),S(e,i),S(i,r),S(e,o)},p(s,a){s[0]?u&&(u.d(1),u=null):u?u.p(s,a):(u=V1(s),u.c(),u.m(e,n)),a[0]&64&&l!==(l=s[35].primaryDisplay+"")&&Pe(r,l),a[0]&3&&p(e,"rel-bb-reference",!s[0]&&s[1].type!="link")},d(s){s&&C(e),u&&u.d()}}}function U1(t){let e,n,i;return{c(){e=v("i"),m(e,"class","ri-close-line clearIcon")},m(l,r){A(l,e,r),n||(i=B(e,"mousedown",Et(function(){Ge(t[5].clear)&&t[5].clear.apply(this,arguments)})),n=!0)},p(l,r){t=l},d(l){l&&C(e),n=!1,i()}}}function H1(t){let e;return{c(){e=v("i"),m(e,"class","ph ph-caret-down control-icon")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function z1(t){let e,n,i;function l(o){t[27](o)}let r={anchor:t[9],useAnchorWidth:!0,open:t[16]=="Open",$$slots:{default:[Iy]},$$scope:{ctx:t}};return t[10]!==void 0&&(r.popup=t[10]),e=new wn({props:r}),Be.push(()=>Gt(e,"popup",l)),e.$on("close",function(){Ge(t[5].focusout)&&t[5].focusout.apply(this,arguments)}),{c(){We(e.$$.fragment)},m(o,u){je(e,o,u),i=!0},p(o,u){t=o;const s={};u[0]&512&&(s.anchor=t[9]),u[0]&65536&&(s.open=t[16]=="Open"),u[0]&2174|u[1]&128&&(s.$$scope={dirty:u,ctx:t}),!n&&u[0]&1024&&(n=!0,s.popup=t[10],Wt(()=>n=!1)),e.$set(s)},i(o){i||(U(e.$$.fragment,o),i=!0)},o(o){Z(e.$$.fragment,o),i=!1},d(o){qe(e,o)}}}function Iy(t){let e,n;return e=new Qr({props:{fieldSchema:t[1],filter:t[3],search:t[11],searchTerm:t[17],limit:t[4],joinColumn:t[2].joinColumn,value:t[6],multi:!1}}),e.$on("change",t[20]),e.$on("focusout",t[26]),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&2&&(r.fieldSchema=i[1]),l[0]&8&&(r.filter=i[3]),l[0]&2048&&(r.search=i[11]),l[0]&16&&(r.limit=i[4]),l[0]&4&&(r.joinColumn=i[2].joinColumn),l[0]&64&&(r.value=i[6]),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Dy(t){var E,k;let e,n,i,l,r,o,u,s,a,f,c=((E=t[2])==null?void 0:E.icon)&&F1(t);function g(I,O){var D,N;if(((D=I[6])==null?void 0:D.length)<1)return Ty;if(((N=I[6])==null?void 0:N.length)>0)return Ay}let h=g(t),d=h&&h(t),_=t[7]&&((k=t[6])==null?void 0:k.length)&&U1(t),b=!t[2].readonly&&(t[2].role=="formInput"||t[7])&&H1(),w=t[7]&&z1(t);return{c(){var I,O;e=v("div"),c&&c.c(),n=Q(),i=v("div"),d&&d.c(),l=Q(),_&&_.c(),r=Q(),b&&b.c(),o=Q(),w&&w.c(),u=Fe(),m(i,"class","value"),p(i,"with-icon",(I=t[2])==null?void 0:I.icon),p(i,"placeholder",((O=t[6])==null?void 0:O.length)<1),m(e,"class","superCell"),m(e,"tabindex","0"),p(e,"inEdit",t[7]),p(e,"isDirty",t[14]&&t[2].showDirty),p(e,"focused",t[8]=="Editing"),p(e,"inline",t[13]),p(e,"multirow",t[12]),p(e,"tableCell",t[2].role=="tableCell"),p(e,"formInput",t[2].role=="formInput"),p(e,"disabled",t[2].disabled),p(e,"readonly",t[2].readonly),p(e,"error",t[2].error),P(e,"color",t[2].color),P(e,"background",t[2].background),P(e,"font-weight",t[2].fontWeight)},m(I,O){A(I,e,O),c&&c.m(e,null),S(e,n),S(e,i),d&&d.m(i,null),S(i,l),_&&_.m(i,null),S(e,r),b&&b.m(e,null),t[25](e),A(I,o,O),w&&w.m(I,O),A(I,u,O),s=!0,a||(f=[B(e,"keydown",t[19]),B(e,"focusin",function(){Ge(t[5].focus)&&t[5].focus.apply(this,arguments)}),B(e,"focusout",function(){Ge(t[5].focusout)&&t[5].focusout.apply(this,arguments)}),B(e,"mousedown",t[18].toggle)],a=!0)},p(I,O){var D,N,M,V;t=I,(D=t[2])!=null&&D.icon?c?c.p(t,O):(c=F1(t),c.c(),c.m(e,n)):c&&(c.d(1),c=null),h===(h=g(t))&&d?d.p(t,O):(d&&d.d(1),d=h&&h(t),d&&(d.c(),d.m(i,l))),t[7]&&((N=t[6])!=null&&N.length)?_?_.p(t,O):(_=U1(t),_.c(),_.m(i,null)):_&&(_.d(1),_=null),(!s||O[0]&4)&&p(i,"with-icon",(M=t[2])==null?void 0:M.icon),(!s||O[0]&64)&&p(i,"placeholder",((V=t[6])==null?void 0:V.length)<1),!t[2].readonly&&(t[2].role=="formInput"||t[7])?b||(b=H1(),b.c(),b.m(e,null)):b&&(b.d(1),b=null),(!s||O[0]&128)&&p(e,"inEdit",t[7]),(!s||O[0]&16388)&&p(e,"isDirty",t[14]&&t[2].showDirty),(!s||O[0]&256)&&p(e,"focused",t[8]=="Editing"),(!s||O[0]&8192)&&p(e,"inline",t[13]),(!s||O[0]&4096)&&p(e,"multirow",t[12]),(!s||O[0]&4)&&p(e,"tableCell",t[2].role=="tableCell"),(!s||O[0]&4)&&p(e,"formInput",t[2].role=="formInput"),(!s||O[0]&4)&&p(e,"disabled",t[2].disabled),(!s||O[0]&4)&&p(e,"readonly",t[2].readonly),(!s||O[0]&4)&&p(e,"error",t[2].error),O[0]&4&&P(e,"color",t[2].color),O[0]&4&&P(e,"background",t[2].background),O[0]&4&&P(e,"font-weight",t[2].fontWeight),t[7]?w?(w.p(t,O),O[0]&128&&U(w,1)):(w=z1(t),w.c(),U(w,1),w.m(u.parentNode,u)):w&&(He(),Z(w,1,1,()=>{w=null}),ze())},i(I){s||(U(w),s=!0)},o(I){Z(w),s=!1},d(I){I&&(C(e),C(o),C(u)),c&&c.d(),d&&d.d(),_&&_.d(),b&&b.d(),t[25](null),w&&w.d(I),a=!1,Ve(f)}}}function Oy(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_=ue,b=()=>(_(),_=ft(G,F=>n(8,d=F)),G),w;t.$$.on_destroy.push(()=>_());const E=le.createEventDispatcher();let{value:k}=e,{fieldSchema:I}=e,{cellOptions:O}=e,{simpleView:D=!0}=e,{filter:N=[]}=e,{limit:M=100}=e,V=JSON.stringify(k),W,ne,H,$,Y,{cellState:G=Ft(O.initialState??"View",{"*":{goTo(F){return F}},View:{_enter(){n(11,H=!1)},focus(){if(!O.readonly&&!O.disabled)return"Editing"}},Hovered:{cancel:()=>"View"},Focused:{unfocus(){return"View"}},Error:{check:"View"},Editing:{_enter(){n(22,V=JSON.stringify(o)),oe.open(),E("enteredit")},_exit(){oe.close(),E("exitedit")},checkFocus(){return $()},focusout(F){ne!=null&&ne.contains(F.relatedTarget)||this.submit()},popupfocusout(F){console.log(F)},clear(){n(6,o=[])},submit(){return s&&E("change",h&&o?o[0]:o),oe.close(),"View"},cancel(){return oe.close(),"View"}}})}=e;b();const oe=Ft("Closed",{Open:{close(){return"Closed"},toggle(){return"Closed"}},Closed:{open(){return"Open"},toggle(){return"Open"}}});Me(t,oe,F=>n(16,w=F));const ie=F=>{F.keyCode==32&&d=="Editing"?(F.preventDefault(),F.stopPropagation(),oe.toggle()):F.key!="Tab"&&n(11,H=!0)},J=F=>{n(6,o=F.detail);let R=h?o[0]??{}:o;f&&E("change",R),g&&oe.close()},q=F=>I.relationshipType=="self"&&F?j(F):l?k?[...k]:[]:k?[k]:[],j=F=>{let R;try{R=JSON.parse(F)}catch{R=void 0}return R};function K(F){Be[F?"unshift":"push"](()=>{W=F,n(9,W)})}const x=F=>setTimeout(G.focusout,20,F);function X(F){ne=F,n(10,ne)}return t.$$set=F=>{"value"in F&&n(21,k=F.value),"fieldSchema"in F&&n(1,I=F.fieldSchema),"cellOptions"in F&&n(2,O=F.cellOptions),"simpleView"in F&&n(0,D=F.simpleView),"filter"in F&&n(3,N=F.filter),"limit"in F&&n(4,M=F.limit),"cellState"in F&&b(n(5,G=F.cellState))},t.$$.update=()=>{var F,R;t.$$.dirty[0]&4&&n(15,i=O.relViewMode=="pills"),t.$$.dirty[0]&2&&n(23,l=!((F=I==null?void 0:I.type)!=null&&F.includes("_single"))),t.$$.dirty[0]&2&&n(24,r=(R=I==null?void 0:I.type)==null?void 0:R.includes("bb_reference")),t.$$.dirty[0]&2097152&&n(6,o=q(k)),t.$$.dirty[0]&256&&n(7,u=d=="Editing"),t.$$.dirty[0]&4194496&&n(14,s=u&&V!=JSON.stringify(o)),t.$$.dirty[0]&4&&n(0,D=O.relViewMode=="text"),t.$$.dirty[0]&4&&n(13,a=O.role=="inlineInput"),t.$$.dirty[0]&4&&(f=O.controlType=="expanded"),t.$$.dirty[0]&196&&n(12,c=O.controlType=="expanded"&&((o==null?void 0:o.length)>1||u)),t.$$.dirty[0]&8388610&&(g=(I==null?void 0:I.relationshipType)=="one-to-many"||(I==null?void 0:I.relationshipType)=="many-to-one"||(I==null?void 0:I.relationshipType)=="self"||!l),t.$$.dirty[0]&25165824&&(h=r&&!l)},[D,I,O,N,M,G,o,u,d,W,ne,H,c,a,s,i,w,Y,oe,ie,J,k,V,l,r,K,x,X]}class Ry extends Ze{constructor(e){super(),Qe(this,e,Oy,Dy,Ye,{value:21,fieldSchema:1,cellOptions:2,simpleView:0,filter:3,limit:4,cellState:5},null,[-1,-1])}}function Py(t){let e;const n=t[3].default,i=Ut(n,t,t[2],null);return{c(){i&&i.c()},m(l,r){i&&i.m(l,r),e=!0},p(l,r){i&&i.p&&(!e||r&4)&&zt(i,n,l,l[2],e?Ht(n,l[2],r,null):jt(l[2]),null)},i(l){e||(U(i,l),e=!0)},o(l){Z(i,l),e=!1},d(l){i&&i.d(l)}}}function My(t){let e;return{c(){e=v("div"),e.innerHTML='<div class="children svelte-i7mw17"></div>',m(e,"class","skeleton svelte-i7mw17"),P(e,"min-height",t[1])},m(n,i){A(n,e,i)},p(n,i){i&2&&P(e,"min-height",n[1])},i:ue,o:ue,d(n){n&&C(e)}}}function Ny(t){let e,n,i,l;const r=[My,Py],o=[];function u(s,a){return s[0]?0:1}return e=u(t),n=o[e]=r[e](t),{c(){n.c(),i=Fe()},m(s,a){o[e].m(s,a),A(s,i,a),l=!0},p(s,[a]){let f=e;e=u(s),e===f?o[e].p(s,a):(He(),Z(o[f],1,1,()=>{o[f]=null}),ze(),n=o[e],n?n.p(s,a):(n=o[e]=r[e](s),n.c()),U(n,1),n.m(i.parentNode,i))},i(s){l||(U(n),l=!0)},o(s){Z(n),l=!1},d(s){s&&C(i),o[e].d(s)}}}function Ly(t,e,n){let{$$slots:i={},$$scope:l}=e,{active:r=!0}=e,{minHeight:o="2rem"}=e;return t.$$set=u=>{"active"in u&&n(0,r=u.active),"minHeight"in u&&n(1,o=u.minHeight),"$$scope"in u&&n(2,l=u.$$scope)},[r,o,l,i]}class j1 extends Ze{constructor(e){super(),Qe(this,e,Ly,Ny,Ye,{active:0,minHeight:1})}}function q1(t,e,n){const i=t.slice();return i[73]=e[n],i[75]=n,i}function W1(t,e,n){const i=t.slice();return i[73]=e[n],i[75]=n,i}function G1(t,e,n){const i=t.slice();return i[73]=e[n],i[75]=n,i}function Y1(t,e,n){const i=t.slice();return i[73]=e[n],i[75]=n,i}function Fy(t){let e,n,i=[],l=new Map,r,o,u=(t[1]||t[0].toggleAll)&&K1(t),s=Ce(t[26]);const a=f=>f[75];for(let f=0;f<s.length;f+=1){let c=W1(t,s,f),g=a(c);l.set(g,i[f]=Q1(g,c))}return{c(){e=v("div"),u&&u.c(),n=Q();for(let f=0;f<i.length;f+=1)i[f].c();m(e,"class","radios svelte-1d0r12q"),p(e,"formInput",t[25]=="formInput"),p(e,"inlineInput",t[25]=="inlineInput"),p(e,"column",t[0].direction=="column")},m(f,c){A(f,e,c),u&&u.m(e,null),S(e,n);for(let g=0;g<i.length;g+=1)i[g]&&i[g].m(e,null);r||(o=B(e,"mouseleave",t[55]),r=!0)},p(f,c){f[1]||f[0].toggleAll?u?u.p(f,c):(u=K1(f),u.c(),u.m(e,n)):u&&(u.d(1),u=null),c[0]&201330208|c[1]&2&&(s=Ce(f[26]),i=Tt(i,c,a,1,f,s,l,e,nn,Q1,null,W1)),c[0]&33554432&&p(e,"formInput",f[25]=="formInput"),c[0]&33554432&&p(e,"inlineInput",f[25]=="inlineInput"),c[0]&1&&p(e,"column",f[0].direction=="column")},i:ue,o:ue,d(f){f&&C(e),u&&u.d();for(let c=0;c<i.length;c+=1)i[c].d();r=!1,o()}}}function Vy(t){let e;function n(r,o){if(r[15])return zy;if(r[17])return Hy}let i=n(t),l=i&&i(t);return{c(){l&&l.c(),e=Fe()},m(r,o){l&&l.m(r,o),A(r,e,o)},p(r,o){i===(i=n(r))&&l?l.p(r,o):(l&&l.d(1),l=i&&i(r),l&&(l.c(),l.m(e.parentNode,e)))},i:ue,o:ue,d(r){r&&C(e),l&&l.d(r)}}}function By(t){let e,n,i;function l(o){t[46](o)}let r={items:t[5],itemsColors:t[27],itemsLabels:t[9],showColors:t[0].optionsViewMode!="text",reorderOnly:t[0].reorderOnly,placeholder:t[0].placeholder,readonly:t[0].readonly||t[0].disabled,editorState:t[32],cellState:t[2],fullSelection:t[18]};return t[13]!==void 0&&(r.inactive=t[13]),e=new bf({props:r}),Be.push(()=>Gt(e,"inactive",l)),e.$on("togglePicker",t[32].toggle),e.$on("clear",t[47]),e.$on("change",t[48]),{c(){We(e.$$.fragment)},m(o,u){je(e,o,u),i=!0},p(o,u){const s={};u[0]&32&&(s.items=o[5]),u[0]&134217728&&(s.itemsColors=o[27]),u[0]&512&&(s.itemsLabels=o[9]),u[0]&1&&(s.showColors=o[0].optionsViewMode!="text"),u[0]&1&&(s.reorderOnly=o[0].reorderOnly),u[0]&1&&(s.placeholder=o[0].placeholder),u[0]&1&&(s.readonly=o[0].readonly||o[0].disabled),u[0]&4&&(s.cellState=o[2]),u[0]&262144&&(s.fullSelection=o[18]),!n&&u[0]&8192&&(n=!0,s.inactive=o[13],Wt(()=>n=!1)),e.$set(s)},i(o){i||(U(e.$$.fragment,o),i=!0)},o(o){Z(e.$$.fragment,o),i=!1},d(o){qe(e,o)}}}function Uy(t){let e,n;return e=new j1({props:{$$slots:{default:[jy]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[2]&131072&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function K1(t){let e,n,i=(t[1]??"Toggle All")+"",l,r,o,u,s=t[0].toggleAll&&!(t[24]||t[23])&&X1(t);return{c(){e=v("div"),n=v("div"),l=Ee(i),r=Q(),s&&s.c(),m(n,"class","text title"),m(e,"class","switch toggleAll svelte-1d0r12q")},m(a,f){A(a,e,f),S(e,n),S(n,l),S(e,r),s&&s.m(e,null),o||(u=[B(e,"click",function(){Ge(t[0].toggleAll?t[32].toggleAll:void 0)&&(t[0].toggleAll?t[32].toggleAll:void 0).apply(this,arguments)}),B(e,"mouseenter",t[45])],o=!0)},p(a,f){t=a,f[0]&2&&i!==(i=(t[1]??"Toggle All")+"")&&Pe(l,i),t[0].toggleAll&&!(t[24]||t[23])?s?s.p(t,f):(s=X1(t),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},d(a){a&&C(e),s&&s.d(),o=!1,Ve(u)}}}function X1(t){let e,n,i,l;return{c(){e=v("div"),n=v("input"),i=Q(),l=v("span"),n.checked=t[14],m(n,"type","checkbox"),m(n,"class","spectrum-Switch-input"),m(l,"class","spectrum-Switch-switch"),m(e,"class","spectrum-Switch spectrum-Switch--emphasized svelte-1d0r12q")},m(r,o){A(r,e,o),S(e,n),S(e,i),S(e,l)},p(r,o){o[0]&16384&&(n.checked=r[14])},d(r){r&&C(e)}}}function Q1(t,e){let n,i,l,r,o,u=(e[9][e[73]]||e[73])+"",s,a,f,c,g,h,d,_,b,w,E;function k(...O){return e[53](e[75],...O)}function I(){return e[54](e[75])}return{key:t,first:null,c(){n=v("div"),i=v("i"),r=Q(),o=v("div"),s=Ee(u),a=Q(),f=v("div"),c=v("input"),d=Q(),_=v("span"),_.innerHTML="",b=Q(),m(i,"class",l=bt(e[10][e[73]]||"no-icon")+" svelte-1d0r12q"),m(o,"class","text"),c.checked=g=e[5].includes(e[73]),m(c,"type","checkbox"),m(c,"class","spectrum-Switch-input"),m(c,"id",h=e[75]),m(_,"class","spectrum-Switch-switch small"),m(f,"class","spectrum-Switch spectrum-Switch--emphasized svelte-1d0r12q"),m(n,"class","switch svelte-1d0r12q"),p(n,"selected",e[5].includes(e[73])),p(n,"focused",e[11]===e[75]),P(n,"--option-color",e[27][e[73]]),this.first=n},m(O,D){A(O,n,D),S(n,i),S(n,r),S(n,o),S(o,s),S(n,a),S(n,f),S(f,c),S(f,d),S(f,_),S(n,b),w||(E=[B(n,"click",k),B(n,"mouseenter",I)],w=!0)},p(O,D){e=O,D[0]&67109888&&l!==(l=bt(e[10][e[73]]||"no-icon")+" svelte-1d0r12q")&&m(i,"class",l),D[0]&67109376&&u!==(u=(e[9][e[73]]||e[73])+"")&&Pe(s,u),D[0]&67108896&&g!==(g=e[5].includes(e[73]))&&(c.checked=g),D[0]&67108864&&h!==(h=e[75])&&m(c,"id",h),D[0]&67108896&&p(n,"selected",e[5].includes(e[73])),D[0]&67110912&&p(n,"focused",e[11]===e[75]),D[0]&201326592&&P(n,"--option-color",e[27][e[73]])},d(O){O&&C(n),w=!1,Ve(E)}}}function Hy(t){let e,n=[],i=new Map,l,r,o=Ce(t[26]);const u=s=>s[75];for(let s=0;s<o.length;s+=1){let a=G1(t,o,s),f=u(a);i.set(f,n[s]=Z1(f,a))}return{c(){e=v("div");for(let s=0;s<n.length;s+=1)n[s].c();m(e,"class","radios svelte-1d0r12q"),p(e,"column",t[0].direction=="column")},m(s,a){A(s,e,a);for(let f=0;f<n.length;f+=1)n[f]&&n[f].m(e,null);l||(r=B(e,"mouseleave",t[52]),l=!0)},p(s,a){a[0]&201460256|a[1]&2&&(o=Ce(s[26]),n=Tt(n,a,u,1,s,o,i,e,nn,Z1,null,G1)),a[0]&1&&p(e,"column",s[0].direction=="column")},d(s){s&&C(e);for(let a=0;a<n.length;a+=1)n[a].d();l=!1,r()}}}function zy(t){let e,n=[],i=new Map,l=Ce(t[26]);const r=o=>o[75];for(let o=0;o<l.length;o+=1){let u=Y1(t,l,o),s=r(u);i.set(s,n[o]=J1(s,u))}return{c(){e=v("div");for(let o=0;o<n.length;o+=1)n[o].c();m(e,"class","buttons svelte-1d0r12q")},m(o,u){A(o,e,u);for(let s=0;s<n.length;s+=1)n[s]&&n[s].m(e,null)},p(o,u){u[0]&201327136|u[1]&2&&(l=Ce(o[26]),n=Tt(n,u,r,1,o,l,i,e,nn,J1,null,Y1))},d(o){o&&C(e);for(let u=0;u<n.length;u+=1)n[u].d()}}}function Z1(t,e){let n,i,l,r,o=(e[9][e[73]]||e[73])+"",u,s,a,f;function c(...h){return e[50](e[75],...h)}function g(){return e[51](e[75])}return{key:t,first:null,c(){var h;n=v("div"),i=v("i"),r=Q(),u=Ee(o),s=Q(),m(i,"class",l=bt(e[17]&&e[5].includes(e[73])?"ph-fill ph-radio-button":e[17]?"ph ph-circle":e[5].includes(e[73])?"ph-fill ph-check-square":"ph ph-square")+" svelte-1d0r12q"),P(i,"color",e[27][e[73]]),m(n,"class","radio svelte-1d0r12q"),p(n,"selected",(h=e[5])==null?void 0:h.includes(e[73])),p(n,"focused",e[11]===e[75]),P(n,"--option-color",e[27][e[73]]),this.first=n},m(h,d){A(h,n,d),S(n,i),S(n,r),S(n,u),S(n,s),a||(f=[B(n,"mousedown",c),B(n,"mouseenter",g)],a=!0)},p(h,d){var _;e=h,d[0]&67239968&&l!==(l=bt(e[17]&&e[5].includes(e[73])?"ph-fill ph-radio-button":e[17]?"ph ph-circle":e[5].includes(e[73])?"ph-fill ph-check-square":"ph ph-square")+" svelte-1d0r12q")&&m(i,"class",l),d[0]&201326592&&P(i,"color",e[27][e[73]]),d[0]&67109376&&o!==(o=(e[9][e[73]]||e[73])+"")&&Pe(u,o),d[0]&67108896&&p(n,"selected",(_=e[5])==null?void 0:_.includes(e[73])),d[0]&67110912&&p(n,"focused",e[11]===e[75]),d[0]&201326592&&P(n,"--option-color",e[27][e[73]])},d(h){h&&C(n),a=!1,Ve(f)}}}function J1(t,e){let n,i=(e[9][e[73]]||e[73])+"",l,r,o,u;function s(){return e[49](e[75])}return{key:t,first:null,c(){var a;n=v("div"),l=Ee(i),r=Q(),m(n,"class","button svelte-1d0r12q"),p(n,"selected",(a=e[5])==null?void 0:a.includes(e[73])),P(n,"--option-color",e[27][e[73]]),this.first=n},m(a,f){A(a,n,f),S(n,l),S(n,r),o||(u=B(n,"click",s),o=!0)},p(a,f){var c;e=a,f[0]&67109376&&i!==(i=(e[9][e[73]]||e[73])+"")&&Pe(l,i),f[0]&67108896&&p(n,"selected",(c=e[5])==null?void 0:c.includes(e[73])),f[0]&201326592&&P(n,"--option-color",e[27][e[73]])},d(a){a&&C(n),o=!1,u()}}}function jy(t){let e;return{c(){e=Ee("Initializing ..")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function x1(t){let e,n;return e=new wn({props:{anchor:t[8],useAnchorWidth:!0,maxHeight:400,open:t[28]=="Open",$$slots:{default:[Gy]},$$scope:{ctx:t}}}),e.$on("close",function(){Ge(t[2].focusout)&&t[2].focusout.apply(this,arguments)}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){t=i;const r={};l[0]&256&&(r.anchor=t[8]),l[0]&268435456&&(r.open=t[28]=="Open"),l[0]&134224424|l[2]&131072&&(r.$$scope={dirty:l,ctx:t}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function qy(t){let e=[],n=new Map,i,l=Ce(t[3]);const r=o=>o[75];for(let o=0;o<l.length;o+=1){let u=q1(t,l,o),s=r(u);n.set(s,e[o]=$1(s,u))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Fe()},m(o,u){for(let s=0;s<e.length;s+=1)e[s]&&e[s].m(o,u);A(o,i,u)},p(o,u){u[0]&134220328|u[1]&2&&(l=Ce(o[3]),e=Tt(e,u,r,1,o,l,n,i.parentNode,nn,$1,i,q1))},d(o){o&&C(i);for(let u=0;u<e.length;u+=1)e[u].d(o)}}}function Wy(t){let e;return{c(){e=v("div"),e.innerHTML=`<span class="svelte-1d0r12q"><i class="ri-close-line"></i>
|
|
21
|
-
No Options Found</span>`,m(e,"class","option svelte-1d0r12q")},m(n,i){A(n,e,i)},p:ue,d(n){n&&C(e)}}}function $1(t,e){let n,i,l,r,o=(e[9][e[73]]||e[73])+"",u,s,a,f;function c(...h){return e[57](e[75],...h)}function g(){return e[58](e[75])}return{key:t,first:null,c(){var h;n=v("div"),i=v("span"),l=v("i"),r=Q(),u=Ee(o),s=Q(),m(l,"class","ri-checkbox-blank-fill"),m(i,"class","svelte-1d0r12q"),m(n,"class","option svelte-1d0r12q"),p(n,"focused",e[11]===e[75]),p(n,"selected",(h=e[5])==null?void 0:h.includes(e[73])),P(n,"--option-color",e[27][e[73]]),this.first=n},m(h,d){A(h,n,d),S(n,i),S(i,l),S(i,r),S(i,u),S(n,s),a||(f=[B(n,"mousedown",Et(c)),B(n,"mouseenter",g)],a=!0)},p(h,d){var _;e=h,d[0]&520&&o!==(o=(e[9][e[73]]||e[73])+"")&&Pe(u,o),d[0]&2056&&p(n,"focused",e[11]===e[75]),d[0]&40&&p(n,"selected",(_=e[5])==null?void 0:_.includes(e[73])),d[0]&134217736&&P(n,"--option-color",e[27][e[73]])},d(h){h&&C(n),a=!1,Ve(f)}}}function Gy(t){let e,n,i;function l(u,s){var a;return((a=u[3])==null?void 0:a.length)<1||u[3].length==u[5].length?Wy:qy}let r=l(t),o=r(t);return{c(){e=v("div"),o.c(),m(e,"class","options svelte-1d0r12q")},m(u,s){A(u,e,s),o.m(e,null),t[59](e),n||(i=[B(e,"wheel",Ky),B(e,"mouseleave",t[60])],n=!0)},p(u,s){r===(r=l(u))&&o?o.p(u,s):(o.d(1),o=r(u),o&&(o.c(),o.m(e,null)))},d(u){u&&C(e),o.d(),t[59](null),n=!1,Ve(i)}}}function Yy(t){let e,n,i,l,r,o,u,s,a;const f=[Uy,By,Vy,Fy],c=[];function g(d,_){return d[7]=="Loading"?0:d[4]=="list"?1:d[4]=="radio"||d[4]=="buttons"?2:d[4]=="switch"?3:-1}~(n=g(t))&&(i=c[n]=f[n](t));let h=t[6]&&t[4]=="list"&&x1(t);return{c(){var d;e=v("div"),i&&i.c(),r=Q(),h&&h.c(),o=Fe(),m(e,"class","superCell multirow"),m(e,"tabindex",l=(d=t[0])!=null&&d.disabled?-1:0),p(e,"inEdit",t[6]&&t[4]!="buttons"),p(e,"isDirty",t[16]&&t[0].showDirty),p(e,"disabled",t[23]),p(e,"readonly",t[24]),p(e,"error",t[22]),p(e,"inline",t[25]=="inlineInput"),p(e,"tableCell",t[25]=="tableCell"),p(e,"formInput",t[25]=="formInput"),p(e,"naked-field",t[4]=="buttons"),P(e,"color",t[21]),P(e,"background",t[20]),P(e,"font-weight",t[0].fontWeight)},m(d,_){A(d,e,_),~n&&c[n].m(e,null),t[56](e),A(d,r,_),h&&h.m(d,_),A(d,o,_),u=!0,s||(a=[B(e,"focusin",function(){Ge(t[2].focus)&&t[2].focus.apply(this,arguments)}),B(e,"focusout",function(){Ge(t[2].focusout)&&t[2].focusout.apply(this,arguments)}),B(e,"keydown",t[32].handleKeyboard)],s=!0)},p(d,_){var w;t=d;let b=n;n=g(t),n===b?~n&&c[n].p(t,_):(i&&(He(),Z(c[b],1,1,()=>{c[b]=null}),ze()),~n?(i=c[n],i?i.p(t,_):(i=c[n]=f[n](t),i.c()),U(i,1),i.m(e,null)):i=null),(!u||_[0]&1&&l!==(l=(w=t[0])!=null&&w.disabled?-1:0))&&m(e,"tabindex",l),(!u||_[0]&80)&&p(e,"inEdit",t[6]&&t[4]!="buttons"),(!u||_[0]&65537)&&p(e,"isDirty",t[16]&&t[0].showDirty),(!u||_[0]&8388608)&&p(e,"disabled",t[23]),(!u||_[0]&16777216)&&p(e,"readonly",t[24]),(!u||_[0]&4194304)&&p(e,"error",t[22]),(!u||_[0]&33554432)&&p(e,"inline",t[25]=="inlineInput"),(!u||_[0]&33554432)&&p(e,"tableCell",t[25]=="tableCell"),(!u||_[0]&33554432)&&p(e,"formInput",t[25]=="formInput"),(!u||_[0]&16)&&p(e,"naked-field",t[4]=="buttons"),_[0]&2097152&&P(e,"color",t[21]),_[0]&1048576&&P(e,"background",t[20]),_[0]&1&&P(e,"font-weight",t[0].fontWeight),t[6]&&t[4]=="list"?h?(h.p(t,_),_[0]&80&&U(h,1)):(h=x1(t),h.c(),U(h,1),h.m(o.parentNode,o)):h&&(He(),Z(h,1,1,()=>{h=null}),ze())},i(d){u||(U(i),U(h),u=!0)},o(d){Z(i),Z(h),u=!1},d(d){d&&(C(e),C(r),C(o)),~n&&c[n].d(),t[56](null),h&&h.d(d),s=!1,Ve(a)}}}const Ky=t=>t.stopPropagation();function Xy(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E,k,I,O,D,N,M,V=ue,W=()=>(V(),V=ft(b,pe=>n(43,M=pe)),b),ne,H=ue,$=()=>(H(),H=ft(ke,pe=>n(7,ne=pe)),ke),Y,G,oe;t.$$.on_destroy.push(()=>V()),t.$$.on_destroy.push(()=>H());const ie=le.createEventDispatcher(),{API:J,QueryUtils:q,fetchData:j,memo:K,derivedMemo:x}=le.getContext("sdk");let{cellOptions:X}=e,{value:F}=e,{fieldSchema:R}=e,{multi:z=!0}=e,{autofocus:me}=e,{label:se}=e,Oe,be=K([]);Me(t,be,pe=>n(26,N=pe));let Ie={},ve={},fe={},Ne=[],te=-1,ae,de,Xe=!0,Te=!1;const Se=x(be,pe=>{let _t={};return X.optionsSource=="custom"||pe.forEach((Bt,Kn)=>_t[Bt]=ve[Bt]??Le[Kn%14]),_t});Me(t,Se,pe=>n(27,G=pe));const Le=["hsla(0, 90%, 75%, 0.35)","hsla(25, 90%, 75%, 0.35)","hsla(50, 80%, 75%, 0.35)","hsla(75, 80%, 75%, 0.35)","hsla(100, 80%, 75%, 0.35)","hsla(125, 90%, 75%, 0.35)","hsla(150, 90%, 75%, 0.35)","hsla(175, 90%, 75%, 0.35)","hsla(200, 90%, 75%, 0.35)","hsla(225, 90%, 75%, 0.35)","hsla(250, 90%, 75%, 0.35)","hsla(275, 90%, 75%, 0.35)","hsla(300, 90%, 75%, 0.35)","hsla(325, 90%, 75%, 0.35)","hsla(350, 90%, 75%, 0.35)"];let rt=JSON.stringify(Array.isArray(F)?F:F?[F]:[]);const kt=K((X==null?void 0:X.datasource)??{});Me(t,kt,pe=>n(44,Y=pe));let{cellState:ke=Ft("Loading",{"*":{goTo(pe){return pe},refresh(){return Re(be,N=[],N),"Loading"},loadSchemaOptions(){var pe;ve=(R==null?void 0:R.optionColors)||{},Re(be,N=((pe=R==null?void 0:R.constraints)==null?void 0:pe.inclusion)||[],N)},loadDataOptions(pe){pe&&pe.length&&pe.forEach(_t=>{var Bt;N.push((Bt=_t[o])==null?void 0:Bt.toString()),n(9,Ie[_t[o]]=_t[r||M.definition.primaryDisplay],Ie),ve[_t[o]]=_t[s],n(10,fe[_t[o]]=_t[u],fe)}),be.set(N)},loadCustomOptions(){a!=null&&a.length&&a.forEach(pe=>{N.push(pe.value),n(9,Ie[pe.value]=pe.label,Ie)}),be.set(N)},clearFilters(){n(3,Ne=N)}},Loading:{_enter(){(X.optionsSource!="data"||M!=null&&M.loaded)&&this.goTo.debounce(10,X.initialState||"View")},_exit(){l=="custom"?this.loadCustomOptions():l=="data"?this.loadDataOptions(M==null?void 0:M.rows):this.loadSchemaOptions(),n(3,Ne=N)},syncFetch(){if(M!=null&&M.loaded)return X.initialState||"View"}},View:{_enter(){},focus(pe){if(!X.readonly&&!X.disabled)return"Editing"}},Editing:{_enter(){n(37,rt=JSON.stringify(Array.isArray(F)?F:F?[F]:[])),ie("enteredit")},_exit(){ce.close(),ie("exitedit")},handleKeyboard(pe){},focusout(pe){if(ce.close(),!(Oe!=null&&Oe.contains(pe.relatedTarget))&&Xe)return this.submit(),"View"},submit(){k&&!X.debounce&&(z?ie("change",E):ie("change",E[0]))},cancel(){return"View"}}})}=e;$();let ce=Ft("Closed",{"*":{toggleOption(pe){let _t=N[pe],Bt=E.indexOf(_t);z&&Bt>-1?(E.splice(Bt,1),n(5,E=[...E])):z?n(5,E=[...E,_t]):E[0]==_t?n(5,E.length=0,E):n(5,E[0]=_t,E),(X.debounce||D)&&(clearTimeout(ae),ae=setTimeout(()=>{ie("change",z?E:E[0])},X.debounce??0)),(!z||Ne.length==E.length)&&(Oe==null||Oe.focus())},toggleAll(){Te?n(5,E=[]):n(5,E=[...Ne]),X.debounce&&(clearTimeout(ae),ae=setTimeout(()=>{ie("change",z?E:E[0])},X.debounce??0))},handleKeyboard(pe){pe.keyCode==32&&ce.toggle(),pe.key=="Escape"&&this.cancel(),pe.key=="Enter"&&(z?(this.toggleOption(te,pe.preventDefault()),this.close()):this.toggleOption(te)),pe.key=="ArrowDown"&&this.highlightNext(pe.preventDefault(),pe.stopPropagation()),pe.key=="ArrowUp"&&this.highlightPrevious(pe.preventDefault(),pe.stopPropagation()),pe.key=="Escape"&&this.close(pe.stopPropagation())},highlightNext(){n(11,te+=1),te>N.length-1&&n(11,te=0)},highlightPrevious(){n(11,te-=1),te<0&&n(11,te=N.length-1)}},Open:{_enter(){n(11,te=-1),this.refocus.debounce(10)},_exit(){},filterOptions(pe){pe&&pe.target.value!=""?n(3,Ne=N.filter(_t=>_t==null?void 0:_t.startsWith(pe.target.value))):n(3,Ne=N)},close(){return"Closed"},toggle(){return"Closed"}},Closed:{toggle(){return"Open"},open(){return"Open"},filterOptions(pe){this.open(),this.filterOptions(pe)},handleKeyboard(pe){!X.autocomplete&&i=="select"?(pe.keyCode==32&&(pe.preventDefault(),pe.stopPropagation(),this.toggle()),(pe.key=="Backspace"||pe.key=="Delete")&&(pe.stopPropagation(),n(5,E=[]),ie("change",E))):i!="select"&&((pe.keyCode==32||pe.key=="Enter")&&this.toggleOption(te,pe.preventDefault()),pe.key=="ArrowDown"&&this.highlightNext(pe.preventDefault(),pe.stopPropagation()),pe.key=="ArrowUp"&&this.highlightPrevious(pe.preventDefault(),pe.stopPropagation()),pe.key=="Escape"&&this.close(pe.stopPropagation()))}}});Me(t,ce,pe=>n(28,oe=pe));const re=pe=>j({API:J,datasource:pe,options:{query:q.buildQuery(X.filter),sortColumn:X.sortColumn,sortOrder:X.sortOrder,limit:X.limit||1e3}});le.onMount(()=>{me&&setTimeout(()=>{ke.focus()},30)});function Ae(pe){ti.call(this,t,pe)}function Ue(pe){Xe=pe,n(13,Xe)}const Je=()=>{n(5,E=[]),ce.close(),Oe.focus()},lt=pe=>{n(5,E=[...pe.detail]),Oe.focus()},he=pe=>ce.toggleOption(pe),it=(pe,_t)=>ce.toggleOption(pe),ot=pe=>n(11,te=pe),wt=()=>n(11,te=-1),Ct=(pe,_t)=>ce.toggleOption(pe),ln=pe=>n(11,te=pe),It=()=>n(11,te=-1);function xt(pe){Be[pe?"unshift":"push"](()=>{Oe=pe,n(8,Oe)})}const _e=(pe,_t)=>ce.toggleOption.debounce(150,pe),st=pe=>n(11,te=pe);function we(pe){Be[pe?"unshift":"push"](()=>{de=pe,n(12,de)})}const xe=()=>n(11,te=-1);return t.$$set=pe=>{"cellOptions"in pe&&n(0,X=pe.cellOptions),"value"in pe&&n(33,F=pe.value),"fieldSchema"in pe&&n(34,R=pe.fieldSchema),"multi"in pe&&n(35,z=pe.multi),"autofocus"in pe&&n(36,me=pe.autofocus),"label"in pe&&n(1,se=pe.label),"cellState"in pe&&$(n(2,ke=pe.cellState))},t.$$.update=()=>{t.$$.dirty[0]&1&&n(4,{controlType:i,optionsSource:l,labelColumn:r,valueColumn:o,iconColumn:u,colorColumn:s,customOptions:a,role:f,readonly:c,disabled:g,error:h,color:d,background:_}=X,i,(n(38,l),n(0,X)),(n(42,r),n(0,X)),(n(40,o),n(0,X)),(n(39,u),n(0,X)),(n(41,s),n(0,X)),(n(25,f),n(0,X)),(n(24,c),n(0,X)),(n(23,g),n(0,X)),(n(22,h),n(0,X)),(n(21,d),n(0,X)),(n(20,_),n(0,X))),t.$$.dirty[0]&1&&kt.set(X.datasource),t.$$.dirty[1]&8320&&W(n(19,b=l=="data"?re(Y):K({loaded:!0}))),t.$$.dirty[1]&4&&n(5,E=Array.isArray(F)?F:F?[F]:[]),t.$$.dirty[0]&40&&n(18,w=Ne.length==E.length&&Ne.length>0),t.$$.dirty[0]&4|t.$$.dirty[1]&12168&&ke.refresh(R,l,r,o,u,s,Y),t.$$.dirty[0]&4|t.$$.dirty[1]&4096&&ke.syncFetch(M),t.$$.dirty[0]&128&&n(6,I=ne=="Editing"),t.$$.dirty[0]&96|t.$$.dirty[1]&64&&n(16,k=I&&rt!==JSON.stringify(E)),t.$$.dirty[0]&16&&n(17,O=i=="radio"),t.$$.dirty[0]&16&&n(15,D=i=="buttons"),t.$$.dirty[0]&40&&n(14,Te=Ne.length==E.length)},[X,se,ke,Ne,i,E,I,ne,Oe,Ie,fe,te,de,Xe,Te,D,k,O,w,b,_,d,h,g,c,f,N,G,oe,be,Se,kt,ce,F,R,z,me,rt,l,u,o,s,r,M,Y,Ae,Ue,Je,lt,he,it,ot,wt,Ct,ln,It,xt,_e,st,we,xe]}class Qy extends Ze{constructor(e){super(),Qe(this,e,Xy,Yy,Ye,{cellOptions:0,value:33,fieldSchema:34,multi:35,autofocus:36,label:1,cellState:2},null,[-1,-1,-1])}}function Vl(t,e){if(t==null)return{};var n={},i=Object.keys(t),l,r;for(r=0;r<i.length;r++)l=i[r],!(e.indexOf(l)>=0)&&(n[l]=t[l]);return n}function mt(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new mt.InputMask(t,e)}class Ot{constructor(e){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},e)}aggregate(e){return this.rawInserted+=e.rawInserted,this.skip=this.skip||e.skip,this.inserted+=e.inserted,this.tailShift+=e.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}mt.ChangeDetails=Ot;function Bl(t){return typeof t=="string"||t instanceof String}const ut={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Zy(t){switch(t){case ut.LEFT:return ut.FORCE_LEFT;case ut.RIGHT:return ut.FORCE_RIGHT;default:return t}}function ss(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function sr(t){return Array.isArray(t)?t:[t,new Ot]}function xr(t,e){if(e===t)return!0;var n=Array.isArray(e),i=Array.isArray(t),l;if(n&&i){if(e.length!=t.length)return!1;for(l=0;l<e.length;l++)if(!xr(e[l],t[l]))return!1;return!0}if(n!=i)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){var r=e instanceof Date,o=t instanceof Date;if(r&&o)return e.getTime()==t.getTime();if(r!=o)return!1;var u=e instanceof RegExp,s=t instanceof RegExp;if(u&&s)return e.toString()==t.toString();if(u!=s)return!1;var a=Object.keys(e);for(l=0;l<a.length;l++)if(!Object.prototype.hasOwnProperty.call(t,a[l]))return!1;for(l=0;l<a.length;l++)if(!xr(t[a[l]],e[a[l]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class Jy{constructor(e,n,i,l){for(this.value=e,this.cursorPos=n,this.oldValue=i,this.oldSelection=l;this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?ut.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?ut.RIGHT:ut.LEFT}}class mi{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0;this.value=e,this.from=n,this.stop=i}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class An{constructor(e){this._value="",this._update(Object.assign({},An.DEFAULTS,e)),this.isInitialized=!0}updateOptions(e){Object.keys(e).length&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e)}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{input:!0};return this.reset(),this.append(e,n,""),this.doCommit(),this.value}get unmaskedValue(){return this.value}set unmaskedValue(e){this.reset(),this.append(e,{},""),this.doCommit()}get typedValue(){return this.doParse(this.value)}set typedValue(e){this.value=this.doFormat(e)}get rawInputValue(){return this.extractInput(0,this.value.length,{raw:!0})}set rawInputValue(e){this.reset(),this.append(e,{raw:!0},""),this.doCommit()}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,n){return e}totalInputPositions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return Math.min(this.value.length,n-e)}extractInput(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return this.value.slice(e,n)}extractTail(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return new mi(this.extractInput(e,n),e)}appendTail(e){return Bl(e)&&(e=new mi(String(e))),e.appendTo(this)}_appendCharRaw(e){return e?(this._value+=e,new Ot({inserted:e,rawInserted:e})):new Ot}_appendChar(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;const l=this.state;let r;if([e,r]=sr(this.doPrepare(e,n)),r=r.aggregate(this._appendCharRaw(e,n)),r.inserted){let o,u=this.doValidate(n)!==!1;if(u&&i!=null){const s=this.state;this.overwrite===!0&&(o=i.state,i.unshift(this.value.length-r.tailShift));let a=this.appendTail(i);u=a.rawInserted===i.toString(),!(u&&a.inserted)&&this.overwrite==="shift"&&(this.state=s,o=i.state,i.shift(),a=this.appendTail(i),u=a.rawInserted===i.toString()),u&&a.inserted&&(this.state=s)}u||(r=new Ot,this.state=l,i&&o&&(i.state=o))}return r}_appendPlaceholder(){return new Ot}_appendEager(){return new Ot}append(e,n,i){if(!Bl(e))throw new Error("value should be string");const l=new Ot,r=Bl(i)?new mi(String(i)):i;n!=null&&n.tail&&(n._beforeTailState=this.state);for(let o=0;o<e.length;++o){const u=this._appendChar(e[o],n,r);if(!u.rawInserted&&!this.doSkipInvalid(e[o],n,r))break;l.aggregate(u)}return(this.eager===!0||this.eager==="append")&&n!==null&&n!==void 0&&n.input&&e&&l.aggregate(this._appendEager()),r!=null&&(l.tailShift+=this.appendTail(r).tailShift),l}remove(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return this._value=this.value.slice(0,e)+this.value.slice(n),new Ot}withValueRefresh(e){if(this._refreshing||!this.isInitialized)return e();this._refreshing=!0;const n=this.rawInputValue,i=this.value,l=e();return this.rawInputValue=n,this.value&&this.value!==i&&i.indexOf(this.value)===0&&this.append(i.slice(this.value.length),{},""),delete this._refreshing,l}runIsolated(e){if(this._isolated||!this.isInitialized)return e(this);this._isolated=!0;const n=this.state,i=e(this);return this.state=n,delete this._isolated,i}doSkipInvalid(e){return this.skipInvalid}doPrepare(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.prepare?this.prepare(e,this,n):e}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}doFormat(e){return this.format?this.format(e,this):e}doParse(e){return this.parse?this.parse(e,this):e}splice(e,n,i,l){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{input:!0};const o=e+n,u=this.extractTail(o),s=this.eager===!0||this.eager==="remove";let a;s&&(l=Zy(l),a=this.extractInput(0,o,{raw:!0}));let f=e;const c=new Ot;if(l!==ut.NONE&&(f=this.nearestInputPos(e,n>1&&e!==0&&!s?ut.NONE:l),c.tailShift=f-e),c.aggregate(this.remove(f)),s&&l!==ut.NONE&&a===this.rawInputValue)if(l===ut.FORCE_LEFT){let g;for(;a===this.rawInputValue&&(g=this.value.length);)c.aggregate(new Ot({tailShift:-1})).aggregate(this.remove(g-1))}else l===ut.FORCE_RIGHT&&u.unshift();return c.aggregate(this.append(i,r,u))}maskEquals(e){return this.mask===e}typedValueEquals(e){const n=this.typedValue;return e===n||An.EMPTY_VALUES.includes(e)&&An.EMPTY_VALUES.includes(n)||this.doFormat(e)===this.doFormat(this.typedValue)}}An.DEFAULTS={format:String,parse:t=>t,skipInvalid:!0},An.EMPTY_VALUES=[void 0,null,""],mt.Masked=An;function eg(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?mt.MaskedRegExp:Bl(t)?mt.MaskedPattern:t instanceof Date||t===Date?mt.MaskedDate:t instanceof Number||typeof t=="number"||t===Number?mt.MaskedNumber:Array.isArray(t)||t===Array?mt.MaskedDynamic:mt.Masked&&t.prototype instanceof mt.Masked?t:t instanceof mt.Masked?t.constructor:t instanceof Function?mt.MaskedFunction:(console.warn("Mask not found for mask",t),mt.Masked)}function ol(t){if(mt.Masked&&t instanceof mt.Masked)return t;t=Object.assign({},t);const e=t.mask;if(mt.Masked&&e instanceof mt.Masked)return e;const n=eg(e);if(!n)throw new Error("Masked class is not found for provided mask, appropriate module needs to be import manually before creating mask.");return new n(t)}mt.createMask=ol;const xy=["parent","isOptional","placeholderChar","displayChar","lazy","eager"],$y={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class tg{constructor(e){const{parent:n,isOptional:i,placeholderChar:l,displayChar:r,lazy:o,eager:u}=e,s=Vl(e,xy);this.masked=ol(s),Object.assign(this,{parent:n,isOptional:i,placeholderChar:l,displayChar:r,lazy:o,eager:u})}reset(){this.isFilled=!1,this.masked.reset()}remove(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return e===0&&n>=1?(this.isFilled=!1,this.masked.remove(e,n)):new Ot}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.isFilled)return new Ot;const i=this.masked.state,l=this.masked._appendChar(e,n);return l.inserted&&this.doValidate(n)===!1&&(l.inserted=l.rawInserted="",this.masked.state=i),!l.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(l.inserted=this.placeholderChar),l.skip=!l.inserted&&!this.isOptional,this.isFilled=!!l.inserted,l}append(){return this.masked.append(...arguments)}_appendPlaceholder(){const e=new Ot;return this.isFilled||this.isOptional||(this.isFilled=!0,e.inserted=this.placeholderChar),e}_appendEager(){return new Ot}extractTail(){return this.masked.extractTail(...arguments)}appendTail(){return this.masked.appendTail(...arguments)}extractInput(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,i=arguments.length>2?arguments[2]:void 0;return this.masked.extractInput(e,n,i)}nearestInputPos(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ut.NONE;const i=0,l=this.value.length,r=Math.min(Math.max(e,i),l);switch(n){case ut.LEFT:case ut.FORCE_LEFT:return this.isComplete?r:i;case ut.RIGHT:case ut.FORCE_RIGHT:return this.isComplete?r:l;case ut.NONE:default:return r}}totalInputPositions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return this.value.slice(e,n).length}doValidate(){return this.masked.doValidate(...arguments)&&(!this.parent||this.parent.doValidate(...arguments))}doCommit(){this.masked.doCommit()}get state(){return{masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}}class ng{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._value.length;return this._value=this._value.slice(0,e)+this._value.slice(n),this._value||(this._isRawInput=!1),new Ot}nearestInputPos(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ut.NONE;const i=0,l=this._value.length;switch(n){case ut.LEFT:case ut.FORCE_LEFT:return i;case ut.NONE:case ut.RIGHT:case ut.FORCE_RIGHT:default:return l}}totalInputPositions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._value.length;return this._isRawInput?n-e:0}extractInput(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._value.length;return(arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}).raw&&this._isRawInput&&this._value.slice(e,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=new Ot;if(this.isFilled)return i;const l=this.eager===!0||this.eager==="append",o=this.char===e&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!l)&&!n.tail;return o&&(i.rawInserted=this.char),this._value=i.inserted=this.char,this._isRawInput=o&&(n.raw||n.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new Ot;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,new mi("")}appendTail(e){return Bl(e)&&(e=new mi(String(e))),e.appendTo(this)}append(e,n,i){const l=this._appendChar(e[0],n);return i!=null&&(l.tailShift+=this.appendTail(i).tailShift),l}doCommit(){}get state(){return{_value:this._value,_isRawInput:this._isRawInput}}set state(e){Object.assign(this,e)}}const e3=["chunks"];class sl{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.chunks=e,this.from=n}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;Bl(e)&&(e=new mi(String(e)));const n=this.chunks[this.chunks.length-1],i=n&&(n.stop===e.stop||e.stop==null)&&e.from===n.from+n.toString().length;if(e instanceof mi)i?n.extend(e.toString()):this.chunks.push(e);else if(e instanceof sl){if(e.stop==null){let l;for(;e.chunks.length&&e.chunks[0].stop==null;)l=e.chunks.shift(),l.from+=e.from,this.extend(l)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof mt.MaskedPattern))return new mi(this.toString()).appendTo(e);const n=new Ot;for(let i=0;i<this.chunks.length&&!n.skip;++i){const l=this.chunks[i],r=e._mapPosToBlock(e.value.length),o=l.stop;let u;if(o!=null&&(!r||r.index<=o)){if(l instanceof sl||e._stops.indexOf(o)>=0){const s=e._appendPlaceholder(o);n.aggregate(s)}u=l instanceof sl&&e._blocks[o]}if(u){const s=u.appendTail(l);s.skip=!1,n.aggregate(s),e._value+=s.inserted;const a=l.toString().slice(s.rawInserted.length);a&&n.aggregate(e.append(a,{tail:!0}))}else n.aggregate(e.append(l.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:n}=e,i=Vl(e,e3);Object.assign(this,i),this.chunks=n.map(l=>{const r="chunks"in l?new sl:new mi;return r.state=l,r})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const n=e!=null?e-this.from:e;let i=0;for(;i<this.chunks.length;){const l=this.chunks[i],r=l.unshift(n);if(l.toString()){if(!r)break;++i}else this.chunks.splice(i,1);if(r)return r}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const n=this.chunks[e],i=n.shift();if(n.toString()){if(!i)break;--e}else this.chunks.splice(e,1);if(i)return i}return""}}class t3{constructor(e,n){this.masked=e,this._log=[];const{offset:i,index:l}=e._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=i,this.index=l,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return this.state=e,e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.value.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((n=this.block)===null||n===void 0?void 0:n.value.length)||0){var n;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ut.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ut.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ut.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ut.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ut.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ut.NONE),!0})}}class n3 extends An{_update(e){e.mask&&(e.validate=n=>n.search(e.mask)>=0),super._update(e)}}mt.MaskedRegExp=n3;const i3=["_blocks"];class Pn extends An{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.definitions=Object.assign({},$y,e.definitions),super(Object.assign({},Pn.DEFAULTS,e))}_update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this._stops=[],this._maskedBlocks={};let n=this.mask;if(!n||!e)return;let i=!1,l=!1;for(let u=0;u<n.length;++u){var r,o;if(this.blocks){const g=n.slice(u),h=Object.keys(this.blocks).filter(_=>g.indexOf(_)===0);h.sort((_,b)=>b.length-_.length);const d=h[0];if(d){const _=ol(Object.assign({parent:this,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite},this.blocks[d]));_&&(this._blocks.push(_),this._maskedBlocks[d]||(this._maskedBlocks[d]=[]),this._maskedBlocks[d].push(this._blocks.length-1)),u+=d.length-1;continue}}let s=n[u],a=s in e;if(s===Pn.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(s==="{"||s==="}"){i=!i;continue}if(s==="["||s==="]"){l=!l;continue}if(s===Pn.ESCAPE_CHAR){if(++u,s=n[u],!s)break;a=!1}const f=(r=e[s])!==null&&r!==void 0&&r.mask&&!(((o=e[s])===null||o===void 0?void 0:o.mask.prototype)instanceof mt.Masked)?e[s]:{mask:e[s]},c=a?new tg(Object.assign({parent:this,isOptional:l,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar},f)):new ng({char:s,eager:this.eager,isUnmasking:i});this._blocks.push(c)}}get state(){return Object.assign({},super.state,{_blocks:this._blocks.map(e=>e.state)})}set state(e){const{_blocks:n}=e,i=Vl(e,i3);this._blocks.forEach((l,r)=>l.state=n[r]),super.state=i}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this._blocks.reduce((e,n)=>e+=n.unmaskedValue,"")}set unmaskedValue(e){super.unmaskedValue=e}get value(){return this._blocks.reduce((e,n)=>e+=n.value,"")}set value(e){super.value=e}get displayValue(){return this._blocks.reduce((e,n)=>e+=n.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const n=new Ot;let i=(e=this._mapPosToBlock(this.value.length))===null||e===void 0?void 0:e.index;if(i==null)return n;this._blocks[i].isFilled&&++i;for(let l=i;l<this._blocks.length;++l){const r=this._blocks[l]._appendEager();if(!r.inserted)break;n.aggregate(r)}return n}_appendCharRaw(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this._mapPosToBlock(this.value.length),l=new Ot;if(!i)return l;for(let u=i.index;;++u){var r,o;const s=this._blocks[u];if(!s)break;const a=s._appendChar(e,Object.assign({},n,{_beforeTailState:(r=n._beforeTailState)===null||r===void 0||(o=r._blocks)===null||o===void 0?void 0:o[u]})),f=a.skip;if(l.aggregate(a),f||a.rawInserted)break}return l}extractTail(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;const i=new sl;return e===n||this._forEachBlocksInRange(e,n,(l,r,o,u)=>{const s=l.extractTail(o,u);s.stop=this._findStopBefore(r),s.from=this._blockStartPos(r),s instanceof sl&&(s.blockIndex=r),i.extend(s)}),i}extractInput(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e===n)return"";let l="";return this._forEachBlocksInRange(e,n,(r,o,u,s)=>{l+=r.extractInput(u,s,i)}),l}_findStopBefore(e){let n;for(let i=0;i<this._stops.length;++i){const l=this._stops[i];if(l<=e)n=l;else break}return n}_appendPlaceholder(e){const n=new Ot;if(this.lazy&&e==null)return n;const i=this._mapPosToBlock(this.value.length);if(!i)return n;const l=i.index,r=e??this._blocks.length;return this._blocks.slice(l,r).forEach(o=>{if(!o.lazy||e!=null){const u=o._blocks!=null?[o._blocks.length]:[],s=o._appendPlaceholder(...u);this._value+=s.inserted,n.aggregate(s)}}),n}_mapPosToBlock(e){let n="";for(let i=0;i<this._blocks.length;++i){const l=this._blocks[i],r=n.length;if(n+=l.value,e<=n.length)return{index:i,offset:e-r}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((n,i)=>n+=i.value.length,0)}_forEachBlocksInRange(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,i=arguments.length>2?arguments[2]:void 0;const l=this._mapPosToBlock(e);if(l){const r=this._mapPosToBlock(n),o=r&&l.index===r.index,u=l.offset,s=r&&o?r.offset:this._blocks[l.index].value.length;if(i(this._blocks[l.index],l.index,u,s),r&&!o){for(let a=l.index+1;a<r.index;++a)i(this._blocks[a],a,0,this._blocks[a].value.length);i(this._blocks[r.index],r.index,0,r.offset)}}}remove(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;const i=super.remove(e,n);return this._forEachBlocksInRange(e,n,(l,r,o,u)=>{i.aggregate(l.remove(o,u))}),i}nearestInputPos(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ut.NONE;if(!this._blocks.length)return 0;const i=new t3(this,e);if(n===ut.NONE)return i.pushRightBeforeInput()||(i.popState(),i.pushLeftBeforeInput())?i.pos:this.value.length;if(n===ut.LEFT||n===ut.FORCE_LEFT){if(n===ut.LEFT){if(i.pushRightBeforeFilled(),i.ok&&i.pos===e)return e;i.popState()}if(i.pushLeftBeforeInput(),i.pushLeftBeforeRequired(),i.pushLeftBeforeFilled(),n===ut.LEFT){if(i.pushRightBeforeInput(),i.pushRightBeforeRequired(),i.ok&&i.pos<=e||(i.popState(),i.ok&&i.pos<=e))return i.pos;i.popState()}return i.ok?i.pos:n===ut.FORCE_LEFT?0:(i.popState(),i.ok||(i.popState(),i.ok)?i.pos:0)}return n===ut.RIGHT||n===ut.FORCE_RIGHT?(i.pushRightBeforeInput(),i.pushRightBeforeRequired(),i.pushRightBeforeFilled()?i.pos:n===ut.FORCE_RIGHT?this.value.length:(i.popState(),i.ok||(i.popState(),i.ok)?i.pos:this.nearestInputPos(e,ut.LEFT))):e}totalInputPositions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,i=0;return this._forEachBlocksInRange(e,n,(l,r,o,u)=>{i+=l.totalInputPositions(o,u)}),i}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const n=this._maskedBlocks[e];return n?n.map(i=>this._blocks[i]):[]}}Pn.DEFAULTS={lazy:!0,placeholderChar:"_"},Pn.STOP_CHAR="`",Pn.ESCAPE_CHAR="\\",Pn.InputDefinition=tg,Pn.FixedDefinition=ng,mt.MaskedPattern=Pn;class $r extends Pn{get _matchFrom(){return this.maxLength-String(this.from).length}_update(e){e=Object.assign({to:this.to||0,from:this.from||0,maxLength:this.maxLength||0},e);let n=String(e.to).length;e.maxLength!=null&&(n=Math.max(n,e.maxLength)),e.maxLength=n;const i=String(e.from).padStart(n,"0"),l=String(e.to).padStart(n,"0");let r=0;for(;r<l.length&&l[r]===i[r];)++r;e.mask=l.slice(0,r).replace(/0/g,"\\0")+"0".repeat(n-r),super._update(e)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let n="",i="";const[,l,r]=e.match(/^(\D*)(\d*)(\D*)/)||[];return r&&(n="0".repeat(l.length)+r,i="9".repeat(l.length)+r),n=n.padEnd(this.maxLength,"0"),i=i.padEnd(this.maxLength,"9"),[n,i]}doPrepare(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i;if([e,i]=sr(super.doPrepare(e.replace(/\D/g,""),n)),!this.autofix||!e)return e;const l=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0");let o=this.value+e;if(o.length>this.maxLength)return"";const[u,s]=this.boundaries(o);return Number(s)<this.from?l[o.length-1]:Number(u)>this.to?this.autofix==="pad"&&o.length<this.maxLength?["",i.aggregate(this.append(l[o.length-1]+e,n))]:r[o.length-1]:e}doValidate(){const e=this.value;if(e.search(/[^0]/)===-1&&e.length<=this._matchFrom)return!0;const[i,l]=this.boundaries(e);return this.from<=Number(l)&&Number(i)<=this.to&&super.doValidate(...arguments)}}mt.MaskedRange=$r;class Ul extends Pn{constructor(e){super(Object.assign({},Ul.DEFAULTS,e))}_update(e){e.mask===Date&&delete e.mask,e.pattern&&(e.mask=e.pattern);const n=e.blocks;e.blocks=Object.assign({},Ul.GET_DEFAULT_BLOCKS()),e.min&&(e.blocks.Y.from=e.min.getFullYear()),e.max&&(e.blocks.Y.to=e.max.getFullYear()),e.min&&e.max&&e.blocks.Y.from===e.blocks.Y.to&&(e.blocks.m.from=e.min.getMonth()+1,e.blocks.m.to=e.max.getMonth()+1,e.blocks.m.from===e.blocks.m.to&&(e.blocks.d.from=e.min.getDate(),e.blocks.d.to=e.max.getDate())),Object.assign(e.blocks,this.blocks,n),Object.keys(e.blocks).forEach(i=>{const l=e.blocks[i];!("autofix"in l)&&"autofix"in e&&(l.autofix=e.autofix)}),super._update(e)}doValidate(){const e=this.date;return super.doValidate(...arguments)&&(!this.isComplete||this.isDateExist(this.value)&&e!=null&&(this.min==null||this.min<=e)&&(this.max==null||e<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}}Ul.DEFAULTS={pattern:"d{.}`m{.}`Y",format:t=>{if(!t)return"";const e=String(t.getDate()).padStart(2,"0"),n=String(t.getMonth()+1).padStart(2,"0"),i=t.getFullYear();return[e,n,i].join(".")},parse:t=>{const[e,n,i]=t.split(".");return new Date(i,n-1,e)}},Ul.GET_DEFAULT_BLOCKS=()=>({d:{mask:$r,from:1,to:31,maxLength:2},m:{mask:$r,from:1,to:12,maxLength:2},Y:{mask:$r,from:1900,to:9999}}),mt.MaskedDate=Ul;class us{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,n){if(!(e==null||n==null||e===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(e,n)}catch{}}_unsafeSelect(e,n){}get isActive(){return!1}bindEvents(e){}unbindEvents(){}}mt.MaskElement=us;class Hl extends us{constructor(e){super(),this.input=e,this._handlers={}}get rootElement(){var e,n,i;return(e=(n=(i=this.input).getRootNode)===null||n===void 0?void 0:n.call(i))!==null&&e!==void 0?e:document}get isActive(){return this.input===this.rootElement.activeElement}get _unsafeSelectionStart(){return this.input.selectionStart}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,n){this.input.setSelectionRange(e,n)}get value(){return this.input.value}set value(e){this.input.value=e}bindEvents(e){Object.keys(e).forEach(n=>this._toggleEventHandler(Hl.EVENTS_MAP[n],e[n]))}unbindEvents(){Object.keys(this._handlers).forEach(e=>this._toggleEventHandler(e))}_toggleEventHandler(e,n){this._handlers[e]&&(this.input.removeEventListener(e,this._handlers[e]),delete this._handlers[e]),n&&(this.input.addEventListener(e,n),this._handlers[e]=n)}}Hl.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},mt.HTMLMaskElement=Hl;class ig extends Hl{get _unsafeSelectionStart(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),i=n&&n.anchorOffset,l=n&&n.focusOffset;return l==null||i==null||i<l?i:l}get _unsafeSelectionEnd(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),i=n&&n.anchorOffset,l=n&&n.focusOffset;return l==null||i==null||i>l?i:l}_unsafeSelect(e,n){if(!this.rootElement.createRange)return;const i=this.rootElement.createRange();i.setStart(this.input.firstChild||this.input,e),i.setEnd(this.input.lastChild||this.input,n);const l=this.rootElement,r=l.getSelection&&l.getSelection();r&&(r.removeAllRanges(),r.addRange(i))}get value(){return this.input.textContent}set value(e){this.input.textContent=e}}mt.HTMLContenteditableMaskElement=ig;const l3=["mask"];class r3{constructor(e,n){this.el=e instanceof us?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new ig(e):new Hl(e),this.masked=ol(n),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}get mask(){return this.masked.mask}maskEquals(e){var n;return e==null||((n=this.masked)===null||n===void 0?void 0:n.maskEquals(e))}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof mt.Masked)&&this.masked.constructor===eg(e)){this.masked.updateOptions({mask:e});return}const n=ol({mask:e});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),l=1;l<n;l++)i[l-1]=arguments[l];const r=this._listeners[e];r&&r.forEach(o=>o(...i))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const e=this.masked.unmaskedValue,n=this.masked.value,i=this.displayValue,l=this.unmaskedValue!==e||this.value!==n;this._unmaskedValue=e,this._value=n,this.el.value!==i&&(this.el.value=i),l&&this._fireChangeEvents()}updateOptions(e){const{mask:n}=e,i=Vl(e,l3),l=!this.maskEquals(n),r=!xr(this.masked,i);l&&(this.mask=n),r&&this.masked.updateOptions(i),(l||r)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,ut.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,n){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(n),this}off(e,n){if(!this._listeners[e])return this;if(!n)return delete this._listeners[e],this;const i=this._listeners[e].indexOf(n);return i>=0&&this._listeners[e].splice(i,1),this}_onInput(e){if(this._inputEvent=e,this._abortUpdateCursor(),!this._selection)return this.updateValue();const n=new Jy(this.el.value,this.cursorPos,this.displayValue,this._selection),i=this.masked.rawInputValue,l=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,r=i===this.masked.rawInputValue?n.removeDirection:ut.NONE;let o=this.masked.nearestInputPos(n.startChangePos+l,r);r!==ut.NONE&&(o=this.masked.nearestInputPos(o,ut.NONE)),this.updateControl(),this.updateCursor(o),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}mt.InputMask=r3;class o3 extends Pn{_update(e){e.enum&&(e.mask="*".repeat(e.enum[0].length)),super._update(e)}doValidate(){return this.enum.some(e=>e.indexOf(this.unmaskedValue)>=0)&&super.doValidate(...arguments)}}mt.MaskedEnum=o3;class Yn extends An{constructor(e){super(Object.assign({},Yn.DEFAULTS,e))}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){let e="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",i=(this.scale?"(".concat(ss(this.radix),"\\d{0,").concat(this.scale,"})?"):"")+"$";this._numberRegExp=new RegExp(e+n+i),this._mapToRadixRegExp=new RegExp("[".concat(this.mapToRadix.map(ss).join(""),"]"),"g"),this._thousandsSeparatorRegExp=new RegExp(ss(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const n=e.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepare(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};e=this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?e.replace(this._mapToRadixRegExp,this.radix):e);const[i,l]=sr(super.doPrepare(e,n));return e&&!i&&(l.skip=!0),[i,l]}_separatorsCount(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=0;for(let l=0;l<e;++l)this._value.indexOf(this.thousandsSeparator,l)===l&&(++i,n&&(e+=this.thousandsSeparator.length));return i}_separatorsCountFromSlice(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._value;return this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,i=arguments.length>2?arguments[2]:void 0;return[e,n]=this._adjustRangeWithSeparators(e,n),this._removeThousandsSeparators(super.extractInput(e,n,i))}_appendCharRaw(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.thousandsSeparator)return super._appendCharRaw(e,n);const i=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,l=this._separatorsCountFromSlice(i);this._value=this._removeThousandsSeparators(this.value);const r=super._appendCharRaw(e,n);this._value=this._insertThousandsSeparators(this._value);const o=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,u=this._separatorsCountFromSlice(o);return r.tailShift+=(u-l)*this.thousandsSeparator.length,r.skip=!r.rawInserted&&e===this.thousandsSeparator,r}_findSeparatorAround(e){if(this.thousandsSeparator){const n=e-this.thousandsSeparator.length+1,i=this.value.indexOf(this.thousandsSeparator,n);if(i<=e)return i}return-1}_adjustRangeWithSeparators(e,n){const i=this._findSeparatorAround(e);i>=0&&(e=i);const l=this._findSeparatorAround(n);return l>=0&&(n=l+this.thousandsSeparator.length),[e,n]}remove(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;[e,n]=this._adjustRangeWithSeparators(e,n);const i=this.value.slice(0,e),l=this.value.slice(n),r=this._separatorsCount(i.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(i+l));const o=this._separatorsCountFromSlice(i);return new Ot({tailShift:(o-r)*this.thousandsSeparator.length})}nearestInputPos(e,n){if(!this.thousandsSeparator)return e;switch(n){case ut.NONE:case ut.LEFT:case ut.FORCE_LEFT:{const i=this._findSeparatorAround(e-1);if(i>=0){const l=i+this.thousandsSeparator.length;if(e<l||this.value.length<=l||n===ut.FORCE_LEFT)return i}break}case ut.RIGHT:case ut.FORCE_RIGHT:{const i=this._findSeparatorAround(e);if(i>=0)return i+this.thousandsSeparator.length}}return e}doValidate(e){let n=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(n){const i=this.number;n=n&&!isNaN(i)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return n&&super.doValidate(e)}doCommit(){if(this.value){const e=this.number;let n=e;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==e&&(this.unmaskedValue=this.doFormat(n));let i=this.value;this.normalizeZeros&&(i=this._normalizeZeros(i)),this.padFractionalZeros&&this.scale>0&&(i=this._padFractionalZeros(i)),this._value=i}super.doCommit()}_normalizeZeros(e){const n=this._removeThousandsSeparators(e).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(i,l,r,o)=>l+o),e.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const n=e.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;const l=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===Yn.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,n,i)&&!l}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Yn.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.doParse(this.unmaskedValue)}set typedValue(e){this.rawInputValue=this.doFormat(e).replace(Yn.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.signed||this.min!=null&&this.min<0||this.max!=null&&this.max<0}typedValueEquals(e){return(super.typedValueEquals(e)||Yn.EMPTY_VALUES.includes(e)&&Yn.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Yn.UNMASKED_RADIX=".",Yn.DEFAULTS={radix:",",thousandsSeparator:"",mapToRadix:[Yn.UNMASKED_RADIX],scale:2,signed:!1,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},Yn.EMPTY_VALUES=[...An.EMPTY_VALUES,0],mt.MaskedNumber=Yn;class s3 extends An{_update(e){e.mask&&(e.validate=e.mask),super._update(e)}}mt.MaskedFunction=s3;const u3=["compiledMasks","currentMaskRef","currentMask"],a3=["mask"];class eo extends An{constructor(e){super(Object.assign({},eo.DEFAULTS,e)),this.currentMask=null}_update(e){super._update(e),"mask"in e&&(this.compiledMasks=Array.isArray(e.mask)?e.mask.map(n=>ol(n)):[])}_appendCharRaw(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this._applyDispatch(e,n);return this.currentMask&&i.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(n))),i}_applyDispatch(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";const l=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,r=this.rawInputValue,o=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:r,u=r.slice(o.length),s=this.currentMask,a=new Ot,f=s==null?void 0:s.state;if(this.currentMask=this.doDispatch(e,Object.assign({},n),i),this.currentMask)if(this.currentMask!==s){if(this.currentMask.reset(),o){const c=this.currentMask.append(o,{raw:!0});a.tailShift=c.inserted.length-l.length}u&&(a.tailShift+=this.currentMask.append(u,{raw:!0,tail:!0}).tailShift)}else this.currentMask.state=f;return a}_appendPlaceholder(){const e=this._applyDispatch(...arguments);return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch(...arguments);return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const n=new Ot;return e&&n.aggregate(this._applyDispatch("",{},e)),n.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var n,i;return Object.assign({},e,{_beforeTailState:((n=e._beforeTailState)===null||n===void 0?void 0:n.currentMaskRef)===this.currentMask&&((i=e._beforeTailState)===null||i===void 0?void 0:i.currentMask)||e._beforeTailState})}doDispatch(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";return this.dispatch(e,this,n,i)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},[i,l]=sr(super.doPrepare(e,n));if(this.currentMask){let r;[i,r]=sr(super.doPrepare(i,this.currentMaskFlags(n))),l=l.aggregate(r)}return[i,l]}reset(){var e;(e=this.currentMask)===null||e===void 0||e.reset(),this.compiledMasks.forEach(n=>n.reset())}get value(){return this.currentMask?this.currentMask.value:""}set value(e){super.value=e}get unmaskedValue(){return this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.currentMask?this.currentMask.typedValue:""}set typedValue(e){let n=String(e);this.currentMask&&(this.currentMask.typedValue=e,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!(!((e=this.currentMask)===null||e===void 0)&&e.isComplete)}get isFilled(){var e;return!!(!((e=this.currentMask)===null||e===void 0)&&e.isFilled)}remove(){const e=new Ot;return this.currentMask&&e.aggregate(this.currentMask.remove(...arguments)).aggregate(this._applyDispatch()),e}get state(){var e;return Object.assign({},super.state,{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)===null||e===void 0?void 0:e.state})}set state(e){const{compiledMasks:n,currentMaskRef:i,currentMask:l}=e,r=Vl(e,u3);this.compiledMasks.forEach((o,u)=>o.state=n[u]),i!=null&&(this.currentMask=i,this.currentMask.state=l),super.state=r}extractInput(){return this.currentMask?this.currentMask.extractInput(...arguments):""}extractTail(){return this.currentMask?this.currentMask.extractTail(...arguments):super.extractTail(...arguments)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(){return this.currentMask?this.currentMask.nearestInputPos(...arguments):super.nearestInputPos(...arguments)}get overwrite(){return this.currentMask?this.currentMask.overwrite:super.overwrite}set overwrite(e){console.warn('"overwrite" option is not available in dynamic mask, use this option in siblings')}get eager(){return this.currentMask?this.currentMask.eager:super.eager}set eager(e){console.warn('"eager" option is not available in dynamic mask, use this option in siblings')}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:super.skipInvalid}set skipInvalid(e){(this.isInitialized||e!==An.DEFAULTS.skipInvalid)&&console.warn('"skipInvalid" option is not available in dynamic mask, use this option in siblings')}maskEquals(e){return Array.isArray(e)&&this.compiledMasks.every((n,i)=>{if(!e[i])return;const l=e[i],{mask:r}=l,o=Vl(l,a3);return xr(n,o)&&n.maskEquals(r)})}typedValueEquals(e){var n;return!!(!((n=this.currentMask)===null||n===void 0)&&n.typedValueEquals(e))}}eo.DEFAULTS={dispatch:(t,e,n,i)=>{if(!e.compiledMasks.length)return;const l=e.rawInputValue,r=e.compiledMasks.map((o,u)=>{const s=e.currentMask===o,a=s?o.value.length:o.nearestInputPos(o.value.length,ut.FORCE_LEFT);return o.rawInputValue!==l?(o.reset(),o.append(l,{raw:!0})):s||o.remove(a),o.append(t,e.currentMaskFlags(n)),o.appendTail(i),{index:u,weight:o.rawInputValue.length,totalInputPositions:o.totalInputPositions(0,Math.max(a,o.nearestInputPos(o.value.length,ut.FORCE_LEFT)))}});return r.sort((o,u)=>u.weight-o.weight||u.totalInputPositions-o.totalInputPositions),e.compiledMasks[r[0].index]}},mt.MaskedDynamic=eo;const as={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function lg(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:as.MASKED,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:as.MASKED;const i=ol(t);return l=>i.runIsolated(r=>(r[e]=l,r[n]))}function f3(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return lg(...n)(t)}mt.PIPE_TYPE=as,mt.createPipe=lg,mt.pipe=f3;try{globalThis.IMask=mt}catch{}function rg(t){let e,n;return{c(){e=v("i"),m(e,"class",n=t[10]+" field-icon"),p(e,"with-error",t[5])},m(i,l){A(i,e,l)},p(i,l){l&1024&&n!==(n=i[10]+" field-icon")&&m(e,"class",n),l&1056&&p(e,"with-error",i[5])},d(i){i&&C(e)}}}function c3(t){let e,n,i=(t[13](t[4])||t[11])+"",l,r,o,u;return{c(){e=v("div"),n=v("span"),l=Ee(i),m(e,"class","value"),m(e,"tabindex",r=t[1].readonly||t[1].disabled?"-1":"0"),p(e,"with-icon",t[1].icon),p(e,"placeholder",!t[0]),P(e,"justify-content",t[1].align)},m(s,a){A(s,e,a),S(e,n),S(n,l),o||(u=B(e,"focusin",function(){Ge(t[3].focus)&&t[3].focus.apply(this,arguments)}),o=!0)},p(s,a){t=s,a&2064&&i!==(i=(t[13](t[4])||t[11])+"")&&Pe(l,i),a&2&&r!==(r=t[1].readonly||t[1].disabled?"-1":"0")&&m(e,"tabindex",r),a&2&&p(e,"with-icon",t[1].icon),a&1&&p(e,"placeholder",!t[0]),a&2&&P(e,"justify-content",t[1].align)},d(s){s&&C(e),o=!1,u()}}}function d3(t){var s;let e,n,i,l,r,o,u=t[4]&&((s=t[1])==null?void 0:s.clearIcon)!==!1&&og(t);return{c(){e=v("input"),i=Q(),u&&u.c(),l=Fe(),m(e,"tabindex","0"),m(e,"class","editor"),m(e,"placeholder",t[11]),p(e,"with-icon",t[1].icon),P(e,"color",t[8]?t[1].color:"var(--spectrum-global-color-gray-700)"),P(e,"text-align",t[1].align=="center"?"center":t[1].align=="flex-end"?"right":"left"),P(e,"padding-right",t[1].align!="flex-start"?"2rem":"0.75rem")},m(a,f){A(a,e,f),t[18](e),A(a,i,f),u&&u.m(a,f),A(a,l,f),r||(o=[B(e,"focusout",function(){Ge(t[3].focusout)&&t[3].focusout.apply(this,arguments)}),B(e,"keydown",function(){Ge(t[3].handleKeyboard)&&t[3].handleKeyboard.apply(this,arguments)}),tn(t[14].call(null,e)),tn(n=t[15].call(null,e,t[2]))],r=!0)},p(a,f){var c;t=a,f&2048&&m(e,"placeholder",t[11]),n&&Ge(n.update)&&f&4&&n.update.call(null,t[2]),f&2&&p(e,"with-icon",t[1].icon),f&258&&P(e,"color",t[8]?t[1].color:"var(--spectrum-global-color-gray-700)"),f&2&&P(e,"text-align",t[1].align=="center"?"center":t[1].align=="flex-end"?"right":"left"),f&2&&P(e,"padding-right",t[1].align!="flex-start"?"2rem":"0.75rem"),t[4]&&((c=t[1])==null?void 0:c.clearIcon)!==!1?u?u.p(t,f):(u=og(t),u.c(),u.m(l.parentNode,l)):u&&(u.d(1),u=null)},d(a){a&&(C(e),C(i),C(l)),t[18](null),u&&u.d(a),r=!1,Ve(o)}}}function og(t){let e,n,i;return{c(){e=v("i"),m(e,"class","ri-close-line clearIcon")},m(l,r){A(l,e,r),n||(i=B(e,"mousedown",Ii(Et(function(){Ge(t[3].clear)&&t[3].clear.apply(this,arguments)}))),n=!0)},p(l,r){t=l},d(l){l&&C(e),n=!1,i()}}}function h3(t){let e,n,i=t[10]&&rg(t);function l(u,s){return u[12]?d3:c3}let r=l(t),o=r(t);return{c(){e=v("div"),i&&i.c(),n=Q(),o.c(),m(e,"class","superCell"),p(e,"inEdit",t[12]),p(e,"isDirty",t[7]&&t[1].showDirty),p(e,"focused",t[12]),p(e,"inline",t[1].role=="inlineInput"),p(e,"tableCell",t[1].role=="tableCell"),p(e,"formInput",t[1].role=="formInput"),p(e,"disabled",t[1].disabled),p(e,"readonly",t[1].readonly),p(e,"error",t[1].error||t[4]&&t[2]&&!t[8]),p(e,"complete",t[8]),P(e,"color",t[1].color),P(e,"background",t[6]=="Editing"&&t[1].role!="inline"?"var(--spectrum-global-color-gray-50)":t[1].background),P(e,"font-weight",t[1].fontWeight)},m(u,s){A(u,e,s),i&&i.m(e,null),S(e,n),o.m(e,null)},p(u,[s]){u[10]?i?i.p(u,s):(i=rg(u),i.c(),i.m(e,n)):i&&(i.d(1),i=null),r===(r=l(u))&&o?o.p(u,s):(o.d(1),o=r(u),o&&(o.c(),o.m(e,null))),s&4096&&p(e,"inEdit",u[12]),s&130&&p(e,"isDirty",u[7]&&u[1].showDirty),s&4096&&p(e,"focused",u[12]),s&2&&p(e,"inline",u[1].role=="inlineInput"),s&2&&p(e,"tableCell",u[1].role=="tableCell"),s&2&&p(e,"formInput",u[1].role=="formInput"),s&2&&p(e,"disabled",u[1].disabled),s&2&&p(e,"readonly",u[1].readonly),s&278&&p(e,"error",u[1].error||u[4]&&u[2]&&!u[8]),s&256&&p(e,"complete",u[8]),s&2&&P(e,"color",u[1].color),s&66&&P(e,"background",u[6]=="Editing"&&u[1].role!="inline"?"var(--spectrum-global-color-gray-50)":u[1].background),s&2&&P(e,"font-weight",u[1].fontWeight)},i:ue,o:ue,d(u){u&&C(e),i&&i.d(),o.d()}}}function g3(t,e,n){let i,l,r,o,u,s=ue,a=()=>(s(),s=ft(M,H=>n(6,u=H)),M);t.$$.on_destroy.push(()=>s());const f=le.createEventDispatcher();let{value:c}=e,{cellOptions:g={role:"formInput",initialState:"Editing",debounce:250,placeholder:""}}=e,{autofocus:h}=e,{mask:d=""}=e,_,b,w=c,E=!1,k=!1,I,O;function D(H){if(!d||!H)return H;const $=mt.createMask({mask:d});return $.unmaskedValue=H,$.value}function N(){if(!d){n(8,k=!1);return}if(!w){n(8,k=!1);return}const H=mt.createMask({mask:d});H.resolve(w),n(8,k=H.isComplete)}let{cellState:M=Ft((g==null?void 0:g.initialState)??"View",{"*":{reset(H){n(4,w=c),N(),I&&(I.unmaskedValue=w||""),!d&&O&&n(9,O.value=w||"",O)}},View:{_enter(){n(4,w=c),N()},focus(){if(!g.readonly&&!g.disabled)return"Editing"}},Editing:{_enter(){n(17,b=c),n(4,w=c),n(7,E=!1),N(),f("enteredit"),I&&(I.unmaskedValue=w||""),!d&&O&&n(9,O.value=w||"",O)},_exit(){n(17,b=void 0),f("exitedit"),f("focusout")},clear(){n(4,w=null),N(),n(7,E=b!==w),O&&n(9,O.value=w,O)},focusout(H){this.submit()},submit(){if(E){if(d&&w&&!k)return n(4,w=b),"View";f("change",w)}return"View"},cancel(){return n(4,w=b),N(),n(7,E=!1),f("cancel"),I&&(I.unmaskedValue=w),!d&&O&&n(9,O.value=w,O),"View"},handleKeyboard(H){var Y;if(!H)return;if(n(7,E=b!==w),k&&!["Backspace","Delete","Enter","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(H.key)&&H.key.length===1){H.preventDefault();return}if(H.key=="Enter"&&this.submit(),H.key=="Escape"&&this.cancel(),H.key.length===1&&d){const G=mt.createMask({mask:d});if((w||"").length,(((Y=G.blocks[0])==null?void 0:Y.placeholder)||(G.mask.includes("0")?"0":null))==="0"&&!/\d/.test(H.key)){H.preventDefault();return}}}}})}=e;a();const V=H=>{H==null||H.focus()};le.onMount(()=>{h&&setTimeout(()=>{M.focus()},50)}),le.onDestroy(()=>{clearTimeout(_),M.reset()});function W(H,$){if(!$){const Y=G=>{n(4,w=H.value)};return H.addEventListener("input",Y),H.value=w||"",{destroy(){H.removeEventListener("input",Y)}}}return I=mt(H,{mask:$}),I.unmaskedValue=w||"",I.on("accept",()=>{n(4,w=I.unmaskedValue),N()}),I.on("complete",()=>{n(8,k=!0)}),{destroy(){I&&I.destroy()}}}function ne(H){Be[H?"unshift":"push"](()=>{O=H,n(9,O)})}return t.$$set=H=>{"value"in H&&n(0,c=H.value),"cellOptions"in H&&n(1,g=H.cellOptions),"autofocus"in H&&n(16,h=H.autofocus),"mask"in H&&n(2,d=H.mask),"cellState"in H&&a(n(3,M=H.cellState))},t.$$.update=()=>{t.$$.dirty&64&&n(12,i=u=="Editing"),t.$$.dirty&131088&&n(7,E=b!==w),t.$$.dirty&6&&n(11,l=g!=null&&g.placeholder?g.placeholder:d),t.$$.dirty&2&&n(5,r=g==null?void 0:g.error),t.$$.dirty&34&&n(10,o=r?"ph ph-warning":g==null?void 0:g.icon),t.$$.dirty&9&&M.reset(c)},[c,g,d,M,w,r,u,E,k,O,o,l,i,D,V,W,h,b,ne]}class m3 extends Ze{constructor(e){super(),Qe(this,e,g3,h3,Ye,{value:0,cellOptions:1,autofocus:16,mask:2,cellState:3})}}function sg(t,e,n){const i=t.slice();return i[71]=e[n],i[73]=n,i}function ug(t,e,n){const i=t.slice();return i[74]=e[n],i[73]=n,i}function ag(t){let e,n=(t[0].placeholder||"No Tags")+"",i;return{c(){e=v("span"),i=Ee(n)},m(l,r){A(l,e,r),S(e,i)},p(l,r){r[0]&1&&n!==(n=(l[0].placeholder||"No Tags")+"")&&Pe(i,n)},d(l){l&&C(e)}}}function fg(t){let e,n=Ce(t[3]),i=[];for(let l=0;l<n.length;l+=1)i[l]=dg(ug(t,n,l));return{c(){for(let l=0;l<i.length;l+=1)i[l].c();e=Fe()},m(l,r){for(let o=0;o<i.length;o+=1)i[o]&&i[o].m(l,r);A(l,e,r)},p(l,r){if(r[0]&343933e3){n=Ce(l[3]);let o;for(o=0;o<n.length;o+=1){const u=ug(l,n,o);i[o]?i[o].p(u,r):(i[o]=dg(u),i[o].c(),i[o].m(e.parentNode,e))}for(;o<i.length;o+=1)i[o].d(1);i.length=n.length}},d(l){l&&C(e),St(i,l)}}}function cg(t){let e,n,i;function l(){return t[39](t[74])}return{c(){e=v("i"),m(e,"class","ph ph-x"),P(e,"font-size","12px"),P(e,"z-index",2)},m(r,o){A(r,e,o),n||(i=B(e,"mousedown",Qt(Et(l))),n=!0)},p(r,o){t=r},d(r){r&&C(e),n=!1,i()}}}function dg(t){let e,n,i,l=t[74]+"",r,o,u,s=t[6]&&cg(t);return{c(){e=v("div"),n=v("span"),i=v("span"),r=Ee(l),o=Q(),s&&s.c(),u=Q(),m(n,"class","tag-wrap"),m(e,"class","tag svelte-1atghx5"),m(e,"tabindex","-1"),P(e,"--option-color",t[23][t[74]]||t[26][t[73]%t[26].length])},m(a,f){A(a,e,f),S(e,n),S(n,i),S(i,r),S(e,o),s&&s.m(e,null),S(e,u)},p(a,f){f[0]&8&&l!==(l=a[74]+"")&&Pe(r,l),a[6]?s?s.p(a,f):(s=cg(a),s.c(),s.m(e,u)):s&&(s.d(1),s=null),f[0]&8388616&&P(e,"--option-color",a[23][a[74]]||a[26][a[73]%a[26].length])},d(a){a&&C(e),s&&s.d()}}}function hg(t){let e,n,i;return{c(){e=v("i"),m(e,"class","ph ph-plus-circle actionIcon svelte-1atghx5")},m(l,r){A(l,e,r),n||(i=B(e,"mousedown",Qt(Et(t[28].toggle))),n=!0)},p:ue,d(l){l&&C(e),n=!1,i()}}}function gg(t){let e,n;return e=new wn({props:{anchor:t[8],useAnchorWidth:!0,maxHeight:250,open:t[22]=="Open",$$slots:{default:[w3]},$$scope:{ctx:t}}}),e.$on("close",t[50]),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&256&&(r.anchor=i[8]),l[0]&4194304&&(r.open=i[22]=="Open"),l[0]&10493853|l[2]&16384&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function mg(t){let e,n,i,l=t[4]&&_g(t);return{c(){e=v("div"),l&&l.c(),m(e,"class","options svelte-1atghx5")},m(r,o){A(r,e,o),l&&l.m(e,null),t[48](e),n||(i=[B(e,"wheel",y3),B(e,"mouseleave",t[49]),B(e,"scroll",function(){Ge(t[4]?t[29]:null)&&(t[4]?t[29]:null).apply(this,arguments)})],n=!0)},p(r,o){t=r,t[4]?l?l.p(t,o):(l=_g(t),l.c(),l.m(e,null)):l&&(l.d(1),l=null)},d(r){r&&C(e),l&&l.d(),t[48](null),n=!1,Ve(i)}}}function _g(t){let e;function n(r,o){var u,s,a,f;return(u=r[7])!=null&&u.loading&&!((a=(s=r[7])==null?void 0:s.rows)!=null&&a.length)?b3:(f=r[2])!=null&&f.length?p3:_3}let i=n(t),l=i(t);return{c(){l.c(),e=Fe()},m(r,o){l.m(r,o),A(r,e,o)},p(r,o){i===(i=n(r))&&l?l.p(r,o):(l.d(1),l=i(r),l&&(l.c(),l.m(e.parentNode,e)))},d(r){r&&C(e),l.d(r)}}}function _3(t){let e;return{c(){e=v("div"),e.innerHTML=`<span><i class="ri-close-line"></i>
|
|
22
|
-
No matches found, Tag will be added as new</span>`,m(e,"class","option not-found svelte-1atghx5")},m(n,i){A(n,e,i)},p:ue,d(n){n&&C(e)}}}function p3(t){var s;let e=[],n=new Map,i,l,r=Ce(t[2]);const o=a=>a[73];for(let a=0;a<r.length;a+=1){let f=sg(t,r,a),c=o(f);n.set(c,e[a]=wg(c,f))}let u=((s=t[7])==null?void 0:s.loading)&&kg();return{c(){for(let a=0;a<e.length;a+=1)e[a].c();i=Q(),u&&u.c(),l=Fe()},m(a,f){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(a,f);A(a,i,f),u&&u.m(a,f),A(a,l,f)},p(a,f){var c;f[0]&278921741&&(r=Ce(a[2]),e=Tt(e,f,o,1,a,r,n,i.parentNode,nn,wg,i,sg)),(c=a[7])!=null&&c.loading?u||(u=kg(),u.c(),u.m(l.parentNode,l)):u&&(u.d(1),u=null)},d(a){a&&(C(i),C(l));for(let f=0;f<e.length;f+=1)e[f].d(a);u&&u.d(a)}}}function b3(t){let e;return{c(){e=v("div"),e.innerHTML=`<i class="ri-loader-2-line rotating"></i>
|
|
23
|
-
Loading...`,m(e,"class","option loading svelte-1atghx5")},m(n,i){A(n,e,i)},p:ue,d(n){n&&C(e)}}}function pg(t){let e,n,i,l=t[71]+"",r,o,u,s=t[0].optionsViewMode!=="text"&&bg();function a(...c){return t[46](t[73],...c)}function f(){return t[47](t[73])}return{c(){e=v("div"),n=v("span"),s&&s.c(),i=Q(),r=Ee(l),m(e,"class","option svelte-1atghx5"),p(e,"text",t[21]=="text"),p(e,"focused",t[9]===t[73]),P(e,"--option-color",t[23][t[71]])},m(c,g){A(c,e,g),S(e,n),s&&s.m(n,null),S(n,i),S(n,r),o||(u=[B(e,"mousedown",Et(a)),B(e,"mouseenter",f)],o=!0)},p(c,g){t=c,t[0].optionsViewMode!=="text"?s||(s=bg(),s.c(),s.m(n,i)):s&&(s.d(1),s=null),g[0]&4&&l!==(l=t[71]+"")&&Pe(r,l),g[0]&2097152&&p(e,"text",t[21]=="text"),g[0]&516&&p(e,"focused",t[9]===t[73]),g[0]&8388612&&P(e,"--option-color",t[23][t[71]])},d(c){c&&C(e),s&&s.d(),o=!1,Ve(u)}}}function bg(t){let e;return{c(){e=v("i"),m(e,"class","ri-checkbox-blank-fill")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function wg(t,e){var o;let n,i=!((o=e[3])!=null&&o.includes(e[71])),l,r=i&&pg(e);return{key:t,first:null,c(){n=Fe(),r&&r.c(),l=Fe(),this.first=n},m(u,s){A(u,n,s),r&&r.m(u,s),A(u,l,s)},p(u,s){var a;e=u,s[0]&12&&(i=!((a=e[3])!=null&&a.includes(e[71]))),i?r?r.p(e,s):(r=pg(e),r.c(),r.m(l.parentNode,l)):r&&(r.d(1),r=null)},d(u){u&&(C(n),C(l)),r&&r.d(u)}}}function kg(t){let e;return{c(){e=v("div"),e.innerHTML=`<i class="ri-loader-2-line rotating"></i>
|
|
24
|
-
Loading more...`,m(e,"class","option loading svelte-1atghx5")},m(n,i){A(n,e,i)},d(n){n&&C(e)}}}function w3(t){let e,n,i,l,r,o,u,s,a,f,c=t[4]&&mg(t);return{c(){e=v("div"),n=v("i"),l=Q(),r=v("input"),u=Q(),c&&c.c(),s=Fe(),m(n,"class",i=bt(t[4]?"ph ph-magnifying-glass":"ph ph-pencil-simple")+" svelte-1atghx5"),p(n,"actionIcon",!0),m(r,"type","text"),m(r,"placeholder",o=t[4]?"Search or Add":"Enter tag..."),m(r,"class","searchInput svelte-1atghx5"),m(e,"class","searchControl svelte-1atghx5")},m(g,h){A(g,e,h),S(e,n),S(e,l),S(e,r),Zt(r,t[11]),t[43](r),A(g,u,h),c&&c.m(g,h),A(g,s,h),a||(f=[B(r,"input",t[42]),B(r,"input",t[44]),B(r,"focusout",t[45]),tn(t[30].call(null,r)),B(e,"keydown",t[28].handleInputKeyboard)],a=!0)},p(g,h){h[0]&16&&i!==(i=bt(g[4]?"ph ph-magnifying-glass":"ph ph-pencil-simple")+" svelte-1atghx5")&&m(n,"class",i),h[0]&16&&p(n,"actionIcon",!0),h[0]&16&&o!==(o=g[4]?"Search or Add":"Enter tag...")&&m(r,"placeholder",o),h[0]&2048&&r.value!==g[11]&&Zt(r,g[11]),g[4]?c?c.p(g,h):(c=mg(g),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null)},d(g){g&&(C(e),C(u),C(s)),t[43](null),c&&c.d(g),a=!1,Ve(f)}}}function k3(t){let e,n,i,l,r,o,u,s,a,f,c,g=t[14]&&!t[6]&&ag(t),h=t[3].length&&fg(t),d=t[6]&&hg(t),_=t[6]&&gg(t);return{c(){var b;e=v("div"),n=v("div"),g&&g.c(),i=Q(),l=v("div"),h&&h.c(),r=Q(),d&&d.c(),u=Q(),_&&_.c(),s=Fe(),m(l,"class","tags svelte-1atghx5"),m(l,"tabindex","-1"),P(l,"justify-content",t[0].align??"flex-start"),P(l,"flex-wrap","wrap"),m(n,"class","value svelte-1atghx5"),m(n,"tabindex","-1"),p(n,"placeholder",t[14]),m(e,"class","superCell"),m(e,"tabindex",o=(b=t[0])!=null&&b.disabled?-1:0),p(e,"isDirty",t[13]&&t[0].showDirty),p(e,"inEdit",t[6]),p(e,"disabled",t[18]),p(e,"readonly",t[19]),p(e,"error",t[17]),p(e,"multirow",!0),p(e,"inline",t[20]=="inlineInput"),p(e,"tableCell",t[20]=="tableCell"),p(e,"formInput",t[20]=="formInput"),P(e,"color",t[16]),P(e,"background",t[15]),P(e,"font-weight",t[0].fontWeight)},m(b,w){A(b,e,w),S(e,n),g&&g.m(n,null),S(n,i),S(n,l),h&&h.m(l,null),S(l,r),d&&d.m(l,null),t[40](e),A(b,u,w),_&&_.m(b,w),A(b,s,w),a=!0,f||(c=[B(e,"focusin",function(){Ge(t[1].focus)&&t[1].focus.apply(this,arguments)}),B(e,"focusout",t[41]),B(e,"keydown",t[28].handleKeyboard)],f=!0)},p(b,w){var E;t=b,t[14]&&!t[6]?g?g.p(t,w):(g=ag(t),g.c(),g.m(n,i)):g&&(g.d(1),g=null),t[3].length?h?h.p(t,w):(h=fg(t),h.c(),h.m(l,r)):h&&(h.d(1),h=null),t[6]?d?d.p(t,w):(d=hg(t),d.c(),d.m(l,null)):d&&(d.d(1),d=null),w[0]&1&&P(l,"justify-content",t[0].align??"flex-start"),(!a||w[0]&16384)&&p(n,"placeholder",t[14]),(!a||w[0]&1&&o!==(o=(E=t[0])!=null&&E.disabled?-1:0))&&m(e,"tabindex",o),(!a||w[0]&8193)&&p(e,"isDirty",t[13]&&t[0].showDirty),(!a||w[0]&64)&&p(e,"inEdit",t[6]),(!a||w[0]&262144)&&p(e,"disabled",t[18]),(!a||w[0]&524288)&&p(e,"readonly",t[19]),(!a||w[0]&131072)&&p(e,"error",t[17]),(!a||w[0]&1048576)&&p(e,"inline",t[20]=="inlineInput"),(!a||w[0]&1048576)&&p(e,"tableCell",t[20]=="tableCell"),(!a||w[0]&1048576)&&p(e,"formInput",t[20]=="formInput"),w[0]&65536&&P(e,"color",t[16]),w[0]&32768&&P(e,"background",t[15]),w[0]&1&&P(e,"font-weight",t[0].fontWeight),t[6]?_?(_.p(t,w),w[0]&64&&U(_,1)):(_=gg(t),_.c(),U(_,1),_.m(s.parentNode,s)):_&&(He(),Z(_,1,1,()=>{_=null}),ze())},i(b){a||(U(_),a=!0)},o(b){Z(_),a=!1},d(b){b&&(C(e),C(u),C(s)),g&&g.d(),h&&h.d(),d&&d.d(),t[40](null),_&&_.d(b),f=!1,Ve(c)}}}const y3=t=>t.stopPropagation();function E3(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E,k,I=ue,O=()=>(I(),I=ft(d,_e=>n(7,k=_e)),d),D,N,M,V=ue,W=()=>(V(),V=ft(Te,_e=>n(37,M=_e)),Te),ne,H;t.$$.on_destroy.push(()=>I()),t.$$.on_destroy.push(()=>V());const $=le.createEventDispatcher(),{API:Y,QueryUtils:G,fetchData:oe,memo:ie,derivedMemo:J}=le.getContext("sdk");let{cellOptions:q}=e,{value:j}=e,{fieldSchema:K}=e,{autofocus:x}=e,X,F=ie([]);Me(t,F,_e=>n(59,D=_e));let R={},z=[],me=-1,se,Oe,be=30,Ie=j?[...j]:[],ve,fe="",Ne;const te=J(F,_e=>{let st={};return _e.forEach((we,xe)=>st[we]=R[we]??ae[xe%14]),st});Me(t,te,_e=>n(23,H=_e));const ae=["hsla(358, 95%, 80%, 0.35)","hsla(22, 90%, 78%, 0.35)","hsla(45, 85%, 76%, 0.35)","hsla(110, 90%, 75%, 0.35)","hsla(175, 95%, 70%, 0.35)","hsla(205, 100%, 65%, 0.35)","hsla(245, 95%, 75%, 0.35)","hsla(310, 90%, 80%, 0.35)","hsla(15, 80%, 75%, 0.35)","hsla(60, 85%, 72%, 0.35)","hsla(135, 95%, 70%, 0.35)","hsla(190, 90%, 75%, 0.35)","hsla(260, 85%, 78%, 0.35)","hsla(330, 95%, 76%, 0.35)"];let de=JSON.stringify(Array.isArray(j)?j:j?[j]:[]);const Xe=ie((q==null?void 0:q.datasource)??{});Me(t,Xe,_e=>n(38,ne=_e));let{cellState:Te=Ft("Loading",{"*":{goTo(_e){return _e},refresh(){return Re(F,D=[],D),"Loading"},loadDataOptions(_e){if(Le){if(_e&&_e.length){const st=_e.map(we=>we[r]);Re(F,D=[...D,...st],D)}Le=!1}else Re(F,D=[],D),_e&&_e.length&&_e.forEach(st=>{D.push(st[r])});F.set(D),n(2,z=D)},loadCustomOptions(){o!=null&&o.length&&o.forEach(_e=>{D.push(_e.value||_e)}),F.set(D)},clearFilters(){n(2,z=D)},reset(_e){n(3,Ie=[..._e]),n(35,de=JSON.stringify(Ie))}},Loading:{_enter(){(!l||k!=null&&k.loaded)&&this.goTo.debounce(5,q.initialState||"View")},_exit(){q.suggestions?this.loadDataOptions(k==null?void 0:k.rows):q.optionsSource=="custom"&&this.loadCustomOptions(),n(2,z=D)},syncFetch(_e){if(_e!=null&&_e.loaded)return q.initialState||"View"}},View:{_enter(){},focus(_e){if(!q.readonly&&!q.disabled)return"Editing"}},Editing:{_enter(){n(35,de=JSON.stringify(j)),this.clearFilters(),$("enteredit")},_exit(){Se.close(),$("exitedit")},focusout(_e){N=="Open"||X!=null&&X.contains(_e.relatedTarget)||this.submit()},change(){q.debounce&&(clearTimeout(se),se=setTimeout(()=>{$("change",Ie)},q.debounce))},submit(){if(w)return $("change",Ie),"View";this.cancel()},clear(){n(3,Ie=[]),this.submit()},cancel(){return X==null||X.blur(),"View"}}})}=e;W();let Se=Ft("Closed",{"*":{close(){return"Closed"},toggleOption(_e){if(!(q.disabled||q.readonly))if(typeof _e=="string"){let st=_e,we=Ie.indexOf(st);we>-1?(Ie.splice(we,1),n(3,Ie=[...Ie])):n(3,Ie=[...Ie,st]),Te.change(),kt()}else{if(_e<0)return;let st=z[_e],we=Ie.indexOf(st);we>-1?(Ie.splice(we,1),n(3,Ie=[...Ie])):n(3,Ie=[...Ie,st]),Te.change(),kt()}}},Open:{_enter(){n(9,me=-1),setTimeout(()=>Ne==null?void 0:Ne.focus(),0),Se.filterOptions(fe)},_exit(){if(ve!=null&&ve.trim()&&z.length==0){const _e=ve.split(",").map(st=>st.trim()).filter(st=>st);n(3,Ie=[...Ie,..._e]),Te.change()}n(11,fe=""),ve=null},filterOptions(_e){if(_e?ve=_e.trim():ve=null,q.suggestions){let st=[];_e?st=[...q.filter||[],{field:r,type:"string",operator:"fuzzy",value:_e,valueType:"Value"}]:st=q.filter||[],Le=!1,d==null||d.update({query:G.buildQuery(st)}),n(2,z=D)}else _e?n(2,z=D.filter(st=>st==null?void 0:st.toLocaleLowerCase().startsWith(_e.toLocaleLowerCase()))):n(2,z=D)},toggle(){return"Closed"},handleInputKeyboard(_e){if(_e.key=="Enter"){ve!=null&&ve.trim()&&(n(3,Ie=[...Ie,...ve.split(",").map(st=>st.trim()).filter(st=>st)]),Te.change(),ve=null,n(11,fe=""),setTimeout(()=>Ne==null?void 0:Ne.focus(),0)),_e.preventDefault();return}_e.key==" "&&me>-1&&(this.toggleOption(me),_e.preventDefault()),_e.key=="Tab"&&me>-1&&z[me]&&this.toggleOption(me),_e.key=="ArrowDown"&&this.highlightNext(_e.stopPropagation()),_e.key=="ArrowUp"&&this.highlightPrevious(_e.preventDefault(),_e.stopPropagation()),_e.key=="Escape"&&this.close()},handleKeyboard(_e){_e.keyCode==32&&(me>-1?this.toggleOption(me):q.autocomplete||this.close(_e.preventDefault())),_e.key=="Escape"&&Te.cancel(),(_e.key=="Enter"||_e.key=="Tab")&&me>-1&&z[me]&&this.toggleOption(me),_e.key=="ArrowDown"&&this.highlightNext(),_e.key=="ArrowUp"&&this.highlightPrevious(_e.preventDefault()),_e.key=="Escape"&&this.close()},highlightNext(){n(9,me+=1),me>z.length-1&&n(9,me=0)},highlightPrevious(){n(9,me-=1),me<0&&n(9,me=z.length-1)}},Closed:{toggle(){return"Open"},open(){return"Open"},highlightNext(){this.open(),n(9,me=0)},handleInputKeyboard(_e){_e.key=="Escape"&&Te.cancel(),_e.key!="Tab"&&(this.open(),n(9,me=0))},handleKeyboard(_e){_e.key=="Escape"&&Te.cancel(),i=="select"&&_e.key!="Tab"&&((_e.key=="ArrowDown"||_e.keyCode==32)&&this.toggle(),(_e.key=="Backspace"||_e.key=="Delete")&&(n(3,Ie=[]),Te.change()))}}});Me(t,Se,_e=>n(22,N=_e));let Le=!1;const rt=()=>{var _e;k!=null&&k.loading||((_e=k==null?void 0:k.rows)==null?void 0:_e.length)<be||(Le=!0,n(34,be+=100),d==null||d.update({limit:be}))},kt=()=>{var we;z.filter(xe=>!(Ie!=null&&Ie.includes(xe))).length<10&&!(k!=null&&k.loading)&&((we=k==null?void 0:k.rows)==null?void 0:we.length)>=be&&rt()},ke=_e=>{const st=_e.target,we=st.scrollTop,xe=st.scrollHeight,pe=st.clientHeight;we+pe>=xe-50&&rt()},ce=_e=>{_e==null||_e.focus()},re=_e=>{if(l)return oe({API:Y,datasource:_e,options:{limit:be}})};le.onMount(()=>{x&&setTimeout(()=>{Te.focus()},30)}),le.onDestroy(()=>{clearTimeout(se)});const Ae=_e=>Se.toggleOption(_e);function Ue(_e){Be[_e?"unshift":"push"](()=>{X=_e,n(8,X)})}const Je=_e=>{setTimeout(()=>Te.focusout(_e),50)};function lt(){fe=this.value,n(11,fe)}function he(_e){Be[_e?"unshift":"push"](()=>{Ne=_e,n(12,Ne)})}const it=_e=>Se.filterOptions(_e.target.value),ot=_e=>{Se.close(),X==null||X.focus()},wt=(_e,st)=>Se.toggleOption(_e),Ct=_e=>n(9,me=_e);function ln(_e){Be[_e?"unshift":"push"](()=>{Oe=_e,n(10,Oe)})}const It=()=>n(9,me=-1),xt=_e=>{Se.close(),Te.focusout({})};return t.$$set=_e=>{"cellOptions"in _e&&n(0,q=_e.cellOptions),"value"in _e&&n(31,j=_e.value),"fieldSchema"in _e&&n(32,K=_e.fieldSchema),"autofocus"in _e&&n(33,x=_e.autofocus),"cellState"in _e&&W(n(1,Te=_e.cellState))},t.$$.update=()=>{t.$$.dirty[0]&1&&n(4,{controlType:i,suggestions:l,valueColumn:r,customOptions:o,optionsViewMode:u,role:s,readonly:a,disabled:f,error:c,color:g,background:h}=q,l,(n(21,u),n(0,q)),(n(20,s),n(0,q)),(n(19,a),n(0,q)),(n(18,f),n(0,q)),(n(17,c),n(0,q)),(n(16,g),n(0,q)),(n(15,h),n(0,q))),t.$$.dirty[0]&1&&Xe.set(q.datasource),t.$$.dirty[1]&128&&O(n(5,d=re(ne))),t.$$.dirty[0]&1&&q.suggestions&&(n(34,be=15),Le=!1),t.$$.dirty[0]&1&&n(36,_=G.buildQuery(q.filter)),t.$$.dirty[0]&32|t.$$.dirty[1]&40&&(d==null||d.update({query:_,limit:be})),t.$$.dirty[0]&130&&Te.syncFetch(k),t.$$.dirty[0]&130&&Te.loadDataOptions(k==null?void 0:k.rows),t.$$.dirty[0]&2|t.$$.dirty[1]&1&&Te.reset(j),t.$$.dirty[0]&8&&n(14,b=Ie.length<1),t.$$.dirty[1]&64&&n(6,E=M=="Editing"),t.$$.dirty[0]&72|t.$$.dirty[1]&16&&n(13,w=E&&de!==JSON.stringify(Ie)),t.$$.dirty[0]&148&&z&&l&&!(k!=null&&k.loading)&&setTimeout(()=>kt(),0)},[q,Te,z,Ie,l,d,E,k,X,me,Oe,fe,Ne,w,b,h,g,c,f,a,s,u,N,H,F,te,ae,Xe,Se,ke,ce,j,K,x,be,de,_,M,ne,Ae,Ue,Je,lt,he,it,ot,wt,Ct,ln,It,xt]}class v3 extends Ze{constructor(e){super(),Qe(this,e,E3,k3,Ye,{cellOptions:0,value:31,fieldSchema:32,autofocus:33,cellState:1},null,[-1,-1,-1])}}function yg(t,e,n){const i=t.slice();return i[67]=e[n],i[69]=n,i}function Eg(t,e,n){const i=t.slice();return i[70]=e[n],i[69]=n,i}function vg(t,e,n){const i=t.slice();return i[67]=e[n],i[69]=n,i}function S3(t){let e,n,i,l,r;const o=[I3,T3],u=[];function s(a,f){var c;return(c=a[12])!=null&&c.length?0:1}return i=s(t),l=u[i]=o[i](t),{c(){e=v("div"),n=v("div"),l.c(),m(n,"class","attachment-grid svelte-1jwja4v"),P(n,"--grid-columns",t[19]),m(e,"class","attachment-grid-wrapper svelte-1jwja4v")},m(a,f){A(a,e,f),S(e,n),u[i].m(n,null),r=!0},p(a,f){let c=i;i=s(a),i===c?u[i].p(a,f):(He(),Z(u[c],1,1,()=>{u[c]=null}),ze(),l=u[i],l?l.p(a,f):(l=u[i]=o[i](a),l.c()),U(l,1),l.m(n,null)),f[0]&524288&&P(n,"--grid-columns",a[19])},i(a){r||(U(l),r=!0)},o(a){Z(l),r=!1},d(a){a&&C(e),u[i].d()}}}function C3(t){let e;function n(r,o){var u;if((u=r[12])!=null&&u.length)return P3;if(!r[2])return R3}let i=n(t),l=i&&i(t);return{c(){e=v("div"),l&&l.c(),m(e,"class","carousel svelte-1jwja4v")},m(r,o){A(r,e,o),l&&l.m(e,null)},p(r,o){i===(i=n(r))&&l?l.p(r,o):(l&&l.d(1),l=i&&i(r),l&&(l.c(),l.m(e,null)))},i:ue,o:ue,d(r){r&&C(e),l&&l.d()}}}function A3(t){var r;let e,n,i=((r=t[12])==null?void 0:r.length)&&Ng(t),l=t[18]&&Vg(t);return{c(){e=v("div"),i&&i.c(),n=Q(),l&&l.c(),m(e,"class","attachments svelte-1jwja4v")},m(o,u){A(o,e,u),i&&i.m(e,null),S(e,n),l&&l.m(e,null)},p(o,u){var s;(s=o[12])!=null&&s.length?i?i.p(o,u):(i=Ng(o),i.c(),i.m(e,n)):i&&(i.d(1),i=null),o[18]?l?l.p(o,u):(l=Vg(o),l.c(),l.m(e,null)):l&&(l.d(1),l=null)},i:ue,o:ue,d(o){o&&C(e),i&&i.d(),l&&l.d()}}}function T3(t){let e,n=t[18]&&Sg(t);return{c(){e=v("div"),n&&n.c(),m(e,"class","grid-empty svelte-1jwja4v")},m(i,l){A(i,e,l),n&&n.m(e,null)},p(i,l){i[18]?n?n.p(i,l):(n=Sg(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},i:ue,o:ue,d(i){i&&C(e),n&&n.d()}}}function I3(t){let e=[],n=new Map,i,l,r,o=Ce(t[12]);const u=a=>a[69];for(let a=0;a<o.length;a+=1){let f=yg(t,o,a),c=u(f);n.set(c,e[a]=Tg(c,f))}let s=t[18]&&Ig(t);return{c(){for(let a=0;a<e.length;a+=1)e[a].c();i=Q(),s&&s.c(),l=Fe()},m(a,f){for(let c=0;c<e.length;c+=1)e[c]&&e[c].m(a,f);A(a,i,f),s&&s.m(a,f),A(a,l,f),r=!0},p(a,f){f[0]&544232076|f[1]&64&&(o=Ce(a[12]),He(),e=Tt(e,f,u,1,a,o,n,i.parentNode,Di,Tg,i,yg),ze()),a[18]?s?s.p(a,f):(s=Ig(a),s.c(),s.m(l.parentNode,l)):s&&(s.d(1),s=null)},i(a){if(!r){for(let f=0;f<o.length;f+=1)U(e[f]);r=!0}},o(a){for(let f=0;f<e.length;f+=1)Z(e[f]);r=!1},d(a){a&&(C(i),C(l));for(let f=0;f<e.length;f+=1)e[f].d(a);s&&s.d(a)}}}function Sg(t){let e,n,i,l,r,o,u;return{c(){e=v("button"),n=v("i"),i=Q(),l=v("span"),l.textContent="Add Images",m(n,"class","ph ph-plus"),m(e,"class","btn-upload-empty grid svelte-1jwja4v"),m(e,"aria-label","Upload attachment"),m(e,"type","button"),e.disabled=r=t[0].disabled||t[0].readonly},m(s,a){A(s,e,a),S(e,n),S(e,i),S(e,l),o||(u=B(e,"click",t[25]),o=!0)},p(s,a){a[0]&1&&r!==(r=s[0].disabled||s[0].readonly)&&(e.disabled=r)},d(s){s&&C(e),o=!1,u()}}}function D3(t){var f;let e,n,i,l=((f=t[67].extension)==null?void 0:f.toUpperCase())+"",r,o,u,s=t[67].name+"",a;return{c(){e=v("div"),n=v("div"),i=v("div"),r=Ee(l),o=Q(),u=v("span"),a=Ee(s),m(i,"class","pill svelte-1jwja4v"),m(u,"class","filename svelte-1jwja4v"),m(n,"class","grid-fallback svelte-1jwja4v"),m(e,"class","grid-item svelte-1jwja4v"),P(e,"aspect-ratio",t[20]==="landscape"?"4 / 3":t[20]==="square"?"1 / 1":"3 / 4"),p(e,"focused",t[7]===t[69]),p(e,"selected",t[9].has(t[69]))},m(c,g){A(c,e,g),S(e,n),S(n,i),S(i,r),S(n,o),S(n,u),S(u,a)},p(c,g){var h;g[0]&4096&&l!==(l=((h=c[67].extension)==null?void 0:h.toUpperCase())+"")&&Pe(r,l),g[0]&4096&&s!==(s=c[67].name+"")&&Pe(a,s),g[0]&1048576&&P(e,"aspect-ratio",c[20]==="landscape"?"4 / 3":c[20]==="square"?"1 / 1":"3 / 4"),g[0]&4224&&p(e,"focused",c[7]===c[69]),g[0]&4608&&p(e,"selected",c[9].has(c[69]))},i:ue,o:ue,d(c){c&&C(e)}}}function O3(t){let e,n,i,l,r,o,u,s=t[14]&&Cg(t),a=!t[2]&&!t[3]&&Ag(t);function f(){return t[48](t[67],t[69])}function c(...g){return t[49](t[69],...g)}return{c(){e=v("div"),n=v("div"),s&&s.c(),i=Q(),a&&a.c(),m(n,"class","grid-image svelte-1jwja4v"),P(n,"background-image","url('"+t[67].url+"')"),m(n,"role","button"),m(n,"tabindex","0"),m(n,"aria-label",l=t[67].name),m(e,"class","grid-item svelte-1jwja4v"),P(e,"aspect-ratio",t[20]==="landscape"?"4 / 3":t[20]==="square"?"1 / 1":"3 / 4"),p(e,"focused",t[7]===t[69]),p(e,"selected",t[9].has(t[69]))},m(g,h){A(g,e,h),S(e,n),s&&s.m(n,null),S(n,i),a&&a.m(n,null),r=!0,o||(u=[B(n,"click",f),B(n,"keydown",c)],o=!0)},p(g,h){t=g,t[14]?s?(s.p(t,h),h[0]&16384&&U(s,1)):(s=Cg(t),s.c(),U(s,1),s.m(n,i)):s&&(He(),Z(s,1,1,()=>{s=null}),ze()),!t[2]&&!t[3]?a?a.p(t,h):(a=Ag(t),a.c(),a.m(n,null)):a&&(a.d(1),a=null),(!r||h[0]&4096)&&P(n,"background-image","url('"+t[67].url+"')"),(!r||h[0]&4096&&l!==(l=t[67].name))&&m(n,"aria-label",l),(!r||h[0]&1048576)&&P(e,"aspect-ratio",t[20]==="landscape"?"4 / 3":t[20]==="square"?"1 / 1":"3 / 4"),(!r||h[0]&4224)&&p(e,"focused",t[7]===t[69]),(!r||h[0]&4608)&&p(e,"selected",t[9].has(t[69]))},i(g){r||(U(s),r=!0)},o(g){Z(s),r=!1},d(g){g&&C(e),s&&s.d(),a&&a.d(),o=!1,Ve(u)}}}function Cg(t){let e,n;const i=t[38].default,l=Ut(i,t,t[37],null);return{c(){e=v("div"),l&&l.c(),m(e,"class","slot-container svelte-1jwja4v")},m(r,o){A(r,e,o),l&&l.m(e,null),n=!0},p(r,o){l&&l.p&&(!n||o[1]&64)&&zt(l,i,r,r[37],n?Ht(i,r[37],o,null):jt(r[37]),null)},i(r){n||(U(l,r),n=!0)},o(r){Z(l,r),n=!1},d(r){r&&C(e),l&&l.d(r)}}}function Ag(t){let e,n,i,l,r,o,u,s,a,f;function c(){return t[46](t[67])}function g(){return t[47](t[69])}return{c(){e=v("div"),n=v("button"),i=v("i"),r=Q(),o=v("button"),u=v("i"),m(i,"class","ph ph-download-simple"),m(n,"class","btn-grid-download svelte-1jwja4v"),m(n,"tabindex","-1"),m(n,"aria-label",l="Download "+t[67].name),m(n,"type","button"),m(u,"class","ph ph-trash-simple"),m(o,"class","btn-grid-delete svelte-1jwja4v"),m(o,"tabindex","-1"),m(o,"aria-label",s="Delete "+t[67].name),m(o,"type","button"),m(e,"class","grid-overlay-top svelte-1jwja4v")},m(h,d){A(h,e,d),S(e,n),S(n,i),S(e,r),S(e,o),S(o,u),a||(f=[B(n,"click",c),B(o,"click",g)],a=!0)},p(h,d){t=h,d[0]&4096&&l!==(l="Download "+t[67].name)&&m(n,"aria-label",l),d[0]&4096&&s!==(s="Delete "+t[67].name)&&m(o,"aria-label",s)},d(h){h&&C(e),a=!1,Ve(f)}}}function Tg(t,e){let n,i,l,r,o,u;const s=[O3,D3],a=[];function f(c,g){return g[0]&4096&&(i=null),i==null&&(i=!!fs(c[67])),i?0:c[2]?-1:1}return~(l=f(e,[-1,-1,-1]))&&(r=a[l]=s[l](e)),{key:t,first:null,c(){n=Fe(),r&&r.c(),o=Fe(),this.first=n},m(c,g){A(c,n,g),~l&&a[l].m(c,g),A(c,o,g),u=!0},p(c,g){e=c;let h=l;l=f(e,g),l===h?~l&&a[l].p(e,g):(r&&(He(),Z(a[h],1,1,()=>{a[h]=null}),ze()),~l?(r=a[l],r?r.p(e,g):(r=a[l]=s[l](e),r.c()),U(r,1),r.m(o.parentNode,o)):r=null)},i(c){u||(U(r),u=!0)},o(c){Z(r),u=!1},d(c){c&&(C(n),C(o)),~l&&a[l].d(c)}}}function Ig(t){let e,n,i,l,r,o,u,s;return{c(){e=v("div"),n=v("button"),i=v("i"),l=Q(),r=v("span"),r.textContent="Add Images",m(i,"class","ph ph-plus"),m(n,"class","btn-upload-empty grid svelte-1jwja4v"),m(n,"aria-label","Upload attachment"),m(n,"type","button"),n.disabled=o=t[0].disabled||t[0].readonly,m(e,"class","grid-item grid-add-item svelte-1jwja4v"),P(e,"aspect-ratio",t[20]==="landscape"?"4 / 3":t[20]==="square"?"1 / 1":"3 / 4")},m(a,f){A(a,e,f),S(e,n),S(n,i),S(n,l),S(n,r),u||(s=B(n,"click",t[25]),u=!0)},p(a,f){f[0]&1&&o!==(o=a[0].disabled||a[0].readonly)&&(n.disabled=o),f[0]&1048576&&P(e,"aspect-ratio",a[20]==="landscape"?"4 / 3":a[20]==="square"?"1 / 1":"3 / 4")},d(a){a&&C(e),u=!1,s()}}}function R3(t){let e,n=t[18]&&Dg(t);return{c(){e=v("div"),n&&n.c(),m(e,"class","carousel-placeholder svelte-1jwja4v")},m(i,l){A(i,e,l),n&&n.m(e,null)},p(i,l){i[18]?n?n.p(i,l):(n=Dg(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(i){i&&C(e),n&&n.d()}}}function P3(t){let e,n;function i(o,u){if(u[0]&5120&&(n=null),n==null&&(n=!!fs(o[12][o[10]])),n)return N3;if(!o[2])return M3}let l=i(t,[-1,-1,-1]),r=l&&l(t);return{c(){e=v("div"),r&&r.c(),m(e,"class","carousel-content svelte-1jwja4v")},m(o,u){A(o,e,u),r&&r.m(e,null)},p(o,u){l===(l=i(o,u))&&r?r.p(o,u):(r&&r.d(1),r=l&&l(o),r&&(r.c(),r.m(e,null)))},d(o){o&&C(e),r&&r.d()}}}function Dg(t){let e,n,i,l,r,o;return{c(){e=v("button"),n=v("i"),i=Ee(`
|
|
25
|
-
Upload Attachment`),m(n,"class","ph ph-plus"),m(e,"class","btn-upload-empty svelte-1jwja4v"),m(e,"aria-label","Upload attachment"),m(e,"type","button"),e.disabled=l=t[0].disabled||t[0].readonly},m(u,s){A(u,e,s),S(e,n),S(e,i),r||(o=B(e,"click",t[25]),r=!0)},p(u,s){s[0]&1&&l!==(l=u[0].disabled||u[0].readonly)&&(e.disabled=l)},d(u){u&&C(e),r=!1,o()}}}function M3(t){var a;let e,n,i=((a=t[12][t[10]].extension)==null?void 0:a.toUpperCase())+"",l,r,o,u=t[12][t[10]].name+"",s;return{c(){e=v("div"),n=v("div"),l=Ee(i),r=Q(),o=v("span"),s=Ee(u),m(n,"class","pill svelte-1jwja4v"),m(o,"class","filename svelte-1jwja4v"),m(e,"class","carousel-fallback svelte-1jwja4v")},m(f,c){A(f,e,c),S(e,n),S(n,l),S(e,r),S(e,o),S(o,s)},p(f,c){var g;c[0]&5120&&i!==(i=((g=f[12][f[10]].extension)==null?void 0:g.toUpperCase())+"")&&Pe(l,i),c[0]&5120&&u!==(u=f[12][f[10]].name+"")&&Pe(s,u)},d(f){f&&C(e)}}}function N3(t){let e,n,i,l,r=(t[12].length>1||t[18])&&Og(t);return{c(){e=v("div"),r&&r.c(),m(e,"class","carousel-image svelte-1jwja4v"),P(e,"background-image","url('"+t[12][t[10]].url+"')"),m(e,"aria-label",n=t[12][t[10]].name),p(e,"selected",t[9].has(t[10]))},m(o,u){A(o,e,u),r&&r.m(e,null),i||(l=B(e,"click",t[45]),i=!0)},p(o,u){o[12].length>1||o[18]?r?r.p(o,u):(r=Og(o),r.c(),r.m(e,null)):r&&(r.d(1),r=null),u[0]&5120&&P(e,"background-image","url('"+o[12][o[10]].url+"')"),u[0]&5120&&n!==(n=o[12][o[10]].name)&&m(e,"aria-label",n),u[0]&1536&&p(e,"selected",o[9].has(o[10]))},d(o){o&&C(e),r&&r.d(),i=!1,l()}}}function Og(t){let e,n,i=t[12].length>1&&Rg(t),l=t[18]&&Mg(t);return{c(){e=v("div"),i&&i.c(),n=Q(),l&&l.c(),m(e,"class","carousel-controls svelte-1jwja4v")},m(r,o){A(r,e,o),i&&i.m(e,null),S(e,n),l&&l.m(e,null)},p(r,o){r[12].length>1?i?i.p(r,o):(i=Rg(r),i.c(),i.m(e,n)):i&&(i.d(1),i=null),r[18]?l?l.p(r,o):(l=Mg(r),l.c(),l.m(e,null)):l&&(l.d(1),l=null)},d(r){r&&C(e),i&&i.d(),l&&l.d()}}}function Rg(t){let e,n,i,l,r,o,u,s,a,f,c,g,h,d,_,b=Ce(t[12]),w=[];for(let E=0;E<b.length;E+=1)w[E]=Pg(Eg(t,b,E));return{c(){e=v("button"),n=v("i"),l=Q(),r=v("div");for(let E=0;E<w.length;E+=1)w[E].c();o=Q(),u=v("button"),s=v("i"),f=Q(),c=v("button"),g=v("i"),m(n,"class","ph ph-caret-left"),m(e,"class","btn-nav svelte-1jwja4v"),m(e,"aria-label","Previous attachment"),m(e,"type","button"),e.disabled=i=t[0].disabled,m(r,"class","indicators svelte-1jwja4v"),m(s,"class","ph ph-caret-right"),m(u,"class","btn-nav svelte-1jwja4v"),m(u,"aria-label","Next attachment"),m(u,"type","button"),u.disabled=a=t[0].disabled,m(g,"class","ph ph-arrows-out-simple"),m(c,"class","btn-nav svelte-1jwja4v"),P(c,"align-self","flex-end"),m(c,"aria-label","Full Screen"),m(c,"type","button"),c.disabled=h=t[0].disabled},m(E,k){A(E,e,k),S(e,n),A(E,l,k),A(E,r,k);for(let I=0;I<w.length;I+=1)w[I]&&w[I].m(r,null);A(E,o,k),A(E,u,k),S(u,s),A(E,f,k),A(E,c,k),S(c,g),d||(_=[B(e,"click",Qt(t[28].prev)),B(u,"click",Qt(t[28].next)),B(c,"click",Qt(t[44]))],d=!0)},p(E,k){if(k[0]&1&&i!==(i=E[0].disabled)&&(e.disabled=i),k[0]&268440577){b=Ce(E[12]);let I;for(I=0;I<b.length;I+=1){const O=Eg(E,b,I);w[I]?w[I].p(O,k):(w[I]=Pg(O),w[I].c(),w[I].m(r,null))}for(;I<w.length;I+=1)w[I].d(1);w.length=b.length}k[0]&1&&a!==(a=E[0].disabled)&&(u.disabled=a),k[0]&1&&h!==(h=E[0].disabled)&&(c.disabled=h)},d(E){E&&(C(e),C(l),C(r),C(o),C(u),C(f),C(c)),St(w,E),d=!1,Ve(_)}}}function Pg(t){let e,n,i,l;function r(){return t[43](t[69])}return{c(){e=v("button"),m(e,"class","indicator svelte-1jwja4v"),m(e,"aria-label","Go to attachment "+(t[69]+1)),m(e,"type","button"),e.disabled=n=t[0].disabled,p(e,"active",t[69]===t[10])},m(o,u){A(o,e,u),i||(l=B(e,"click",Qt(r)),i=!0)},p(o,u){t=o,u[0]&1&&n!==(n=t[0].disabled)&&(e.disabled=n),u[0]&1024&&p(e,"active",t[69]===t[10])},d(o){o&&C(e),i=!1,l()}}}function Mg(t){let e,n,i;return{c(){e=v("button"),e.innerHTML='<i class="ph ph-upload"></i>',m(e,"class","btn-nav add svelte-1jwja4v"),P(e,"align-self","flex-end"),m(e,"aria-label","Next attachment"),m(e,"type","button")},m(l,r){A(l,e,r),n||(i=B(e,"click",Qt(t[25])),n=!0)},p:ue,d(l){l&&C(e),n=!1,i()}}}function Ng(t){let e=[],n=new Map,i,l=Ce(t[12]);const r=o=>o[69];for(let o=0;o<l.length;o+=1){let u=vg(t,l,o),s=r(u);n.set(s,e[o]=Fg(s,u))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=Fe()},m(o,u){for(let s=0;s<e.length;s+=1)e[s]&&e[s].m(o,u);A(o,i,u)},p(o,u){u[0]&6296200&&(l=Ce(o[12]),e=Tt(e,u,r,1,o,l,n,i.parentNode,nn,Fg,i,vg))},d(o){o&&C(i);for(let u=0;u<e.length;u+=1)e[u].d(o)}}}function Lg(t){let e,n,i;function l(){return t[40](t[69])}return{c(){e=v("button"),e.innerHTML='<i class="ph ph-trash-simple"></i>',m(e,"class","btn-delete svelte-1jwja4v"),m(e,"tabindex","-1"),m(e,"aria-label","Delete"),m(e,"title","Delete"),m(e,"type","button")},m(r,o){A(r,e,o),n||(i=B(e,"click",l),n=!0)},p(r,o){t=r},d(r){r&&C(e),n=!1,i()}}}function Fg(t,e){let n,i,l,r,o,u,s,a=e[67].name+"",f,c,g,h,d,_;function b(){return e[39](e[69])}let w=!e[3]&&Lg(e);function E(){return e[41](e[69])}function k(){return e[42](e[69])}return{key:t,first:null,c(){n=v("div"),i=v("button"),l=v("i"),u=Q(),s=v("a"),f=Ee(a),g=Q(),w&&w.c(),h=Q(),m(l,"class","ph ph-download-simple"),m(i,"class","btn-download svelte-1jwja4v"),m(i,"tabindex","-1"),m(i,"aria-label",r="Download "+e[67].name),m(i,"title",o="Download "+e[67].name),m(i,"type","button"),m(s,"href",c=e[67].url),m(s,"class","filename svelte-1jwja4v"),m(n,"class","attachment svelte-1jwja4v"),p(n,"focused",e[7]===e[69]),p(n,"selected",e[9].has(e[69])),this.first=n},m(I,O){A(I,n,O),S(n,i),S(i,l),S(n,u),S(n,s),S(s,f),S(n,g),w&&w.m(n,null),S(n,h),d||(_=[B(i,"click",b),B(n,"mouseenter",E),B(n,"click",k)],d=!0)},p(I,O){e=I,O[0]&4096&&r!==(r="Download "+e[67].name)&&m(i,"aria-label",r),O[0]&4096&&o!==(o="Download "+e[67].name)&&m(i,"title",o),O[0]&4096&&a!==(a=e[67].name+"")&&Pe(f,a),O[0]&4096&&c!==(c=e[67].url)&&m(s,"href",c),e[3]?w&&(w.d(1),w=null):w?w.p(e,O):(w=Lg(e),w.c(),w.m(n,h)),O[0]&4224&&p(n,"focused",e[7]===e[69]),O[0]&4608&&p(n,"selected",e[9].has(e[69]))},d(I){I&&C(n),w&&w.d(),d=!1,Ve(_)}}}function Vg(t){let e,n,i,l,r,o;return{c(){var u;e=v("button"),n=v("i"),i=Ee(" Add Attachment"),m(n,"class","ph ph-plus"),m(e,"class","btn-upload-empty list svelte-1jwja4v"),m(e,"aria-label","Upload attachment"),m(e,"type","button"),e.disabled=l=t[0].disabled||t[0].readonly,P(e,"margin-top",(u=t[12])!=null&&u.length?"0.5rem":"0")},m(u,s){A(u,e,s),S(e,n),S(e,i),r||(o=B(e,"click",t[25]),r=!0)},p(u,s){var a;s[0]&1&&l!==(l=u[0].disabled||u[0].readonly)&&(e.disabled=l),s[0]&4096&&P(e,"margin-top",(a=u[12])!=null&&a.length?"0.5rem":"0")},d(u){u&&C(e),r=!1,o()}}}function Bg(t){let e,n,i,l,r=t[9].size==1?t[9].size+" Item ":t[9].size+" Items ",o,u,s,a,f,c;return{c(){e=v("div"),n=v("button"),n.innerHTML='<i class="ph ph-x"></i>',i=Q(),l=v("span"),o=Ee(r),u=Ee(" Selected"),s=Q(),a=v("button"),a.innerHTML='<i class="ph ph-trash-simple"></i>',m(n,"class","btn-bulk-action btn-close svelte-1jwja4v"),m(n,"type","button"),m(n,"title","Clear Selection"),m(l,"class","selection-count svelte-1jwja4v"),m(a,"class","btn-bulk-action btn-bulk-delete svelte-1jwja4v"),m(a,"type","button"),m(a,"title","Delete Selected"),m(e,"class","bulk-actions-overlay svelte-1jwja4v")},m(g,h){A(g,e,h),S(e,n),S(e,i),S(e,l),S(l,o),S(l,u),S(e,s),S(e,a),f||(c=[B(n,"click",t[23]),B(a,"click",t[24])],f=!0)},p(g,h){h[0]&512&&r!==(r=g[9].size==1?g[9].size+" Item ":g[9].size+" Items ")&&Pe(o,r)},d(g){g&&C(e),f=!1,Ve(c)}}}function L3(t){let e,n,i,l,r,o,u,s,a,f,c,g,h,d,_;const b=[A3,C3,S3],w=[];function E(V,W){return V[13]=="list"?0:V[13]=="carousel"?1:V[13]=="grid"?2:-1}~(n=E(t))&&(i=w[n]=b[n](t));let k=t[9].size>0&&t[13]==="grid"&&!t[3]&&!t[2]&&Bg(t);function I(V){t[51](V)}function O(V){t[52](V)}function D(V){t[53](V)}function N(V){t[54](V)}let M={canSelect:t[16],canDelete:t[15]};return t[12]!==void 0&&(M.items=t[12]),t[11]!==void 0&&(M.open=t[11]),t[10]!==void 0&&(M.currentIndex=t[10]),t[9]!==void 0&&(M.selectedIndices=t[9]),s=new ls({props:M}),Be.push(()=>Gt(s,"items",I)),Be.push(()=>Gt(s,"open",O)),Be.push(()=>Gt(s,"currentIndex",D)),Be.push(()=>Gt(s,"selectedIndices",N)),s.$on("close",t[55]),{c(){e=v("div"),i&&i.c(),l=Q(),k&&k.c(),r=Q(),o=v("input"),u=Q(),We(s.$$.fragment),m(o,"type","file"),o.multiple=t[4],P(o,"display","none"),m(e,"class","superCell"),m(e,"tabindex","0"),p(e,"multirow",!0),p(e,"inEdit",t[5]=="Editing"),p(e,"inline",t[0].role=="tableCell"),p(e,"tableCell",t[0].role=="tableCell"),p(e,"formInput",t[0].role=="formInput"),p(e,"disabled",t[0].disabled),p(e,"readonly",t[0].readonly),P(e,"color",t[0].color),P(e,"background",t[0].background)},m(V,W){A(V,e,W),~n&&w[n].m(e,null),S(e,l),k&&k.m(e,null),S(e,r),S(e,o),t[50](o),S(e,u),je(s,e,null),t[56](e),h=!0,d||(_=[B(o,"change",t[26]),B(e,"keydown",t[57]),B(e,"focusin",function(){Ge(t[1].focus)&&t[1].focus.apply(this,arguments)}),B(e,"focusout",function(){Ge(t[1].focousout)&&t[1].focousout.apply(this,arguments)})],d=!0)},p(V,W){t=V;let ne=n;n=E(t),n===ne?~n&&w[n].p(t,W):(i&&(He(),Z(w[ne],1,1,()=>{w[ne]=null}),ze()),~n?(i=w[n],i?i.p(t,W):(i=w[n]=b[n](t),i.c()),U(i,1),i.m(e,l)):i=null),t[9].size>0&&t[13]==="grid"&&!t[3]&&!t[2]?k?k.p(t,W):(k=Bg(t),k.c(),k.m(e,r)):k&&(k.d(1),k=null),(!h||W[0]&16)&&(o.multiple=t[4]);const H={};W[0]&65536&&(H.canSelect=t[16]),W[0]&32768&&(H.canDelete=t[15]),!a&&W[0]&4096&&(a=!0,H.items=t[12],Wt(()=>a=!1)),!f&&W[0]&2048&&(f=!0,H.open=t[11],Wt(()=>f=!1)),!c&&W[0]&1024&&(c=!0,H.currentIndex=t[10],Wt(()=>c=!1)),!g&&W[0]&512&&(g=!0,H.selectedIndices=t[9],Wt(()=>g=!1)),s.$set(H),(!h||W[0]&32)&&p(e,"inEdit",t[5]=="Editing"),(!h||W[0]&1)&&p(e,"inline",t[0].role=="tableCell"),(!h||W[0]&1)&&p(e,"tableCell",t[0].role=="tableCell"),(!h||W[0]&1)&&p(e,"formInput",t[0].role=="formInput"),(!h||W[0]&1)&&p(e,"disabled",t[0].disabled),(!h||W[0]&1)&&p(e,"readonly",t[0].readonly),W[0]&1&&P(e,"color",t[0].color),W[0]&1&&P(e,"background",t[0].background)},i(V){h||(U(i),U(s.$$.fragment,V),h=!0)},o(V){Z(i),Z(s.$$.fragment,V),h=!1},d(V){V&&C(e),~n&&w[n].d(),k&&k.d(),t[50](null),qe(s),t[56](null),d=!1,Ve(_)}}}function fs(t){var n;return["jpg","jpeg","png","gif","bmp","webp"].includes((n=t.extension)==null?void 0:n.toLowerCase())}function F3(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E=ue,k=()=>(E(),E=ft(K,he=>n(5,w=he)),K);t.$$.on_destroy.push(()=>E());let{$$slots:I={},$$scope:O}=e,{value:D}=e,{cellOptions:N}=e,{fieldSchema:M}=e,{tableid:V}=e,{API:W}=e,{height:ne="auto"}=e,{inBuilder:H}=e;const $=le.createEventDispatcher();let Y=D,G,oe,ie,J=new Set,q=0,j=!1,{cellState:K=Ft(N.initialState??"View",{"*":{goTo(he){return he}},View:{_enter(){},focus(){if(!N.readonly)return"Editing"}},Editing:{_enter(){Y=D,G==null||G.focus(),$("enteredit")},_exit(){$("exitedit")},focousout(he){if(!(G!=null&&G.contains(he.relatedTarget)))return"View"},change(he){N.debounce&&$("change",D)},submit(he){return D!==Y&&$("change",D),$("focusout"),"View"},cancel(){return n(30,D=Y),"View"}}})}=e;k();const x=async he=>{let it=new FormData;for(let ot=0;ot<he.length;ot++)it.append("file",he[ot]);try{let ot=await W.uploadAttachment(V,it);return $("change",[...l,...ot]),ot}catch(ot){return console.error("Upload failed:",ot),[]}};function X(he){l.splice(he,1),n(12,l=[...l]),$("change",l)}function F(he){const it=new Set(J);it.has(he)?it.delete(he):it.add(he),n(9,J=it)}function R(){n(9,J=new Set)}function z(){if(J.size===0)return;Array.from(J).sort((it,ot)=>ot-it).forEach(it=>{l.splice(it,1)}),n(12,l),n(30,D),n(4,i),n(31,M),R(),$("change",l)}function me(){ie&&ie.click()}function se(he){const it=he.target,ot=Array.from(it.files||[]);x(ot)}function Oe(he){!f&&!H&&(l!=null&&l[he])&&fs(l[he])&&n(11,j=!0)}const be={next(){(l==null?void 0:l.length)>1&&(n(10,q=(q+1)%l.length),$("view",{attachment:l[q],index:q}))},prev(){(l==null?void 0:l.length)>1&&(n(10,q=(q-1+l.length)%l.length),$("view",{attachment:l[q],index:q}))},goTo(he){he>=0&&he<(l==null?void 0:l.length)&&(n(10,q=he),$("view",{attachment:l[q],index:q}))},handleKeydown(he){r==="carousel"&&(l==null?void 0:l.length)>1&&(he.key==="ArrowLeft"?(he.preventDefault(),this.prev()):he.key==="ArrowRight"&&(he.preventDefault(),this.next()))}};function Ie(he){var it;if(!(!g||g==="none")){if(g==="view")Oe(he);else if(g==="select")F(he);else if(g==="custom"){let ot=l[he];(it=N.onItemClick)==null||it.call(N,{item:ot,index:he})}}}const ve=he=>X(he),fe=he=>X(he),Ne=he=>n(7,oe=he),te=he=>F(he),ae=he=>be.goTo(he),de=()=>Oe(q),Xe=()=>{h&&Ie(l[q])},Te=he=>{const it=document.createElement("a");it.href=he.url,it.download=he.name,document.body.appendChild(it),it.click(),document.body.removeChild(it)},Se=he=>X(he),Le=(he,it)=>Ie(he),rt=(he,it)=>it.key==="Enter"&&F(he);function kt(he){Be[he?"unshift":"push"](()=>{ie=he,n(8,ie)})}function ke(he){l=he,n(12,l),n(30,D),n(4,i),n(31,M)}function ce(he){j=he,n(11,j)}function re(he){q=he,n(10,q)}function Ae(he){J=he,n(9,J)}const Ue=()=>console.log("closed");function Je(he){Be[he?"unshift":"push"](()=>{G=he,n(6,G)})}const lt=he=>{be.handleKeydown(he)};return t.$$set=he=>{"value"in he&&n(30,D=he.value),"cellOptions"in he&&n(0,N=he.cellOptions),"fieldSchema"in he&&n(31,M=he.fieldSchema),"tableid"in he&&n(32,V=he.tableid),"API"in he&&n(33,W=he.API),"height"in he&&n(34,ne=he.height),"inBuilder"in he&&n(35,H=he.inBuilder),"cellState"in he&&k(n(1,K=he.cellState)),"$$scope"in he&&n(37,O=he.$$scope)},t.$$.update=()=>{var he;t.$$.dirty[1]&1&&n(4,i=((he=M==null?void 0:M.type)==null?void 0:he.includes("single"))!==!0),t.$$.dirty[0]&1073741840&&n(12,l=D&&i?D:D?[D]:[]),t.$$.dirty[0]&1&&n(13,r=N.controlType||"list"),t.$$.dirty[0]&1&&n(20,o=N.imageRatio||"landscape"),t.$$.dirty[0]&1&&n(19,u=N.gridColumns||4),t.$$.dirty[0]&1&&n(18,s=!N.readonly&&!N.disabled),t.$$.dirty[0]&1&&n(2,a=N.isGallery),t.$$.dirty[0]&1&&n(36,f=N.disabled),t.$$.dirty[0]&1&&n(3,c=N.readonly),t.$$.dirty[0]&1&&(g=N.onClickAction),t.$$.dirty[0]&32&&n(17,h=w=="Editing"),t.$$.dirty[0]&12|t.$$.dirty[1]&32&&n(16,d=!c&&!f&&!a),t.$$.dirty[0]&12|t.$$.dirty[1]&32&&n(15,_=!c&&!f&&!a),t.$$.dirty[0]&1&&n(14,b=N.slotted)},[N,K,a,c,i,w,G,oe,ie,J,q,j,l,r,b,_,d,h,s,u,o,X,F,R,z,me,se,Oe,be,Ie,D,M,V,W,ne,H,f,O,I,ve,fe,Ne,te,ae,de,Xe,Te,Se,Le,rt,kt,ke,ce,re,Ae,Ue,Je,lt]}class V3 extends Ze{constructor(e){super(),Qe(this,e,F3,L3,Ye,{value:30,cellOptions:0,fieldSchema:31,tableid:32,API:33,height:34,inBuilder:35,cellState:1},null,[-1,-1,-1])}}function B3(t){let e,n,i;return{c(){e=v("button"),m(e,"class","sc-carousel-button sc-carousel-dot__dot svelte-yu7247"),p(e,"sc-carousel-dot__dot_active",t[0])},m(l,r){A(l,e,r),n||(i=B(e,"click",t[1]),n=!0)},p(l,[r]){r&1&&p(e,"sc-carousel-dot__dot_active",l[0])},i:ue,o:ue,d(l){l&&C(e),n=!1,i()}}}function U3(t,e,n){let{active:i=!1}=e;function l(r){ti.call(this,t,r)}return t.$$set=r=>{"active"in r&&n(0,i=r.active)},[i,l]}class H3 extends Ze{constructor(e){super(),Qe(this,e,U3,B3,Ye,{active:0})}}function Ug(t,e,n){const i=t.slice();return i[5]=e[n],i[7]=n,i}function Hg(t,e){let n,i,l,r;function o(){return e[3](e[7])}return i=new H3({props:{active:e[1]===e[7]}}),i.$on("click",o),{key:t,first:null,c(){n=v("div"),We(i.$$.fragment),l=Q(),m(n,"class","sc-carousel-dots__dot-container svelte-1oj5bge"),this.first=n},m(u,s){A(u,n,s),je(i,n,null),S(n,l),r=!0},p(u,s){e=u;const a={};s&3&&(a.active=e[1]===e[7]),i.$set(a)},i(u){r||(U(i.$$.fragment,u),r=!0)},o(u){Z(i.$$.fragment,u),r=!1},d(u){u&&C(n),qe(i)}}}function z3(t){let e,n=[],i=new Map,l,r=Ce(Array(t[0]));const o=u=>u[7];for(let u=0;u<r.length;u+=1){let s=Ug(t,r,u),a=o(s);i.set(a,n[u]=Hg(a,s))}return{c(){e=v("div");for(let u=0;u<n.length;u+=1)n[u].c();m(e,"class","sc-carousel-dots__container svelte-1oj5bge")},m(u,s){A(u,e,s);for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(e,null);l=!0},p(u,[s]){s&7&&(r=Ce(Array(u[0])),He(),n=Tt(n,s,o,1,u,r,i,e,Di,Hg,null,Ug),ze())},i(u){if(!l){for(let s=0;s<r.length;s+=1)U(n[s]);l=!0}},o(u){for(let s=0;s<n.length;s+=1)Z(n[s]);l=!1},d(u){u&&C(e);for(let s=0;s<n.length;s+=1)n[s].d()}}}function j3(t,e,n){const i=le.createEventDispatcher();let{pagesCount:l=1}=e,{currentPageIndex:r=0}=e;function o(s){i("pageChange",s)}const u=s=>o(s);return t.$$set=s=>{"pagesCount"in s&&n(0,l=s.pagesCount),"currentPageIndex"in s&&n(1,r=s.currentPageIndex)},[l,r,o,u]}class q3 extends Ze{constructor(e){super(),Qe(this,e,j3,z3,Ye,{pagesCount:0,currentPageIndex:1})}}const zl="prev",Li="next";function W3(t){let e,n,i,l;return{c(){e=v("button"),n=v("i"),m(n,"class","sc-carousel-arrow__arrow svelte-9ztt4p"),p(n,"sc-carousel-arrow__arrow-next",t[0]===Li),p(n,"sc-carousel-arrow__arrow-prev",t[0]===zl),m(e,"class","sc-carousel-button sc-carousel-arrow__circle svelte-9ztt4p"),p(e,"sc-carousel-arrow__circle_disabled",t[1])},m(r,o){A(r,e,o),S(e,n),i||(l=B(e,"click",t[2]),i=!0)},p(r,[o]){o&1&&p(n,"sc-carousel-arrow__arrow-next",r[0]===Li),o&1&&p(n,"sc-carousel-arrow__arrow-prev",r[0]===zl),o&2&&p(e,"sc-carousel-arrow__circle_disabled",r[1])},i:ue,o:ue,d(r){r&&C(e),i=!1,l()}}}function G3(t,e,n){let{direction:i=Li}=e,{disabled:l=!1}=e;function r(o){ti.call(this,t,o)}return t.$$set=o=>{"direction"in o&&n(0,i=o.direction),"disabled"in o&&n(1,l=o.disabled)},[i,l,r]}class zg extends Ze{constructor(e){super(),Qe(this,e,G3,W3,Ye,{direction:0,disabled:1})}}function Y3(t){let e;return{c(){e=v("div"),m(e,"class","sc-carousel-progress__indicator svelte-nuyenl"),P(e,"width",t[0]+"%")},m(n,i){A(n,e,i)},p(n,[i]){i&1&&P(e,"width",n[0]+"%")},i:ue,o:ue,d(n){n&&C(e)}}}const jg=100;function K3(t,e,n){let i,{value:l=0}=e;return t.$$set=r=>{"value"in r&&n(1,l=r.value)},t.$$.update=()=>{t.$$.dirty&2&&n(0,i=Math.min(Math.max(l*jg,0),jg))},[i,l]}class X3 extends Ze{constructor(e){super(),Qe(this,e,K3,Y3,Ye,{value:1})}}function Q3(t,e){t.addEventListener("mousedown",e),t.addEventListener("touchstart",e,{passive:!0})}function Z3(t,e){t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",e)}function J3(t,e){t.addEventListener("mouseup",e),t.addEventListener("touchend",e)}function qg(t,e){t.removeEventListener("mouseup",e),t.removeEventListener("touchend",e)}function x3(t,e){t.addEventListener("mousemove",e),t.addEventListener("touchmove",e)}function Wg(t,e){t.removeEventListener("mousemove",e),t.removeEventListener("touchmove",e)}function cs(t){return function(e,n){t.dispatchEvent(new CustomEvent(e,{detail:n}))}}const $3=110,eE=9,tE=111,nE=20;function ds(t){if("TouchEvent"in window&&t instanceof TouchEvent){const e=t.touches[0];return{x:e?e.clientX:0,y:e?e.clientY:0}}return{x:t.clientX,y:t.clientY}}function iE(t,{thresholdProvider:e}){const n=cs(t);let i,l,r=0,o,u=!1;function s(){return Date.now()-o>=tE&&Math.abs(r)>=nE}function a(g){o=Date.now(),r=0,u=!0;const h=ds(g);i=h.x,l=h.y,n("swipeStart",{x:i,y:l}),x3(window,f),J3(window,c)}function f(g){if(!u)return;const h=ds(g),d=h.x-i,_=h.y-l;i=h.x,l=h.y,n("swipeMove",{x:i,y:l,dx:d,dy:_}),d!==0&&Math.sign(d)!==Math.sign(r)&&(r=0),r+=d,Math.abs(r)>e()&&(n("swipeThresholdReached",{direction:r>0?zl:Li}),qg(window,c),Wg(window,f))}function c(g){if(qg(window,c),Wg(window,f),u=!1,!s()){n("swipeFailed");return}const h=ds(g);n("swipeEnd",{x:h.x,y:h.y})}return Q3(t,a),{destroy(){Z3(t,a)}}}function lE(t,e){t.addEventListener("mouseenter",e)}function rE(t,e){t.removeEventListener("mouseenter",e)}function oE(t,e){t.addEventListener("mouseleave",e)}function Gg(t,e){t.removeEventListener("mouseleave",e)}function sE(t){const e=cs(t);function n(){oE(t,i),e("hovered",{value:!0})}function i(){e("hovered",{value:!1}),Gg(t,i)}return lE(t,n),{destroy(){rE(t,n),Gg(t,i)}}}const uE=(t,e)=>{const n=e.x-t.x,i=e.y-t.y;return Math.sqrt(n*n+i*i)};function jl(t,e,n){return Math.max(t,Math.min(e,n))}function aE(t,e){t.addEventListener("touchstart",e,{passive:!0})}function fE(t,e){t.removeEventListener("touchstart",e)}function cE(t,e){t.addEventListener("touchend",e)}function Yg(t,e){t.removeEventListener("touchend",e)}function dE(t){const e=cs(t);let n=0,i={x:0,y:0};function l({tapEndedAt:u,tapEndedPos:s}){const a=u-n,f=uE(i,s);return a<=$3&&f<=eE}function r(u){n=Date.now();const s=u.touches[0];i={x:s.clientX,y:s.clientY},cE(t,o)}function o(u){Yg(t,o);const s=u.changedTouches[0];l({tapEndedAt:Date.now(),tapEndedPos:{x:s.clientX,y:s.clientY}})&&e("tapped")}return aE(t,r),{destroy(){fE(t,r),Yg(t,o)}}}function hE({currentParticleIndex:t,particlesCount:e,clonesCountHead:n,clonesCountTotal:i,particlesToScroll:l}){return t===e-n?0:t===0?Kg({particlesCountWithoutClones:e-i,particlesToScroll:l})-1:Math.floor((t-n)/l)}function gE({currentParticleIndex:t,particlesToScroll:e}){return Math.ceil(t/e)}function mE({currentParticleIndex:t,particlesCount:e,clonesCountHead:n,clonesCountTotal:i,infinite:l,particlesToScroll:r}){return l?hE({currentParticleIndex:t,particlesCount:e,clonesCountHead:n,clonesCountTotal:i,particlesToScroll:r}):gE({currentParticleIndex:t,particlesToScroll:r})}function Kg({particlesCountWithoutClones:t,particlesToScroll:e}){return Math.ceil(t/e)}function _E({particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:n}){const i=Xg({particlesCountWithoutClones:t,particlesToScroll:e,particlesToShow:n});return Math.ceil(t/e)-i}function pE({infinite:t,particlesCountWithoutClones:e,particlesToScroll:n,particlesToShow:i}){return t?Kg({particlesCountWithoutClones:e,particlesToScroll:n}):_E({particlesCountWithoutClones:e,particlesToScroll:n,particlesToShow:i})}function bE({pageIndex:t,clonesCountHead:e,clonesCountTail:n,particlesToScroll:i,particlesCount:l}){return jl(0,Math.min(e+t*i,l-n),l-1)}function wE({pageIndex:t,particlesToScroll:e,particlesCount:n,particlesToShow:i}){return jl(0,Math.min(t*e,n-i),n-1)}function hs({infinite:t,pageIndex:e,clonesCountHead:n,clonesCountTail:i,particlesToScroll:l,particlesCount:r,particlesToShow:o}){return t?bE({pageIndex:e,clonesCountHead:n,clonesCountTail:i,particlesToScroll:l,particlesCount:r}):wE({pageIndex:e,particlesToScroll:l,particlesCount:r,particlesToShow:o})}function kE({particlesContainerChildren:t,particleWidth:e}){for(let n=0;n<t.length;n++)t[n].style.minWidth=`${e}px`,t[n].style.maxWidth=`${e}px`}function Xg({particlesToScroll:t,particlesToShow:e,particlesCountWithoutClones:n}){const i=t-e;let l=e;for(;;){const r=n-l-i;if(r<e)return Math.max(r,0);l+=e+i}}function yE(t){return new ResizeObserver(e=>{t({width:e[0].contentRect.width})})}function EE({clonesCountHead:t,clonesCountTail:e,particlesContainerChildren:n}){const i=[];for(let o=0;o<e;o++)i.push(n[o].cloneNode(!0));const l=[],r=n.length;for(let o=r-1;o>r-1-t;o--)l.push(n[o].cloneNode(!0));return{clonesToAppend:i,clonesToPrepend:l}}function vE({particlesContainer:t,clonesToAppend:e,clonesToPrepend:n}){for(let i=0;i<e.length;i++)t.append(e[i]);for(let i=0;i<n.length;i++)t.prepend(n[i])}function SE({infinite:t,particlesToShow:e,partialPageSize:n}){const i=t?{head:Math.ceil(n||e),tail:Math.ceil(e)}:{head:0,tail:0};return{...i,total:i.head+i.tail}}const ur=(t,e,n)=>t&&t.hasOwnProperty(e)?t[e]:n,gs=t=>e=>{t[e]&&t[e]()};var CE="Expected a function",Qg="__lodash_hash_undefined__",AE="[object Function]",TE="[object GeneratorFunction]",IE="[object Symbol]",DE=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,OE=/^\w*$/,RE=/^\./,PE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ME=/[\\^$.*+?()[\]{}|]/g,NE=/\\(\\)?/g,LE=/^\[object .+?Constructor\]$/,FE=typeof jn=="object"&&jn&&jn.Object===Object&&jn,VE=typeof self=="object"&&self&&self.Object===Object&&self,ms=FE||VE||Function("return this")();function BE(t,e){return t==null?void 0:t[e]}function UE(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch{}return e}var HE=Array.prototype,zE=Function.prototype,Zg=Object.prototype,_s=ms["__core-js_shared__"],Jg=function(){var t=/[^.]+$/.exec(_s&&_s.keys&&_s.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),xg=zE.toString,ps=Zg.hasOwnProperty,$g=Zg.toString,jE=RegExp("^"+xg.call(ps).replace(ME,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),em=ms.Symbol,qE=HE.splice,WE=im(ms,"Map"),ar=im(Object,"create"),tm=em?em.prototype:void 0,nm=tm?tm.toString:void 0;function ul(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function GE(){this.__data__=ar?ar(null):{}}function YE(t){return this.has(t)&&delete this.__data__[t]}function KE(t){var e=this.__data__;if(ar){var n=e[t];return n===Qg?void 0:n}return ps.call(e,t)?e[t]:void 0}function XE(t){var e=this.__data__;return ar?e[t]!==void 0:ps.call(e,t)}function QE(t,e){var n=this.__data__;return n[t]=ar&&e===void 0?Qg:e,this}ul.prototype.clear=GE,ul.prototype.delete=YE,ul.prototype.get=KE,ul.prototype.has=XE,ul.prototype.set=QE;function ql(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function ZE(){this.__data__=[]}function JE(t){var e=this.__data__,n=to(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():qE.call(e,n,1),!0}function xE(t){var e=this.__data__,n=to(e,t);return n<0?void 0:e[n][1]}function $E(t){return to(this.__data__,t)>-1}function ev(t,e){var n=this.__data__,i=to(n,t);return i<0?n.push([t,e]):n[i][1]=e,this}ql.prototype.clear=ZE,ql.prototype.delete=JE,ql.prototype.get=xE,ql.prototype.has=$E,ql.prototype.set=ev;function al(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function tv(){this.__data__={hash:new ul,map:new(WE||ql),string:new ul}}function nv(t){return no(this,t).delete(t)}function iv(t){return no(this,t).get(t)}function lv(t){return no(this,t).has(t)}function rv(t,e){return no(this,t).set(t,e),this}al.prototype.clear=tv,al.prototype.delete=nv,al.prototype.get=iv,al.prototype.has=lv,al.prototype.set=rv;function to(t,e){for(var n=t.length;n--;)if(_v(t[n][0],e))return n;return-1}function ov(t,e){e=fv(e,t)?[e]:av(e);for(var n=0,i=e.length;t!=null&&n<i;)t=t[gv(e[n++])];return n&&n==i?t:void 0}function sv(t){if(!rm(t)||dv(t))return!1;var e=pv(t)||UE(t)?jE:LE;return e.test(mv(t))}function uv(t){if(typeof t=="string")return t;if(ws(t))return nm?nm.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function av(t){return lm(t)?t:hv(t)}function no(t,e){var n=t.__data__;return cv(e)?n[typeof e=="string"?"string":"hash"]:n.map}function im(t,e){var n=BE(t,e);return sv(n)?n:void 0}function fv(t,e){if(lm(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||ws(t)?!0:OE.test(t)||!DE.test(t)||e!=null&&t in Object(e)}function cv(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function dv(t){return!!Jg&&Jg in t}var hv=bs(function(t){t=wv(t);var e=[];return RE.test(t)&&e.push(""),t.replace(PE,function(n,i,l,r){e.push(l?r.replace(NE,"$1"):i||n)}),e});function gv(t){if(typeof t=="string"||ws(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function mv(t){if(t!=null){try{return xg.call(t)}catch{}try{return t+""}catch{}}return""}function bs(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError(CE);var n=function(){var i=arguments,l=e?e.apply(this,i):i[0],r=n.cache;if(r.has(l))return r.get(l);var o=t.apply(this,i);return n.cache=r.set(l,o),o};return n.cache=new(bs.Cache||al),n}bs.Cache=al;function _v(t,e){return t===e||t!==t&&e!==e}var lm=Array.isArray;function pv(t){var e=rm(t)?$g.call(t):"";return e==AE||e==TE}function rm(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function bv(t){return!!t&&typeof t=="object"}function ws(t){return typeof t=="symbol"||bv(t)&&$g.call(t)==IE}function wv(t){return t==null?"":uv(t)}function kv(t,e,n){var i=t==null?void 0:ov(t,e);return i===void 0?n:i}var yv=kv;const io=po(yv);var lo={exports:{}};lo.exports,function(t,e){var n=200,i="__lodash_hash_undefined__",l=9007199254740991,r="[object Arguments]",o="[object Array]",u="[object Boolean]",s="[object Date]",a="[object Error]",f="[object Function]",c="[object GeneratorFunction]",g="[object Map]",h="[object Number]",d="[object Object]",_="[object Promise]",b="[object RegExp]",w="[object Set]",E="[object String]",k="[object Symbol]",I="[object WeakMap]",O="[object ArrayBuffer]",D="[object DataView]",N="[object Float32Array]",M="[object Float64Array]",V="[object Int8Array]",W="[object Int16Array]",ne="[object Int32Array]",H="[object Uint8Array]",$="[object Uint8ClampedArray]",Y="[object Uint16Array]",G="[object Uint32Array]",oe=/[\\^$.*+?()[\]{}|]/g,ie=/\w*$/,J=/^\[object .+?Constructor\]$/,q=/^(?:0|[1-9]\d*)$/,j={};j[r]=j[o]=j[O]=j[D]=j[u]=j[s]=j[N]=j[M]=j[V]=j[W]=j[ne]=j[g]=j[h]=j[d]=j[b]=j[w]=j[E]=j[k]=j[H]=j[$]=j[Y]=j[G]=!0,j[a]=j[f]=j[I]=!1;var K=typeof jn=="object"&&jn&&jn.Object===Object&&jn,x=typeof self=="object"&&self&&self.Object===Object&&self,X=K||x||Function("return this")(),F=e&&!e.nodeType&&e,R=F&&!0&&t&&!t.nodeType&&t,z=R&&R.exports===F;function me(y,L){return y.set(L[0],L[1]),y}function se(y,L){return y.add(L),y}function Oe(y,L){for(var ee=-1,ye=y?y.length:0;++ee<ye&&L(y[ee],ee,y)!==!1;);return y}function be(y,L){for(var ee=-1,ye=L.length,at=y.length;++ee<ye;)y[at+ee]=L[ee];return y}function Ie(y,L,ee,ye){for(var at=-1,et=y?y.length:0;++at<et;)ee=L(ee,y[at],at,y);return ee}function ve(y,L){for(var ee=-1,ye=Array(y);++ee<y;)ye[ee]=L(ee);return ye}function fe(y,L){return y==null?void 0:y[L]}function Ne(y){var L=!1;if(y!=null&&typeof y.toString!="function")try{L=!!(y+"")}catch{}return L}function te(y){var L=-1,ee=Array(y.size);return y.forEach(function(ye,at){ee[++L]=[at,ye]}),ee}function ae(y,L){return function(ee){return y(L(ee))}}function de(y){var L=-1,ee=Array(y.size);return y.forEach(function(ye){ee[++L]=ye}),ee}var Xe=Array.prototype,Te=Function.prototype,Se=Object.prototype,Le=X["__core-js_shared__"],rt=function(){var y=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),kt=Te.toString,ke=Se.hasOwnProperty,ce=Se.toString,re=RegExp("^"+kt.call(ke).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ae=z?X.Buffer:void 0,Ue=X.Symbol,Je=X.Uint8Array,lt=ae(Object.getPrototypeOf,Object),he=Object.create,it=Se.propertyIsEnumerable,ot=Xe.splice,wt=Object.getOwnPropertySymbols,Ct=Ae?Ae.isBuffer:void 0,ln=ae(Object.keys,Object),It=yn(X,"DataView"),xt=yn(X,"Map"),_e=yn(X,"Promise"),st=yn(X,"Set"),we=yn(X,"WeakMap"),xe=yn(Object,"create"),pe=Rt(It),_t=Rt(xt),Bt=Rt(_e),Kn=Rt(st),ui=Rt(we),Mn=Ue?Ue.prototype:void 0,ai=Mn?Mn.valueOf:void 0;function Nn(y){var L=-1,ee=y?y.length:0;for(this.clear();++L<ee;){var ye=y[L];this.set(ye[0],ye[1])}}function fl(){this.__data__=xe?xe(null):{}}function cl(y){return this.has(y)&&delete this.__data__[y]}function dl(y){var L=this.__data__;if(xe){var ee=L[y];return ee===i?void 0:ee}return ke.call(L,y)?L[y]:void 0}function _i(y){var L=this.__data__;return xe?L[y]!==void 0:ke.call(L,y)}function Tn(y,L){var ee=this.__data__;return ee[y]=xe&&L===void 0?i:L,this}Nn.prototype.clear=fl,Nn.prototype.delete=cl,Nn.prototype.get=dl,Nn.prototype.has=_i,Nn.prototype.set=Tn;function Kt(y){var L=-1,ee=y?y.length:0;for(this.clear();++L<ee;){var ye=y[L];this.set(ye[0],ye[1])}}function Wl(){this.__data__=[]}function pi(y){var L=this.__data__,ee=ci(L,y);if(ee<0)return!1;var ye=L.length-1;return ee==ye?L.pop():ot.call(L,ee,1),!0}function hl(y){var L=this.__data__,ee=ci(L,y);return ee<0?void 0:L[ee][1]}function Fi(y){return ci(this.__data__,y)>-1}function gl(y,L){var ee=this.__data__,ye=ci(ee,y);return ye<0?ee.push([y,L]):ee[ye][1]=L,this}Kt.prototype.clear=Wl,Kt.prototype.delete=pi,Kt.prototype.get=hl,Kt.prototype.has=Fi,Kt.prototype.set=gl;function rn(y){var L=-1,ee=y?y.length:0;for(this.clear();++L<ee;){var ye=y[L];this.set(ye[0],ye[1])}}function Ln(){this.__data__={hash:new Nn,map:new(xt||Kt),string:new Nn}}function Gl(y){return Un(this,y).delete(y)}function Vi(y){return Un(this,y).get(y)}function Bi(y){return Un(this,y).has(y)}function Ui(y,L){return Un(this,y).set(y,L),this}rn.prototype.clear=Ln,rn.prototype.delete=Gl,rn.prototype.get=Vi,rn.prototype.has=Bi,rn.prototype.set=Ui;function on(y){this.__data__=new Kt(y)}function Hi(){this.__data__=new Kt}function ml(y){return this.__data__.delete(y)}function _l(y){return this.__data__.get(y)}function zi(y){return this.__data__.has(y)}function ji(y,L){var ee=this.__data__;if(ee instanceof Kt){var ye=ee.__data__;if(!xt||ye.length<n-1)return ye.push([y,L]),this;ee=this.__data__=new rn(ye)}return ee.set(y,L),this}on.prototype.clear=Hi,on.prototype.delete=ml,on.prototype.get=_l,on.prototype.has=zi,on.prototype.set=ji;function $n(y,L){var ee=Si(y)||Qn(y)?ve(y.length,String):[],ye=ee.length,at=!!ye;for(var et in y)ke.call(y,et)&&!(at&&(et=="length"||di(et,ye)))&&ee.push(et);return ee}function fi(y,L,ee){var ye=y[L];(!(ke.call(y,L)&&sn(ye,ee))||ee===void 0&&!(L in y))&&(y[L]=ee)}function ci(y,L){for(var ee=y.length;ee--;)if(sn(y[ee][0],L))return ee;return-1}function In(y,L){return y&&Bn(L,Zn(L),y)}function bi(y,L,ee,ye,at,et,dt){var pt;if(ye&&(pt=et?ye(y,at,et,dt):ye(y)),pt!==void 0)return pt;if(!Hn(y))return y;var At=Si(y);if(At){if(pt=wl(y),!L)return Zi(y,pt)}else{var yt=dn(y),Nt=yt==f||yt==c;if(Pt(y))return ei(y,L);if(yt==d||yt==r||Nt&&!et){if(Ne(y))return et?y:{};if(pt=$t(Nt?{}:y),!L)return ki(y,In(pt,y))}else{if(!j[yt])return et?y:{};pt=En(y,yt,bi,L)}}dt||(dt=new on);var Xt=dt.get(y);if(Xt)return Xt;if(dt.set(y,pt),!At)var Vt=ee?bl(y):Zn(y);return Oe(Vt||y,function(Dt,Mt){Vt&&(Mt=Dt,Dt=y[Mt]),fi(pt,Mt,bi(Dt,L,ee,ye,Mt,y,dt))}),pt}function qi(y){return Hn(y)?he(y):{}}function Wi(y,L,ee){var ye=L(y);return Si(y)?ye:be(ye,ee(y))}function Gi(y){return ce.call(y)}function Yi(y){if(!Hn(y)||Ei(y))return!1;var L=Ai(y)||Ne(y)?re:J;return L.test(Rt(y))}function Ki(y){if(!Ji(y))return ln(y);var L=[];for(var ee in Object(y))ke.call(y,ee)&&ee!="constructor"&&L.push(ee);return L}function ei(y,L){if(L)return y.slice();var ee=new y.constructor(y.length);return y.copy(ee),ee}function Fn(y){var L=new y.constructor(y.byteLength);return new Je(L).set(new Je(y)),L}function Xn(y,L){var ee=L?Fn(y.buffer):y.buffer;return new y.constructor(ee,y.byteOffset,y.byteLength)}function Xi(y,L,ee){var ye=L?ee(te(y),!0):te(y);return Ie(ye,me,new y.constructor)}function wi(y){var L=new y.constructor(y.source,ie.exec(y));return L.lastIndex=y.lastIndex,L}function Qi(y,L,ee){var ye=L?ee(de(y),!0):de(y);return Ie(ye,se,new y.constructor)}function pl(y){return ai?Object(ai.call(y)):{}}function Vn(y,L){var ee=L?Fn(y.buffer):y.buffer;return new y.constructor(ee,y.byteOffset,y.length)}function Zi(y,L){var ee=-1,ye=y.length;for(L||(L=Array(ye));++ee<ye;)L[ee]=y[ee];return L}function Bn(y,L,ee,ye){ee||(ee={});for(var at=-1,et=L.length;++at<et;){var dt=L[at],pt=void 0;fi(ee,dt,pt===void 0?y[dt]:pt)}return ee}function ki(y,L){return Bn(y,Dn(y),L)}function bl(y){return Wi(y,Zn,Dn)}function Un(y,L){var ee=y.__data__;return yi(L)?ee[typeof L=="string"?"string":"hash"]:ee.map}function yn(y,L){var ee=fe(y,L);return Yi(ee)?ee:void 0}var Dn=wt?ae(wt,Object):kl,dn=Gi;(It&&dn(new It(new ArrayBuffer(1)))!=D||xt&&dn(new xt)!=g||_e&&dn(_e.resolve())!=_||st&&dn(new st)!=w||we&&dn(new we)!=I)&&(dn=function(y){var L=ce.call(y),ee=L==d?y.constructor:void 0,ye=ee?Rt(ee):void 0;if(ye)switch(ye){case pe:return D;case _t:return g;case Bt:return _;case Kn:return w;case ui:return I}return L});function wl(y){var L=y.length,ee=y.constructor(L);return L&&typeof y[0]=="string"&&ke.call(y,"index")&&(ee.index=y.index,ee.input=y.input),ee}function $t(y){return typeof y.constructor=="function"&&!Ji(y)?qi(lt(y)):{}}function En(y,L,ee,ye){var at=y.constructor;switch(L){case O:return Fn(y);case u:case s:return new at(+y);case D:return Xn(y,ye);case N:case M:case V:case W:case ne:case H:case $:case Y:case G:return Vn(y,ye);case g:return Xi(y,ye,ee);case h:case E:return new at(y);case b:return wi(y);case w:return Qi(y,ye,ee);case k:return pl(y)}}function di(y,L){return L=L??l,!!L&&(typeof y=="number"||q.test(y))&&y>-1&&y%1==0&&y<L}function yi(y){var L=typeof y;return L=="string"||L=="number"||L=="symbol"||L=="boolean"?y!=="__proto__":y===null}function Ei(y){return!!rt&&rt in y}function Ji(y){var L=y&&y.constructor,ee=typeof L=="function"&&L.prototype||Se;return y===ee}function Rt(y){if(y!=null){try{return kt.call(y)}catch{}try{return y+""}catch{}}return""}function vi(y){return bi(y,!0,!0)}function sn(y,L){return y===L||y!==y&&L!==L}function Qn(y){return Ci(y)&&ke.call(y,"callee")&&(!it.call(y,"callee")||ce.call(y)==r)}var Si=Array.isArray;function en(y){return y!=null&&xi(y.length)&&!Ai(y)}function Ci(y){return hi(y)&&en(y)}var Pt=Ct||$i;function Ai(y){var L=Hn(y)?ce.call(y):"";return L==f||L==c}function xi(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=l}function Hn(y){var L=typeof y;return!!y&&(L=="object"||L=="function")}function hi(y){return!!y&&typeof y=="object"}function Zn(y){return en(y)?$n(y):Ki(y)}function kl(){return[]}function $i(){return!1}t.exports=vi}(lo,lo.exports);var Ev=lo.exports;const vv=po(Ev);var ro={exports:{}};ro.exports,function(t,e){var n=200,i="__lodash_hash_undefined__",l=1,r=2,o=9007199254740991,u="[object Arguments]",s="[object Array]",a="[object AsyncFunction]",f="[object Boolean]",c="[object Date]",g="[object Error]",h="[object Function]",d="[object GeneratorFunction]",_="[object Map]",b="[object Number]",w="[object Null]",E="[object Object]",k="[object Promise]",I="[object Proxy]",O="[object RegExp]",D="[object Set]",N="[object String]",M="[object Symbol]",V="[object Undefined]",W="[object WeakMap]",ne="[object ArrayBuffer]",H="[object DataView]",$="[object Float32Array]",Y="[object Float64Array]",G="[object Int8Array]",oe="[object Int16Array]",ie="[object Int32Array]",J="[object Uint8Array]",q="[object Uint8ClampedArray]",j="[object Uint16Array]",K="[object Uint32Array]",x=/[\\^$.*+?()[\]{}|]/g,X=/^\[object .+?Constructor\]$/,F=/^(?:0|[1-9]\d*)$/,R={};R[$]=R[Y]=R[G]=R[oe]=R[ie]=R[J]=R[q]=R[j]=R[K]=!0,R[u]=R[s]=R[ne]=R[f]=R[H]=R[c]=R[g]=R[h]=R[_]=R[b]=R[E]=R[O]=R[D]=R[N]=R[W]=!1;var z=typeof jn=="object"&&jn&&jn.Object===Object&&jn,me=typeof self=="object"&&self&&self.Object===Object&&self,se=z||me||Function("return this")(),Oe=e&&!e.nodeType&&e,be=Oe&&!0&&t&&!t.nodeType&&t,Ie=be&&be.exports===Oe,ve=Ie&&z.process,fe=function(){try{return ve&&ve.binding&&ve.binding("util")}catch{}}(),Ne=fe&&fe.isTypedArray;function te(y,L){for(var ee=-1,ye=y==null?0:y.length,at=0,et=[];++ee<ye;){var dt=y[ee];L(dt,ee,y)&&(et[at++]=dt)}return et}function ae(y,L){for(var ee=-1,ye=L.length,at=y.length;++ee<ye;)y[at+ee]=L[ee];return y}function de(y,L){for(var ee=-1,ye=y==null?0:y.length;++ee<ye;)if(L(y[ee],ee,y))return!0;return!1}function Xe(y,L){for(var ee=-1,ye=Array(y);++ee<y;)ye[ee]=L(ee);return ye}function Te(y){return function(L){return y(L)}}function Se(y,L){return y.has(L)}function Le(y,L){return y==null?void 0:y[L]}function rt(y){var L=-1,ee=Array(y.size);return y.forEach(function(ye,at){ee[++L]=[at,ye]}),ee}function kt(y,L){return function(ee){return y(L(ee))}}function ke(y){var L=-1,ee=Array(y.size);return y.forEach(function(ye){ee[++L]=ye}),ee}var ce=Array.prototype,re=Function.prototype,Ae=Object.prototype,Ue=se["__core-js_shared__"],Je=re.toString,lt=Ae.hasOwnProperty,he=function(){var y=/[^.]+$/.exec(Ue&&Ue.keys&&Ue.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),it=Ae.toString,ot=RegExp("^"+Je.call(lt).replace(x,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wt=Ie?se.Buffer:void 0,Ct=se.Symbol,ln=se.Uint8Array,It=Ae.propertyIsEnumerable,xt=ce.splice,_e=Ct?Ct.toStringTag:void 0,st=Object.getOwnPropertySymbols,we=wt?wt.isBuffer:void 0,xe=kt(Object.keys,Object),pe=Dn(se,"DataView"),_t=Dn(se,"Map"),Bt=Dn(se,"Promise"),Kn=Dn(se,"Set"),ui=Dn(se,"WeakMap"),Mn=Dn(Object,"create"),ai=Rt(pe),Nn=Rt(_t),fl=Rt(Bt),cl=Rt(Kn),dl=Rt(ui),_i=Ct?Ct.prototype:void 0,Tn=_i?_i.valueOf:void 0;function Kt(y){var L=-1,ee=y==null?0:y.length;for(this.clear();++L<ee;){var ye=y[L];this.set(ye[0],ye[1])}}function Wl(){this.__data__=Mn?Mn(null):{},this.size=0}function pi(y){var L=this.has(y)&&delete this.__data__[y];return this.size-=L?1:0,L}function hl(y){var L=this.__data__;if(Mn){var ee=L[y];return ee===i?void 0:ee}return lt.call(L,y)?L[y]:void 0}function Fi(y){var L=this.__data__;return Mn?L[y]!==void 0:lt.call(L,y)}function gl(y,L){var ee=this.__data__;return this.size+=this.has(y)?0:1,ee[y]=Mn&&L===void 0?i:L,this}Kt.prototype.clear=Wl,Kt.prototype.delete=pi,Kt.prototype.get=hl,Kt.prototype.has=Fi,Kt.prototype.set=gl;function rn(y){var L=-1,ee=y==null?0:y.length;for(this.clear();++L<ee;){var ye=y[L];this.set(ye[0],ye[1])}}function Ln(){this.__data__=[],this.size=0}function Gl(y){var L=this.__data__,ee=ei(L,y);if(ee<0)return!1;var ye=L.length-1;return ee==ye?L.pop():xt.call(L,ee,1),--this.size,!0}function Vi(y){var L=this.__data__,ee=ei(L,y);return ee<0?void 0:L[ee][1]}function Bi(y){return ei(this.__data__,y)>-1}function Ui(y,L){var ee=this.__data__,ye=ei(ee,y);return ye<0?(++this.size,ee.push([y,L])):ee[ye][1]=L,this}rn.prototype.clear=Ln,rn.prototype.delete=Gl,rn.prototype.get=Vi,rn.prototype.has=Bi,rn.prototype.set=Ui;function on(y){var L=-1,ee=y==null?0:y.length;for(this.clear();++L<ee;){var ye=y[L];this.set(ye[0],ye[1])}}function Hi(){this.size=0,this.__data__={hash:new Kt,map:new(_t||rn),string:new Kt}}function ml(y){var L=yn(this,y).delete(y);return this.size-=L?1:0,L}function _l(y){return yn(this,y).get(y)}function zi(y){return yn(this,y).has(y)}function ji(y,L){var ee=yn(this,y),ye=ee.size;return ee.set(y,L),this.size+=ee.size==ye?0:1,this}on.prototype.clear=Hi,on.prototype.delete=ml,on.prototype.get=_l,on.prototype.has=zi,on.prototype.set=ji;function $n(y){var L=-1,ee=y==null?0:y.length;for(this.__data__=new on;++L<ee;)this.add(y[L])}function fi(y){return this.__data__.set(y,i),this}function ci(y){return this.__data__.has(y)}$n.prototype.add=$n.prototype.push=fi,$n.prototype.has=ci;function In(y){var L=this.__data__=new rn(y);this.size=L.size}function bi(){this.__data__=new rn,this.size=0}function qi(y){var L=this.__data__,ee=L.delete(y);return this.size=L.size,ee}function Wi(y){return this.__data__.get(y)}function Gi(y){return this.__data__.has(y)}function Yi(y,L){var ee=this.__data__;if(ee instanceof rn){var ye=ee.__data__;if(!_t||ye.length<n-1)return ye.push([y,L]),this.size=++ee.size,this;ee=this.__data__=new on(ye)}return ee.set(y,L),this.size=ee.size,this}In.prototype.clear=bi,In.prototype.delete=qi,In.prototype.get=Wi,In.prototype.has=Gi,In.prototype.set=Yi;function Ki(y,L){var ee=Qn(y),ye=!ee&&sn(y),at=!ee&&!ye&&en(y),et=!ee&&!ye&&!at&&hi(y),dt=ee||ye||at||et,pt=dt?Xe(y.length,String):[],At=pt.length;for(var yt in y)lt.call(y,yt)&&!(dt&&(yt=="length"||at&&(yt=="offset"||yt=="parent")||et&&(yt=="buffer"||yt=="byteLength"||yt=="byteOffset")||En(yt,At)))&&pt.push(yt);return pt}function ei(y,L){for(var ee=y.length;ee--;)if(vi(y[ee][0],L))return ee;return-1}function Fn(y,L,ee){var ye=L(y);return Qn(y)?ye:ae(ye,ee(y))}function Xn(y){return y==null?y===void 0?V:w:_e&&_e in Object(y)?dn(y):Ji(y)}function Xi(y){return Hn(y)&&Xn(y)==u}function wi(y,L,ee,ye,at){return y===L?!0:y==null||L==null||!Hn(y)&&!Hn(L)?y!==y&&L!==L:Qi(y,L,ee,ye,wi,at)}function Qi(y,L,ee,ye,at,et){var dt=Qn(y),pt=Qn(L),At=dt?s:$t(y),yt=pt?s:$t(L);At=At==u?E:At,yt=yt==u?E:yt;var Nt=At==E,Xt=yt==E,Vt=At==yt;if(Vt&&en(y)){if(!en(L))return!1;dt=!0,Nt=!1}if(Vt&&!Nt)return et||(et=new In),dt||hi(y)?Bn(y,L,ee,ye,at,et):ki(y,L,At,ee,ye,at,et);if(!(ee&l)){var Dt=Nt&<.call(y,"__wrapped__"),Mt=Xt&<.call(L,"__wrapped__");if(Dt||Mt){var On=Dt?y.value():y,pn=Mt?L.value():L;return et||(et=new In),at(On,pn,ee,ye,et)}}return Vt?(et||(et=new In),bl(y,L,ee,ye,at,et)):!1}function pl(y){if(!xi(y)||yi(y))return!1;var L=Pt(y)?ot:X;return L.test(Rt(y))}function Vn(y){return Hn(y)&&Ai(y.length)&&!!R[Xn(y)]}function Zi(y){if(!Ei(y))return xe(y);var L=[];for(var ee in Object(y))lt.call(y,ee)&&ee!="constructor"&&L.push(ee);return L}function Bn(y,L,ee,ye,at,et){var dt=ee&l,pt=y.length,At=L.length;if(pt!=At&&!(dt&&At>pt))return!1;var yt=et.get(y);if(yt&&et.get(L))return yt==L;var Nt=-1,Xt=!0,Vt=ee&r?new $n:void 0;for(et.set(y,L),et.set(L,y);++Nt<pt;){var Dt=y[Nt],Mt=L[Nt];if(ye)var On=dt?ye(Mt,Dt,Nt,L,y,et):ye(Dt,Mt,Nt,y,L,et);if(On!==void 0){if(On)continue;Xt=!1;break}if(Vt){if(!de(L,function(pn,Rn){if(!Se(Vt,Rn)&&(Dt===pn||at(Dt,pn,ee,ye,et)))return Vt.push(Rn)})){Xt=!1;break}}else if(!(Dt===Mt||at(Dt,Mt,ee,ye,et))){Xt=!1;break}}return et.delete(y),et.delete(L),Xt}function ki(y,L,ee,ye,at,et,dt){switch(ee){case H:if(y.byteLength!=L.byteLength||y.byteOffset!=L.byteOffset)return!1;y=y.buffer,L=L.buffer;case ne:return!(y.byteLength!=L.byteLength||!et(new ln(y),new ln(L)));case f:case c:case b:return vi(+y,+L);case g:return y.name==L.name&&y.message==L.message;case O:case N:return y==L+"";case _:var pt=rt;case D:var At=ye&l;if(pt||(pt=ke),y.size!=L.size&&!At)return!1;var yt=dt.get(y);if(yt)return yt==L;ye|=r,dt.set(y,L);var Nt=Bn(pt(y),pt(L),ye,at,et,dt);return dt.delete(y),Nt;case M:if(Tn)return Tn.call(y)==Tn.call(L)}return!1}function bl(y,L,ee,ye,at,et){var dt=ee&l,pt=Un(y),At=pt.length,yt=Un(L),Nt=yt.length;if(At!=Nt&&!dt)return!1;for(var Xt=At;Xt--;){var Vt=pt[Xt];if(!(dt?Vt in L:lt.call(L,Vt)))return!1}var Dt=et.get(y);if(Dt&&et.get(L))return Dt==L;var Mt=!0;et.set(y,L),et.set(L,y);for(var On=dt;++Xt<At;){Vt=pt[Xt];var pn=y[Vt],Rn=L[Vt];if(ye)var hn=dt?ye(Rn,pn,Vt,L,y,et):ye(pn,Rn,Vt,y,L,et);if(!(hn===void 0?pn===Rn||at(pn,Rn,ee,ye,et):hn)){Mt=!1;break}On||(On=Vt=="constructor")}if(Mt&&!On){var yl=y.constructor,Ti=L.constructor;yl!=Ti&&"constructor"in y&&"constructor"in L&&!(typeof yl=="function"&&yl instanceof yl&&typeof Ti=="function"&&Ti instanceof Ti)&&(Mt=!1)}return et.delete(y),et.delete(L),Mt}function Un(y){return Fn(y,Zn,wl)}function yn(y,L){var ee=y.__data__;return di(L)?ee[typeof L=="string"?"string":"hash"]:ee.map}function Dn(y,L){var ee=Le(y,L);return pl(ee)?ee:void 0}function dn(y){var L=lt.call(y,_e),ee=y[_e];try{y[_e]=void 0;var ye=!0}catch{}var at=it.call(y);return ye&&(L?y[_e]=ee:delete y[_e]),at}var wl=st?function(y){return y==null?[]:(y=Object(y),te(st(y),function(L){return It.call(y,L)}))}:kl,$t=Xn;(pe&&$t(new pe(new ArrayBuffer(1)))!=H||_t&&$t(new _t)!=_||Bt&&$t(Bt.resolve())!=k||Kn&&$t(new Kn)!=D||ui&&$t(new ui)!=W)&&($t=function(y){var L=Xn(y),ee=L==E?y.constructor:void 0,ye=ee?Rt(ee):"";if(ye)switch(ye){case ai:return H;case Nn:return _;case fl:return k;case cl:return D;case dl:return W}return L});function En(y,L){return L=L??o,!!L&&(typeof y=="number"||F.test(y))&&y>-1&&y%1==0&&y<L}function di(y){var L=typeof y;return L=="string"||L=="number"||L=="symbol"||L=="boolean"?y!=="__proto__":y===null}function yi(y){return!!he&&he in y}function Ei(y){var L=y&&y.constructor,ee=typeof L=="function"&&L.prototype||Ae;return y===ee}function Ji(y){return it.call(y)}function Rt(y){if(y!=null){try{return Je.call(y)}catch{}try{return y+""}catch{}}return""}function vi(y,L){return y===L||y!==y&&L!==L}var sn=Xi(function(){return arguments}())?Xi:function(y){return Hn(y)&<.call(y,"callee")&&!It.call(y,"callee")},Qn=Array.isArray;function Si(y){return y!=null&&Ai(y.length)&&!Pt(y)}var en=we||$i;function Ci(y,L){return wi(y,L)}function Pt(y){if(!xi(y))return!1;var L=Xn(y);return L==h||L==d||L==a||L==I}function Ai(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=o}function xi(y){var L=typeof y;return y!=null&&(L=="object"||L=="function")}function Hn(y){return y!=null&&typeof y=="object"}var hi=Ne?Te(Ne):Vn;function Zn(y){return Si(y)?Ki(y):Zi(y)}function kl(){return[]}function $i(){return!1}t.exports=Ci}(ro,ro.exports);var Sv=ro.exports;const Cv=po(Sv),Av=(t,e)=>Cv(t,e),Tv=t=>Object.keys(t||{}),Iv=(t,e)=>{const n={};return t.forEach(i=>{n[i]=e[i]}),n},Dv=()=>{const t={},e=(n,i)=>{const{watcherName:l,fn:r}=n,{prop:o,value:u}=i;t[l]||(t[l]={deps:{},fn:r}),t[l].deps[o]=u};return{subscribers:t,subscribe(n,i){n&&e(n,i)},notify(n,i){Object.entries(t).forEach(([l,{deps:r,fn:o}])=>{const u=Tv(r);if(u.includes(i)){const s=Iv(u,n);Av(r,s)||(t[l].deps=s,o())}})}}},Ov=()=>{let t=null;return{targetWatcher(e,n){t={watcherName:e,fn:n},t.fn(),t=null},getTarget(){return t}}};function Rv(t,e){const n=io(t,"data",{}),i=io(t,"watch",{}),l=io(t,"methods",{}),r=io(e,"onChange",()=>{}),{subscribe:o,notify:u,subscribers:s}=Dv(),{targetWatcher:a,getTarget:f}=Ov();let c;const g={},h=()=>({data:c,methods:g});let d=!1;const _=w=>(...E)=>{d=!0;const k=w(...E);return d=!1,k};Object.entries(l).forEach(([w,E])=>{g[w]=_((...k)=>E(h(),...k)),Object.defineProperty(g[w],"name",{value:w})}),c=new Proxy(vv(n),{get(w,E){return f()&&!d&&o(f(),{prop:E,value:w[E]}),Reflect.get(...arguments)},set(w,E,k){return w[E]===k||(Reflect.set(...arguments),f()||(r&&r(E,k),u(c,E))),!0}}),Object.entries(i).forEach(([w,E])=>{a(w,()=>{E(h())})});const b=[c,g];return b._internal={_getSubscribers(){return s}},b}function Pv({pageIndex:t,particlesToShow:e,particlesToScroll:n,particlesCount:i}){const l=t===0?0:e-n,r=t*e-t*l,o=r+Math.max(e,n)-1,u=[];for(let s=r;s<=Math.min(i-1,o);s++)u.push(s);return u}function Mv({infinite:t,pageIndex:e,pagesCount:n,particlesCount:i,particlesToShow:l,particlesToScroll:r}){const o=jl(0,e,n-1);let u=o-1,s=o+1;u=t?u<0?n-1:u:Math.max(0,u),s=t?s>n-1?0:s:Math.min(n-1,s);const a=[...new Set([u,o,s,0,n-1])].sort((c,g)=>c-g),f=a.flatMap(c=>Pv({pageIndex:c,particlesToShow:l,particlesToScroll:r,particlesCount:i}));return{pageIndexes:a,particleIndexes:[...new Set(f)].sort((c,g)=>c-g)}}const Nv=(t,e)=>(t(),setInterval(t,e)),Lv=35,om=1;class Fv{constructor({onProgressValueChange:e}){this._onProgressValueChange=e,this._autoplayDuration,this._onProgressValueChange,this._interval,this._paused=!1}setAutoplayDuration(e){this._autoplayDuration=e}start(e){return new Promise(n=>{this.reset();const i=Math.min(Lv,Math.max(this._autoplayDuration,1));let l=-i;this._interval=Nv(async()=>{if(this._paused)return;l+=i;const r=l/this._autoplayDuration;this._onProgressValueChange(r),r>om&&(this.reset(),await e(),n())},i)})}pause(){this._paused=!0}resume(){this._paused=!1}reset(){clearInterval(this._interval),this._onProgressValueChange(om)}}function Vv(t){const e=new Fv({onProgressValueChange:r=>{t("progressValue",1-r)}}),n=Rv({data:{particlesCountWithoutClones:0,particlesToShow:1,particlesToShowInit:1,particlesToScroll:1,particlesToScrollInit:1,particlesCount:1,currentParticleIndex:1,infinite:!1,autoplayDuration:1e3,clonesCountHead:0,clonesCountTail:0,clonesCountTotal:0,partialPageSize:1,currentPageIndex:1,pagesCount:1,pauseOnFocus:!1,focused:!1,autoplay:!1,autoplayDirection:"next",disabled:!1,durationMsInit:1e3,durationMs:1e3,offset:0,particleWidth:0,loaded:[]},watch:{setLoaded({data:r}){r.loaded=Mv({infinite:r.infinite,pageIndex:r.currentPageIndex,pagesCount:r.pagesCount,particlesCount:r.particlesCountWithoutClones,particlesToShow:r.particlesToShow,particlesToScroll:r.particlesToScroll}).particleIndexes},setCurrentPageIndex({data:r}){r.currentPageIndex=mE({currentParticleIndex:r.currentParticleIndex,particlesCount:r.particlesCount,clonesCountHead:r.clonesCountHead,clonesCountTotal:r.clonesCountTotal,infinite:r.infinite,particlesToScroll:r.particlesToScroll})},setPartialPageSize({data:r}){r.partialPageSize=Xg({particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow,particlesCountWithoutClones:r.particlesCountWithoutClones})},setClonesCount({data:r}){const{head:o,tail:u}=SE({infinite:r.infinite,particlesToShow:r.particlesToShow,partialPageSize:r.partialPageSize});r.clonesCountHead=o,r.clonesCountTail=u,r.clonesCountTotal=o+u},setProgressManagerAutoplayDuration({data:r}){e.setAutoplayDuration(r.autoplayDuration)},toggleProgressManager({data:{pauseOnFocus:r,focused:o}}){r&&(o?e.pause():e.resume())},initDuration({data:r}){r.durationMs=r.durationMsInit},applyAutoplay({data:r,methods:{_applyAutoplayIfNeeded:o}}){r.autoplay&&o(r.autoplay)},setPagesCount({data:r}){r.pagesCount=pE({infinite:r.infinite,particlesCountWithoutClones:r.particlesCountWithoutClones,particlesToScroll:r.particlesToScroll,particlesToShow:r.particlesToShow})},setParticlesToShow({data:r}){r.particlesToShow=jl(1,r.particlesToShowInit,r.particlesCountWithoutClones)},setParticlesToScroll({data:r}){r.particlesToScroll=jl(1,r.particlesToScrollInit,r.particlesCountWithoutClones)}},methods:{_prev({data:r}){r.currentParticleIndex=hs({infinite:r.infinite,pageIndex:r.currentPageIndex-1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_next({data:r}){r.currentParticleIndex=hs({infinite:r.infinite,pageIndex:r.currentPageIndex+1,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},_moveToParticle({data:r},o){r.currentParticleIndex=jl(0,o,r.particlesCount-1)},toggleFocused({data:r}){r.focused=!r.focused},async _applyAutoplayIfNeeded({data:r,methods:o}){if(!r.infinite&&(r.autoplayDirection===Li&&r.currentParticleIndex===r.particlesCount-1||r.autoplayDirection===zl&&r.currentParticleIndex===0)){e.reset();return}if(r.autoplay){const u=()=>gs({[Li]:async()=>o.showNextPage(),[zl]:async()=>o.showPrevPage()})(r.autoplayDirection);await e.start(u)}},async _jumpIfNeeded({data:r,methods:o}){let u=!1;return r.infinite&&(r.currentParticleIndex===0?(await o.showParticle(r.particlesCount-r.clonesCountTotal,{animated:!1}),u=!0):r.currentParticleIndex===r.particlesCount-r.clonesCountTail&&(await o.showParticle(r.clonesCountHead,{animated:!1}),u=!0)),u},async changePage({data:r,methods:o},u,s){if(e.reset(),r.disabled)return;r.disabled=!0,u(),await o.offsetPage({animated:ur(s,"animated",!0)}),r.disabled=!1,!await o._jumpIfNeeded()&&o._applyAutoplayIfNeeded()},async showNextPage({data:r,methods:o},u){r.disabled||await o.changePage(o._next,u)},async showPrevPage({data:r,methods:o},u){r.disabled||await o.changePage(o._prev,u)},async showParticle({methods:r},o,u){await r.changePage(()=>r._moveToParticle(o),u)},_getParticleIndexByPageIndex({data:r},o){return hs({infinite:r.infinite,pageIndex:o,clonesCountHead:r.clonesCountHead,clonesCountTail:r.clonesCountTail,particlesToScroll:r.particlesToScroll,particlesCount:r.particlesCount,particlesToShow:r.particlesToShow})},async showPage({methods:r},o,u){const s=r._getParticleIndexByPageIndex(o);await r.showParticle(s,u)},offsetPage({data:r},o){const u=ur(o,"animated",!0);return new Promise(s=>{r.durationMs=u?r.durationMsInit:0,r.offset=-r.currentParticleIndex*r.particleWidth,setTimeout(()=>{s()},r.durationMs)})}}},{onChange:t}),[i,l]=n;return[{data:i,progressManager:e},l,n._internal]}const Bv=t=>({currentPageIndex:t[0]&32,pagesCount:t[0]&1024}),sm=t=>({currentPageIndex:t[5],pagesCount:t[10],showPage:t[15]}),Uv=t=>({}),um=t=>({showNextPage:t[14].showNextPage}),Hv=t=>({loaded:t[0]&64,currentPageIndex:t[0]&32}),am=t=>({loaded:t[6],currentPageIndex:t[5]}),zv=t=>({}),fm=t=>({showPrevPage:t[14].showPrevPage});function cm(t){let e;const n=t[37].prev,i=Ut(n,t,t[36],fm),l=i||jv(t);return{c(){l&&l.c()},m(r,o){l&&l.m(r,o),e=!0},p(r,o){i?i.p&&(!e||o[1]&32)&&zt(i,n,r,r[36],e?Ht(n,r[36],o,zv):jt(r[36]),fm):l&&l.p&&(!e||o[0]&36)&&l.p(r,e?o:[-1,-1])},i(r){e||(U(l,r),e=!0)},o(r){Z(l,r),e=!1},d(r){l&&l.d(r)}}}function jv(t){let e,n,i;return n=new zg({props:{direction:"prev",disabled:!t[2]&&t[5]===0}}),n.$on("click",t[23]),{c(){e=v("div"),We(n.$$.fragment),m(e,"class","sc-carousel__arrow-container svelte-uwo0yk")},m(l,r){A(l,e,r),je(n,e,null),i=!0},p(l,r){const o={};r[0]&36&&(o.disabled=!l[2]&&l[5]===0),n.$set(o)},i(l){i||(U(n.$$.fragment,l),i=!0)},o(l){Z(n.$$.fragment,l),i=!1},d(l){l&&C(e),qe(n)}}}function dm(t){let e,n,i;return n=new X3({props:{value:t[7]}}),{c(){e=v("div"),We(n.$$.fragment),m(e,"class","sc-carousel-progress__container svelte-uwo0yk")},m(l,r){A(l,e,r),je(n,e,null),i=!0},p(l,r){const o={};r[0]&128&&(o.value=l[7]),n.$set(o)},i(l){i||(U(n.$$.fragment,l),i=!0)},o(l){Z(n.$$.fragment,l),i=!1},d(l){l&&C(e),qe(n)}}}function hm(t){let e;const n=t[37].next,i=Ut(n,t,t[36],um),l=i||qv(t);return{c(){l&&l.c()},m(r,o){l&&l.m(r,o),e=!0},p(r,o){i?i.p&&(!e||o[1]&32)&&zt(i,n,r,r[36],e?Ht(n,r[36],o,Uv):jt(r[36]),um):l&&l.p&&(!e||o[0]&1060)&&l.p(r,e?o:[-1,-1])},i(r){e||(U(l,r),e=!0)},o(r){Z(l,r),e=!1},d(r){l&&l.d(r)}}}function qv(t){let e,n,i;return n=new zg({props:{direction:"next",disabled:!t[2]&&t[5]===t[10]-1}}),n.$on("click",t[14].showNextPage),{c(){e=v("div"),We(n.$$.fragment),m(e,"class","sc-carousel__arrow-container svelte-uwo0yk")},m(l,r){A(l,e,r),je(n,e,null),i=!0},p(l,r){const o={};r[0]&1060&&(o.disabled=!l[2]&&l[5]===l[10]-1),n.$set(o)},i(l){i||(U(n.$$.fragment,l),i=!0)},o(l){Z(n.$$.fragment,l),i=!1},d(l){l&&C(e),qe(n)}}}function gm(t){let e;const n=t[37].dots,i=Ut(n,t,t[36],sm),l=i||Wv(t);return{c(){l&&l.c()},m(r,o){l&&l.m(r,o),e=!0},p(r,o){i?i.p&&(!e||o[0]&1056|o[1]&32)&&zt(i,n,r,r[36],e?Ht(n,r[36],o,Bv):jt(r[36]),sm):l&&l.p&&(!e||o[0]&1056)&&l.p(r,e?o:[-1,-1])},i(r){e||(U(l,r),e=!0)},o(r){Z(l,r),e=!1},d(r){l&&l.d(r)}}}function Wv(t){let e,n;return e=new q3({props:{pagesCount:t[10],currentPageIndex:t[5]}}),e.$on("pageChange",t[41]),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&1024&&(r.pagesCount=i[10]),l[0]&32&&(r.currentPageIndex=i[5]),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function Gv(t){let e,n,i,l,r,o,u,s,a,f,c,g,h=t[1]&&cm(t);const d=t[37].default,_=Ut(d,t,t[36],am);let b=t[3]&&dm(t),w=t[1]&&hm(t),E=t[4]&&gm(t);return{c(){e=v("div"),n=v("div"),h&&h.c(),i=Q(),l=v("div"),r=v("div"),_&&_.c(),u=Q(),b&&b.c(),s=Q(),w&&w.c(),a=Q(),E&&E.c(),m(r,"class","sc-carousel__pages-container svelte-uwo0yk"),P(r,"transform","translateX("+t[8]+"px)"),P(r,"transition-duration",t[9]+"ms"),P(r,"transition-timing-function",t[0]),m(l,"class","sc-carousel__pages-window svelte-uwo0yk"),m(n,"class","sc-carousel__content-container svelte-uwo0yk"),m(e,"class","sc-carousel__carousel-container svelte-uwo0yk")},m(k,I){A(k,e,I),S(e,n),h&&h.m(n,null),S(n,i),S(n,l),S(l,r),_&&_.m(r,null),t[39](r),S(l,u),b&&b.m(l,null),t[40](l),S(n,s),w&&w.m(n,null),S(e,a),E&&E.m(e,null),f=!0,c||(g=[tn(o=iE.call(null,r,{thresholdProvider:t[38]})),B(r,"swipeStart",t[16]),B(r,"swipeMove",t[18]),B(r,"swipeEnd",t[19]),B(r,"swipeFailed",t[20]),B(r,"swipeThresholdReached",t[17]),tn(sE.call(null,l)),B(l,"hovered",t[21]),tn(dE.call(null,l)),B(l,"tapped",t[22])],c=!0)},p(k,I){k[1]?h?(h.p(k,I),I[0]&2&&U(h,1)):(h=cm(k),h.c(),U(h,1),h.m(n,i)):h&&(He(),Z(h,1,1,()=>{h=null}),ze()),_&&_.p&&(!f||I[0]&96|I[1]&32)&&zt(_,d,k,k[36],f?Ht(d,k[36],I,Hv):jt(k[36]),am),(!f||I[0]&256)&&P(r,"transform","translateX("+k[8]+"px)"),(!f||I[0]&512)&&P(r,"transition-duration",k[9]+"ms"),(!f||I[0]&1)&&P(r,"transition-timing-function",k[0]),o&&Ge(o.update)&&I[0]&2048&&o.update.call(null,{thresholdProvider:k[38]}),k[3]?b?(b.p(k,I),I[0]&8&&U(b,1)):(b=dm(k),b.c(),U(b,1),b.m(l,null)):b&&(He(),Z(b,1,1,()=>{b=null}),ze()),k[1]?w?(w.p(k,I),I[0]&2&&U(w,1)):(w=hm(k),w.c(),U(w,1),w.m(n,null)):w&&(He(),Z(w,1,1,()=>{w=null}),ze()),k[4]?E?(E.p(k,I),I[0]&16&&U(E,1)):(E=gm(k),E.c(),U(E,1),E.m(e,null)):E&&(He(),Z(E,1,1,()=>{E=null}),ze())},i(k){f||(U(h),U(_,k),U(b),U(w),U(E),f=!0)},o(k){Z(h),Z(_,k),Z(b),Z(w),Z(E),f=!1},d(k){k&&C(e),h&&h.d(),_&&_.d(k),t[39](null),b&&b.d(),t[40](null),w&&w.d(),E&&E.d(),c=!1,Ve(g)}}}function Yv(t,e,n){let{$$slots:i={},$$scope:l}=e,r=[],o,u,s=0,a=0,f=1;const[{data:c,progressManager:g},h,d]=Vv((te,ae)=>{gs({currentPageIndex:()=>n(5,o=ae),progressValue:()=>n(7,u=ae),offset:()=>n(8,s=ae),durationMs:()=>n(9,a=ae),pagesCount:()=>n(10,f=ae),loaded:()=>n(6,r=ae)})(te)}),_=le.createEventDispatcher();let{timingFunction:b="ease-in-out"}=e,{arrows:w=!0}=e,{infinite:E=!0}=e,{initialPageIndex:k=0}=e,{duration:I=500}=e,{autoplay:O=!1}=e,{autoplayDuration:D=3e3}=e,{autoplayDirection:N=Li}=e,{pauseOnFocus:M=!1}=e,{autoplayProgressVisible:V=!1}=e,{dots:W=!0}=e,{swiping:ne=!0}=e,{particlesToShow:H=1}=e,{particlesToScroll:$=1}=e;async function Y(te,ae){const de=ur(ae,"animated",!0);if(typeof te!="number")throw new Error("pageIndex should be a number");await h.showPage(te,{animated:de})}async function G(te){const ae=ur(te,"animated",!0);await h.showPrevPage({animated:ae})}async function oe(te){const ae=ur(te,"animated",!0);await h.showNextPage({animated:ae})}let ie=0,J,q;const j=yE(({width:te})=>{n(11,ie=te),c.particleWidth=ie/c.particlesToShow,kE({particlesContainerChildren:q.children,particleWidth:c.particleWidth}),h.offsetPage({animated:!1})});function K(){const{clonesToAppend:te,clonesToPrepend:ae}=EE({clonesCountHead:c.clonesCountHead,clonesCountTail:c.clonesCountTail,particlesContainerChildren:q.children});vE({particlesContainer:q,clonesToAppend:te,clonesToPrepend:ae})}le.onMount(()=>{(async()=>(await le.tick(),q&&J&&(c.particlesCountWithoutClones=q.children.length,await le.tick(),c.infinite&&K(),c.particlesCount=q.children.length,h.showPage(k,{animated:!1}),j.observe(J))))()}),le.onDestroy(()=>{j.disconnect(),g.reset()});async function x(te){await h.showPage(te,{animated:!0})}function X(){ne&&(c.durationMs=0)}async function F(te){ne&&await gs({[Li]:h.showNextPage,[zl]:h.showPrevPage})(te.detail.direction)}function R(te){ne&&(c.offset+=te.detail.dx)}function z(){ne&&h.showParticle(c.currentParticleIndex)}async function me(){ne&&await h.offsetPage({animated:!0})}function se(te){c.focused=te.detail.value}function Oe(){h.toggleFocused()}function be(){h.showPrevPage()}const Ie=()=>ie/3;function ve(te){Be[te?"unshift":"push"](()=>{q=te,n(13,q)})}function fe(te){Be[te?"unshift":"push"](()=>{J=te,n(12,J)})}const Ne=te=>x(te.detail);return t.$$set=te=>{"timingFunction"in te&&n(0,b=te.timingFunction),"arrows"in te&&n(1,w=te.arrows),"infinite"in te&&n(2,E=te.infinite),"initialPageIndex"in te&&n(24,k=te.initialPageIndex),"duration"in te&&n(25,I=te.duration),"autoplay"in te&&n(26,O=te.autoplay),"autoplayDuration"in te&&n(27,D=te.autoplayDuration),"autoplayDirection"in te&&n(28,N=te.autoplayDirection),"pauseOnFocus"in te&&n(29,M=te.pauseOnFocus),"autoplayProgressVisible"in te&&n(3,V=te.autoplayProgressVisible),"dots"in te&&n(4,W=te.dots),"swiping"in te&&n(30,ne=te.swiping),"particlesToShow"in te&&n(31,H=te.particlesToShow),"particlesToScroll"in te&&n(32,$=te.particlesToScroll),"$$scope"in te&&n(36,l=te.$$scope)},t.$$.update=()=>{t.$$.dirty[0]&32&&_("pageChange",o),t.$$.dirty[0]&4&&(c.infinite=E),t.$$.dirty[0]&33554432&&(c.durationMsInit=I),t.$$.dirty[0]&67108864&&(c.autoplay=O),t.$$.dirty[0]&134217728&&(c.autoplayDuration=D),t.$$.dirty[0]&268435456&&(c.autoplayDirection=N),t.$$.dirty[0]&536870912&&(c.pauseOnFocus=M),t.$$.dirty[1]&1&&(c.particlesToShowInit=H),t.$$.dirty[1]&2&&(c.particlesToScrollInit=$)},[b,w,E,V,W,o,r,u,s,a,f,ie,J,q,h,x,X,F,R,z,me,se,Oe,be,k,I,O,D,N,M,ne,H,$,Y,G,oe,l,i,Ie,ve,fe,Ne]}class Kv extends Ze{constructor(e){super(),Qe(this,e,Yv,Gv,Ye,{timingFunction:0,arrows:1,infinite:2,initialPageIndex:24,duration:25,autoplay:26,autoplayDuration:27,autoplayDirection:28,pauseOnFocus:29,autoplayProgressVisible:3,dots:4,swiping:30,particlesToShow:31,particlesToScroll:32,goTo:33,goToPrev:34,goToNext:35},null,[-1,-1])}get goTo(){return this.$$.ctx[33]}get goToPrev(){return this.$$.ctx[34]}get goToNext(){return this.$$.ctx[35]}}function mm(t,e,n){const i=t.slice();return i[56]=e[n],i[58]=n,i}function Xv(t){let e,n=t[20]&&_m(t);return{c(){e=v("div"),n&&n.c(),m(e,"class","slider-placeholder svelte-1ayurke")},m(i,l){A(i,e,l),n&&n.m(e,null)},p(i,l){i[20]?n?n.p(i,l):(n=_m(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},i:ue,o:ue,d(i){i&&C(e),n&&n.d()}}}function Qv(t){let e=t[12],n,i,l=wm(t);return{c(){l.c(),n=Fe()},m(r,o){l.m(r,o),A(r,n,o),i=!0},p(r,o){o[0]&4096&&Ye(e,e=r[12])?(He(),Z(l,1,1,ue),ze(),l=wm(r),l.c(),U(l,1),l.m(n.parentNode,n)):l.p(r,o)},i(r){i||(U(l),i=!0)},o(r){Z(l),i=!1},d(r){r&&C(n),l.d(r)}}}function _m(t){let e,n,i,l,r,o;return{c(){e=v("button"),n=v("i"),i=Ee(`
|
|
26
|
-
Upload Attachment`),m(n,"class","ph ph-plus"),m(e,"class","btn-upload-empty svelte-1ayurke"),m(e,"aria-label","Upload attachment"),m(e,"type","button"),e.disabled=l=t[0].disabled||t[0].readonly},m(u,s){A(u,e,s),S(e,n),S(e,i),r||(o=B(e,"click",t[23]),r=!0)},p(u,s){s[0]&1&&l!==(l=u[0].disabled||u[0].readonly)&&(e.disabled=l)},d(u){u&&C(e),r=!1,o()}}}function Zv(t){var a;let e,n,i=((a=t[56].extension)==null?void 0:a.toUpperCase())+"",l,r,o,u=t[56].name+"",s;return{c(){e=v("div"),n=v("div"),l=Ee(i),r=Q(),o=v("span"),s=Ee(u),m(n,"class","pill svelte-1ayurke"),m(o,"class","filename svelte-1ayurke"),m(e,"class","slider-fallback svelte-1ayurke")},m(f,c){A(f,e,c),S(e,n),S(n,l),S(e,r),S(e,o),S(o,s)},p(f,c){var g;c[0]&4&&i!==(i=((g=f[56].extension)==null?void 0:g.toUpperCase())+"")&&Pe(l,i),c[0]&4&&u!==(u=f[56].name+"")&&Pe(s,u)},i:ue,o:ue,d(f){f&&C(e)}}}function Jv(t){let e,n,i,l=t[17]&&pm(t);return{c(){e=v("div"),l&&l.c(),m(e,"class","slider-image svelte-1ayurke"),P(e,"background-image","url('"+t[56].url+"')"),m(e,"aria-label",n=t[56].name),p(e,"selected",t[7].has(t[58]))},m(r,o){A(r,e,o),l&&l.m(e,null),i=!0},p(r,o){r[17]?l?(l.p(r,o),o[0]&131072&&U(l,1)):(l=pm(r),l.c(),U(l,1),l.m(e,null)):l&&(He(),Z(l,1,1,()=>{l=null}),ze()),(!i||o[0]&4)&&P(e,"background-image","url('"+r[56].url+"')"),(!i||o[0]&4&&n!==(n=r[56].name))&&m(e,"aria-label",n),(!i||o[0]&132)&&p(e,"selected",r[7].has(r[58]))},i(r){i||(U(l),i=!0)},o(r){Z(l),i=!1},d(r){r&&C(e),l&&l.d()}}}function pm(t){let e,n;const i=t[34].default,l=Ut(i,t,t[44],null);return{c(){e=v("div"),l&&l.c(),m(e,"class","slot-container svelte-1ayurke")},m(r,o){A(r,e,o),l&&l.m(e,null),n=!0},p(r,o){l&&l.p&&(!n||o[1]&8192)&&zt(l,i,r,r[44],n?Ht(i,r[44],o,null):jt(r[44]),null)},i(r){n||(U(l,r),n=!0)},o(r){Z(l,r),n=!1},d(r){r&&C(e),l&&l.d(r)}}}function bm(t,e){let n,i,l,r,o,u,s,a;const f=[Jv,Zv],c=[];function g(d,_){return _[0]&4&&(i=null),i==null&&(i=!!km(d[56])),i?0:d[3]?-1:1}~(l=g(e,[-1,-1]))&&(r=c[l]=f[l](e));function h(){return e[35](e[58])}return{key:t,first:null,c(){n=v("div"),r&&r.c(),o=Q(),m(n,"class","slider-item svelte-1ayurke"),P(n,"height","100%"),this.first=n},m(d,_){A(d,n,_),~l&&c[l].m(n,null),S(n,o),u=!0,s||(a=B(n,"click",h),s=!0)},p(d,_){e=d;let b=l;l=g(e,_),l===b?~l&&c[l].p(e,_):(r&&(He(),Z(c[b],1,1,()=>{c[b]=null}),ze()),~l?(r=c[l],r?r.p(e,_):(r=c[l]=f[l](e),r.c()),U(r,1),r.m(n,o)):r=null)},i(d){u||(U(r),u=!0)},o(d){Z(r),u=!1},d(d){d&&C(n),~l&&c[l].d(),s=!1,a()}}}function xv(t){let e=[],n=new Map,i,l,r=Ce(t[2]);const o=u=>u[58];for(let u=0;u<r.length;u+=1){let s=mm(t,r,u),a=o(s);n.set(a,e[u]=bm(a,s))}return{c(){for(let u=0;u<e.length;u+=1)e[u].c();i=Fe()},m(u,s){for(let a=0;a<e.length;a+=1)e[a]&&e[a].m(u,s);A(u,i,s),l=!0},p(u,s){s[0]&33685644|s[1]&8192&&(r=Ce(u[2]),He(),e=Tt(e,s,o,1,u,r,n,i.parentNode,Di,bm,i,mm),ze())},i(u){if(!l){for(let s=0;s<r.length;s+=1)U(e[s]);l=!0}},o(u){for(let s=0;s<e.length;s+=1)Z(e[s]);l=!1},d(u){u&&C(i);for(let s=0;s<e.length;s+=1)e[s].d(u)}}}function $v(t){let e,n,i;return{c(){e=v("div"),e.innerHTML='<i class="ph ph-caret-left"></i>',m(e,"slot","prev"),m(e,"class","slider-navbutton svelte-1ayurke")},m(l,r){A(l,e,r),n||(i=B(e,"click",function(){Ge(t[55])&&t[55].apply(this,arguments)}),n=!0)},p(l,r){t=l},d(l){l&&C(e),n=!1,i()}}}function eS(t){let e,n,i;return{c(){e=v("div"),e.innerHTML='<i class="ph ph-caret-right"></i>',m(e,"slot","next"),m(e,"class","slider-navbutton svelte-1ayurke")},m(l,r){A(l,e,r),n||(i=B(e,"click",function(){Ge(t[54])&&t[54].apply(this,arguments)}),n=!0)},p(l,r){t=l},d(l){l&&C(e),n=!1,i()}}}function wm(t){let e,n;return e=new Kv({props:{particlesToShow:t[12],particlesToScroll:t[11],dots:t[16]&&!t[10],arrows:t[15]&&!t[10],infinite:t[14],autoplay:t[13]||t[10],height:"100%",$$slots:{next:[eS,({showNextPage:i})=>({54:i}),({showNextPage:i})=>[0,i?8388608:0]],prev:[$v,({showPrevPage:i})=>({55:i}),({showPrevPage:i})=>[0,i?16777216:0]],default:[xv]},$$scope:{ctx:t}}}),{c(){We(e.$$.fragment)},m(i,l){je(e,i,l),n=!0},p(i,l){const r={};l[0]&4096&&(r.particlesToShow=i[12]),l[0]&2048&&(r.particlesToScroll=i[11]),l[0]&66560&&(r.dots=i[16]&&!i[10]),l[0]&33792&&(r.arrows=i[15]&&!i[10]),l[0]&16384&&(r.infinite=i[14]),l[0]&9216&&(r.autoplay=i[13]||i[10]),l[0]&131212|l[1]&25174016&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){n||(U(e.$$.fragment,i),n=!0)},o(i){Z(e.$$.fragment,i),n=!1},d(i){qe(e,i)}}}function tS(t){let e,n,i,l,r,o,u,s,a,f,c,g,h,d,_;const b=[Qv,Xv],w=[];function E(M,V){var W;return(W=M[2])!=null&&W.length?0:M[3]?-1:1}~(i=E(t))&&(l=w[i]=b[i](t));function k(M){t[37](M)}function I(M){t[38](M)}function O(M){t[39](M)}function D(M){t[40](M)}let N={canSelect:t[19],canDelete:t[18]};return t[2]!==void 0&&(N.items=t[2]),t[8]!==void 0&&(N.open=t[8]),t[9]!==void 0&&(N.currentIndex=t[9]),t[7]!==void 0&&(N.selectedIndices=t[7]),s=new ls({props:N}),Be.push(()=>Gt(s,"items",k)),Be.push(()=>Gt(s,"open",I)),Be.push(()=>Gt(s,"currentIndex",O)),Be.push(()=>Gt(s,"selectedIndices",D)),s.$on("close",t[41]),s.$on("delete",t[42]),{c(){e=v("div"),n=v("div"),l&&l.c(),r=Q(),o=v("input"),u=Q(),We(s.$$.fragment),m(n,"class","slider svelte-1ayurke"),m(o,"type","file"),o.multiple=t[4],P(o,"display","none"),m(e,"class","superCell"),m(e,"tabindex","0"),p(e,"multirow",!0),p(e,"inEdit",t[21]=="Editing"),p(e,"inline",t[0].role=="tableCell"),p(e,"tableCell",t[0].role=="tableCell"),p(e,"formInput",t[0].role=="formInput"),p(e,"disabled",t[0].disabled),p(e,"readonly",t[0].readonly),P(e,"color",t[0].color),P(e,"background",t[0].background),P(e,"overflow","hidden")},m(M,V){A(M,e,V),S(e,n),~i&&w[i].m(n,null),S(e,r),S(e,o),t[36](o),S(e,u),je(s,e,null),t[43](e),h=!0,d||(_=[B(o,"change",t[24]),B(e,"focusin",function(){Ge(t[1].focus)&&t[1].focus.apply(this,arguments)}),B(e,"focusout",function(){Ge(t[1].focousout)&&t[1].focousout.apply(this,arguments)})],d=!0)},p(M,V){t=M;let W=i;i=E(t),i===W?~i&&w[i].p(t,V):(l&&(He(),Z(w[W],1,1,()=>{w[W]=null}),ze()),~i?(l=w[i],l?l.p(t,V):(l=w[i]=b[i](t),l.c()),U(l,1),l.m(n,null)):l=null),(!h||V[0]&16)&&(o.multiple=t[4]);const ne={};V[0]&524288&&(ne.canSelect=t[19]),V[0]&262144&&(ne.canDelete=t[18]),!a&&V[0]&4&&(a=!0,ne.items=t[2],Wt(()=>a=!1)),!f&&V[0]&256&&(f=!0,ne.open=t[8],Wt(()=>f=!1)),!c&&V[0]&512&&(c=!0,ne.currentIndex=t[9],Wt(()=>c=!1)),!g&&V[0]&128&&(g=!0,ne.selectedIndices=t[7],Wt(()=>g=!1)),s.$set(ne),(!h||V[0]&2097152)&&p(e,"inEdit",t[21]=="Editing"),(!h||V[0]&1)&&p(e,"inline",t[0].role=="tableCell"),(!h||V[0]&1)&&p(e,"tableCell",t[0].role=="tableCell"),(!h||V[0]&1)&&p(e,"formInput",t[0].role=="formInput"),(!h||V[0]&1)&&p(e,"disabled",t[0].disabled),(!h||V[0]&1)&&p(e,"readonly",t[0].readonly),V[0]&1&&P(e,"color",t[0].color),V[0]&1&&P(e,"background",t[0].background)},i(M){h||(U(l),U(s.$$.fragment,M),h=!0)},o(M){Z(l),Z(s.$$.fragment,M),h=!1},d(M){M&&C(e),~i&&w[i].d(),t[36](null),qe(s),t[43](null),d=!1,Ve(_)}}}let nS=0;function km(t){var n;return["jpg","jpeg","png","gif","bmp","webp"].includes((n=t.extension)==null?void 0:n.toLowerCase())}function iS(t,e,n){let i,l,r,o,u,s,a,f,c,g,h,d,_,b,w,E,k,I,O=ue,D=()=>(O(),O=ft(K,Se=>n(21,I=Se)),K);t.$$.on_destroy.push(()=>O());let{$$slots:N={},$$scope:M}=e,{value:V}=e,{cellOptions:W}=e,{fieldSchema:ne}=e,{tableid:H}=e,{API:$}=e,{inBuilder:Y}=e,{height:G}=e;const oe=le.createEventDispatcher();let ie=V,J,q,j=new Set,{cellState:K=Ft(W.initialState??"View",{"*":{goTo(Se){return Se}},View:{_enter(){},focus(){if(!W.readonly)return"Editing"}},Editing:{_enter(){ie=V,J==null||J.focus(),oe("enteredit")},_exit(){oe("exitedit")},focousout(Se){if(!(J!=null&&J.contains(Se.relatedTarget)))return"View"},change(Se){W.debounce&&oe("change",V)},submit(Se){return V!==ie&&oe("change",V),oe("focusout"),"View"},cancel(){return n(26,V=ie),"View"}}})}=e;D();const x=async Se=>{let Le=new FormData;for(let rt=0;rt<Se.length;rt++)Le.append("file",Se[rt]);try{let rt=await $.uploadAttachment(H,Le);return oe("change",[...l,...rt]),rt}catch(rt){return console.error("Upload failed:",rt),[]}};function X(Se){l.splice(Se,1),n(2,l=[...l]),oe("change",l)}function F(Se){const Le=new Set(j);Le.has(Se)?Le.delete(Se):Le.add(Se),n(7,j=Le)}function R(){q&&q.click()}function z(Se){const Le=Se.target,rt=Array.from(Le.files||[]);x(rt)}let me=!1,se=0;function Oe(Se){var Le;if(!(!k||k==="none")){if(k==="view")be(Se);else if(k==="select")F(Se);else if(k==="custom"){let rt=l[Se];(Le=W.onItemClick)==null||Le.call(W,{item:rt,index:Se})}}}function be(Se=nS){!u&&!Y&&(l!=null&&l[Se])&&km(l[Se])&&(n(9,se=Se),n(8,me=!0))}const Ie=Se=>{Oe(Se)};function ve(Se){Be[Se?"unshift":"push"](()=>{q=Se,n(6,q)})}function fe(Se){l=Se,n(2,l),n(26,V),n(4,i),n(27,ne)}function Ne(Se){me=Se,n(8,me)}function te(Se){se=Se,n(9,se)}function ae(Se){j=Se,n(7,j)}const de=()=>console.log("lightbox closed"),Xe=Se=>{X(Se.detail.index)};function Te(Se){Be[Se?"unshift":"push"](()=>{J=Se,n(5,J)})}return t.$$set=Se=>{"value"in Se&&n(26,V=Se.value),"cellOptions"in Se&&n(0,W=Se.cellOptions),"fieldSchema"in Se&&n(27,ne=Se.fieldSchema),"tableid"in Se&&n(28,H=Se.tableid),"API"in Se&&n(29,$=Se.API),"inBuilder"in Se&&n(30,Y=Se.inBuilder),"height"in Se&&n(31,G=Se.height),"cellState"in Se&&D(n(1,K=Se.cellState)),"$$scope"in Se&&n(44,M=Se.$$scope)},t.$$.update=()=>{var Se;t.$$.dirty[0]&134217728&&n(4,i=((Se=ne==null?void 0:ne.type)==null?void 0:Se.includes("single"))!==!0),t.$$.dirty[0]&67108880&&n(2,l=V&&i?V:V?[V]:[]),t.$$.dirty[0]&1&&n(20,r=!W.readonly&&!W.disabled),t.$$.dirty[0]&1&&n(3,o=W.isGallery),t.$$.dirty[0]&1&&n(32,u=W.disabled),t.$$.dirty[0]&1&&n(33,s=W.readonly),t.$$.dirty[0]&8|t.$$.dirty[1]&6&&n(19,a=!s&&!u&&!o),t.$$.dirty[0]&8|t.$$.dirty[1]&6&&n(18,f=!s&&!u&&!o),t.$$.dirty[0]&1&&n(17,c=W.slotted),t.$$.dirty[0]&5&&n(16,g=W.carouselDots!==void 0?W.carouselDots:(l==null?void 0:l.length)>1),t.$$.dirty[0]&5&&n(15,h=W.carouselArrows!==void 0?W.carouselArrows:(l==null?void 0:l.length)>1),t.$$.dirty[0]&5&&n(14,d=W.carouselInfinite!==void 0?W.carouselInfinite:(l==null?void 0:l.length)>1),t.$$.dirty[0]&1&&n(13,_=W.carouselAutoplay!==void 0?W.carouselAutoplay:!1),t.$$.dirty[0]&1&&W.carouselAutoplaySpeed!==void 0&&W.carouselAutoplaySpeed,t.$$.dirty[0]&1&&n(12,b=W.carouselItemsToShow!==void 0?W.carouselItemsToShow:3),t.$$.dirty[0]&1&&n(11,w=W.carouselItemsToScroll!==void 0?W.carouselItemsToScroll:1),t.$$.dirty[0]&1&&n(10,E=W.carouselMode==="marquee"),t.$$.dirty[0]&1&&(k=W.onClickAction)},[W,K,l,o,i,J,q,j,me,se,E,w,b,_,d,h,g,c,f,a,r,I,X,R,z,Oe,V,ne,H,$,Y,G,u,s,N,Ie,ve,fe,Ne,te,ae,de,Xe,Te,M]}class lS extends Ze{constructor(e){super(),Qe(this,e,iS,tS,Ye,{value:26,cellOptions:0,fieldSchema:27,tableid:28,API:29,inBuilder:30,height:31,cellState:1},null,[-1,-1])}}function ks({target:t}){t.style.height="1px",t.style.height=+t.scrollHeight+"px"}function rS(t){return ks({target:t}),t.style.overflow="hidden",t.addEventListener("input",ks),{destroy:()=>t.removeEventListener("input",ks)}}ct.CellAttachment=ns,ct.CellAttachmentExpanded=V3,ct.CellAttachmentSlider=lS,ct.CellBoolean=Yo,ct.CellColor=O2,ct.CellDateRange=B2,ct.CellDatetime=$o,ct.CellIcon=iy,ct.CellJSON=ts,ct.CellLink=Zr,ct.CellLinkAdvanced=Ry,ct.CellLinkPickerSelect=Zc,ct.CellLinkPickerTree=Qr,ct.CellNumber=or,ct.CellOptions=rl,ct.CellOptionsAdvanced=Qy,ct.CellSQLLink=Cy,ct.CellSkeleton=j1,ct.CellString=kn,ct.CellStringMask=m3,ct.CellStringSimple=Go,ct.CellTags=v3,ct.SuperButton=el,ct.SuperField=n_,ct.SuperForm=gp,ct.SuperLightbox=ls,ct.SuperList=bf,ct.SuperPopover=wn,ct.SuperTable=w2,ct.SuperTableColumn=is,ct.SuperTabs=E2,ct.SuperTree=es,ct.autoresizeTextarea=rS,ct.clickOutside=yf,ct.defaultOperatorMap=Tf,ct.positionDropdown=wf,Object.defineProperty(ct,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(dt,Se){typeof exports=="object"&&typeof module<"u"?Se(exports,require("svelte")):typeof define=="function"&&define.amd?define(["exports","svelte"],Se):(dt=typeof globalThis<"u"?globalThis:dt||self,Se(dt.SupercomponentsShared={},dt.Svelte))})(this,function(dt,Se){"use strict";var hA=Object.defineProperty;var Jh=dt=>{throw TypeError(dt)};var gA=(dt,Se,Ar)=>Se in dt?hA(dt,Se,{enumerable:!0,configurable:!0,writable:!0,value:Ar}):dt[Se]=Ar;var pi=(dt,Se,Ar)=>gA(dt,typeof Se!="symbol"?Se+"":Se,Ar),Du=(dt,Se,Ar)=>Se.has(dt)||Jh("Cannot "+Ar);var pt=(dt,Se,Ar)=>(Du(dt,Se,"read from private field"),Ar?Ar.call(dt):Se.get(dt)),Cr=(dt,Se,Ar)=>Se.has(dt)?Jh("Cannot add the same private member more than once"):Se instanceof WeakSet?Se.add(dt):Se.set(dt,Ar),Di=(dt,Se,Ar,xi)=>(Du(dt,Se,"write to private field"),xi?xi.call(dt,Ar):Se.set(dt,Ar),Ar),jn=(dt,Se,Ar)=>(Du(dt,Se,"access private method"),Ar);var Hh,Ga,qa,ha,ga,ks,Wa,Ya,Gr,xu,Rs,Ou,$h,eg,Qn,ci,An,va,Ds,xs,zo,Hi,Ka,Os,jo,tg;const Ar="5";typeof window<"u"&&((Hh=window.__svelte??(window.__svelte={})).v??(Hh.v=new Set)).add(Ar);let xi=!1,rg=!1;function ng(){xi=!0}ng();const ig=1,ag=2,Iu=4,sg=8,og=16,lg=1,ug=2,cg=4,dg=8,fg=16,hg=4,gg=1,vg=2,Xr=Symbol(),pg="http://www.w3.org/1999/xhtml",Wo=!1;var Ps=Array.isArray,mg=Array.prototype.indexOf,Yo=Array.from,Ru=Object.defineProperty,qi=Object.getOwnPropertyDescriptor,Pu=Object.getOwnPropertyDescriptors,_g=Object.prototype,bg=Array.prototype,Ko=Object.getPrototypeOf;function wa(e){return typeof e=="function"}const fn=()=>{};function yg(e){return e()}function Ms(e){for(var r=0;r<e.length;r++)e[r]()}function Mu(){var e,r,n=new Promise((i,s)=>{e=i,r=s});return{promise:n,resolve:e,reject:r}}function wg(e,r){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const n=[];for(const i of e)if(n.push(i),n.length===r)break;return n}const Ur=2,Xo=4,Ns=8,Eg=1<<24,ti=16,mi=32,Ea=64,Qo=128,Gn=512,Br=1024,hn=2048,qn=4096,wn=8192,_i=16384,Ls=32768,Wi=65536,Nu=1<<17,Lu=1<<18,Fs=1<<19,Fu=1<<20,bi=1<<25,Yi=32768,Zo=1<<21,Jo=1<<22,Oi=1<<23,ri=Symbol("$state"),Vu=Symbol("legacy props"),Sg=Symbol(""),Sa=new class extends Error{constructor(){super(...arguments);pi(this,"name","StaleReactionError");pi(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Cg(){throw new Error("https://svelte.dev/e/invalid_default_snippet")}function Ag(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Tg(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function kg(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Dg(e){throw new Error("https://svelte.dev/e/effect_orphan")}function xg(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Og(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Ig(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Rg(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Pg(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Mg(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Uu(e){return e===this.v}function $o(e,r){return e!=e?r==r:e!==r||e!==null&&typeof e=="object"||typeof e=="function"}function Bu(e){return!$o(e,this.v)}let Rr=null;function Vs(e){Rr=e}function St(e,r=!1,n){Rr={p:Rr,i:!1,c:null,e:null,s:e,x:null,l:xi&&!r?{s:null,u:null,$:[]}:null}}function Ct(e){var r=Rr,n=r.e;if(n!==null){r.e=null;for(var i of n)rc(i)}return e!==void 0&&(r.x=e),r.i=!0,Rr=r.p,e??{}}function Ca(){return!xi||Rr!==null&&Rr.l===null}let Ki=[];function Hu(){var e=Ki;Ki=[],Ms(e)}function Za(e){if(Ki.length===0&&!Ja){var r=Ki;queueMicrotask(()=>{r===Ki&&Hu()})}Ki.push(e)}function Ng(){for(;Ki.length>0;)Hu()}function Lg(e){var r=rr;if(r===null)return $t.f|=Oi,e;if(r.f&Ls)Us(e,r);else{if(!(r.f&Qo))throw e;r.b.error(e)}}function Us(e,r){for(;r!==null;){if(r.f&Qo)try{r.b.error(e);return}catch(n){e=n}r=r.parent}throw e}const Bs=new Set;let Kt=null,Hs=null,br=null,On=[],zs=null,el=!1,Ja=!1;const Ho=class Ho{constructor(){Cr(this,Gr);pi(this,"committed",!1);pi(this,"current",new Map);pi(this,"previous",new Map);Cr(this,Ga,new Set);Cr(this,qa,new Set);Cr(this,ha,0);Cr(this,ga,0);Cr(this,ks,null);Cr(this,Wa,new Set);Cr(this,Ya,new Set);pi(this,"skipped_effects",new Set);pi(this,"is_fork",!1)}is_deferred(){return this.is_fork||pt(this,ga)>0}process(r){var i;On=[],Hs=null,this.apply();var n={parent:null,effect:null,effects:[],render_effects:[]};for(const s of r)jn(this,Gr,xu).call(this,s,n);this.is_fork||jn(this,Gr,$h).call(this),this.is_deferred()?(jn(this,Gr,Rs).call(this,n.effects),jn(this,Gr,Rs).call(this,n.render_effects)):(Hs=this,Kt=null,ju(n.render_effects),ju(n.effects),Hs=null,(i=pt(this,ks))==null||i.resolve()),br=null}capture(r,n){this.previous.has(r)||this.previous.set(r,n),r.f&Oi||(this.current.set(r,r.v),br==null||br.set(r,r.v))}activate(){Kt=this,this.apply()}deactivate(){Kt===this&&(Kt=null,br=null)}flush(){if(this.activate(),On.length>0){if(zu(),Kt!==null&&Kt!==this)return}else pt(this,ha)===0&&this.process([]);this.deactivate()}discard(){for(const r of pt(this,qa))r(this);pt(this,qa).clear()}increment(r){Di(this,ha,pt(this,ha)+1),r&&Di(this,ga,pt(this,ga)+1)}decrement(r){Di(this,ha,pt(this,ha)-1),r&&Di(this,ga,pt(this,ga)-1),this.revive()}revive(){for(const r of pt(this,Wa))pt(this,Ya).delete(r),Hr(r,hn),Xi(r);for(const r of pt(this,Ya))Hr(r,qn),Xi(r);this.flush()}oncommit(r){pt(this,Ga).add(r)}ondiscard(r){pt(this,qa).add(r)}settled(){return(pt(this,ks)??Di(this,ks,Mu())).promise}static ensure(){if(Kt===null){const r=Kt=new Ho;Bs.add(Kt),Ja||Ho.enqueue(()=>{Kt===r&&r.flush()})}return Kt}static enqueue(r){Za(r)}apply(){}};Ga=new WeakMap,qa=new WeakMap,ha=new WeakMap,ga=new WeakMap,ks=new WeakMap,Wa=new WeakMap,Ya=new WeakMap,Gr=new WeakSet,xu=function(r,n){var c;r.f^=Br;for(var i=r.first;i!==null;){var s=i.f,a=(s&(mi|Ea))!==0,l=a&&(s&Br)!==0,d=l||(s&wn)!==0||this.skipped_effects.has(i);if(i.f&Qo&&((c=i.b)!=null&&c.is_pending())&&(n={parent:n,effect:i,effects:[],render_effects:[]}),!d&&i.fn!==null){a?i.f^=Br:s&Xo?n.effects.push(i):Da(i)&&(i.f&ti&&pt(this,Wa).add(i),xa(i));var u=i.first;if(u!==null){i=u;continue}}var g=i.parent;for(i=i.next;i===null&&g!==null;)g===n.effect&&(jn(this,Gr,Rs).call(this,n.effects),jn(this,Gr,Rs).call(this,n.render_effects),n=n.parent),i=g.next,g=g.parent}},Rs=function(r){for(const n of r)n.f&hn?pt(this,Wa).add(n):n.f&qn&&pt(this,Ya).add(n),jn(this,Gr,Ou).call(this,n.deps),Hr(n,Br)},Ou=function(r){if(r!==null)for(const n of r)!(n.f&Ur)||!(n.f&Yi)||(n.f^=Yi,jn(this,Gr,Ou).call(this,n.deps))},$h=function(){if(pt(this,ga)===0){for(const r of pt(this,Ga))r();pt(this,Ga).clear()}pt(this,ha)===0&&jn(this,Gr,eg).call(this)},eg=function(){var a;if(Bs.size>1){this.previous.clear();var r=br,n=!0,i={parent:null,effect:null,effects:[],render_effects:[]};for(const l of Bs){if(l===this){n=!1;continue}const d=[];for(const[g,c]of this.current){if(l.current.has(g))if(n&&c!==l.current.get(g))l.current.set(g,c);else continue;d.push(g)}if(d.length===0)continue;const u=[...l.current.keys()].filter(g=>!this.current.has(g));if(u.length>0){var s=On;On=[];const g=new Set,c=new Map;for(const p of d)Gu(p,u,g,c);if(On.length>0){Kt=l,l.apply();for(const p of On)jn(a=l,Gr,xu).call(a,p,i);l.deactivate()}On=s}}Kt=null,br=r}this.committed=!0,Bs.delete(this)};let js=Ho;function Fg(e){var r=Ja;Ja=!0;try{for(var n;;){if(Ng(),On.length===0&&(Kt==null||Kt.flush(),On.length===0))return zs=null,n;zu()}}finally{Ja=r}}function zu(){var e=Zi;el=!0;var r=null;try{var n=0;for(Xs(!0);On.length>0;){var i=js.ensure();if(n++>1e3){var s,a;Vg()}i.process(On),Ii.clear()}}finally{el=!1,Xs(e),zs=null}}function Vg(){try{xg()}catch(e){Us(e,zs)}}let Wn=null;function ju(e){var r=e.length;if(r!==0){for(var n=0;n<r;){var i=e[n++];if(!(i.f&(_i|wn))&&Da(i)&&(Wn=new Set,xa(i),i.deps===null&&i.first===null&&i.nodes===null&&(i.teardown===null&&i.ac===null?ac(i):i.fn=null),(Wn==null?void 0:Wn.size)>0)){Ii.clear();for(const s of Wn){if(s.f&(_i|wn))continue;const a=[s];let l=s.parent;for(;l!==null;)Wn.has(l)&&(Wn.delete(l),a.push(l)),l=l.parent;for(let d=a.length-1;d>=0;d--){const u=a[d];u.f&(_i|wn)||xa(u)}}Wn.clear()}}Wn=null}}function Gu(e,r,n,i){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const a=s.f;a&Ur?Gu(s,r,n,i):a&(Jo|ti)&&!(a&hn)&&qu(s,r,i)&&(Hr(s,hn),Xi(s))}}function qu(e,r,n){const i=n.get(e);if(i!==void 0)return i;if(e.deps!==null)for(const s of e.deps){if(r.includes(s))return!0;if(s.f&Ur&&qu(s,r,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function Xi(e){for(var r=zs=e;r.parent!==null;){r=r.parent;var n=r.f;if(el&&r===rr&&n&ti&&!(n&Lu))return;if(n&(Ea|mi)){if(!(n&Br))return;r.f^=Br}}On.push(r)}function Ug(e,r,n,i){const s=Ca()?$a:Pt;if(n.length===0&&e.length===0){i(r.map(s));return}var a=Kt,l=rr,d=Bg();function u(){Promise.all(n.map(g=>Hg(g))).then(g=>{d();try{i([...r.map(s),...g])}catch(c){l.f&_i||Us(c,l)}a==null||a.deactivate(),Gs()}).catch(g=>{Us(g,l)})}e.length>0?Promise.all(e).then(()=>{d();try{return u()}finally{a==null||a.deactivate(),Gs()}}):u()}function Bg(){var e=rr,r=$t,n=Rr,i=Kt;return function(a=!0){Pi(e),ii(r),Vs(n),a&&(i==null||i.activate())}}function Gs(){Pi(null),ii(null),Vs(null)}function $a(e){var r=Ur|hn,n=$t!==null&&$t.f&Ur?$t:null;return rr!==null&&(rr.f|=Fs),{ctx:Rr,deps:null,effects:null,equals:Uu,f:r,fn:e,reactions:null,rv:0,v:Xr,wv:0,parent:n??rr,ac:null}}function Hg(e,r){let n=rr;n===null&&Ag();var i=n.b,s=void 0,a=ts(Xr),l=!$t,d=new Map;return Jg(()=>{var _;var u=Mu();s=u.promise;try{Promise.resolve(e()).then(u.resolve,u.reject).then(()=>{g===Kt&&g.committed&&g.deactivate(),Gs()})}catch(S){u.reject(S),Gs()}var g=Kt;if(l){var c=!i.is_pending();i.update_pending_count(1),g.increment(c),(_=d.get(g))==null||_.reject(Sa),d.delete(g),d.set(g,u)}const p=(S,y=void 0)=>{if(g.activate(),y)y!==Sa&&(a.f|=Oi,rs(a,y));else{a.f&Oi&&(a.f^=Oi),rs(a,S);for(const[T,I]of d){if(d.delete(T),T===g)break;I.reject(Sa)}}l&&(i.update_pending_count(-1),g.decrement(c))};u.promise.then(p,S=>p(null,S||"unknown"))}),is(()=>{for(const u of d.values())u.reject(Sa)}),new Promise(u=>{function g(c){function p(){c===s?u(a):g(s)}c.then(p,p)}g(s)})}function es(e){const r=$a(e);return uc(r),r}function Pt(e){const r=$a(e);return r.equals=Bu,r}function Wu(e){var r=e.effects;if(r!==null){e.effects=null;for(var n=0;n<r.length;n+=1)wi(r[n])}}function zg(e){for(var r=e.parent;r!==null;){if(!(r.f&Ur))return r.f&_i?null:r;r=r.parent}return null}function tl(e){var r,n=rr;Pi(zg(e));try{e.f&=~Yi,Wu(e),r=gc(e)}finally{Pi(n)}return r}function Yu(e){var r=tl(e);if(e.equals(r)||(Kt!=null&&Kt.is_fork||(e.v=r),e.wv=fc()),!Ji)if(br!==null)(Ys()||Kt!=null&&Kt.is_fork)&&br.set(e,r);else{var n=e.f&Gn?Br:qn;Hr(e,n)}}let rl=new Set;const Ii=new Map;let Ku=!1;function ts(e,r){var n={f:0,v:e,reactions:null,equals:Uu,rv:0,wv:0};return n}function Ri(e,r){const n=ts(e);return uc(n),n}function h(e,r=!1,n=!0){var s;const i=ts(e);return r||(i.equals=Bu),xi&&n&&Rr!==null&&Rr.l!==null&&((s=Rr.l).s??(s.s=[])).push(i),i}function zt(e,r){return o(e,b(()=>t(e))),r}function o(e,r,n=!1){$t!==null&&(!ni||$t.f&Nu)&&Ca()&&$t.f&(Ur|ti|Jo|Nu)&&!(nn!=null&&nn.includes(e))&&Pg();let i=n?Aa(r):r;return rs(e,i)}function rs(e,r){if(!e.equals(r)){var n=e.v;Ji?Ii.set(e,r):Ii.set(e,n),e.v=r;var i=js.ensure();i.capture(e,n),e.f&Ur&&(e.f&hn&&tl(e),Hr(e,e.f&Gn?Br:qn)),e.wv=fc(),Xu(e,hn),Ca()&&rr!==null&&rr.f&Br&&!(rr.f&(mi|Ea))&&(In===null?rv([e]):In.push(e)),!i.is_fork&&rl.size>0&&!Ku&&jg()}return r}function jg(){Ku=!1;var e=Zi;Xs(!0);const r=Array.from(rl);try{for(const n of r)n.f&Br&&Hr(n,qn),Da(n)&&xa(n)}finally{Xs(e)}rl.clear()}function nl(e){o(e,e.v+1)}function Xu(e,r){var n=e.reactions;if(n!==null)for(var i=Ca(),s=n.length,a=0;a<s;a++){var l=n[a],d=l.f;if(!(!i&&l===rr)){var u=(d&hn)===0;if(u&&Hr(l,r),d&Ur){var g=l;br==null||br.delete(g),d&Yi||(d&Gn&&(l.f|=Yi),Xu(g,qn))}else u&&(d&ti&&Wn!==null&&Wn.add(l),Xi(l))}}}function Aa(e){if(typeof e!="object"||e===null||ri in e)return e;const r=Ko(e);if(r!==_g&&r!==bg)return e;var n=new Map,i=Ps(e),s=Ri(0),a=$i,l=d=>{if($i===a)return d();var u=$t,g=$i;ii(null),dc(a);var c=d();return ii(u),dc(g),c};return i&&n.set("length",Ri(e.length)),new Proxy(e,{defineProperty(d,u,g){(!("value"in g)||g.configurable===!1||g.enumerable===!1||g.writable===!1)&&Ig();var c=n.get(u);return c===void 0?c=l(()=>{var p=Ri(g.value);return n.set(u,p),p}):o(c,g.value,!0),!0},deleteProperty(d,u){var g=n.get(u);if(g===void 0){if(u in d){const c=l(()=>Ri(Xr));n.set(u,c),nl(s)}}else o(g,Xr),nl(s);return!0},get(d,u,g){var S;if(u===ri)return e;var c=n.get(u),p=u in d;if(c===void 0&&(!p||(S=qi(d,u))!=null&&S.writable)&&(c=l(()=>{var y=Aa(p?d[u]:Xr),T=Ri(y);return T}),n.set(u,c)),c!==void 0){var _=t(c);return _===Xr?void 0:_}return Reflect.get(d,u,g)},getOwnPropertyDescriptor(d,u){var g=Reflect.getOwnPropertyDescriptor(d,u);if(g&&"value"in g){var c=n.get(u);c&&(g.value=t(c))}else if(g===void 0){var p=n.get(u),_=p==null?void 0:p.v;if(p!==void 0&&_!==Xr)return{enumerable:!0,configurable:!0,value:_,writable:!0}}return g},has(d,u){var _;if(u===ri)return!0;var g=n.get(u),c=g!==void 0&&g.v!==Xr||Reflect.has(d,u);if(g!==void 0||rr!==null&&(!c||(_=qi(d,u))!=null&&_.writable)){g===void 0&&(g=l(()=>{var S=c?Aa(d[u]):Xr,y=Ri(S);return y}),n.set(u,g));var p=t(g);if(p===Xr)return!1}return c},set(d,u,g,c){var D;var p=n.get(u),_=u in d;if(i&&u==="length")for(var S=g;S<p.v;S+=1){var y=n.get(S+"");y!==void 0?o(y,Xr):S in d&&(y=l(()=>Ri(Xr)),n.set(S+"",y))}if(p===void 0)(!_||(D=qi(d,u))!=null&&D.writable)&&(p=l(()=>Ri(void 0)),o(p,Aa(g)),n.set(u,p));else{_=p.v!==Xr;var T=l(()=>Aa(g));o(p,T)}var I=Reflect.getOwnPropertyDescriptor(d,u);if(I!=null&&I.set&&I.set.call(c,g),!_){if(i&&typeof u=="string"){var k=n.get("length"),C=Number(u);Number.isInteger(C)&&C>=k.v&&o(k,C+1)}nl(s)}return!0},ownKeys(d){t(s);var u=Reflect.ownKeys(d).filter(p=>{var _=n.get(p);return _===void 0||_.v!==Xr});for(var[g,c]of n)c.v!==Xr&&!(g in d)&&u.push(g);return u},setPrototypeOf(){Rg()}})}function Qu(e){try{if(e!==null&&typeof e=="object"&&ri in e)return e[ri]}catch{}return e}function Gg(e,r){return Object.is(Qu(e),Qu(r))}var qs,qg,Wg,Yg;function Qi(e=""){return document.createTextNode(e)}function Ws(e){return Wg.call(e)}function ns(e){return Yg.call(e)}function j(e,r){return Ws(e)}function Ge(e,r=!1){{var n=Ws(e);return n instanceof Comment&&n.data===""?ns(n):n}}function Ee(e,r=1,n=!1){let i=e;for(;r--;)i=ns(i);return i}function Kg(e){e.textContent=""}function Zu(){return!1}let Ju=!1;function Xg(){Ju||(Ju=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var r;if(!e.defaultPrevented)for(const n of e.target.elements)(r=n.__on_r)==null||r.call(n)})},{capture:!0}))}function Ta(e){var r=$t,n=rr;ii(null),Pi(null);try{return e()}finally{ii(r),Pi(n)}}function $u(e,r,n,i=n){e.addEventListener(r,()=>Ta(n));const s=e.__on_r;s?e.__on_r=()=>{s(),i(!0)}:e.__on_r=()=>i(!0),Xg()}function ec(e){rr===null&&($t===null&&Dg(),kg()),Ji&&Tg()}function Qg(e,r){var n=r.last;n===null?r.last=r.first=e:(n.next=e,e.prev=n,r.last=e)}function yi(e,r,n){var i=rr;i!==null&&i.f&wn&&(e|=wn);var s={ctx:Rr,deps:null,nodes:null,f:e|hn|Gn,first:null,fn:r,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{xa(s),s.f|=Ls}catch(d){throw wi(s),d}else r!==null&&Xi(s);var a=s;if(n&&a.deps===null&&a.teardown===null&&a.nodes===null&&a.first===a.last&&!(a.f&Fs)&&(a=a.first,e&ti&&e&Wi&&a!==null&&(a.f|=Wi)),a!==null&&(a.parent=i,i!==null&&Qg(a,i),$t!==null&&$t.f&Ur&&!(e&Ea))){var l=$t;(l.effects??(l.effects=[])).push(a)}return s}function Ys(){return $t!==null&&!ni}function is(e){const r=yi(Ns,null,!1);return Hr(r,Br),r.teardown=e,r}function tc(e){ec();var r=rr.f,n=!$t&&(r&mi)!==0&&(r&Ls)===0;if(n){var i=Rr;(i.e??(i.e=[])).push(e)}else return rc(e)}function rc(e){return yi(Xo|Fu,e,!1)}function Zg(e){return ec(),yi(Ns|Fu,e,!0)}function Ut(e){return yi(Xo,e,!1)}function x(e,r){var n=Rr,i={effect:null,ran:!1,deps:e};n.l.$.push(i),i.effect=ka(()=>{e(),!i.ran&&(i.ran=!0,b(r))})}function Mt(){var e=Rr;ka(()=>{for(var r of e.l.$){r.deps();var n=r.effect;n.f&Br&&Hr(n,qn),Da(n)&&xa(n),r.ran=!1}})}function Jg(e){return yi(Jo|Fs,e,!0)}function ka(e,r=0){return yi(Ns|r,e,!0)}function Ce(e,r=[],n=[],i=[]){Ug(i,r,n,s=>{yi(Ns,()=>e(...s.map(t)),!0)})}function Ks(e,r=0){var n=yi(ti|r,e,!0);return n}function as(e){return yi(mi|Fs,e,!0)}function nc(e){var r=e.teardown;if(r!==null){const n=Ji,i=$t;lc(!0),ii(null);try{r.call(null)}finally{lc(n),ii(i)}}}function ic(e,r=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&Ta(()=>{s.abort(Sa)});var i=n.next;n.f&Ea?n.parent=null:wi(n,r),n=i}}function $g(e){for(var r=e.first;r!==null;){var n=r.next;r.f&mi||wi(r),r=n}}function wi(e,r=!0){var n=!1;(r||e.f&Lu)&&e.nodes!==null&&e.nodes.end!==null&&(ev(e.nodes.start,e.nodes.end),n=!0),ic(e,r&&!n),Qs(e,0),Hr(e,_i);var i=e.nodes&&e.nodes.t;if(i!==null)for(const a of i)a.stop();nc(e);var s=e.parent;s!==null&&s.first!==null&&ac(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function ev(e,r){for(;e!==null;){var n=e===r?null:ns(e);e.remove(),e=n}}function ac(e){var r=e.parent,n=e.prev,i=e.next;n!==null&&(n.next=i),i!==null&&(i.prev=n),r!==null&&(r.first===e&&(r.first=i),r.last===e&&(r.last=n))}function il(e,r,n=!0){var i=[];sc(e,i,!0);var s=()=>{n&&wi(e),r&&r()},a=i.length;if(a>0){var l=()=>--a||s();for(var d of i)d.out(l)}else s()}function sc(e,r,n){if(!(e.f&wn)){e.f^=wn;var i=e.nodes&&e.nodes.t;if(i!==null)for(const d of i)(d.is_global||n)&&r.push(d);for(var s=e.first;s!==null;){var a=s.next,l=(s.f&Wi)!==0||(s.f&mi)!==0&&(e.f&ti)!==0;sc(s,r,l?n:!1),s=a}}}function al(e){oc(e,!0)}function oc(e,r){if(e.f&wn){e.f^=wn,e.f&Br||(Hr(e,hn),Xi(e));for(var n=e.first;n!==null;){var i=n.next,s=(n.f&Wi)!==0||(n.f&mi)!==0;oc(n,s?r:!1),n=i}var a=e.nodes&&e.nodes.t;if(a!==null)for(const l of a)(l.is_global||r)&&l.in()}}function tv(e,r){if(e.nodes)for(var n=e.nodes.start,i=e.nodes.end;n!==null;){var s=n===i?null:ns(n);r.append(n),n=s}}let Zi=!1;function Xs(e){Zi=e}let Ji=!1;function lc(e){Ji=e}let $t=null,ni=!1;function ii(e){$t=e}let rr=null;function Pi(e){rr=e}let nn=null;function uc(e){$t!==null&&(nn===null?nn=[e]:nn.push(e))}let an=null,En=0,In=null;function rv(e){In=e}let cc=1,ss=0,$i=ss;function dc(e){$i=e}function fc(){return++cc}function Da(e){var r=e.f;if(r&hn)return!0;if(r&Ur&&(e.f&=~Yi),r&qn){var n=e.deps;if(n!==null)for(var i=n.length,s=0;s<i;s++){var a=n[s];if(Da(a)&&Yu(a),a.wv>e.wv)return!0}r&Gn&&br===null&&Hr(e,Br)}return!1}function hc(e,r,n=!0){var i=e.reactions;if(i!==null&&!(nn!=null&&nn.includes(e)))for(var s=0;s<i.length;s++){var a=i[s];a.f&Ur?hc(a,r,!1):r===a&&(n?Hr(a,hn):a.f&Br&&Hr(a,qn),Xi(a))}}function gc(e){var y;var r=an,n=En,i=In,s=$t,a=nn,l=Rr,d=ni,u=$i,g=e.f;an=null,En=0,In=null,$t=g&(mi|Ea)?null:e,nn=null,Vs(e.ctx),ni=!1,$i=++ss,e.ac!==null&&(Ta(()=>{e.ac.abort(Sa)}),e.ac=null);try{e.f|=Zo;var c=e.fn,p=c(),_=e.deps;if(an!==null){var S;if(Qs(e,En),_!==null&&En>0)for(_.length=En+an.length,S=0;S<an.length;S++)_[En+S]=an[S];else e.deps=_=an;if(Ys()&&e.f&Gn)for(S=En;S<_.length;S++)((y=_[S]).reactions??(y.reactions=[])).push(e)}else _!==null&&En<_.length&&(Qs(e,En),_.length=En);if(Ca()&&In!==null&&!ni&&_!==null&&!(e.f&(Ur|qn|hn)))for(S=0;S<In.length;S++)hc(In[S],e);return s!==null&&s!==e&&(ss++,In!==null&&(i===null?i=In:i.push(...In))),e.f&Oi&&(e.f^=Oi),p}catch(T){return Lg(T)}finally{e.f^=Zo,an=r,En=n,In=i,$t=s,nn=a,Vs(l),ni=d,$i=u}}function nv(e,r){let n=r.reactions;if(n!==null){var i=mg.call(n,e);if(i!==-1){var s=n.length-1;s===0?n=r.reactions=null:(n[i]=n[s],n.pop())}}n===null&&r.f&Ur&&(an===null||!an.includes(r))&&(Hr(r,qn),r.f&Gn&&(r.f^=Gn,r.f&=~Yi),Wu(r),Qs(r,0))}function Qs(e,r){var n=e.deps;if(n!==null)for(var i=r;i<n.length;i++)nv(e,n[i])}function xa(e){var r=e.f;if(!(r&_i)){Hr(e,Br);var n=rr,i=Zi;rr=e,Zi=!0;try{r&(ti|Eg)?$g(e):ic(e),nc(e);var s=gc(e);e.teardown=typeof s=="function"?s:null,e.wv=cc;var a;Wo&&rg&&e.f&hn&&e.deps}finally{Zi=i,rr=n}}}async function iv(){await Promise.resolve(),Fg()}function t(e){var r=e.f,n=(r&Ur)!==0;if($t!==null&&!ni){var i=rr!==null&&(rr.f&_i)!==0;if(!i&&!(nn!=null&&nn.includes(e))){var s=$t.deps;if($t.f&Zo)e.rv<ss&&(e.rv=ss,an===null&&s!==null&&s[En]===e?En++:an===null?an=[e]:an.includes(e)||an.push(e));else{($t.deps??($t.deps=[])).push(e);var a=e.reactions;a===null?e.reactions=[$t]:a.includes($t)||a.push($t)}}}if(Ji){if(Ii.has(e))return Ii.get(e);if(n){var l=e,d=l.v;return(!(l.f&Br)&&l.reactions!==null||pc(l))&&(d=tl(l)),Ii.set(l,d),d}}else n&&(!(br!=null&&br.has(e))||Kt!=null&&Kt.is_fork&&!Ys())&&(l=e,Da(l)&&Yu(l),Zi&&Ys()&&!(l.f&Gn)&&vc(l));if(br!=null&&br.has(e))return br.get(e);if(e.f&Oi)throw e.v;return e.v}function vc(e){if(e.deps!==null){e.f^=Gn;for(const r of e.deps)(r.reactions??(r.reactions=[])).push(e),r.f&Ur&&!(r.f&Gn)&&vc(r)}}function pc(e){if(e.v===Xr)return!0;if(e.deps===null)return!1;for(const r of e.deps)if(Ii.has(r)||r.f&Ur&&pc(r))return!0;return!1}function b(e){var r=ni;try{return ni=!0,e()}finally{ni=r}}const av=-7169;function Hr(e,r){e.f=e.f&av|r}function sv(e,r){var n={};for(var i in e)r.includes(i)||(n[i]=e[i]);for(var s of Object.getOwnPropertySymbols(e))Object.propertyIsEnumerable.call(e,s)&&!r.includes(s)&&(n[s]=e[s]);return n}function v(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(ri in e)sl(e);else if(!Array.isArray(e))for(let r in e){const n=e[r];typeof n=="object"&&n&&ri in n&&sl(n)}}}function sl(e,r=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!r.has(e)){r.add(e),e instanceof Date&&e.getTime();for(let i in e)try{sl(e[i],r)}catch{}const n=Ko(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const i=Pu(n);for(let s in i){const a=i[s].get;if(a)try{a.call(e)}catch{}}}}}function ov(e,r,n,i={}){function s(a){if(i.capture||lv.call(r,a),!a.cancelBubble)return Ta(()=>n==null?void 0:n.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Za(()=>{r.addEventListener(e,s,i)}):r.addEventListener(e,s,i),s}function W(e,r,n,i,s){var a={capture:i,passive:s},l=ov(e,r,n,a);(r===document.body||r===window||r===document||r instanceof HTMLMediaElement)&&is(()=>{r.removeEventListener(e,l,a)})}let mc=null;function lv(e){var I;var r=this,n=r.ownerDocument,i=e.type,s=((I=e.composedPath)==null?void 0:I.call(e))||[],a=s[0]||e.target;mc=e;var l=0,d=mc===e&&e.__root;if(d){var u=s.indexOf(d);if(u!==-1&&(r===document||r===window)){e.__root=r;return}var g=s.indexOf(r);if(g===-1)return;u<=g&&(l=u)}if(a=s[l]||e.target,a!==r){Ru(e,"currentTarget",{configurable:!0,get(){return a||n}});var c=$t,p=rr;ii(null),Pi(null);try{for(var _,S=[];a!==null;){var y=a.assignedSlot||a.parentNode||a.host||null;try{var T=a["__"+i];T!=null&&(!a.disabled||e.target===a)&&T.call(a,e)}catch(k){_?S.push(k):_=k}if(e.cancelBubble||y===r||y===null)break;a=y}if(_){for(let k of S)queueMicrotask(()=>{throw k});throw _}}finally{e.__root=r,delete e.currentTarget,ii(c),Pi(p)}}}function uv(e){var r=document.createElement("template");return r.innerHTML=e.replaceAll("<!>","<!---->"),r.content}function Zs(e,r){var n=rr;n.nodes===null&&(n.nodes={start:e,end:r,a:null,t:null})}function F(e,r){var n=(r&gg)!==0,i=(r&vg)!==0,s,a=!e.startsWith("<!>");return()=>{s===void 0&&(s=uv(a?e:"<!>"+e),n||(s=Ws(s)));var l=i||qg?document.importNode(s,!0):s.cloneNode(!0);if(n){var d=Ws(l),u=l.lastChild;Zs(d,u)}else Zs(l,l);return l}}function Mi(e=""){{var r=Qi(e+"");return Zs(r,r),r}}function $e(){var e=document.createDocumentFragment(),r=document.createComment(""),n=Qi();return e.append(r,n),Zs(r,n),e}function w(e,r){e!==null&&e.before(r)}function Xe(e,r){var n=r==null?"":typeof r=="object"?r+"":r;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=n+"")}class ol{constructor(r,n=!0){pi(this,"anchor");Cr(this,Qn,new Map);Cr(this,ci,new Map);Cr(this,An,new Map);Cr(this,va,new Set);Cr(this,Ds,!0);Cr(this,xs,()=>{var r=Kt;if(pt(this,Qn).has(r)){var n=pt(this,Qn).get(r),i=pt(this,ci).get(n);if(i)al(i),pt(this,va).delete(n);else{var s=pt(this,An).get(n);s&&(pt(this,ci).set(n,s.effect),pt(this,An).delete(n),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),i=s.effect)}for(const[a,l]of pt(this,Qn)){if(pt(this,Qn).delete(a),a===r)break;const d=pt(this,An).get(l);d&&(wi(d.effect),pt(this,An).delete(l))}for(const[a,l]of pt(this,ci)){if(a===n||pt(this,va).has(a))continue;const d=()=>{if(Array.from(pt(this,Qn).values()).includes(a)){var g=document.createDocumentFragment();tv(l,g),g.append(Qi()),pt(this,An).set(a,{effect:l,fragment:g})}else wi(l);pt(this,va).delete(a),pt(this,ci).delete(a)};pt(this,Ds)||!i?(pt(this,va).add(a),il(l,d,!1)):d()}}});Cr(this,zo,r=>{pt(this,Qn).delete(r);const n=Array.from(pt(this,Qn).values());for(const[i,s]of pt(this,An))n.includes(i)||(wi(s.effect),pt(this,An).delete(i))});this.anchor=r,Di(this,Ds,n)}ensure(r,n){var i=Kt,s=Zu();if(n&&!pt(this,ci).has(r)&&!pt(this,An).has(r))if(s){var a=document.createDocumentFragment(),l=Qi();a.append(l),pt(this,An).set(r,{effect:as(()=>n(l)),fragment:a})}else pt(this,ci).set(r,as(()=>n(this.anchor)));if(pt(this,Qn).set(i,r),s){for(const[d,u]of pt(this,ci))d===r?i.skipped_effects.delete(u):i.skipped_effects.add(u);for(const[d,u]of pt(this,An))d===r?i.skipped_effects.delete(u.effect):i.skipped_effects.add(u.effect);i.oncommit(pt(this,xs)),i.ondiscard(pt(this,zo))}else pt(this,xs).call(this)}}Qn=new WeakMap,ci=new WeakMap,An=new WeakMap,va=new WeakMap,Ds=new WeakMap,xs=new WeakMap,zo=new WeakMap;function le(e,r,n=!1){var i=new ol(e),s=n?Wi:0;function a(l,d){i.ensure(l,d)}Ks(()=>{var l=!1;r((d,u=!0)=>{l=!0,a(u,d)}),l||a(!1,null)},s)}function ea(e,r,n){var i=new ol(e),s=!Ca();Ks(()=>{var a=r();s&&a!==null&&typeof a=="object"&&(a={}),i.ensure(a,n)})}function Ft(e,r){return r}function cv(e,r,n){for(var i=[],s=r.length,a,l=r.length,d=0;d<s;d++){let p=r[d];il(p,()=>{if(a){if(a.pending.delete(p),a.done.add(p),a.pending.size===0){var _=e.outrogroups;ll(Yo(a.done)),_.delete(a),_.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var u=i.length===0&&n!==null;if(u){var g=n,c=g.parentNode;Kg(c),c.append(g),e.items.clear()}ll(r,!u)}else a={pending:new Set(r),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(a)}function ll(e,r=!0){for(var n=0;n<e.length;n++)wi(e[n],r)}var _c;function At(e,r,n,i,s,a=null){var l=e,d=new Map,u=(r&Iu)!==0;if(u){var g=e;l=g.appendChild(Qi())}var c=null,p=Pt(()=>{var k=n();return Ps(k)?k:k==null?[]:Yo(k)}),_,S=!0;function y(){I.fallback=c,dv(I,_,l,r,i),c!==null&&(_.length===0?c.f&bi?(c.f^=bi,os(c,null,l)):al(c):il(c,()=>{c=null}))}var T=Ks(()=>{_=t(p);for(var k=_.length,C=new Set,D=Kt,E=Zu(),U=0;U<k;U+=1){var $=_[U],R=i($,U),H=S?null:d.get(R);H?(H.v&&rs(H.v,$),H.i&&rs(H.i,U),E&&D.skipped_effects.delete(H.e)):(H=fv(d,S?l:_c??(_c=Qi()),$,R,U,s,r,n),S||(H.e.f|=bi),d.set(R,H)),C.add(R)}if(k===0&&a&&!c&&(S?c=as(()=>a(l)):(c=as(()=>a(_c??(_c=Qi()))),c.f|=bi)),!S)if(E){for(const[J,de]of d)C.has(J)||D.skipped_effects.add(de.e);D.oncommit(y),D.ondiscard(()=>{})}else y();t(p)}),I={effect:T,items:d,outrogroups:null,fallback:c};S=!1}function dv(e,r,n,i,s){var de,fe,we,pe,De,ke,ye,ce,Z;var a=(i&sg)!==0,l=r.length,d=e.items,u=e.effect.first,g,c=null,p,_=[],S=[],y,T,I,k;if(a)for(k=0;k<l;k+=1)y=r[k],T=s(y,k),I=d.get(T).e,I.f&bi||((fe=(de=I.nodes)==null?void 0:de.a)==null||fe.measure(),(p??(p=new Set)).add(I));for(k=0;k<l;k+=1){if(y=r[k],T=s(y,k),I=d.get(T).e,e.outrogroups!==null)for(const Y of e.outrogroups)Y.pending.delete(I),Y.done.delete(I);if(I.f&bi)if(I.f^=bi,I===u)os(I,null,n);else{var C=c?c.next:u;I===e.effect.last&&(e.effect.last=I.prev),I.prev&&(I.prev.next=I.next),I.next&&(I.next.prev=I.prev),Ni(e,c,I),Ni(e,I,C),os(I,C,n),c=I,_=[],S=[],u=c.next;continue}if(I.f&wn&&(al(I),a&&((pe=(we=I.nodes)==null?void 0:we.a)==null||pe.unfix(),(p??(p=new Set)).delete(I))),I!==u){if(g!==void 0&&g.has(I)){if(_.length<S.length){var D=S[0],E;c=D.prev;var U=_[0],$=_[_.length-1];for(E=0;E<_.length;E+=1)os(_[E],D,n);for(E=0;E<S.length;E+=1)g.delete(S[E]);Ni(e,U.prev,$.next),Ni(e,c,U),Ni(e,$,D),u=D,c=$,k-=1,_=[],S=[]}else g.delete(I),os(I,u,n),Ni(e,I.prev,I.next),Ni(e,I,c===null?e.effect.first:c.next),Ni(e,c,I),c=I;continue}for(_=[],S=[];u!==null&&u!==I;)(g??(g=new Set)).add(u),S.push(u),u=u.next;if(u===null)continue}I.f&bi||_.push(I),c=I,u=I.next}if(e.outrogroups!==null){for(const Y of e.outrogroups)Y.pending.size===0&&(ll(Yo(Y.done)),(De=e.outrogroups)==null||De.delete(Y));e.outrogroups.size===0&&(e.outrogroups=null)}if(u!==null||g!==void 0){var R=[];if(g!==void 0)for(I of g)I.f&wn||R.push(I);for(;u!==null;)!(u.f&wn)&&u!==e.fallback&&R.push(u),u=u.next;var H=R.length;if(H>0){var J=i&Iu&&l===0?n:null;if(a){for(k=0;k<H;k+=1)(ye=(ke=R[k].nodes)==null?void 0:ke.a)==null||ye.measure();for(k=0;k<H;k+=1)(Z=(ce=R[k].nodes)==null?void 0:ce.a)==null||Z.fix()}cv(e,R,J)}}a&&Za(()=>{var Y,re;if(p!==void 0)for(I of p)(re=(Y=I.nodes)==null?void 0:Y.a)==null||re.apply()})}function fv(e,r,n,i,s,a,l,d){var u=l&ig?l&og?ts(n):h(n,!1,!1):null,g=l&ag?ts(s):null;return{v:u,i:g,e:as(()=>(a(r,u??n,g??s,d),()=>{e.delete(i)}))}}function os(e,r,n){if(e.nodes)for(var i=e.nodes.start,s=e.nodes.end,a=r&&!(r.f&bi)?r.nodes.start:n;i!==null;){var l=ns(i);if(a.before(i),i===s)return;i=l}}function Ni(e,r,n){r===null?e.effect.first=n:r.next=n,n===null?e.effect.last=r:n.prev=r}function vr(e,r,n,i,s){var d;var a=(d=r.$$slots)==null?void 0:d[n],l=!1;a===!0&&(a=r[n==="default"?"children":n],l=!0),a===void 0?s!==null&&s(e):a(e,l?()=>i:i)}function ul(e,r,n){var i=new ol(e);Ks(()=>{var s=r()??null;i.ensure(s,s&&(a=>n(a,s)))},Wi)}const hv=()=>performance.now(),Ei={tick:e=>requestAnimationFrame(e),now:()=>hv(),tasks:new Set};function bc(){const e=Ei.now();Ei.tasks.forEach(r=>{r.c(e)||(Ei.tasks.delete(r),r.f())}),Ei.tasks.size!==0&&Ei.tick(bc)}function gv(e){let r;return Ei.tasks.size===0&&Ei.tick(bc),{promise:new Promise(n=>{Ei.tasks.add(r={c:e,f:n})}),abort(){Ei.tasks.delete(r)}}}function Js(e,r){Ta(()=>{e.dispatchEvent(new CustomEvent(r))})}function vv(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;const r=e.split("-");return r.length===1?r[0]:r[0]+r.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("")}function yc(e){const r={},n=e.split(";");for(const i of n){const[s,a]=i.split(":");if(!s||a===void 0)break;const l=vv(s.trim());r[l]=a.trim()}return r}const pv=e=>e;function cl(e,r,n,i){var I;var s=(e&hg)!==0,a="both",l,d=r.inert,u=r.style.overflow,g,c;function p(){return Ta(()=>l??(l=n()(r,(i==null?void 0:i())??{},{direction:a})))}var _={is_global:s,in(){r.inert=d,Js(r,"introstart"),g=dl(r,p(),c,1,()=>{Js(r,"introend"),g==null||g.abort(),g=l=void 0,r.style.overflow=u})},out(k){r.inert=!0,Js(r,"outrostart"),c=dl(r,p(),g,0,()=>{Js(r,"outroend"),k==null||k()})},stop:()=>{g==null||g.abort(),c==null||c.abort()}},S=rr;((I=S.nodes).t??(I.t=[])).push(_);{var y=s;if(!y){for(var T=S.parent;T&&T.f&Wi;)for(;(T=T.parent)&&!(T.f&ti););y=!T||(T.f&Ls)!==0}y&&Ut(()=>{b(()=>_.in())})}}function dl(e,r,n,i,s){var a=i===1;if(wa(r)){var l,d=!1;return Za(()=>{if(!d){var I=r({direction:a?"in":"out"});l=dl(e,I,n,i,s)}}),{abort:()=>{d=!0,l==null||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(n==null||n.deactivate(),!(r!=null&&r.duration))return s(),{abort:fn,deactivate:fn,reset:fn,t:()=>i};const{delay:u=0,css:g,tick:c,easing:p=pv}=r;var _=[];if(a&&n===void 0&&(c&&c(0,1),g)){var S=yc(g(0,1));_.push(S,S)}var y=()=>1-i,T=e.animate(_,{duration:u,fill:"forwards"});return T.onfinish=()=>{T.cancel();var I=(n==null?void 0:n.t())??1-i;n==null||n.abort();var k=i-I,C=r.duration*Math.abs(k),D=[];if(C>0){var E=!1;if(g)for(var U=Math.ceil(C/16.666666666666668),$=0;$<=U;$+=1){var R=I+k*p($/U),H=yc(g(R,1-R));D.push(H),E||(E=H.overflow==="hidden")}E&&(e.style.overflow="hidden"),y=()=>{var J=T.currentTime;return I+k*p(J/C)},c&&gv(()=>{if(T.playState!=="running")return!1;var J=y();return c(J,1-J),!0})}T=e.animate(D,{duration:C,fill:"forwards"}),T.onfinish=()=>{y=()=>i,c==null||c(i,1-i),s()}},{abort:()=>{T&&(T.cancel(),T.effect=null,T.onfinish=fn)},deactivate:()=>{s=fn},reset:()=>{i===0&&(c==null||c(1,0))},t:()=>y()}}function Pr(e,r,n){Ut(()=>{var i=b(()=>r(e,n==null?void 0:n())||{});if(n&&(i!=null&&i.update)){var s=!1,a={};ka(()=>{var l=n();v(l),s&&$o(a,l)&&(a=l,i.update(l))}),s=!0}if(i!=null&&i.destroy)return()=>i.destroy()})}function wc(e){var r,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(r=0;r<s;r++)e[r]&&(n=wc(e[r]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function mv(){for(var e,r,n=0,i="",s=arguments.length;n<s;n++)(e=arguments[n])&&(r=wc(e))&&(i&&(i+=" "),i+=r);return i}function Sn(e){return typeof e=="object"?mv(e):e??""}const Ec=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function _v(e,r,n){var i=e==null?"":""+e;if(r&&(i=i?i+" "+r:r),n){for(var s in n)if(n[s])i=i?i+" "+s:s;else if(i.length)for(var a=s.length,l=0;(l=i.indexOf(s,l))>=0;){var d=l+a;(l===0||Ec.includes(i[l-1]))&&(d===i.length||Ec.includes(i[d]))?i=(l===0?"":i.substring(0,l))+i.substring(d+1):l=d}}return i===""?null:i}function Sc(e,r=!1){var n=r?" !important;":";",i="";for(var s in e){var a=e[s];a!=null&&a!==""&&(i+=" "+s+": "+a+n)}return i}function fl(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function bv(e,r){if(r){var n="",i,s;if(Array.isArray(r)?(i=r[0],s=r[1]):i=r,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,l=0,d=!1,u=[];i&&u.push(...Object.keys(i).map(fl)),s&&u.push(...Object.keys(s).map(fl));var g=0,c=-1;const T=e.length;for(var p=0;p<T;p++){var _=e[p];if(d?_==="/"&&e[p-1]==="*"&&(d=!1):a?a===_&&(a=!1):_==="/"&&e[p+1]==="*"?d=!0:_==='"'||_==="'"?a=_:_==="("?l++:_===")"&&l--,!d&&a===!1&&l===0){if(_===":"&&c===-1)c=p;else if(_===";"||p===T-1){if(c!==-1){var S=fl(e.substring(g,c).trim());if(!u.includes(S)){_!==";"&&p++;var y=e.substring(g,p).trim();n+=" "+y+";"}}g=p+1,c=-1}}}}return i&&(n+=Sc(i)),s&&(n+=Sc(s,!0)),n=n.trim(),n===""?null:n}return e==null?null:String(e)}function Me(e,r,n,i,s,a){var l=e.__className;if(l!==n||l===void 0){var d=_v(n,i,a);d==null?e.removeAttribute("class"):e.className=d,e.__className=n}else if(a&&s!==a)for(var u in a){var g=!!a[u];(s==null||g!==!!s[u])&&e.classList.toggle(u,g)}return a}function hl(e,r={},n,i){for(var s in n){var a=n[s];r[s]!==a&&(n[s]==null?e.style.removeProperty(s):e.style.setProperty(s,a,i))}}function Ye(e,r,n,i){var s=e.__style;if(s!==r){var a=bv(r,i);a==null?e.removeAttribute("style"):e.style.cssText=a,e.__style=r}else i&&(Array.isArray(i)?(hl(e,n==null?void 0:n[0],i[0]),hl(e,n==null?void 0:n[1],i[1],"important")):hl(e,n,i));return i}function gl(e,r,n=!1){if(e.multiple){if(r==null)return;if(!Ps(r))return Mg();for(var i of e.options)i.selected=r.includes(Ac(i));return}for(i of e.options){var s=Ac(i);if(Gg(s,r)){i.selected=!0;return}}(!n||r!==void 0)&&(e.selectedIndex=-1)}function Cc(e){var r=new MutationObserver(()=>{gl(e,e.__value)});r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),is(()=>{r.disconnect()})}function Ac(e){return"__value"in e?e.__value:e.value}const yv=Symbol("is custom element"),wv=Symbol("is html");function ls(e,r){var n=vl(e);n.value===(n.value=r??void 0)||e.value===r&&(r!==0||e.nodeName!=="PROGRESS")||(e.value=r??"")}function Tc(e,r){var n=vl(e);n.checked!==(n.checked=r??void 0)&&(e.checked=r)}function kc(e,r){r?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function Vt(e,r,n,i){var s=vl(e);s[r]!==(s[r]=n)&&(r==="loading"&&(e[Sg]=n),n==null?e.removeAttribute(r):typeof n!="string"&&Ev(e).includes(r)?e[r]=n:e.setAttribute(r,n))}function vl(e){return e.__attributes??(e.__attributes={[yv]:e.nodeName.includes("-"),[wv]:e.namespaceURI===pg})}var Dc=new Map;function Ev(e){var r=e.getAttribute("is")||e.nodeName,n=Dc.get(r);if(n)return n;Dc.set(r,n=[]);for(var i,s=e,a=Element.prototype;a!==s;){i=Pu(s);for(var l in i)i[l].set&&n.push(l);s=Ko(s)}return n}function ta(e,r,n=r){var i=new WeakSet;$u(e,"input",async s=>{var a=s?e.defaultValue:e.value;if(a=pl(e)?ml(a):a,n(a),Kt!==null&&i.add(Kt),await iv(),a!==(a=r())){var l=e.selectionStart,d=e.selectionEnd,u=e.value.length;if(e.value=a??"",d!==null){var g=e.value.length;l===d&&d===u&&g>u?(e.selectionStart=g,e.selectionEnd=g):(e.selectionStart=l,e.selectionEnd=Math.min(d,g))}}}),b(r)==null&&e.value&&(n(pl(e)?ml(e.value):e.value),Kt!==null&&i.add(Kt)),ka(()=>{var s=r();if(e===document.activeElement){var a=Hs??Kt;if(i.has(a))return}pl(e)&&s===ml(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function xc(e,r,n=r){$u(e,"change",i=>{var s=i?e.defaultChecked:e.checked;n(s)}),b(r)==null&&n(e.checked),ka(()=>{var i=r();e.checked=!!i})}function pl(e){var r=e.type;return r==="number"||r==="range"}function ml(e){return e===""?null:+e}function pr(e,r,n){var i=qi(e,r);i&&i.set&&(e[r]=n,is(()=>{e[r]=null}))}const Go=class Go{constructor(r){Cr(this,jo);Cr(this,Hi,new WeakMap);Cr(this,Ka);Cr(this,Os);Di(this,Os,r)}observe(r,n){var i=pt(this,Hi).get(r)||new Set;return i.add(n),pt(this,Hi).set(r,i),jn(this,jo,tg).call(this).observe(r,pt(this,Os)),()=>{var s=pt(this,Hi).get(r);s.delete(n),s.size===0&&(pt(this,Hi).delete(r),pt(this,Ka).unobserve(r))}}};Hi=new WeakMap,Ka=new WeakMap,Os=new WeakMap,jo=new WeakSet,tg=function(){return pt(this,Ka)??Di(this,Ka,new ResizeObserver(r=>{for(var n of r){Go.entries.set(n.target,n);for(var i of pt(this,Hi).get(n.target)||[])i(n)}}))},pi(Go,"entries",new WeakMap);let _l=Go;var Sv=new _l({box:"border-box"});function bl(e,r,n){var i=Sv.observe(e,()=>n(e[r]));Ut(()=>(b(()=>n(e[r])),i))}function Oc(e,r){return e===r||(e==null?void 0:e[ri])===r}function vt(e={},r,n,i){return Ut(()=>{var s,a;return ka(()=>{s=a,a=(i==null?void 0:i())||[],b(()=>{e!==n(...a)&&(r(e,...a),s&&Oc(n(...s),e)&&r(null,...s))})}),()=>{Za(()=>{a&&Oc(n(...a),e)&&r(null,...a)})}}),e}function us(e){return function(...r){var n=r[0];n.target===this&&(e==null||e.apply(this,r))}}function dr(e){return function(...r){var n=r[0];return n.stopPropagation(),e==null?void 0:e.apply(this,r)}}function er(e){return function(...r){var n=r[0];return n.preventDefault(),e==null?void 0:e.apply(this,r)}}function Dt(e=!1){const r=Rr,n=r.l.u;if(!n)return;let i=()=>v(r.s);if(e){let s=0,a={};const l=$a(()=>{let d=!1;const u=r.s;for(const g in u)u[g]!==a[g]&&(a[g]=u[g],d=!0);return d&&s++,s});i=()=>t(l)}n.b.length&&Zg(()=>{Ic(r,i),Ms(n.b)}),tc(()=>{const s=b(()=>n.m.map(yg));return()=>{for(const a of s)typeof a=="function"&&a()}}),n.a.length&&tc(()=>{Ic(r,i),Ms(n.a)})}function Ic(e,r){if(e.l.s)for(const n of e.l.s)t(n);r()}function Yn(e,r){var a;var n=(a=e.$$events)==null?void 0:a[r.type],i=Ps(n)?n.slice():n==null?[]:[n];for(var s of i)s.call(this,r)}function yl(e,r,n){if(e==null)return r(void 0),n&&n(void 0),fn;const i=b(()=>e.subscribe(r,n));return i.unsubscribe?()=>i.unsubscribe():i}const Oa=[];function Cv(e,r){return{subscribe:ai(e,r).subscribe}}function ai(e,r=fn){let n=null;const i=new Set;function s(d){if($o(e,d)&&(e=d,n)){const u=!Oa.length;for(const g of i)g[1](),Oa.push(g,e);if(u){for(let g=0;g<Oa.length;g+=2)Oa[g][0](Oa[g+1]);Oa.length=0}}}function a(d){s(d(e))}function l(d,u=fn){const g=[d,u];return i.add(g),i.size===1&&(n=r(s,a)||fn),d(e),()=>{i.delete(g),i.size===0&&n&&(n(),n=null)}}return{set:s,update:a,subscribe:l}}function $s(e,r,n){const i=!Array.isArray(e),s=i?[e]:e;if(!s.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const a=r.length<2;return Cv(n,(l,d)=>{let u=!1;const g=[];let c=0,p=fn;const _=()=>{if(c)return;p();const y=r(i?g[0]:g,l,d);a?l(y):p=typeof y=="function"?y:fn},S=s.map((y,T)=>yl(y,I=>{g[T]=I,c&=~(1<<T),u&&_()},()=>{c|=1<<T}));return u=!0,_(),function(){Ms(S),p(),u=!1}})}function fr(e){let r;return yl(e,n=>r=n)(),r}let eo=!1,wl=Symbol();function He(e,r,n){const i=n[r]??(n[r]={store:null,source:h(void 0),unsubscribe:fn});if(i.store!==e&&!(wl in n))if(i.unsubscribe(),i.store=e??null,e==null)i.source.v=void 0,i.unsubscribe=fn;else{var s=!0;i.unsubscribe=yl(e,a=>{s?i.source.v=a:o(i.source,a)}),s=!1}return e&&wl in n?fr(e):t(i.source)}function sn(e,r,n){let i=n[r];return i&&i.store!==e&&(i.unsubscribe(),i.unsubscribe=fn),e}function Qe(e,r){return e.set(r),r}function qt(){const e={};function r(){is(()=>{for(var n in e)e[n].unsubscribe();Ru(e,wl,{enumerable:!1,value:!0})})}return[e,r]}function Si(e,r,n){return e.set(n),r}function Av(e){var r=eo;try{return eo=!1,[e(),eo]}finally{eo=r}}const Tv={get(e,r){let n=e.props.length;for(;n--;){let i=e.props[n];if(wa(i)&&(i=i()),typeof i=="object"&&i!==null&&r in i)return i[r]}},set(e,r,n){let i=e.props.length;for(;i--;){let s=e.props[i];wa(s)&&(s=s());const a=qi(s,r);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,r){let n=e.props.length;for(;n--;){let i=e.props[n];if(wa(i)&&(i=i()),typeof i=="object"&&i!==null&&r in i){const s=qi(i,r);return s&&!s.configurable&&(s.configurable=!0),s}}},has(e,r){if(r===ri||r===Vu)return!1;for(let n of e.props)if(wa(n)&&(n=n()),n!=null&&r in n)return!0;return!1},ownKeys(e){const r=[];for(let n of e.props)if(wa(n)&&(n=n()),!!n){for(const i in n)r.includes(i)||r.push(i);for(const i of Object.getOwnPropertySymbols(n))r.includes(i)||r.push(i)}return r}};function kv(...e){return new Proxy({props:e},Tv)}function m(e,r,n,i){var D;var s=!xi||(n&ug)!==0,a=(n&dg)!==0,l=(n&fg)!==0,d=i,u=!0,g=()=>(u&&(u=!1,d=l?b(i):i),d),c;if(a){var p=ri in e||Vu in e;c=((D=qi(e,r))==null?void 0:D.set)??(p&&r in e?E=>e[r]=E:void 0)}var _,S=!1;a?[_,S]=Av(()=>e[r]):_=e[r],_===void 0&&i!==void 0&&(_=g(),c&&(s&&Og(),c(_)));var y;if(s?y=()=>{var E=e[r];return E===void 0?g():(u=!0,E)}:y=()=>{var E=e[r];return E!==void 0&&(d=void 0),E===void 0?d:E},s&&!(n&cg))return y;if(c){var T=e.$$legacy;return function(E,U){return arguments.length>0?((!s||!U||T||S)&&c(U?y():E),E):y()}}var I=!1,k=(n&lg?$a:Pt)(()=>(I=!1,y()));a&&t(k);var C=rr;return function(E,U){if(arguments.length>0){const $=U?t(k):s&&a?Aa(E):E;return o(k,$),I=!0,d!==void 0&&(d=$),E}return Ji&&I||C.f&_i?k.v:t(k)}}function El(e,r="body"){let n;async function i(a){if(r=a,typeof r=="string"){if(n=document.querySelector(r),n===null&&(await Se.tick(),n=document.querySelector(r)),n===null)throw new Error(`No element found matching css selector: "${r}"`)}else if(r instanceof HTMLElement)n=r;else throw new TypeError(`Unknown portal target type: ${r===null?"null":typeof r}. Allowed types: string (CSS selector) or HTMLElement.`);n.appendChild(e),e.hidden=!1}function s(){e.parentNode&&e.parentNode.removeChild(e)}return i(r),{update:i,destroy:s}}var Dv=F('<div hidden=""><!></div>');function xv(e,r){St(r,!1);let n=m(r,"target",8,"body");Dt();var i=Dv(),s=j(i);vr(s,r,"default",{},null),Pr(i,(a,l)=>El==null?void 0:El(a,l),n),w(e,i),Ct()}function to(e,r){let n,i=r;const s=()=>{a(i)},a=d=>{const{anchor:u,align:g,maxHeight:c,maxWidth:p,minWidth:_=0,useAnchorWidth:S,offset:y=5,customUpdate:T,offsetBelow:I}=d;if(!u)return;const k=u.getBoundingClientRect(),C=e.getBoundingClientRect();let D={maxHeight:null,minWidth:null,maxWidth:p,left:null,top:null};typeof T=="function"?D=T(k,C,D):(g==="right-outside"||g==="left-outside"?D.top=k.top:window.innerHeight-k.bottom<(c||50)?(D.top=k.top-C.height-y,D.maxHeight=c||240):(D.top=k.bottom+(I||y),D.maxHeight=c||window.innerHeight-k.bottom-20),!p&&S&&(D.maxWidth=k.width),S?D.minWidth=Math.max(_,k.width):_&&(D.minWidth=_),g==="right"?D.left=k.left+k.width-C.width:g==="right-outside"?D.left=k.right+y:g==="left-outside"?D.left=k.left-C.width-y:D.left=k.left),Object.entries(D).forEach(([E,U])=>{U!=null?e.style[E]=`${U.toFixed(0)}px`:e.style[E]=null})},l=d=>{i=d,n&&n.disconnect();const{anchor:u}=d;u&&(n=new ResizeObserver(()=>a(d)),n.observe(u),n.observe(e),n.observe(document.body))};return e.style.position="absolute",e.style.zIndex="9999",document.addEventListener("scroll",s,!0),l(r),{update:l,destroy(){n&&n.disconnect(),document.removeEventListener("scroll",s,!0)}}}const Ov=[".flatpickr-calendar",".spectrum-Popover",".download-js-link"];let cs=[];const Rc=e=>{if(!e.target.closest('[data-ignore-click-outside="true"]')){for(let r of Ov)if(e.target.closest(r))return;cs.forEach(r=>{var s;if(r.element.contains(e.target))return;const n=r.anchor.closest(".spectrum-Underlay")!=null;e.target.closest(".spectrum-Underlay")!=null&&!n||(s=r.callback)==null||s.call(r,e)})}};document.documentElement.addEventListener("click",Rc,!0),document.documentElement.addEventListener("contextmenu",Rc,!0);const Iv=(e,r,n,i)=>{let s=cs.find(a=>a.id===e);s?s.callback=i:cs.push({id:e,element:r,anchor:n,callback:i})},Rv=e=>{cs=cs.filter(r=>r.id!==e)},ro=(e,r)=>{const n=Math.random(),i=s=>{const a=(s==null?void 0:s.callback)||s,l=(s==null?void 0:s.anchor)||e;Iv(n,e,l,a)};return i(r),{update:i,destroy:()=>Rv(n)}};function Pc(e){const r=e-1;return r*r*r+1}function Mc(e){const r=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return r?[parseFloat(r[1]),r[2]||"px"]:[e,"px"]}function Nc(e,{delay:r=0,duration:n=400,easing:i=Pc,x:s=0,y:a=0,opacity:l=0}={}){const d=getComputedStyle(e),u=+d.opacity,g=d.transform==="none"?"":d.transform,c=u*(1-l),[p,_]=Mc(s),[S,y]=Mc(a);return{delay:r,duration:n,easing:i,css:(T,I)=>`
|
|
3
|
+
transform: ${g} translate(${(1-T)*p}${_}, ${(1-T)*S}${y});
|
|
4
|
+
opacity: ${u-c*I}`}}function Pv(e,{delay:r=0,duration:n=400,easing:i=Pc,axis:s="y"}={}){const a=getComputedStyle(e),l=+a.opacity,d=s==="y"?"height":"width",u=parseFloat(a[d]),g=s==="y"?["top","bottom"]:["left","right"],c=g.map(k=>`${k[0].toUpperCase()}${k.slice(1)}`),p=parseFloat(a[`padding${c[0]}`]),_=parseFloat(a[`padding${c[1]}`]),S=parseFloat(a[`margin${c[0]}`]),y=parseFloat(a[`margin${c[1]}`]),T=parseFloat(a[`border${c[0]}Width`]),I=parseFloat(a[`border${c[1]}Width`]);return{delay:r,duration:n,easing:i,css:k=>`overflow: hidden;opacity: ${Math.min(k*20,1)*l};${d}: ${k*u}px;padding-${g[0]}: ${k*p}px;padding-${g[1]}: ${k*_}px;margin-${g[0]}: ${k*S}px;margin-${g[1]}: ${k*y}px;border-${g[0]}-width: ${k*T}px;border-${g[1]}-width: ${k*I}px;min-${d}: 0`}}var Mv=F('<div tabindex="0" role="presentation"><!></div>');function Qr(e,r){St(r,!1);const n=h(),i=Se.createEventDispatcher();let s=m(r,"anchor",8),a=m(r,"align",8,"right"),l=m(r,"portalTarget",8),d=m(r,"minWidth",8),u=m(r,"maxWidth",8),g=m(r,"maxHeight",8),c=m(r,"open",12,!1),p=m(r,"useAnchorWidth",8,!1),_=m(r,"dismissible",8,!0),S=m(r,"offset",8,5),y=m(r,"offsetBelow",8),T=m(r,"customHeight",8),I=m(r,"animate",8,!0),k=m(r,"customZindex",8),C=m(r,"handlePositionUpdate",8),D=m(r,"showPopover",8,!0),E=m(r,"clickOutsideOverride",8,!1),U=m(r,"ignoreAnchor",8,!0),$=m(r,"popup",12),R=m(r,"className",8);const H=()=>{i("open"),c(!0)},J=()=>{i("close"),c(!1)},de=()=>{c()?J():H()},fe=()=>viewport.matches(":focus-within"),we=Z=>{if(!E()&&c()){let Y=Z.target,re=!1;for(;!re&&Y&&Y.parentNode;)re=Y===s(),Y=Y.parentNode;(!re||re&&!U())&&J()}};function pe(Z){E()&&c()&&Z.key==="Escape"&&J()}x(()=>v(l()),()=>{o(n,l()||".spectrum")}),Mt();var De={show:H,hide:J,toggle:de,hasFocus:fe};Dt();var ke=$e(),ye=Ge(ke);{var ce=Z=>{xv(Z,{get target(){return t(n)},children:(Y,re)=>{var G=Mv();let ae;var z=j(G);vr(z,r,"default",{},null),vt(G,ge=>$(ge),()=>$()),Pr(G,(ge,O)=>to==null?void 0:to(ge,O),()=>({anchor:s(),align:a(),maxHeight:g(),maxWidth:u(),minWidth:d(),useAnchorWidth:p(),offset:S(),offsetBelow:y(),customUpdate:C()})),Pr(G,(ge,O)=>ro==null?void 0:ro(ge,O),()=>({callback:_()?we:()=>{},anchor:s()})),Ut(()=>W("keydown",G,pe)),Ce(()=>{ae=Me(G,1,"spectrum-Popover is-open "+R(),"svelte-1yh2ak",ae,{customZindex:k(),"hide-popover":c()&&!D()}),Ye(G,`height: ${T()??""}; --customZindex: ${k()??""};`)}),cl(3,G,()=>Nc,()=>({y:-20,duration:I()?200:0})),w(Y,G)},$$slots:{default:!0}})};le(ye,Z=>{c()&&Z(ce)})}return w(e,ke),pr(r,"show",H),pr(r,"hide",J),pr(r,"toggle",de),pr(r,"hasFocus",fe),Ct(De)}var Nv=F('<div class="tooltip-content svelte-i04k5p"> </div>');function no(e,r){St(r,!1);let n=m(r,"anchor",8),i=m(r,"content",8),s=m(r,"show",12,!1);m(r,"delay",8,750);let a=m(r,"align",8,"top");const l=()=>{s(!1)};Se.onDestroy(()=>{l()}),Dt();var d=$e(),u=Ge(d);{var g=c=>{Qr(c,{get anchor(){return n()},get align(){return a()},get open(){return s()},dismissible:!1,animate:!0,children:(p,_)=>{var S=Nv(),y=j(S);Ce(()=>Xe(y,i())),w(p,S)},$$slots:{default:!0}})};le(u,c=>{s()&&c(g)})}w(e,d),Ct()}var Lv=F('<button><i></i> <span class="svelte-ljms5y"> </span></button> <!>',1);function ra(e,r){St(r,!1);const n=h(),i=h();let s=m(r,"size",8,"M"),a=m(r,"menuItem",8,!1),l=m(r,"menuAlign",8,"right"),d=m(r,"icon",8,void 0),u=m(r,"iconAfterText",8,void 0),g=m(r,"iconColor",8,void 0),c=m(r,"text",12,""),p=m(r,"quiet",8,void 0),_=m(r,"selected",8,void 0),S=m(r,"disabled",8,void 0),y=m(r,"onClick",8,void 0),T=m(r,"buttonClass",8,"actionButton"),I=m(r,"type",8,"primary"),k=m(r,"tooltip",8);const C=[];let D=m(r,"actionsMode",8,"normal"),E=m(r,"condition",8,void 0),U=m(r,"loopSource",8,void 0),$=m(r,"loopDelay",8,0),R=m(r,"loopEvent",8,void 0),H=m(r,"timerDuration",8,60),J=m(r,"fullWidth",8,void 0),de=m(r,"iconOnly",8,void 0),fe=m(r,"onTimer",8,void 0),we=m(r,"onLoopStart",8,void 0),pe=m(r,"onLoopEnd",8,void 0),De=m(r,"onTrueCondition",8,void 0),ke=m(r,"onFalseCondition",8,void 0),ye=h(!1),ce,Z=0,Y=h(),re=h(!1),G;const ae=()=>{S()||(G&&clearTimeout(G),G=setTimeout(()=>{o(re,!0)},750))},z=()=>{G&&(clearTimeout(G),G=null),o(re,!1)};async function ge(X){var V,ie,N,A;if(!(S()||t(ye))){if(o(ye,!0),D()=="loop"){if(we()&&await we()({iterations:(V=U())==null?void 0:V.length}),Array.isArray(t(n))&&R())for(var K=0;K<t(n).length;K++)await R()({idx:K,value:t(n)[K]}),await O($());pe()&&await pe()()}else D()=="conditional"?E()==!0?await((ie=De())==null?void 0:ie()):await((N=ke())==null?void 0:N()):y()&&await((A=y())==null?void 0:A(X));o(ye,!1)}}function O(X){return new Promise(K=>setTimeout(K,X))}const q=X=>{if(!X)return;let K=[];try{K=JSON.parse(X),Array.isArray(K)||(K=[X])}catch{K=(X==null?void 0:X.split(","))??[X]}return K};Se.onMount(()=>{D()=="timer"&&(c(H()),ce=setInterval(()=>{var X;Z+=1,Z==H()&&(Z=0,(X=fe())==null||X()),c(H()-Z)},1e3))}),Se.onDestroy(()=>{ce&&clearInterval(ce),G&&clearTimeout(G)}),x(()=>v(U()),()=>{o(n,q(U()))}),x(()=>(t(ye),v(d())),()=>{o(i,t(ye)?"ph ph-spinner-gap ph-spin":d()&&!d().startsWith("ri-")?"ph ph-"+d():d()?d():void 0)}),Mt();var ne={conditions:C};Dt();var se=Lv(),ee=Ge(se);let me;var Ne=j(ee);let Ue;var he=Ee(Ne,2),ue=j(he);vt(ee,X=>o(Y,X),()=>t(Y));var Q=Ee(ee,2);{var B=X=>{no(X,{get anchor(){return t(Y)},get content(){return k()},get show(){return t(re)}})};le(Q,X=>{k()&&X(B)})}return Ce(()=>{Vt(ee,"tabindex",S()?-1:0),me=Me(ee,1,Sn(T()=="actionButton"?"spectrum-ActionButton spectrum-ActionButton--size"+s():"spectrum-Button spectrum-Button--size"+s()),"svelte-ljms5y",me,{"super-button":!0,xsmall:s()=="XS",small:s()=="S",large:s()=="L","is-selected":_(),cta:I()=="cta"&&!S(),warning:I()=="warning",primary:I()=="primary"&&!a(),secondary:I()=="secondary",overBackground:I()=="overBackground",ink:I()=="ink",menu:I()=="menu",quiet:p(),icon:t(i),iconOnly:de()||!c(),"full-width":J(),"menu-item":a(),"menu-item-right":a()&&l()=="right",disabled:S(),working:t(ye)}),Me(Ne,1,Sn(t(i)),"svelte-ljms5y"),Ue=Ye(Ne,"",Ue,{order:u()?1:0,color:S()?"var(--spectrum-global-color-gray-400)":g()}),Xe(ue,c())}),W("click",ee,ge),W("mouseenter",ee,ae),W("mouseleave",ee,z),w(e,se),pr(r,"conditions",C),Ct(ne)}var Fv=F('<div class="error-message svelte-n4hlae"> </div>'),Vv=F("<div><div><!></div> <!></div>"),Uv=F("<div><!> <div><!></div></div>");function Bv(e,r){St(r,!1);const n=h();let i=m(r,"labelPos",8),s=m(r,"multirow",8),a=m(r,"tall",8),l=m(r,"label",8),d=m(r,"field",8),u=m(r,"helpText",8),g=m(r,"error",8),c=m(r,"labelWidth",8),p=m(r,"height",8),_=m(r,"maxHeight",8),S=h();x(()=>(v(i()),v(c())),()=>{o(n,i()=="left"?c()?c():"5rem":"auto")}),Mt();var y=Uv();let T,I;var k=j(y);{var C=$=>{var R=Vv();let H,J;var de=j(R);let fe;var we=j(de);{var pe=ce=>{var Z=Mi();Ce(()=>Xe(Z,u())),w(ce,Z)},De=ce=>{var Z=Mi();Ce(()=>Xe(Z,l()||d())),w(ce,Z)};le(we,ce=>{t(S)&&u()?ce(pe):ce(De,!1)})}var ke=Ee(de,2);{var ye=ce=>{var Z=Fv(),Y=j(Z);Ce(()=>Xe(Y,g())),w(ce,Z)};le(ke,ce=>{g()&&ce(ye)})}Ce(()=>{H=Me(R,1,"superlabel svelte-n4hlae",null,H,{left:i()=="left",tall:a(),error:g()}),J=Ye(R,"",J,{"--label-width":t(n)}),fe=Me(de,1,"label svelte-n4hlae",null,fe,{showHelp:t(S)})}),W("mouseenter",de,function(...ce){var Z;(Z=u()?()=>o(S,!0):null)==null||Z.apply(this,ce)}),W("mouseleave",de,function(...ce){var Z;(Z=u()?()=>o(S,!1):null)==null||Z.apply(this,ce)}),w($,R)};le(k,$=>{i()&&$(C)})}var D=Ee(k,2);let E;var U=j(D);vr(U,r,"default",{},null),Ce(()=>{T=Me(y,1,"super-field svelte-n4hlae",null,T,{"left-label":i()=="left",multirow:s(),tall:a()}),I=Ye(y,"",I,{"--height":p(),"--max-height":_()}),E=Me(D,1,"inline-cells svelte-n4hlae",null,E,{multirow:s()})}),w(e,y),Ct()}var Rn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Hv(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var n=function i(){return this instanceof i?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};n.prototype=r.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:function(){return e[i]}})}),n}var Cl=Object.defineProperty,zv=Object.getOwnPropertyDescriptor,jv=Object.getOwnPropertyNames,Gv=Object.prototype.hasOwnProperty,qv=(e,r)=>{for(var n in r)Cl(e,n,{get:r[n],enumerable:!0})},Wv=(e,r,n,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of jv(r))!Gv.call(e,s)&&s!==n&&Cl(e,s,{get:()=>r[s],enumerable:!(i=zv(r,s))||i.enumerable});return e},Yv=e=>Wv(Cl({},"__esModule",{value:!0}),e),Lc={};qv(Lc,{AIOperationEnum:()=>Fc,APP_QUOTA_NAMES:()=>Lp,AUDIT_LOG_TYPE:()=>Bp,AccountSSOProvider:()=>Rd,AccountSSOProviderType:()=>Id,AnalyticsEvent:()=>np,AppBackupStatus:()=>lf,AppBackupTrigger:()=>uf,AppBackupType:()=>of,AppEnvironment:()=>Cd,ArrayOperator:()=>cd,AsyncEvents:()=>Kv,AuditLogResourceStatus:()=>yf,AuditLogSystemUser:()=>Up,AuditedEventFriendlyName:()=>Xv,AuthType:()=>Pd,AutoFieldSubType:()=>Jd,AutoReason:()=>Zd,AutomationActionStepId:()=>Tl,AutomationCustomIOType:()=>Nd,AutomationEventType:()=>Hd,AutomationFeature:()=>Fd,AutomationIOType:()=>Md,AutomationStatus:()=>Ud,AutomationStepIdArray:()=>dp,AutomationStepStatus:()=>Vd,AutomationStepType:()=>Ld,AutomationStoppedReason:()=>Bd,AutomationTriggerStepId:()=>Al,BBReferenceFieldSubType:()=>tf,BREAKDOWN_QUOTA_NAMES:()=>Fp,BasicOperator:()=>ud,BodyType:()=>Gd,BreakdownQuotaName:()=>pf,CalculationType:()=>rf,CommandWord:()=>Ad,ConfigType:()=>ff,ConstantQuotaName:()=>Zc,DSPlusOperation:()=>ld,DatasourceFeature:()=>od,DatasourceFieldType:()=>nd,DocumentType:()=>kl,DocumentTypesToImport:()=>Cp,EmptyFilterOption:()=>gd,Event:()=>Bc,EventPublishType:()=>wf,Feature:()=>Jc,FeatureFlag:()=>Sd,FieldType:()=>Yd,FilterGroupLogicalOperator:()=>vd,FilterType:()=>sd,FormulaType:()=>ef,GroupByTypes:()=>Xd,GroupType:()=>zc,Hosting:()=>Uc,HttpMethod:()=>qd,INTERNAL_TABLE_SOURCE_ID:()=>fp,IdentityType:()=>jc,IncludeRelationship:()=>ad,InitType:()=>Td,InternalSearchFilterOperator:()=>hd,InternalTable:()=>sf,JsonFieldSubType:()=>$d,JsonTypes:()=>hp,LockName:()=>bd,LockType:()=>_d,LogicalOperator:()=>fd,LoginMethod:()=>md,LoopStepType:()=>zd,MaintenanceType:()=>Af,MigrationName:()=>ed,MigrationType:()=>$c,MonthlyQuotaName:()=>Qc,NumericTypes:()=>Kd,Operation:()=>td,OperationFieldTypeEnum:()=>Vc,PASSWORD_REPLACEMENT:()=>$v,PLUGIN_TYPE_ARR:()=>Np,PermissionLevel:()=>kd,PermissionSource:()=>xd,PermissionType:()=>Dd,PingSource:()=>bf,PlanModel:()=>Wc,PlanType:()=>Gc,PluginSource:()=>vf,PluginType:()=>xl,PriceDuration:()=>qc,QueryType:()=>rd,QuotaType:()=>Kc,QuotaUsageType:()=>Yc,RangeOperator:()=>dd,RelationshipType:()=>Qd,RestAuthType:()=>jd,RowExportFormat:()=>Od,RowOperations:()=>ep,SEPARATOR:()=>io,SQLiteType:()=>df,SSOProviderType:()=>hf,ScheduleRepeatPeriod:()=>_f,ScheduleType:()=>mf,SearchIndex:()=>yd,ServiceType:()=>Cf,SortOption:()=>wd,SortOrder:()=>Ef,SortType:()=>Sf,SourceName:()=>id,SqlClient:()=>pd,StaticQuotaName:()=>Xc,TableSourceType:()=>Wd,TenantResolutionStrategy:()=>Ed,UNICODE_MAX:()=>yp,UserGroupSyncEvents:()=>Hc,UserStatus:()=>gf,ViewCalculation:()=>af,ViewV2Type:()=>nf,VirtualDocumentType:()=>Dl,WebhookActionType:()=>cf,canGroupBy:()=>vp,getDocumentType:()=>Sp,getVirtualDocumentType:()=>Tp,isAIConfig:()=>Rp,isAppBackupMetadata:()=>Vp,isCloudAccount:()=>sp,isConstantQuota:()=>Jv,isCreatePasswordAccount:()=>ip,isDocument:()=>rp,isGoogleConfig:()=>xp,isLogicalSearchOperator:()=>tp,isManyToMany:()=>mp,isManyToOne:()=>bp,isMonthlyQuota:()=>Zv,isNumeric:()=>gp,isOIDCConfig:()=>Op,isOneToMany:()=>_p,isPasswordAccount:()=>ap,isRelationshipField:()=>pp,isSCIMConfig:()=>Ip,isSMTPConfig:()=>Dp,isSSOAccount:()=>lp,isSSOUser:()=>Pp,isSelfHostAccount:()=>op,isSettingsConfig:()=>kp,isStaticQuota:()=>Qv,isUser:()=>Mp,isVerifiableSSOProvider:()=>cp,prefixed:()=>wp});var Ia=Yv(Lc),Fc=(e=>(e.SUMMARISE_TEXT="SUMMARISE_TEXT",e.CLEAN_DATA="CLEAN_DATA",e.TRANSLATE="TRANSLATE",e.CATEGORISE_TEXT="CATEGORISE_TEXT",e.SENTIMENT_ANALYSIS="SENTIMENT_ANALYSIS",e.PROMPT="PROMPT",e.SEARCH_WEB="SEARCH_WEB",e))(Fc||{}),Vc=(e=>(e.MULTI_COLUMN="columns",e.COLUMN="column",e.BINDABLE_TEXT="prompt",e))(Vc||{}),Uc=(e=>(e.CLOUD="cloud",e.SELF="self",e))(Uc||{}),Bc=(e=>(e.USER_CREATED="user:created",e.USER_UPDATED="user:updated",e.USER_DELETED="user:deleted",e.USER_ONBOARDING_COMPLETE="user:onboarding:complete",e.USER_PERMISSION_ADMIN_ASSIGNED="user:admin:assigned",e.USER_PERMISSION_ADMIN_REMOVED="user:admin:removed",e.USER_PERMISSION_BUILDER_ASSIGNED="user:builder:assigned",e.USER_PERMISSION_BUILDER_REMOVED="user:builder:removed",e.USER_INVITED="user:invited",e.USER_INVITED_ACCEPTED="user:invite:accepted",e.USER_PASSWORD_FORCE_RESET="user:password:force:reset",e.USER_PASSWORD_UPDATED="user:password:updated",e.USER_PASSWORD_RESET_REQUESTED="user:password:reset:requested",e.USER_PASSWORD_RESET="user:password:reset",e.USER_DATA_COLLABORATION="user:data:collaboration",e.EMAIL_SMTP_CREATED="email:smtp:created",e.EMAIL_SMTP_UPDATED="email:smtp:updated",e.AI_CONFIG_CREATED="ai:config:created",e.AI_CONFIG_UPDATED="ai:config:updated",e.AUTH_SSO_CREATED="auth:sso:created",e.AUTH_SSO_UPDATED="auth:sso:updated",e.AUTH_SSO_ACTIVATED="auth:sso:activated",e.AUTH_SSO_DEACTIVATED="auth:sso:deactivated",e.AUTH_LOGIN="auth:login",e.AUTH_LOGOUT="auth:logout",e.ORG_NAME_UPDATED="org:info:name:updated",e.ORG_LOGO_UPDATED="org:info:logo:updated",e.ORG_PLATFORM_URL_UPDATED="org:platformurl:updated",e.INSTALLATION_VERSION_CHECKED="installation:version:checked",e.INSTALLATION_VERSION_UPGRADED="installation:version:upgraded",e.INSTALLATION_VERSION_DOWNGRADED="installation:version:downgraded",e.INSTALLATION_FIRST_STARTUP="installation:firstStartup",e.ANALYTICS_OPT_OUT="analytics:opt:out",e.ANALYTICS_OPT_IN="analytics:opt:in",e.APP_CREATED="app:created",e.APP_UPDATED="app:updated",e.APP_DELETED="app:deleted",e.APP_DUPLICATED="app:duplicated",e.APP_PUBLISHED="app:published",e.APP_UNPUBLISHED="app:unpublished",e.APP_TEMPLATE_IMPORTED="app:template:imported",e.APP_FILE_IMPORTED="app:file:imported",e.APP_VERSION_UPDATED="app:version:updated",e.APP_VERSION_REVERTED="app:version:reverted",e.APP_REVERTED="app:reverted",e.APP_EXPORTED="app:exported",e.ROLE_CREATED="role:created",e.ROLE_UPDATED="role:updated",e.ROLE_DELETED="role:deleted",e.ROLE_ASSIGNED="role:assigned",e.ROLE_UNASSIGNED="role:unassigned",e.SERVED_BUILDER="served:builder",e.SERVED_APP="served:app",e.SERVED_APP_PREVIEW="served:app:preview",e.DATASOURCE_CREATED="datasource:created",e.DATASOURCE_UPDATED="datasource:updated",e.DATASOURCE_DELETED="datasource:deleted",e.QUERY_CREATED="query:created",e.QUERY_UPDATED="query:updated",e.QUERY_DELETED="query:deleted",e.QUERY_IMPORT="query:import",e.QUERIES_RUN="queries:run",e.QUERY_PREVIEWED="query:previewed",e.TABLE_CREATED="table:created",e.TABLE_UPDATED="table:updated",e.TABLE_DELETED="table:deleted",e.TABLE_EXPORTED="table:exported",e.TABLE_IMPORTED="table:imported",e.TABLE_DATA_IMPORTED="table:data:imported",e.VIEW_CREATED="view:created",e.VIEW_UPDATED="view:updated",e.VIEW_DELETED="view:deleted",e.VIEW_EXPORTED="view:exported",e.VIEW_FILTER_CREATED="view:filter:created",e.VIEW_FILTER_UPDATED="view:filter:updated",e.VIEW_FILTER_DELETED="view:filter:deleted",e.VIEW_CALCULATION_CREATED="view:calculation:created",e.VIEW_CALCULATION_UPDATED="view:calculation:updated",e.VIEW_CALCULATION_DELETED="view:calculation:deleted",e.ROWS_CREATED="rows:created",e.ROWS_IMPORTED="rows:imported",e.COMPONENT_CREATED="component:created",e.COMPONENT_DELETED="component:deleted",e.SCREEN_CREATED="screen:created",e.SCREEN_DELETED="screen:deleted",e.LAYOUT_CREATED="layout:created",e.LAYOUT_DELETED="layout:deleted",e.AUTOMATION_CREATED="automation:created",e.AUTOMATION_DELETED="automation:deleted",e.AUTOMATION_TESTED="automation:tested",e.AUTOMATIONS_RUN="automations:run",e.AUTOMATION_STEP_CREATED="automation:step:created",e.AUTOMATION_STEP_DELETED="automation:step:deleted",e.AUTOMATION_TRIGGER_UPDATED="automation:trigger:updated",e.LICENSE_PLAN_CHANGED="license:plan:changed",e.LICENSE_ACTIVATED="license:activated",e.LICENSE_PAYMENT_FAILED="license:payment:failed",e.LICENSE_PAYMENT_RECOVERED="license:payment:recovered",e.LICENSE_CHECKOUT_OPENED="license:checkout:opened",e.LICENSE_CHECKOUT_SUCCESS="license:checkout:success",e.LICENSE_PORTAL_OPENED="license:portal:opened",e.ACCOUNT_CREATED="account:created",e.ACCOUNT_DELETED="account:deleted",e.ACCOUNT_VERIFIED="account:verified",e.APP_BACKFILL_SUCCEEDED="app:backfill:succeeded",e.APP_BACKFILL_FAILED="app:backfill:failed",e.TENANT_BACKFILL_SUCCEEDED="tenant:backfill:succeeded",e.TENANT_BACKFILL_FAILED="tenant:backfill:failed",e.INSTALLATION_BACKFILL_SUCCEEDED="installation:backfill:succeeded",e.INSTALLATION_BACKFILL_FAILED="installation:backfill:failed",e.USER_GROUP_CREATED="user_group:created",e.USER_GROUP_UPDATED="user_group:updated",e.USER_GROUP_DELETED="user_group:deleted",e.USER_GROUP_USERS_ADDED="user_group:user_added",e.USER_GROUP_USERS_REMOVED="user_group:users_deleted",e.USER_GROUP_PERMISSIONS_EDITED="user_group:permissions_edited",e.USER_GROUP_ONBOARDING="user_group:onboarding_added",e.PLUGIN_INIT="plugin:init",e.PLUGIN_IMPORTED="plugin:imported",e.PLUGIN_DELETED="plugin:deleted",e.APP_BACKUP_RESTORED="app:backup:restored",e.APP_BACKUP_TRIGGERED="app:backup:triggered",e.ENVIRONMENT_VARIABLE_CREATED="environment_variable:created",e.ENVIRONMENT_VARIABLE_DELETED="environment_variable:deleted",e.ENVIRONMENT_VARIABLE_UPGRADE_PANEL_OPENED="environment_variable:upgrade_panel_opened",e.AUDIT_LOGS_FILTERED="audit_log:filtered",e.AUDIT_LOGS_DOWNLOADED="audit_log:downloaded",e))(Bc||{}),Hc=["user:created","user:updated","user:deleted","user:admin:assigned","user:admin:removed","user:builder:assigned","user:builder:removed","user_group:created","user_group:updated","user_group:deleted","user_group:user_added","user_group:users_deleted","user_group:permissions_edited"],Kv=[...Hc],Xv={"user:created":'User "{{ email }}" created{{#if viaScim}} via SCIM{{/if}}',"user:updated":'User "{{ email }}" updated{{#if viaScim}} via SCIM{{/if}}',"user:deleted":'User "{{ email }}" deleted{{#if viaScim}} via SCIM{{/if}}',"user:admin:assigned":'User "{{ email }}" admin role assigned',"user:admin:removed":'User "{{ email }}" admin role removed',"user:builder:assigned":'User "{{ email }}" builder role assigned',"user:builder:removed":'User "{{ email }}" builder role removed',"user:invited":'User "{{ email }}" invited',"user:invite:accepted":'User "{{ email }}" accepted invite',"user:password:updated":'User "{{ email }}" password updated',"user:password:reset:requested":'User "{{ email }}" password reset requested',"user:password:reset":'User "{{ email }}" password reset',"user_group:created":'User group "{{ name }}" created{{#if viaScim}} via SCIM{{/if}}',"user_group:updated":'User group "{{ name }}" updated{{#if viaScim}} via SCIM{{/if}}',"user_group:deleted":'User group "{{ name }}" deleted{{#if viaScim}} via SCIM{{/if}}',"user_group:user_added":'User group "{{ name }}" {{ count }} users added{{#if viaScim}} via SCIM{{/if}}',"user_group:users_deleted":'User group "{{ name }}" {{ count }} users removed{{#if viaScim}} via SCIM{{/if}}',"user_group:permissions_edited":'User group "{{ name }}" permissions edited',"user:password:force:reset":void 0,"user_group:onboarding_added":void 0,"user:onboarding:complete":void 0,"user:data:collaboration":void 0,"email:smtp:created":"Email configuration created","email:smtp:updated":"Email configuration updated","ai:config:created":"AI configuration created","ai:config:updated":"AI configuration updated","auth:sso:created":"SSO configuration created","auth:sso:updated":"SSO configuration updated","auth:sso:activated":"SSO configuration activated","auth:sso:deactivated":"SSO configuration deactivated","auth:login":'User "{{ email }}" logged in',"auth:logout":'User "{{ email }}" logged out',"org:info:name:updated":"Organisation name updated","org:info:logo:updated":"Organisation logo updated","org:platformurl:updated":"Organisation platform URL updated","app:created":'App "{{ name }}" created',"app:updated":'App "{{ name }}" updated',"app:deleted":'App "{{ name }}" deleted',"app:duplicated":'App "{{ name }}" duplicated',"app:published":'App "{{ name }}" published',"app:unpublished":'App "{{ name }}" unpublished',"app:template:imported":'App "{{ name }}" template imported',"app:file:imported":'App "{{ name }}" file imported',"app:version:updated":'App "{{ name }}" version updated',"app:version:reverted":'App "{{ name }}" version reverted',"app:reverted":'App "{{ name }}" reverted',"app:exported":'App "{{ name }}" exported',"app:backup:restored":'App backup "{{ name }}" restored',"app:backup:triggered":'App backup "{{ name }}" triggered',"datasource:created":"Datasource created","datasource:updated":"Datasource updated","datasource:deleted":"Datasource deleted","query:created":"Query created","query:updated":"Query updated","query:deleted":"Query deleted","query:import":"Query import","queries:run":void 0,"query:previewed":void 0,"table:created":'Table "{{ name }}" created',"table:updated":'Table "{{ name }}" updated',"table:deleted":'Table "{{ name }}" deleted',"table:exported":'Table "{{ name }}" exported',"table:imported":'Table "{{ name }}" imported',"table:data:imported":"Data imported to table","rows:created":"Rows created","rows:imported":"Rows imported","automation:created":'Automation "{{ name }}" created',"automation:deleted":'Automation "{{ name }}" deleted',"automation:step:created":'Automation "{{ name }}" step added',"automation:step:deleted":'Automation "{{ name }}" step removed',"automation:tested":void 0,"automations:run":void 0,"automation:trigger:updated":void 0,"screen:created":'Screen "{{ name }}" created',"screen:deleted":'Screen "{{ name }}" deleted',"component:created":"Component created","component:deleted":"Component deleted","environment_variable:created":"Environment variable created","environment_variable:deleted":"Environment variable deleted","environment_variable:upgrade_panel_opened":void 0,"plugin:imported":"Plugin imported","plugin:deleted":"Plugin deleted","plugin:init":void 0,"role:created":void 0,"role:updated":void 0,"role:deleted":void 0,"role:assigned":void 0,"role:unassigned":void 0,"license:plan:changed":void 0,"license:activated":void 0,"license:payment:failed":void 0,"license:payment:recovered":void 0,"license:checkout:opened":void 0,"license:checkout:success":void 0,"license:portal:opened":void 0,"account:created":void 0,"account:deleted":void 0,"account:verified":void 0,"app:backfill:succeeded":void 0,"app:backfill:failed":void 0,"tenant:backfill:succeeded":void 0,"tenant:backfill:failed":void 0,"installation:backfill:succeeded":void 0,"installation:backfill:failed":void 0,"layout:created":void 0,"layout:deleted":void 0,"view:created":void 0,"view:updated":void 0,"view:deleted":void 0,"view:exported":void 0,"view:filter:created":void 0,"view:filter:updated":void 0,"view:filter:deleted":void 0,"view:calculation:created":void 0,"view:calculation:updated":void 0,"view:calculation:deleted":void 0,"served:builder":void 0,"served:app":void 0,"served:app:preview":void 0,"analytics:opt:out":void 0,"analytics:opt:in":void 0,"installation:version:checked":void 0,"installation:version:upgraded":void 0,"installation:version:downgraded":void 0,"installation:firstStartup":void 0,"audit_log:filtered":void 0,"audit_log:downloaded":void 0},zc=(e=>(e.TENANT="tenant",e.INSTALLATION="installation",e))(zc||{}),jc=(e=>(e.USER="user",e.TENANT="tenant",e.INSTALLATION="installation",e))(jc||{}),Gc=(e=>(e.FREE="free",e.PRO="pro",e.TEAM="team",e.PREMIUM="premium",e.PREMIUM_PLUS="premium_plus",e.PREMIUM_PLUS_TRIAL="premium_plus_trial",e.BUSINESS="business",e.ENTERPRISE_BASIC="enterprise_basic",e.ENTERPRISE_BASIC_TRIAL="enterprise_basic_trial",e.ENTERPRISE="enterprise",e))(Gc||{}),qc=(e=>(e.MONTHLY="monthly",e.YEARLY="yearly",e))(qc||{}),Wc=(e=>(e.PER_USER="perUser",e.PER_CREATOR_PER_USER="per_creator_per_user",e.DAY_PASS="dayPass",e))(Wc||{}),Yc=(e=>(e.STATIC="static",e.MONTHLY="monthly",e))(Yc||{}),Kc=(e=>(e.USAGE="usage",e.CONSTANT="constant",e))(Kc||{}),Xc=(e=>(e.ROWS="rows",e.APPS="apps",e.USERS="users",e.CREATORS="creators",e.USER_GROUPS="userGroups",e.PLUGINS="plugins",e.AI_CUSTOM_CONFIGS="aiCustomConfigs",e))(Xc||{}),Qc=(e=>(e.QUERIES="queries",e.AUTOMATIONS="automations",e.DAY_PASSES="dayPasses",e.BUDIBASE_AI_CREDITS="budibaseAICredits",e))(Qc||{}),Zc=(e=>(e.AUTOMATION_LOG_RETENTION_DAYS="automationLogRetentionDays",e.APP_BACKUPS_RETENTION_DAYS="appBackupRetentionDays",e))(Zc||{}),Qv=(e,r,n)=>e==="usage"&&r==="static",Zv=(e,r,n)=>e==="usage"&&r==="monthly",Jv=(e,r)=>e==="constant",Jc=(e=>(e.USER_GROUPS="userGroups",e.APP_BACKUPS="appBackups",e.ENVIRONMENT_VARIABLES="environmentVariables",e.AUDIT_LOGS="auditLogs",e.ENFORCEABLE_SSO="enforceableSSO",e.BRANDING="branding",e.SCIM="scim",e.SYNC_AUTOMATIONS="syncAutomations",e.TRIGGER_AUTOMATION_RUN="triggerAutomationRun",e.APP_BUILDERS="appBuilders",e.OFFLINE="offline",e.EXPANDED_PUBLIC_API="expandedPublicApi",e.VIEW_PERMISSIONS="viewPermissions",e.VIEW_READONLY_COLUMNS="viewReadonlyColumns",e.BUDIBASE_AI="budibaseAI",e.AI_CUSTOM_CONFIGS="aiCustomConfigs",e))(Jc||{}),$c=(e=>(e.GLOBAL="global",e.APP="app",e.INSTALLATION="installation",e))($c||{}),ed=(e=>(e.USER_EMAIL_VIEW_CASING="user_email_view_casing",e.APP_URLS="app_urls",e.EVENT_APP_BACKFILL="event_app_backfill",e.EVENT_GLOBAL_BACKFILL="event_global_backfill",e.EVENT_INSTALLATION_BACKFILL="event_installation_backfill",e.GLOBAL_INFO_SYNC_USERS="global_info_sync_users",e.TABLE_SETTINGS_LINKS_TO_ACTIONS="table_settings_links_to_actions",e.SYNC_QUOTAS="sync_quotas_2",e))(ed||{}),$v="--secret-value--",td=(e=>(e.CREATE="CREATE",e.READ="READ",e.UPDATE="UPDATE",e.DELETE="DELETE",e.COUNT="COUNT",e.BULK_CREATE="BULK_CREATE",e.BULK_UPSERT="BULK_UPSERT",e.CREATE_TABLE="CREATE_TABLE",e.UPDATE_TABLE="UPDATE_TABLE",e.DELETE_TABLE="DELETE_TABLE",e))(td||{}),ep=["CREATE","READ","UPDATE","DELETE","BULK_CREATE","BULK_UPSERT"],rd=(e=>(e.SQL="sql",e.JSON="json",e.FIELDS="fields",e))(rd||{}),nd=(e=>(e.STRING="string",e.CODE="code",e.LONGFORM="longForm",e.BOOLEAN="boolean",e.NUMBER="number",e.PASSWORD="password",e.LIST="list",e.OBJECT="object",e.JSON="json",e.FILE="file",e.FIELD_GROUP="fieldGroup",e.SELECT="select",e))(nd||{}),id=(e=>(e.POSTGRES="POSTGRES",e.DYNAMODB="DYNAMODB",e.MONGODB="MONGODB",e.ELASTICSEARCH="ELASTICSEARCH",e.COUCHDB="COUCHDB",e.SQL_SERVER="SQL_SERVER",e.S3="S3",e.AIRTABLE="AIRTABLE",e.MYSQL="MYSQL",e.ARANGODB="ARANGODB",e.REST="REST",e.ORACLE="ORACLE",e.GOOGLE_SHEETS="GOOGLE_SHEETS",e.FIRESTORE="FIRESTORE",e.REDIS="REDIS",e.SNOWFLAKE="SNOWFLAKE",e.BUDIBASE="BUDIBASE",e))(id||{}),ad=(e=>(e[e.INCLUDE=1]="INCLUDE",e[e.EXCLUDE=0]="EXCLUDE",e))(ad||{}),sd=(e=>(e.STRING="string",e.FUZZY="fuzzy",e.RANGE="range",e.EQUAL="equal",e.NOT_EQUAL="notEqual",e.EMPTY="empty",e.NOT_EMPTY="notEmpty",e.ONE_OF="oneOf",e))(sd||{}),od=(e=>(e.CONNECTION_CHECKING="connection",e.FETCH_TABLE_NAMES="fetch_table_names",e.EXPORT_SCHEMA="export_schema",e))(od||{}),ld=(e=>(e.CREATE="create",e.READ="read",e.UPDATE="update",e.DELETE="delete",e))(ld||{}),ud=(e=>(e.EQUAL="equal",e.NOT_EQUAL="notEqual",e.EMPTY="empty",e.NOT_EMPTY="notEmpty",e.FUZZY="fuzzy",e.STRING="string",e))(ud||{}),cd=(e=>(e.CONTAINS="contains",e.NOT_CONTAINS="notContains",e.CONTAINS_ANY="containsAny",e.ONE_OF="oneOf",e))(cd||{}),dd=(e=>(e.RANGE="range",e))(dd||{}),fd=(e=>(e.AND="$and",e.OR="$or",e))(fd||{});function tp(e){return e==="$and"||e==="$or"}var hd=(e=>(e.COMPLEX_ID_OPERATOR="_complexIdOperator",e))(hd||{}),gd=(e=>(e.RETURN_ALL="all",e.RETURN_NONE="none",e))(gd||{}),vd=(e=>(e.ALL="all",e.ANY="any",e))(vd||{}),pd=(e=>(e.MS_SQL="mssql",e.POSTGRES="pg",e.MY_SQL="mysql2",e.MARIADB="mariadb",e.ORACLE="oracledb",e.SQL_LITE="sqlite3",e))(pd||{}),md=(e=>(e.API_KEY="api_key",e.COOKIE="cookie",e))(md||{}),_d=(e=>(e.TRY_ONCE="try_once",e.TRY_TWICE="try_twice",e.DEFAULT="default",e.DELAY_500="delay_500",e.CUSTOM="custom",e.AUTO_EXTEND="auto_extend",e))(_d||{}),bd=(e=>(e.MIGRATIONS="migrations",e.TRIGGER_QUOTA="trigger_quota",e.SYNC_ACCOUNT_LICENSE="sync_account_license",e.UPDATE_TENANTS_DOC="update_tenants_doc",e.PERSIST_WRITETHROUGH="persist_writethrough",e.QUOTA_USAGE_EVENT="quota_usage_event",e.APP_MIGRATION="app_migrations",e.PROCESS_USER_INVITE="process_user_invite",e))(bd||{}),yd=(e=>(e.ROWS="rows",e.AUDIT="audit",e.USER="user",e))(yd||{}),wd=(e=>(e.ASCENDING="asc",e.DESCENDING="desc",e))(wd||{}),rp=e=>typeof e=="object"&&e._id&&e._rev,Ed=(e=>(e.USER="user",e.HEADER="header",e.QUERY="query",e.SUBDOMAIN="subdomain",e.PATH="path",e))(Ed||{}),Sd=(e=>(e.PER_CREATOR_PER_USER_PRICE="PER_CREATOR_PER_USER_PRICE",e.PER_CREATOR_PER_USER_PRICE_ALERT="PER_CREATOR_PER_USER_PRICE_ALERT",e.AUTOMATION_BRANCHING="AUTOMATION_BRANCHING",e.SQS="SQS",e.AI_CUSTOM_CONFIGS="AI_CUSTOM_CONFIGS",e.DEFAULT_VALUES="DEFAULT_VALUES",e.ENRICHED_RELATIONSHIPS="ENRICHED_RELATIONSHIPS",e.TABLES_DEFAULT_ADMIN="TABLES_DEFAULT_ADMIN",e.BUDIBASE_AI="BUDIBASE_AI",e))(Sd||{}),Cd=(e=>(e.PRODUCTION="production",e.DEVELOPMENT="development",e))(Cd||{}),Ad=(e=>(e.BACKUPS="backups",e.HOSTING="hosting",e.ANALYTICS="analytics",e.HELP="help",e.PLUGIN="plugins",e))(Ad||{}),Td=(e=>(e.QUICK="quick",e.DIGITAL_OCEAN="do",e))(Td||{}),np={OptOut:"analytics:opt:out",OptIn:"analytics:opt:in",SelfHostInit:"hosting:init",PluginInit:"plugin:init"},kd=(e=>(e.READ="read",e.WRITE="write",e.EXECUTE="execute",e.ADMIN="admin",e))(kd||{}),Dd=(e=>(e.APP="app",e.TABLE="table",e.USER="user",e.AUTOMATION="automation",e.WEBHOOK="webhook",e.BUILDER="builder",e.CREATOR="creator",e.GLOBAL_BUILDER="globalBuilder",e.QUERY="query",e.VIEW="view",e.LEGACY_VIEW="legacy_view",e))(Dd||{}),xd=(e=>(e.EXPLICIT="EXPLICIT",e.INHERITED="INHERITED",e.BASE="BASE",e))(xd||{}),Od=(e=>(e.CSV="csv",e.JSON="json",e.JSON_WITH_SCHEMA="jsonWithSchema",e))(Od||{}),ip=e=>e.authType==="password",ap=e=>e.authType==="password"&&e.hosting==="self",sp=e=>e.hosting==="cloud",op=e=>e.hosting==="self",lp=e=>e.authType==="sso",Id=(e=>(e.GOOGLE="google",e.MICROSOFT="microsoft",e))(Id||{}),Rd=(e=>(e.GOOGLE="google",e.MICROSOFT="microsoft",e))(Rd||{}),up=["microsoft"];function cp(e){return up.includes(e)}var Pd=(e=>(e.SSO="sso",e.PASSWORD="password",e))(Pd||{}),Md=(e=>(e.OBJECT="object",e.STRING="string",e.BOOLEAN="boolean",e.NUMBER="number",e.ARRAY="array",e.JSON="json",e.DATE="date",e.ATTACHMENT="attachment",e))(Md||{}),Nd=(e=>(e.TABLE="table",e.ROW="row",e.ROWS="rows",e.WIDE="wide",e.QUERY="query",e.QUERY_PARAMS="queryParams",e.QUERY_LIMIT="queryLimit",e.LOOP_OPTION="loopOption",e.ITEM="item",e.CODE="code",e.FILTERS="filters",e.COLUMN="column",e.TRIGGER_SCHEMA="triggerSchema",e.CRON="cron",e.WEBHOOK_URL="webhookUrl",e.AUTOMATION="automation",e.AUTOMATION_FIELDS="automationFields",e.MULTI_ATTACHMENTS="multi_attachments",e.TRIGGER_FILTER="trigger_filter",e))(Nd||{}),Al=(e=>(e.ROW_SAVED="ROW_SAVED",e.ROW_UPDATED="ROW_UPDATED",e.ROW_DELETED="ROW_DELETED",e.WEBHOOK="WEBHOOK",e.APP="APP",e.CRON="CRON",e.ROW_ACTION="ROW_ACTION",e))(Al||{}),Ld=(e=>(e.LOGIC="LOGIC",e.ACTION="ACTION",e.TRIGGER="TRIGGER",e))(Ld||{}),Tl=(e=>(e.SEND_EMAIL_SMTP="SEND_EMAIL_SMTP",e.CREATE_ROW="CREATE_ROW",e.UPDATE_ROW="UPDATE_ROW",e.DELETE_ROW="DELETE_ROW",e.EXECUTE_BASH="EXECUTE_BASH",e.OUTGOING_WEBHOOK="OUTGOING_WEBHOOK",e.EXECUTE_SCRIPT="EXECUTE_SCRIPT",e.EXECUTE_QUERY="EXECUTE_QUERY",e.SERVER_LOG="SERVER_LOG",e.DELAY="DELAY",e.FILTER="FILTER",e.QUERY_ROWS="QUERY_ROWS",e.LOOP="LOOP",e.COLLECT="COLLECT",e.OPENAI="OPENAI",e.TRIGGER_AUTOMATION_RUN="TRIGGER_AUTOMATION_RUN",e.BRANCH="BRANCH",e.discord="discord",e.slack="slack",e.zapier="zapier",e.integromat="integromat",e.n8n="n8n",e))(Tl||{}),dp=[...Object.values(Tl),...Object.values(Al)],Fd=(e=>(e.LOOPING="LOOPING",e))(Fd||{}),Vd=(e=>(e.NO_ITERATIONS="no_iterations",e))(Vd||{}),Ud=(e=>(e.SUCCESS="success",e.ERROR="error",e.STOPPED="stopped",e.STOPPED_ERROR="stopped_error",e.NO_CONDITION_MET="No branch condition met",e))(Ud||{}),Bd=(e=>(e.TRIGGER_FILTER_NOT_MET="Automation did not run. Filter conditions in trigger were not met.",e))(Bd||{}),Hd=(e=>(e.ROW_SAVE="row:save",e.ROW_UPDATE="row:update",e.ROW_DELETE="row:delete",e.APP_TRIGGER="app:trigger",e.CRON_TRIGGER="cron:trigger",e.WEBHOOK_TRIGGER="web:trigger",e.ROW_ACTION="row:action",e))(Hd||{}),zd=(e=>(e.ARRAY="Array",e.STRING="String",e))(zd||{}),jd=(e=>(e.BASIC="basic",e.BEARER="bearer",e))(jd||{}),Gd=(e=>(e.NONE="none",e.FORM_DATA="form",e.XML="xml",e.ENCODED="encoded",e.JSON="json",e.TEXT="text",e))(Gd||{}),qd=(e=>(e.GET="GET",e.POST="POST",e.PATCH="PATCH",e.PUT="PUT",e.HEAD="HEAD",e.DELETE="DELETE",e))(qd||{}),fp="bb_internal",Wd=(e=>(e.EXTERNAL="external",e.INTERNAL="internal",e))(Wd||{}),Yd=(e=>(e.STRING="string",e.LONGFORM="longform",e.OPTIONS="options",e.NUMBER="number",e.BOOLEAN="boolean",e.ARRAY="array",e.DATETIME="datetime",e.ATTACHMENTS="attachment",e.ATTACHMENT_SINGLE="attachment_single",e.LINK="link",e.FORMULA="formula",e.AUTO="auto",e.AI="ai",e.JSON="json",e.INTERNAL="internal",e.BARCODEQR="barcodeqr",e.SIGNATURE_SINGLE="signature_single",e.BIGINT="bigint",e.BB_REFERENCE="bb_reference",e.BB_REFERENCE_SINGLE="bb_reference_single",e))(Yd||{}),hp=["attachment_single","attachment","bb_reference","json","array"],Kd=["number","bigint"];function gp(e){return Kd.includes(e)}var Xd=["string","longform","options","number","boolean","datetime","bigint"];function vp(e){return Xd.includes(e)}var Qd=(e=>(e.ONE_TO_MANY="one-to-many",e.MANY_TO_ONE="many-to-one",e.MANY_TO_MANY="many-to-many",e))(Qd||{}),Zd=(e=>(e.FOREIGN_KEY="foreign_key",e))(Zd||{}),Jd=(e=>(e.CREATED_BY="createdBy",e.CREATED_AT="createdAt",e.UPDATED_BY="updatedBy",e.UPDATED_AT="updatedAt",e.AUTO_ID="autoID",e))(Jd||{}),$d=(e=>(e.ARRAY="array",e))($d||{}),ef=(e=>(e.STATIC="static",e.DYNAMIC="dynamic",e.AI="ai",e))(ef||{}),tf=(e=>(e.USER="user",e.USERS="users",e))(tf||{});function pp(e){return e.type==="link"}function mp(e){return e.relationshipType==="many-to-many"}function _p(e){return e.relationshipType==="one-to-many"}function bp(e){return e.relationshipType==="many-to-one"}var rf=(e=>(e.SUM="sum",e.AVG="avg",e.COUNT="count",e.MIN="min",e.MAX="max",e))(rf||{}),nf=(e=>(e.CALCULATION="calculation",e))(nf||{}),af=(e=>(e.SUM="sum",e.COUNT="count",e.STATISTICS="stats",e))(af||{}),io="_",yp="",wp=e=>`${e}${io}`,kl=(e=>(e.USER="us",e.GROUP="gr",e.WORKSPACE="workspace",e.CONFIG="config",e.TEMPLATE="template",e.APP="app",e.DEV="dev",e.APP_DEV="app_dev",e.APP_METADATA="app_metadata",e.ROLE="role",e.MIGRATIONS="migrations",e.DEV_INFO="devinfo",e.AUTOMATION_LOG="log_au",e.ACCOUNT_METADATA="acc_metadata",e.PLUGIN="plg",e.DATASOURCE="datasource",e.DATASOURCE_PLUS="datasource_plus",e.APP_BACKUP="backup",e.TABLE="ta",e.ROW="ro",e.AUTOMATION="au",e.LINK="li",e.WEBHOOK="wh",e.INSTANCE="inst",e.LAYOUT="layout",e.SCREEN="screen",e.QUERY="query",e.DEPLOYMENTS="deployments",e.METADATA="metadata",e.MEM_VIEW="view",e.USER_FLAG="flag",e.AUTOMATION_METADATA="meta_au",e.AUDIT_LOG="al",e.APP_MIGRATION_METADATA="_design/migrations",e.SCIM_LOG="scimlog",e.ROW_ACTIONS="ra",e))(kl||{}),Ep=Object.values(kl).sort((e,r)=>r.length-e.length);function Sp(e){return Ep.find(r=>e.startsWith(`${r}${io}`))}var Cp=["role","datasource","datasource_plus","ta","au","wh","screen","query","metadata","view","inst","layout"],sf=(e=>(e.USER_METADATA="ta_users",e))(sf||{}),Dl=(e=>(e.VIEW="view",e.ROW_ACTION="row_action",e))(Dl||{}),Ap=Object.values(Dl).sort((e,r)=>r.length-e.length);function Tp(e){return Ap.find(r=>e.startsWith(`${r}${io}`))}var of=(e=>(e.BACKUP="backup",e.RESTORE="restore",e))(of||{}),lf=(e=>(e.STARTED="started",e.PENDING="pending",e.COMPLETE="complete",e.FAILED="failed",e))(lf||{}),uf=(e=>(e.PUBLISH="publish",e.MANUAL="manual",e.SCHEDULED="scheduled",e.RESTORING="restoring",e))(uf||{}),cf=(e=>(e.AUTOMATION="automation",e))(cf||{}),df=(e=>(e.REAL="REAL",e.TEXT="VARCHAR",e.INT="INTEGER",e.BLOB="BLOB",e.NUMERIC="NUMERIC",e))(df||{}),kp=e=>e.type==="settings",Dp=e=>e.type==="smtp",xp=e=>e.type==="google",Op=e=>e.type==="oidc",Ip=e=>e.type==="scim",Rp=e=>e.type==="ai",ff=(e=>(e.SETTINGS="settings",e.ACCOUNT="account",e.SMTP="smtp",e.GOOGLE="google",e.OIDC="oidc",e.OIDC_LOGOS="logos_oidc",e.SCIM="scim",e.AI="ai",e))(ff||{}),hf=(e=>(e.OIDC="oidc",e.GOOGLE="google",e))(hf||{});function Pp(e){return!!e.providerType}var gf=(e=>(e.ACTIVE="active",e.INACTIVE="inactive",e))(gf||{});function Mp(e){return!!e.roles}var xl=(e=>(e.DATASOURCE="datasource",e.COMPONENT="component",e.AUTOMATION="automation",e))(xl||{}),vf=(e=>(e.NPM="NPM",e.GITHUB="Github",e.URL="URL",e.FILE="File Upload",e))(vf||{}),Np=Object.values(xl),pf=(e=>(e.ROW_QUERIES="rowQueries",e.DATASOURCE_QUERIES="datasourceQueries",e.AUTOMATIONS="automations",e))(pf||{}),Lp=["rows","queries","automations"],Fp=["queries","automations"],mf=(e=>(e.APP_BACKUP="app_backup",e))(mf||{}),_f=(e=>(e.DAILY="daily",e.WEEKLY="weekly",e.MONTHLY="monthly",e))(_f||{}),Vp=(e,r)=>e==="app_backup",Up="SYSTEM",Bp="auditLog",bf=(e=>(e.BUILDER="builder",e.APP="app",e))(bf||{}),yf=(e=>(e.DELETED="deleted",e))(yf||{}),wf=(e=>(e.ENVIRONMENT_VARIABLE_UPGRADE_PANEL_OPENED="environment_variable_upgrade_panel_opened",e))(wf||{}),Ef=(e=>(e.ASCENDING="ascending",e.DESCENDING="descending",e))(Ef||{}),Sf=(e=>(e.STRING="string",e.NUMBER="number",e))(Sf||{}),Cf=(e=>(e.WORKER="worker",e.APPS="apps",e))(Cf||{}),Af=(e=>(e.SQS_MISSING="sqs_missing",e))(Af||{});function Hp(e,r){St(r,!1);const n=()=>He(t(c),"$values",u),i=()=>He(t(p),"$errors",u),s=()=>He(t(y),"$dirty",u),a=()=>He(we(),"$currentStep",u),l=()=>He(t(_),"$enrichments",u),d=()=>He(t(T),"$currentStepValid",u),[u,g]=qt(),c=h(),p=h(),_=h(),S=h(),y=h(),T=h(),I=h(),k=Se.createEventDispatcher();let C=m(r,"dataSource",24,()=>{}),D=m(r,"disabled",8,!1),E=m(r,"readonly",8,!1),U=m(r,"initialValues",24,()=>{});const $=void 0;let R=m(r,"schema",24,()=>{}),H=m(r,"definition",24,()=>{}),J=m(r,"disableSchemaValidation",8,!1),de=m(r,"editAutoColumns",8,!1),fe=m(r,"provideContext",8,!0),we=m(r,"currentStep",8),pe=m(r,"formValue",28,()=>({}));const{Provider:De,ActionTypes:ke,createValidatorFromConstraints:ye}=Se.getContext("sdk");let ce=h([]);const Z=ai({values:{},errors:{},valid:!0,dirty:!1,currentStep:fr(we())});let Y=m(r,"form",12);const re=(A,M)=>$s(A,te=>te.reduce((ve,Ie)=>({...ve,[Ie.name]:M(Ie)}),{})),G=(A,M)=>$s(A,te=>te.some(ve=>{const Ie=he(M,ve.name)??ve.fieldState.defaultValue;return ve.fieldState.value!==Ie})),ae=A=>$s(A,M=>{const te={};return M.forEach(ve=>{if(ve.type==="attachment"){const Ie=ve.fieldState.value;let Pe=null;Array.isArray(Ie)&&Ie[0]!=null&&(Pe=Ie[0].url),te[`${ve.name}_first`]=Pe}}),te}),z=(A,M,te)=>{let ve=Ue(A||{});return Object.entries(M||{}).map(([Pe,Re])=>{var Oe;const oe=ge(Pe);return{key:Pe,value:Re,lastUpdate:((Oe=fr(oe).fieldState)==null?void 0:Oe.lastUpdate)||0}}).sort((Pe,Re)=>Pe.lastUpdate-Re.lastUpdate).forEach(({key:Pe,value:Re})=>{ue(ve,Pe,Re)}),Object.entries(te||{}).forEach(([Pe,Re])=>{ue(ve,Pe,Re)}),ve},ge=A=>t(ce).find(M=>fr(M).name===A),O=(A,M,te)=>{var ve;if(Array.isArray(A)&&te==="array"&&M){const Ie=((ve=M==null?void 0:M.constraints)==null?void 0:ve.inclusion)||[];return A.map(Pe=>String(Pe)).filter(Pe=>Ie.includes(Pe))}return A},q={registerField:(A,M,te=null,ve=!1,Ie=!1,Pe,Re=1)=>{var Je,nt,at,ct,it,_e,We,Ke;if(!A)return;const oe=J()?null:(nt=(Je=R())==null?void 0:Je[A])==null?void 0:nt.constraints,Oe=ye(oe,Pe,A,H());te=O(te,(at=R())==null?void 0:at[A],M);let Fe=he(U(),A)??te,Be=null,Le=`id-${Ne()}`;const Te=ge(A);if(Te){const{fieldState:Ae}=fr(Te);Le=Ae.fieldId,Ae.value!=null&&Ae.value!==""&&(Fe=Ae.value),Ae.error&&(Be=Oe==null?void 0:Oe(Fe))}const qe=!!((it=(ct=R())==null?void 0:ct[A])!=null&&it.autocolumn),Ze=ai({name:A,type:M,step:Re||1,fieldState:{fieldId:Le,value:Fe,error:Be,disabled:D()||ve||qe&&!de(),readonly:E()||Ie||((We=(_e=R())==null?void 0:_e[A])==null?void 0:We.readonly),fieldDisabled:ve,fieldReadOnly:Ie,defaultValue:te,validator:Oe,lastUpdate:Date.now()},fieldApi:ne(A),fieldSchema:((Ke=R())==null?void 0:Ke[A])??{}});if(Te){const Ae=t(ce).filter(je=>fr(je).name!==A);o(ce,[...Ae,Ze])}else o(ce,[...t(ce),Ze]);return Ze},validate:()=>{const A=t(ce).filter(ve=>fr(ve).step===fr(we()));let M=!0,te=!1;return A.forEach(ve=>{const Ie=fr(ve).fieldApi.validate();M=M&&Ie,!M&&!te&&(ee({field:fr(ve)}),te=!0)}),M},reset:()=>{t(ce).forEach(A=>{fr(A).fieldApi.reset()}),k("reset")},changeStep:({type:A,number:M})=>{A==="next"?we().update(te=>te+1):A==="prev"?we().update(te=>Math.max(1,te-1)):A==="first"?we().set(1):A==="specific"&&M&&!isNaN(M)&&we().set(parseInt(M))},setStep:A=>{A&&we().set(A)},setFieldValue:(A,M)=>{const te=ge(A);if(!te)return;const{fieldApi:ve}=fr(te);ve.setValue(M)},resetField:A=>{const M=ge(A);if(!M)return;const{fieldApi:te}=fr(M);te.reset()}},ne=A=>{const M=(Re,oe=!1)=>{const Oe=ge(A),{fieldState:Fe}=fr(Oe),{validator:Be}=Fe;if(!oe&&Fe.value===Re)return!1;const Le=Be==null?void 0:Be(Re);return Oe.update(Te=>(Te.fieldState.value=Re,Te.fieldState.error=Le,Te.fieldState.lastUpdate=Date.now(),Te)),k("change",{field:A,value:Re}),!0};return{setValue:M,reset:()=>{const Re=ge(A),{fieldState:oe}=fr(Re),Oe=oe.defaultValue;Re.update(Fe=>(Fe.fieldState.value=Oe,Fe.fieldState.error=null,Fe.fieldState.lastUpdate=Date.now(),Fe))},setDisabled:Re=>{ge(A).update(Oe=>{var Be,Le;Oe.fieldState.fieldDisabled=Re;const Fe=!!((Le=(Be=R())==null?void 0:Be[Oe.name])!=null&&Le.autocolumn);return Oe.fieldState.disabled=D()||Re||Fe&&!de(),Oe})},setReadOnly:Re=>{ge(A).update(Oe=>{var Fe,Be;return Oe.fieldState.fieldReadOnly=Re,Oe.fieldState.readonly=E()||Re||((Be=(Fe=R())==null?void 0:Fe[Oe.name])==null?void 0:Be.readonly),Oe})},deregister:()=>{ge(A).update(oe=>(oe.fieldState.validator=null,oe.fieldState.error=null,oe))},validate:()=>{const Re=ge(A);return M(fr(Re).fieldState.value,!0),!fr(Re).fieldState.error}}};Se.setContext("form",{formState:Z,formApi:q,dataSource:C()}),Se.setContext("form-step",ai(1));const se=({type:A,field:M,value:te})=>{if(A==="set")if(M==="_value"){let ve=te;if(typeof te=="string")try{ve=JSON.parse(te)}catch{return}typeof ve=="object"&&ve!==null&&(Object.keys(ve).forEach(Ie=>{const Pe=t(ce).find(Re=>fr(Re).name.toLowerCase()===Ie.toLowerCase());if(Pe){const Re=fr(Pe).name;q.setFieldValue(Re,ve[Ie])}}),q.validate())}else q.setFieldValue(M,te);else q.resetField(M)},ee=A=>{let M;typeof A.field=="string"?M=fr(ge(A.field)):M=A.field;const te=M.fieldState.fieldId,ve=document.getElementById(te);ve&&ve.focus({preventScroll:!0});const Ie=document.querySelector(`label[for="${te}"]`);Ie&&(Ie.style.scrollMargin="100px",Ie.scrollIntoView({behavior:"smooth",block:"nearest"}))},me=[{type:ke.ValidateForm,callback:q.validate},{type:ke.ClearForm,callback:q.reset},{type:ke.ChangeFormStep,callback:q.changeStep},{type:ke.UpdateFieldValue,callback:se},{type:ke.ScrollTo,callback:ee}];function Ne(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,A=>{const M=Math.random()*16|0;return(A==="x"?M:M&3|8).toString(16)})}function Ue(A){if(A==null||typeof A!="object")return A;if(Array.isArray(A))return A.map(Ue);const M={};for(const te in A)Object.prototype.hasOwnProperty.call(A,te)&&(M[te]=Ue(A[te]));return M}function he(A,M){if(!A||!M)return;const te=Array.isArray(M)?M:M.split(".");let ve=A;for(const Ie of te){if(ve==null)return;ve=ve[Ie]}return ve}function ue(A,M,te){if(!A||!M)return;const ve=Array.isArray(M)?M:M.split(".");let Ie=A;for(let Pe=0;Pe<ve.length-1;Pe++){const Re=ve[Pe];(!Ie[Re]||typeof Ie[Re]!="object")&&(Ie[Re]={}),Ie=Ie[Re]}Ie[ve[ve.length-1]]=te}const Q=(A,M)=>{t(ce).length>0&&t(ce).forEach(te=>{te.update(ve=>{var Pe,Re,oe,Oe;const Ie=!!((Re=(Pe=R())==null?void 0:Pe[ve.name])!=null&&Re.autocolumn);return ve.fieldState.disabled=A||ve.fieldState.fieldDisabled||Ie&&!de(),ve.fieldState.readonly=M||ve.fieldState.fieldReadOnly||((Oe=(oe=R())==null?void 0:oe[ve.name])==null?void 0:Oe.readonly),ve})})};x(()=>t(ce),()=>{sn(o(c,re(t(ce),A=>A.fieldState.value)),"$values",u)}),x(()=>n(),()=>{pe(n())}),x(()=>t(ce),()=>{sn(o(p,re(t(ce),A=>A.fieldState.error)),"$errors",u)}),x(()=>t(ce),()=>{sn(o(_,ae(t(ce))),"$enrichments",u)}),x(()=>i(),()=>{o(S,!Object.values(i()).some(A=>A!=null))}),x(()=>(t(ce),v(U())),()=>{sn(o(y,G(t(ce),U())),"$dirty",u)}),x(()=>(v(D()),v(E())),()=>{Q(D(),E())}),x(()=>(v(we()),t(ce)),()=>{sn(o(T,$s([we(),...t(ce)],([A,...M])=>!M.filter(te=>te.step===A).some(te=>te.fieldState.error!=null))),"$currentStepValid",u)}),x(()=>v(C()),()=>{Y({formState:Z,formApi:q,dataSource:C()})}),x(()=>(n(),i(),t(S),s(),a()),()=>{Z.set({values:n(),errors:i(),valid:t(S),dirty:s(),currentStep:a()})}),x(()=>(v(U()),n(),l()),()=>{pe(z(U(),n(),l()))}),x(()=>(v(pe()),t(S),s(),a(),d(),v(E()),v(D())),()=>{o(I,{...pe(),__value:pe(),__valid:t(S),__dirty:s(),__currentStep:a(),__currentStepValid:d(),__editing:!E()&&!D()})}),Mt();var B={size:$,formState:Z};Dt();var X=$e(),K=Ge(X);{var V=A=>{De(A,{get actions(){return me},get data(){return t(I)},children:(M,te)=>{var ve=$e(),Ie=Ge(ve);vr(Ie,r,"default",{},null),w(M,ve)},$$slots:{default:!0}})},ie=A=>{var M=$e(),te=Ge(M);vr(te,r,"default",{},null),w(A,M)};le(K,A=>{fe()?A(V):A(ie,!1)})}w(e,X),pr(r,"size",$),pr(r,"formState",Z);var N=Ct(B);return g(),N}function zp(e,r){St(r,!1);const n=()=>He(H,"$component",s),i=()=>He(R,"$context",s),[s,a]=qt(),l=h(),d=h(),u=h(),g=ae=>{let z=0;for(let ge=0;ge<ae.length;ge++){const O=ae.charCodeAt(ge);z=(z<<5)-z+O,z=z&z}return z.toString(16)};let c=m(r,"dataSource",8),p=m(r,"size",8),_=m(r,"disabled",8,!1),S=m(r,"readonly",8,!1),y=m(r,"actionType",8,"Create"),T=m(r,"initialFormStep",8,1),I=m(r,"disableSchemaValidation",8,!1),k=m(r,"editAutoColumns",8,!1),C=m(r,"provideContext",8,!0),D=m(r,"form",12),E=m(r,"formState",12),U=m(r,"formValue",28,()=>({})),$=m(r,"row",8);const R=Se.getContext("context"),H=Se.getContext("component"),{fetchDatasourceSchema:J,fetchDatasourceDefinition:de}=Se.getContext("sdk"),fe=()=>{const ae=parseInt(T().toString());return isNaN(ae)?1:ae};let we=h(),pe=h(),De=h(!1),ke=Se.getContext("current-step")||ai(fe());const ye=(ae,z,ge,O)=>{var ne,se,ee;if(ae!=="Update"&&ae!=="View")return{};const q=z==null?void 0:z.type;if(q!=="table"&&q!=="viewV2")return{};if($()&&q==="table"&&((ne=$())==null?void 0:ne.tableId)===z.tableId)return $();for(let me of ge.toReversed().slice(1))if(z.type==="viewV2"&&((se=O[me])==null?void 0:se._viewId)===z.id||z.type==="table"&&((ee=O[me])==null?void 0:ee.tableId)===z.tableId)return O[me];return{}},ce=async ae=>{try{o(we,await de(ae))}catch{o(we,void 0)}const z=await J(ae);o(pe,z||{}),t(De)||o(De,!0)},Z=ae=>{if(!ae)return null;const z=Object.keys(ae);return z.sort(),z.map(ge=>`${ge}:${ae[ge].type}`).join("-")};x(()=>v(c()),()=>{ce(c())}),x(()=>t(pe),()=>{o(l,Z(t(pe)))}),x(()=>(v(y()),v(c()),n(),i(),v($())),()=>{o(d,ye(y(),c(),n().path,i(),$()))}),x(()=>(t(l),t(d),v(y())),()=>{o(u,g(t(l)+JSON.stringify(t(d))+y()))}),Mt(),Dt();var Y=$e(),re=Ge(Y);{var G=ae=>{var z=$e(),ge=Ge(z);ea(ge,()=>t(u),O=>{{let q=Pt(()=>S()||y()=="View");Hp(O,{get dataSource(){return c()},get size(){return p()},get disabled(){return _()},get readonly(){return t(q)},get schema(){return t(pe)},get definition(){return t(we)},get initialValues(){return t(d)},get disableSchemaValidation(){return I()},get editAutoColumns(){return k()},get currentStep(){return ke},get provideContext(){return C()},get form(){return D()},set form(ne){D(ne)},get formState(){return E()},set formState(ne){E(ne)},get formValue(){return U()},set formValue(ne){U(ne)},$$events:{change(ne){Yn.call(this,r,ne)},reset(ne){Yn.call(this,r,ne)}},children:(ne,se)=>{var ee=$e(),me=Ge(ee);vr(me,r,"default",{},null),w(ne,ee)},$$slots:{default:!0},$$legacy:!0})}}),w(ae,z)};le(re,ae=>{t(De)&&ae(G)})}w(e,Y),Ct(),a()}function Tf(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function ao(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?Tf(Object(n),!0).forEach(function(i){Pa(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tf(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Ra(e){"@babel/helpers - typeof";return Ra=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ra(e)}function Pa(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function jp(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,a;for(a=0;a<i.length;a++)s=i[a],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}function Gp(e,r){if(e==null)return{};var n=jp(e,r),i,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)i=a[s],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function qp(e,r){return Yp(e)||Xp(e,r)||Ol(e,r)||Zp()}function Pn(e){return Wp(e)||Kp(e)||Ol(e)||Qp()}function Wp(e){if(Array.isArray(e))return Il(e)}function Yp(e){if(Array.isArray(e))return e}function Kp(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Xp(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i=[],s=!0,a=!1,l,d;try{for(n=n.call(e);!(s=(l=n.next()).done)&&(i.push(l.value),!(r&&i.length===r));s=!0);}catch(u){a=!0,d=u}finally{try{!s&&n.return!=null&&n.return()}finally{if(a)throw d}}return i}}function Ol(e,r){if(e){if(typeof e=="string")return Il(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Il(e,r)}}function Il(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,i=new Array(r);n<r;n++)i[n]=e[n];return i}function Qp(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
5
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zp(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
6
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ds(e,r){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ol(e))||r){n&&(e=n);var i=0,s=function(){};return{s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(u){throw u},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
7
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,l=!1,d;return{s:function(){n=n.call(e)},n:function(){var u=n.next();return a=u.done,u},e:function(u){l=!0,d=u},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(l)throw d}}}}var Jp="finalize",$p="consider";function Ma(e,r,n){e.dispatchEvent(new CustomEvent(Jp,{detail:{items:r,info:n}}))}function Li(e,r,n){e.dispatchEvent(new CustomEvent($p,{detail:{items:r,info:n}}))}var so="draggedEntered",fs="draggedLeft",oo="draggedOverIndex",Rl="draggedLeftDocument",lo={LEFT_FOR_ANOTHER:"leftForAnother",OUTSIDE_OF_ANY:"outsideOfAny"};function em(e,r,n){e.dispatchEvent(new CustomEvent(so,{detail:{indexObj:r,draggedEl:n}}))}function tm(e,r,n){e.dispatchEvent(new CustomEvent(fs,{detail:{draggedEl:r,type:lo.LEFT_FOR_ANOTHER,theOtherDz:n}}))}function rm(e,r){e.dispatchEvent(new CustomEvent(fs,{detail:{draggedEl:r,type:lo.OUTSIDE_OF_ANY}}))}function nm(e,r,n){e.dispatchEvent(new CustomEvent(oo,{detail:{indexObj:r,draggedEl:n}}))}function im(e){window.dispatchEvent(new CustomEvent(Rl,{detail:{draggedEl:e}}))}var on={DRAG_STARTED:"dragStarted",DRAGGED_ENTERED:so,DRAGGED_ENTERED_ANOTHER:"dragEnteredAnother",DRAGGED_OVER_INDEX:oo,DRAGGED_LEFT:fs,DRAGGED_LEFT_ALL:"draggedLeftAll",DROPPED_INTO_ZONE:"droppedIntoZone",DROPPED_INTO_ANOTHER:"droppedIntoAnother",DROPPED_OUTSIDE_OF_ANY:"droppedOutsideOfAny",DRAG_STOPPED:"dragStopped"},gn={POINTER:"pointer",KEYBOARD:"keyboard"},uo="isDndShadowItem",co="data-is-dnd-shadow-item-internal",am="data-is-dnd-shadow-item-hint",kf="id:dnd-shadow-placeholder-0000",sm="dnd-action-dragged-el",Tr="id",Pl=0;function Df(){Pl++}function xf(){if(Pl===0)throw new Error("Bug! trying to decrement when there are no dropzones");Pl--}var Ml=typeof window>"u";function Nl(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n,i=r?um(e):e.getBoundingClientRect(),s=getComputedStyle(e),a=s.transform;if(a){var l,d,u,g;if(a.startsWith("matrix3d("))n=a.slice(9,-1).split(/, /),l=+n[0],d=+n[5],u=+n[12],g=+n[13];else if(a.startsWith("matrix("))n=a.slice(7,-1).split(/, /),l=+n[0],d=+n[3],u=+n[4],g=+n[5];else return i;var c=s.transformOrigin,p=i.x-u-(1-l)*parseFloat(c),_=i.y-g-(1-d)*parseFloat(c.slice(c.indexOf(" ")+1)),S=l?i.width/l:e.offsetWidth,y=d?i.height/d:e.offsetHeight;return{x:p,y:_,width:S,height:y,top:_,right:p+S,bottom:_+y,left:p}}else return i}function Ll(e){var r=Nl(e);return{top:r.top+window.scrollY,bottom:r.bottom+window.scrollY,left:r.left+window.scrollX,right:r.right+window.scrollX}}function Of(e){var r=e.getBoundingClientRect();return{top:r.top+window.scrollY,bottom:r.bottom+window.scrollY,left:r.left+window.scrollX,right:r.right+window.scrollX}}function If(e){return{x:(e.left+e.right)/2,y:(e.top+e.bottom)/2}}function om(e,r){return Math.sqrt(Math.pow(e.x-r.x,2)+Math.pow(e.y-r.y,2))}function hs(e,r){return e.y<=r.bottom&&e.y>=r.top&&e.x>=r.left&&e.x<=r.right}function Rf(e){return If(Of(e))}function Pf(e,r){var n=Rf(r);return om(e,n)}function lm(e){var r=Of(e);return r.right<0||r.left>document.documentElement.scrollWidth||r.bottom<0||r.top>document.documentElement.scrollHeight}function um(e){for(var r=e.getBoundingClientRect(),n={top:r.top,bottom:r.bottom,left:r.left,right:r.right},i=!1,s=!1,a=e.parentElement;a&&a!==document.body;){var l=window.getComputedStyle(a),d=l.overflowY,u=l.overflowX,g=d==="scroll"||d==="auto",c=u==="scroll"||u==="auto";if(g||c){var p=a.getBoundingClientRect();if(g){var _=Math.max(n.top,p.top),S=Math.min(n.bottom,p.bottom);(_!==n.top||S!==n.bottom)&&(i=!0),n.top=_,n.bottom=S}if(c){var y=Math.max(n.left,p.left),T=Math.min(n.right,p.right);(y!==n.left||T!==n.right)&&(s=!0),n.left=y,n.right=T}}a=a.parentElement}return i||s?{top:n.top,bottom:n.bottom,left:n.left,right:n.right,width:Math.max(0,n.right-n.left),height:Math.max(0,n.bottom-n.top)}:{top:r.top,bottom:r.bottom,left:r.left,right:r.right,width:Math.max(0,r.right-r.left),height:Math.max(0,r.bottom-r.top)}}var Na;function Fl(){Na=new Map}Fl();function cm(e){var r=Array.from(e.children).findIndex(function(n){return n.getAttribute(co)});if(r>=0)return Na.has(e)||Na.set(e,new Map),Na.get(e).set(r,Ll(e.children[r])),r}function dm(e,r){var n=Ll(r);if(!hs(e,n))return null;var i=r.children;if(i.length===0)return{index:0,isProximityBased:!0};for(var s=cm(r),a=0;a<i.length;a++){var l=Ll(i[a]);if(hs(e,l)){var d=Na.has(r)&&Na.get(r).get(a);return d&&!hs(e,d)?{index:s,isProximityBased:!1}:{index:a,isProximityBased:!1}}}for(var u=Number.MAX_VALUE,g=void 0,c=0;c<i.length;c++){var p=Pf(e,i[c]);p<u&&(u=p,g=c)}if(i.length>0){var _=i.length,S=i[_-1],y=S.cloneNode(!1);y.style.visibility="hidden",y.style.pointerEvents="none",r.appendChild(y);var T=Pf(e,y);T<u&&(g=_),r.removeChild(y)}return{index:g,isProximityBased:!0}}function gs(e){return JSON.stringify(e,null,2)}function fo(e){if(!e)throw new Error("cannot get depth of a falsy node");return Mf(e,0)}function Mf(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.parentElement?Mf(e.parentElement,r+1):r-1}function fm(e,r){if(Object.keys(e).length!==Object.keys(r).length)return!1;for(var n in e)if(!{}.hasOwnProperty.call(r,n)||r[n]!==e[n])return!1;return!0}function hm(e,r){if(e.length!==r.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==r[n])return!1;return!0}var gm=200,Nf=10,Vl;function vm(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:gm,i=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0,a,l,d=!1,u,g=Array.from(r).sort(function(p,_){return fo(_)-fo(p)});function c(){var p=s(),_=i.multiScrollIfNeeded();if(!_&&u&&Math.abs(u.x-p.x)<Nf&&Math.abs(u.y-p.y)<Nf){Vl=window.setTimeout(c,n);return}if(lm(e)){im(e);return}u=p;var S=!1,y=ds(g),T;try{for(y.s();!(T=y.n()).done;){var I=T.value;_&&Fl();var k=dm(p,I);if(k!==null){var C=k.index;S=!0,I!==a?(a&&tm(a,e,I),em(I,k,e),a=I):C!==l&&(nm(I,k,e),l=C);break}}}catch(D){y.e(D)}finally{y.f()}!S&&d&&a?(rm(a,e),a=void 0,l=void 0,d=!1):d=!0,Vl=window.setTimeout(c,n)}c()}function pm(){clearTimeout(Vl),Fl()}var vs=30;function mm(){var e;function r(){e={directionObj:void 0,stepPx:0}}r();function n(a){var l=e,d=l.directionObj,u=l.stepPx;d&&(a.scrollBy(d.x*u,d.y*u),window.requestAnimationFrame(function(){return n(a)}))}function i(a){return vs-a}function s(a,l){if(!l)return!1;var d=_m(a,l),u=!!e.directionObj;if(d===null)return u&&r(),!1;var g=!1,c=!1;return l.scrollHeight>l.clientHeight&&(d.bottom<vs?(g=!0,e.directionObj={x:0,y:1},e.stepPx=i(d.bottom)):d.top<vs&&(g=!0,e.directionObj={x:0,y:-1},e.stepPx=i(d.top)),!u&&g)||l.scrollWidth>l.clientWidth&&(d.right<vs?(c=!0,e.directionObj={x:1,y:0},e.stepPx=i(d.right)):d.left<vs&&(c=!0,e.directionObj={x:-1,y:0},e.stepPx=i(d.left)),!u&&c)?(n(l),!0):(r(),!1)}return{scrollIfNeeded:s,resetScrolling:r}}function _m(e,r){var n=r===document.scrollingElement?{top:0,bottom:window.innerHeight,left:0,right:window.innerWidth}:r.getBoundingClientRect();return hs(e,n)?{top:e.y-n.top,bottom:n.bottom-e.y,left:e.x-n.left,right:n.right-e.x}:null}function bm(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0,n=wm(e),i=Array.from(n).sort(function(u,g){return fo(g)-fo(u)}),s=mm(),a=s.scrollIfNeeded,l=s.resetScrolling;function d(){var u=r();if(!u||!i)return!1;for(var g=i.filter(function(_){return hs(u,_.getBoundingClientRect())||_===document.scrollingElement}),c=0;c<g.length;c++){var p=a(u,g[c]);if(p)return!0}return!1}return{multiScrollIfNeeded:n.size>0?d:function(){return!1},destroy:function(){return l()}}}function ym(e){if(!e)return[];for(var r=[],n=e;n;){var i=window.getComputedStyle(n),s=i.overflow;s.split(" ").some(function(a){return a.includes("auto")||a.includes("scroll")})&&r.push(n),n=n.parentElement}return r}function wm(e){var r=new Set,n=ds(e),i;try{for(n.s();!(i=n.n()).done;){var s=i.value;ym(s).forEach(function(a){return r.add(a)})}}catch(a){n.e(a)}finally{n.f()}return(document.scrollingElement.scrollHeight>document.scrollingElement.clientHeight||document.scrollingElement.scrollWidth>document.scrollingElement.clientHeight)&&r.add(document.scrollingElement),r}function Em(e){var r=e.cloneNode(!0),n=[],i=e.tagName==="SELECT",s=i?[e]:Pn(e.querySelectorAll("select")),a=ds(s),l;try{for(a.s();!(l=a.n()).done;){var d=l.value;n.push(d.value)}}catch(D){a.e(D)}finally{a.f()}if(s.length>0)for(var u=i?[r]:Pn(r.querySelectorAll("select")),g=0;g<u.length;g++){var c=u[g],p=n[g],_=c.querySelector('option[value="'.concat(p,'"'));_&&_.setAttribute("selected",!0)}var S=e.tagName==="CANVAS",y=S?[e]:Pn(e.querySelectorAll("canvas"));if(y.length>0)for(var T=S?[r]:Pn(r.querySelectorAll("canvas")),I=0;I<T.length;I++){var k=y[I],C=T[I];C.width=k.width,C.height=k.height,k.width>0&&k.height>0&&C.getContext("2d").drawImage(k,0,0)}return r}var ps=Object.freeze({USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT:"USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT"}),Sm=Pa({},ps.USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT,!1);function Lf(e){if(!ps[e])throw new Error("Can't get non existing feature flag ".concat(e,"! Supported flags: ").concat(Object.keys(ps)));return Sm[e]}var Cm=.2;function na(e){return"".concat(e," ").concat(Cm,"s ease")}function Am(e,r){var n=e.getBoundingClientRect(),i=Em(e);Ff(e,i),i.id=sm,i.style.position="fixed";var s=n.top,a=n.left;if(i.style.top="".concat(s,"px"),i.style.left="".concat(a,"px"),r){var l=If(n);s-=l.y-r.y,a-=l.x-r.x,window.setTimeout(function(){i.style.top="".concat(s,"px"),i.style.left="".concat(a,"px")},0)}return i.style.margin="0",i.style.boxSizing="border-box",i.style.height="".concat(n.height,"px"),i.style.width="".concat(n.width,"px"),i.style.transition="".concat(na("top"),", ").concat(na("left"),", ").concat(na("background-color"),", ").concat(na("opacity"),", ").concat(na("color")," "),window.setTimeout(function(){return i.style.transition+=", ".concat(na("width"),", ").concat(na("height"))},0),i.style.zIndex="9999",i.style.cursor="grabbing",i}function Tm(e){e.style.cursor="grab"}function km(e,r,n,i){Ff(r,e);var s=r.getBoundingClientRect(),a=e.getBoundingClientRect(),l=s.width-a.width,d=s.height-a.height;if(l||d){var u={left:(n-a.left)/a.width,top:(i-a.top)/a.height};Lf(ps.USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT)||(e.style.height="".concat(s.height,"px"),e.style.width="".concat(s.width,"px")),e.style.left="".concat(parseFloat(e.style.left)-u.left*l,"px"),e.style.top="".concat(parseFloat(e.style.top)-u.top*d,"px")}}function Ff(e,r){var n=window.getComputedStyle(e);Array.from(n).filter(function(i){return i.startsWith("background")||i.startsWith("padding")||i.startsWith("font")||i.startsWith("text")||i.startsWith("align")||i.startsWith("justify")||i.startsWith("display")||i.startsWith("flex")||i.startsWith("border")||i==="opacity"||i==="color"||i==="list-style-type"||Lf(ps.USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT)&&(i==="width"||i==="height")}).forEach(function(i){return r.style.setProperty(i,n.getPropertyValue(i),n.getPropertyPriority(i))})}function Dm(e,r){e.draggable=!1,e.ondragstart=function(){return!1},r?(e.style.userSelect="",e.style.WebkitUserSelect="",e.style.cursor=""):(e.style.userSelect="none",e.style.WebkitUserSelect="none",e.style.cursor="grab")}function Vf(e){e.style.display="none",e.style.position="fixed",e.style.zIndex="-5"}function xm(e){e.style.visibility="hidden",e.setAttribute(co,"true")}function Om(e){e.style.visibility="",e.removeAttribute(co)}function ho(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return[]};e.forEach(function(i){var s=r(i);Object.keys(s).forEach(function(a){i.style[a]=s[a]}),n(i).forEach(function(a){return i.classList.add(a)})})}function go(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){return[]};e.forEach(function(i){var s=r(i);Object.keys(s).forEach(function(a){i.style[a]=""}),n(i).forEach(function(a){return i.classList.contains(a)&&i.classList.remove(a)})})}function Im(e){var r=e.style.minHeight;e.style.minHeight=window.getComputedStyle(e).getPropertyValue("height");var n=e.style.minWidth;return e.style.minWidth=window.getComputedStyle(e).getPropertyValue("width"),function(){e.style.minHeight=r,e.style.minWidth=n}}var Rm="--any--",Pm=100,Mm=20,vo=3,Nm=80,Uf={outline:"rgba(255, 255, 102, 0.7) solid 2px"},Bf="data-is-dnd-original-dragged-item",vn,kr,pn,po,sr,mo,Fi,zr,si,Mr,Vi=!1,Ul=!1,Bl,ms=!1,_o=[],_s,oi,bs=!1,Hl=!1,Kn=new Map,mr=new Map,zl=new WeakMap;function Lm(e,r){Kn.has(r)||Kn.set(r,new Set),Kn.get(r).has(e)||(Kn.get(r).add(e),Df())}function Hf(e,r){Kn.get(r).delete(e),xf(),Kn.get(r).size===0&&Kn.delete(r)}function Fm(){var e=Kn.get(po),r=ds(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value;i.addEventListener(so,zf),i.addEventListener(fs,jf),i.addEventListener(oo,Gf)}}catch(d){r.e(d)}finally{r.f()}window.addEventListener(Rl,La);var s=Math.max.apply(Math,Pn(Array.from(e.keys()).map(function(d){return mr.get(d).dropAnimationDurationMs}))),a=s===0?Mm:Math.max(s,Pm);_s=bm(e,function(){return Mr});var l=Hl?function(){return{x:Mr.x+window.scrollX,y:Mr.y+window.scrollY}}:function(){return Rf(kr)};vm(kr,e,a*1.07,_s,l)}function Vm(){var e=Kn.get(po),r=ds(e),n;try{for(r.s();!(n=r.n()).done;){var i=n.value;i.removeEventListener(so,zf),i.removeEventListener(fs,jf),i.removeEventListener(oo,Gf)}}catch(s){r.e(s)}finally{r.f()}window.removeEventListener(Rl,La),_s&&(_s.destroy(),_s=void 0),pm()}function bo(e){return e.findIndex(function(r){return!!r[uo]})}function Um(e){var r;return ao(ao({},e),{},(r={},Pa(r,uo,!0),Pa(r,Tr,kf),r))}function zf(e){var r=mr.get(e.currentTarget),n=r.items,i=r.dropFromOthersDisabled;if(!(i&&e.currentTarget!==sr)){if(ms=!1,n=n.filter(function(d){return d[Tr]!==Fi[Tr]&&d[Tr]!==kf}),sr!==e.currentTarget){var s=mr.get(sr).items,a=s.filter(function(d){return!d[uo]});Li(sr,a,{trigger:on.DRAGGED_ENTERED_ANOTHER,id:pn[Tr],source:gn.POINTER})}var l=e.detail.indexObj.index;zr=e.currentTarget,n.splice(l,0,Fi),Li(e.currentTarget,n,{trigger:on.DRAGGED_ENTERED,id:pn[Tr],source:gn.POINTER})}}function jf(e){if(Vi){var r=mr.get(e.currentTarget),n=r.items,i=r.dropFromOthersDisabled;if(!(i&&e.currentTarget!==sr&&e.currentTarget!==zr)){var s=Pn(n),a=bo(s);a!==-1&&s.splice(a,1);var l=zr;zr=void 0;var d=e.detail,u=d.type,g=d.theOtherDz;if(u===lo.OUTSIDE_OF_ANY||u===lo.LEFT_FOR_ANOTHER&&g!==sr&&mr.get(g).dropFromOthersDisabled){ms=!0,zr=sr;var c=l===sr?s:Pn(mr.get(sr).items);c.splice(mo,0,Fi),Li(sr,c,{trigger:on.DRAGGED_LEFT_ALL,id:pn[Tr],source:gn.POINTER})}Li(e.currentTarget,s,{trigger:on.DRAGGED_LEFT,id:pn[Tr],source:gn.POINTER})}}}function Gf(e){var r=mr.get(e.currentTarget),n=r.items,i=r.dropFromOthersDisabled;if(!(i&&e.currentTarget!==sr)){var s=Pn(n);ms=!1;var a=e.detail.indexObj.index,l=bo(s);l!==-1&&s.splice(l,1),s.splice(a,0,Fi),Li(e.currentTarget,s,{trigger:on.DRAGGED_OVER_INDEX,id:pn[Tr],source:gn.POINTER})}}function yo(e){e.preventDefault();var r=e.touches?e.touches[0]:e;Mr={x:r.clientX,y:r.clientY},kr.style.transform="translate3d(".concat(Mr.x-si.x,"px, ").concat(Mr.y-si.y,"px, 0)")}function La(){Ul=!0,window.removeEventListener("mousemove",yo),window.removeEventListener("touchmove",yo),window.removeEventListener("mouseup",La),window.removeEventListener("touchend",La),Vm(),Tm(kr),zr||(zr=sr);var e=mr.get(zr),r=e.items,n=e.type;go(Kn.get(n),function(a){return mr.get(a).dropTargetStyle},function(a){return mr.get(a).dropTargetClasses});var i=bo(r);i===-1&&zr===sr&&(i=mo),r=r.map(function(a){return a[uo]?pn:a});function s(){Bl(),Ma(zr,r,{trigger:ms?on.DROPPED_OUTSIDE_OF_ANY:on.DROPPED_INTO_ZONE,id:pn[Tr],source:gn.POINTER}),zr!==sr&&Ma(sr,mr.get(sr).items,{trigger:on.DROPPED_INTO_ANOTHER,id:pn[Tr],source:gn.POINTER});var a=Array.from(zr.children).find(function(l){return l.getAttribute(co)});a&&Om(a),zm()}mr.get(zr).dropAnimationDisabled?s():Bm(i,s)}function Bm(e,r){var n=e>-1?Nl(zr.children[e],!1):Nl(zr,!1),i={x:n.left-parseFloat(kr.style.left),y:n.top-parseFloat(kr.style.top)},s=mr.get(zr),a=s.dropAnimationDurationMs,l="transform ".concat(a,"ms ease");kr.style.transition=kr.style.transition?kr.style.transition+","+l:l,kr.style.transform="translate3d(".concat(i.x,"px, ").concat(i.y,"px, 0)"),window.setTimeout(r,a)}function Hm(e,r){_o.push({dz:e,destroy:r}),window.requestAnimationFrame(function(){Vf(e),document.body.appendChild(e)})}function zm(){kr&&kr.remove&&kr.remove(),vn&&vn.remove&&vn.remove(),kr=void 0,vn=void 0,pn=void 0,po=void 0,sr=void 0,mo=void 0,Fi=void 0,zr=void 0,si=void 0,Mr=void 0,Vi=!1,Ul=!1,Bl=void 0,ms=!1,oi&&clearTimeout(oi),oi=void 0,bs=!1,Hl=!1,_o.length&&(_o.forEach(function(e){var r=e.dz,n=e.destroy;n(),r.remove()}),_o=[])}function jm(e,r){var n=!1,i={items:void 0,type:void 0,flipDurationMs:0,dragDisabled:!1,morphDisabled:!1,dropFromOthersDisabled:!1,dropTargetStyle:Uf,dropTargetClasses:[],transformDraggedElement:function(){},centreDraggedOnCursor:!1,useCursorForDetection:!1,dropAnimationDisabled:!1,delayTouchStartMs:0},s=new Map;function a(){window.addEventListener("mousemove",u,{passive:!1}),window.addEventListener("touchmove",u,{passive:!1,capture:!1}),window.addEventListener("mouseup",d,{passive:!1}),window.addEventListener("touchend",d,{passive:!1})}function l(){window.removeEventListener("mousemove",u),window.removeEventListener("touchmove",u),window.removeEventListener("mouseup",d),window.removeEventListener("touchend",d),oi&&(clearTimeout(oi),oi=void 0,bs=!1)}function d(_){if(l(),vn=void 0,si=void 0,Mr=void 0,_.type==="touchend"){var S=new Event("click",{bubbles:!0,cancelable:!0});_.target.dispatchEvent(S)}}function u(_){var S=!!_.touches,y=S?_.touches[0]:_;if(S&&i.delayTouchStartMs>0&&!bs){Mr={x:y.clientX,y:y.clientY},(Math.abs(Mr.x-si.x)>=vo||Math.abs(Mr.y-si.y)>=vo)&&(oi&&(clearTimeout(oi),oi=void 0),d(_));return}_.preventDefault(),Mr={x:y.clientX,y:y.clientY},(Math.abs(Mr.x-si.x)>=vo||Math.abs(Mr.y-si.y)>=vo)&&(l(),c())}function g(_){if(!(_.target!==_.currentTarget&&(_.target.value!==void 0||_.target.isContentEditable))&&!_.button&&!Vi){var S=!!_.touches,y=S&&i.delayTouchStartMs>0;y||_.preventDefault(),_.stopPropagation();var T=S?_.touches[0]:_;si={x:T.clientX,y:T.clientY},Mr=ao({},si),vn=_.currentTarget,y&&(bs=!1,oi=window.setTimeout(function(){vn&&(bs=!0,l(),c())},i.delayTouchStartMs)),a()}}function c(){Vi=!0;var _=s.get(vn);mo=_,sr=vn.parentElement;var S=sr.closest("dialog")||sr.closest("[popover]")||sr.getRootNode(),y=S.body||S,T=i.items,I=i.type,k=i.centreDraggedOnCursor,C=i.useCursorForDetection,D=Pn(T);pn=D[_],po=I,Fi=Um(pn),Hl=C,kr=Am(vn,k&&Mr),y.appendChild(kr);function E(){vn.parentElement?window.requestAnimationFrame(E):(vn.setAttribute(Bf,!0),y.appendChild(vn),Fm(),Vf(vn),Fi[Tr]=pn[Tr],kr.focus())}window.requestAnimationFrame(E),ho(Array.from(Kn.get(i.type)).filter(function(U){return U===sr||!mr.get(U).dropFromOthersDisabled}),function(U){return mr.get(U).dropTargetStyle},function(U){return mr.get(U).dropTargetClasses}),D.splice(_,1,Fi),Bl=Im(sr),Li(sr,D,{trigger:on.DRAG_STARTED,id:pn[Tr],source:gn.POINTER}),window.addEventListener("mousemove",yo,{passive:!1}),window.addEventListener("touchmove",yo,{passive:!1,capture:!1}),window.addEventListener("mouseup",La,{passive:!1}),window.addEventListener("touchend",La,{passive:!1})}function p(_){var S=_.items,y=S===void 0?void 0:S,T=_.flipDurationMs,I=T===void 0?0:T,k=_.type,C=k===void 0?Rm:k,D=_.dragDisabled,E=D===void 0?!1:D,U=_.morphDisabled,$=U===void 0?!1:U,R=_.dropFromOthersDisabled,H=R===void 0?!1:R,J=_.dropTargetStyle,de=J===void 0?Uf:J,fe=_.dropTargetClasses,we=fe===void 0?[]:fe,pe=_.transformDraggedElement,De=pe===void 0?function(){}:pe,ke=_.centreDraggedOnCursor,ye=ke===void 0?!1:ke,ce=_.useCursorForDetection,Z=ce===void 0?!1:ce,Y=_.dropAnimationDisabled,re=Y===void 0?!1:Y,G=_.delayTouchStart,ae=G===void 0?!1:G;i.dropAnimationDurationMs=I;var z=0;ae===!0?z=Nm:typeof ae=="number"&&isFinite(ae)&&ae>=0&&(z=ae),i.delayTouchStartMs=z,i.type&&C!==i.type&&Hf(e,i.type),i.type=C,i.items=Pn(y),i.dragDisabled=E,i.morphDisabled=$,i.transformDraggedElement=De,i.centreDraggedOnCursor=ye,i.useCursorForDetection=Z,i.dropAnimationDisabled=re,n&&Vi&&!Ul&&(!fm(de,i.dropTargetStyle)||!hm(we,i.dropTargetClasses))&&(go([e],function(){return i.dropTargetStyle},function(){return we}),ho([e],function(){return de},function(){return we})),i.dropTargetStyle=de,i.dropTargetClasses=Pn(we);function ge(se,ee){return mr.get(se)?mr.get(se)[ee]:i[ee]}n&&Vi&&i.dropFromOthersDisabled!==H&&(H?go([e],function(se){return ge(se,"dropTargetStyle")},function(se){return ge(se,"dropTargetClasses")}):ho([e],function(se){return ge(se,"dropTargetStyle")},function(se){return ge(se,"dropTargetClasses")})),i.dropFromOthersDisabled=H,mr.set(e,i),Lm(e,C);for(var O=Vi?bo(i.items):-1,q=0;q<e.children.length;q++){var ne=e.children[q];if(Dm(ne,E),q===O){$||km(kr,ne,Mr.x,Mr.y),i.transformDraggedElement(kr,pn,q),xm(ne);continue}ne.removeEventListener("mousedown",zl.get(ne)),ne.removeEventListener("touchstart",zl.get(ne)),E||(ne.addEventListener("mousedown",g),ne.addEventListener("touchstart",g),zl.set(ne,g)),s.set(ne,q),n||(n=!0)}}return p(r),{update:function(S){p(S)},destroy:function(){function S(){Hf(e,mr.get(e).type),mr.delete(e)}Vi&&!e.closest("[".concat(Bf,"]"))?Hm(e,S):S()}}}var wo,jl={DND_ZONE_ACTIVE:"dnd-zone-active",DND_ZONE_DRAG_DISABLED:"dnd-zone-drag-disabled"},qf=(wo={},Pa(wo,jl.DND_ZONE_ACTIVE,"Tab to one the items and press space-bar or enter to start dragging it"),Pa(wo,jl.DND_ZONE_DRAG_DISABLED,"This is a disabled drag and drop list"),wo),Gm="dnd-action-aria-alert",yr;function Gl(){yr||(yr=document.createElement("div"),function(){yr.id=Gm,yr.style.position="fixed",yr.style.bottom="0",yr.style.left="0",yr.style.zIndex="-5",yr.style.opacity="0",yr.style.height="0",yr.style.width="0",yr.setAttribute("role","alert")}(),document.body.prepend(yr),Object.entries(qf).forEach(function(e){var r=qp(e,2),n=r[0],i=r[1];return document.body.prepend(Ym(n,i))}))}function qm(){return Ml?null:(document.readyState==="complete"?Gl():window.addEventListener("DOMContentLoaded",Gl),ao({},jl))}function Wm(){Ml||!yr||(Object.keys(qf).forEach(function(e){var r;return(r=document.getElementById(e))===null||r===void 0?void 0:r.remove()}),yr.remove(),yr=void 0)}function Ym(e,r){var n=document.createElement("div");return n.id=e,n.innerHTML="<p>".concat(r,"</p>"),n.style.display="none",n.style.position="fixed",n.style.zIndex="-5",n}function Fa(e){if(!Ml){yr||Gl(),yr.innerHTML="";var r=document.createTextNode(e);yr.appendChild(r),yr.style.display="none",yr.style.display="inline"}}var Km="--any--",Wf={outline:"rgba(255, 255, 102, 0.7) solid 2px"},Mn=!1,ql,Zr,ia="",aa,li,Ui="",Eo=new WeakSet,Yf=new WeakMap,Kf=new WeakMap,Wl=new Map,jr=new Map,Xn=new Map,So;function Xm(e,r){Xn.size===0&&(So=qm(),window.addEventListener("keydown",Qf),window.addEventListener("click",Zf)),Xn.has(r)||Xn.set(r,new Set),Xn.get(r).has(e)||(Xn.get(r).add(e),Df())}function Xf(e,r){Zr===e&&ys(),Xn.get(r).delete(e),xf(),Xn.get(r).size===0&&Xn.delete(r),Xn.size===0&&(window.removeEventListener("keydown",Qf),window.removeEventListener("click",Zf),So=void 0,Wm())}function Qf(e){if(Mn)switch(e.key){case"Escape":{ys();break}}}function Zf(){Mn&&(Eo.has(document.activeElement)||ys())}function Qm(e){if(Mn){var r=e.currentTarget;if(r!==Zr){ia=r.getAttribute("aria-label")||"";var n=jr.get(Zr),i=n.items,s=i.find(function(p){return p[Tr]===li}),a=i.indexOf(s),l=i.splice(a,1)[0],d=jr.get(r),u=d.items,g=d.autoAriaDisabled;r.getBoundingClientRect().top<Zr.getBoundingClientRect().top||r.getBoundingClientRect().left<Zr.getBoundingClientRect().left?(u.push(l),g||Fa("Moved item ".concat(Ui," to the end of the list ").concat(ia))):(u.unshift(l),g||Fa("Moved item ".concat(Ui," to the beginning of the list ").concat(ia)));var c=Zr;Ma(c,i,{trigger:on.DROPPED_INTO_ANOTHER,id:li,source:gn.KEYBOARD}),Ma(r,u,{trigger:on.DROPPED_INTO_ZONE,id:li,source:gn.KEYBOARD}),Zr=r}}}function Jf(){Wl.forEach(function(e,r){var n=e.update;return n(jr.get(r))})}function ys(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;jr.get(Zr).autoAriaDisabled||Fa("Stopped dragging item ".concat(Ui)),Eo.has(document.activeElement)&&document.activeElement.blur(),e&&Li(Zr,jr.get(Zr).items,{trigger:on.DRAG_STOPPED,id:li,source:gn.KEYBOARD}),go(Xn.get(ql),function(r){return jr.get(r).dropTargetStyle},function(r){return jr.get(r).dropTargetClasses}),aa=null,li=null,Ui="",ql=null,Zr=null,ia="",Mn=!1,Jf()}function Zm(e,r){var n={items:void 0,type:void 0,dragDisabled:!1,zoneTabIndex:0,zoneItemTabIndex:0,dropFromOthersDisabled:!1,dropTargetStyle:Wf,dropTargetClasses:[],autoAriaDisabled:!1};function i(c,p,_){c.length<=1||c.splice(_,1,c.splice(p,1,c[_])[0])}function s(c){switch(c.key){case"Enter":case" ":{if((c.target.disabled!==void 0||c.target.href||c.target.isContentEditable)&&!Eo.has(c.target))return;c.preventDefault(),c.stopPropagation(),Mn?ys():a(c);break}case"ArrowDown":case"ArrowRight":{if(!Mn)return;c.preventDefault(),c.stopPropagation();var p=jr.get(e),_=p.items,S=Array.from(e.children),y=S.indexOf(c.currentTarget);y<S.length-1&&(n.autoAriaDisabled||Fa("Moved item ".concat(Ui," to position ").concat(y+2," in the list ").concat(ia)),i(_,y,y+1),Ma(e,_,{trigger:on.DROPPED_INTO_ZONE,id:li,source:gn.KEYBOARD}));break}case"ArrowUp":case"ArrowLeft":{if(!Mn)return;c.preventDefault(),c.stopPropagation();var T=jr.get(e),I=T.items,k=Array.from(e.children),C=k.indexOf(c.currentTarget);C>0&&(n.autoAriaDisabled||Fa("Moved item ".concat(Ui," to position ").concat(C," in the list ").concat(ia)),i(I,C,C-1),Ma(e,I,{trigger:on.DROPPED_INTO_ZONE,id:li,source:gn.KEYBOARD}));break}}}function a(c){d(c.currentTarget),Zr=e,ql=n.type,Mn=!0;var p=Array.from(Xn.get(n.type)).filter(function(S){return S===Zr||!jr.get(S).dropFromOthersDisabled});if(ho(p,function(S){return jr.get(S).dropTargetStyle},function(S){return jr.get(S).dropTargetClasses}),!n.autoAriaDisabled){var _="Started dragging item ".concat(Ui,". Use the arrow keys to move it within its list ").concat(ia);p.length>1&&(_+=", or tab to another list in order to move the item into it"),Fa(_)}Li(e,jr.get(e).items,{trigger:on.DRAG_STARTED,id:li,source:gn.KEYBOARD}),Jf()}function l(c){Mn&&c.currentTarget!==aa&&(c.stopPropagation(),ys(!1),a(c))}function d(c){var p=jr.get(e),_=p.items,S=Array.from(e.children),y=S.indexOf(c);aa=c,aa.tabIndex=n.zoneItemTabIndex,li=_[y][Tr],Ui=S[y].getAttribute("aria-label")||""}function u(c){var p=c.items,_=p===void 0?[]:p,S=c.type,y=S===void 0?Km:S,T=c.dragDisabled,I=T===void 0?!1:T,k=c.zoneTabIndex,C=k===void 0?0:k,D=c.zoneItemTabIndex,E=D===void 0?0:D,U=c.dropFromOthersDisabled,$=U===void 0?!1:U,R=c.dropTargetStyle,H=R===void 0?Wf:R,J=c.dropTargetClasses,de=J===void 0?[]:J,fe=c.autoAriaDisabled,we=fe===void 0?!1:fe;n.items=Pn(_),n.dragDisabled=I,n.dropFromOthersDisabled=$,n.zoneTabIndex=C,n.zoneItemTabIndex=E,n.dropTargetStyle=H,n.dropTargetClasses=de,n.autoAriaDisabled=we,n.type&&y!==n.type&&Xf(e,n.type),n.type=y,Xm(e,y),we||(e.setAttribute("role","list"),e.setAttribute("aria-describedby",I?So.DND_ZONE_DRAG_DISABLED:So.DND_ZONE_ACTIVE)),jr.set(e,n),Mn?e.tabIndex=e===Zr||aa.contains(e)||n.dropFromOthersDisabled||Zr&&n.type!==jr.get(Zr).type?-1:0:e.tabIndex=n.zoneTabIndex,e.addEventListener("focus",Qm);for(var pe=function(ye){var ce=e.children[ye];Eo.add(ce),ce.tabIndex=Mn?-1:n.zoneItemTabIndex,we||ce.setAttribute("role","listitem"),ce.removeEventListener("keydown",Yf.get(ce)),ce.removeEventListener("click",Kf.get(ce)),I||(ce.addEventListener("keydown",s),Yf.set(ce,s),ce.addEventListener("click",l),Kf.set(ce,l)),Mn&&n.items[ye][Tr]===li&&(aa=ce,aa.tabIndex=n.zoneItemTabIndex,ce.focus())},De=0;De<e.children.length;De++)pe(De)}u(r);var g={update:function(p){u(p)},destroy:function(){Xf(e,n.type),jr.delete(e),Wl.delete(e)}};return Wl.set(e,g),g}var Jm=["items","flipDurationMs","type","dragDisabled","morphDisabled","dropFromOthersDisabled","zoneTabIndex","zoneItemTabIndex","dropTargetStyle","dropTargetClasses","transformDraggedElement","autoAriaDisabled","centreDraggedOnCursor","useCursorForDetection","delayTouchStart","dropAnimationDisabled"];function Yl(e,r){if($m(e))return{update:function(){},destroy:function(){}};$f(r);var n=jm(e,r),i=Zm(e,r);return{update:function(a){$f(a),n.update(a),i.update(a)},destroy:function(){n.destroy(),i.destroy()}}}function $m(e){return!!e.closest("[".concat(am,'="true"]'))}function $f(e){var r=e.items;e.flipDurationMs,e.type,e.dragDisabled,e.morphDisabled,e.dropFromOthersDisabled;var n=e.zoneTabIndex,i=e.zoneItemTabIndex;e.dropTargetStyle;var s=e.dropTargetClasses;e.transformDraggedElement,e.autoAriaDisabled,e.centreDraggedOnCursor,e.useCursorForDetection;var a=e.delayTouchStart;e.dropAnimationDisabled;var l=Gp(e,Jm);if(Object.keys(l).length>0&&console.warn("dndzone will ignore unknown options",l),!r)throw new Error("no 'items' key provided to dndzone");var d=r.find(function(c){return!{}.hasOwnProperty.call(c,Tr)});if(d)throw new Error("missing '".concat(Tr,"' property for item ").concat(gs(d)));if(s&&!Array.isArray(s))throw new Error("dropTargetClasses should be an array but instead it is a ".concat(Ra(s),", ").concat(gs(s)));if(n&&!eh(n))throw new Error("zoneTabIndex should be a number but instead it is a ".concat(Ra(n),", ").concat(gs(n)));if(i&&!eh(i))throw new Error("zoneItemTabIndex should be a number but instead it is a ".concat(Ra(i),", ").concat(gs(i)));if(a!==void 0&&a!==!1){var u=a===!0,g=typeof a=="number"&&isFinite(a)&&a>=0;if(!u&&!g)throw new Error("delayTouchStart should be a boolean (true/false) or a non-negative number but instead it is a ".concat(Ra(a),", ").concat(gs(a)))}}function eh(e){return!isNaN(e)&&function(r){return(r|0)===r}(parseFloat(e))}var th={exports:{}},Co=1;function e_(){return Co=(Co*9301+49297)%233280,Co/233280}function t_(e){Co=e}var r_={nextValue:e_,seed:t_},Kl=r_,sa="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-",Bi,rh,ws;function Xl(){ws=!1}function nh(e){if(!e){Bi!==sa&&(Bi=sa,Xl());return}if(e!==Bi){if(e.length!==sa.length)throw new Error("Custom alphabet for shortid must be "+sa.length+" unique characters. You submitted "+e.length+" characters: "+e);var r=e.split("").filter(function(n,i,s){return i!==s.lastIndexOf(n)});if(r.length)throw new Error("Custom alphabet for shortid must be "+sa.length+" unique characters. These characters were not unique: "+r.join(", "));Bi=e,Xl()}}function n_(e){return nh(e),Bi}function i_(e){Kl.seed(e),rh!==e&&(Xl(),rh=e)}function a_(){Bi||nh(sa);for(var e=Bi.split(""),r=[],n=Kl.nextValue(),i;e.length>0;)n=Kl.nextValue(),i=Math.floor(n*e.length),r.push(e.splice(i,1)[0]);return r.join("")}function ih(){return ws||(ws=a_(),ws)}function s_(e){var r=ih();return r[e]}function o_(){return Bi||sa}var Ql={get:o_,characters:n_,seed:i_,lookup:s_,shuffled:ih},Zl=typeof window=="object"&&(window.crypto||window.msCrypto),Jl;!Zl||!Zl.getRandomValues?Jl=function(e){for(var r=[],n=0;n<e;n++)r.push(Math.floor(Math.random()*256));return r}:Jl=function(e){return Zl.getRandomValues(new Uint8Array(e))};var l_=Jl;let u_="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ah=e=>crypto.getRandomValues(new Uint8Array(e)),sh=(e,r,n)=>{let i=(2<<Math.log(e.length-1)/Math.LN2)-1,s=-~(1.6*i*r/e.length);return(a=r)=>{let l="";for(;;){let d=n(s),u=s|0;for(;u--;)if(l+=e[d[u]&i]||"",l.length===a)return l}}};const c_=Hv(Object.freeze(Object.defineProperty({__proto__:null,customAlphabet:(e,r=21)=>sh(e,r,ah),customRandom:sh,nanoid:(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((r,n)=>(n&=63,n<36?r+=n.toString(36):n<62?r+=(n-26).toString(36).toUpperCase():n>62?r+="-":r+="_",r),""),random:ah,urlAlphabet:u_},Symbol.toStringTag,{value:"Module"})));var d_=Ql,f_=l_,h_=c_.customRandom;function g_(e){for(var r=0,n,i="";!n;)i=i+h_(d_.get(),1,f_)(),n=e<Math.pow(16,r+1),r++;return i}var v_=g_,Ao=v_,p_=1567752802062,m_=7,To,oh;function __(e){var r="",n=Math.floor((Date.now()-p_)*.001);return n===oh?To++:(To=0,oh=n),r=r+Ao(m_),r=r+Ao(e),To>0&&(r=r+Ao(To)),r=r+Ao(n),r}var b_=__,y_=Ql;function w_(e){if(!e||typeof e!="string"||e.length<6)return!1;var r=new RegExp("[^"+y_.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]");return!r.test(e)}var E_=w_;(function(e){var r=Ql,n=b_,i=E_,s=0;function a(g){return r.seed(g),e.exports}function l(g){return s=g,e.exports}function d(g){return g!==void 0&&r.characters(g),r.shuffled()}function u(){return n(s)}e.exports=u,e.exports.generate=u,e.exports.seed=a,e.exports.worker=l,e.exports.characters=d,e.exports.isValid=i})(th);var S_=th.exports,lh=S_,C_=F('<div aria-label="drag-handle"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="14" height="18" class="svelte-kbua7a"><path d="M8.5 7C9.32843 7 10 6.32843 10 5.5C10 4.67157 9.32843 4 8.5 4C7.67157 4 7 4.67157 7 5.5C7 6.32843 7.67157 7 8.5 7ZM8.5 13.5C9.32843 13.5 10 12.8284 10 12C10 11.1716 9.32843 10.5 8.5 10.5C7.67157 10.5 7 11.1716 7 12C7 12.8284 7.67157 13.5 8.5 13.5ZM10 18.5C10 19.3284 9.32843 20 8.5 20C7.67157 20 7 19.3284 7 18.5C7 17.6716 7.67157 17 8.5 17C9.32843 17 10 17.6716 10 18.5ZM15.5 7C16.3284 7 17 6.32843 17 5.5C17 4.67157 16.3284 4 15.5 4C14.6716 4 14 4.67157 14 5.5C14 6.32843 14.6716 7 15.5 7ZM17 12C17 12.8284 16.3284 13.5 15.5 13.5C14.6716 13.5 14 12.8284 14 12C14 11.1716 14.6716 10.5 15.5 10.5C16.3284 10.5 17 11.1716 17 12ZM15.5 20C16.3284 20 17 19.3284 17 18.5C17 17.6716 16.3284 17 15.5 17C14.6716 17 14 17.6716 14 18.5C14 19.3284 14.6716 20 15.5 20Z"></path></svg></div>'),A_=F('<i class="ph ph-trash-simple svelte-kbua7a"></i>'),T_=F('<li class="svelte-kbua7a"><!> <div><i class="ri-checkbox-blank-fill svelte-kbua7a"></i> <span class="svelte-kbua7a"> </span></div> <!></li>'),k_=F('<div class="clear-button svelte-kbua7a">Clear</div>'),D_=F("<li><div> </div> <!></li>"),x_=F('<li class="buttons svelte-kbua7a"><div class="add-button placeholder svelte-kbua7a"> </div></li>'),O_=F("<ul><!> <!></ul>");function uh(e,r){St(r,!1);const n=()=>He(I(),"$editorState",i),[i,s]=qt(),a=h(),l=h();let d=m(r,"items",24,()=>[]),u=m(r,"itemsColors",24,()=>[]),g=m(r,"itemsLabels",24,()=>[]),c=m(r,"showColors",8),p=m(r,"showHandle",12,!0),_=m(r,"listItemKey",8);const S="primaryDisplay";let y=m(r,"draggable",8,!0),T=m(r,"focus",8),I=m(r,"editorState",8);const k=void 0;let C=m(r,"reorderOnly",8),D=m(r,"placeholder",8),E=m(r,"fullSelection",8),U=m(r,"readonly",8),$=lh.generate(),R=ai({selected:null,actions:{select:O=>{R.update(q=>({...q,selected:O}))}}});const H=Se.createEventDispatcher();let J=h({}),de=h([]),fe=m(r,"inactive",12,!0);const we=O=>O.map(q=>({id:_()?q[_()]:lh.generate(),color:u()[q],item:q,type:$})).filter(q=>q.id),pe=O=>{o(de,O.detail.items)},De=()=>t(de).reduce((O,q)=>(O.push(q.item),O),[]),ke=O=>{fe(!0),pe(O),H("change",De())},ye=O=>{let q=t(de).findIndex(ne=>ne.id==O);q>-1&&(t(de).splice(q,1),H("change",De()))};x(()=>(v(T()),fr),()=>{T()&&R&&fr(R).actions.select(T())}),x(()=>v(U()),()=>{o(a,!U())}),x(()=>(v(y()),t(a)),()=>{p(y()&&t(a))}),x(()=>v(d()),()=>{o(de,we(d()))}),x(()=>t(de),()=>{var O;o(l,((O=t(de))==null?void 0:O.length)<1)}),Mt();var ce={listItemText:S,cellState:k};Dt();var Z=O_();let Y;var re=j(Z);At(re,3,()=>t(de),O=>O.id,(O,q)=>{var ne=T_(),se=j(ne);{var ee=X=>{var K=C_();let V;Ce(()=>{V=Me(K,1,"handle svelte-kbua7a",null,V,{inEdit:t(a)}),Ye(K,fe()?"cursor:grab":"cursor:grabbing")}),W("mousedown",K,()=>{fe(!1)}),W("mouseup",K,()=>{fe(!0)}),w(X,K)};le(se,X=>{p()&&X(ee)})}var me=Ee(se,2);let Ne,Ue;var he=Ee(j(me),2),ue=j(he),Q=Ee(me,2);{var B=X=>{var K=A_();W("mousedown",K,er(()=>ye(t(q).id))),w(X,K)};le(Q,X=>{!C()&&t(a)&&X(B)})}vt(ne,(X,K)=>zt(J,t(J)[K.id]=X),X=>{var K;return(K=t(J))==null?void 0:K[X.id]},()=>[t(q)]),Ce(()=>{Ne=Me(me,1,"right-content svelte-kbua7a",null,Ne,{showColors:c()}),Ue=Ye(me,"",Ue,{"--option-color":(v(u()),t(q),b(()=>u()[t(q).item]))}),Xe(ue,(v(g()),t(q),b(()=>g()[t(q).item]||t(q).item)))}),W("click",ne,()=>{fr(R).actions.select(t(q).id)}),w(O,ne)});var G=Ee(re,2);{var ae=O=>{var q=D_();let ne;var se=j(q);let ee;var me=j(se),Ne=Ee(se,2);{var Ue=he=>{var ue=k_();W("click",ue,er(()=>H("clear"))),w(he,ue)};le(Ne,he=>{t(de),b(()=>t(de).length)&&he(Ue)})}Ce(()=>{ne=Me(q,1,"buttons svelte-kbua7a",null,ne,{inEdit:t(a)}),ee=Me(se,1,"add-button svelte-kbua7a",null,ee,{disabled:E()}),Xe(me,n()=="Closed"?E()?"All Selected":"Select":"Close")}),W("click",se,er(()=>H("togglePicker"))),w(O,q)},z=O=>{var q=$e(),ne=Ge(q);{var se=ee=>{var me=x_(),Ne=j(me),Ue=j(Ne);Ce(()=>Xe(Ue,D())),w(ee,me)};le(ne,ee=>{v(d()),b(()=>d().length<1)&&ee(se)},!0)}w(O,q)};le(G,O=>{t(a)&&!C()?O(ae):O(z,!1)})}Pr(Z,(O,q)=>Yl==null?void 0:Yl(O,q),()=>({items:t(de),dropTargetStyle:{outline:"none"},dragDisabled:!y()||fe(),type:$,dropFromOthersDisabled:!0})),Ut(()=>W("finalize",Z,ke)),Ut(()=>W("consider",Z,pe)),Ce(()=>Y=Me(Z,1,"list-wrap svelte-kbua7a",null,Y,{inEdit:t(a)})),w(e,Z),pr(r,"listItemText",S),pr(r,"cellState",k);var ge=Ct(ce);return s(),ge}var I_=F("<button><i></i></button> <!>",1);function $l(e,r){St(r,!1);const n=Se.createEventDispatcher();let i=m(r,"icon",8),s=m(r,"disabled",8,!1),a=m(r,"size",8,"medium"),l=m(r,"tooltip",24,()=>{}),d=m(r,"variant",8,"primary"),u=h(),g=h(!1),c;const p=()=>{c&&clearTimeout(c),c=setTimeout(()=>{o(g,!0)},750)},_=()=>{c&&(clearTimeout(c),c=void 0),o(g,!1)};Se.onDestroy(()=>{c&&clearTimeout(c)});function S(){s()||n("click")}Dt();var y=I_(),T=Ge(y);let I;var k=j(T);vt(T,E=>o(u,E),()=>t(u));var C=Ee(T,2);{var D=E=>{no(E,{get anchor(){return t(u)},get content(){return l()},get show(){return t(g)}})};le(C,E=>{l()&&E(D)})}Ce(()=>{I=Me(T,1,`icon-button ${a()??""} ${d()??""}`,"svelte-eijxgh",I,{disabled:s()}),Me(k,1,`ph ph-${i()??""}`,"svelte-eijxgh")}),W("click",T,S),W("mouseenter",T,function(...E){var U;(U=l()?p:void 0)==null||U.apply(this,E)}),W("mouseleave",T,function(...E){var U;(U=l()?_:void 0)==null||U.apply(this,E)}),w(e,y),Ct()}function or(e,r={}){const n=new Set;let i;function s(c){if(!(c instanceof Function))throw new TypeError("callback is not a function");return n.add(c),c(e),()=>n.delete(c)}function a(c,p,_){const S={from:e,to:c,event:p,args:_};l("_exit",S),e=c,n.forEach(y=>y(e)),l("_enter",S)}function l(c,...p){var S,y;const _=((S=r[e])==null?void 0:S[c])??((y=r["*"])==null?void 0:y[c]);return _ instanceof Function?_.apply(i,p):_}function d(c,...p){var S;const _=(S=l(c,...p))==null?void 0:S.valueOf();return["string","symbol"].includes(typeof _)&&_!==e&&a(_,c,p),e}const u={};async function g(c,p=100,..._){return clearTimeout(u[c]),p===null?e:(await new Promise(S=>u[c]=setTimeout(S,p)),delete u[c],d(c,..._))}return i=new Proxy({subscribe:s},{get(c,p){return Reflect.has(c,p)||(c[p]=d.bind(null,p),c[p].debounce=g.bind(null,p)),Reflect.get(c,p)}}),l("_enter",{from:null,to:e,event:null,args:[]}),i}const Nn={S:{cellPadding:"0.4rem",rowFontSize:12,rowHeight:32,headerFontSize:10,headerHeight:32,checkboxSize:12},M:{cellPadding:"0.5rem",rowFontSize:13,rowHeight:36,headerFontSize:11,headerHeight:38,checkboxSize:14},L:{cellPadding:"0.85rem",rowFontSize:15,rowHeight:42,headerFontSize:12,headerHeight:48,checkboxSize:14}},ch={string:"fuzzy",longform:"fuzzy",formula:"fuzzy",array:"contains",options:"equal",datetime:"rangeLow",boolean:"equal",number:"equal",bigint:"equal",link:"fuzzy",bb_reference_single:"equal",bb_reference:"equal"},R_={string:!0,longform:!0,array:!0,options:!0,datetime:!0,boolean:!0,number:!0,bigint:!0,link:!0,bb_reference_single:!1,bb_reference:!1},P_={string:!0,longform:!0,formula:!0,array:!0,options:!0,datetime:!0,boolean:!0,number:!0,bigint:!0},M_={string:!0,longform:!0,array:!0,link:!0,json:!0,bb_reference:!0,bb_reference_single:!0,options:!0,datetime:!0,boolean:!0,number:!0,bigint:!0,attachment:!0,attachment_single:!0};var N_=F("<div><div></div></div> <div><div></div></div>",1);function L_(e,r){St(r,!1);const n=()=>He(y,"$stbSettings",a),i=()=>He(_,"$stbScrollPos",a),s=()=>He(S,"$stbHorizontalScrollPos",a),[a,l]=qt(),d=h(),u=h(),g=h(),c=h(),p=h(),_=Se.getContext("stbScrollPos"),S=Se.getContext("stbHorizontalScrollPos"),y=Se.getContext("stbSettings");let T=m(r,"highlighted",8),I=m(r,"horizontalOffset",8,"0px"),k=m(r,"clientHeight",8),C=m(r,"scrollHeight",8),D=m(r,"scrollWidth",12),E=m(r,"visible",12),U=m(r,"horizontalVisible",12),$=m(r,"anchor",12);const R=Se.createEventDispatcher();let H=h(),J=h(),de=h(),fe=h(),we=h(),pe=h(!1),De=h(!1),ke=h(0),ye=h(),ce=h();const Z=()=>{var ue,Q,B,X,K;$()&&(o(fe,Math.max(C()-k(),0)),o(we,((ue=$())==null?void 0:ue.scrollWidth)-((Q=$())==null?void 0:Q.clientWidth)),E(t(fe)),U(t(we)),D((B=$())==null?void 0:B.scrollWidth),o(ye,((X=$())==null?void 0:X.clientWidth)/((K=$())==null?void 0:K.scrollWidth)*100+"%"))};Se.afterUpdate(()=>{Z==null||Z()}),x(()=>n(),()=>{o(d,n().appearance.headerHeight+8+"px")}),x(()=>n(),()=>{o(u,n().appearance.footerHeight+16+"px")}),x(()=>n(),()=>{o(g,n().appearance.footerHeight+8+"px")}),x(()=>(i(),v(C())),()=>{o(c,i()/(C()+32)*100+"%")}),x(()=>(s(),v(D())),()=>{o(ce,s()/D()*100+"%")}),x(()=>(v(k()),v(C())),()=>{o(p,k()/C()*100+"%")}),Mt();var Y={calculate:Z};Dt();var re=N_();W("mouseup",qs,()=>{o(pe,!1),o(De,!1),o(ke,0),o(H,0),o(de,0)}),W("mousemove",qs,function(...ue){var Q;(Q=t(pe)||t(De)?B=>{var X,K;t(pe)&&(B.preventDefault(),B.stopPropagation(),o(ke,(B.clientY-t(H))*(C()/k())+t(J)),t(ke)>0&&t(ke)<=t(fe)&&Qe(_,t(ke)),R("positionChange")),t(De)&&(B.preventDefault(),B.stopPropagation(),o(ke,(B.clientX-t(de))*(((X=$())==null?void 0:X.scrollWidth)/((K=$())==null?void 0:K.clientWidth))+t(J)),t(ke)>0&&t(ke)<=t(we)&&Qe(S,t(ke))),$($().scrollLeft=s(),!0)}:()=>{})==null||Q.apply(this,ue)});var G=Ge(re);let ae,z;var ge=j(G);let O,q;var ne=Ee(G,2);let se,ee;var me=j(ne);let Ne,Ue;Ce(()=>{ae=Me(G,1,"stb-scrollbar svelte-axd59o",null,ae,{hidden:!t(fe),highlighted:T()||t(pe)}),z=Ye(G,"",z,{"--offset":t(d),"--bottomOffset":t(u)}),O=Me(ge,1,"stb-scrollbar-indicator svelte-axd59o",null,O,{dragging:t(pe)}),q=Ye(ge,"",q,{top:t(c),height:t(p)}),se=Me(ne,1,"stb-scrollbar horizontal svelte-axd59o",null,se,{hidden:!t(we),highlighted:T()||t(De)}),ee=Ye(ne,"",ee,{"--horizontalOffset":I(),"--horizontalBottomOffset":t(g)}),Ne=Me(me,1,"stb-scrollbar-indicator horizontal svelte-axd59o",null,Ne,{dragging:t(De)}),Ue=Ye(me,"",Ue,{left:t(ce),width:t(ye)})}),W("mousedown",ge,er(dr(ue=>{o(pe,!0),o(H,ue.clientY),o(J,i())}))),W("mousedown",me,er(dr(ue=>{o(De,!0),o(de,ue.clientX),o(J,s())}))),w(e,re),pr(r,"calculate",Z);var he=Ct(Y);return l(),he}var F_=F('<div class="emptyTable"><i class="ri-search-line"></i> </div>');function V_(e,r){let n=m(r,"top",8),i=m(r,"bottom",8),s=m(r,"isEmpty",8),a=m(r,"message",8,"No Records Found");var l=$e(),d=Ge(l);{var u=g=>{var c=F_();let p;var _=Ee(j(c));Ce(()=>{p=Ye(c,"",p,{top:n(),bottom:i()}),Xe(_,` ${a()??""}`)}),w(g,c)};le(d,g=>{s()&&g(u)})}w(e,l)}var U_=F('<i class="ri-loader-2-line"></i>'),B_=F('<i class="ri-save-fill"></i>'),H_=F("<div><span>+</span></div> <div><!></div>",1),z_=F('<div><i class="ri-filter-off-line"></i></div>'),j_=F("<!> <!>",1);function G_(e,r){St(r,!1);const n=()=>He(l(),"$stbState",i),[i,s]=qt(),a=h();let l=m(r,"stbState",8),d=m(r,"tableAPI",8),u=m(r,"highlighted",8),g=m(r,"footer",8),c=m(r,"tableActions",8);x(()=>n(),()=>{o(a,n()=="Inserting")}),Mt(),Dt();var p=j_(),_=Ge(p);{var S=I=>{var k=H_(),C=Ge(k);let D;var E=Ee(C,2);let U;var $=j(E);{var R=J=>{var de=U_();w(J,de)},H=J=>{var de=B_();w(J,de)};le($,J=>{n()=="Saving"?J(R):J(H,!1)})}Ce(()=>{D=Me(C,1,"overlay-button add-row-overlay",null,D,{highlighted:u(),footer:g(),"in-insert":t(a)}),U=Me(E,1,"overlay-button save-row-overlay",null,U,{highlighted:u(),footer:g(),"in-insert":t(a)})}),W("click",C,()=>t(a)?l().cancelAddRow():l().addRow()),W("click",E,function(...J){var de;(de=d().insertRow)==null||de.apply(this,J)}),w(I,k)};le(_,I=>{n(),t(a),v(c()),b(()=>{var k;return n()=="Idle"||t(a)||((k=c())==null?void 0:k.length)})&&I(S)})}var y=Ee(_,2);{var T=I=>{var k=z_(),C=es(()=>l().clear());let D;Ce(()=>D=Me(k,1,"overlay-button filter-row-overlay",null,D,{highlighted:u(),footer:g()})),W("click",k,function(...E){var U;(U=t(C))==null||U.apply(this,E)}),w(I,k)};le(y,I=>{n()=="Filtered"&&I(T)})}w(e,p),Ct(),s()}function q_(e){return--e*e*e*e*e+1}var W_=F('<div><!> <span class="text"> </span> <!></div>');function Y_(e,r){St(r,!1);const n=()=>He(T(),"$stbSelected",a),i=()=>He(c(),"$stbSettings",a),s=()=>He(g(),"$stbState",a),[a,l]=qt(),d=h(),u=h();let g=m(r,"stbState",8),c=m(r,"stbSettings",8),p=m(r,"tableAPI",8),_=m(r,"highlighted",8),S=m(r,"footer",8),y=m(r,"selectedActions",8),T=m(r,"stbSelected",8),I=m(r,"entityPlural",8,"Rows"),k=m(r,"entitySingular",8,"Row"),C=h();x(()=>n(),()=>{n().length==0&&o(C,!1)}),x(()=>i(),()=>{o(d,!i().appearance.hideSelectionColumn)}),x(()=>(t(d),i()),()=>{o(u,1+(t(d)+i().features.canDelete+i().appearance.numberingColumn)*2+"rem")}),Mt(),Dt();var D=$e(),E=Ge(D);{var U=$=>{var R=W_();let H,J;var de=j(R);ra(de,{icon:"ri-close-line",quiet:!0,size:"S",type:"secondary",onClick:()=>o(C,!0)});var fe=Ee(de,2),we=j(fe),pe=Ee(fe,2);At(pe,1,y,Ft,(De,ke)=>{let ye=()=>t(ke).text,ce=()=>t(ke).icon,Z=()=>t(ke).disabled,Y=()=>t(ke).type,re=()=>t(ke).size,G=()=>t(ke).onClick;{let ae=Pt(()=>(v(p()),G(),b(()=>p().executeSelectedRowsAction(G()))));ra(De,{get text(){return ye()},get icon(){return ce()},quiet:!0,get type(){return Y()},get disabled(){return Z()},get size(){return re()},get onClick(){return t(ae)}})}}),Ce(()=>{H=Me(R,1,"selected-row-actions-overlay",null,H,{highlighted:_(),footer:S()}),J=Ye(R,"",J,{bottom:(i(),b(()=>i().appearance.footerHeight+20)),left:t(u)}),Xe(we,`${n(),v(k()),v(I()),b(()=>n().length==1?n().length+" "+(k()||"Row")+" ":n().length+" "+(I()||"Rows")+" ")??""} Selected`)}),cl(3,R,()=>Pv,()=>({delay:25,duration:230,easing:q_,axis:"y"})),w($,R)};le(E,$=>{n(),s(),t(C),b(()=>n().length&&s()!="Inserting"&&!t(C))&&$(U)})}w(e,D),Ct(),l()}var K_=F('<div class="overlay-button loader-overlay"><i class="ri-refresh-line"></i></div>');function X_(e){var r=K_();w(e,r)}var Q_=F('<i class="ri-filter-3-line svelte-18zlale" tabindex="0" style="align-self: center; font-size: 14px;"></i>'),Z_=F("<!> <!>",1),J_=F('<div class="headerLabel"><div> </div></div>'),$_=F("<i></i>"),eb=F('<span class="placeholder svelte-18zlale"><!></span>'),tb=F('<li role="menuitem"><span class="spectrum-Menu-itemLabel"> </span></li>'),rb=F('<ul class="spectrum-Menu" role="menu" style="background-color: var(--spectrum-global-color-gray-75 );"></ul>'),nb=F("<div><!> <!></div> <!>",1);function ib(e,r){St(r,!1);const n=()=>He(g,"$columnOptions",a),i=()=>He(p,"$columnState",a),s=()=>He(c,"$cellOptions",a),[a,l]=qt(),d=h(),u=h(),g=Se.getContext("stColumnOptions"),c=Se.getContext("stHeaderCellOptions"),p=Se.getContext("stColumnState"),{API:_}=Se.getContext("sdk");let S=m(r,"sorted",8),y=h(),T=h(!1),I=h(),k=h(n().defaultFilteringOperator),C=h(),D=h(),E=h();const U=G=>{G.detail!=null&&G.detail!=null&&G.detail!=""?(o(I,G.detail),n().schema.type=="boolean"&&t(I)===!1?p.filter($("notEqual",!0)):Array.isArray(G.detail)&&G.detail.length==0?p.clear():p.filter($(t(k),t(I)))):(o(T,!1),o(I,null),p.clear())},$=(G,ae)=>{let z;return G=="oneOf"&&!Array.isArray(ae)?z=ae.split(","):G!="oneOf"&&G!="containsAny"&&Array.isArray(ae)?(z=ae[0],o(I,z)):z=ae,{field:t(D),operator:G,value:z,type:t(d)?"string":n().schema.type,valueType:"Value"}},R=G=>{o(k,G),(t(I)||G=="empty"||G=="notEmpty")&&p.filter($(t(k),t(I)??"")),o(T,!1)},H=G=>{t(y).matches(":focus-within")||p.cancel()},J=async G=>{G&&o(C,await _.fetchTableDefinition(G))};x(()=>n(),()=>{o(d,n().schema.type=="link")}),x(()=>(t(d),t(C),n()),()=>{t(d)&&!t(C)&&n().canFilter&&J(n().schema.tableId)}),x(()=>(t(d),t(C),n()),()=>{var G;t(d)&&t(C)?o(D,"1:"+n().name+"."+((G=t(C))==null?void 0:G.primaryDisplay)):o(D,n().name)}),x(()=>i(),()=>{o(u,i()=="Entering")}),Mt(),Dt();var de=nb(),fe=Ge(de);let we,pe;var De=j(fe);{var ke=G=>{var ae=Z_(),z=Ge(ae);{var ge=q=>{var ne=Q_();W("click",ne,er(()=>o(T,!t(T)))),w(q,ne)};le(z,q=>{n(),b(()=>n().canFilter=="advanced")&&q(ge)})}var O=Ee(z,2);{let q=Pt(()=>(s(),t(k),b(()=>({...s(),placeholder:t(k),disabled:t(k)=="empty"||t(k)=="notEmpty"})))),ne=Pt(()=>t(k)=="containsAny"||t(k)=="oneOf");ul(O,()=>n().headerComponent,(se,ee)=>{ee(se,{get cellOptions(){return t(q)},get value(){return t(I)},get fieldSchema(){return n(),b(()=>n().schema)},get multi(){return t(ne)},$$events:{change:U,cancel(...me){var Ne;(Ne=p.cancel)==null||Ne.apply(this,me)},focusout:H}})})}w(G,ae)},ye=G=>{var ae=J_();let z;var ge=j(ae);let O;var q=j(ge);Ce(()=>{z=Ye(ae,"",z,{"justify-content":(n(),b(()=>{var ne;return(ne=n())==null?void 0:ne.headerAlign}))}),O=Me(ge,1,"innerText svelte-18zlale",null,O,{sortable:n().canSort}),Xe(q,(n(),b(()=>n().displayName??n().name)))}),W("click",ae,function(...ne){var se;(se=p.headerClicked)==null||se.apply(this,ne)}),w(G,ae)};le(De,G=>{i()=="Entering"||i()=="Filtered"?G(ke):G(ye,!1)})}var ce=Ee(De,2);{var Z=G=>{var ae=eb(),z=j(ae);{var ge=O=>{var q=$_();let ne;Ce(()=>ne=Me(q,1,Sn(S()=="ascending"?"ri-sort-asc":"ri-sort-desc"),"svelte-18zlale",ne,{sorted:S()})),w(O,q)};le(z,O=>{(t(E)||S())&&O(ge)})}W("click",ae,function(...O){var q;(q=p.sort)==null||q.apply(this,O)}),w(G,ae)};le(ce,G=>{n(),i(),b(()=>n().canSort&&i()=="Idle")&&G(Z)})}vt(fe,G=>o(y,G),()=>t(y));var Y=Ee(fe,2);{var re=G=>{Qr(G,{get anchor(){return t(y)},get open(){return t(T)},align:"left",minWidth:160,$$events:{close:()=>{o(T,!1),H()}},children:(ae,z)=>{var ge=rb();At(ge,5,()=>(n(),b(()=>n().filteringOperators)),Ft,(O,q)=>{var ne=tb();let se;var ee=j(ne),me=j(ee);Ce(()=>{se=Me(ne,1,"spectrum-Menu-item svelte-18zlale",null,se,{selected:t(q).value==t(k)}),Xe(me,(t(q),b(()=>t(q).label)))}),W("mousedown",ne,er(()=>R(t(q).value))),w(O,ne)}),w(ae,ge)},$$slots:{default:!0}})};le(Y,G=>{n(),i(),b(()=>n().canFilter=="advanced"&&i()!="Idle")&&G(re)})}Ce(()=>{we=Me(fe,1,"super-column-header svelte-18zlale",null,we,{isEntering:t(u),filtered:i()=="Filtered",idle:i()!="Entering"&&i()!="Filtered"}),pe=Ye(fe,"",pe,{"padding-left":(s(),b(()=>s().padding)),"padding-right":(s(),b(()=>s().padding))})}),W("mouseenter",fe,()=>o(E,!0)),W("mouseleave",fe,()=>o(E,!1)),w(e,de),Ct(),l()}var ab=F("<div> </div>"),sb=F("<!> <!>",1),ob=F("<div><!></div>");function lb(e,r){St(r,!1);const n=()=>He(U,"$rowMetadata",u),i=()=>He($,"$stbHovered",u),s=()=>He(de,"$stbMenuID",u),a=()=>He(C,"$columnSettings",u),l=()=>He(R,"$stbEditing",u),d=()=>He(E,"$rowCellOptions",u),[u,g]=qt(),c=h(),p=h(),_=h(),S=h(),y=h(),T=h(),{Provider:I,ContextScopes:k}=Se.getContext("sdk"),C=Se.getContext("stColumnOptions"),D=Se.getContext("stColumnState"),E=Se.getContext("stRowCellOptions"),U=Se.getContext("stbRowMetadata"),$=Se.getContext("stbHovered"),R=Se.getContext("stbEditing"),H=Se.getContext("stbAPI"),J=Se.getContext("stbState"),de=Se.getContext("stbMenuID");let fe=m(r,"index",8),we=m(r,"row",12),pe=m(r,"field",8),De=m(r,"idField",8),ke=m(r,"isEditing",8),ye=m(r,"isLast",8),ce=m(r,"disabled",8),Z=h(),Y=h();const re=async se=>{let ee={...we(),[pe()]:se};try{o(_,"");let me=await H.patchRow(ee);we({...me})}catch(me){me.json.validationErrors?o(Y,me.json.validationErrors[pe()][0]):o(Y,me.message),setTimeout(()=>{o(Y,void 0)},3250)}finally{o(_,G(we(),pe()))}},G=(se,ee)=>{if(se&&(ee!=null&&ee.includes("."))){for(var me=0,ee=ee.split("."),Ne=ee.length;me<Ne;me++)if(se[ee[me]])Array.isArray(se[ee[me]])?se=se[ee[me]][0]:se=se[ee[me]];else{se=null;break}return se}else return se[ee]??void 0};Se.onDestroy(()=>{l()==fe()&&D.exitedit()}),x(()=>(n(),v(fe())),()=>{var se;o(c,((se=n())==null?void 0:se[fe()])??{})}),x(()=>(v(we()),v(De()),v(fe())),()=>{var se;o(p,((se=we())==null?void 0:se[De()])??fe())}),x(()=>(v(we()),v(pe())),()=>{o(_,G(we(),pe()))}),x(()=>(i(),v(fe()),s()),()=>{o(S,i()==fe()||s()==fe())}),x(()=>(n(),v(fe())),()=>{var se,ee;o(y,((ee=(se=n())==null?void 0:se[fe()])==null?void 0:ee.selected)??!1)}),x(()=>a(),()=>{o(T,a().hasChildren>0)}),Mt(),Dt();var ae=ob();let z,ge;var O=j(ae);{var q=se=>{var ee=sb(),me=Ge(ee);{let he=Pt(()=>(d(),v(ce()),t(Y),b(()=>({...d(),disabled:ce(),error:t(Y)}))));ul(me,()=>a().cellComponent,(ue,Q)=>{Q(ue,{get cellOptions(){return t(he)},get fieldSchema(){return a(),b(()=>a().schema)},get ownId(){return v(we()),v(De()),b(()=>we()[De()])},get value(){return t(_)},$$events:{enteredit:()=>D.enteredit(fe()),exitedit(...B){var X;(X=D.exitedit)==null||X.apply(this,B)},change:B=>re(B.detail),linkClick:B=>{H.executeOnLinkClickAction(pe(),B.detail)}}})})}var Ne=Ee(me,2);{var Ue=he=>{var ue=ab();let Q;var B=j(ue);Ce(()=>{Q=Me(ue,1,"info svelte-2uugwz",null,Q,{bottom:fe()==0}),Xe(B,t(Y))}),w(he,ue)};le(Ne,he=>{t(Y)&&he(Ue)})}w(se,ee)},ne=se=>{{let ee=Pt(()=>({id:t(p),value:t(_),row:we(),index:fe()}));I(se,{get data(){return t(ee)},get scope(){return b(()=>k.Local)},children:(me,Ne)=>{var Ue=$e(),he=Ge(Ue);vr(he,r,"default",{},null),w(me,Ue)},$$slots:{default:!0}})}};le(O,se=>{t(T)?se(ne,!1):se(q)})}vt(ae,se=>o(Z,se),()=>t(Z)),Ce(()=>{z=Me(ae,1,"super-row",null,z,{"is-selected":t(y),"is-hovered":t(S),"is-editing":ke(),"is-disabled":t(c).disabled,isLast:ye()}),ge=Ye(ae,"",ge,{height:(t(c),b(()=>t(c).height+"px")),color:(t(c),b(()=>t(c).color)),"background-color":(t(c),b(()=>t(c).bgcolor)),"justify-content":(a(),b(()=>a().align))})}),W("mouseenter",ae,()=>Qe($,fe())),W("mouseleave",ae,()=>Qe($,void 0)),W("click",ae,()=>{t(c).disabled||J.handleRowClick(fe(),pe(),G(we(),pe()),t(p))}),W("contextmenu",ae,er(()=>{H.showContextMenu(fe(),t(Z))})),w(e,ae),Ct(),g()}var ub=F("<i></i>"),cb=F('<textarea tabindex="0"></textarea>'),db=F('<i class="ri-close-line clearIcon"></i>'),fb=F('<input tabindex="0"/> <!>',1),hb=F("<div> </div>"),gb=F("<div><span> </span></div>"),vb=F("<div><!> <!></div>");function Jr(e,r){var Ue,he;St(r,!1);const n=()=>He(Y,"$cellState",i),[i,s]=qt(),a=h(),l=h(),d=h(),u=h(),g=h(),c=h(),p=h(),_=h(),S=h(),y=h(),T=h(),I=h(),k=h(),C=h(),D=h(),E=h(),U=h(),$=h(),R=Se.createEventDispatcher(),{processStringSync:H}=Se.getContext("sdk");let J=m(r,"value",12),de=m(r,"formattedValue",12,void 0),fe=m(r,"cellOptions",24,()=>({role:"formInput",initialState:"Editing",debounce:250})),we=m(r,"autofocus",8,!1),pe,De=h(),ke=h(),ye=h(J()),ce=(((Ue=fe())==null?void 0:Ue.initialState)==="Loading"?"View":(he=fe())==null?void 0:he.initialState)??"View",Z=h([]);const Y=or(ce??"View",{"*":{goTo(ue){return ue},reset(ue){if(ue!=t(ye))return o(ye,J()),o(ke,void 0),o(Z,[]),ce}},View:{_enter(){o(ye,J())},focus(){if(!t(u)&&!t(d))return"Editing"}},Editing:{_enter(){setTimeout(()=>{var ue;(ue=t(De))==null||ue.focus()},50),R("enteredit")},_exit(){o(ke,void 0),R("exitedit")},focus(){var ue;(ue=t(De))==null||ue.focus()},clear(){var ue;t(I)&&R("change",null),o(ke,new Date),o(ye,null),(ue=t(De))==null||ue.focus(),R("clear",null)},focusout(ue){R("focusout"),this.submit()},submit(){return t(E)&&R("change",t(ye)),ce},cancel(){return o(ye,J()),R("cancel"),ce},debounce(ue){const Q=ue.target;o(ye,Q.value),o(ke,new Date),t(I)&&(clearTimeout(pe),pe=setTimeout(()=>{R("change",t(ye))},t(I)))},handleKeyboard(ue){ue.key==="Enter"&&!ue.shiftKey&&this.submit(),ue.key==="Escape"&&this.cancel()}}}),re={focus:()=>Y.focus(),reset:()=>Y.reset(J()),isEditing:()=>n()==="Editing",isDirty:()=>t(E),getValue:()=>t(ye),setError:ue=>{o(Z,[...t(Z),ue])},clearError:()=>{o(Z,[])},setValue:ue=>{J(ue)}},G=ue=>{ue==null||ue.focus()};Se.onMount(()=>{we()&&setTimeout(()=>{Y.focus()},50)}),Se.onDestroy(()=>{pe&&clearTimeout(pe)}),x(()=>(t(a),t(l),t(d),t(u),t(g),t(c),t(p),t(_),t(S),t(y),t(T),t(I),v(fe())),()=>{(ue=>{o(a,ue.controlType),o(l,ue.role),o(d,ue.disabled),o(u,ue.readonly),o(g,ue.error),o(c,ue.icon),o(p,ue.color),o(_,ue.background),o(S,ue.showDirty),o(y,ue.template),o(T,ue.placeholder),o(I,ue.debounce)})(fe()??{})}),x(()=>(t(g),t(Z)),()=>{o(k,t(g)||t(Z).length>0)}),x(()=>(t(k),t(c)),()=>{o(C,t(k)?"ph ph-warning":t(c))}),x(()=>n(),()=>{o(D,n()==="Editing")}),x(()=>(t(ke),v(J()),t(ye)),()=>{o(E,!!t(ke)&&J()!==t(ye))}),x(()=>(t(y),v(J())),()=>{de(t(y)?H(t(y),{value:J()}):J()??void 0)}),x(()=>t(T),()=>{o(U,t(T)??"")}),x(()=>t(a),()=>{o($,t(a)==="textarea")}),x(()=>v(J()),()=>{Y.reset(J())}),Mt();var ae={cellState:Y,cellApi:re};Dt();var z=vb();let ge,O;var q=j(z);{var ne=ue=>{var Q=ub();let B;Ce(()=>B=Me(Q,1,t(C)+" field-icon","svelte-1qezgyl",B,{"with-error":t(k)})),w(ue,Q)};le(q,ue=>{t(C)&&ue(ne)})}var se=Ee(q,2);{var ee=ue=>{var Q=$e(),B=Ge(Q);{var X=V=>{var ie=cb();let N,A;vt(ie,M=>o(De,M),()=>t(De)),Ut(()=>W("input",ie,function(...M){var te;(te=Y.debounce)==null||te.apply(this,M)})),Ut(()=>W("focusout",ie,function(...M){var te;(te=Y.focusout)==null||te.apply(this,M)})),Ut(()=>W("keydown",ie,function(...M){var te;(te=Y.handleKeyboard)==null||te.apply(this,M)})),Pr(ie,M=>G==null?void 0:G(M)),Ce(()=>{N=Me(ie,1,"editor textarea svelte-1qezgyl",null,N,{placeholder:!J()&&!de()&&!t(ye)}),Vt(ie,"placeholder",(v(fe()),b(()=>{var M;return((M=fe())==null?void 0:M.placeholder)??""}))),ls(ie,t(ye)??""),A=Ye(ie,"",A,{"text-align":(v(fe()),b(()=>fe().align=="center"?"center":fe().align=="flex-end"?"right":"left"))})}),w(V,ie)},K=V=>{var ie=fb(),N=Ge(ie);let A,M;vt(N,Ie=>o(De,Ie),()=>t(De)),Ut(()=>W("input",N,function(...Ie){var Pe;(Pe=Y.debounce)==null||Pe.apply(this,Ie)})),Ut(()=>W("focusout",N,function(...Ie){var Pe;(Pe=Y.focusout)==null||Pe.apply(this,Ie)})),Ut(()=>W("keydown",N,function(...Ie){var Pe;(Pe=Y.handleKeyboard)==null||Pe.apply(this,Ie)})),Pr(N,Ie=>G==null?void 0:G(Ie));var te=Ee(N,2);{var ve=Ie=>{var Pe=db();W("mousedown",Pe,us(er(function(...Re){var oe;(oe=Y.clear)==null||oe.apply(this,Re)}))),w(Ie,Pe)};le(te,Ie=>{t(ye),v(fe()),b(()=>{var Pe;return t(ye)&&((Pe=fe())==null?void 0:Pe.clearIcon)!==!1})&&Ie(ve)})}Ce(()=>{A=Me(N,1,"editor",null,A,{placeholder:!J()&&!de()&&!t(ye)}),ls(N,t(ye)??""),Vt(N,"placeholder",(v(fe()),b(()=>{var Ie;return((Ie=fe())==null?void 0:Ie.placeholder)??""}))),M=Ye(N,"",M,{"text-align":(v(fe()),b(()=>fe().align=="center"?"center":fe().align=="flex-end"?"right":"left")),"padding-right":(v(fe()),b(()=>fe().align!="flex-start"?"2rem":"0.75rem"))})}),w(V,ie)};le(B,V=>{t($)?V(X):V(K,!1)})}w(ue,Q)},me=ue=>{var Q=$e(),B=Ge(Q);{var X=V=>{var ie=hb();let N,A;var M=j(ie);Ce(()=>{N=Me(ie,1,"value textarea svelte-1qezgyl",null,N,{"with-icon":fe().icon||t(k),placeholder:!J()&&!de()}),Vt(ie,"tabindex",(v(fe()),b(()=>fe().readonly||fe().disabled?-1:0))),A=Ye(ie,"",A,{"justify-content":(v(fe()),b(()=>fe().align))}),Xe(M,de()||J()||t(U))}),W("focusin",ie,function(...te){var ve;(ve=Y.focus)==null||ve.apply(this,te)}),w(V,ie)},K=V=>{var ie=gb();let N,A;var M=j(ie),te=j(M);Ce(()=>{N=Me(ie,1,"value",null,N,{placeholder:!J()}),Vt(ie,"tabindex",(v(fe()),b(()=>fe().readonly||fe().disabled?-1:0))),A=Ye(ie,"",A,{"justify-content":(v(fe()),b(()=>fe().align))}),Xe(te,de()||J()||t(U))}),W("focusin",ie,function(...ve){var Ie;(Ie=Y.focus)==null||Ie.apply(this,ve)}),w(V,ie)};le(B,V=>{t($)?V(X):V(K,!1)},!0)}w(ue,Q)};le(se,ue=>{t(D)?ue(ee):ue(me,!1)})}Ce(()=>{ge=Me(z,1,"superCell svelte-1qezgyl",null,ge,{multirow:t(a)=="textarea",textarea:t(a)=="textarea",inEdit:t(D),isDirty:t(E)&&t(S),inline:t(l)=="inlineInput",tableCell:t(l)=="tableCell",formInput:t(l)=="formInput",disabled:t(d),readonly:t(u),error:t(k)}),O=Ye(z,"",O,{color:t(p),background:t(_)})}),w(e,z),pr(r,"cellState",Y),pr(r,"cellApi",re);var Ne=Ct(ae);return s(),Ne}var pb=F("<i></i>"),mb=F("<div><!> <div><span> </span></div></div>");function eu(e,r){St(r,!1);const n=h(),{processStringSync:i}=Se.getContext("sdk");let s=m(r,"value",8,null),a=m(r,"formattedValue",12),l=m(r,"cellOptions",24,()=>({role:"formInput",initialState:"Editing",debounce:250}));x(()=>(v(l()),v(s())),()=>{var k;a((k=l())!=null&&k.template?i(l().template,{value:s()}):void 0)}),x(()=>v(l()),()=>{o(n,l().readonly||l().disabled?"":l().placeholder||"")}),Mt(),Dt();var d=mb();let u,g;var c=j(d);{var p=k=>{var C=pb();Ce(()=>Me(C,1,(v(l()),b(()=>l().icon+" icon")))),w(k,C)};le(c,k=>{v(l()),b(()=>l().icon)&&k(p)})}var _=Ee(c,2);let S,y;var T=j(_),I=j(T);Ce(()=>{u=Me(d,1,"superCell",null,u,{inline:l().role=="inlineInput",tableCell:l().role=="tableCell",formInput:l().role=="formInput",disabled:l().disabled,readonly:l().readonly,error:l().error}),g=Ye(d,"",g,{color:(v(l()),b(()=>l().color)),background:(v(l()),b(()=>l().background)),"font-weight":(v(l()),b(()=>l().fontWeight))}),S=Me(_,1,"value",null,S,{"with-icon":l().icon,placeholder:!s()}),y=Ye(_,"",y,{"justify-content":(v(l()),b(()=>l().align))}),Xe(I,a()||s()||t(n))}),w(e,d),Ct()}var _b=F("<div> </div>"),bb=F("<div><!> <!></div>");function yb(e,r){St(r,!1);const n=()=>He(g,"$columnSettings",a),i=()=>He(_,"$stbSettings",a),s=()=>He(c,"$rowCellOptions",a),[a,l]=qt(),d=h(),u=h(),g=Se.getContext("stColumnOptions"),c=Se.getContext("stRowCellOptions"),p=Se.getContext("stbState"),_=Se.getContext("stbSettings");let S=m(r,"row",24,()=>({})),y=m(r,"isFirst",8),T=m(r,"isLast",8),I=m(r,"color",8);x(()=>(n(),i(),Jr),()=>{o(d,n().cellComponent===eu&&i().features.canInsert?Jr:n().cellComponent)}),x(()=>(v(S()),n()),()=>{o(u,S().errors&&S().errors[n().name])}),Mt(),Dt();var k=bb();let C,D;var E=j(k);{let R=Pt(()=>(s(),t(u),b(()=>({...s(),readonly:!1,error:t(u),showDirty:!1})))),H=Pt(()=>(n(),b(()=>n().schema.type=="array")));ul(E,()=>t(d),(J,de)=>{de(J,{get cellOptions(){return t(R)},get autofocus(){return y()},get fieldSchema(){return n(),b(()=>n().schema)},get value(){return v(S()),n(),b(()=>S()[n().name])},get multi(){return t(H)},$$events:{change:fe=>{p.setValue(n().name,fe.detail)}}})})}var U=Ee(E,2);{var $=R=>{var H=_b();Me(H,1,"info svelte-18lma75",null,{},{bottom:!0});var J=j(H);Ce(()=>Xe(J,t(u))),w(R,H)};le(U,R=>{t(u)&&R($)})}Ce(()=>{C=Me(k,1,"super-row new-row",null,C,{isLast:T()}),D=Ye(k,"",D,{"min-height":"2rem",color:I()})}),w(e,k),Ct(),l()}var wb=F('<div tabindex="-1"><!> <!></div>');function Eb(e,r){St(r,!1);const n=()=>He(_,"$columnState",l),i=()=>He(p,"$columnSettings",l),s=()=>He(S,"$stbVisibleRows",l),a=()=>He(y,"$new_row",l),[l,d]=qt(),u=h(),g=h(),c=h(),p=Se.getContext("stColumnOptions"),_=Se.getContext("stColumnState"),S=Se.getContext("stbVisibleRows"),y=Se.getContext("new_row");let T=m(r,"field",8),I=m(r,"idField",8),k=m(r,"isLast",8),C=m(r,"isFirst",8),D=m(r,"zebra",8),E=m(r,"rowHeight",8),U=m(r,"rows",8);x(()=>n(),()=>{o(u,n()=="Inserting")}),x(()=>i(),()=>{o(g,i().quiet)}),x(()=>(n(),i()),()=>{o(c,n()=="EditingCell"&&(i().highlighters=="vertical"||i().highlighters=="both"))}),Mt(),Dt();var $=wb();let R;Ye($,"",{},{"margin-top":"var(--super-column-top-offset)"});var H=j($);At(H,1,s,fe=>fe,(fe,we)=>{lb(fe,{get isLast(){return k()},get index(){return t(we)},get row(){return v(U()),t(we),b(()=>U()[t(we)])},get field(){return T()},get idField(){return I()},get disabled(){return t(u)},get rowHeight(){return E()},children:(pe,De)=>{var ke=$e(),ye=Ge(ke);vr(ye,r,"default",{},null),w(pe,ke)},$$slots:{default:!0}})});var J=Ee(H,2);{var de=fe=>{yb(fe,{get isFirst(){return C()},get isLast(){return k()},get row(){return a()}})};le(J,fe=>{t(u)&&fe(de)})}Ce(()=>R=Me($,1,"super-column-body",null,R,{quiet:t(g),zebra:D(),inserting:t(u),filtered:n()=="Filtered","is-editing":t(c)})),w(e,$),Ct(),d()}var Sb=F('<div class="super-column-footer"><span> </span></div>');function Cb(e,r){St(r,!1);const n=()=>He(a,"$columnOptions",i),[i,s]=qt(),a=Se.getContext("stColumnOptions");let l=m(r,"footerLabel",8);Dt();var d=Sb();let u;var g=j(d),c=j(g);Ce(()=>{u=Ye(d,"",u,{"justify-content":(n(),b(()=>{var p;return(p=n())==null?void 0:p.headerAlign}))}),Xe(c,(v(l()),n(),b(()=>l()||n().displayName||n().name)))}),w(e,d),Ct(),s()}var Ab=F("<i></i>"),Tb=F('<div class="loope"></div>'),kb=F('<div class="item"><!> <span> </span></div>'),Db=F('<div class="value"><div></div></div>'),xb=F('<!> <input class="editor"/> <div class="action-icon svelte-16609pi"><i class="ph ph-caret-down"></i></div>',1),Ob=F("<span> </span>"),Ib=F("<span> </span>"),Rb=F("<span> </span>"),Pb=F('<div class="item"><i></i> <span> </span></div>'),Mb=F("<div></div>"),Nb=F('<i class="ph ph-caret-down control-icon"></i>'),Lb=F("<div><!></div> <!>",1),Fb=F('<div class="searchControl svelte-16609pi"><i></i> <span class="search-term svelte-16609pi"> </span></div>'),Vb=F('<div class="option loading svelte-16609pi"><i class="ph ph-spinner spin"></i> Loading...</div>'),Ub=F('<div><span class="svelte-16609pi"><i></i> </span> <i class="ph ph-check svelte-16609pi"></i></div>'),Bb=F('<div class="option loading svelte-16609pi"><i class="ph ph-spinner spin"></i> Loading more...</div>'),Hb=F("<!> <!>",1),zb=F('<div class="option svelte-16609pi"><span class="svelte-16609pi"><i class="ri-close-line"></i> No Options Found</span></div>'),jb=F('<div class="picker svelte-16609pi"><!> <div class="options svelte-16609pi"><!></div></div>'),Gb=F("<div><!> <!></div> <!>",1);function oa(e,r){var Ke;St(r,!1);const n=()=>He(Ue,"$options",u),i=()=>He(t(H),"$fetch",u),s=()=>He(ve,"$editorState",u),a=()=>He(oe,"$dataSourceStore",u),l=()=>He(te,"$cellState",u),d=()=>He(Ie,"$colors",u),[u,g]=qt(),c=h(),p=h(),_=h(),S=h(),y=h(),T=h(),I=h(),k=h(),C=h(),D=h(),E=h(),U=h(),$=h(),R=h(),H=h(),J=h(),de=h(),fe=h(),we=h(),pe=h(),De=h(),ke=h(),ye=h(),ce=h(),Z=h(),Y=Se.createEventDispatcher(),{API:re,QueryUtils:G,fetchData:ae,memo:z,derivedMemo:ge}=Se.getContext("sdk");let O=m(r,"cellOptions",8),q=m(r,"value",8),ne=m(r,"fieldSchema",8),se=m(r,"multi",12,!1),ee=m(r,"autofocus",8),me=h(),Ne=h(),Ue=z([]),he=h({}),ue={},Q=h([]),B=h(-1),X,K=h([]),V=h(""),ie=h(""),N=h(!1),A=h(15);const M=Ae=>t(p)!="data"?z({}):ae({API:re,datasource:Ae,options:{sortColumn:O().sortColumn,sortOrder:O().sortOrder,limit:t(A)}}),te=or("Loading",{"*":{goTo(Ae){return Ae},refresh(){return Qe(Ue,[]),"Loading"},loadSchemaOptions(){var Ae,je,et;ue=((Ae=ne())==null?void 0:Ae.optionColors)||{},Qe(Ue,((et=(je=ne())==null?void 0:je.constraints)==null?void 0:et.inclusion)||[]),o(he,{}),o(Q,n())},loadDataOptions(Ae){Qe(Ue,[]),o(he,{}),Ae&&Ae.length&&Ae.forEach(je=>{var et;n().push((et=je[t(_)])==null?void 0:et.toString()),zt(he,t(he)[je[t(_)]]=je[t(S)||t(_)]),t(T)&&(ue[je[t(_)]]=je[t(T)])}),Qe(Ue,n()),o(Q,n()),t(N)&&o(N,!1)},loadCustomOptions(){var Ae;(Ae=t(I))!=null&&Ae.length&&t(I).forEach(je=>{n().push(je.value||je),zt(he,t(he)[je.value]=je.label||je)}),Qe(Ue,n())},clearFilters(){o(Q,n())}},Loading:{_enter(){var Ae;(O().optionsSource!="data"||(Ae=i())!=null&&Ae.loaded)&&this.goTo.debounce(5,O().initialState||"View")},_exit(){var Ae;O().optionsSource=="custom"?this.loadCustomOptions():t(p)=="data"?this.loadDataOptions((Ae=i())==null?void 0:Ae.rows):this.loadSchemaOptions(),o(Q,n())},syncFetch(Ae){if(Ae!=null&&Ae.loaded)return O().initialState||"View"},focus(Ae){if(!O().readonly&&!O().disabled)return"Editing"}},View:{_enter(){o(V,null)},focus(Ae){if(!O().readonly&&!O().disabled)return"Editing"}},Editing:{_enter(){o(Re,JSON.stringify(Array.isArray(q())?q():q()?[q()]:[])),o(ie,se()?"":t(he)[t(K)[0]]||t(K)[0]||""),ve.open(),Y("enteredit")},_exit(){ve.close(),ve.filterOptions(),Y("exitedit")},focusout(Ae){if(!t(me).contains(Ae.relatedTarget))return Y("focusout"),O().debounce&&t(pe)?(clearTimeout(X),Y("change",se()?t(K):t(K)[0])):this.submit(),"View"},submit(){t(pe)&&!O().debounce&&(se()?Y("change",t(K)):Y("change",t(K)[0]))},clear(){var Ae;o(K,[]),(Ae=t(me))==null||Ae.focus(),O().debounce&&Y("change",null)},cancel(){var Ae;return o(K,JSON.parse(t(Re))),o(V,null),(Ae=t(me))==null||Ae.blur(),"View"}}}),ve=or("Closed",{"*":{toggleOption(Ae){var lt,mt;if(Ae<0||O().disabled||O().readonly)return;let je=t(Q)[Ae],et=t(K).indexOf(je);se()&&et>-1?(t(K).splice(et,1),o(K,[...t(K)])):se()?o(K,[...t(K),je]):(t(K)[0]==je?zt(K,t(K).length=0):zt(K,t(K)[0]=je),o(ie,t(he)[t(K)[0]]||t(K)[0]||"")),O().debounce&&(clearTimeout(X),X=setTimeout(()=>{Y("change",se()?t(K):t(K)[0])},O().debounce??0)),O().autocomplete&&se()&&this.filterOptions(),se()||(this.close.debounce(10),O().controlType!="inputSelect"?(lt=t(me))==null||lt.focus():(mt=t(Ne))==null||mt.focus())}},Open:{_enter(){o(V,""),this.filterOptions(),o(B,-1)},filterOptions(Ae){var je;if(O().optionsSource=="data"){let et=[];Ae?et=[...O().filter||[],{field:t(S)||t(_),type:"string",operator:"fuzzy",value:Ae,valueType:"Value"}]:et=O().filter||[],(je=t(H))==null||je.update({query:G.buildQuery(et)}),o(Q,n())}else Ae?o(Q,n().filter(et=>et==null?void 0:et.toLocaleLowerCase().startsWith(Ae.toLocaleLowerCase()))):o(Q,n())},toggle(){return"Closed"},close(){return"Closed"},handleKeyboard(Ae){var je,et;if(Ae.key==="Backspace"||Ae.key==="Delete"?(o(V,t(V).slice(0,-1)),this.filterOptions(t(V))):Ae.key.length===1&&/[a-zA-Z0-9]/.test(Ae.key)&&(o(V,t(V)+Ae.key),this.filterOptions(t(V)),(je=t(V))!=null&&je.length&&s()=="Closed"&&this.toggle()),Ae.keyCode==32&&(t(B)>-1?(this.toggleOption(t(B),Ae.preventDefault()),se()||this.close(Ae.preventDefault())):t(de)||this.close()),Ae.key=="Escape")return o(V,null),(et=t(me))==null||et.focus(),"Closed";Ae.key=="Enter"&&(t(B)>-1&&t(Q)[t(B)]&&(se()||this.toggleOption(t(B))),te.submit(),ve.close()),Ae.key=="ArrowDown"&&this.highlightNext(),Ae.key=="ArrowUp"&&this.highlightPrevious()},highlightNext(){o(B,t(B)+1),t(B)>t(Q).length-1&&o(B,0),Se.tick().then(()=>{const Ae=optionsList.querySelector(".option.focused");Ae&&Ae.scrollIntoView({behavior:"smooth",block:"nearest"})})},highlightPrevious(){o(B,t(B)-1),t(B)<0&&o(B,t(Q).length-1),Se.tick().then(()=>{const Ae=optionsList.querySelector(".option.focused");Ae&&Ae.scrollIntoView({behavior:"smooth",block:"nearest"})})},fetchMore(){var Ae,je,et,lt;(Ae=i())!=null&&Ae.loading||((et=(je=i())==null?void 0:je.rows)==null?void 0:et.length)<t(A)||(o(A,t(A)+100),(lt=t(H))==null||lt.update({limit:t(A)}))},handleScroll(Ae){const je=Ae.target,et=je.scrollTop,lt=je.scrollHeight,mt=je.clientHeight;et+mt>=lt-50&&this.fetchMore()}},Closed:{_enter(){o(V,null),o(B,-1)},toggle(){return"Open"},open(){return"Open"},highlightNext(){this.open(),o(B,0),Se.tick().then(()=>{const Ae=optionsList.querySelector(".option.focused");Ae&&Ae.scrollIntoView({behavior:"smooth",block:"nearest"})})},handleKeyboard(Ae){var je;if(Ae.key=="Escape"){te.cancel();return}Ae.key=="Enter"&&(je=t(ie))!=null&&je.trim()&&(se()?o(K,[...t(K),t(ie).trim()]):o(K,[t(ie).trim()]),o(ie,"")),t(c)=="select"&&(this.open(),this.handleKeyboard(Ae),(Ae.key=="ArrowDown"||Ae.keyCode==32)&&this.toggle(),(Ae.key=="Backspace"||Ae.key=="Delete")&&(o(K,[]),Y("change",t(K))))}}}),Ie=ge(Ue,Ae=>{let je={};return Ae.forEach((et,lt)=>je[et]=ue[et]??Pe[lt%Pe.length]),je}),Pe=["hsla(175, 90%, 75%, 0.35)","hsla(25, 90%, 75%, 0.35)","hsla(340, 85%, 72%, 0.35)","hsla(75, 80%, 75%, 0.35)","hsla(265, 85%, 70%, 0.35)","hsla(125, 90%, 75%, 0.35)","hsla(0, 90%, 75%, 0.35)","hsla(225, 90%, 75%, 0.35)","hsla(100, 80%, 75%, 0.35)","hsla(315, 85%, 70%, 0.35)","hsla(50, 80%, 75%, 0.35)","hsla(165, 85%, 70%, 0.35)","hsla(200, 90%, 75%, 0.35)","hsla(290, 85%, 72%, 0.35)","hsla(85, 85%, 72%, 0.35)","hsla(140, 85%, 72%, 0.35)","hsla(250, 90%, 75%, 0.35)","hsla(35, 85%, 72%, 0.35)","hsla(190, 85%, 72%, 0.35)","hsla(350, 90%, 75%, 0.35)","hsla(60, 85%, 70%, 0.35)","hsla(150, 90%, 75%, 0.35)","hsla(300, 90%, 75%, 0.35)","hsla(10, 85%, 70%, 0.35)","hsla(215, 85%, 70%, 0.35)","hsla(325, 90%, 75%, 0.35)","hsla(115, 85%, 70%, 0.35)","hsla(240, 85%, 72%, 0.35)","hsla(275, 90%, 75%, 0.35)"];let Re=h(JSON.stringify(Array.isArray(q())?q():q()?[q()]:[]));const oe=z(((Ke=O())==null?void 0:Ke.datasource)??{}),Oe=Ae=>{Ae==null||Ae.focus()};Se.onMount(()=>{ee()&&setTimeout(()=>{var Ae;te.focus(),(Ae=t(Ne))==null||Ae.focus()},30)}),x(()=>(t(c),t(p),t(_),t(S),t(y),t(T),t(I),t(k),t(C),t(D),t(E),t(U),t($),t(R),v(O())),()=>{(Ae=>{o(c,Ae.controlType),o(p,Ae.optionsSource),o(_,Ae.valueColumn),o(S,Ae.labelColumn),o(y,Ae.iconColumn),o(T,Ae.colorColumn),o(I,Ae.customOptions),o(k,Ae.optionsViewMode),o(C,Ae.role),o(D,Ae.readonly),o(E,Ae.disabled),o(U,Ae.error),o($,Ae.color),o(R,Ae.background)})(O())}),x(()=>v(O()),()=>{oe.set(O().datasource)}),x(()=>a(),()=>{sn(o(H,M(a())),"$fetch",u)}),x(()=>t(p),()=>{t(p)=="data"&&(o(A,15),o(N,!0))}),x(()=>v(O()),()=>{o(J,G.buildQuery(O().filter))}),x(()=>t(c),()=>{o(de,t(c)=="inputSelect")}),x(()=>(v(O()),t(H),t(J),t(A)),()=>{O().optionsSource=="data"&&t(H).update({query:t(J),sortColumn:O().sortColumn,sortOrder:O().sortOrder,limit:t(A)})}),x(()=>i(),()=>{te.syncFetch(i())}),x(()=>i(),()=>{var Ae;te.loadDataOptions((Ae=i())==null?void 0:Ae.rows)}),x(()=>(v(ne()),t(p),t(S),t(_),t(y),t(T),a(),t(I)),()=>{te.refresh(ne(),t(p),t(S),t(_),t(y),t(T),a(),t(I))}),x(()=>v(q()),()=>{o(K,Array.isArray(q())?q():q()?[q()]:[])}),x(()=>t(K),()=>{o(fe,!!(t(K).length&&typeof t(K)[0]=="object"))}),x(()=>t(K),()=>{o(we,t(K).length<1)}),x(()=>l(),()=>{o(De,l()=="Editing")}),x(()=>(t(De),t(Re),t(K)),()=>{o(pe,t(De)&&t(Re)!==JSON.stringify(t(K)))}),x(()=>t(k),()=>{o(ke,t(k)=="pills")}),x(()=>(v(se()),v(ne())),()=>{se(ne()&&ne().type?ne().type=="array":se())}),x(()=>(t(E),t(D),v(O())),()=>{o(ye,t(E)||t(D)?"":O().placeholder||"")}),x(()=>(t(V),t(we),v(O())),()=>{o(ce,t(V)&&t(we)?"ph ph-magnifying-glass":O().icon)}),x(()=>s(),()=>{o(Z,s()=="Open")}),Mt();var Fe={cellState:te};Dt();var Be=Gb(),Le=Ge(Be);let Te,qe;var Ze=j(Le);{var Je=Ae=>{var je=Ab();let et;Ce(()=>et=Me(je,1,t(ce)+" field-icon","svelte-16609pi",et,{active:t(V)})),w(Ae,je)};le(Ze,Ae=>{t(ce)&&Ae(Je)})}var nt=Ee(Ze,2);{var at=Ae=>{var je=xb(),et=Ge(je);{var lt=It=>{var Lt=$e(),Tt=Ge(Lt);{var ut=rt=>{var st=Db();let ft;var _t=j(st);let Bt,Rt;At(_t,5,()=>t(K),Ht=>Ht,(Ht,kt)=>{var tr=kb();let nr;var Wt=j(tr);{var Zt=hr=>{var qr=Tb();w(hr,qr)};le(Wt,hr=>{t(ke)&&hr(Zt)})}var ar=Ee(Wt,2),Gt=j(ar);Ce(()=>{nr=Ye(tr,"",nr,{"--option-color":(d(),t(kt),b(()=>d()[t(kt)])),"min-width":"4rem"}),Xe(Gt,(t(he),t(kt),b(()=>t(he)[t(kt)]||t(kt))))}),w(Ht,tr)}),Ce(()=>{ft=Ye(st,"",ft,{width:"auto","padding-left":(v(O()),b(()=>O().icon?"32px":O().padding))}),Bt=Me(_t,1,"items",null,Bt,{pills:t(ke)}),Rt=Ye(_t,"",Rt,{"justify-content":(v(O()),b(()=>O().align??"flex-start"))})}),w(rt,st)};le(Tt,rt=>{t(K),b(()=>t(K).length>0)&&rt(ut)})}w(It,Lt)};le(et,It=>{se()&&It(lt)})}var mt=Ee(et,2);vt(mt,It=>o(Ne,It),()=>t(Ne)),Ut(()=>ta(mt,()=>t(ie),It=>o(ie,It))),Ut(()=>W("input",mt,It=>{var Lt;se()||zt(K,t(K)[0]=(Lt=It.target.value)==null?void 0:Lt.trim()),ve.filterOptions(It.target.value)})),Pr(mt,It=>Oe==null?void 0:Oe(It));var Ot=Ee(mt,2);Ce(()=>Vt(mt,"placeholder",t(ye))),W("click",Ot,function(...It){var Lt;(Lt=ve.toggle)==null||Lt.apply(this,It)}),w(Ae,je)},ct=Ae=>{var je=Lb(),et=Ge(je);let lt;var mt=j(et);{var Ot=ut=>{var rt=Ob(),st=j(rt);Ce(()=>Xe(st,t(V)||t(ye))),w(ut,rt)},It=ut=>{var rt=$e(),st=Ge(rt);{var ft=Bt=>{var Rt=Ib(),Ht=j(Rt);Ce(()=>Xe(Ht,t(V)||"Type to search...")),w(Bt,Rt)},_t=Bt=>{var Rt=$e(),Ht=Ge(Rt);{var kt=nr=>{var Wt=Rb(),Zt=j(Wt);Ce(ar=>Xe(Zt,ar),[()=>(v(se()),t(K),t(he),b(()=>se()||t(K).length>1?t(K).join(", "):t(he)[t(K)[0]]||t(K)[0]))]),w(nr,Wt)},tr=nr=>{var Wt=Mb();let Zt,ar;At(Wt,7,()=>t(K),Gt=>Gt,(Gt,hr,qr)=>{var Dr=Pb();let wr;var gr=j(Dr);Me(gr,1,"ph-fill ph-square");var Nr=Ee(gr,2),Lr=j(Nr);Ce(()=>{wr=Ye(Dr,"",wr,{"--option-color":(d(),t(hr),v(t(qr)),b(()=>d()[t(hr)]||Pe[t(qr)%Pe.length]))}),Xe(Lr,(t(fe),t(he),t(hr),b(()=>t(fe)?"JSON":t(he)[t(hr)]||t(hr))))}),w(Gt,Dr)}),Ce(()=>{Zt=Me(Wt,1,"items",null,Zt,{pills:t(ke),colorText:t(k)=="colorText"}),ar=Ye(Wt,"",ar,{"justify-content":(v(O()),b(()=>O().align??"flex-start"))})}),w(nr,Wt)};le(Ht,nr=>{t(k)=="text"?nr(kt):nr(tr,!1)},!0)}w(Bt,Rt)};le(st,Bt=>{t(we)&&t(Z)?Bt(ft):Bt(_t,!1)},!0)}w(ut,rt)};le(mt,ut=>{t(we)&&!t(Z)?ut(Ot):ut(It,!1)})}var Lt=Ee(et,2);{var Tt=ut=>{var rt=Nb();W("mousedown",rt,function(...st){var ft;(ft=t(De)?ve.toggle:null)==null||ft.apply(this,st)}),w(ut,rt)};le(Lt,ut=>{!t(D)&&(t(C)=="formInput"||t(De))&&ut(Tt)})}Ce(()=>lt=Me(et,1,"value",null,lt,{placeholder:t(we)&&!t(V)})),W("mousedown",et,function(...ut){var rt;(rt=t(De)?ve.toggle:null)==null||rt.apply(this,ut)}),w(Ae,je)};le(nt,Ae=>{t(De)&&t(c)=="inputSelect"?Ae(at):Ae(ct,!1)})}vt(Le,Ae=>o(me,Ae),()=>t(me));var it=Ee(Le,2);{var _e=Ae=>{Qr(Ae,{get anchor(){return t(me)},useAnchorWidth:!0,maxHeight:250,get open(){return t(Z)},$$events:{close(...je){var et;(et=ve.close)==null||et.apply(this,je)}},children:(je,et)=>{var lt=jb(),mt=j(lt);{var Ot=rt=>{var st=Fb(),ft=j(st);let _t;var Bt=Ee(ft,2),Rt=j(Bt);Ce(()=>{_t=Me(ft,1,"search-icon ph ph-magnifying-glass svelte-16609pi",null,_t,{active:t(V)}),Xe(Rt,t(V))}),w(rt,st)};le(mt,rt=>{t(V)&&!t(we)&&rt(Ot)})}var It=Ee(mt,2),Lt=j(It);{var Tt=rt=>{var st=Vb();w(rt,st)},ut=rt=>{var st=$e(),ft=Ge(st);{var _t=Rt=>{var Ht=Hb(),kt=Ge(Ht);At(kt,1,()=>t(Q),Ft,(Wt,Zt,ar)=>{var Gt=Ub();let hr,qr;var Dr=j(Gt),wr=j(Dr);let gr;var Nr=Ee(wr);Ce(Lr=>{hr=Me(Gt,1,"option svelte-16609pi",null,hr,Lr),qr=Ye(Gt,"",qr,{"--option-color":(d(),t(Zt),b(()=>d()[t(Zt)]))}),Me(wr,1,Sn((t(y),i(),b(()=>{var Tn,_r,ln;return t(y)?"ph ph-"+((ln=(_r=(Tn=i())==null?void 0:Tn.rows)==null?void 0:_r[ar])==null?void 0:ln[t(y)]):"ph-fill ph-square"}))),"svelte-16609pi"),gr=Ye(wr,"",gr,{color:(d(),t(Zt),b(()=>d()[t(Zt)]))}),Xe(Nr,` ${t(he),t(Zt),b(()=>t(he)[t(Zt)]||t(Zt))??""}`)},[()=>{var Lr;return{text:t(k)=="text",focused:t(B)===ar,selected:(Lr=t(K))==null?void 0:Lr.includes(t(Zt))}}]),W("mousedown",Gt,er(dr(Lr=>ve.toggleOption(ar)))),W("mouseenter",Gt,()=>o(B,ar)),w(Wt,Gt)});var tr=Ee(kt,2);{var nr=Wt=>{var Zt=Bb();w(Wt,Zt)};le(tr,Wt=>{t(p),i(),b(()=>{var Zt;return t(p)=="data"&&((Zt=i())==null?void 0:Zt.loading)})&&Wt(nr)})}w(Rt,Ht)},Bt=Rt=>{var Ht=zb();w(Rt,Ht)};le(ft,Rt=>{t(Q),b(()=>{var Ht;return(Ht=t(Q))==null?void 0:Ht.length})?Rt(_t):Rt(Bt,!1)},!0)}w(rt,st)};le(Lt,rt=>{t(p),i(),b(()=>{var st,ft,_t;return t(p)=="data"&&((st=i())==null?void 0:st.loading)&&!((_t=(ft=i())==null?void 0:ft.rows)!=null&&_t.length)})?rt(Tt):rt(ut,!1)})}W("wheel",It,rt=>rt.stopPropagation()),W("mouseleave",It,()=>o(B,-1)),W("scroll",It,function(...rt){var st;(st=t(p)=="data"?ve.handleScroll:null)==null||st.apply(this,rt)}),W("mousedown",lt,er(dr(function(rt){Yn.call(this,r,rt)}))),w(je,lt)},$$slots:{default:!0}})};le(it,Ae=>{t(De)&&Ae(_e)})}Ce(()=>{Te=Me(Le,1,"superCell",null,Te,{isDirty:t(pe)&&O().showDirty,inEdit:t(De),disabled:t(E),readonly:t(D),error:t(U),inline:t(C)=="inlineInput",tableCell:t(C)=="tableCell",formInput:t(C)=="formInput"}),Vt(Le,"tabindex",(v(O()),b(()=>{var Ae;return(Ae=O())!=null&&Ae.disabled?-1:0}))),qe=Ye(Le,"",qe,{color:t($),background:t(R)})}),W("focusin",Le,function(...Ae){var je;(je=te.focus)==null||je.apply(this,Ae)}),W("focusout",Le,function(...Ae){var je;(je=te.focusout)==null||je.apply(this,Ae)}),W("keydown",Le,function(...Ae){var je;(je=ve.handleKeyboard)==null||je.apply(this,Ae)}),w(e,Be),pr(r,"cellState",te);var We=Ct(Fe);return g(),We}var qb=F("<i></i>"),Wb=F('<div class="controls svelte-1mbmiop"><i class="ph ph-minus svelte-1mbmiop"></i> <i class="ph ph-plus svelte-1mbmiop"></i></div>'),Yb=F('<input/> <i class="ri-close-line clear-icon visible"></i> <!>',1),Kb=F("<div> </div>"),Xb=F("<div><!> <!></div>");function Es(e,r){var ie;St(r,!1);const n=()=>He(ne(),"$cellState",s),i=()=>He(ye,"$context",s),[s,a]=qt(),l=h(),d=h(),u=h(),g=h(),c=h(),p=h(),_=h(),S=h(),y=h(),T=h(),I=h(),k=h(),C=h(),D=h(),E=h(),U=h(),$=h(),R=h(),H=h(),J=h(),de=h(),fe=h(),we=h(),pe=h(),De=h(),{processStringSync:ke}=Se.getContext("sdk"),ye=Se.getContext("context"),ce=Se.createEventDispatcher();let Z=m(r,"value",12),Y=m(r,"cellOptions",24,()=>({})),re=m(r,"autofocus",8,!1),G=h(Z()??0),ae=h(),z=h(),ge,O=((ie=Y())==null?void 0:ie.initialState)??"View";function q(N,A,M){const te=typeof N=="string"?parseFloat(N):N;if(isNaN(te)||te!==0&&!te)return"";let ve;if(M===void 0&&typeof N=="string"?ve=te.toString():ve=te.toFixed(M??0),!A)return ve;const Ie=ve.split(".");return Ie[0]=Ie[0].replace(/\B(?=(\d{3})+(?!\d))/g,A),Ie.join(".")}let ne=m(r,"cellState",24,()=>or(O??"View",{"*":{goTo(N){return N}},View:{_enter(){const N=Number(Z());o(G,isNaN(N)?null:N),o(z,void 0)},reset(N){if(N==t(G))return;const A=Number(Z());return o(G,isNaN(A)?null:A),o(z,void 0),O},focus(){if(!t(l)&&!t(d))return"Editing"}},Editing:{_enter(){var N;(N=t(ae))==null||N.focus(),ce("enteredit")},_exit(){o(z,void 0),ce("exitedit")},clear(){ce("change",null),o(z,new Date),o(G,null)},focusout(N){ce("focusout",N),this.submit()},submit(){return t(fe)&&ce("change",Number(t(G))),O},cancel(){return o(G,Z()),ce("cancel"),O},debouncedDispatch(){t(T)&&(clearTimeout(ge),ge=setTimeout(()=>{ce("change",t(G))},t(T)))},handleKeyboard(N){const A=N.target,M=N.key;if(["Enter","Escape","ArrowLeft","ArrowRight","Tab","ArrowUp","ArrowDown"].includes(M)){if(M==="Enter")return this.submit();if(M==="Escape")return this.cancel();if(M==="ArrowUp"){N.preventDefault(),this.increment(N);return}if(M==="ArrowDown"){N.preventDefault(),this.decrement(N);return}return}(M.length===1&&!/[\d.-]/.test(M)||M==="."&&A.value.includes(".")||M==="."&&(t(E)??0)===0||M==="-"&&(A.value.includes("-")||A.selectionStart!==0))&&N.preventDefault()},handleInput(N){var te,ve;const A=N.target,M=A.value;if(M!==""&&M!=="-"&&!/^-?\d*\.?\d*$/.test(M)){A.value=((te=t(G))==null?void 0:te.toString())??"";return}if(M.includes(".")&&M.split(".")[1].length>(t(E)??0)){A.value=((ve=t(G))==null?void 0:ve.toString())??"";return}o(G,M===""||M==="-"?0:Number(M)||0),o(G,Number(t(G).toFixed(t(E)??0))),t(C)!==void 0&&t(G)<t(C)&&o(G,t(C)),t(D)!==void 0&&t(G)>t(D)&&o(G,t(D)),o(z,new Date),this.debouncedDispatch()},increment(N){const A=N.shiftKey?10:1;o(G,t(G)+t(De)*A),t(D)!==void 0&&t(G)>t(D)&&o(G,t(D)),o(z,new Date),this.debouncedDispatch()},decrement(N){const A=N.shiftKey?10:1;o(G,t(G)-t(De)*A),t(C)!==void 0&&t(G)<t(C)&&o(G,t(C)),o(z,new Date),this.debouncedDispatch()},handleWheel(N){N.preventDefault(),N.stopPropagation(),N.shiftKey?N.deltaX<0?this.increment(N):this.decrement(N):N.deltaY<0?this.increment(N):this.decrement(N)}}}));const se={focus:()=>ne().focus(),reset:()=>ne().reset(Z()),isEditing:()=>n()==="Editing",isDirty:()=>t(fe),getValue:()=>t(G),setError:N=>{},clearError:()=>{},setValue:N=>{Z(N)}};function ee(N){setTimeout(()=>N==null?void 0:N.focus(),10)}Se.onMount(()=>{re()&&setTimeout(()=>{var N;ne().focus(),(N=t(ae))==null||N.focus()},50)}),Se.onDestroy(()=>{clearTimeout(ge)}),x(()=>(t(l),t(d),t(u),t(g),t(c),t(p),t(_),t(S),t(y),t(T),t(I),t(k),t(C),t(D),t(E),t(U),t($),v(Y())),()=>{(N=>{o(l,N.readonly),o(d,N.disabled),o(u,N.error),o(g,N.icon),o(c,N.color),o(p,N.background),o(_,N.showDirty),o(S,N.template),o(y,N.placeholder),o(T,N.debounce),o(I,N.showStepper),o(k,N.stepSize),o(C,N.min),o(D,N.max),o(E,N.decimals),o(U,N.thousandsSeparator),o($,N.role)})(Y()??{})}),x(()=>t(u),()=>{o(R,t(u))}),x(()=>(t(R),t(g)),()=>{o(H,t(R)?"ph ph-warning":t(g))}),x(()=>n(),()=>{o(J,n()==="Editing")}),x(()=>t($),()=>{o(de,t($)==="inlineInput")}),x(()=>(t(z),v(Z()),t(G)),()=>{o(fe,!!t(z)&&Z()!==t(G))}),x(()=>(t(J),t(G),v(Z())),()=>{o(we,t(J)?t(G):Z()??0)}),x(()=>(t(S),i(),v(Z()),t(we),t(U),t(E)),()=>{o(pe,t(S)?ke(t(S),{...i(),value:Z()}):q(t(we),t(U),t(E)))}),x(()=>t(k),()=>{o(De,t(k)??1)}),x(()=>(v(ne()),v(Z())),()=>{ne().reset(Z())}),Mt();var me={cellApi:se};Dt();var Ne=Xb();let Ue,he;var ue=j(Ne);{var Q=N=>{var A=qb();let M;Ce(()=>M=Me(A,1,t(H)+" field-icon","svelte-1mbmiop",M,{"with-error":t(R)})),w(N,A)};le(ue,N=>{t(H)&&N(Q)})}var B=Ee(ue,2);{var X=N=>{var A=Yb(),M=Ge(A);let te,ve;vt(M,oe=>o(ae,oe),()=>t(ae)),Ut(()=>W("keydown",M,oe=>ne().handleKeyboard(oe))),Ut(()=>W("input",M,oe=>ne().handleInput(oe))),Ut(()=>W("focusout",M,oe=>ne().focusout(oe))),Ut(()=>W("wheel",M,oe=>ne().handleWheel(oe))),Pr(M,oe=>ee==null?void 0:ee(oe));var Ie=Ee(M,2),Pe=Ee(Ie,2);{var Re=oe=>{var Oe=Wb(),Fe=j(Oe),Be=Ee(Fe,2);W("mousedown",Fe,er(dr(Le=>ne().decrement(Le)))),W("mousedown",Be,er(dr(Le=>ne().increment(Le)))),w(oe,Oe)};le(Pe,oe=>{t(I)&&oe(Re)})}Ce(()=>{te=Me(M,1,"editor",null,te,{placeholder:!t(G)}),ls(M,t(G)||""),ve=Ye(M,"",ve,{"text-align":(v(Y()),b(()=>Y().align=="flex-start"?"left":Y().align=="center"?"center":"right "))})}),W("mousedown",Ie,er(dr(function(...oe){var Oe;(Oe=ne().clear)==null||Oe.apply(this,oe)}))),w(N,A)},K=N=>{var A=Kb();let M,te;var ve=j(A);Ce(()=>{M=Me(A,1,"value",null,M,{placeholder:!Z()&&Z()!==0}),te=Ye(A,"",te,{"padding-right":"12px","justify-content":(v(Y()),b(()=>Y().align??"flex-end"))}),Xe(ve,Z()!=null?t(pe):t(y)||"")}),w(N,A)};le(B,N=>{n()=="Editing"?N(X):N(K,!1)})}Ce(()=>{Ue=Me(Ne,1,"superCell",null,Ue,{error:t(R),readonly:t(l),disabled:t(d),inEdit:t(J),isDirty:t(fe)&&t(_),inline:t(de),tableCell:t($)=="tableCell",formInput:t($)=="formInput"}),Vt(Ne,"tabindex",t(d)?-1:0),he=Ye(Ne,"",he,{color:t(c),background:t(p)})}),W("focusin",Ne,function(...N){var A;(A=ne().focus)==null||A.apply(this,N)}),w(e,Ne),pr(r,"cellApi",se);var V=Ct(me);return a(),V}var Qb=F("<i></i>"),Zb=F('<span class="spectrum-Switch-label"> </span>'),Jb=F('<div class="spectrum-Switch spectrum-Switch--emphasized svelte-1l9mgx0"><input class="spectrum-Switch-input" type="checkbox"/> <span class="spectrum-Switch-switch"></span> <!></div>'),$b=F('<span class="checkbox-label svelte-1l9mgx0"> </span>'),ey=F('<input class="checkbox" type="checkbox"/> <!>',1),ty=F("<div><!></div>"),ry=F('<i class="ri-check-line valueicon"></i>'),ny=F('<i class="ri-close-line valueicon"></i>'),iy=F('<div tabIndex="0"><!></div>'),ay=F("<div><!> <!></div>");function tu(e,r){St(r,!1);const n=()=>He(D(),"$cellState",i),[i,s]=qt(),a=h(),l=h(),d=h(),u=h(),g=h(),c=h(),p=h(),_=h();let S=m(r,"value",12),y=m(r,"formattedValue",8),T=m(r,"cellOptions",8),I=h(S()),k=h();const C=Se.createEventDispatcher();let D=m(r,"cellState",24,()=>or(T().initialState??"View",{"*":{goTo(pe){return pe}},View:{focus(){var pe;if(!T().readonly&&!T().disabled)return"Editing";(pe=t(k))==null||pe.focus()}},Editing:{_enter(){var pe;o(I,S()),(pe=t(k))==null||pe.focus(),C("enteredit")},_exit(){C("exitedit")},focus(){var pe;(pe=t(k))==null||pe.focus()},change(pe){T().debounce&&C("change",S())},submit(){return S()!==t(I)&&C("change",S()),C("focusout"),"View"},cancel(){return S(t(I)),"View"}}}));const E=pe=>{T().role=="tableCell"&&pe.focus()};x(()=>v(T()),()=>{o(a,T().role=="inlineInput")}),x(()=>n(),()=>{o(l,n()=="Editing")}),x(()=>(t(l),t(I),v(S())),()=>{o(d,t(l)&&t(I)!==S())}),x(()=>v(T()),()=>{var pe;o(u,((pe=T())==null?void 0:pe.controlType)=="checkbox")}),x(()=>v(T()),()=>{o(g,T().role=="tableCell")}),x(()=>v(T()),()=>{o(c,T().inlineLabel)}),x(()=>v(T()),()=>{o(p,T().error?"ri-error-warning-line":T().icon)}),x(()=>v(T()),()=>{o(_,T().error)}),Mt(),Dt();var U=ay();let $,R;var H=j(U);{var J=pe=>{var De=Qb();let ke;Ce(()=>ke=Me(De,1,t(p)+" field-icon","svelte-1l9mgx0",ke,{"with-error":t(_)})),w(pe,De)};le(H,pe=>{t(p)&&pe(J)})}var de=Ee(H,2);{var fe=pe=>{var De=ty();let ke,ye;var ce=j(De);{var Z=re=>{var G=Jb(),ae=j(G);Ut(()=>xc(ae,S)),vt(ae,O=>o(k,O),()=>t(k)),Ut(()=>W("focusin",ae,function(...O){var q;(q=D().focus)==null||q.apply(this,O)})),Ut(()=>W("focusout",ae,function(...O){var q;(q=D().submit)==null||q.apply(this,O)})),Ut(()=>W("change",ae,function(...O){var q;(q=D().change)==null||q.apply(this,O)})),Pr(ae,O=>E==null?void 0:E(O));var z=Ee(ae,4);{var ge=O=>{var q=Zb(),ne=j(q);Ce(()=>Xe(ne,t(c))),w(O,q)};le(z,O=>{t(c)&&O(ge)})}Ce(()=>ae.disabled=(v(T()),b(()=>T().disabled||T().readonly))),w(re,G)},Y=re=>{var G=ey(),ae=Ge(G);Ut(()=>xc(ae,S)),vt(ae,O=>o(k,O),()=>t(k)),Ut(()=>W("focusin",ae,function(...O){var q;(q=D().focus)==null||q.apply(this,O)})),Ut(()=>W("focusout",ae,function(...O){var q;(q=D().submit)==null||q.apply(this,O)})),Ut(()=>W("change",ae,function(...O){var q;(q=D().change)==null||q.apply(this,O)})),Pr(ae,O=>E==null?void 0:E(O));var z=Ee(ae,2);{var ge=O=>{var q=$b(),ne=j(q);Ce(()=>Xe(ne,t(c))),w(O,q)};le(z,O=>{t(c)&&O(ge)})}Ce(()=>ae.disabled=(v(T()),b(()=>T().disabled||T().readonly))),w(re,G)};le(ce,re=>{t(u)?re(Y,!1):re(Z)})}Ce(()=>{ke=Me(De,1,"editor",null,ke,{"naked-field":!t(g)}),ye=Ye(De,"",ye,{"justify-content":(v(T()),b(()=>T().align??"center"))})}),w(pe,De)},we=pe=>{var De=iy();let ke,ye;var ce=j(De);{var Z=re=>{var G=ry();w(re,G)},Y=re=>{var G=$e(),ae=Ge(G);{var z=ge=>{var O=ny();w(ge,O)};le(ae,ge=>{v(T()),b(()=>T().showFalse)&&ge(z)},!0)}w(re,G)};le(ce,re=>{S()?re(Z):re(Y,!1)})}Ce(()=>{ke=Me(De,1,"value",null,ke,{"with-icon":T().icon}),ye=Ye(De,"",ye,{"justify-content":(v(T()),b(()=>T().align??"center"))})}),W("focusin",De,function(...re){var G;(G=D().focus)==null||G.apply(this,re)}),w(pe,De)};le(de,pe=>{n(),v(T()),v(y()),b(()=>n()=="Editing"||T().role!="tableCell"&&!y())?pe(fe):pe(we,!1)})}Ce(()=>{$=Me(U,1,"superCell",null,$,{inEdit:t(l),isDirty:t(d)&&T().showDirty,inline:t(a),tableCell:t(g),disabled:T().disabled,readonly:T().readonly,"naked-field":!t(g)}),R=Ye(U,"",R,{color:(v(T()),b(()=>T().color)),background:(n(),v(T()),b(()=>n()=="Editing"&&T().role!="inline"?"var(--spectrum-global-color-gray-50)":T().background)),"font-weight":(v(T()),b(()=>T().fontWeight))})}),w(e,U),Ct(),s()}var sy=F('.<span role="spinbutton" aria-label="Milliseconds" tabindex="0" contenteditable="" inputmode="numeric" class="svelte-1y5bf7z"> </span>',1),oy=F(':<span role="spinbutton" aria-label="Seconds" tabindex="0" contenteditable="" inputmode="numeric" class="svelte-1y5bf7z"> </span> <!>',1),ly=F('<div class="time-picker svelte-1y5bf7z" role="none"><span role="spinbutton" aria-label="Hours" tabindex="0" contenteditable="" inputmode="numeric" class="svelte-1y5bf7z"> </span>: <span role="spinbutton" aria-label="Minutes" tabindex="0" contenteditable="" inputmode="numeric" class="svelte-1y5bf7z"> </span> <!></div>');function uy(e,r){St(r,!1);let n=m(r,"browseDate",12),i=m(r,"timePrecision",8),s=m(r,"setTime",8),a=h([]);function l(D){const E=window.getSelection(),U=document.createRange();U.selectNodeContents(D),E==null||E.removeAllRanges(),E==null||E.addRange(U)}function d(D){if(D.key==="ArrowUp"||D.key==="ArrowDown"){const E=u(D.currentTarget),U=D.key==="ArrowUp"?1:-1;_(D.currentTarget,E+U,!0),D.preventDefault(),l(D.currentTarget)}else if(D.key==="ArrowLeft"||D.key==="ArrowRight"||":;-,.".includes(D.key)){const E=t(a).indexOf(D.currentTarget),U=D.key==="ArrowLeft"?-1:1,$=t(a)[E+U];D.preventDefault(),$&&($.focus(),l($))}}function u(D){const E=c(D).label;return E==="Hours"?n().getHours():E==="Minutes"?n().getMinutes():E==="Seconds"?n().getSeconds():n().getMilliseconds()}function g(D,E,U){return U&&D<0?E:U&&D>E?0:Math.max(0,Math.min(E,D))}function c(D){const E=D.getAttribute("aria-label");if(E==="Hours")return{label:E,len:2,max:23};if(E==="Minutes")return{label:E,len:2,max:59};if(E==="Seconds")return{label:E,len:2,max:59};if(E==="Milliseconds")return{label:E,len:3,max:999};throw new Error("Invalid label "+E)}function p(D){const E=("00"+D.getHours()).slice(-2),U=("00"+D.getMinutes()).slice(-2),$=("00"+D.getSeconds()).slice(-2),R=("000"+D.getMilliseconds()).slice(-3);t(a)[0]&&t(a)[0].innerText!==E&&zt(a,t(a)[0].innerText=E),t(a)[1]&&t(a)[1].innerText!==U&&zt(a,t(a)[1].innerText=U),t(a)[2]&&t(a)[2].innerText!==$&&zt(a,t(a)[2].innerText=$),t(a)[3]&&t(a)[3].innerText!==R&&zt(a,t(a)[3].innerText=R)}function _(D,E,U=!1){const $=c(D);E=g(E,$.max,U),$.label==="Hours"?n().setHours(E):$.label==="Minutes"?n().setMinutes(E):$.label==="Seconds"?n().setSeconds(E):$.label==="Milliseconds"&&n().setMilliseconds(E),n(s()(n())),p(n())}function S(D,E){return parseInt(D.replace(/[^\d]/g,"").slice(-E))}function y(D){const E=D,U=c(E.currentTarget);let $;if(E.inputType==="insertText"){const R="000"+u(E.currentTarget);$=S(R+E.currentTarget.innerText,U.len),$>U.max&&E.data&&($=S(E.data,U.len))}else $=S("000"+E.currentTarget.innerText,U.len);_(E.currentTarget,$),l(E.currentTarget)}function T(D){l(D.currentTarget)}x(()=>v(n()),()=>{p(n())}),Mt(),Dt();var I=$e(),k=Ge(I);{var C=D=>{var E=ly(),U=j(E),$=j(U);vt(U,fe=>zt(a,t(a)[0]=fe),()=>{var fe;return(fe=t(a))==null?void 0:fe[0]});var R=Ee(U,2),H=j(R);vt(R,fe=>zt(a,t(a)[1]=fe),()=>{var fe;return(fe=t(a))==null?void 0:fe[1]});var J=Ee(R,2);{var de=fe=>{var we=oy(),pe=Ee(Ge(we)),De=j(pe);vt(pe,ce=>zt(a,t(a)[2]=ce),()=>{var ce;return(ce=t(a))==null?void 0:ce[2]});var ke=Ee(pe,2);{var ye=ce=>{var Z=sy(),Y=Ee(Ge(Z)),re=j(Y);vt(Y,G=>zt(a,t(a)[3]=G),()=>{var G;return(G=t(a))==null?void 0:G[3]}),Ce(G=>Xe(re,G),[()=>(v(n()),b(()=>("000"+n().getMilliseconds()).slice(-3)))]),W("keydown",Y,d),W("input",Y,y),W("focus",Y,T),w(ce,Z)};le(ke,ce=>{i()!=="second"&&ce(ye)})}Ce(ce=>Xe(De,ce),[()=>(v(n()),b(()=>("00"+n().getSeconds()).slice(-2)))]),W("keydown",pe,d),W("input",pe,y),W("focus",pe,T),w(fe,we)};le(J,fe=>{i()!=="minute"&&fe(de)})}Ce((fe,we)=>{Xe($,fe),Xe(H,we)},[()=>(v(n()),b(()=>("00"+n().getHours()).slice(-2))),()=>(v(n()),b(()=>("00"+n().getMinutes()).slice(-2)))]),W("keydown",U,d),W("input",U,y),W("focus",U,T),W("keydown",R,d),W("input",R,y),W("focus",R,T),W("mousedown",E,fe=>{fe.target instanceof HTMLElement&&fe.target.tagName==="SPAN"&&(fe.target.focus(),fe.preventDefault())}),w(D,E)};le(k,D=>{i()&&D(C)})}w(e,I),Ct()}function cy(e){return e%4===0&&e%100!==0||e%400===0}function ko(e,r){return[31,cy(e)?29:28,31,30,31,30,31,31,30,31,30,31][r]}function ru(e,r){const n=ko(e,r),i=[];for(let s=0;s<n;s++)i.push({year:e,month:r,number:s+1});return i}function dy(e,r){const n=e.getFullYear(),i=e.getMonth(),s=new Date(n,i,1).getDay();let a=[];const l=(s-r+7)%7;if(l>0){let c=i-1,p=n;c===-1&&(c=11,p=n-1),a=ru(p,c).slice(-l)}a=a.concat(ru(n,i));let d=i+1,u=n;d===12&&(d=0,u=n+1);const g=42-a.length;return a=a.concat(ru(u,d).slice(0,g)),a}function dh(e,r){r===null?e.setHours(0,0,0,0):r==="minute"?e.setSeconds(0,0):r==="second"&&e.setMilliseconds(0)}function ui(e){return new Date(e)}function Do(e,r,n,i,s){let a=ui(r);return e>r?(xo(a,-1,n,i,s),a<n&&(a=Oo(a,n,i),xo(a,1,n,i,s))):a>=e&&(xo(a,1,n,i,s),a>i&&(a=Oo(a,n,i),xo(a,-1,n,i,s))),(a<n||a>i)&&(a=nu(a,n,i)),a}function xo(e,r,n,i,s){let l=0;for(;s!=null&&s(e)&&e>=n&&e<=i&&l<=36525;)e.setDate(e.getDate()+r),l++}function nu(e,r,n){return e>n?ui(n):e<r?ui(r):ui(e)}function Oo(e,r,n){const i=nu(e,r,n);return e=new Date(i.getFullYear(),i.getMonth(),i.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),e>n&&e.setDate(n.getDate()),e<r&&e.setDate(r.getDate()),e}function fy(){return{weekdays:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekStartsOn:1}}function hy(e){const r=fy();return typeof e.weekStartsOn=="number"&&(r.weekStartsOn=e.weekStartsOn),e.months&&(r.months=e.months),e.shortMonths&&(r.shortMonths=e.shortMonths),e.weekdays&&(r.weekdays=e.weekdays),r}var gy=F("<option> </option>"),vy=F("<option> </option>"),py=F("<option> </option>"),my=F("<option> </option>"),_y=F('<div class="header-cell svelte-pdppv4"> </div>'),by=F('<div class="header-cell svelte-pdppv4"> </div>'),yy=F('<div><span class="svelte-pdppv4"> </span></div>'),wy=F('<div class="week svelte-pdppv4"></div>'),Ey=F('<div class="date-time-picker svelte-pdppv4" tabindex="0"><div class="tab-container svelte-pdppv4" tabindex="-1"><div class="top svelte-pdppv4"><button type="button" aria-label="Previous month" class="page-button svelte-pdppv4" tabindex="-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="svelte-pdppv4"><path d="M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z" transform="rotate(180, 12, 12)"></path></svg></button> <div class="dropdown month svelte-pdppv4"><select class="svelte-pdppv4"></select> <select class="dummy-select svelte-pdppv4" tabindex="-1"></select> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="svelte-pdppv4"><path d="M6 0l12 12-12 12z" transform="rotate(90, 12, 12)"></path></svg></div> <div class="dropdown year svelte-pdppv4"><select class="svelte-pdppv4"></select> <select class="dummy-select svelte-pdppv4" tabindex="-1"></select> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="svelte-pdppv4"><path d="M6 0l12 12-12 12z" transform="rotate(90, 12, 12)"></path></svg></div> <button type="button" aria-label="Next month" class="page-button svelte-pdppv4" tabindex="-1"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="svelte-pdppv4"><path d="M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z"></path></svg></button></div> <div class="header svelte-pdppv4"></div> <!> <!> <!></div></div>');function iu(e,r){St(r,!1);const n=h(),i=h(),s=h(),a=h(),l=Se.createEventDispatcher();let d=m(r,"value",12,null);function u(he){var ue;he.getTime()!==((ue=d())==null?void 0:ue.getTime())&&(o(C,Do(d()??t(C),he,y(),T(),I())),dh(t(C),S()),d(ui(t(C))))}function g(he){o(C,Oo(he,y(),T())),!R()&&d()&&u(t(C))}function c(he){return o(C,nu(he,y(),T())),d()&&u(t(C)),t(C)}const p=new Date;let _=m(r,"initialBrowseDate",24,()=>new Date),S=m(r,"timePrecision",8,null),y=m(r,"min",24,()=>new Date(_().getFullYear()-20,0,1)),T=m(r,"max",24,()=>new Date(_().getFullYear(),11,31,23,59,59,999)),I=m(r,"isDisabledDate",8,null);function k(he){var ue;return(ue=I())==null?void 0:ue(new Date(he.year,he.month,he.number))}let C=h(d()?ui(d()):ui(Oo(_(),y(),T())));function D(he){t(C).getTime()!==(he==null?void 0:he.getTime())&&(o(C,he?ui(he):t(C)),dh(t(C),S()))}let E=h(U(y(),T()));function U(he,ue){let Q=[];for(let B=he.getFullYear();B<=ue.getFullYear();B++)Q.push(B);return Q}let $=m(r,"locale",24,()=>({})),R=m(r,"browseWithoutSelecting",8,!1);function H(he){t(C).setFullYear(he),g(t(C))}function J(he){let ue=t(C).getFullYear();he===12?(he=0,ue++):he===-1&&(he=11,ue--);const Q=ko(ue,he),B=Math.min(t(C).getDate(),Q);g(new Date(ue,he,B,t(C).getHours(),t(C).getMinutes(),t(C).getSeconds(),t(C).getMilliseconds()))}function de(he){fe(he,y(),T())&&!k(he)&&(t(C).setFullYear(0),t(C).setMonth(0),t(C).setDate(1),t(C).setFullYear(he.year),t(C).setMonth(he.month),t(C).setDate(he.number),u(t(C)),l("select",ui(t(C))))}function fe(he,ue,Q){const B=new Date(he.year,he.month,he.number),X=new Date(ue.getFullYear(),ue.getMonth(),ue.getDate()),K=new Date(Q.getFullYear(),Q.getMonth(),Q.getDate());return B>=X&&B<=K}function we(he){if(he.shiftKey&&he.key==="ArrowUp")H(t(C).getFullYear()-1);else if(he.shiftKey&&he.key==="ArrowDown")H(t(C).getFullYear()+1);else if(he.shiftKey&&he.key==="ArrowLeft")J(t(C).getMonth()-1);else if(he.shiftKey&&he.key==="ArrowRight")J(t(C).getMonth()+1);else return!1;return he.preventDefault(),!0}function pe(he){if(he.shiftKey||he.altKey){we(he);return}else if(he.key==="ArrowUp")H(t(C).getFullYear()-1);else if(he.key==="ArrowDown")H(t(C).getFullYear()+1);else if(he.key==="ArrowLeft")J(t(C).getMonth()-1);else if(he.key==="ArrowRight")J(t(C).getMonth()+1);else{we(he);return}he.preventDefault()}function De(he){if(he.shiftKey||he.altKey){we(he);return}else if(he.key==="ArrowUp"||he.key==="ArrowLeft")J(t(C).getMonth()-1);else if(he.key==="ArrowDown"||he.key==="ArrowRight")J(t(C).getMonth()+1);else{we(he);return}he.preventDefault()}function ke(he){var Q,B;let ue=he.shiftKey||he.altKey;if(!(((Q=he.target)==null?void 0:Q.tagName)==="SELECT"||((B=he.target)==null?void 0:B.tagName)==="SPAN")){if(ue){we(he);return}else if(he.key==="ArrowUp")t(C).setDate(t(C).getDate()-7),u(t(C));else if(he.key==="ArrowDown")t(C).setDate(t(C).getDate()+7),u(t(C));else if(he.key==="ArrowLeft")t(C).setDate(t(C).getDate()-1),u(t(C));else if(he.key==="ArrowRight")t(C).setDate(t(C).getDate()+1),u(t(C));else if(he.key==="Enter")u(t(C)),l("select",ui(t(C)));else return;he.preventDefault()}}x(()=>(v(d()),v(T()),v(y()),v(I()),t(C)),()=>{var he;d()&&d()>T()?u(Do(d(),T(),y(),T(),I())):d()&&d()<y()?u(Do(d(),y(),y(),T(),I())):d()&&((he=I())!=null&&he(d()))&&u(Do(t(C),d(),y(),T(),I()))}),x(()=>v(d()),()=>{D(d())}),x(()=>(v(y()),v(T())),()=>{o(E,U(y(),T()))}),x(()=>v($()),()=>{o(n,hy($()))}),x(()=>t(C),()=>{o(i,t(C).getFullYear())}),x(()=>t(C),()=>{o(s,t(C).getMonth())}),x(()=>(t(C),t(n)),()=>{o(a,dy(t(C),t(n).weekStartsOn))}),Mt(),Dt();var ye=Ey(),ce=j(ye),Z=j(ce),Y=j(Z),re=Ee(Y,2),G=j(re);At(G,5,()=>(t(n),b(()=>t(n).months)),Ft,(he,ue,Q)=>{var B=gy(),X=j(B);B.value=B.__value=Q,Ce(K=>{B.disabled=K,Xe(X,t(ue))},[()=>(t(i),v(ko),v(y()),v(T()),b(()=>new Date(t(i),Q,ko(t(i),Q),23,59,59,999)<y()||new Date(t(i),Q)>T()))]),w(he,B)});var ae;Cc(G);var z=Ee(G,2);At(z,5,()=>(t(n),b(()=>t(n).months)),Ft,(he,ue,Q)=>{var B=vy(),X=j(B);B.value=B.__value=Q,Ce(()=>{kc(B,Q===t(s)),Xe(X,t(ue))}),w(he,B)});var ge=Ee(re,2),O=j(ge);At(O,5,()=>t(E),Ft,(he,ue)=>{var Q=py(),B=j(Q),X={};Ce(()=>{Xe(B,t(ue)),X!==(X=t(ue))&&(Q.value=(Q.__value=t(ue))??"")}),w(he,Q)});var q;Cc(O);var ne=Ee(O,2);At(ne,5,()=>t(E),Ft,(he,ue)=>{var Q=my(),B=j(Q),X={};Ce(K=>{kc(Q,K),Xe(B,t(ue)),X!==(X=t(ue))&&(Q.value=(Q.__value=t(ue))??"")},[()=>(t(ue),t(C),b(()=>t(ue)===t(C).getFullYear()))]),w(he,Q)});var se=Ee(ge,2),ee=Ee(Z,2);At(ee,4,()=>Array(7),Ft,(he,ue,Q)=>{var B=$e(),X=Ge(B);{var K=ie=>{var N=_y(),A=j(N);Ce(()=>Xe(A,(t(n),b(()=>t(n).weekdays[t(n).weekStartsOn+Q])))),w(ie,N)},V=ie=>{var N=by(),A=j(N);Ce(()=>Xe(A,(t(n),b(()=>t(n).weekdays[t(n).weekStartsOn+Q-7])))),w(ie,N)};le(X,ie=>{t(n),b(()=>Q+t(n).weekStartsOn<7)?ie(K):ie(V,!1)})}w(he,B)});var me=Ee(ee,2);At(me,0,()=>Array(6),Ft,(he,ue,Q)=>{var B=wy();At(B,5,()=>(t(a),b(()=>t(a).slice(Q*7,Q*7+7))),Ft,(X,K)=>{var V=yy();let ie;var N=j(V),A=j(N);Ce(M=>{ie=Me(V,1,"cell svelte-pdppv4",null,ie,M),Xe(A,(t(K),b(()=>t(K).number)))},[()=>({disabled:!fe(t(K),y(),T())||k(t(K)),selected:d()&&t(K).year===d().getFullYear()&&t(K).month===d().getMonth()&&t(K).number===d().getDate(),today:t(K).year===p.getFullYear()&&t(K).month===p.getMonth()&&t(K).number===p.getDate(),"other-month":t(K).month!==t(s)})]),W("click",V,()=>de(t(K))),w(X,V)}),w(he,B)});var Ne=Ee(me,2);uy(Ne,{get timePrecision(){return S()},setTime:c,get browseDate(){return t(C)},set browseDate(he){o(C,he)},$$legacy:!0});var Ue=Ee(Ne,2);vr(Ue,r,"default",{},null),Ce(()=>{ae!==(ae=t(s))&&(G.value=(G.__value=t(s))??"",gl(G,t(s))),q!==(q=t(i))&&(O.value=(O.__value=t(i))??"",gl(O,t(i)))}),W("click",Y,()=>J(t(C).getMonth()-1)),W("keydown",G,De),W("input",G,he=>J(parseInt(he.currentTarget.value))),W("input",O,he=>H(parseInt(he.currentTarget.value))),W("keydown",O,pe),W("click",se,()=>J(t(C).getMonth()+1)),W("focusout",ye,function(he){Yn.call(this,r,he)}),W("keydown",ye,ke),w(e,ye),Ct()}var Sy=F("<i></i>"),Cy=F('<div> <i class="ri-calendar-line" style="font-size: 16px; justify-self: flex-end"></i></div>'),Ay=F("<div><span> </span></div>"),Ty=F('<div class="time-section svelte-oxi4kl"><input type="time" class="time-input svelte-oxi4kl" step="900"/></div>'),ky=F('<div class="datetime-picker-container svelte-oxi4kl"><!> <!></div>'),Dy=F("<div><!> <!></div> <!>",1);function au(e,r){St(r,!1);const n=()=>He(E(),"$cellState",i),[i,s]=qt(),a=h(),l=h(),d=h(),u=h(),g=h(),c=h(),p=h(),_=h(),S=new Se.createEventDispatcher,{processStringSync:y}=Se.getContext("sdk");let T=m(r,"value",12),I=m(r,"formattedValue",12),k=m(r,"cellOptions",8),C=m(r,"autofocus",8),D=h(),E=m(r,"cellState",24,()=>or("View",{"*":{goTo(z){return z}},View:{focus(){if(!k().readonly)return"Editing"}},Editing:{_enter(){o(D,T()),o(H,!0),S("enteredit")},_exit(){S("exitedit")},handleKeyboard(z){z.keyCode==32&&(z.stopPropagation(),z.preventDefault(),o(H,!t(H)))},focusout(z){var q,ne;const ge=(q=t($))==null?void 0:q.contains(z.relatedTarget),O=(ne=t(R))==null?void 0:ne.contains(z.relatedTarget);if(!ge&&!O)return o(H,!1),T()!=t(D)&&S("change",T()),"View"},cancel(){return T(Array.isArray(t(D))?[...t(D)]:t(D)),"View"}}})),U=h(),$=h(),R=h(),H=h();function J(){if(!T())return"00:00";const z=new Date(T());return`${z.getHours().toString().padStart(2,"0")}:${z.getMinutes().toString().padStart(2,"0")}`}function de(z,ge){if(!z)return"";if(!ge||ge==="default")return z==null?void 0:z.toDateString();if(ge==="MM/DD/YYYY")return`${(z.getMonth()+1).toString().padStart(2,"0")}/${z.getDate().toString().padStart(2,"0")}/${z.getFullYear()}`;if(ge==="DD/MM/YYYY")return`${z.getDate().toString().padStart(2,"0")}/${(z.getMonth()+1).toString().padStart(2,"0")}/${z.getFullYear()}`;if(ge==="YYYY-MM-DD")return`${z.getFullYear()}-${(z.getMonth()+1).toString().padStart(2,"0")}-${z.getDate().toString().padStart(2,"0")}`;const q={"MMM DD, YYYY":{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"},"DD MMM YYYY":{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}}[ge];return q?z.toLocaleDateString("en-US",q):z==null?void 0:z.toDateString()}Se.onMount(()=>{C()&&setTimeout(()=>{E().focus(),editor==null||editor.focus()},30)});const fe=z=>{if(!T()||!t(l))return;const ge=z.target.value,O=new Date(T()),[q,ne]=ge.split(":").map(Number);O.setHours(q,ne,0,0),T(O.toISOString()),S("change",T())};x(()=>v(k()),()=>{var z;o(a,(z=k())==null?void 0:z.dateFormat)}),x(()=>v(k()),()=>{var z;o(l,(z=k())==null?void 0:z.showTime)}),x(()=>(t(l),v(T())),()=>{o(d,t(l)&&T()?J():"00:00")}),x(()=>v(T()),()=>{o(u,T()?new Date(T()):new Date)}),x(()=>(v(k()),v(T()),t(u),t(a)),()=>{I(k().template&&T()?y(k().template,{value:T()}):T()?de(t(u),t(a)):"")}),x(()=>v(k()),()=>{var z;o(g,((z=k())==null?void 0:z.placeholder)||"")}),x(()=>n(),()=>{o(c,n()=="Editing")}),x(()=>v(k()),()=>{o(p,k().role=="inlineInpur")}),x(()=>(t(c),t(D),v(T())),()=>{o(_,t(c)&&t(D)!=T())}),Mt(),Dt();var we=Dy(),pe=Ge(we);let De,ke;var ye=j(pe);{var ce=z=>{var ge=Sy();Ce(()=>Me(ge,1,(v(k()),b(()=>k().icon+" icon")),"svelte-oxi4kl")),w(z,ge)};le(ye,z=>{v(k()),b(()=>k().icon)&&z(ce)})}var Z=Ee(ye,2);{var Y=z=>{var ge=Cy();let O;var q=j(ge);Ce(()=>{O=Me(ge,1,"editor",null,O,{"with-icon":k().icon,placeholder:!I()}),Xe(q,`${(I()||t(g))??""} `)}),W("click",ge,()=>o(H,!t(H))),w(z,ge)},re=z=>{var ge=Ay();let O,q;var ne=j(ge),se=j(ne);Ce(()=>{O=Me(ge,1,"value",null,O,{"with-icon":k().icon,placeholder:!I()}),q=Ye(ge,"",q,{"justify-content":(v(k()),b(()=>k().align))}),Xe(se,I()||t(g))}),w(z,ge)};le(Z,z=>{t(c)?z(Y):z(re,!1)})}vt(pe,z=>o(U,z),()=>t(U));var G=Ee(pe,2);{var ae=z=>{Qr(z,{get anchor(){return t(U)},dismissible:!1,get open(){return t(H)},align:"right",maxHeight:400,children:(ge,O)=>{var q=ky();Ye(q,"",{},{"--date-picker-background":"var(--spectrum-global-color-gray-75)","--date-picker-foreground":"var(--spectrum-global-color-gray-800)","--date-picker-selected-background":"var(--accent-color)"});var ne=j(q);iu(ne,{get value(){return t(u)},set value(me){o(u,me)},$$events:{select:me=>{var Ne;T(me.detail),(Ne=t(U))==null||Ne.focus(),o(H,!1)}},$$legacy:!0});var se=Ee(ne,2);{var ee=me=>{var Ne=Ty(),Ue=j(Ne);vt(Ue,he=>o(R,he),()=>t(R)),ta(Ue,()=>t(d),he=>o(d,he)),W("change",Ue,fe),w(me,Ne)};le(se,me=>{t(l)&&me(ee)})}vt(q,me=>o($,me),()=>t($)),w(ge,q)},$$slots:{default:!0}})};le(G,z=>{t(c)&&z(ae)})}Ce(()=>{De=Me(pe,1,"superCell",null,De,{inEdit:t(c),isDirty:t(_)&&k().showDirty,inline:t(p),tableCell:k().role=="tableCell",formInput:k().role=="formInput",disabled:k().disabled,readonly:k().readonly,error:k().error}),Vt(pe,"tabindex",(v(k()),b(()=>k().readonly||k().disabled?"-1":"0"))),ke=Ye(pe,"",ke,{color:(v(k()),b(()=>k().color)),background:(v(k()),b(()=>k().background)),"font-weight":(v(k()),b(()=>k().fontWeight))})}),W("focus",pe,function(...z){var ge;(ge=E().focus)==null||ge.apply(this,z)}),W("keypress",pe,function(...z){var ge;(ge=E().handleKeyboard)==null||ge.apply(this,z)}),W("focusout",pe,function(...z){var ge;(ge=E().focusout)==null||ge.apply(this,z)}),w(e,we),Ct(),s()}var xy=F('<div> <i class="ri-add-line svelte-r807au"></i></div>'),Oy=F('<div class="option wide loading svelte-r807au"><i class="ri-loader-2-line rotating svelte-r807au"></i> Loading more...</div>'),Iy=F("<!> <!>",1),Ry=F('<div class="option wide loading svelte-r807au"><i class="ri-loader-2-line rotating svelte-r807au"></i> Loading...</div>'),Py=F('<div class="option wide svelte-r807au">No Results Found</div>'),My=F('<div class="option wide selected svelte-r807au"> <i class="ri-close-line svelte-r807au"></i></div>'),Ny=F('<span class="svelte-r807au">Nothing Selected</span>'),Ly=F('<div class="listWrapper svelte-r807au"><div class="list svelte-r807au"><div class="options svelte-r807au"><!></div></div> <div class="list listSelected svelte-r807au"><div class="options svelte-r807au"><!></div></div></div>'),Fy=F('<div> <i class="ri-check-line svelte-r807au"></i></div>'),Vy=F('<div class="option loading svelte-r807au"><i class="ri-loader-2-line rotating svelte-r807au"></i> Loading more...</div>'),Uy=F("<!> <!>",1),By=F('<div class="option loading svelte-r807au"><i class="ri-loader-2-line rotating svelte-r807au"></i> Loading...</div>'),Hy=F('<div class="option svelte-r807au">No Results Found</div>'),zy=F('<div class="listWrapper svelte-r807au"><div class="list svelte-r807au"><div class="options svelte-r807au"><!></div></div></div>'),jy=F('<div class="control svelte-r807au"><div class="searchControl svelte-r807au"><i></i> <input type="text"/></div> <!></div>');function fh(e,r){St(r,!1);const n=()=>He(t(g),"$fetch",i),[i,s]=qt(),a=h(),l=h(),d=h(),u=h(),g=h(),c=h(),{API:p,fetchData:_}=Se.getContext("sdk"),S=Se.createEventDispatcher();let y=m(r,"value",24,()=>[]),T=m(r,"fieldSchema",8),I=m(r,"filter",24,()=>[]),k=m(r,"wide",8,!1),C=m(r,"singleSelect",8);T();let D=T().tableId,E=[],U=h(-1),$=h(),R=h(),H=15,J=h(),de=!0;const fe=ee=>{if(y())return y().find(Ne=>Ne._id==ee._id)},we=ee=>{var me;if(C())((me=t(u)[0])==null?void 0:me._id)==ee._id?o(u,[]):o(u,[{_id:ee._id,primaryDisplay:ee[t(c)]}]);else{let Ne=t(u).findIndex(Ue=>Ue._id==ee._id);Ne>-1?(t(u).splice(Ne,1),o(u,t(u))):(t(u).push({_id:ee._id,primaryDisplay:ee[t(c)]}),o(u,t(u)))}S("change",t(u))},pe=ee=>{t(u).splice(t(u).findIndex(me=>me._id===ee._id),1),o(u,t(u)),S("change",t(u))},De=ee=>{var me;o(R,ee.target.value),ee.target.value?E=[...I(),{field:t(c),type:"string",operator:"fuzzy",value:ee.target.value,valueType:"Value"}]:E=I()??[],(me=t(g))==null||me.update({filter:E})},ke=()=>{var ee,me;(ee=n())!=null&&ee.loading||n().rows.length<H||(H+=100,(me=t(g))==null||me.update({limit:H}))},ye=ee=>{const me=ee.target,Ne=me.scrollTop,Ue=me.scrollHeight,he=me.clientHeight;Ne+he>=Ue-50&&ke()},ce=ee=>{ee.key=="ArrowDown"?(ee.preventDefault(),o(U,t(U)+1),t(U)>n().rows.length-1&&o(U,0)):ee.key=="ArrowUp"?(ee.preventDefault(),o(U,t(U)-1),t(U)<0&&o(U,n().rows.length-1)):ee.key=="Enter"&&t(U)>-1&&we(n().rows[t(U)])},Z={focus:()=>{var ee;(ee=t($))==null||ee.focus()},hasFocus:()=>document.activeElement===t($)};x(()=>v(T()),()=>{var ee,me;o(a,(me=(ee=T())==null?void 0:ee.type)==null?void 0:me.includes("bb_reference"))}),x(()=>(t(a),v(T())),()=>{var ee,me;o(l,t(a)&&!((me=(ee=T())==null?void 0:ee.type)!=null&&me.includes("_single")))}),x(()=>t(a),()=>{o(d,t(a)?"user":"table")}),x(()=>v(y()),()=>{o(u,Array.isArray(y())?y():[])}),x(()=>(t(d),v(I())),()=>{sn(o(g,_({API:p,datasource:{type:t(d),tableId:D},options:{filter:I(),limit:15}})),"$fetch",i)}),x(()=>n(),()=>{var ee,me;o(c,((me=(ee=n())==null?void 0:ee.definition)==null?void 0:me.primaryDisplay)||"email")}),x(()=>(n(),t(U)),()=>{var ee;(ee=n())!=null&&ee.rows&&o(U,Math.min(t(U),n().rows.length-1))}),x(()=>(n(),t(J)),()=>{var ee,me;((me=(ee=n())==null?void 0:ee.rows)==null?void 0:me.length)>0}),Mt();var Y={api:Z};Dt();var re=jy(),G=j(re),ae=j(G);let z;var ge=Ee(ae,2);let O;vt(ge,ee=>o($,ee),()=>t($));var q=Ee(G,2);{var ne=ee=>{var me=$e(),Ne=Ge(me);{var Ue=ue=>{var Q=Ly(),B=j(Q),X=j(B),K=j(X);ea(K,()=>t(u),te=>{var ve=$e(),Ie=Ge(ve);{var Pe=oe=>{var Oe=Iy(),Fe=Ge(Oe);At(Fe,1,()=>(n(),b(()=>{var Te;return((Te=n())==null?void 0:Te.rows)||[]})),Ft,(Te,qe,Ze)=>{var Je=$e(),nt=Ge(Je);{var at=ct=>{var it=xy(),_e=es(()=>we(t(qe)));let We;var Ke=j(it);Ce(()=>{We=Me(it,1,"option wide svelte-r807au",null,We,{highlighted:t(U)==Ze}),Xe(Ke,`${t(qe),t(c),b(()=>t(qe)[t(c)])??""} `)}),W("mouseenter",it,()=>o(U,Ze)),W("mouseleave",it,()=>o(U,-1)),W("mousedown",it,er(dr(function(...Ae){var je;(je=t(_e))==null||je.apply(this,Ae)}))),w(ct,it)};le(nt,ct=>{t(qe),b(()=>!fe(t(qe)))&&ct(at)})}w(Te,Je)});var Be=Ee(Fe,2);{var Le=Te=>{var qe=Oy();w(Te,qe)};le(Be,Te=>{n(),b(()=>{var qe;return((qe=n())==null?void 0:qe.loading)&&n().loaded})&&Te(Le)})}w(oe,Oe)},Re=oe=>{var Oe=$e(),Fe=Ge(Oe);{var Be=Te=>{var qe=Ry();w(Te,qe)},Le=Te=>{var qe=Py();w(Te,qe)};le(Fe,Te=>{n(),b(()=>{var qe;return(qe=n())==null?void 0:qe.loading})?Te(Be):Te(Le,!1)},!0)}w(oe,Oe)};le(Ie,oe=>{n(),b(()=>{var Oe,Fe,Be;return((Fe=(Oe=n())==null?void 0:Oe.rows)==null?void 0:Fe.length)||((Be=n())==null?void 0:Be.loading)&&!de})?oe(Pe):oe(Re,!1)})}w(te,ve)}),vt(B,te=>o(J,te),()=>t(J));var V=Ee(B,2),ie=j(V),N=j(ie);{var A=te=>{var ve=$e(),Ie=Ge(ve);At(Ie,1,()=>t(u),Ft,(Pe,Re)=>{var oe=$e(),Oe=Ge(oe);{var Fe=Be=>{var Le=My(),Te=es(()=>pe(t(Re))),qe=j(Le);Ce(()=>Xe(qe,`${t(Re),b(()=>t(Re).primaryDisplay)??""} `)),cl(3,Le,()=>Nc,()=>({x:-20,duration:130})),W("mousedown",Le,er(dr(function(...Ze){var Je;(Je=t(Te))==null||Je.apply(this,Ze)}))),w(Be,Le)};le(Oe,Be=>{t(Re),b(()=>fe(t(Re)))&&Be(Fe)})}w(Pe,oe)}),w(te,ve)},M=te=>{var ve=Ny();w(te,ve)};le(N,te=>{t(u),b(()=>t(u).length)?te(A):te(M,!1)})}W("scroll",B,ye),W("mousedown",Q,er(()=>{})),w(ue,Q)},he=ue=>{var Q=zy(),B=j(Q),X=j(B),K=j(X);ea(K,()=>t(u),V=>{var ie=$e(),N=Ge(ie);{var A=te=>{var ve=Uy(),Ie=Ge(ve);At(Ie,1,()=>(n(),b(()=>{var oe;return((oe=n())==null?void 0:oe.rows)||[]})),Ft,(oe,Oe,Fe)=>{var Be=Fy(),Le=es(()=>we(t(Oe)));let Te;var qe=j(Be);Ce(Ze=>{Te=Me(Be,1,"option svelte-r807au",null,Te,Ze),Xe(qe,`${t(Oe),t(c),b(()=>t(Oe)[t(c)])??""} `)},[()=>({selected:fe(t(Oe)),highlighted:t(U)==Fe})]),W("mouseenter",Be,()=>o(U,Fe)),W("mouseleave",Be,()=>o(U,-1)),W("mousedown",Be,er(dr(function(...Ze){var Je;(Je=t(Le))==null||Je.apply(this,Ze)}))),w(oe,Be)});var Pe=Ee(Ie,2);{var Re=oe=>{var Oe=Vy();w(oe,Oe)};le(Pe,oe=>{n(),b(()=>{var Oe;return((Oe=n())==null?void 0:Oe.loading)&&n().loaded})&&oe(Re)})}w(te,ve)},M=te=>{var ve=$e(),Ie=Ge(ve);{var Pe=oe=>{var Oe=By();w(oe,Oe)},Re=oe=>{var Oe=Hy();w(oe,Oe)};le(Ie,oe=>{n(),b(()=>{var Oe;return(Oe=n())==null?void 0:Oe.loading})?oe(Pe):oe(Re,!1)},!0)}w(te,ve)};le(N,te=>{n(),b(()=>{var ve,Ie,Pe,Re;return((Ie=(ve=n())==null?void 0:ve.rows)==null?void 0:Ie.length)||((Pe=n())==null?void 0:Pe.loading)&&!((Re=n())!=null&&Re.loaded)})?te(A):te(M,!1)})}w(V,ie)}),vt(B,V=>o(J,V),()=>t(J)),W("scroll",B,ye),W("mousedown",Q,er(()=>{})),w(ue,Q)};le(Ne,ue=>{k()?ue(Ue):ue(he,!1)})}w(ee,me)};le(q,ee=>{n(),b(()=>{var me;return(me=n())==null?void 0:me.rows})&&ee(ne)})}Ce(()=>{Me(ae,1,Sn((n(),t($),b(()=>{var ee;return n().loading&&de?"ri-loader-2-line":(ee=t($))!=null&&ee.value?"ri-filter-fill":"ri-search-line"}))),"svelte-r807au"),z=Ye(ae,"",z,{color:t(R)?"var(--spectrum-global-color-blue-400)":"var(--spectrum-global-color-gray-700)"}),O=Me(ge,1,"search svelte-r807au",null,O,{placeholder:!t(R)}),Vt(ge,"placeholder",(n(),b(()=>{var ee,me,Ne;return(ee=n())!=null&&ee.loading&&!((Ne=(me=n())==null?void 0:me.rows)!=null&&Ne.length)&&de?"Loading...":"Search"})))}),W("input",ge,De),W("keydown",ge,ce),w(e,re),pr(r,"api",Z);var se=Ct(Y);return s(),se}var Gy=F("<i></i>"),qy=F('<ul class="spectrum-TreeView"></ul>'),Wy=F('<li><div class="spectrum-TreeView-itemLink svelte-146t7q6"><i></i> <div><div class="spectrum-TreeView-itemLabel"> </div></div> <!></div> <!> <!></li>');function su(e,r){St(r,!1);const n=()=>He(y(),"$selectedGroups",s),i=()=>He(S(),"$selectedNodes",s),[s,a]=qt(),l=h(),d=h(),u=h(),g=Se.createEventDispatcher();let c=m(r,"tree",8),p=m(r,"open",12,!1),_=m(r,"nodeSelection",8),S=m(r,"selectedNodes",8),y=m(r,"selectedGroups",8),T=h(),I=h(!1),k;const C=()=>{t(u)&&(k&&clearTimeout(k),k=setTimeout(()=>{o(I,!0)},750))},D=()=>{k&&(clearTimeout(k),k=null),o(I,!1)},E=G=>{c().disabled||p()&&U(c().children||[])||(p(!p()),g("nodeClick",{id:c().id,label:c().label}))},U=G=>{if(!G||!G.length)return!1;for(let ae of G)if((ae.isGroup?n().includes(ae.id):i().some(z=>z.id===ae.id))||U(ae.children))return!0;return!1},$=G=>{g("nodeSelect",{id:c().id,label:c().label,row:c().row,group:c().group})};Se.onDestroy(()=>{k&&clearTimeout(k)}),x(()=>v(c()),()=>{c().disabled&&p(!1)}),x(()=>(v(c()),n(),i()),()=>{o(l,c().isGroup?n().includes(c().id):!!i().find(G=>G.id==c().id))}),x(()=>v(c()),()=>{U(c().children||[])&&p(!0)}),x(()=>t(T),()=>{o(d,t(T)&&t(T).scrollWidth>t(T).clientWidth)}),x(()=>(t(d),v(c())),()=>{o(u,t(d)?c().label||"Not Set":null)}),Mt(),Dt();var R=Wy();let H;var J=j(R);Ye(J,"",{},{"padding-right":"0.5rem"});var de=j(J);let fe;Ye(de,"",{},{"font-size":"16px","z-index":"1"});var we=Ee(de,2);Ye(we,"",{},{width:"100%","z-index":"1"});var pe=j(we);Ye(pe,"",{},{"padding-left":"0.25rem","z-index":"10","text-overflow":"ellipsis",overflow:"hidden","white-space":"nowrap"});var De=j(pe);vt(pe,G=>o(T,G),()=>t(T));var ke=Ee(we,2);{var ye=G=>{var ae=Gy();Me(ae,1,"ri-checkbox-circle-fill svelte-146t7q6"),Ye(ae,"",{},{color:"var(--spectrum-global-color-green-500)","font-size":"16px"}),w(G,ae)};le(ke,G=>{t(l)&&G(ye)})}var ce=Ee(J,2);{var Z=G=>{no(G,{get anchor(){return t(T)},get content(){return t(u)},get show(){return t(I)}})};le(ce,G=>{t(u)&&G(Z)})}var Y=Ee(ce,2);{var re=G=>{var ae=qy();At(ae,5,()=>(v(c()),b(()=>c().children)),Ft,(z,ge)=>{var O=$e(),q=Ge(O);su(q,{get tree(){return t(ge)},get nodeSelection(){return _()},get selectedNodes(){return S()},get selectedGroups(){return y()},get open(){return t(ge),b(()=>t(ge).open)},$$events:{nodeSelect(ne){Yn.call(this,r,ne)},nodeClick(ne){Yn.call(this,r,ne)}}}),w(z,O)}),w(G,ae)};le(Y,G=>{v(c()),b(()=>{var ae;return(ae=c().children)==null?void 0:ae.length})&&G(re)})}Ce(()=>{H=Me(R,1,"spectrum-TreeView-item svelte-146t7q6",null,H,{"is-disabled":c().disabled,"is-open":p()}),fe=Me(de,1,"ri-arrow-right-s-line svelte-146t7q6",null,fe,{open:p(),"is-disabled":c().children.length==0||c().disabled}),Xe(De,(v(c()),b(()=>c().label||"Not Set")))}),W("mousedown",de,dr(E)),W("mouseenter",pe,C),W("mouseleave",pe,D),W("mousedown",we,er(dr($))),w(e,R),Ct(),a()}var Yy=F('<div class="search svelte-50nv4i"><!></div>'),Ky=F('<li><div class="spectrum-TreeView-itemLink">Loading</div></li>'),Xy=F('<li><div class="spectrum-TreeView-itemLink">No Matches</div></li>'),Qy=F('<div class="control svelte-50nv4i"><!> <ul style="margin: unset;"><!></ul></div>');function Io(e,r){St(r,!1);const n=()=>He(t(l),"$fetch",s),i=()=>He(H,"$selectedNodes",s),[s,a]=qt(),l=h(),d=h(),u=h(),{API:g,fetchData:c,notificationStore:p}=Se.getContext("sdk"),_=Se.createEventDispatcher();let S=m(r,"value",24,()=>[]),y=m(r,"ownId",8),T=m(r,"fieldSchema",8),I=m(r,"joinColumn",8),k=m(r,"sortColumn",8),C=m(r,"sortOrder",8),D=m(r,"filter",24,()=>[]),E=m(r,"limit",8,250),U=m(r,"multi",8,!1),$=m(r,"quiet",8),R=m(r,"search",8),H=new ai([]),J=10,de=I()||T().name,fe=[],we=h({root:!0,id:"root",label:"Super Tree",children:[]});const pe=(ne,se)=>{let ee=[];return ne==null||ne.forEach(me=>{me[de]==se[t(u)]&&ee.push({id:me[t(u)],disabled:me[t(u)]==y(),disableChildren:!0,label:me[n().definition.primaryDisplay],children:pe(ne,me)})}),ee},De=ne=>{zt(we,t(we).children=[]),ne!=null&&ne.length&&(ne==null||ne.forEach(se=>{se[de]||t(we).children.push({id:se[t(u)],disabled:se[t(u)]==y(),disableChildren:!0,label:se[n().definition.primaryDisplay],children:pe(ne,se)})}),o(we,t(we)))},ke=ne=>{var se;if(ne.detail.id!=y()){if(U()){let ee=i().findIndex(me=>me.id==ne.detail.id);ee>-1?(i().splice(ee,1),Qe(H,i())):i().length<J?Qe(H,[...i(),ne.detail]):p.actions.warning("Cannot select more than "+J+" items")}else Qe(H,((se=i()[0])==null?void 0:se.id)!==ne.detail.id?[{id:ne.detail.id,label:ne.detail.label}]:[]);Z.debounce&&_("change",i().map(ee=>({_id:ee.id,primaryDisplay:ee.label})))}},ye=()=>{S()&&S().length&&(Qe(H,[]),Qe(H,S().map(ne=>({id:ne._id,label:ne.primaryDisplay}))))},ce=ne=>{var se;ne.detail&&ne.detail!=""?fe=[...D(),{field:t(d),type:"string",operator:"fuzzy",value:ne.detail,valueType:"Value"}]:fe=D()??[],(se=t(l))==null||se.update({filter:fe})};let Z={icon:"ri-search-line",initialState:"Editing",role:"inlineInput",debounce:50};x(()=>(v(T()),v(C()),v(k()),v(D()),v(E())),()=>{sn(o(l,c({API:g,datasource:{type:"table",tableId:T().tableId},options:{sortOrder:C(),sortColumn:k(),filter:D(),limit:E()}})),"$fetch",s)}),x(()=>n(),()=>{var ne,se;o(d,(se=(ne=n())==null?void 0:ne.definition)==null?void 0:se.primaryDisplay)}),x(()=>n(),()=>{var ne,se,ee;o(u,((ee=(se=(ne=n())==null?void 0:ne.definition)==null?void 0:se.primary)==null?void 0:ee[0])??"_id")}),x(()=>n(),()=>{De(n().rows)}),x(()=>v(S()),()=>{ye(S())}),Mt(),Dt();var Y=Qy(),re=j(Y);{var G=ne=>{var se=Yy(),ee=j(se);Jr(ee,{autofocus:!0,get cellOptions(){return Z},$$events:{change:ce,exitedit:()=>_("focusout",{})}}),w(ne,se)};le(re,ne=>{R()&&ne(G)})}var ae=Ee(re,2);let z;var ge=j(ae);{var O=ne=>{var se=$e(),ee=Ge(se);At(ee,1,()=>(t(we),b(()=>{var me;return(me=t(we))==null?void 0:me.children})),Ft,(me,Ne)=>{su(me,{get tree(){return t(Ne)},nodeSelection:!0,get selectedNodes(){return H},$$events:{nodeSelect:ke}})}),w(ne,se)},q=ne=>{var se=$e(),ee=Ge(se);{var me=Ue=>{var he=Ky();Me(he,1,"spectrum-TreeView-item",null,{},{"is-open":!0}),w(Ue,he)},Ne=Ue=>{var he=Xy();Me(he,1,"spectrum-TreeView-item",null,{},{"is-open":!0}),w(Ue,he)};le(ee,Ue=>{n(),b(()=>n().loading)?Ue(me):Ue(Ne,!1)},!0)}w(ne,se)};le(ge,ne=>{n(),b(()=>{var se;return n().loaded&&((se=n().rows)==null?void 0:se.length)})?ne(O):ne(q,!1)})}Ce(()=>z=Me(ae,1,"spectrum-TreeView svelte-50nv4i",null,z,{"spectrum-TreeView--quiet":$()})),w(e,Y),Ct(),a()}var Zy=F("<i></i>"),Jy=F("<span> </span>"),$y=F('<div class="item"><i></i> <span> </span></div>'),e0=F('<span class="count"> </span>'),t0=F("<div><!> <!></div>"),r0=F("<span><!> </span>"),n0=F('<i class="ph ph-caret-down control-icon"></i>'),i0=F('<div class="picker-container"><!></div>'),a0=F("<div><!> <div><!></div> <!></div> <!>",1);function Ro(e,r){St(r,!1);const n=()=>He(Y(),"$cellState",s),i=()=>He(re,"$editorState",s),[s,a]=qt(),l=h(),d=h(),u=h(),g=h(),c=h(),p=h(),_=h(),S=h(),y=h(),T=h(),I=h(),k=h(),C=h(),D=h(),E=Se.createEventDispatcher(),{API:U}=Se.getContext("sdk");let $=m(r,"value",8),R=m(r,"fieldSchema",8),H=m(r,"cellOptions",8),J=m(r,"simpleView",12,!0),de=m(r,"filter",24,()=>[]),fe=m(r,"limit",8,100),we=m(r,"ownId",12),pe=m(r,"isUserSelect",8),De=h(JSON.stringify($())),ke=h(),ye=h(),ce,Z=h(),Y=m(r,"cellState",24,()=>or(H().initialState??"View",{"*":{goTo(V){return V},reset(V){o(p,void 0)}},View:{_enter(){},focus(){if(!H().readonly&&!H().disabled)return"Editing"}},Editing:{_enter(){o(De,JSON.stringify(t(p))),re.open(),E("enteredit")},_exit(){re.close(),E("exitedit")},focusout(V){var ie,N;(ie=t(ke))!=null&&ie.contains(V==null?void 0:V.relatedTarget)||(N=t(ye))!=null&&N.contains(V==null?void 0:V.relatedTarget)||this.submit()},clear(){o(p,[])},submit(){return t(S)&&E("change",t(k)&&t(p)?t(p)[0]:t(p)),"View"},cancel(){var V;return o(p,JSON.parse(t(De))),(V=t(ke))==null||V.blur(),"View"}}}));const re=or("Closed",{Open:{close(){return"Closed"},toggle(){return"Closed"}},Closed:{open(){return"Open"},toggle(){return"Open"}}}),G=V=>{var ie;if(V.key=="Escape"&&i()=="Open"){re.close();return}else V.key=="Escape"?Y().cancel():V.keyCode==32&&n()=="Editing"?re.toggle():V.key=="Tab"&&i()=="Open"?Y().focusout():i()=="Open"&&((ie=t(Z))==null||ie.focus())},ae=V=>{o(p,V.detail),t(I)&&(re.close(),t(ke).focus())},z=V=>R().relationshipType=="self"&&V&&!Array.isArray(V)?(U.fetchRow(R().tableId,V,!0).then(ie=>{o(p,[{_id:ie.id,primaryDisplay:R().primaryDisplay?ie[R().primaryDisplay]:ie.name||ie.id}])}).catch(ie=>{o(p,[])}),t(p)||[]):t(l)?$()?[...$()]:[]:$()?[$()]:[];x(()=>v(R()),()=>{var V,ie;o(l,!((ie=(V=R())==null?void 0:V.type)!=null&&ie.includes("_single")))}),x(()=>(v(R()),v(pe())),()=>{var V,ie;o(d,((ie=(V=R())==null?void 0:V.type)==null?void 0:ie.includes("bb_reference"))||pe())}),x(()=>v(H()),()=>{o(u,H().relViewMode=="pills")}),x(()=>v(R()),()=>{o(g,R().type=="link"?"ri-edit-box-line":"ri-user-line")}),x(()=>(v(H()),t(d)),()=>{o(c,H().relViewMode=="links"&&!t(d))}),x(()=>(v(we()),v(H())),()=>{var V;we(we()||((V=H())==null?void 0:V.ownId))}),x(()=>v($()),()=>{o(p,z($()))}),x(()=>n(),()=>{o(_,n()=="Editing")}),x(()=>(t(_),t(De),t(p)),()=>{o(S,t(_)&&t(De)!=JSON.stringify(t(p)))}),x(()=>v(H()),()=>{J(H().relViewMode=="text")}),x(()=>v(H()),()=>{o(y,H().role=="inlineInput")}),x(()=>(v(H()),t(p),t(_)),()=>{var V;o(T,H().controlType=="expanded"&&(((V=t(p))==null?void 0:V.length)>1||t(_)))}),x(()=>(v(R()),t(l)),()=>{var V,ie;o(I,((V=R())==null?void 0:V.relationshipType)=="one-to-many"||((ie=R())==null?void 0:ie.relationshipType)=="self"||!t(l))}),x(()=>(t(d),t(l)),()=>{o(k,t(d)&&!t(l))}),x(()=>v(H()),()=>{o(C,H().placeholder||"")}),x(()=>v(H()),()=>{o(D,H().readonly||H().disabled)}),Mt(),Dt();var ge=a0(),O=Ge(ge);let q,ne;var se=j(O);{var ee=V=>{var ie=Zy();Ce(()=>Me(ie,1,(v(H()),b(()=>H().icon+" field-icon")))),w(V,ie)};le(se,V=>{v(H()),b(()=>{var ie;return(ie=H())==null?void 0:ie.icon})&&V(ee)})}var me=Ee(se,2);let Ne;var Ue=j(me);{var he=V=>{var ie=Jy(),N=j(ie);Ce(()=>Xe(N,t(C))),w(V,ie)},ue=V=>{var ie=$e(),N=Ge(ie);{var A=te=>{var ve=t0();let Ie;var Pe=j(ve);At(Pe,1,()=>t(p),Ft,(Oe,Fe,Be)=>{var Le=$e(),Te=Ge(Le);{var qe=Ze=>{var Je=$y(),nt=j(Je),at=Ee(nt,2),ct=j(at);Ce(()=>{Me(nt,1,Sn(t(g))),Xe(ct,(t(Fe),b(()=>t(Fe).primaryDisplay)))}),W("click",Je,function(...it){var _e;(_e=t(c)?()=>{E("linkClick",t(Fe))}:null)==null||_e.apply(this,it)}),w(Ze,Je)};le(Te,Ze=>{Be<5&&Ze(qe)})}w(Oe,Le)});var Re=Ee(Pe,2);{var oe=Oe=>{var Fe=e0(),Be=j(Fe);Ce(()=>Xe(Be,`(+ ${t(p),b(()=>t(p).length-5)??""})`)),w(Oe,Fe)};le(Re,Oe=>{t(p),b(()=>t(p).length>5)&&Oe(oe)})}Ce(()=>Ie=Me(ve,1,"items",null,Ie,{pills:t(u),links:t(c),isUser:t(d),withCount:t(p).length>5,inEdit:t(_)})),w(te,ve)},M=te=>{var ve=r0(),Ie=j(ve);{var Pe=oe=>{var Oe=Mi();Ce(()=>Xe(Oe,`(${t(p),b(()=>t(p).length)??""})`)),w(oe,Oe)};le(Ie,oe=>{v(H()),t(p),b(()=>H().role=="formInput"&&t(p).length>1)&&oe(Pe)})}var Re=Ee(Ie);Ce(oe=>Xe(Re,` ${oe??""}`),[()=>(t(p),b(()=>t(p).map(oe=>oe.primaryDisplay).join(", ")))]),w(te,ve)};le(N,te=>{t(u)||t(c)?te(A):te(M,!1)},!0)}w(V,ie)};le(Ue,V=>{t(p),b(()=>{var ie;return((ie=t(p))==null?void 0:ie.length)<1})?V(he):V(ue,!1)})}var Q=Ee(me,2);{var B=V=>{var ie=n0();w(V,ie)};le(Q,V=>{t(D),v(H()),t(_),b(()=>!t(D)&&(H().role=="formInput"||t(_)))&&V(B)})}vt(O,V=>o(ke,V),()=>t(ke));var X=Ee(O,2);{var K=V=>{{let ie=Pt(()=>i()=="Open");Qr(V,{get anchor(){return t(ke)},useAnchorWidth:!0,get open(){return t(ie)},get popup(){return t(ye)},set popup(N){o(ye,N)},$$events:{close(...N){var A;(A=Y().cancel)==null||A.apply(this,N)}},children:(N,A)=>{var M=i0(),te=j(M);{var ve=Pe=>{{let Re=Pt(()=>de()??[]),oe=Pt(()=>(v(R()),b(()=>R().relationshipType=="many-to-many"||R().relationshipType=="many-to-one")));Io(Pe,{get fieldSchema(){return R()},get filter(){return t(Re)},get search(){return ce},get limit(){return fe()},get joinColumn(){return v(H()),b(()=>H().joinColumn)},get value(){return t(p)},get ownId(){return we()},get multi(){return t(oe)},$$events:{change:ae}})}},Ie=Pe=>{{let Re=Pt(()=>de()??[]),oe=Pt(()=>(v(H()),t(I),b(()=>H().wide&&!t(I))));fh(Pe,{get fieldSchema(){return R()},get filter(){return t(Re)},get singleSelect(){return t(I)},get value(){return t(p)},get search(){return ce},get wide(){return t(oe)},get api(){return t(Z)},set api(Oe){o(Z,Oe)},$$events:{change:ae},$$legacy:!0})}};le(te,Pe=>{v(R()),b(()=>R().recursiveTable)?Pe(ve):Pe(Ie,!1)})}W("keydown",M,Pe=>{(Pe.key=="Escape"||Pe.key=="Tab")&&(t(ke).focus(),re.close(),Pe.preventDefault())}),w(N,M)},$$slots:{default:!0},$$legacy:!0})}};le(X,V=>{t(_)&&V(K)})}Ce(()=>{var V;q=Me(O,1,"superCell",null,q,{isDirty:t(S)&&H().showDirty,inEdit:t(_),inline:t(y),multirow:t(T),tableCell:H().role=="tableCell",formInput:H().role=="formInput",disabled:H().disabled,readonly:t(D),error:H().error}),Vt(O,"tabindex",(v(H()),b(()=>{var ie;return(ie=H())!=null&&ie.disabled?-1:0}))),ne=Ye(O,"",ne,{color:(v(H()),b(()=>H().color)),background:(v(H()),b(()=>H().background))}),Ne=Me(me,1,"value",null,Ne,{placeholder:((V=t(p))==null?void 0:V.length)<1})}),W("mousedown",O,function(...V){var ie;(ie=re.toggle)==null||ie.apply(this,V)}),W("focusin",O,function(...V){var ie;(ie=Y().focus)==null||ie.apply(this,V)}),W("keydown",O,us(G)),W("focusout",O,function(...V){var ie;(ie=Y().focusout)==null||ie.apply(this,V)}),w(e,ge),Ct(),a()}var s0=F("<i></i>"),o0=F('<textarea tabindex="0"></textarea>'),l0=F('<input tabindex="0"/>'),u0=F('<i class="ri-close-line clearIcon"></i>'),c0=F("<!> <!>",1),d0=F('<div><span class="svelte-l7bjji"> </span></div>'),f0=F("<div><!> <!></div>");function ou(e,r){St(r,!1);const n=()=>He(R(),"$cellState",i),[i,s]=qt(),a=h(),l=h(),d=h(),u=h(),g=h(),c=Se.createEventDispatcher(),{processStringSync:p}=Se.getContext("sdk");Se.getContext("context");let _=m(r,"value",12,null),S=m(r,"formattedValue",12),y=m(r,"cellOptions",24,()=>({role:"formInput",initialState:"Editing",debounce:250,multiline:!0})),T=m(r,"autofocus",8),I,k=h(),C=h(null),D=h(!0),E=h(),U=h();const $=Z=>{if(Z==null||Z==="")return!0;try{return JSON.parse(typeof Z=="string"?Z:JSON.stringify(Z)),!0}catch{return!1}};let R=m(r,"cellState",24,()=>{var Z;return or(((Z=y())==null?void 0:Z.initialState)??"View",{"*":{goTo(Y){return Y},reset(){o(C,t(a)),o(U,void 0),o(D,!0)}},View:{_enter(){o(C,t(a)),o(D,$(_()))},focus(){if(!y().readonly&&!y().disabled)return"Editing"}},Editing:{_enter(){o(k,t(a)),o(C,t(a)),o(D,$(_())),c("enteredit")},_exit(){o(k,void 0),c("exitedit"),c("focusout")},clear(){y().debounce&&c("change",null),_(null),o(C,null),o(D,!0)},focusout(Y){this.submit()},submit(){return t(u)&&t(D)&&c("change",t(C)),"View"},cancel(){return _(t(k)),c("cancel"),"View"},handleKeyboard(Y){Y.key=="Enter"&&!y().multiline&&this.submit(),Y.key=="Escape"&&this.cancel()}}})});const H=Z=>{var re;const Y=Z.target.value;o(D,$(Y)),o(C,Y),o(U,new Date),(re=y())!=null&&re.debounce&&t(D)&&(clearTimeout(I),I=setTimeout(()=>{c("change",t(C))},y().debounce??0))},J=Z=>{Z==null||Z.focus()};Se.onMount(()=>{T()&&setTimeout(()=>{R().focus()},50)}),x(()=>v(_()),()=>{o(a,_()&&$(_())&&typeof _()!="string"?JSON.stringify(_()):_())}),x(()=>v(y()),()=>{o(g,y().readonly||y().disabled?"":y().placeholder||"")}),x(()=>(t(a),t(g),v(y())),()=>{o(l,!t(a)||t(a)===""&&t(g)?t(g):$(t(a))?y().multiline?JSON.stringify(JSON.parse(t(a)),null,2):JSON.stringify(JSON.parse(t(a))):"Invalid JSON")}),x(()=>(v(R()),t(a)),()=>{R().reset(t(a))}),x(()=>n(),()=>{o(d,n()=="Editing")}),x(()=>(t(U),t(k),t(C)),()=>{o(u,t(U)&&t(k)!==t(C))}),x(()=>(v(S()),v(y()),t(a)),()=>{var Z;S(!S()&&((Z=y())!=null&&Z.template)?p(y().template,{value:t(a)}):S())}),Mt(),Dt();var de=f0();let fe,we;var pe=j(de);{var De=Z=>{var Y=s0();Ce(()=>Me(Y,1,(v(y()),b(()=>y().icon+" icon")),"svelte-l7bjji")),w(Z,Y)};le(pe,Z=>{v(y()),b(()=>y().icon&&!y().multiline)&&Z(De)})}var ke=Ee(pe,2);{var ye=Z=>{var Y=c0(),re=Ge(Y);{var G=O=>{var q=o0();let ne,se;vt(q,ee=>o(E,ee),()=>t(E)),Ut(()=>W("input",q,H)),Ut(()=>W("focusout",q,function(...ee){var me;(me=R().focusout)==null||me.apply(this,ee)})),Ut(()=>W("keydown",q,function(...ee){var me;(me=R().handleKeyboard)==null||me.apply(this,ee)})),Pr(q,ee=>J==null?void 0:J(ee)),Ce(()=>{ne=Me(q,1,"editor svelte-l7bjji",null,ne,{"with-icon":y().icon,placeholder:!_()&&!S()&&!t(C)}),ls(q,t(l)),Vt(q,"placeholder",(v(y()),b(()=>{var ee;return((ee=y())==null?void 0:ee.placeholder)??""}))),se=Ye(q,"",se,{"text-align":(v(y()),b(()=>y().align=="center"?"center":y().align=="flex-end"?"right":"left")),"padding-right":(v(y()),b(()=>y().align!="flex-start"?"2rem":"0.75rem")),"white-space":"pre-wrap","overflow-wrap":"break-word","min-height":"8rem","overflow-y":"auto",resize:"vertical"})}),w(O,q)},ae=O=>{var q=l0();let ne,se;vt(q,ee=>o(E,ee),()=>t(E)),Ut(()=>W("input",q,H)),Ut(()=>W("focusout",q,function(...ee){var me;(me=R().focusout)==null||me.apply(this,ee)})),Ut(()=>W("keydown",q,function(...ee){var me;(me=R().handleKeyboard)==null||me.apply(this,ee)})),Pr(q,ee=>J==null?void 0:J(ee)),Ce(()=>{ne=Me(q,1,"editor svelte-l7bjji",null,ne,{"with-icon":y().icon,placeholder:!_()&&!S()&&!t(C)}),ls(q,t(C)??""),Vt(q,"placeholder",(v(y()),b(()=>{var ee;return((ee=y())==null?void 0:ee.placeholder)??""}))),se=Ye(q,"",se,{"text-align":(v(y()),b(()=>y().align=="center"?"center":y().align=="flex-end"?"right":"left")),"padding-right":(v(y()),b(()=>y().align!="flex-start"?"2rem":"0.75rem"))})}),w(O,q)};le(re,O=>{v(y()),b(()=>y().multiline)?O(G):O(ae,!1)})}var z=Ee(re,2);{var ge=O=>{var q=u0();W("mousedown",q,us(er(function(...ne){var se;(se=R().clear)==null||se.apply(this,ne)}))),w(O,q)};le(z,O=>{t(C),v(y()),b(()=>{var q;return t(C)&&((q=y())==null?void 0:q.clearIcon)!==!1})&&O(ge)})}w(Z,Y)},ce=Z=>{var Y=d0();let re,G;var ae=j(Y),z=j(ae);Ce(()=>{re=Me(Y,1,"value svelte-l7bjji",null,re,{multiline:y().multiline,"with-icon":y().icon,placeholder:!_()}),Vt(Y,"tabindex",(v(y()),b(()=>y().readonly||y().disabled?"-1":"0"))),G=Ye(Y,"",G,{"justify-content":(v(y()),b(()=>y().align))}),Xe(z,t(l))}),W("focusin",Y,function(...ge){var O;(O=R().focus)==null||O.apply(this,ge)}),w(Z,Y)};le(ke,Z=>{t(d)?Z(ye):Z(ce,!1)})}Ce(()=>{fe=Me(de,1,"superCell multirow svelte-l7bjji",null,fe,{inEdit:t(d),isDirty:t(u)&&y().showDirty,focused:t(d),inline:y().role=="inlineInput",tableCell:y().role=="tableCell",formInput:y().role=="formInput",disabled:y().disabled,readonly:y().readonly,error:y().error||!t(D),multirow:y().multiline}),we=Ye(de,"",we,{color:(v(y()),b(()=>y().color)),background:(v(y()),b(()=>y().background)),"font-weight":(v(y()),b(()=>y().fontWeight))})}),w(e,de),Ct(),s()}var h0=F('<div class="item pill svelte-1dwl5ut"><span> </span></div>'),g0=F('<span class="remaining-count svelte-1dwl5ut"> </span>'),v0=F('<div class="items"><!> <!></div>'),p0=F("<span> </span>"),m0=F('<i class="ph ph-caret-down action-icon svelte-1dwl5ut"></i>'),_0=F('<button class="btn-delete svelte-1dwl5ut" tabindex="-1" aria-label="Delete" title="Delete" type="button"><i class="ph ph-trash-simple"></i></button>'),b0=F('<div><button class="btn-delete svelte-1dwl5ut" tabindex="-1" aria-label="Delete" title="Delete" type="button"><i class="ph ph-download-simple"></i></button> <div class="pill svelte-1dwl5ut"> </div> <a class="filename svelte-1dwl5ut" download=""> </a> <!></div>'),y0=F('<div class="attachments svelte-1dwl5ut"><!> <button class="btn-upload-empty svelte-1dwl5ut" aria-label="Upload attachment" type="button"><i class="ph ph-plus"></i> Add Attachment</button> <input type="file" style="display: none;"/></div>'),w0=F("<div><div><!> <!></div></div> <!>",1);function lu(e,r){St(r,!1);const n=()=>He(R(),"$cellState",i),[i,s]=qt(),a=h(),l=h(),d=h(),u=h(),g=h(),c=h(),p=Se.createEventDispatcher(),{API:_}=Se.getContext("sdk");let S=m(r,"value",12),y=m(r,"cellOptions",8),T=m(r,"fieldSchema",8),I=m(r,"tableid",8),k=S(),C=h(),D=h(),E=h(),U=h(),$=h(),R=m(r,"cellState",24,()=>or(y().initialState??"View",{"*":{goTo(O){return O}},View:{_enter(){o(E,!1)},focus(){if(!y().readonly)return"Editing"}},Editing:{_enter(){k=S(),p("enteredit")},_exit(){p("exitedit")},toggle(){o(E,!t(E))},focusout(O){var q,ne;if(!((q=t(C))!=null&&q.contains(O.relatedTarget))&&!((ne=t(D))!=null&&ne.contains(O.relatedTarget)))return S()!==k&&p("change",S()),"View"},change(O){y().debounce&&p("change",S())},submit(O){if(!t(D).contains(O.relatedTarget))return S()!==k&&p("change",S()),p("focusout"),"View"},cancel(){return S(k),"View"}}}));const H=async O=>{let q=new FormData;for(let ne=0;ne<O.length;ne++)q.append("file",O[ne]);try{let ne=await _.uploadAttachment(I(),q);return o(l,[...t(l),...ne]),p("change",[...t(l)]),ne}catch(ne){return console.error("Upload failed:",ne),[]}};function J(O){const q=O.target,ne=Array.from(q.files||[]);H(ne)}async function de(O){t(l).splice(O,1),o(l,t(l)),p("change",t(l))}x(()=>v(T()),()=>{var O,q;o(a,((q=(O=T())==null?void 0:O.type)==null?void 0:q.includes("single"))!==!0)}),x(()=>(v(S()),t(a)),()=>{o(l,S()&&t(a)?S():S()?[S()]:[])}),x(()=>n(),()=>{o(d,n()=="Editing")}),x(()=>v(y()),()=>{o(u,y().readonly)}),x(()=>v(y()),()=>{o(g,y().disabled)}),x(()=>v(y()),()=>{o(c,y().placeholder??"")}),Mt(),Dt();var fe=w0(),we=Ge(fe);let pe,De;var ke=j(we);let ye,ce;var Z=j(ke);{var Y=O=>{var q=v0(),ne=j(q);At(ne,1,()=>(t(l),b(()=>t(l).slice(0,5))),Ft,(me,Ne)=>{var Ue=$e(),he=Ge(Ue);{var ue=Q=>{var B=h0();Ye(B,"",{},{border:"1px solid var(--spectrum-global-color-gray-300)"});var X=j(B),K=j(X);Ce(V=>Xe(K,V),[()=>(t(Ne),b(()=>{var V,ie;return(ie=(V=t(Ne))==null?void 0:V.extension)==null?void 0:ie.toUpperCase()}))]),w(Q,B)};le(he,Q=>{t(Ne)&&Q(ue)})}w(me,Ue)});var se=Ee(ne,2);{var ee=me=>{var Ne=g0(),Ue=j(Ne);Ce(()=>Xe(Ue,`( + ${t(l),b(()=>t(l).length-5)??""} )`)),w(me,Ne)};le(se,me=>{t(l),b(()=>t(l).length>5)&&me(ee)})}w(O,q)},re=O=>{var q=p0(),ne=j(q);Ce(()=>Xe(ne,t(c))),w(O,q)};le(Z,O=>{t(l),t(d),b(()=>t(l).length||t(d))?O(Y):O(re,!1)})}var G=Ee(Z,2);{var ae=O=>{var q=m0();w(O,q)};le(G,O=>{t(u),t(g),v(y()),b(()=>!t(u)&&!t(g)&&y().role!="tableCell")&&O(ae)})}vt(we,O=>o(C,O),()=>t(C));var z=Ee(we,2);{var ge=O=>{Qr(O,{get anchor(){return t(C)},get open(){return t(E)},maxHeight:350,useAnchorWidth:!0,children:(q,ne)=>{var se=y0(),ee=j(se);{var me=he=>{var ue=$e(),Q=Ge(ue);At(Q,1,()=>t(l),Ft,(B,X,K)=>{var V=b0();let ie;var N=j(V),A=Ee(N,2),M=j(A),te=Ee(A,2),ve=j(te),Ie=Ee(te,2);{var Pe=Re=>{var oe=_0();W("click",oe,()=>de(K)),w(Re,oe)};le(Ie,Re=>{t(u)||Re(Pe)})}Ce(Re=>{ie=Me(V,1,"attachment svelte-1dwl5ut",null,ie,{focused:t(U)===K}),Xe(M,Re),Vt(te,"href",(t(X),b(()=>t(X).url))),Xe(ve,(t(X),b(()=>t(X).name)))},[()=>(t(X),b(()=>{var Re;return(Re=t(X).extension)==null?void 0:Re.toUpperCase()}))]),W("click",N,()=>de(K)),W("mouseenter",V,()=>o(U,K)),w(B,V)}),w(he,ue)};le(ee,he=>{t(l),b(()=>{var ue;return(ue=t(l))==null?void 0:ue.length})&&he(me)})}var Ne=Ee(ee,2),Ue=Ee(Ne,2);vt(Ue,he=>o($,he),()=>t($)),vt(se,he=>o(D,he),()=>t(D)),Ce(()=>{Ne.disabled=(v(y()),b(()=>y().disabled||y().readonly)),Ue.multiple=t(a)}),W("click",Ne,()=>{var he;return(he=t($))==null?void 0:he.click()}),W("change",Ue,J),w(q,se)},$$slots:{default:!0}})};le(z,O=>{t(d)&&O(ge)})}Ce(()=>{pe=Me(we,1,"superCell",null,pe,{inEdit:n()=="Editing",inline:y().role=="inlineInput",tableCell:y().role=="tableCell",formInput:y().role=="formInput",disabled:y().disabled,readonly:y().readonly}),Vt(we,"tabindex",(v(y()),b(()=>y().readonly||y().disabled?-1:0))),De=Ye(we,"",De,{color:(v(y()),b(()=>y().color)),background:(v(y()),b(()=>y().background))}),ye=Me(ke,1,"value",null,ye,{placeholder:t(l).length<1}),ce=Ye(ke,"",ce,{"padding-left":(v(y()),b(()=>y().icon?"32px":y().padding)),"padding-right":(v(y()),b(()=>y().clearValueIcon?"32px":y().padding))})}),W("click",ke,function(...O){var q;(q=R().toggle)==null||q.apply(this,O)}),W("focusin",we,function(...O){var q;(q=R().focus)==null||q.apply(this,O)}),W("focusout",we,function(...O){var q;(q=R().focusout)==null||q.apply(this,O)}),w(e,fe),Ct(),s()}var E0=F('<div class="grabber"></div>'),S0=F("<div><!> <!> <!> <!></div>");function uu(e,r){var ve,Ie,Pe,Re;St(r,!1);const n=()=>He(D,"$builderStore",g),i=()=>He(ge,"$lockWidth",g),s=()=>He(O,"$columnOptionsStore",g),a=()=>He(ye(),"$stbData",g),l=()=>He(U,"$stbSortColumn",g),d=()=>He($,"$stbSortOrder",g),u=()=>He(E,"$stbSettings",g),[g,c]=qt(),p=h(),_=h(),S=h(),y=h(),T=h(),{memo:I,derivedMemo:k,processStringSync:C,builderStore:D}=Se.getContext("sdk"),E=Se.getContext("stbSettings"),U=Se.getContext("stbSortColumn"),$=Se.getContext("stbSortOrder"),R=Se.getContext("stbHovered"),H=Se.getContext("stbEditing"),J=Se.getContext("stbState"),de=Se.getContext("stbAPI"),fe={string:Jr,longform:Jr,number:Es,bigint:Es,options:oa,array:oa,jsonarray:oa,boolean:tu,datetime:au,link:Ro,json:ou,attachment_single:lu,attachment:lu,bb_reference_single:Ro,bb_reference:Ro},we={string:Jr,number:Es,bigint:Es,options:oa,array:oa,jsonarray:oa,boolean:tu,datetime:au,link:Jr,json:ou,attachment_single:null,attachment:null,bb_reference_single:Jr,bb_reference:Jr};let pe=m(r,"columnOptions",8),De=m(r,"sticky",8),ke=m(r,"scrollPos",8),ye=m(r,"stbData",8),ce=Math.random()*100,Z=h(),Y=h(),re,G=0,ae=h(),z=h(),ge=I(0);const O=I({...pe(),cellComponent:fe[(Ie=(ve=pe())==null?void 0:ve.schema)==null?void 0:Ie.type]??Jr,headerComponent:we[(Re=(Pe=pe())==null?void 0:Pe.schema)==null?void 0:Re.type]??Jr}),q=k(O,oe=>({role:"tableCell",showDirty:!0,readonly:!oe.canEdit,align:oe.align,template:oe.template,optionsViewMode:oe.optionsViewMode,relViewMode:oe.relViewMode,padding:oe.isFirst?"1rem":"0.5rem",background:oe.background,color:oe.color,controlType:"checkbox"})),ne=k(O,oe=>({align:oe==null?void 0:oe.align,color:oe==null?void 0:oe.color,background:"var(--spectrum-global-color-gray-50)",fontWeight:oe==null?void 0:oe.fontWeight,padding:oe==null?void 0:oe.cellPadding,placeholder:oe.defaultFilteringOperator,clearValueIcon:!0,optionsViewMode:"text",optionsSource:"schema",debounce:250,controlType:"select",initialState:"Editing",role:"inlineInput"})),se=or("Idle",{"*":{reset(){return"Idle"},headerClicked(){s().canFilter?this.filter():this.sort()},sort(){pe().canSort&&(J.sortBy(pe().name,t(ae)=="ascending"?"descending":"ascending"),o(ae,"descending"))},lockWidth(){var oe;t(Z)||Qe(ge,(oe=t(z))==null?void 0:oe.clientWidth)},unlockWidth(){t(Z)||(Qe(ge,0),pe().asComponent||this.lockWidth.debounce(50))},startResizing(oe){oe.stopPropagation(),oe.preventDefault(),o(Z,!0),re=oe.clientX,G=t(z).clientWidth,Qe(ge,G)},resize(oe){Qe(ge,G+oe.clientX-re)},stopResizing(oe){oe.preventDefault(),oe.stopPropagation(),o(Z,!1),re=void 0,i()},resetSize(oe){oe.preventDefault(),oe.stopPropagation(),Qe(ge,0)}},Idle:{_enter(){Qe(ge,0)},filter(){return pe().canFilter?"Entering":"Idle"},enteredit(oe){if(!t(p))return Qe(H,oe),J.edit(),"EditingCell"},addRow(){return"Inserting"}},Entering:{_enter(){Qe(ge,t(z).clientWidth)},filter(oe){return J.addFilter({...oe,id:ce}),"Filtered"},cancel(){return"Idle"},clear(){return"Idle"}},Filtered:{filter(oe){J.removeFilter(ce),J.addFilter({...oe,id:ce})},clear(){return J.clearFilter(ce),"Entering"}},EditingCell:{_enter(){Qe(ge,t(z).clientWidth),J.edit.debounce(30)},patchRow(oe,Oe,Fe,Be,Le){J.patchRow(oe,Oe,Fe,Be,Le)},exitedit(oe){return Qe(H,-1),J.endEdit.debounce(50),"Idle"}},Inserting:{_enter(){Qe(ge,t(z).clientWidth)},_exit(){Qe(ge,0)},cancelAddRow(){return"Idle"}}}),ee=(oe,Oe)=>{if(oe&&(Oe!=null&&Oe.includes("."))){for(var Fe=0,Oe=Oe.split("."),Be=Oe.length;Fe<Be;Fe++)if(oe[Oe[Fe]])oe=oe[Oe[Fe]];else{oe=null;break}return oe}else return oe[Oe]??void 0},me=(oe,Oe)=>oe>0?oe:Oe.widthOverride?Oe.widthOverride:Oe.sizing=="fixed"?Oe.fixedWidth:Oe.minWidth,Ne=(oe,Oe)=>oe>0?oe:Oe.widthOverride?Oe.widthOverride:Oe.sizing=="fixed"?Oe.fixedWidth:"unset",Ue=oe=>{let Oe,Fe=pe().canEdit;return(oe==null?void 0:oe.type)=="json",Oe=fe[oe==null?void 0:oe.type]||Jr,Oe==Jr&&!Fe&&(Oe=eu),Oe};Se.setContext("stColumnOptions",O),Se.setContext("stRowCellOptions",q),Se.setContext("stHeaderCellOptions",ne),Se.setContext("stColumnState",se),Se.onMount(()=>{de==null||de.registerSuperColumn(ce,se),(s().sizing==="flexible"||s().sizing==="flex")&&s().sizing!=="fixed"&&setTimeout(()=>{t(z)&&i()===0&&!pe().asComponent&&Qe(ge,t(z).clientWidth)},0)}),Se.onDestroy(()=>{de==null||de.unregisterSuperColumn(ce)}),x(()=>n(),()=>{var oe;o(p,(oe=n())==null?void 0:oe.inBuilder)}),x(()=>(v(pe()),t(p),v(De()),v(ke())),()=>{var oe,Oe;O.set({...pe(),inBuilder:t(p),cellComponent:Ue(pe().schema),headerComponent:we[(Oe=(oe=pe())==null?void 0:oe.schema)==null?void 0:Oe.type]??Jr,background:De()&&ke()?"var(--spectrum-global-color-gray-75)":pe().quiet?"transparent":pe().background})}),x(()=>(i(),s()),()=>{o(_,Ne(i(),s()))}),x(()=>(i(),s()),()=>{o(S,me(i(),s()))}),x(()=>(a(),s()),()=>{var oe,Oe;o(T,(Oe=(oe=a())==null?void 0:oe.rows)==null?void 0:Oe.map(Fe=>ee(Fe,s().name)))}),x(()=>(s(),t(T)),()=>{o(y,s().footerTemplate?C(s().footerTemplate,{values:t(T)}):void 0)}),x(()=>(l(),s(),t(ae),d()),()=>{l()==s().name?o(ae,d()):l()!=s().name&&t(ae)&&o(ae,void 0)}),Mt();var he={columnState:se};Dt();var ue=S0();W("mouseup",qs,function(...oe){var Oe;(Oe=s().canResize?Fe=>{t(Z)&&se.stopResizing(Fe)}:null)==null||Oe.apply(this,oe)}),W("mousemove",qs,function(...oe){var Oe;(Oe=s().canResize?Fe=>{t(Z)&&se.resize(Fe)}:null)==null||Oe.apply(this,oe)});let Q,B;var X=j(ue);{var K=oe=>{var Oe=E0();let Fe;Ce(()=>Fe=Ye(Oe,"",Fe,{height:(s(),b(()=>s().headerHeight-16))})),W("mousedown",Oe,function(...Be){var Le;(Le=se.startResizing)==null||Le.apply(this,Be)}),W("dblclick",Oe,function(...Be){var Le;(Le=se.resetSize)==null||Le.apply(this,Be)}),W("mouseenter",Oe,()=>o(Y,!0)),W("mouseleave",Oe,()=>o(Y,!1)),w(oe,Oe)};le(X,oe=>{s(),b(()=>s().showHeader&&s().canResize)&&oe(K)})}var V=Ee(X,2);{var ie=oe=>{ib(oe,{get sorted(){return t(ae)}})};le(V,oe=>{s(),b(()=>s().showHeader)&&oe(ie)})}var N=Ee(V,2);{let oe=Pt(()=>(a(),b(()=>{var Oe;return(Oe=a())==null?void 0:Oe.rows})));Eb(N,{get rows(){return t(oe)},get rowHeight(){return u(),b(()=>u().appearance.rowHeight)},get field(){return s(),b(()=>s().name)},get idField(){return u(),b(()=>u().data.idColumn)},get zebra(){return u(),b(()=>u().appearance.zebraColors)},get isLast(){return s(),b(()=>s().isLast)},get isFirst(){return s(),b(()=>s().isFirst)},children:(Oe,Fe)=>{var Be=$e(),Le=Ge(Be);vr(Le,r,"default",{},null),w(Oe,Be)},$$slots:{default:!0}})}var A=Ee(N,2);{var M=oe=>{Cb(oe,{get footerLabel(){return t(y)}})};le(A,oe=>{s(),b(()=>s().showFooter)&&oe(M)})}vt(ue,oe=>o(z,oe),()=>t(z)),Ce(()=>{Q=Me(ue,1,"super-column",null,Q,{sticky:De()&&ke(),resizing:t(Z),considerResizing:t(Y)&&!t(Z),isLast:s().isLast}),B=Ye(ue,"",B,{"max-width":t(_),"min-width":t(S)})}),W("mouseleave",ue,()=>Qe(R,null)),w(e,ue),pr(r,"columnState",se);var te=Ct(he);return c(),te}var C0=F('<div class="super-column-header"><span></span></div>'),A0=F('<div><div class="row-buttons svelte-1rx9pah"><!> <!></div></div>'),T0=F('<div class="add-row" style="padding: unset;"></div>'),k0=F('<div class="super-column-footer"></div>'),D0=F('<div class="action-menu svelte-1rx9pah"></div>'),x0=F("<div><!> <div></div> <!> <!></div> <!>",1);function hh(e,r){St(r,!1);const n=()=>He(D,"$stbSettings",p),i=()=>He($,"$stbHorizontalScrollPos",p),s=()=>He(E,"$stbState",p),a=()=>He(J,"$stbMenuID",p),l=()=>He(fe,"$stbVisibleRows",p),d=()=>He(R,"$stbHovered",p),u=()=>He(de,"$rowMetadata",p),g=()=>He(H,"$stbEditing",p),c=()=>He(U,"$stbData",p),[p,_]=qt(),S=h(),y=h(),T=h(),I=h(),k=h(),C=h(),D=Se.getContext("stbSettings"),E=Se.getContext("stbState"),U=Se.getContext("stbData"),$=Se.getContext("stbHorizontalScrollPos"),R=Se.getContext("stbHovered"),H=Se.getContext("stbEditing"),J=Se.getContext("stbMenuID"),de=Se.getContext("stbRowMetadata"),fe=Se.getContext("stbVisibleRows"),we=Se.getContext("stbAPI");let pe=m(r,"right",8),De=m(r,"rowMenu",8),ke=m(r,"rowMenuItems",8),ye=m(r,"menuItemsVisible",8,0),ce=m(r,"canScroll",8),Z=h(),Y=h();const re=(ue,Q)=>{o(Z,ue.target),o(Y,!t(Y)),Qe(J,t(Y)?Q:-1)};x(()=>n(),()=>{o(S,n().appearance.quiet)}),x(()=>n(),()=>{o(y,n().rowMenuIcon)}),x(()=>(i(),v(pe())),()=>{o(T,i()>0&&!pe())}),x(()=>s(),()=>{o(I,s()=="Inserting")}),x(()=>(v(ye()),v(ke())),()=>{var ue;o(k,ye()<((ue=ke())==null?void 0:ue.length)?ke().slice(0,ye()):ke())}),x(()=>(v(ye()),v(ke())),()=>{var ue;o(C,ye()<((ue=ke())==null?void 0:ue.length)?ke().slice(ye(),ke().length):[])}),Mt(),Dt();var G=x0(),ae=Ge(G);let z;Ye(ae,"",{},{flex:"none"});var ge=j(ae);{var O=ue=>{var Q=C0();w(ue,Q)};le(ge,ue=>{n(),b(()=>n().showHeader)&&ue(O)})}var q=Ee(ge,2);let ne;Ye(q,"",{},{"margin-top":"var(--super-column-top-offset)"}),At(q,5,l,Ft,(ue,Q)=>{var B=A0();let X,K;var V=j(B);let ie;var N=j(V);{var A=ve=>{var Ie=$e(),Pe=Ge(Ie);At(Pe,1,()=>t(k),Ft,(Re,oe)=>{let Oe=()=>t(oe).conditions,Fe=()=>t(oe).disabledTemplate,Be=()=>t(oe).onClick,Le=()=>t(oe).disabled,Te=()=>sv(t(oe),["conditions","disabledTemplate","onClick","disabled"]);var qe=$e(),Ze=Ge(qe);{var Je=nt=>{{let at=Pt(()=>(Le(),g(),t(Q),u(),Fe(),c(),b(()=>{var ct,it;return Le()||g()==t(Q)||u()[t(Q)].disabled||we.shouldDisableButton(Fe(),we.enrichContext((it=(ct=c())==null?void 0:ct.rows)==null?void 0:it[t(Q)]))})));ra(nt,kv(Te,{get disabled(){return t(at)},onClick:()=>{we.executeRowButtonAction(t(Q),Be())}}))}};le(Ze,nt=>{Oe(),c(),t(Q),b(()=>{var at,ct;return we.shouldShowButton(Oe()||[],we.enrichContext((ct=(at=c())==null?void 0:at.rows)==null?void 0:ct[t(Q)]))})&&nt(Je)})}w(Re,qe)}),w(ve,Ie)};le(N,ve=>{v(De()),t(k),b(()=>{var Ie;return De()&&((Ie=t(k))==null?void 0:Ie.length)})&&ve(A)})}var M=Ee(N,2);{var te=ve=>{ra(ve,{size:"S",get icon(){return t(y)},text:"",quiet:"true",type:"secondary",onClick:Ie=>re(Ie,t(Q))})};le(M,ve=>{v(De()),t(C),b(()=>{var Ie;return De()&&((Ie=t(C))==null?void 0:Ie.length)})&&ve(te)})}Ce(()=>{X=Me(B,1,"super-row",null,X,{"is-selected":u()[t(Q)].selected,"is-hovered":d()==t(Q)||a()==t(Q),"is-editing":g()==t(Q),"is-disabled":u()[t(Q)].disabled}),K=Ye(B,"",K,{"min-height":(u(),t(Q),b(()=>u()[t(Q)].height)),"padding-right":ce()&&pe()?"1.5rem":"0.5rem"}),ie=Ye(V,"",ie,{gap:(t(k),b(()=>t(k).length>1?"0.5rem":"0rem"))})}),W("mouseenter",B,()=>Qe(R,t(Q))),W("mouseleave",B,()=>Qe(R,null)),w(ue,B)});var se=Ee(q,2);{var ee=ue=>{var Q=T0();w(ue,Q)};le(se,ue=>{t(I)&&ue(ee)})}var me=Ee(se,2);{var Ne=ue=>{var Q=k0();w(ue,Q)};le(me,ue=>{n(),b(()=>n().showFooter)&&ue(Ne)})}var Ue=Ee(ae,2);{var he=ue=>{{let Q=Pt(()=>pe()?"right":"left");Qr(ue,{open:!0,get anchor(){return t(Z)},minWidth:150,get align(){return t(Q)},$$events:{close:()=>{o(Y,!1),Qe(J,void 0)}},children:(B,X)=>{var K=$e(),V=Ge(K);{var ie=N=>{var A=D0();At(A,5,()=>t(C),Ft,(M,te)=>{let ve=()=>t(te).text,Ie=()=>t(te).icon,Pe=()=>t(te).disabled,Re=()=>t(te).onClick,oe=()=>t(te).size;{let Oe=Pt(()=>pe()?"right":"left");ra(M,{get size(){return oe()},get icon(){return Ie()},get text(){return ve()},get disabled(){return Pe()},menuItem:!0,get menuAlign(){return t(Oe)},onClick:()=>{we.executeRowButtonAction(a(),Re()),o(Y,!1),Qe(J,void 0)}})}}),w(N,A)};le(V,N=>{t(C),b(()=>{var A;return(A=t(C))==null?void 0:A.length})&&N(ie)})}w(B,K)},$$slots:{default:!0}})}};le(Ue,ue=>{t(Y)&&ue(he)})}Ce(()=>{z=Me(ae,1,"super-column",null,z,{right:pe(),sticky:t(T)}),ne=Me(q,1,"super-column-body",null,ne,{quiet:t(S),sticky:t(T),zebra:n().appearance.zebraColors})}),w(e,G),Ct(),_()}var O0=F('<i class="ph ph-check svelte-4c8yj5"></i>'),I0=F('<i class="ph ph-minus svelte-4c8yj5"></i>'),R0=F("<button><!></button>");function gh(e,r){St(r,!1);const n=Se.createEventDispatcher();let i=m(r,"checked",12,!1),s=m(r,"partial",8,!1),a=m(r,"disabled",8,!1),l=m(r,"hovered",8,!1);function d(){a()||(i(!i()),n("change",{checked:i()}))}Dt();var u=R0();let g;var c=j(u);{var p=S=>{var y=O0();w(S,y)},_=S=>{var y=$e(),T=Ge(y);{var I=k=>{var C=I0();w(k,C)};le(T,k=>{s()&&k(I)},!0)}w(S,y)};le(c,S=>{i()?S(p):S(_,!1)})}Ce(()=>g=Me(u,1,"svelte-4c8yj5",null,g,{checked:i(),disabled:a(),hovered:l()})),W("click",u,d),w(e,u),Ct()}var P0=F('<span class="row-number"></span>'),M0=F('<div class="control-column-header"><!> <!> <!></div>'),N0=F('<div class="row-number"> </div>'),L0=F("<div><!> <!> <!></div>"),F0=F('<div class="add-row" style="padding: unset;"></div>'),V0=F('<div class="super-column-footer"></div>'),U0=F("<div><!> <div><!> <!></div> <!></div>");function B0(e,r){St(r,!1);const n=()=>He(fe,"$stbSelected",p),i=()=>He(ce(),"$stbData",p),s=()=>He(R,"$stbSettings",p),a=()=>He(H,"$stbHorizontalScrollPos",p),l=()=>He(pe,"$stbVisibleRows",p),d=()=>He(De,"$stbRowMetadata",p),u=()=>He(J,"$stbHovered",p),g=()=>He(de,"$stbMenuID",p),c=()=>He($,"$stbState",p),[p,_]=qt(),S=h(),y=h(),T=h(),I=h(),k=h(),C=h(),D=h(),E=h(),U=h(),$=Se.getContext("stbState"),R=Se.getContext("stbSettings"),H=Se.getContext("stbHorizontalScrollPos"),J=Se.getContext("stbHovered"),de=Se.getContext("stbMenuID"),fe=Se.getContext("stbSelected"),we=Se.getContext("stbAPI"),pe=Se.getContext("stbVisibleRows"),De=Se.getContext("stbRowMetadata");let ke=m(r,"sticky",12),ye=m(r,"hideSelectionColumn",8),ce=m(r,"stbData",8);x(()=>(n(),i()),()=>{var G,ae;o(S,n().length&&n().length!=((ae=(G=i())==null?void 0:G.rows)==null?void 0:ae.length))}),x(()=>(n(),i()),()=>{var G,ae,z,ge;o(y,n().length==((ae=(G=i())==null?void 0:G.rows)==null?void 0:ae.length)&&((ge=(z=i())==null?void 0:z.rows)==null?void 0:ge.length)>0)}),x(()=>s(),()=>{o(T,s().appearance.numberingColumn)}),x(()=>(s(),v(ye())),()=>{o(I,s().features.canSelect&&!ye())}),x(()=>s(),()=>{o(k,s().features.canDelete)}),x(()=>a(),()=>{ke(a()>0)}),x(()=>(t(T),t(I),t(k)),()=>{o(C,t(T)||t(I)||t(k))}),x(()=>s(),()=>{o(D,s().appearance.zebraColors)}),x(()=>s(),()=>{o(E,s().appearance.quiet)}),x(()=>(t(I),s(),l()),()=>{o(U,t(I)&&s().features.maxSelected!=1&&l().length>0)}),Mt(),Dt();var Z=$e(),Y=Ge(Z);{var re=G=>{var ae=U0();let z;var ge=j(ae);{var O=he=>{var ue=M0();Ye(ue,"",{},{gap:"1rem"});var Q=j(ue);{var B=N=>{var A=P0();w(N,A)};le(Q,N=>{t(T)&&N(B)})}var X=Ee(Q,2);{var K=N=>{gh(N,{get checked(){return t(y)},get partial(){return t(S)},$$events:{change(...A){var M;(M=we.selectAllRows)==null||M.apply(this,A)}}})};le(X,N=>{t(U)&&N(K)})}var V=Ee(X,2);{var ie=N=>{{let A=Pt(()=>(n(),b(()=>n().length==0)));$l(N,{icon:"trash",size:"small",variant:"warning",get disabled(){return t(A)},tooltip:"Delete Selected Rows",$$events:{click(...M){var te;(te=we.deleteSelectedRows)==null||te.apply(this,M)}}})}};le(V,N=>{t(k),n(),b(()=>t(k)&&n().length>1)&&N(ie)})}w(he,ue)};le(ge,he=>{s(),b(()=>{var ue;return(ue=s())==null?void 0:ue.showHeader})&&he(O)})}var q=Ee(ge,2);let ne;Ye(q,"",{},{"margin-top":"var(--super-column-top-offset)"});var se=j(q);At(se,1,l,he=>he,(he,ue)=>{const Q=Pt(()=>(d(),t(ue),b(()=>{var ve;return(ve=d()[t(ue)])==null?void 0:ve.selected})));var B=L0();let X,K;var V=j(B);{var ie=ve=>{var Ie=N0(),Pe=j(Ie);Ce(()=>Xe(Pe,t(ue)+1)),w(ve,Ie)};le(V,ve=>{t(T)&&ve(ie)})}var N=Ee(V,2);{var A=ve=>{{let Ie=Pt(()=>(d(),t(ue),b(()=>{var Re;return(Re=d()[t(ue)])==null?void 0:Re.disabled}))),Pe=Pt(()=>u()==t(ue));gh(ve,{get checked(){return t(Q)},get disabled(){return t(Ie)},get hovered(){return t(Pe)},$$events:{change:()=>we.selectRow(t(ue))}})}};le(N,ve=>{s(),v(ye()),b(()=>s().features.canSelect&&!ye())&&ve(A)})}var M=Ee(N,2);{var te=ve=>{{let Ie=Pt(()=>(d(),t(ue),b(()=>{var Pe;return(Pe=d()[t(ue)])==null?void 0:Pe.disabled})));$l(ve,{icon:"trash",size:"small",variant:"warning",get disabled(){return t(Ie)},tooltip:"Delete Row",$$events:{click:()=>we.deleteRow(t(ue))}})}};le(M,ve=>{t(k)&&ve(te)})}Ce(()=>{var ve;X=Me(B,1,"super-row selection svelte-1oaf1jq",null,X,{"is-selected":t(Q),"is-hovered":u()==t(ue)||g()==t(ue),"is-disabled":(ve=d()[t(ue)])==null?void 0:ve.disabled}),K=Ye(B,"",K,{"min-height":(d(),t(ue),b(()=>{var Ie;return(Ie=d()[t(ue)])==null?void 0:Ie.height}))})}),W("mouseenter",B,()=>Qe(J,t(ue))),W("mouseleave",B,()=>Qe(J,null)),w(he,B)});var ee=Ee(se,2);{var me=he=>{var ue=F0();w(he,ue)};le(ee,he=>{c()=="Inserting"&&he(me)})}var Ne=Ee(q,2);{var Ue=he=>{var ue=V0();Ye(ue,"",{},{padding:"unset"}),w(he,ue)};le(Ne,he=>{s(),b(()=>s().showFooter)&&he(Ue)})}Ce(()=>{z=Me(ae,1,"super-column control-column",null,z,{sticky:ke()}),ne=Me(q,1,"super-column-body",null,ne,{zebra:t(D),quiet:t(E),sticky:ke()})}),w(G,ae)};le(Y,G=>{t(C)&&G(re)})}w(e,Z),Ct(),_()}var H0=F('<div class="action-menu svelte-1lstotj"></div>');function z0(e,r){St(r,!1);const n=()=>He(c,"$stbMenuAnchor",s),i=()=>He(g,"$stbMenuID",s),[s,a]=qt(),l=h(),d=h(),u=Se.getContext("stbAPI"),g=Se.getContext("stbMenuID"),c=Se.getContext("stbMenuAnchor");let p=m(r,"rowContextMenuItems",8),_=m(r,"right",8,!0),S=m(r,"row",8);x(()=>n(),()=>{o(l,n()!=-1)}),x(()=>(v(p()),v(S())),()=>{var k;o(d,(k=p())==null?void 0:k.filter(({conditions:C})=>u.shouldShowButton(C||[],u.enrichContext(S()))))}),Mt(),Dt();var y=$e(),T=Ge(y);{var I=k=>{{let C=Pt(()=>_()?"right":"left");Qr(k,{open:!0,get anchor(){return n()},get align(){return t(C)},ignoreAnchor:!1,$$events:{close:()=>{Qe(g,-1),Qe(c,-1)}},children:(D,E)=>{var U=H0();At(U,5,()=>t(d),Ft,($,R)=>{let H=()=>t(R).text,J=()=>t(R).icon,de=()=>t(R).disabled,fe=()=>t(R).onClick,we=()=>t(R).size,pe=()=>t(R).type;{let De=Pt(()=>_()?"right":"left");ra($,{get size(){return we()},get type(){return pe()},get icon(){return J()},get text(){return H()},get disabled(){return de()},quiet:!0,menuItem:!0,get menuAlign(){return t(De)},onClick:()=>{u.executeRowContextMenuAction(i(),fe())}})}}),w(D,U)},$$slots:{default:!0}})}};le(T,k=>{t(l),t(d),b(()=>{var C;return t(l)&&((C=t(d))==null?void 0:C.length)})&&k(I)})}w(e,y),Ct(),a()}var j0=F('<div class="st-control-columns"><!></div>');function vh(e,r){var n=j0(),i=j(n);vr(i,r,"default",{},null),w(e,n)}var G0=F('<div class="no-columns-placeholder">No columns defined. Please add columns to the Super Table.</div>'),q0=F('<div class="st-master-columns" tabIndex="-1"><!> <!> <!></div>');function W0(e,r){St(r,!1);const n=()=>He(g(),"$stbSettings",a),i=()=>He(d(),"$superColumns",a),s=()=>He(u(),"$commonColumnOptions",a),[a,l]=qt();let d=m(r,"superColumns",8),u=m(r,"commonColumnOptions",8),g=m(r,"stbSettings",8),c=m(r,"columnsViewport",12),p=m(r,"showActionColumn",8),_=m(r,"canScroll",8),S=m(r,"stbData",8);Dt();var y=q0(),T=j(y);{var I=$=>{var R=$e(),H=Ge(R);vr(H,r,"default",{},null),w($,R)};le(T,$=>{n(),b(()=>n().superColumnsPos=="first")&&$(I)})}var k=Ee(T,2);{var C=$=>{var R=G0();w($,R)},D=$=>{var R=$e(),H=Ge(R);At(H,1,i,Ft,(J,de,fe)=>{{let we=Pt(()=>(s(),t(de),i(),v(p()),v(_()),b(()=>({...s(),...t(de),isFirst:fe==0,isLast:fe==i().length-1&&!p()&&_()}))));uu(J,{get stbData(){return S()},get columnOptions(){return t(we)}})}}),w($,R)};le(k,$=>{i(),b(()=>i().length===0)?$(C):$(D,!1)})}var E=Ee(k,2);{var U=$=>{var R=$e(),H=Ge(R);vr(H,r,"default",{},null),w($,R)};le(E,$=>{n(),b(()=>n().superColumnsPos=="last")&&$(U)})}vt(y,$=>c($),()=>c()),w(e,y),Ct(),l()}var Y0=F('<div class="pagination-limit-offset svelte-vhhjk6"><div class="pagination-controls svelte-vhhjk6"><button class="pagination-btn svelte-vhhjk6" title="First Page"><i class="ph ph-caret-double-left"></i></button> <button class="pagination-btn svelte-vhhjk6" title="Previous Page"><i class="ph ph-caret-left"></i></button> <span class="pagination-info svelte-vhhjk6"> </span> <button class="pagination-btn svelte-vhhjk6" title="Next Page"><i class="ph ph-caret-right"></i></button></div></div>');function K0(e,r){St(r,!1);const n=()=>He(_(),"$dataSource",s),i=()=>He(S(),"$fetch",s),[s,a]=qt(),l=h(),d=h(),u=h();Se.createEventDispatcher();let g=m(r,"limit",8,50),c=m(r,"pagination",8,"none"),p=m(r,"currentOffset",12,0),_=m(r,"dataSource",8,null),S=m(r,"fetch",8,null);function y(){p()>0&&(p(Math.max(0,p()-g())),k())}function T(){t(u)&&(p(p()+g()),k())}function I(){p(0),k()}function k(){_()&&Qe(_(),{...n(),queryParams:{...n().queryParams,offset:p()}})}const C=$=>{if(!$||!$.parameters)return!1;const R=$.parameters.map(H=>H.name.toLowerCase());return R.includes("offset")&&R.includes("limit")};x(()=>(n(),v(c())),()=>{o(l,C(n())&&c()==="limitOffset")}),x(()=>n(),()=>{var $,R;p(((R=($=n())==null?void 0:$.queryParams)==null?void 0:R.offset)||0)}),x(()=>(v(p()),v(g())),()=>{o(d,Math.floor(p()/g())+1)}),x(()=>(i(),v(g())),()=>{var $,R;o(u,((R=($=i())==null?void 0:$.rows)==null?void 0:R.length)>=g())}),Mt(),Dt();var D=$e(),E=Ge(D);{var U=$=>{var R=Y0(),H=j(R),J=j(H);Ye(J,"",{},{"margin-right":"-0.25rem"});var de=Ee(J,2),fe=Ee(de,2),we=j(fe),pe=Ee(fe,2);Ce(()=>{J.disabled=t(d)<=1,de.disabled=t(d)<=1,Xe(we,`Page ${t(d)??""}
|
|
8
|
+
( ${p()??""} - ${v(p()),i(),b(()=>{var De,ke;return p()+(((ke=(De=i())==null?void 0:De.rows)==null?void 0:ke.length)||0)})??""} )`),pe.disabled=!t(u)}),W("click",J,I),W("click",de,y),W("click",pe,T),w($,R)};le(E,$=>{t(l)&&$(U)})}w(e,D),Ct(),a()}var X0=F("<!> <!> <!>",1),Q0=F('<div class="wrapper svelte-qwchjq"><div><!> <!> <!> <!> <!> <!> <!> <!> <!> <!></div> <!></div>');function Z0(e,r){St(r,!1);const n=()=>He(di,"$dataSourceStore",de),i=()=>He(t(ur),"$stbData",de),s=()=>He(Ue,"$builderStore",de),a=()=>He(he,"$context",de),l=()=>He(be,"$stbMenuID",de),d=()=>He(_n,"$stbRowMetadata",de),u=()=>He(Et,"$stbSelected",de),g=()=>He(Vr,"$new_row",de),c=()=>He(Dn,"$stbSettings",de),p=()=>He(Hn,"$stbScrollPos",de),_=()=>He($n,"$stbScrollOffset",de),S=()=>He(t(ce),"$cumulativeHeights",de),y=()=>He(Yt,"$stbState",de),T=()=>He(xn,"$stbHorizontalScrollPos",de),I=()=>He(cr,"$stbSortColumn",de),k=()=>He(Jt,"$stbSortOrder",de),C=()=>He(un,"$filterStore",de),D=()=>He(t(pe),"$stbSelectedRows",de),E=()=>He(ue,"$component",de),U=()=>He(dn,"$stbSchema",de),$=()=>He(Fn,"$columnsStore",de),R=()=>He(vi,"$tableStyles",de),H=()=>He(t(ye),"$superColumns",de),J=()=>He(Sr,"$commonColumnOptions",de),[de,fe]=qt(),we=h(),pe=h(),De=h(),ke=h(),ye=h(),ce=h(),Z=h(),Y=h(),re=h(),G=h(),{API:ae,processStringSync:z,notificationStore:ge,enrichButtonActions:O,ActionTypes:q,Provider:ne,fetchData:se,QueryUtils:ee,memo:me,derivedMemo:Ne,builderStore:Ue}=Se.getContext("sdk"),he=Se.getContext("context"),ue=Se.getContext("component");let Q=m(r,"comp_id",8),B=m(r,"inBuilder",8),X=m(r,"dataSource",8),K=m(r,"sortColumn",12),V=m(r,"sortOrder",12),ie=m(r,"limit",8,50),N=m(r,"autoRefreshRate",8),A=m(r,"paginate",8),M=m(r,"filter",8),te=m(r,"columnList",8),ve=m(r,"tableActions",8),Ie=m(r,"showFooter",8),Pe=m(r,"showHeader",8,!0),Re=m(r,"size",8,"M"),oe=m(r,"canInsert",8),Oe=m(r,"canDelete",8),Fe=m(r,"canEdit",8),Be=m(r,"canResize",8),Le=m(r,"canFilter",8),Te=m(r,"canSelect",8),qe=m(r,"insertFieldsConfig",8),Ze=m(r,"superColumnsPos",8),Je=m(r,"showAutoColumns",8),nt=m(r,"showSpecialColumns",8),at=m(r,"debounce",8,750),ct=m(r,"rowMenu",8),it=m(r,"rowMenuItems",8),_e=m(r,"rowMenuIcon",8,"ri-more-fill"),We=m(r,"menuItemsVisible",8,0),Ke=m(r,"rowContextMenuItems",8),Ae=m(r,"preselectedIds",8),je=m(r,"hideSelectionColumn",8),et=m(r,"numberingColumn",8),lt=m(r,"stickFirstColumn",8,!1),mt=m(r,"maxSelected",8,0),Ot=m(r,"selectedActions",8),It=m(r,"beautifyLabels",8),Lt=m(r,"columnSizing",8,"flex"),Tt=m(r,"columnMinWidth",8,"7rem"),ut=m(r,"columnMaxWidth",8,"auto"),rt=m(r,"columnFixedWidth",8,"7rem"),st=m(r,"dividers",8,"horizontal"),ft=m(r,"dividersColor",8),_t=m(r,"rowColorTemplate",8),Bt=m(r,"rowBGColorTemplate",8),Rt=m(r,"rowDisabledTemplate",8),Ht=m(r,"rowHeight",8),kt=m(r,"footerColorTemplate",8),tr=m(r,"footerBGColorTemplate",8),nr=m(r,"useOptionColors",8,!0),Wt=m(r,"optionsViewMode",8,"colorText"),Zt=m(r,"relViewMode",8,"pills"),ar=m(r,"zebraColors",8,!1),Gt=m(r,"quiet",8),hr=m(r,"highlighters",8),qr=m(r,"entitySingular",8,"Row"),Dr=m(r,"entityPlural",8,"Rows"),wr=m(r,"onRowSelect",8),gr=m(r,"onCellChange",8),Nr=m(r,"onRowClick",8),Lr=m(r,"onCellClick",8),Tn=m(r,"onLinkClick",8),_r=m(r,"onInsert",8),ln=m(r,"afterInsert",8),Fr=m(r,"onDelete",8),Zn=m(r,"afterDelete",8),zi=m(r,"afterEdit",8),pa=m(r,"onRefresh",8);const di=me(X()),Fn=me(te()),_n=ai([]),un=me(M());let $r=h(),Wr=h(),fi=h(),hi=h(!1),Ai,Ti=h(),en=h(),ma=h(),Yr=h([]),tn=h(),cn=h(),lr=h(),bn=h(),Kr=h(),yn=0,_a=0,ba=h(),Jn=h(),gi=ie(),ji=h(!1),Er,ur=h(ai({rows:[],count:0,definition:{}})),ki=!1,Vn=h(0),Un=new Set,kn=h({}),Xa;const Vr=ai({});let Bn;const Dn=me({}),dn=me({}),Hn=me(0),$n=me(0),Qa=me(0),xn=me(0),f=me(0),P=me([]),be=me(-1),ze=me(-1),Et=me([]),bt=me(mt()),Xt=me(-1),Qt=me(-1),cr=me({}),Jt=me({}),xr=["created_by","created_at","updated_by","updated_at","deleted_by","deleted_at"],rn=L=>(L.parameters&&(L={...L,queryParams:{...L.queryParams,limit:ie()}}),se({API:ae,datasource:L,options:{query:t(ke),sortColumn:K(),sortOrder:V(),limit:ie(),paginate:!0}})),ht={unflattenObject:(L,xe=".")=>L?Object.keys(L).reduce((Ve,tt)=>{const gt=tt.split(xe);return gt.reduce((yt,ot,Nt)=>{if(Nt===gt.length-1)return yt[ot]=L[tt],yt;const wt=gt[Nt+1];return yt[ot]||(yt[ot]=isNaN(Number(wt))?{}:[]),yt[ot]},Ve),Ve},{}):{},populateColumns:(L,xe,Ve,tt)=>{let gt=[],yt=[],ot=[],Nt=[];return o(Wr,ht.detectPK(i())),L?(xe!=null&&xe.length?Nt=xe.map(wt=>ht.enrichColumn(L,{...wt,field:wt.name})):(Ve&&(yt=Object.keys(L).filter(wt=>{var Ir;return(Ir=L[wt])==null?void 0:Ir.autocolumn}).map(wt=>ht.enrichColumn(L,L[wt]))),tt&&(ot=Object.keys(L).filter(wt=>xr.includes(wt)).map(wt=>ht.enrichColumn(L,L[wt]))),gt=Object.keys(L).filter(wt=>L[wt].nestedJSON).map(wt=>ht.enrichColumn(L,L[wt])),Nt=Object.keys(L).filter(wt=>{var Ir;return!L[wt].autocolumn&&!xr.includes(wt)&&!L[wt].nestedJSON&&((Ir=L[wt])==null?void 0:Ir.visible)!=!1&&wt!=t(Wr)}).map(wt=>ht.enrichColumn(L,L[wt]))),[...yt,...Nt,...gt,...ot].sort((wt,Ir)=>wt.order-Ir.order)):[]},enrichColumn:(L,xe)=>{var ot,Nt,wt,Ir;let Ve,tt,gt,yt=(ot=X())==null?void 0:ot.tableId;if(xe.name.includes(".")){let Gi=xe.name.split("."),qo=(Nt=L[Gi[0]])==null?void 0:Nt.schema;qo&&qo[Gi[1]]?(tt=qo[Gi[1]],Ve=tt.type):(Ve="string",tt={})}else tt=L[xe.name],tt?Ve=tt.type:(Ve="string",tt={}),xe.name.startsWith("fk_self_")&&(gt=!0,Ve="link",xe.displayName=xe.displayName||xe.name.replace("fk_self_","").replace("_id","").replace(/_/g," "),tt={...tt,tableId:yt,relationshipType:"self",recursiveTable:!0,primaryDisplay:(Ir=(wt=i())==null?void 0:wt.definition)==null?void 0:Ir.primaryDisplay,type:"link"});return{...xe,widthOverride:xe.width,readonly:tt==null?void 0:tt.readonly,canEdit:!B()&&yt&&M_[Ve]&&Fe()&&!(tt!=null&&tt.readonly)&&!gt&&!xe.autocolumn,canFilter:R_[Ve]?Le():!1,canSort:P_[Ve],filteringOperators:ee.getValidOperatorsForType({type:Ve}),defaultFilteringOperator:ch[Ve],headerAlign:xe.align?xe.align:"flex-start",type:Ve,displayName:ht.beautifyLabel(xe.displayName??xe.name),schema:tt}},enrichContext:L=>({...a(),[Q()]:{...a()[Q()],row:L}}),registerSuperColumn:(L,xe)=>{o(Yr,[...t(Yr),{id:L,state:xe}])},unregisterSuperColumn:L=>{let xe=t(Yr).findIndex(Ve=>Ve.id==L);xe>-1&&(t(Yr).splice(xe,1),o(Yr,t(Yr)))},shouldDisableButton:(L,xe)=>L?z(L,xe):!1,shouldShowButton:(L,xe)=>{function Ve(ot,Nt){switch(Nt.toLowerCase()){case"number":return Number(ot);case"string":return String(ot);case"boolean":return ot==="true"||ot===!0;default:return ot}}function tt(ot,Nt,wt){switch(Nt.toLowerCase()){case"equal":case"equals":return ot==wt;case"not equal":case"not equals":return ot!=wt;case"greater than":return ot>wt;case"less than":return ot<wt;case"greater than or equal":return ot>=wt;case"less than or equal":return ot<=wt;case"contains":return typeof ot=="string"&&ot.includes(wt);case"not contains":return typeof ot=="string"&&!ot.includes(wt);case"starts with":return typeof ot=="string"&&ot.startsWith(wt);case"ends with":return typeof ot=="string"&&ot.endsWith(wt);case"is empty":return ot==null||ot==="";case"is not empty":return ot!=null&&ot!=="";default:return!1}}if(!L||L.length===0)return!0;let yt=!L.some(ot=>ot.action.toLowerCase()==="show");for(const ot of L){const Nt=z(ot.referenceValue,xe),wt=z(ot.newValue,xe),Ir=Ve(Nt,ot.type),Gi=Ve(wt,ot.valueType);tt(Ir,ot.operator,Gi)&&(yt=ot.action.toLowerCase()==="show")}return yt},executeRowButtonAction:async(L,xe)=>{var tt;let Ve=O(xe,ht.enrichContext((tt=i())==null?void 0:tt.rows[L]));await(Ve==null?void 0:Ve())},executeRowOnClickAction:async L=>{await ht.executeRowButtonAction(L,Nr())},executeCellOnClickAction:async(L,xe,Ve,tt)=>{var yt;let gt=O(Lr(),ht.enrichContext((yt=i())==null?void 0:yt.rows[L]));await(gt==null?void 0:gt({column:xe,value:Ve,id:tt}))},executeOnLinkClickAction:async(L,xe)=>{let Ve=O(Tn(),{column:L,id:xe._id,primaryDisplay:xe.primaryDisplay});await(Ve==null?void 0:Ve({column:L,id:xe._id,primaryDisplay:xe.primaryDisplay}))},executeRowOnSelectAction:async L=>{var Ve;await Se.tick();let xe=O(wr(),ht.enrichContext((Ve=i())==null?void 0:Ve.rows[L]));await(xe==null?void 0:xe())},showContextMenu:(L,xe)=>{var Ve;(Ve=Ke())!=null&&Ve.length&&l()!=L?(Qe(be,L),Qe(ze,xe)):(Qe(be,-1),Qe(ze,-1))},executeRowContextMenuAction:async(L,xe)=>{await ht.executeRowButtonAction(L,xe),Qe(be,-1),Qe(ze,-1)},executeSelectedRowsAction:async L=>{ht.executeRowButtonAction(null,L)},selectRow:L=>{var Ve;let xe=ht.getRowId((Ve=i())==null?void 0:Ve.rows[L],L);d()[L].disabled,mt()!=1?u().includes(xe)?(u().splice(u().indexOf(xe),1),Qe(Et,u())):mt()==0||u().length<mt()?Qe(Et,[...u(),xe]):ge.actions.warning("Cannot select more than "+mt()+" "+(Dr()||"Rows")):u().includes(xe)?Qe(Et,[]):Qe(Et,[xe]),u().length&&ht.executeRowOnSelectAction(L)},selectAllRows:()=>{var L,xe;u().length!=((L=i())==null?void 0:L.rows.length)?Qe(Et,(xe=i())==null?void 0:xe.rows.map((Ve,tt)=>ht.getRowId(Ve,tt))):Qe(Et,[])},clearSelection:()=>{Qe(Et,[])},insertRow:async L=>{O(ln(),a());let xe;if(_r()&&_r().length){let Ve=O(_r(),a());await(Ve==null?void 0:Ve())}else{Yt.startSave();try{xe=await ae.saveRow({...g(),tableId:t($r)},{suppressErrors:!0}),Si(Vr,b(g).errors={},b(g)),Qe(Vr,g()),Yt.refresh();let Ve={...a(),[Q()]:{row:xe}},tt=O(ln(),Ve);return await(tt==null?void 0:tt({row:xe})),Yt.endSave(),xe}catch(Ve){if(Bn&&clearTimeout(Bn),Bn=setTimeout(()=>{Qe(Vr,{...g(),errors:{}})},2e3),Si(Vr,b(g).errors={},b(g)),Ve.json&&Ve.json.validationErrors){const tt=Ve.json.validationErrors;Object.keys(tt).forEach(gt=>{Si(Vr,b(g).errors[gt]=tt[gt][0]||"Validation error",b(g))})}else Ve.details||Ve.errors?(Ve.details||Ve.errors).forEach(gt=>{gt.field&&Si(Vr,b(g).errors[gt.field]=gt.message||"Validation error",b(g))}):Si(Vr,b(g).errors={general:Ve.message||"Save failed"},b(g))}}},deleteRow:async L=>{var ot,Nt,wt,Ir;let xe=(ot=i())==null?void 0:ot.rows[L];Si(_n,b(d)[L].disabled=!0,b(d)),await Se.tick();let Ve=xe[t(Wr)];if(!Ve||!t($r))return;let tt=[{parameters:{confirm:!0,notificationOverride:!1,customTitleText:"Delete "+(qr()||"Row")+" ?",confirmText:"Are you sure you want to delete this "+(qr()||"Row")+" ?",tableId:t($r),rowId:Ve},"##eventHandlerType":"Delete Row"}],gt,yt=O(Zn(),ht.enrichContext((Nt=i())==null?void 0:Nt.rows[L]));(wt=Fr())!=null&&wt.length?gt=O(Fr(),ht.enrichContext((Ir=i())==null?void 0:Ir.rows[L])):gt=O(tt,{}),await(gt==null?void 0:gt({row:xe})),await(yt==null?void 0:yt({row:xe})),u().includes(ht.getRowId(xe,L))&&(u().splice(u().indexOf(ht.getRowId(xe,L)),1),Qe(Et,u())),t(ur).refresh()},deleteSelectedRows:async()=>{let L=u().map(yt=>ht.getRowById(yt)).filter(yt=>yt),xe=L.map(yt=>yt._id);L.forEach(yt=>{const ot=i().rows.indexOf(yt);ot!==-1&&Si(_n,b(d)[ot].disabled=!0,b(d))}),await Se.tick();let Ve=[{parameters:{confirm:!0,notificationOverride:!0,customTitleText:"Delete "+u().length+" "+(Dr()||"Rows")+" ?",confirmText:"Are you sure you want to delete these "+(Dr()||"Rows")+" ?",tableId:t($r),rowId:xe.map(yt=>({_id:yt.toString()}))},"##eventHandlerType":"Delete Row"}],tt=O(Ve,{}),gt=O(Zn(),a());await(tt==null?void 0:tt()),await(gt==null?void 0:gt()),t(ur).refresh()},patchRow:async L=>{if(!t($r))return;L=ht.unflattenObject(L);let xe;xe=await ae.patchRow({tableId:t($r),...L},!0),Yt.refresh();let Ve={...a(),[Q()]:{row:xe}},tt=O(zi(),Ve);return await(tt==null?void 0:tt({row:xe})),xe},getRowId:(L,xe)=>{var Ve;return t(Wr)?((Ve=L[t(Wr)])==null?void 0:Ve.toString())??xe.toString():xe.toString()},getRowById:L=>t(Wr)?i().rows.find(xe=>{var Ve;return((Ve=xe[t(Wr)])==null?void 0:Ve.toString())===L}):i().rows[parseInt(L)],extendQuery:(L,xe)=>{var tt,gt;if(!Object.keys(xe).length)return L;const Ve={[Ia.LogicalOperator.AND]:{conditions:[...L?[L]:[],...Object.values(xe||{})]},onEmptyFilter:Ia.EmptyFilterOption.RETURN_NONE};return(((gt=(tt=Ve[Ia.LogicalOperator.AND])==null?void 0:tt.conditions)==null?void 0:gt.length)??0)>0?Ve:{}},addQueryExtension:(L,xe)=>{!L||!xe||o(kn,{...t(kn),[L]:xe})},removeQueryExtension:L=>{if(!L)return;const xe={...t(kn)};delete xe[L],o(kn,xe)},beautifyLabel:L=>{if(!It()||!L)return L;let xe=L.split(".");return xe.forEach((Ve,tt)=>{let gt=Ve.split("_");gt.forEach((yt,ot)=>{var Nt;yt&&(gt[ot]=((Nt=yt[0])==null?void 0:Nt.toUpperCase())+(yt==null?void 0:yt.slice(1)))}),xe[tt]=gt.join(" ")}),xe.join(" - ")},detectPK:L=>{var Ve,tt,gt;if(((tt=(Ve=L==null?void 0:L.definition)==null?void 0:Ve.primary)==null?void 0:tt.length)===1)return L.definition.primary[0];const xe=((gt=L==null?void 0:L.definition)==null?void 0:gt.schema)||(L==null?void 0:L.schema)||{};return"id"in xe?"id":"_id"in xe||n().type=="viewV2"?"_id":null},loadPreSelections:L=>{Qe(Et,Array.isArray(L)?L.map(xe=>xe.toString()):typeof L=="string"?L.split(",").map(xe=>xe.trim()):L?[L]:[])},decidePagination:L=>{if(!L){o(fi,"none");return}if(L.parameters&&L.parameters.length){const xe=L.parameters.map(Ve=>Ve.name.toLowerCase());xe.includes("offset")&&xe.includes("limit")&&o(fi,"limitOffset")}else X().tableId?o(fi,"cursor"):o(fi,"none");o(hi,t(fi)=="cursor")}},Yt=or("Init",{"*":{init(){return"Init"},refresh(){var L;(L=t(ur))==null||L.refresh()},enrichRows(L,xe,Ve,tt,gt,yt){var ot;L!=null&&L.loading||Qe(_n,((ot=L==null?void 0:L.rows)==null?void 0:ot.map((Nt,wt)=>({height:tt&&zn(z(tt,{...a(),[Q()]:{row:Nt}}))||c().appearance.rowHeight,bgcolor:xe?z(xe,{...a(),[Q()]:{row:Nt}}):void 0,color:Ve?z(Ve,{...a(),[Q()]:{row:Nt}}):void 0,disabled:gt?z(gt,{...a(),[Q()]:{row:Nt}}):void 0,selected:yt.includes(ht.getRowId(Nt,wt))})))||[{}])},lockColumnWidths(){ki||(ki=!0,t(Yr).forEach(({state:L})=>L.lockWidth()))},unlockColumnWidths(){ki&&(ki=!1,t(Yr).forEach(({state:L})=>L.unlockWidth()))},scrollToTop(){Qe(Hn,0),Qe($n,0),this.calculateRowBoundaries()},scrollTo(L){Qe(Hn,L),this.calculateRowBoundaries()},scrollToEnd(){Qe(Hn,t(en)>t(lr)?t(en)-t(lr):p()),this.calculateRowBoundaries()},calculateBoundaries(){var Ve;if(!((Ve=i())==null?void 0:Ve.rows)||!t(bn))return;const xe=c().appearance.rowHeight;o(en,(S()[S().length-1]||0)+(oe()?4*xe:2*xe)),o(lr,t(bn).clientHeight-c().appearance.headerHeight-c().appearance.footerHeight+xe),o(tn,t(en)>t(lr)),o(ba,t(tn)),Qe(Qa,t(en)>t(lr)?p()/(t(en)-t(lr)):0),this.calculateRowBoundaries()},calculateRowBoundaries(){var gt,yt,ot;let L=0,xe=0,Ve=((gt=i())==null?void 0:gt.rows)||[];xe=Ve.length;for(let Nt=0;Nt<Ve.length;Nt++)if(S()[Nt]>p()){L=Nt;break}for(let Nt=L;Nt<Ve.length;Nt++)if(S()[Nt]>=p()+t(lr)){xe=Nt+1;break}Qe(P,(yt=i())==null?void 0:yt.rows.slice(L,xe).map((Nt,wt)=>wt+L));const tt=L>0?S()[L-1]:0;if(Qe($n,p()-tt),t(hi)&&Ve.length>0){const wt=S()[Ve.length-1]-(p()+t(lr)),Ir=!((ot=i().info)!=null&&ot.total)||Ve.length<i().info.total;wt<t(lr)&&Ve.length===gi&&Ir&&p()>0&&Yt.fetchMoreRows(ie())}},handleVerticalScroll(L){this.lockColumnWidths(),Qe(Hn,Math.max(Math.min(p()+L,Math.max(0,t(en)-t(lr))),0)),Qe(Qa,t(en)>t(lr)?p()/(t(en)-t(lr)):0),window.requestAnimationFrame(()=>this.calculateRowBoundaries())},handleWheel(L){var xe,Ve;if(y()=="Inserting"){L.preventDefault(),L.stopPropagation();return}if(L.deltaY&&t(tn))L.preventDefault(),L.stopPropagation(),this.handleVerticalScroll(L.deltaY);else if(L.deltaX){if(this.lockColumnWidths(),T()+L.deltaX<0){Qe(xn,0),Qe(f,0);return}if(T()+L.deltaX>((xe=t(Kr))==null?void 0:xe.scrollWidth)-t(Kr).clientWidth){Qe(xn,((Ve=t(Kr))==null?void 0:Ve.scrollWidth)-t(Kr).clientWidth),Qe(f,1);return}Qe(xn,T()+L.deltaX),Qe(f,T()/t(Kr).scrollWidth)}},handleKeyboard(L){},handleTouch(L,xe){var Ve,tt;if(i().loading||y()==="Inserting"){L.preventDefault();return}if(xe==="start")yn=L.touches[0].clientY,_a=L.touches[0].clientX;else if(xe==="move"&&t(tn)){const gt=L.touches[0].clientY,yt=L.touches[0].clientX,ot=yn-gt,Nt=_a-yt;Math.abs(ot)>Math.abs(Nt)?(L.preventDefault(),this.handleVerticalScroll(ot*.5),yn=gt):Math.abs(Nt)>Math.abs(ot)&&(this.lockColumnWidths(),T()+Nt<0?(Qe(xn,0),Qe(f,0)):T()+Nt>((Ve=t(Kr))==null?void 0:Ve.scrollWidth)-t(Kr).clientWidth?(Qe(xn,((tt=t(Kr))==null?void 0:tt.scrollWidth)-t(Kr).clientWidth),Qe(f,1)):(Qe(xn,T()+Nt),Qe(f,T()/t(Kr).scrollWidth)),_a=yt)}},sortBy(L,xe){K(L),V(xe),Qe(cr,L),Qe(Jt,xe)},handleRowClick(L,xe,Ve,tt){Te()&&!Fe()&&ht.selectRow(L),Lr()&&ht.executeCellOnClickAction(L,xe,Ve,tt),ht.executeRowOnClickAction(L)},addRow(){var L;if(!_r()||((L=_r())==null?void 0:L.length)==0)return"Inserting";ht.insertRow()},edit(){return"Editing"}},Init:{_enter(){Ai&&clearInterval(Ai),Er&&clearTimeout(Er),Qe(Hn,0),Qe($n,0),Qe(xn,0),Qe(Et,[]),Qe(P,[]),gi!=ie()&&(gi=ie()),sn(o(ur,rn(n())),"$stbData",de),Er=setTimeout(()=>{o(ji,!0)},130)},synch(L){if(o($r,n().tableId),ht.loadPreSelections(Ae()),L.loaded)return N()&&!B()&&(Ai=setInterval(()=>{var xe,Ve,tt;(xe=i())!=null&&xe.loading||(Ve=t(ur))==null||Ve.refresh(),(tt=pa())==null||tt()},N()*1e3)),"Idle"}},Idle:{_enter(){var L;clearTimeout(Er),o(ji,!1),o(Jn,((L=i())==null?void 0:L.rows.length)<1),this.calculateRowBoundaries()},_exit(){},synch(L){var xe;L.loading&&!L.loaded||(o(Jn,!((xe=i())!=null&&xe.rows.length)),L.loaded&&this.calculateRowBoundaries())},addFilter(L){let xe=ee.buildQuery([{...L}]);return Un.add(L.id),ht.addQueryExtension(L.id,xe),"Filtered"},fetchMoreRows(L){gi=gi+L,t(ur).update({limit:gi})}},Filtered:{_enter(){},_exit(){},addFilter(L){let xe=ee.buildQuery([{...L}]);ht.removeQueryExtension(L.id),Un.add(L.id),ht.addQueryExtension(L.id,xe)},removeFilter(L){Un.delete(L),ht.removeQueryExtension(L)},clearFilter(L){return Un.delete(L),ht.removeQueryExtension(L),"Idle"},clear(){return Un.forEach(L=>{ht.removeQueryExtension(L)}),Un.clear(),t(Yr).forEach(({state:L})=>L.reset()),"Idle"},synch(L){L.loaded&&(o(Jn,L.rows.length<1),this.calculateRowBoundaries())}},Editing:{async patchRow(L,xe,Ve,tt,gt){let yt={_id:xe,_rev:Ve,[tt]:gt};return await ht.patchRow(L,yt),Yt.refresh(),"Idle"},endEdit(){return"Idle"}},Inserting:{_enter(){var L;o(Jn,!1),t(Yr).forEach(({state:xe})=>xe.addRow()),Qe(Vr,{}),(L=qe())==null||L.forEach(xe=>{xe.defaultValue&&Si(Vr,b(g)[xe.field]=z(xe.defaultValue,a()),b(g))}),Xa=p(),this.scrollToEnd()},_exit(){t(Yr).forEach(({state:L})=>L.cancelAddRow()),this.scrollTo(Xa)},cancelAddRow(){return"Idle"},endSave(){return this.refresh(),"Idle"},setValue(L,xe){Si(Vr,b(g)[L]=xe,b(g)),g().errors&&g().errors[L]&&(delete g().errors[L],Bn&&(clearTimeout(Bn),Bn=null)),Qe(Vr,{...g()})}}}),Sr=Ne(Dn,L=>{var xe;return{hasChildren:!1,maxWidth:ut()||"auto",minWidth:Tt()||"7rem",fixedWidth:rt()||"7rem",sizing:Lt(),canResize:Be(),canEdit:B()?!1:Fe(),showFooter:Ie(),showHeader:Pe(),cellPadding:Nn[Re()].cellPadding,headerHeight:Nn[Re()].headerHeight,rowHeight:Nn[Re()].rowHeight,highlighters:hr(),useOptionColors:((xe=L==null?void 0:L.appearance)==null?void 0:xe.useOptionColors)||!1,optionsViewMode:Wt(),relViewMode:Zt(),zebraColors:ar(),quiet:Gt()}}),vi=Ne(Dn,L=>{var xe,Ve;return{color:L.dividersColor??"var(--spectrum-global-color-gray-200)",horizontal:L.dividers=="both"||L.dividers=="horizontal"?"1px solid var(--super-table-devider-color)":"1px solid transparent",vertical:L.dividers=="both"||L.dividers=="vertical"?"1px solid var(--super-table-devider-color)":"none",headerHeight:((xe=L.appearance)==null?void 0:xe.headerHeight)||"0px",footerHeight:((Ve=L.appearance)==null?void 0:Ve.footerHeight)||"0px"}});Se.setContext("stbScrollPos",Hn),Se.setContext("stbScrollOffset",$n),Se.setContext("stbHorizontalScrollPos",xn),Se.setContext("stbHovered",Xt),Se.setContext("stbSelected",Et),Se.setContext("stbEditing",Qt),Se.setContext("stbState",Yt),Se.setContext("stbSettings",Dn),Se.setContext("stbSortColumn",cr),Se.setContext("stbSortOrder",Jt),Se.setContext("stbMenuID",be),Se.setContext("stbMenuAnchor",ze),Se.setContext("stbAPI",ht),Se.setContext("stbVisibleRows",P),Se.setContext("stbRowMetadata",_n);function zn(L){const xe=Number(L);return isNaN(xe)?null:xe}Se.onDestroy(()=>{Ai&&clearInterval(Ai)});let ei=h(0);x(()=>v(X()),()=>{di.set(X())}),x(()=>n(),()=>{ht.decidePagination(n())}),x(()=>v(M()),()=>{un.set(M())}),x(()=>i(),()=>{var L,xe;dn.set((xe=(L=i())==null?void 0:L.definition)==null?void 0:xe.schema)}),x(()=>v(te()),()=>{Fn.set(te()||[])}),x(()=>(v(Ht()),v(Q()),v(Re())),()=>{o(we,Ht()&&zn(z(Ht(),{[Q()]:{row:{}}}))||Nn[Re()].rowHeight)}),x(()=>v(mt()),()=>{bt.set(mt())}),x(()=>(s(),v(Je()),v(nt()),v(Ze()),v(Lt()),v(ut()),v(Tt()),v(rt()),v(at()),v(je()),v(st()),v(ft()),v(Ie()),v(Pe()),v(_e()),v(Te()),v(mt()),v(Le()),v(Fe()),v(Oe()),t($r),v(oe()),v(Be()),v(X()),t(Wr),v(M()),v(K()),v(V()),v(ie()),v(Dr()),v(A()),v(N()),t(hi),v(Re()),t(we),v(et()),v(Gt()),v(nr()),v(Wt()),v(Zt()),v(ar()),v(hr()),v(_t()),v(Bt()),v(Rt()),v(kt()),v(tr()),v(It()),v(Nr()),v(gr()),v(wr()),v(Fr()),v(Zn())),()=>{var L;Dn.set({inBuilder:(L=s())==null?void 0:L.inBuilder,showAutoColumns:Je(),showSpecialColumns:nt(),superColumnsPos:Ze(),columnSizing:Lt()||"flexible",columnMaxWidth:ut()||"auto",columnMinWidth:Tt()||"7rem",columnFixedWidth:rt()||"7rem",debounce:at(),hideSelectionColumn:je(),dividers:st(),dividersColor:ft(),showFooter:Ie(),showHeader:Pe(),rowMenuIcon:_e(),features:{canSelect:Te(),maxSelected:mt(),canFilter:Le(),canEdit:Fe(),canDelete:Oe()&&t($r),canInsert:oe(),canResize:Be()},data:{dataSource:X(),idColumn:t(Wr),filter:M(),sortColumn:K(),sortOrder:V(),limit:ie(),emptyMessage:Dr()?"No "+Dr()+" found":"No Rows Found",paginate:A(),autoRefreshRate:N(),fetchOnScroll:t(hi)},appearance:{size:Re(),headerHeight:Pe()?Nn[Re()].headerHeight:0,footerHeight:Ie()?Nn[Re()].headerHeight:0,rowHeight:t(we),numberingColumn:et(),hideSelectionColumn:je(),quiet:Gt(),useOptionColors:nr(),optionsViewMode:Wt(),relViewMode:Zt(),zebraColors:ar(),dynamicColors:!0,highlighters:hr(),rowColorTemplate:_t(),rowBGColorTemplate:Bt(),rowDisabledTemplate:Rt(),footerColorTemplate:kt(),footerBGColorTemplate:tr(),cellPadding:Nn[Re()].cellPadding,beautifyLabels:It()},events:{onRowClick:Nr(),onCellChange:gr(),onRowSelect:wr(),onDelete:Fr(),afterDelete:Zn()}})}),x(()=>n(),()=>{Yt.init(n())}),x(()=>i(),()=>{Yt.synch(i())}),x(()=>(i(),v(Bt()),v(_t()),v(Ht()),v(Rt()),u()),()=>{Yt.enrichRows(i(),Bt(),_t(),Ht(),Rt(),u())}),x(()=>t(ur),()=>{sn(o(pe,Ne([t(ur),Et,bt],([L,xe,Ve])=>{var gt;L!=null&&L.rows&&(xe=xe.filter(yt=>L.rows.some((ot,Nt)=>ht.getRowId(ot,Nt)===yt)));const tt=(gt=L==null?void 0:L.rows)==null?void 0:gt.filter((yt,ot)=>xe==null?void 0:xe.includes(ht.getRowId(yt,ot)));return Ve===1?tt.length>0?tt[0]:[]:tt})),"$stbSelectedRows",de)}),x(()=>C(),()=>{o(De,ee.buildQuery(C()))}),x(()=>(t(De),t(kn)),()=>{o(ke,ht.extendQuery(t(De),t(kn)))}),x(()=>t(ke),()=>{Yt.scrollToTop(t(ke))}),x(()=>(t(ur),t(ke),v(K()),v(V())),()=>{var L;(L=t(ur))==null||L.update({query:t(ke),sortColumn:K(),sortOrder:V()})}),x(()=>{},()=>{sn(o(ye,Ne([dn,Fn,Dn],([L,xe,Ve])=>ht.populateColumns(L,xe,Ve.showAutoColumns,Ve.showSpecialColumns))),"$superColumns",de)}),x(()=>{},()=>{sn(o(ce,Ne(_n,L=>L==null?void 0:L.map((xe,Ve)=>L.slice(0,Ve+1).reduce((tt,gt)=>tt+Math.max(gt.height,0),0)))),"$cumulativeHeights",de)}),x(()=>(t(ma),v(oe()),I(),t(hi),k(),S()),()=>{Yt.calculateBoundaries(t(ma),oe(),I(),t(hi),I(),k(),S())}),x(()=>t(ur),()=>{var L;o(Z,[{type:q.ClearRowSelection,callback:ht.clearSelection},{type:q.RefreshDatasource,callback:(L=t(ur))==null?void 0:L.refresh},{type:q.AddDataProviderQueryExtension,callback:ht.addQueryExtension},{type:q.RemoveDataProviderQueryExtension,callback:ht.removeQueryExtension}])}),x(()=>(v(B()),i(),g(),D(),t(Wr),E(),n(),U()),()=>{var L,xe,Ve,tt,gt,yt;o(Y,{row:B()?(L=i())==null?void 0:L.rows[0]:{},newRow:g(),rows:(xe=i())==null?void 0:xe.rows,selectedRows:D(),selectedIds:Array.isArray(D())?D().map(ot=>ot[t(Wr)]):D()&&typeof D()=="object"?[D()[t(Wr)]]:[],id:E().id,info:(Ve=i())==null?void 0:Ve.info,datasource:n()||{},schema:U(),state:{query:i().query},loaded:(tt=i())==null?void 0:tt.loaded,rowsLength:(gt=i())==null?void 0:gt.rows.length,pageNumber:((yt=i())==null?void 0:yt.pageNumber)+1})}),x(()=>(v(ct()),v(it())),()=>{var L;o(re,ct()=="columnRight"&&((L=it())==null?void 0:L.length))}),x(()=>(v(ct()),v(it())),()=>{var L;o(G,ct()=="columnLeft"&&((L=it())==null?void 0:L.length))}),x(()=>t(ur),()=>{Se.setContext("stbData",t(ur))}),x(()=>Se.setContext,()=>{Se.setContext("stbSchema",dn)}),x(()=>Se.setContext,()=>{Se.setContext("new_row",Vr)}),x(()=>(t(Vn),t(ei),$(),t(Yr)),()=>{var L;(t(Vn)>0&&t(Vn)!==t(ei)||$())&&(o(ei,t(Vn)),(L=t(Yr))==null||L.forEach(({state:xe})=>xe.unlockWidth()))}),Mt(),Dt();var Is=Q0(),Or=j(Is);let ya,zh;var jh=j(Or);ne(jh,{get actions(){return t(Z)},get data(){return t(Y)}});var Gh=Ee(jh,2);vh(Gh,{children:(L,xe)=>{var Ve=X0(),tt=Ge(Ve);B0(tt,{get stbData(){return t(ur)},get hideSelectionColumn(){return je()}});var gt=Ee(tt,2);{var yt=wt=>{hh(wt,{get rowMenuItems(){return it()},get menuItemsVisible(){return We()},get rowMenu(){return ct()}})};le(gt,wt=>{t(G)&&wt(yt)})}var ot=Ee(gt,2);{var Nt=wt=>{{let Ir=Pt(()=>(H(),J(),t(ba),t(re),t(tn),b(()=>{var Gi;return{...H()[0],...J(),overflow:t(ba),isFirst:!0,isLast:((Gi=H())==null?void 0:Gi.length)==1&&!t(re)&&t(tn)}})));uu(wt,{get stbData(){return t(ur)},sticky:!0,get scrollPos(){return T()},get columnOptions(){return t(Ir)}})}};le(ot,wt=>{v(lt()),H(),b(()=>lt()&&H().length>1)&&wt(Nt)})}w(L,Ve)},$$slots:{default:!0}});var qh=Ee(Gh,2);W0(qh,{get stbData(){return t(ur)},get stbSettings(){return Dn},get superColumns(){return t(ye)},get commonColumnOptions(){return Sr},get canScroll(){return t(tn)},get columnsViewport(){return t(Kr)},set columnsViewport(L){o(Kr,L)},children:(L,xe)=>{var Ve=$e(),tt=Ge(Ve);ea(tt,Lt,gt=>{var yt=$e(),ot=Ge(yt);vr(ot,r,"default",{},null),w(gt,yt)}),w(L,Ve)},$$slots:{default:!0},$$legacy:!0});var Wh=Ee(qh,2);{var oA=L=>{vh(L,{children:(xe,Ve)=>{hh(xe,{get rowMenuItems(){return it()},get menuItemsVisible(){return We()},get rowMenu(){return ct()},get canScroll(){return t(tn)},right:!0})},$$slots:{default:!0}})};le(Wh,L=>{t(re)&&!t(Jn)&&L(oA)})}var Yh=Ee(Wh,2);L_(Yh,{get anchor(){return t(Kr)},get clientHeight(){return t(lr)},get scrollHeight(){return t(en)},get highlighted(){return t(Ti)},get isEmpty(){return t(Jn)},get horizontalVisible(){return t(cn)},set horizontalVisible(L){o(cn,L)},$$events:{positionChange(...L){var xe;(xe=Yt.calculateRowBoundaries)==null||xe.apply(this,L)}},$$legacy:!0});var Kh=Ee(Yh,2);{let L=Pt(()=>(H(),c(),b(()=>{var Ve;return(Ve=H())!=null&&Ve.length?c().appearance.headerHeight+16:16}))),xe=Pt(()=>t(cn)?24:16);V_(Kh,{get isEmpty(){return t(Jn)},get message(){return c(),b(()=>c().data.emptyMessage)},get top(){return t(L)},get bottom(){return t(xe)}})}var Xh=Ee(Kh,2);{let L=Pt(()=>(i(),l(),b(()=>{var xe,Ve;return(Ve=(xe=i())==null?void 0:xe.rows)==null?void 0:Ve[l()]})));z0(Xh,{get rowContextMenuItems(){return Ke()},get row(){return t(L)}})}var Qh=Ee(Xh,2);{var lA=L=>{G_(L,{get stbState(){return Yt},get tableAPI(){return ht},get highlighted(){return t(Ti)},get tableActions(){return ve()},get footer(){return c(),b(()=>c().showFooter)}})};le(Qh,L=>{c(),y(),b(()=>c().features.canInsert||y()=="Filtered")&&L(lA)})}var Zh=Ee(Qh,2);{var uA=L=>{Y_(L,{get stbSettings(){return Dn},get selectedActions(){return Ot()},get stbSelected(){return Et},get tableAPI(){return ht},get stbState(){return Yt},get highlighted(){return t(Ti)},get entitySingular(){return qr()},get entityPlural(){return Dr()}})};le(Zh,L=>{c(),v(Ot()),b(()=>{var xe;return c().features.canSelect&&((xe=Ot())==null?void 0:xe.length)})&&L(uA)})}var cA=Ee(Zh,2);{var dA=L=>{X_(L)};le(cA,L=>{i(),b(()=>i().loading&&i().loaded)&&L(dA)})}vt(Or,L=>o(bn,L),()=>t(bn));var fA=Ee(Or,2);K0(fA,{get pagination(){return t(fi)},get limit(){return ie()},get dataSource(){return di},get fetch(){return t(ur)}}),Ce(()=>{ya=Me(Or,1,"super-table",null,ya,{quiet:Gt(),initializing:t(ji)}),zh=Ye(Or,"",zh,{"font-size":(v(Nn),v(Re()),b(()=>Nn[Re()].rowFontSize)),"--super-table-devider-color":(R(),b(()=>R().color)),"--super-table-body-height":t(lr),"--super-table-header-height":(R(),b(()=>R().headerHeight)),"--super-table-footer-height":(R(),b(()=>R().footerHeight)),"--super-table-horizontal-dividers":(R(),b(()=>R().horizontal)),"--super-table-vertical-dividers":(R(),b(()=>R().vertical)),"--super-table-cell-padding":(v(Nn),v(Re()),b(()=>Nn[Re()].cellPadding)),"--super-column-top-offset":_()*-1})}),bl(Or,"clientWidth",L=>o(Vn,L)),bl(Or,"clientHeight",L=>o(ma,L)),W("mouseenter",Or,()=>o(Ti,!0)),W("mouseleave",Or,()=>{o(Ti,!1),Qe(Xt,null)}),W("keydown",Or,function(...L){var xe;(xe=Yt.handleKeyboard)==null||xe.apply(this,L)}),W("wheel",Or,function(...L){var xe;(xe=Yt.handleWheel)==null||xe.apply(this,L)}),W("touchstart",Or,L=>Yt.handleTouch(L,"start")),W("touchmove",Or,L=>Yt.handleTouch(L,"move")),W("touchend",Or,L=>Yt.handleTouch(L,"end")),w(e,Is),Ct(),fe()}var J0=F("<i></i>"),$0=F('<div class="tab list-title svelte-1fuoz6m"><!> </div>'),e1=F("<i></i>"),t1=F('<span class="tab-text svelte-1fuoz6m"> </span>'),r1=F("<button><!> <!></button>"),n1=F("<div><div><!> <!></div></div>");function i1(e,r){St(r,!1);const n=h(),i=h(),s=h(),a=Se.createEventDispatcher();let l=m(r,"containers",8),d=m(r,"direction",8),u=m(r,"selectedTab",8),g=m(r,"hAlign",8),c=m(r,"vAlign",8),p=m(r,"theme",8,"buttons"),_=m(r,"tabsPosition",8,"top"),S=m(r,"tabsAlignment",8),y=m(r,"buttonsAlignment",8,"flex-start"),T=m(r,"tabsIconsOnly",8),I=m(r,"list_icon",8),k=m(r,"list_title",8),C=m(r,"wide",8,!0),D=m(r,"quietTabs",8);x(()=>(v(_()),v(p())),()=>{o(n,_()=="left"||p()==="list")}),x(()=>(v(d()),v(g()),v(c())),()=>{o(i,d()==="row"?g():c())}),x(()=>v(p()),()=>{o(s,p()==="buttons"||p()==="wideButtons")}),Mt(),Dt();var E=$e(),U=Ge(E);{var $=R=>{var H=n1();let J,de;var fe=j(H);let we,pe;var De=j(fe);{var ke=ce=>{var Z=$0(),Y=j(Z);{var re=ae=>{var z=J0();Ce(()=>Me(z,1,Sn(I()),"svelte-1fuoz6m")),w(ae,z)};le(Y,ae=>{I()&&ae(re)})}var G=Ee(Y);Ce(()=>Xe(G,` ${k()??""}`)),w(ce,Z)};le(De,ce=>{p()==="list"&&k()&&ce(ke)})}var ye=Ee(De,2);At(ye,1,l,Ft,(ce,Z,Y)=>{var re=r1();let G,ae;var z=j(re);{var ge=ne=>{var se=e1();let ee;Ce(()=>{Me(se,1,Sn((t(Z),b(()=>t(Z).icon))),"svelte-1fuoz6m"),ee=Ye(se,"",ee,{"font-size":T()?"20px":null,color:(t(Z),b(()=>t(Z).color))})}),w(ne,se)};le(z,ne=>{t(Z),b(()=>t(Z).icon)&&ne(ge)})}var O=Ee(z,2);{var q=ne=>{var se=t1(),ee=j(se);Ce(()=>Xe(ee,(t(Z),b(()=>t(Z).title||"Tab "+Y)))),w(ne,se)};le(O,ne=>{v(T()),t(Z),b(()=>!T()||!t(Z).icon)&&ne(q)})}Ce(()=>{G=Me(re,1,"tab svelte-1fuoz6m",null,G,{vertical:t(n),button:t(s),list:p()==="list",selected:t(Z).id===u(),disabled:t(Z).disabled,"list-section":t(Z).isTabSection}),ae=Ye(re,"",ae,{flex:y()=="stretch"?"1":null})}),W("click",re,()=>{!t(Z).disabled&&!t(Z).isTabSection&&a("change",t(Z))}),w(ce,re)}),Ce(()=>{J=Me(H,1,"outer-tabs svelte-1fuoz6m",null,J,{quietTabs:D(),list:p()==="list",vertical:t(n),wide:p()==="wideButtons"&&C()}),de=Ye(H,"",de,{"justify-content":t(i)}),we=Me(fe,1,"tabs svelte-1fuoz6m",null,we,{vertical:t(n),buttons:t(s),list:p()==="list",wide:p()==="wideButtons"&&C()}),pe=Ye(fe,"",pe,{"justify-content":y(),"--tab-alignment":S(),"--tab-track-thickness":"1px"})}),w(R,H)};le(U,R=>{v(l()),b(()=>{var H;return(H=l())==null?void 0:H.length})&&R($)})}w(e,E),Ct()}var a1=F('<img class="modal-image svelte-1o3clre"/>'),s1=F('<div class="modal-fallback svelte-1o3clre"><div class="pill svelte-1o3clre"> </div> <span class="filename svelte-1o3clre"> </span></div>'),o1=F('<button type="button"></button>'),l1=F('<div class="modal-indicators svelte-1o3clre"></div>'),u1=F('<button type="button"><i></i></button>'),c1=F('<button class="btn-nav large btn-modal-delete svelte-1o3clre" aria-label="Delete" type="button"><i class="ph ph-trash-simple"></i></button>'),d1=F('<div class="image-modal svelte-1o3clre" role="dialog" aria-modal="true" aria-labelledby="modal-title" tabindex="-1"><div class="image-modal-content svelte-1o3clre" tabindex="0"><div><button class="modal-close svelte-1o3clre" aria-label="Close modal" type="button">×</button> <!> <div class="modal-controls svelte-1o3clre"><div class="modal-navigation svelte-1o3clre"><button class="btn-nav large svelte-1o3clre" aria-label="Previous image" type="button"><i class="ph ph-caret-left"></i></button> <!> <button class="btn-nav large svelte-1o3clre" aria-label="Next image" type="button"><i class="ph ph-caret-right"></i></button></div> <div class="modal-actions svelte-1o3clre"><!> <!></div></div></div></div></div>');function cu(e,r){St(r,!1);const n=h(),i=h(),s=h();let a=m(r,"items",24,()=>[]),l=m(r,"currentIndex",12,0),d=m(r,"open",12,!1),u=m(r,"selectedIndices",28,()=>new Set),g=m(r,"canSelect",8,!0),c=m(r,"canDelete",8,!1);const p=Se.createEventDispatcher(),_={navigateNext(){var C;((C=a())==null?void 0:C.length)>1&&l((l()+1)%a().length)},navigatePrev(){var C;((C=a())==null?void 0:C.length)>1&&l((l()-1+a().length)%a().length)},navigateTo(C){var D;C>=0&&C<((D=a())==null?void 0:D.length)&&l(C)},toggleSelection(C){const D=new Set(u());D.has(C)?D.delete(C):D.add(C),u(D)},closeModal(){d(!1),p("close")},handleKeydown(C){var D,E;switch(C.key){case"Escape":_.closeModal();break;case"ArrowLeft":C.preventDefault(),_.navigatePrev();break;case"ArrowRight":case" ":C.preventDefault(),_.navigateNext();break;case"Home":C.preventDefault(),_.navigateTo(0);break;case"End":C.preventDefault(),_.navigateTo(((D=a())==null?void 0:D.length)-1||0);break;case"PageUp":C.preventDefault(),_.navigatePrev();break;case"PageDown":C.preventDefault(),_.navigateNext();break;default:if(C.key>="1"&&C.key<="9"){const U=parseInt(C.key)-1;U<(((E=a())==null?void 0:E.length)||0)&&(C.preventDefault(),_.navigateTo(U))}break}},isImage(C){var E;return["jpg","jpeg","png","gif","bmp","webp"].includes((E=C==null?void 0:C.extension)==null?void 0:E.toLowerCase())}},S=C=>{C.focus()};x(()=>(v(a()),v(l())),()=>{var C;o(n,((C=a())==null?void 0:C.length)>1&&l()>0)}),x(()=>(v(a()),v(l())),()=>{var C,D;o(i,((C=a())==null?void 0:C.length)>1&&l()<(((D=a())==null?void 0:D.length)-1||0))}),x(()=>(v(a()),v(l())),()=>{var C;o(s,(C=a())==null?void 0:C[l()])}),Mt();var y={lightboxAPI:_};Dt();var T=$e(),I=Ge(T);{var k=C=>{var D=d1(),E=j(D),U=j(E);let $;var R=j(U),H=Ee(R,2);{var J=ae=>{var z=a1();Ce(()=>{Vt(z,"src",(t(s),b(()=>t(s).url))),Vt(z,"alt",(t(s),b(()=>t(s).name)))}),w(ae,z)},de=ae=>{var z=s1(),ge=j(z),O=j(ge),q=Ee(ge,2),ne=j(q);Ce(se=>{Xe(O,se),Xe(ne,(t(s),b(()=>{var ee;return(ee=t(s))==null?void 0:ee.name})))},[()=>(t(s),b(()=>{var se,ee;return(ee=(se=t(s))==null?void 0:se.extension)==null?void 0:ee.toUpperCase()}))]),w(ae,z)};le(H,ae=>{t(s),b(()=>_.isImage(t(s)))?ae(J):ae(de,!1)})}var fe=Ee(H,2),we=j(fe),pe=j(we),De=Ee(pe,2);{var ke=ae=>{var z=l1();At(z,5,a,Ft,(ge,O,q)=>{var ne=o1();let se;Vt(ne,"aria-label",`Go to image ${q+1}`),Ce(()=>se=Me(ne,1,"indicator large svelte-1o3clre",null,se,{active:q===l()})),W("click",ne,()=>_.navigateTo(q)),w(ge,ne)}),w(ae,z)};le(De,ae=>{v(a()),b(()=>{var z;return((z=a())==null?void 0:z.length)>1})&&ae(ke)})}var ye=Ee(De,2),ce=Ee(we,2),Z=j(ce);{var Y=ae=>{var z=u1();let ge;var O=j(z);Ce((q,ne,se)=>{ge=Me(z,1,"btn-nav large btn-modal-select svelte-1o3clre",null,ge,q),Vt(z,"aria-label",ne),Me(O,1,`ph ${se??""}`)},[()=>({selected:u().has(l())}),()=>(v(u()),v(l()),b(()=>u().has(l())?"Deselect":"Select")),()=>(v(u()),v(l()),b(()=>u().has(l())?"ph-check-square":"ph-square"))]),W("click",z,()=>_.toggleSelection(l())),w(ae,z)};le(Z,ae=>{g()&&ae(Y)})}var re=Ee(Z,2);{var G=ae=>{var z=c1();W("click",z,()=>p("delete",{index:l(),item:a()[l()]})),w(ae,z)};le(re,ae=>{c()&&ae(G)})}Ut(()=>W("click",E,dr(function(ae){Yn.call(this,r,ae)}))),Ut(()=>W("keydown",E,function(...ae){var z;(z=_.handleKeydown)==null||z.apply(this,ae)})),Pr(E,ae=>S==null?void 0:S(ae)),Ce(ae=>{$=Me(U,1,"modal-image-container svelte-1o3clre",null,$,ae),Vt(U,"aria-label",`Image ${l()+1} of ${v(a()),b(()=>{var z;return((z=a())==null?void 0:z.length)||1})??""}. Use arrow keys to navigate, Home/End for first/last, numbers 1-9 to jump to images, Space for next, Escape to close.`),pe.disabled=!t(n),ye.disabled=!t(i)},[()=>({selected:u().has(l())})]),W("click",R,function(...ae){var z;(z=_.closeModal)==null||z.apply(this,ae)}),W("click",pe,function(...ae){var z;(z=_.navigatePrev)==null||z.apply(this,ae)}),W("click",ye,function(...ae){var z;(z=_.navigateNext)==null||z.apply(this,ae)}),W("click",D,function(...ae){var z;(z=_.closeModal)==null||z.apply(this,ae)}),w(C,D)};le(I,C=>{d()&&C(k)})}return w(e,T),pr(r,"lightboxAPI",_),Ct(y)}var f1=F('<i class="ri-check-line svelte-ncsr1h"></i>'),h1=F('<div class="color-swatch svelte-ncsr1h" role="button" tabindex="0"><div><!></div></div>'),g1=F('<div class="category"><div class="heading svelte-ncsr1h"> </div> <div class="colors svelte-ncsr1h"></div></div>'),v1=F('<i class="ri-check-line svelte-ncsr1h"></i>'),p1=F('<div class="color-swatch svelte-ncsr1h" role="button" tabindex="0"><div><!></div></div>'),m1=F('<div class="category"><div class="heading svelte-ncsr1h"><i class="ri-palette-line heading-icon svelte-ncsr1h"></i> </div> <div class="colors svelte-ncsr1h"></div></div>'),_1=F('<div class="category category--custom svelte-ncsr1h"><div class="heading svelte-ncsr1h">Custom</div> <div class="custom svelte-ncsr1h"><input type="text" class="custom-input svelte-ncsr1h" placeholder="Enter custom color"/> <button class="clear-value svelte-ncsr1h"><i class="ri-close-line"></i></button></div></div>'),b1=F('<div class="container svelte-ncsr1h"><!> <!> <!></div>'),y1=F('<div role="button" tabindex="0"><div></div></div> <!>',1);function w1(e,r){St(r,!1);const n=h(),i=h(),s=h(),a=h(),l=h(),d=h(),u=h(),g=h(),c=h(),p=h();let _=m(r,"value",12),S=m(r,"size",8,"M"),y=m(r,"spectrumTheme",8),T=m(r,"offset",8),I=m(r,"cellOptions",24,()=>({})),k=h(!1),C=h(),D=h(!1);const E=Se.createEventDispatcher();function U(Y,re){return[...Y?[{label:"Theme colors",colors:["red-100","orange-100","yellow-100","green-100","seafoam-100","blue-100","indigo-100","magenta-100","red-400","orange-400","yellow-400","green-400","seafoam-400","blue-400","indigo-400","magenta-400","red-500","orange-500","yellow-500","green-500","seafoam-500","blue-500","indigo-500","magenta-500","red-600","orange-600","yellow-600","green-600","seafoam-600","blue-600","indigo-600","magenta-600","red-700","orange-700","yellow-700","green-700","seafoam-700","blue-700","indigo-700","magenta-700","gray-50","gray-75","gray-100","gray-200","gray-300","gray-400","gray-500","gray-600","gray-700","gray-800","gray-900"]}]:[],...re?[{label:"Static colors",colors:["static-red-400","static-orange-400","static-yellow-400","static-green-400","static-seafoam-400","static-blue-400","static-indigo-400","static-magenta-400","static-red-800","static-orange-800","static-yellow-800","static-green-800","static-seafoam-800","static-blue-800","static-indigo-800","static-magenta-800","static-red-1200","static-orange-1200","static-yellow-1200","static-green-1200","static-seafoam-1200","static-blue-1200","static-indigo-1200","static-magenta-1200","static-white","static-black"]}]:[]]}function $(Y){return{label:"Palette",colors:Y.map(re=>re.value),customLabels:Y.reduce((re,G)=>(re[G.value]=G.label,re),{})}}const R=Y=>{const re=Y===_()?null:Y;_(re),E("change",re),o(k,!1),o(D,!1)},H=Y=>{var G;return Y&&(((G=t(c))==null?void 0:G.some(ae=>ae.colors.some(z=>`var(--spectrum-global-color-${z})`===Y)))?null:Y)},J=(Y,re)=>re.customLabels&&re.customLabels[Y]?re.customLabels[Y]:Y.split("-").join(" "),de=Y=>Y?Y.includes("-gray-")?/^.*(gray-(50|75|100|200|300|400|500))\)$/.test(Y)?"var(--spectrum-global-color-gray-900)":"var(--spectrum-global-color-gray-50)":Y.includes("-100")?"var(--spectrum-global-color-gray-900)":Y.includes("static-black")?"var(--spectrum-global-color-static-gray-50)":"var(--spectrum-global-color-static-gray-900)":"var(--spectrum-global-color-static-gray-900)",fe=(Y,re,G)=>{(Y.key==="Enter"||Y.key===" ")&&(Y.preventDefault(),R(G?re:`var(--spectrum-global-color-${re})`))};x(()=>v(_()),()=>{o(n,H(_()))}),x(()=>v(_()),()=>{o(i,de(_()))}),x(()=>v(I()),()=>{var Y;o(s,((Y=I())==null?void 0:Y.allowCustom)!==!1)}),x(()=>v(I()),()=>{var Y;o(a,((Y=I())==null?void 0:Y.swatch)==="circle")}),x(()=>v(I()),()=>{var Y,re;o(l,((Y=I())==null?void 0:Y.readonly)||((re=I())==null?void 0:re.disabled))}),x(()=>v(I()),()=>{var Y;o(d,((Y=I())==null?void 0:Y.customColors)||[])}),x(()=>v(I()),()=>{var Y;o(u,((Y=I())==null?void 0:Y.themeColors)!==!1)}),x(()=>v(I()),()=>{var Y;o(g,((Y=I())==null?void 0:Y.staticColors)!==!1)}),x(()=>(t(u),t(g)),()=>{o(c,U(t(u),t(g)))}),x(()=>t(d),()=>{o(p,$(t(d)))}),Mt(),Dt();var we=y1(),pe=Ge(we);let De;var ke=j(pe);let ye;vt(pe,Y=>o(C,Y),()=>t(C));var ce=Ee(pe,2);{var Z=Y=>{Qr(Y,{get anchor(){return t(C)},get open(){return t(k)},align:"left",get offset(){return T()},children:(re,G)=>{var ae=b1(),z=j(ae);At(z,1,()=>t(c),Ft,(se,ee)=>{var me=g1(),Ne=j(me),Ue=j(Ne),he=Ee(Ne,2);At(he,5,()=>(t(ee),b(()=>t(ee).colors)),Ft,(ue,Q)=>{var B=h1(),X=j(B),K=j(X);{var V=ie=>{var N=f1();Ce(()=>Ye(N,`color: ${t(i)??""};`)),w(ie,N)};le(K,ie=>{_()===`var(--spectrum-global-color-${t(Q)})`&&ie(V)})}Ce(ie=>{Vt(B,"title",ie),Me(X,1,`color-fill ${(y()||"")??""}`,"svelte-ncsr1h"),Ye(X,`background: var(--spectrum-global-color-${t(Q)??""});`)},[()=>(t(Q),t(ee),b(()=>J(t(Q),t(ee))))]),W("click",B,()=>R(`var(--spectrum-global-color-${t(Q)})`)),W("keydown",B,ie=>fe(ie,t(Q),!1)),w(ue,B)}),Ce(()=>Xe(Ue,(t(ee),b(()=>t(ee).label)))),w(se,me)});var ge=Ee(z,2);{var O=se=>{var ee=m1(),me=j(ee),Ne=Ee(j(me)),Ue=Ee(me,2);At(Ue,5,()=>(t(p),b(()=>t(p).colors)),Ft,(he,ue)=>{var Q=p1(),B=j(Q),X=j(B);{var K=V=>{var ie=v1();Ce(()=>Ye(ie,`color: ${t(i)??""};`)),w(V,ie)};le(X,V=>{_()===t(ue)&&V(K)})}Ce(V=>{Vt(Q,"title",V),Me(B,1,`color-fill ${(y()||"")??""}`,"svelte-ncsr1h"),Ye(B,`background: ${t(ue)??""};`)},[()=>(t(ue),t(p),b(()=>J(t(ue),t(p))))]),W("click",Q,()=>R(t(ue))),W("keydown",Q,V=>fe(V,t(ue),!0)),w(he,Q)}),Ce(()=>Xe(Ne,` ${t(p),b(()=>t(p).label)??""}`)),w(se,ee)};le(ge,se=>{t(p),b(()=>t(p).colors.length>0)&&se(O)})}var q=Ee(ge,2);{var ne=se=>{var ee=_1(),me=Ee(j(ee),2),Ne=j(me),Ue=Ee(Ne,2);ta(Ne,()=>t(n),he=>o(n,he)),W("change",Ne,()=>{t(n)&&R(t(n))}),W("click",Ue,()=>R(null)),w(se,ee)};le(q,se=>{t(s)&&se(ne)})}w(re,ae)},$$slots:{default:!0}})};le(ce,Y=>{t(D)&&Y(Z)})}Ce(()=>{De=Me(pe,1,`preview-swatch size--${(S()||"M")??""}`,"svelte-ncsr1h",De,{circle:t(a),readonly:t(l)}),ye=Me(ke,1,`preview-fill ${(y()||"")??""}`,"svelte-ncsr1h",ye,{circle:t(a),placeholder:!_()}),Ye(ke,_()?`background: ${_()};`:"")}),W("click",pe,function(...Y){var re;(re=t(l)?null:()=>{o(D,!0),o(k,!t(k))})==null||re.apply(this,Y)}),W("keydown",pe,Y=>{(Y.key==="Enter"||Y.key===" "&&!t(l))&&(o(D,!0),o(k,!t(k)))}),w(e,we),Ct()}var E1=F("<i></i>"),S1=F('<button class="clear-button ri-close-line svelte-ht1x6b" style="font-size: 14px; color: var(--spectrum-global-color-gray-500);" aria-label="Clear date range"></button>'),C1=F('<div><span> </span> <i class="ri-calendar-line" style="font-size: 16px; justify-self: flex-end"></i> <!></div>'),A1=F("<div><span><!></span></div>"),T1=F('<div class="time-section svelte-ht1x6b"><input type="time" class="time-input svelte-ht1x6b" step="900"/></div>'),k1=F('<div class="time-section svelte-ht1x6b"><input type="time" class="time-input svelte-ht1x6b" step="900"/></div>'),D1=F('<div class="range-error svelte-ht1x6b"><i class="ri-error-warning-line" style="color: var(--spectrum-global-color-red-500);"></i> <span style="color: var(--spectrum-global-color-red-500); font-size: 12px;">End date cannot be before start date</span></div>'),x1=F('<div class="range-picker-container svelte-ht1x6b"><div class="datepickers-container svelte-ht1x6b"><div class="range-section svelte-ht1x6b"><label class="range-label svelte-ht1x6b">From:</label> <div><!></div> <!></div> <div class="range-section svelte-ht1x6b"><label class="range-label svelte-ht1x6b">To:</label> <div><!></div> <!></div></div> <!></div>'),O1=F("<div><!> <!></div> <!>",1);function I1(e,r){St(r,!1);const n=()=>He(de(),"$cellState",i),[i,s]=qt(),a=h(),l=h(),d=h(),u=h(),g=h(),c=h(),p=h(),_=h(),S=h(),y=h(),T=h(),I=h(),k=h(),C=h(),D=new Se.createEventDispatcher,{processStringSync:E}=Se.getContext("sdk");let U=m(r,"value",12),$=m(r,"formattedValue",12),R=m(r,"cellOptions",8),H=m(r,"autofocus",8),J=h(),de=m(r,"cellState",24,()=>or("View",{"*":{goTo(B){return B}},View:{focus(){if(!R().readonly)return"Editing"}},Editing:{_enter(){o(J,U()?{...U()}:null),o(pe,!0),D("enteredit")},_exit(){D("exitedit")},handleKeyboard(B){B.keyCode==32&&(B.stopPropagation(),B.preventDefault(),o(pe,!t(pe)))},focusout(B){var ie,N,A,M,te;const X=(ie=t(we))==null?void 0:ie.contains(B.relatedTarget),K=(N=t(ye))!=null&&N.contains?(A=t(ye))==null?void 0:A.contains(B.relatedTarget):!1,V=(M=t(ce))!=null&&M.contains?(te=t(ce))==null?void 0:te.contains(B.relatedTarget):!1;if(!X&&!K&&!V)return o(pe,!1),JSON.stringify(U())!=JSON.stringify(t(J))&&D("change",U()),"View"},cancel(){return U(t(J)?{...t(J)}:null),"View"}}})),fe=h(),we=h(),pe=h(!1),De=h(),ke=h(),ye=h(),ce=h();function Z(B,X,K,V,ie,N){const A=Y(B,B,K).from+" "+V,M=Y(X,X,K).to+" "+ie;return{from:A,to:M}}function Y(B,X,K){if(console.log("🔍 formatDateRange called with:",{fromDate:B,toDate:X,dateFormat:K}),!K||K==="default")return console.log("➡️ Using default format"),{from:B.toDateString(),to:X.toDateString()};if(K==="MM/DD/YYYY"){const N=`${(B.getMonth()+1).toString().padStart(2,"0")}/${B.getDate().toString().padStart(2,"0")}/${B.getFullYear()}`,A=`${(X.getMonth()+1).toString().padStart(2,"0")}/${X.getDate().toString().padStart(2,"0")}/${X.getFullYear()}`;return console.log("✅ MM/DD/YYYY formatted:",{from:N,to:A}),{from:N,to:A}}if(K==="DD/MM/YYYY"){const N=`${B.getDate().toString().padStart(2,"0")}/${(B.getMonth()+1).toString().padStart(2,"0")}/${B.getFullYear()}`,A=`${X.getDate().toString().padStart(2,"0")}/${(X.getMonth()+1).toString().padStart(2,"0")}/${X.getFullYear()}`;return console.log("✅ DD/MM/YYYY formatted:",{from:N,to:A}),{from:N,to:A}}if(K==="YYYY-MM-DD"){const N=`${B.getFullYear()}-${(B.getMonth()+1).toString().padStart(2,"0")}-${B.getDate().toString().padStart(2,"0")}`,A=`${X.getFullYear()}-${(X.getMonth()+1).toString().padStart(2,"0")}-${X.getDate().toString().padStart(2,"0")}`;return console.log("✅ YYYY-MM-DD formatted:",{from:N,to:A}),{from:N,to:A}}const ie={"MMM DD, YYYY":{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"},"DD MMM YYYY":{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}}[K];if(console.log("📅 Format object:",ie),ie){const N=B.toLocaleDateString("en-US",ie),A=X.toLocaleDateString("en-US",ie);return console.log("✅ Formatted result:",{from:N,to:A}),{from:N,to:A}}return console.log("⚠️ Format not found, using fallback"),{from:B.toDateString(),to:X.toDateString()}}Se.onMount(()=>{H()&&setTimeout(()=>{de().focus()},30)});const re=B=>{const X=B.detail;U({...U(),from:X}),U().to&&new Date(U().to)<X&&U({...U(),to:null}),D("change",U())},G=B=>{const X=B.detail;U({...U(),to:X}),D("change",U())},ae=B=>{const X=B.target.value;U({...U(),fromTime:X}),D("change",U())},z=B=>{const X=B.target.value;U({...U(),toTime:X}),D("change",U())},ge=()=>{U(null),D("change",null)};x(()=>v(R()),()=>{var B;o(a,(B=R())==null?void 0:B.dateFormat)}),x(()=>v(R()),()=>{var B;o(l,(B=R())==null?void 0:B.showTime)}),x(()=>(t(l),v(U())),()=>{var B;o(d,t(l)&&((B=U())!=null&&B.fromTime)?U().fromTime:"00:00")}),x(()=>(t(l),v(U())),()=>{var B;o(u,t(l)&&((B=U())!=null&&B.toTime)?U().toTime:"00:00")}),x(()=>v(U()),()=>{var B;o(g,(B=U())!=null&&B.from?new Date(U().from):new Date)}),x(()=>v(U()),()=>{var B;o(c,(B=U())!=null&&B.to?new Date(U().to):new Date)}),x(()=>(t(l),v(U()),t(g),t(d)),()=>{var B;o(p,t(l)&&((B=U())!=null&&B.from)?new Date(`${t(g).toISOString().split("T")[0]}T${t(d)}`):t(g))}),x(()=>(t(l),v(U()),t(c),t(u)),()=>{var B;o(_,t(l)&&((B=U())!=null&&B.to)?new Date(`${t(c).toISOString().split("T")[0]}T${t(u)}`):t(c))}),x(()=>(v(U()),t(l),t(p),t(_),t(g),t(c)),()=>{o(S,(()=>{var B,X;return!((B=U())!=null&&B.from)||!((X=U())!=null&&X.to)?!0:t(l)?t(p)<=t(_):t(g)<=t(c)})())}),x(()=>(v(R()),v(U())),()=>{$(R().template&&U()?E(R().template,{value:U()}):void 0)}),x(()=>v(R()),()=>{o(T,R().readonly||R().disabled?"":R().placeholder||"Select date range")}),x(()=>(v($()),v(U()),t(T),t(a),t(l),t(g),t(d),t(c),t(u)),()=>{o(y,(()=>{var V,ie,N,A,M,te,ve,Ie;if($())return $();if(!((V=U())!=null&&V.from)&&!((ie=U())!=null&&ie.to))return t(T);const B=t(a);let X=t(T),K=t(T);return(N=U())!=null&&N.from&&(B==="default"||!B?X=t(l)?t(g).toDateString()+" "+t(d):t(g).toDateString():t(l)?X=Z(t(g),t(g),B,t(d),t(d)).from:X=Y(t(g),t(g),B).from),(A=U())!=null&&A.to&&(B==="default"||!B?K=t(l)?t(c).toDateString()+" "+t(u):t(c).toDateString():t(l)?K=Z(t(c),t(c),B,t(u),t(u)).to:K=Y(t(c),t(c),B).to),(M=U())!=null&&M.from&&((te=U())!=null&&te.to)?`${X} - ${K}`:(ve=U())!=null&&ve.from?`${X} - [Select end date]`:(Ie=U())!=null&&Ie.to?`[Select start date] - ${K}`:t(T)})())}),x(()=>n(),()=>{o(I,n()=="Editing")}),x(()=>v(R()),()=>{o(k,R().role=="inlineInput")}),x(()=>(t(I),v(U()),t(J)),()=>{o(C,t(I)&&JSON.stringify(U())!=JSON.stringify(t(J)))}),Mt(),Dt();var O=O1(),q=Ge(O);let ne,se;var ee=j(q);{var me=B=>{var X=E1();Ce(()=>Me(X,1,(v(R()),b(()=>R().icon+" icon")),"svelte-ht1x6b")),w(B,X)};le(ee,B=>{v(R()),b(()=>R().icon)&&B(me)})}var Ne=Ee(ee,2);{var Ue=B=>{var X=C1();let K;var V=j(X),ie=j(V),N=Ee(V,4);{var A=M=>{var te=S1();W("click",te,dr(ge)),w(M,te)};le(N,M=>{v(U()),v(R()),b(()=>U()&&R().showDirty!=!1)&&M(A)})}Ce(()=>{K=Me(X,1,"editor svelte-ht1x6b",null,K,{"with-icon":R().icon,placeholder:!U()}),Xe(ie,t(y))}),W("click",X,()=>o(pe,!t(pe))),w(B,X)},he=B=>{var X=A1();let K,V;var ie=j(X),N=j(ie);{var A=te=>{var ve=Mi();Ce(()=>Xe(ve,t(y))),w(te,ve)},M=te=>{var ve=Mi();Ce(()=>Xe(ve,t(T))),w(te,ve)};le(N,te=>{t(y)?te(A):te(M,!1)})}Ce(()=>{K=Me(X,1,"value",null,K,{"with-icon":R().icon,placeholder:!U()}),V=Ye(X,"",V,{"justify-content":(v(R()),b(()=>R().align))})}),w(B,X)};le(Ne,B=>{t(I)?B(Ue):B(he,!1)})}vt(q,B=>o(fe,B),()=>t(fe));var ue=Ee(q,2);{var Q=B=>{Qr(B,{get anchor(){return t(fe)},dismissible:!1,get open(){return t(pe)},align:"right",children:(X,K)=>{var V=x1();Ye(V,"",{},{"--date-picker-background":"var(--spectrum-global-color-gray-75)","--date-picker-foreground":"var(--spectrum-global-color-gray-800)","--date-picker-selected-background":"var(--accent-color)"});var ie=j(V),N=j(ie),A=Ee(j(N),2),M=j(A);iu(M,{get value(){return t(g)},$$events:{select:re}}),vt(A,Le=>o(De,Le),()=>t(De));var te=Ee(A,2);{var ve=Le=>{var Te=T1(),qe=j(Te);vt(qe,Ze=>o(ye,Ze),()=>t(ye)),ta(qe,()=>t(d),Ze=>o(d,Ze)),W("change",qe,ae),w(Le,Te)};le(te,Le=>{t(l)&&Le(ve)})}var Ie=Ee(N,2),Pe=Ee(j(Ie),2),Re=j(Pe);iu(Re,{get value(){return t(c)},get min(){return t(g)},$$events:{select:G}}),vt(Pe,Le=>o(ke,Le),()=>t(ke));var oe=Ee(Pe,2);{var Oe=Le=>{var Te=k1(),qe=j(Te);vt(qe,Ze=>o(ce,Ze),()=>t(ce)),ta(qe,()=>t(u),Ze=>o(u,Ze)),W("change",qe,z),w(Le,Te)};le(oe,Le=>{t(l)&&Le(Oe)})}var Fe=Ee(ie,2);{var Be=Le=>{var Te=D1();w(Le,Te)};le(Fe,Le=>{t(S)||Le(Be)})}vt(V,Le=>o(we,Le),()=>t(we)),w(X,V)},$$slots:{default:!0}})};le(ue,B=>{t(I)&&B(Q)})}Ce(()=>{ne=Me(q,1,"superCell",null,ne,{inEdit:t(I),isDirty:t(C)&&R().showDirty,inline:t(k),tableCell:R().role=="tableCell",formInput:R().role=="formInput",disabled:R().disabled,readonly:R().readonly,error:R().error}),Vt(q,"tabindex",(v(R()),b(()=>R().readonly||R().disabled?"-1":"0"))),se=Ye(q,"",se,{color:(v(R()),b(()=>R().color)),background:(v(R()),b(()=>R().background)),"font-weight":(v(R()),b(()=>R().fontWeight))})}),W("focus",q,function(...B){var X;(X=de().focus)==null||X.apply(this,B)}),W("keypress",q,function(...B){var X;(X=de().handleKeyboard)==null||X.apply(this,B)}),W("focusout",q,function(...B){var X;(X=de().focusout)==null||X.apply(this,B)}),w(e,O),Ct(),s()}const R1={all:"All Icons",business:"Business",communication:"Communication",design:"Design",development:"Development",document:"Document",editor:"Editor",finance:"Finance",health:"Health",logistics:"Logistics",map:"Maps",media:"Media",system:"System",user:"User",weather:"Weather"},du={all:["acorn","address-book","address-book-tabs","air-traffic-control","airplane","airplane-in-flight","airplane-landing","airplane-takeoff","airplane-taxiing","airplane-tilt","airplay","alarm","alien","align-bottom","align-bottom-simple","align-center-horizontal","align-center-horizontal-simple","align-center-vertical","align-center-vertical-simple","align-left","align-left-simple","align-right","align-right-simple","align-top","align-top-simple","amazon-logo","ambulance","anchor","anchor-simple","android-logo","angle","angular-logo","aperture","app-store-logo","app-window","apple-logo","apple-podcasts-logo","approximate-equals","archive","armchair","arrow-arc-left","arrow-arc-right","arrow-bend-double-up-left","arrow-bend-double-up-right","arrow-bend-down-left","arrow-bend-down-right","arrow-bend-left-down","arrow-bend-left-up","arrow-bend-right-down","arrow-bend-right-up","arrow-bend-up-left","arrow-bend-up-right","arrow-circle-down","arrow-circle-down-left","arrow-circle-down-right","arrow-circle-left","arrow-circle-right","arrow-circle-up","arrow-circle-up-left","arrow-circle-up-right","arrow-clockwise","arrow-counter-clockwise","arrow-down","arrow-down-left","arrow-down-right","arrow-elbow-down-left","arrow-elbow-down-right","arrow-elbow-left","arrow-elbow-left-down","arrow-elbow-left-up","arrow-elbow-right","arrow-elbow-right-down","arrow-elbow-right-up","arrow-elbow-up-left","arrow-elbow-up-right","arrow-fat-down","arrow-fat-left","arrow-fat-line-down","arrow-fat-line-left","arrow-fat-line-right","arrow-fat-line-up","arrow-fat-lines-down","arrow-fat-lines-left","arrow-fat-lines-right","arrow-fat-lines-up","arrow-fat-right","arrow-fat-up","arrow-left","arrow-line-down","arrow-line-down-left","arrow-line-down-right","arrow-line-left","arrow-line-right","arrow-line-up","arrow-line-up-left","arrow-line-up-right","arrow-right","arrow-square-down","arrow-square-down-left","arrow-square-down-right","arrow-square-in","arrow-square-left","arrow-square-out","arrow-square-right","arrow-square-up","arrow-square-up-left","arrow-square-up-right","arrow-u-down-left","arrow-u-down-right","arrow-u-left-down","arrow-u-left-up","arrow-u-right-down","arrow-u-right-up","arrow-u-up-left","arrow-u-up-right","arrow-up","arrow-up-left","arrow-up-right","arrows-clockwise","arrows-counter-clockwise","arrows-down-up","arrows-horizontal","arrows-in","arrows-in-cardinal","arrows-in-line-horizontal","arrows-in-line-vertical","arrows-in-simple","arrows-left-right","arrows-merge","arrows-out","arrows-out-cardinal","arrows-out-line-horizontal","arrows-out-line-vertical","arrows-out-simple","arrows-split","arrows-vertical","article","article-medium","article-ny-times","asclepius","caduceus","asterisk","asterisk-simple","at","atom","avocado","axe","baby","baby-carriage","backpack","backspace","bag","bag-simple","balloon","bandaids","bank","barbell","barcode","barn","barricade","baseball","baseball-cap","baseball-helmet","basket","basketball","bathtub","battery-charging","battery-charging-vertical","battery-empty","battery-full","battery-high","battery-low","battery-medium","battery-plus","battery-plus-vertical","battery-vertical-empty","battery-vertical-full","battery-vertical-high","battery-vertical-low","battery-vertical-medium","battery-warning","battery-warning-vertical","beach-ball","beanie","bed","beer-bottle","beer-stein","behance-logo","bell","bell-ringing","bell-simple","bell-simple-ringing","bell-simple-slash","bell-simple-z","bell-slash","bell-z","belt","bezier-curve","bicycle","binary","binoculars","biohazard","bird","blueprint","bluetooth","bluetooth-connected","bluetooth-slash","bluetooth-x","boat","bomb","bone","book","book-bookmark","book-open","book-open-text","book-open-user","bookmark","bookmark-simple","bookmarks","bookmarks-simple","books","boot","boules","bounding-box","bowl-food","bowl-steam","bowling-ball","box-arrow-down","archive-box","box-arrow-up","boxing-glove","brackets-angle","brackets-curly","brackets-round","brackets-square","brain","brandy","bread","bridge","briefcase","briefcase-metal","broadcast","broom","browser","browsers","bug","bug-beetle","bug-droid","building","building-apartment","building-office","buildings","bulldozer","bus","butterfly","cable-car","cactus","cake","calculator","calendar","calendar-blank","calendar-check","calendar-dot","calendar-dots","calendar-heart","calendar-minus","calendar-plus","calendar-slash","calendar-star","calendar-x","call-bell","camera","camera-plus","camera-rotate","camera-slash","campfire","car","car-battery","car-profile","car-simple","cardholder","cards","cards-three","caret-circle-double-down","caret-circle-double-left","caret-circle-double-right","caret-circle-double-up","caret-circle-down","caret-circle-left","caret-circle-right","caret-circle-up","caret-circle-up-down","caret-double-down","caret-double-left","caret-double-right","caret-double-up","caret-down","caret-left","caret-line-down","caret-line-left","caret-line-right","caret-line-up","caret-right","caret-up","caret-up-down","carrot","cash-register","cassette-tape","castle-turret","cat","cell-signal-full","cell-signal-high","cell-signal-low","cell-signal-medium","cell-signal-none","cell-signal-slash","cell-signal-x","cell-tower","certificate","chair","chalkboard","chalkboard-simple","chalkboard-teacher","champagne","charging-station","chart-bar","chart-bar-horizontal","chart-donut","chart-line","chart-line-down","chart-line-up","chart-pie","chart-pie-slice","chart-polar","chart-scatter","chat","chat-centered","chat-centered-dots","chat-centered-slash","chat-centered-text","chat-circle","chat-circle-dots","chat-circle-slash","chat-circle-text","chat-dots","chat-slash","chat-teardrop","chat-teardrop-dots","chat-teardrop-slash","chat-teardrop-text","chat-text","chats","chats-circle","chats-teardrop","check","check-circle","check-fat","check-square","check-square-offset","checkerboard","checks","cheers","cheese","chef-hat","cherries","church","cigarette","cigarette-slash","circle","circle-dashed","circle-half","circle-half-tilt","circle-notch","circles-four","circles-three","circles-three-plus","circuitry","city","clipboard","clipboard-text","clock","clock-afternoon","clock-clockwise","clock-countdown","clock-counter-clockwise","clock-user","closed-captioning","cloud","cloud-arrow-down","cloud-arrow-up","cloud-check","cloud-fog","cloud-lightning","cloud-moon","cloud-rain","cloud-slash","cloud-snow","cloud-sun","cloud-warning","cloud-x","clover","club","coat-hanger","coda-logo","code","code-block","code-simple","codepen-logo","codesandbox-logo","coffee","coffee-bean","coin","coin-vertical","coins","columns","columns-plus-left","columns-plus-right","command","compass","compass-rose","compass-tool","computer-tower","confetti","contactless-payment","control","cookie","cooking-pot","copy","copy-simple","copyleft","copyright","corners-in","corners-out","couch","court-basketball","cow","cowboy-hat","cpu","crane","crane-tower","credit-card","cricket","crop","cross","crosshair","crosshair-simple","crown","crown-cross","crown-simple","cube","cube-focus","cube-transparent","currency-btc","currency-circle-dollar","currency-cny","currency-dollar","currency-dollar-simple","currency-eth","currency-eur","currency-gbp","currency-inr","currency-jpy","currency-krw","currency-kzt","currency-ngn","currency-rub","cursor","cursor-click","cursor-text","cylinder","database","desk","desktop","desktop-tower","detective","dev-to-logo","device-mobile","device-mobile-camera","device-mobile-slash","device-mobile-speaker","device-rotate","device-tablet","device-tablet-camera","device-tablet-speaker","devices","diamond","diamonds-four","dice-five","dice-four","dice-one","dice-six","dice-three","dice-two","disc","disco-ball","discord-logo","divide","dna","dog","door","door-open","dot","dot-outline","dots-nine","dots-six","dots-six-vertical","dots-three","dots-three-circle","dots-three-circle-vertical","dots-three-outline","dots-three-outline-vertical","dots-three-vertical","download","download-simple","dress","dresser","dribbble-logo","drone","drop","drop-half","drop-half-bottom","drop-simple","drop-slash","dropbox-logo","ear","ear-slash","egg","egg-crack","eject","eject-simple","elevator","engine","envelope","envelope-open","envelope-simple","envelope-simple-open","equalizer","equals","eraser","escalator-down","escalator-up","exam","exclamation-mark","exclude","exclude-square","export","eye","eye-closed","eye-slash","eyedropper","eyedropper-sample","eyeglasses","eyes","face-mask","facebook-logo","factory","faders","faders-horizontal","fallout-shelter","fan","farm","fast-forward","fast-forward-circle","feather","fediverse-logo","figma-logo","file","file-archive","file-arrow-down","file-arrow-up","file-audio","file-c","file-c-sharp","file-cloud","file-code","file-cpp","file-css","file-csv","file-dashed","file-dotted","file-doc","file-html","file-image","file-ini","file-jpg","file-js","file-jsx","file-lock","file-magnifying-glass","file-search","file-md","file-minus","file-pdf","file-plus","file-png","file-ppt","file-py","file-rs","file-sql","file-svg","file-text","file-ts","file-tsx","file-txt","file-video","file-vue","file-x","file-xls","file-zip","files","film-reel","film-script","film-slate","film-strip","fingerprint","fingerprint-simple","finn-the-human","fire","fire-extinguisher","fire-simple","fire-truck","first-aid","first-aid-kit","fish","fish-simple","flag","flag-banner","flag-banner-fold","flag-checkered","flag-pennant","flame","flashlight","flask","flip-horizontal","flip-vertical","floppy-disk","floppy-disk-back","flow-arrow","flower","flower-lotus","flower-tulip","flying-saucer","folder","folder-notch","folder-dashed","folder-dotted","folder-lock","folder-minus","folder-notch-minus","folder-open","folder-notch-open","folder-plus","folder-notch-plus","folder-simple","folder-simple-dashed","folder-simple-dotted","folder-simple-lock","folder-simple-minus","folder-simple-plus","folder-simple-star","folder-simple-user","folder-star","folder-user","folders","football","football-helmet","footprints","fork-knife","four-k","frame-corners","framer-logo","function","funnel","funnel-simple","funnel-simple-x","funnel-x","game-controller","garage","gas-can","gas-pump","gauge","gavel","gear","gear-fine","gear-six","gender-female","gender-intersex","gender-male","gender-neuter","gender-nonbinary","gender-transgender","ghost","gif","gift","git-branch","git-commit","git-diff","git-fork","git-merge","git-pull-request","github-logo","gitlab-logo","gitlab-logo-simple","globe","globe-hemisphere-east","globe-hemisphere-west","globe-simple","globe-simple-x","globe-stand","globe-x","goggles","golf","goodreads-logo","google-cardboard-logo","google-chrome-logo","google-drive-logo","google-logo","google-photos-logo","google-play-logo","google-podcasts-logo","gps","gps-fix","gps-slash","gradient","graduation-cap","grains","grains-slash","graph","graphics-card","greater-than","greater-than-or-equal","grid-four","grid-nine","guitar","hair-dryer","hamburger","hammer","hand","hand-arrow-down","hand-arrow-up","hand-coins","hand-deposit","hand-eye","hand-fist","hand-grabbing","hand-heart","hand-palm","hand-peace","hand-pointing","hand-soap","hand-swipe-left","hand-swipe-right","hand-tap","hand-waving","hand-withdraw","handbag","handbag-simple","hands-clapping","hands-praying","handshake","hard-drive","hard-drives","hard-hat","hash","hash-straight","head-circuit","headlights","headphones","headset","heart","heart-break","heart-half","heart-straight","heart-straight-break","heartbeat","hexagon","high-definition","high-heel","highlighter","highlighter-circle","hockey","hoodie","horse","hospital","hourglass","hourglass-high","hourglass-low","hourglass-medium","hourglass-simple","hourglass-simple-high","hourglass-simple-low","hourglass-simple-medium","house","house-line","house-simple","hurricane","ice-cream","identification-badge","identification-card","image","image-broken","image-square","images","images-square","infinity","lemniscate","info","instagram-logo","intersect","intersect-square","intersect-three","intersection","invoice","island","jar","jar-label","jeep","joystick","kanban","key","key-return","keyboard","keyhole","knife","ladder","ladder-simple","lamp","lamp-pendant","laptop","lasso","lastfm-logo","layout","leaf","lectern","lego","lego-smiley","less-than","less-than-or-equal","letter-circle-h","letter-circle-p","letter-circle-v","lifebuoy","lightbulb","lightbulb-filament","lighthouse","lightning","lightning-a","lightning-slash","line-segment","line-segments","line-vertical","link","link-break","link-simple","link-simple-break","link-simple-horizontal","link-simple-horizontal-break","linkedin-logo","linktree-logo","linux-logo","list","list-bullets","list-checks","list-dashes","list-heart","list-magnifying-glass","list-numbers","list-plus","list-star","lock","lock-key","lock-key-open","lock-laminated","lock-laminated-open","lock-open","lock-simple","lock-simple-open","lockers","log","magic-wand","magnet","magnet-straight","magnifying-glass","magnifying-glass-minus","magnifying-glass-plus","mailbox","map-pin","map-pin-area","map-pin-line","map-pin-plus","map-pin-simple","map-pin-simple-area","map-pin-simple-line","map-trifold","markdown-logo","marker-circle","martini","mask-happy","mask-sad","mastodon-logo","math-operations","matrix-logo","medal","medal-military","medium-logo","megaphone","megaphone-simple","member-of","memory","messenger-logo","meta-logo","meteor","metronome","microphone","microphone-slash","microphone-stage","microscope","microsoft-excel-logo","microsoft-outlook-logo","microsoft-powerpoint-logo","microsoft-teams-logo","microsoft-word-logo","minus","minus-circle","minus-square","money","money-wavy","monitor","monitor-arrow-up","monitor-play","moon","moon-stars","moped","moped-front","mosque","motorcycle","mountains","mouse","mouse-left-click","mouse-middle-click","mouse-right-click","mouse-scroll","mouse-simple","music-note","music-note-simple","music-notes","music-notes-minus","music-notes-plus","music-notes-simple","navigation-arrow","needle","network","network-slash","network-x","newspaper","newspaper-clipping","not-equals","not-member-of","not-subset-of","not-superset-of","notches","note","note-blank","note-pencil","notebook","notepad","notification","notion-logo","nuclear-plant","number-circle-eight","number-circle-five","number-circle-four","number-circle-nine","number-circle-one","number-circle-seven","number-circle-six","number-circle-three","number-circle-two","number-circle-zero","number-eight","number-five","number-four","number-nine","number-one","number-seven","number-six","number-square-eight","number-square-five","number-square-four","number-square-nine","number-square-one","number-square-seven","number-square-six","number-square-three","number-square-two","number-square-zero","number-three","number-two","number-zero","numpad","nut","ny-times-logo","octagon","office-chair","onigiri","open-ai-logo","option","orange","orange-slice","oven","package","paint-brush","paint-brush-broad","paint-brush-household","paint-bucket","paint-roller","palette","panorama","pants","paper-plane","paper-plane-right","paper-plane-tilt","paperclip","paperclip-horizontal","parachute","paragraph","parallelogram","park","password","path","patreon-logo","pause","pause-circle","paw-print","paypal-logo","peace","pen","pen-nib","pen-nib-straight","pencil","pencil-circle","pencil-line","pencil-ruler","pencil-simple","pencil-simple-line","pencil-simple-slash","pencil-slash","pentagon","pentagram","pepper","percent","person","person-arms-spread","person-simple","person-simple-bike","person-simple-circle","person-simple-hike","person-simple-run","person-simple-ski","person-simple-snowboard","person-simple-swim","person-simple-tai-chi","person-simple-throw","person-simple-walk","perspective","phone","phone-call","phone-disconnect","phone-incoming","phone-list","phone-outgoing","phone-pause","phone-plus","phone-slash","phone-transfer","phone-x","phosphor-logo","pi","piano-keys","picnic-table","picture-in-picture","piggy-bank","pill","ping-pong","pint-glass","pinterest-logo","pinwheel","pipe","pipe-wrench","pix-logo","pizza","placeholder","planet","plant","play","play-circle","play-pause","playlist","plug","plug-charging","plugs","plugs-connected","plus","plus-circle","plus-minus","plus-square","poker-chip","police-car","polygon","popcorn","popsicle","potted-plant","power","prescription","presentation","presentation-chart","printer","prohibit","prohibit-inset","projector-screen","projector-screen-chart","pulse","activity","push-pin","push-pin-simple","push-pin-simple-slash","push-pin-slash","puzzle-piece","qr-code","question","question-mark","queue","quotes","rabbit","racquet","radical","radio","radio-button","radioactive","rainbow","rainbow-cloud","ranking","read-cv-logo","receipt","receipt-x","record","rectangle","rectangle-dashed","recycle","reddit-logo","repeat","repeat-once","replit-logo","resize","rewind","rewind-circle","road-horizon","robot","rocket","rocket-launch","rows","rows-plus-bottom","rows-plus-top","rss","rss-simple","rug","ruler","sailboat","scales","scan","scan-smiley","scissors","scooter","screencast","screwdriver","scribble","scribble-loop","scroll","seal","circle-wavy","seal-check","circle-wavy-check","seal-percent","circle-wavy-question","seal-warning","circle-wavy-warning","seat","seatbelt","security-camera","selection","selection-all","selection-background","selection-foreground","selection-inverse","selection-plus","selection-slash","shapes","share","share-fat","share-network","shield","shield-check","shield-checkered","shield-chevron","shield-plus","shield-slash","shield-star","shield-warning","shipping-container","shirt-folded","shooting-star","shopping-bag","shopping-bag-open","shopping-cart","shopping-cart-simple","shovel","shower","shrimp","shuffle","shuffle-angular","shuffle-simple","sidebar","sidebar-simple","sigma","sign-in","sign-out","signature","signpost","sim-card","siren","sketch-logo","skip-back","skip-back-circle","skip-forward","skip-forward-circle","skull","skype-logo","slack-logo","sliders","sliders-horizontal","slideshow","smiley","smiley-angry","smiley-blank","smiley-meh","smiley-melting","smiley-nervous","smiley-sad","smiley-sticker","smiley-wink","smiley-x-eyes","snapchat-logo","sneaker","sneaker-move","snowflake","soccer-ball","sock","solar-panel","solar-roof","sort-ascending","sort-descending","soundcloud-logo","spade","sparkle","speaker-hifi","speaker-high","speaker-low","speaker-none","speaker-simple-high","speaker-simple-low","speaker-simple-none","speaker-simple-slash","speaker-simple-x","speaker-slash","speaker-x","speedometer","sphere","spinner","spinner-ball","spinner-gap","spiral","split-horizontal","split-vertical","spotify-logo","spray-bottle","square","square-half","square-half-bottom","square-logo","square-split-horizontal","square-split-vertical","squares-four","stack","stack-minus","stack-overflow-logo","stack-plus","stack-simple","stairs","stamp","standard-definition","star","star-and-crescent","star-four","star-half","star-of-david","steam-logo","steering-wheel","steps","stethoscope","sticker","stool","stop","stop-circle","storefront","strategy","stripe-logo","student","subset-of","subset-proper-of","subtitles","subtitles-slash","subtract","subtract-square","subway","suitcase","suitcase-rolling","suitcase-simple","sun","sun-dim","sun-horizon","sunglasses","superset-of","superset-proper-of","swap","swatches","swimming-pool","sword","synagogue","syringe","t-shirt","table","tabs","tag","tag-chevron","tag-simple","target","taxi","tea-bag","telegram-logo","television","television-simple","tennis-ball","tent","terminal","terminal-window","test-tube","text-a-underline","text-aa","text-align-center","text-align-justify","text-align-left","text-align-right","text-b","text-bolder","text-columns","text-h","text-h-five","text-h-four","text-h-one","text-h-six","text-h-three","text-h-two","text-indent","text-italic","text-outdent","text-strikethrough","text-subscript","text-superscript","text-t","text-t-slash","text-underline","textbox","thermometer","thermometer-cold","thermometer-hot","thermometer-simple","threads-logo","three-d","thumbs-down","thumbs-up","ticket","tidal-logo","tiktok-logo","tilde","timer","tip-jar","tipi","tire","toggle-left","toggle-right","toilet","toilet-paper","toolbox","tooth","tornado","tote","tote-simple","towel","tractor","trademark","trademark-registered","traffic-cone","traffic-sign","traffic-signal","train","train-regional","train-simple","tram","translate","trash","trash-simple","tray","tray-arrow-down","archive-tray","tray-arrow-up","treasure-chest","tree","tree-evergreen","tree-palm","tree-structure","tree-view","trend-down","trend-up","triangle","triangle-dashed","trolley","trolley-suitcase","trophy","truck","truck-trailer","tumblr-logo","twitch-logo","twitter-logo","umbrella","umbrella-simple","union","unite","unite-square","upload","upload-simple","usb","user","user-check","user-circle","user-circle-check","user-circle-dashed","user-circle-gear","user-circle-minus","user-circle-plus","user-focus","user-gear","user-list","user-minus","user-plus","user-rectangle","user-sound","user-square","user-switch","users","users-four","users-three","van","vault","vector-three","vector-two","vibrate","video","video-camera","video-camera-slash","video-conference","vignette","vinyl-record","virtual-reality","virus","visor","voicemail","volleyball","wall","wallet","warehouse","warning","warning-circle","warning-diamond","warning-octagon","washing-machine","watch","wave-sawtooth","wave-sine","wave-square","wave-triangle","waveform","waveform-slash","waves","webcam","webcam-slash","webhooks-logo","wechat-logo","whatsapp-logo","wheelchair","wheelchair-motion","wifi-high","wifi-low","wifi-medium","wifi-none","wifi-slash","wifi-x","wind","windmill","windows-logo","wine","wrench","x","x-circle","x-square","yarn","yin-yang","youtube-logo"],business:["briefcase","briefcase-fill","building","building-fill","chart-bar","chart-bar-fill","chart-line","chart-line-fill","currency-dollar","currency-dollar-fill","presentation","presentation-fill","users","users-fill"],communication:["chat","chat-fill","envelope","envelope-fill","phone","phone-fill","video-camera","video-camera-fill","microphone","microphone-fill","speaker","speaker-fill"],design:["palette","palette-fill","paint-brush","paint-brush-fill","scissors","scissors-fill","crop","crop-fill"],development:["code","code-fill","terminal","terminal-fill","bug","bug-fill","git-branch","git-branch-fill"],document:["file","file-fill","file-text","file-text-fill","file-pdf","file-pdf-fill","folder","folder-fill"],editor:["pencil","pencil-fill","text-b","text-b-fill","text-italic","text-italic-fill","list","list-fill"],finance:["currency-dollar","currency-dollar-fill","credit-card","credit-card-fill","bank","bank-fill"],health:["heart","heart-fill","stethoscope","stethoscope-fill","pill","pill-fill"],logistics:["truck","truck-fill","package","package-fill","map-pin","map-pin-fill"],map:["map","map-fill","map-pin","map-pin-fill","navigation","navigation-fill"],media:["play","play-fill","pause","pause-fill","stop","stop-fill","image","image-fill","video-camera","video-camera-fill"],system:["gear","gear-fill","settings","settings-fill","cog","cog-fill"],user:["user","user-fill","users","users-fill","user-circle","user-circle-fill"],weather:["sun","sun-fill","cloud","cloud-fill","rain","rain-fill","snow","snow-fill"]};du.all;var P1=F("<svelte-virtual-list-row><!></svelte-virtual-list-row>",2),M1=F("<svelte-virtual-list-viewport><svelte-virtual-list-contents></svelte-virtual-list-contents></svelte-virtual-list-viewport>",2);function N1(e,r){St(r,!1);let n=m(r,"items",8),i=m(r,"height",8,"100%"),s=m(r,"itemHeight",8,void 0),a=m(r,"start",12,0),l=m(r,"end",12,0),d=[],u,g=h(),c=h(),p=h(0),_=h(),S=h(),y=h(0),T=h(0),I;async function k(U,$,R){const{scrollTop:H}=t(g);await Se.tick();let J=t(y)-H,de=a();for(;J<$&&de<U.length;){let we=u[de-a()];we||(l(de+1),await Se.tick(),we=u[de-a()]);const pe=d[de]=R||we.offsetHeight;J+=pe,de+=1}l(de);const fe=U.length-l();I=(t(y)+J)/l(),o(T,fe*I),d.length=U.length}async function C(){const{scrollTop:U}=t(g),$=a();for(let de=0;de<u.length;de+=1)d[a()+de]=s()||u[de].offsetHeight;let R=0,H=0;for(;R<n().length;){const de=d[R]||I;if(H+de>U){a(R),o(y,H);break}H+=de,R+=1}for(;R<n().length&&(H+=d[R]||I,R+=1,!(H>U+t(p))););l(R);const J=n().length-l();for(I=H/l();R<n().length;)d[R++]=I;if(o(T,J*I),a()<$){await Se.tick();let de=0,fe=0;for(let pe=a();pe<$;pe+=1)u[pe-a()]&&(de+=d[pe],fe+=s()||u[pe-a()].offsetHeight);const we=fe-de;t(g).scrollTo(0,U+we)}}Se.onMount(()=>{u=t(c).getElementsByTagName("svelte-virtual-list-row"),o(S,!0)}),x(()=>(v(n()),v(a()),v(l())),()=>{o(_,n().slice(a(),l()).map((U,$)=>({index:$+a(),data:U})))}),x(()=>(t(S),v(n()),t(p),v(s())),()=>{t(S)&&k(n(),t(p),s())}),Mt(),Dt();var D=M1();Me(D,1,"svelte-m5no5e");var E=j(D);Me(E,1,"svelte-m5no5e"),At(E,5,()=>t(_),U=>U.index,(U,$)=>{var R=P1();Me(R,1,"svelte-m5no5e");var H=j(R);vr(H,r,"default",{get item(){return t($),b(()=>t($).data)}},J=>{var de=Mi("Missing template");w(J,de)}),w(U,R)}),vt(E,U=>o(c,U),()=>t(c)),vt(D,U=>o(g,U),()=>t(g)),Ce(()=>{Ye(D,`height: ${i()??""};`),Ye(E,`padding-top: ${t(y)??""}px; padding-bottom: ${t(T)??""}px;`)}),bl(D,"offsetHeight",U=>o(p,U)),W("scroll",D,C),w(e,D),Ct()}var L1=F("<i></i>"),F1=F('<div class="empty-state svelte-9pwd3t"><i class="ph ph-image"></i></div>'),V1=F("<button> </button>"),U1=F('<div class="category-tabs svelte-9pwd3t"></div>'),B1=F('<button class="clear-search svelte-9pwd3t" aria-label="Clear search"><i class="ph ph-x"></i></button>'),H1=F('<button tabindex="0"><i></i></button>'),z1=F('<div class="icons-row svelte-9pwd3t"></div>'),j1=F('<div class="no-results svelte-9pwd3t"><i class="ph ph-magnifying-glass svelte-9pwd3t"></i> <p>No icons found</p></div>'),G1=F('<button class="clear-button svelte-9pwd3t"><i class="ph ph-x"></i> Clear</button>'),q1=F('<div><div class="header svelte-9pwd3t"><!> <div class="search-container svelte-9pwd3t"><i class="ph ph-magnifying-glass search-icon svelte-9pwd3t"></i> <input type="text" placeholder="Search icons..." class="search-input svelte-9pwd3t" aria-label="Search icons"/> <!></div></div> <div class="icons-grid-container svelte-9pwd3t"><!></div> <div class="footer svelte-9pwd3t"><!></div></div>'),W1=F('<div role="button" aria-haspopup="dialog" aria-label="Select icon"><!></div> <!>',1);function Y1(e,r){St(r,!1);const n=h(),i=h(),s=h(),a=h();let l=m(r,"value",12),d=m(r,"cellOptions",24,()=>({})),u=m(r,"align",8,"left"),g=h(!1),c=h(),p=h(""),_=h("all"),S=h("");const y=Se.createEventDispatcher();let T=h("");const I=32,k=8,C=8,D=I;let E=h([]);function U(ce,Z,Y,re){const G=t(n).find(ge=>ge.id===Y);if(!G)return[];let ae=[...G.icons];if(re){const ge=re.toLowerCase();ae=ae.filter(O=>O.replace(/-line|-fill$/,"").toLowerCase().includes(ge))}const z=[];for(let ge=0;ge<ae.length;ge+=Z)z.push(ae.slice(ge,ge+Z));return z}const $=ce=>{const Z=ce,Y=Z===l()?"":Z;l(Y),y("change",Y),o(g,!1)};function R(ce){o(S,`ph ph-${ce}`)}const H=(ce,Z)=>{(ce.key==="Enter"||ce.key===" ")&&(ce.preventDefault(),$(Z))},J=()=>{l(""),y("change",null),o(S,null)};x(()=>du,()=>{o(n,Object.entries(R1).map(([ce,Z])=>({id:ce,label:Z,icons:du[ce]||[]})))}),x(()=>(t(n),t(_)),()=>{t(n).length>0&&!t(_)&&o(_,"all")}),x(()=>v(d()),()=>{var ce,Z;o(i,((ce=d())==null?void 0:ce.readonly)||((Z=d())==null?void 0:Z.disabled))}),x(()=>v(l()),()=>{if(l()){let ce=l().startsWith("ph-")?l().slice(3):l();o(T,ce)}else o(T,"")}),x(()=>v(d()),()=>{var ce;o(s,(ce=d())!=null&&ce.showCategories?9:6)}),x(()=>{},()=>{o(a,I*k+C*2)}),x(()=>(v(l()),t(s),t(_),t(p)),()=>{o(E,U(l(),t(s),t(_),t(p)))}),Mt(),Dt();var de=W1(),fe=Ge(de);let we;var pe=j(fe);{var De=ce=>{var Z=L1();Ce(()=>Me(Z,1,`ph ph-${t(T)??""}`,"svelte-9pwd3t")),w(ce,Z)},ke=ce=>{var Z=F1();w(ce,Z)};le(pe,ce=>{l()?ce(De):ce(ke,!1)})}vt(fe,ce=>o(c,ce),()=>t(c));var ye=Ee(fe,2);Qr(ye,{get open(){return t(g)},get anchor(){return t(c)},get align(){return u()},$$events:{close:()=>o(g,!1)},children:(ce,Z)=>{var Y=q1();let re;var G=j(Y),ae=j(G);{var z=Q=>{var B=U1();At(B,5,()=>t(n),Ft,(X,K)=>{var V=V1();let ie;var N=j(V);Ce(()=>{Vt(V,"aria-label",(t(K),b(()=>`Show ${t(K).label} icons`))),ie=Me(V,1,"svelte-9pwd3t",null,ie,{selected:t(_)===t(K).id}),Xe(N,(t(K),b(()=>t(K).label)))}),W("click",V,()=>o(_,t(K).id)),w(X,V)}),w(Q,B)};le(ae,Q=>{v(d()),b(()=>d().showCategories)&&Q(z)})}var ge=Ee(ae,2),O=Ee(j(ge),2),q=Ee(O,2);{var ne=Q=>{var B=B1();W("click",B,()=>o(p,"")),w(Q,B)};le(q,Q=>{t(p)&&Q(ne)})}var se=Ee(G,2),ee=j(se);{var me=Q=>{N1(Q,{get items(){return t(E)},itemHeight:D,get height(){return t(a)},width:"100%",children:Cg,$$slots:{default:(B,X)=>{const K=Pt(()=>X.item),V=Pt(()=>X.style);var ie=z1();At(ie,5,()=>t(K),Ft,(N,A)=>{var M=H1();let te;var ve=j(M);Ce(()=>{te=Me(M,1,"icon-button svelte-9pwd3t",null,te,{selected:t(T)===t(A)}),Vt(M,"aria-label",`Select ${t(A)} icon`),Me(ve,1,`ph ph-${t(A)??""}`,"svelte-9pwd3t")}),W("click",M,()=>$(t(A))),W("keydown",M,Ie=>H(Ie,t(A))),W("mouseenter",M,()=>R(t(A))),W("mouseleave",M,()=>o(S,"")),w(N,M)}),Ce(()=>Ye(ie,t(V))),w(B,ie)}}})},Ne=Q=>{var B=j1();w(Q,B)};le(ee,Q=>{t(E),b(()=>t(E).length>0)?Q(me):Q(Ne,!1)})}var Ue=Ee(se,2),he=j(Ue);{var ue=Q=>{var B=G1();W("click",B,J),w(Q,B)};le(he,Q=>{l()&&Q(ue)})}Ce(()=>{re=Me(Y,1,"icon-picker svelte-9pwd3t",null,re,{"with-categories":d().showCategories}),Ye(Y,`
|
|
9
|
+
--icon-size: 24;
|
|
10
|
+
--icon-padding: 4;
|
|
11
|
+
--items-per-row: ${t(s)??""};
|
|
12
|
+
--row-height: 40;
|
|
13
|
+
`)}),ta(O,()=>t(p),Q=>o(p,Q)),w(ce,Y)},$$slots:{default:!0}}),Ce(()=>{we=Me(fe,1,"preview-icon svelte-9pwd3t",null,we,{readonly:t(i)}),Vt(fe,"tabindex",t(i)?-1:0),Vt(fe,"aria-expanded",t(g))}),W("click",fe,function(...ce){var Z;(Z=t(i)?null:()=>{o(g,!t(g))})==null||Z.apply(this,ce)}),W("keydown",fe,ce=>{(ce.key==="Enter"||ce.key===" ")&&(ce.preventDefault(),t(i)||o(g,!t(g)))}),w(e,de),Ct()}var K1=F('<div class="header-cell svelte-fjnh72"> </div>'),X1=F('<div class="data-cell svelte-fjnh72"> </div>'),Q1=F('<div><!> <div class="data-cell check svelte-fjnh72"><i class="ri-check-line svelte-fjnh72"></i></div></div>'),Z1=F('<div class="data-cell svelte-fjnh72"> </div>'),J1=F('<div><!> <div class="data-cell check svelte-fjnh72"><i class="ri-check-line svelte-fjnh72"></i></div></div>'),$1=F('<div class="data-row loading svelte-fjnh72"><div class="data-cell svelte-fjnh72" style="grid-column: 1 / -1;"><i class="ri-loader-2-line rotating svelte-fjnh72"></i> Loading more...</div></div>'),ew=F('<div class="data-row loading svelte-fjnh72"><div class="data-cell svelte-fjnh72" style="grid-column: 1 / -1;"><i class="ri-loader-2-line rotating svelte-fjnh72"></i> Loading...</div></div>'),tw=F('<div class="data-row svelte-fjnh72"><div class="data-cell svelte-fjnh72" style="grid-column: 1 / -1;">No Results Found</div></div>'),rw=F('<div class="grid-container svelte-fjnh72"><div class="header-row svelte-fjnh72"><!> <div class="header-cell check svelte-fjnh72"></div></div> <!> <!> <!></div>'),nw=F('<div> <i class="ri-check-line svelte-fjnh72"></i></div>'),iw=F('<div> <i class="ri-check-line svelte-fjnh72"></i></div>'),aw=F('<div class="option loading svelte-fjnh72"><i class="ri-loader-2-line rotating svelte-fjnh72"></i> Loading more...</div>'),sw=F("<!> <!>",1),ow=F('<div class="option loading svelte-fjnh72"><i class="ri-loader-2-line rotating svelte-fjnh72"></i> Loading...</div>'),lw=F('<div class="option svelte-fjnh72">No Results Found</div>'),uw=F('<div class="options svelte-fjnh72"><!> <!></div>'),cw=F('<div class="control svelte-fjnh72"><div class="searchControl svelte-fjnh72"><i></i> <input type="text"/></div> <div class="listWrapper svelte-fjnh72"><div><!></div></div></div>');function dw(e,r){var ie;St(r,!1);const n=()=>He(t(ke),"$optionsFetch",i),[i,s]=qt(),a=h(),l=h(),d=h(),u=h(),g=h(),c=h(),p=h(),{API:_,fetchData:S,QueryUtils:y}=Se.getContext("sdk"),T=Se.createEventDispatcher();let I=m(r,"value",24,()=>[]),k=m(r,"fieldSchema",8),C=m(r,"filter",24,()=>[]),D=m(r,"relatedColumns",24,()=>{var N;return((N=k())==null?void 0:N.relatedColumns)||[]}),E=m(r,"multi",8,!1),U=k().tableId,$=((ie=k())==null?void 0:ie.relatedField)||"id",R=h(-1),H=h(),J=h(),de=15,fe=h(),we=!0,pe=h(!0),De=h([]),ke=h(),ye=h(),ce=h(de);const Z=(N,A)=>{var te,ve;if(!Object.keys(A).length)return N;const M={[Ia.LogicalOperator.AND]:{conditions:[...N?[N]:[],...Object.values(A||{})]},onEmptyFilter:Ia.EmptyFilterOption.RETURN_NONE};return(((ve=(te=M[Ia.LogicalOperator.AND])==null?void 0:te.conditions)==null?void 0:ve.length)??0)>0?M:{}},Y=N=>{if(I())return I().find(M=>M[$]==N[$])},re=N=>{var te;const A=D()&&D().length>0?N[D()[0].name]:N[t(g)],M={[$]:N[$],primaryDisplay:A};if(!E())((te=t(a)[0])==null?void 0:te[$])==N[$]?o(a,[]):o(a,[M]);else{let ve=t(a).findIndex(Ie=>Ie[$]==N[$]);ve>-1?(t(a).splice(ve,1),o(a,t(a))):(t(a).push(M),o(a,t(a)))}T("change",t(a))},G=N=>{o(J,N.target.value),N.target.value?o(ye,[{field:t(g),type:"string",operator:"fuzzy",value:N.target.value,valueType:"Value"}]):o(ye,void 0),o(ce,de)},ae=()=>{var N;(N=n())!=null&&N.loading||!t(pe)||o(ce,t(ce)+100)},z=N=>{const A=N.target,M=A.scrollTop,te=A.scrollHeight,ve=A.clientHeight;M+ve>=te-50&&ae()},ge=N=>{if(N.key=="ArrowDown")N.preventDefault(),o(R,t(R)+1),t(R)>t(c)-1&&o(R,0);else if(N.key=="ArrowUp")N.preventDefault(),o(R,t(R)-1),t(R)<0&&o(R,t(c)-1);else if(N.key=="Enter"&&t(R)>-1){const A=t(R)<t(a).length?t(a)[t(R)]:n().rows[t(R)-t(a).length];re(A)}(N.key=="Tab"||N.key=="Escape")&&T("close")},O={focus:()=>{var N;(N=t(H))==null||N.focus()},hasFocus:()=>document.activeElement===t(H),setSearch:N=>{var A;o(J,N),(A=t(H))==null||A.focus()},focusList:()=>{var N;(N=t(fe))==null||N.focus()}};x(()=>v(I()),()=>{o(a,Array.isArray(I())?I():[])}),x(()=>v(C()),()=>{o(l,y.buildQuery(C()))}),x(()=>t(ye),()=>{o(d,t(ye)?{search:y.buildQuery(t(ye))}:{})}),x(()=>(t(l),t(d)),()=>{o(u,Z(t(l),t(d)))}),x(()=>t(l),()=>{sn(o(ke,S({API:_,datasource:{type:"table",tableId:U},options:{query:t(l),limit:de}})),"$optionsFetch",i)}),x(()=>(t(ke),t(u),t(ce)),()=>{var N;(N=t(ke))==null||N.update({query:t(u),limit:t(ce)})}),x(()=>n(),()=>{var N,A;o(g,((A=(N=n())==null?void 0:N.definition)==null?void 0:A.primaryDisplay)||"id")}),x(()=>(n(),t(ce)),()=>{var N;(N=n())!=null&&N.loaded&&o(pe,n().rows.length>=t(ce))}),x(()=>(t(a),n()),()=>{var N,A;o(c,t(a).length+(((A=(N=n())==null?void 0:N.rows)==null?void 0:A.length)||0))}),x(()=>(t(R),t(c)),()=>{o(R,Math.min(t(R),t(c)-1))}),x(()=>(t(R),t(De),Se.tick),()=>{t(R)>=0&&t(De)[t(R)]&&Se.tick().then(()=>{t(De)[t(R)].scrollIntoView({block:"nearest"})})}),x(()=>v(D()),()=>{o(p,D().length)}),Mt();var q={api:O};Dt();var ne=cw(),se=j(ne),ee=j(se);let me;var Ne=Ee(ee,2);let Ue;vt(Ne,N=>o(H,N),()=>t(H));var he=Ee(se,2),ue=j(he);let Q;var B=j(ue);{var X=N=>{var A=rw(),M=j(A),te=j(M);At(te,1,D,Ft,(Fe,Be)=>{var Le=K1(),Te=j(Le);Ce(()=>Xe(Te,(t(Be),b(()=>t(Be).displayName)))),w(Fe,Le)});var ve=Ee(M,2);At(ve,3,()=>t(a),Fe=>Fe[$],(Fe,Be,Le)=>{var Te=Q1();let qe;var Ze=j(Te);At(Ze,1,D,Ft,(Je,nt)=>{var at=X1(),ct=j(at);Ce(()=>Xe(ct,(t(Be),t(nt),b(()=>t(Be)[t(nt).name]||"")))),w(Je,at)}),vt(Te,(Je,nt)=>zt(De,t(De)[nt]=Je),Je=>{var nt;return(nt=t(De))==null?void 0:nt[Je]},()=>[t(Le)]),Ce(Je=>qe=Me(Te,1,"data-row svelte-fjnh72",null,qe,Je),[()=>({selected:Y(t(Be)),highlighted:t(R)==t(Le)})]),W("mouseenter",Te,()=>o(R,t(Le))),W("mouseleave",Te,()=>o(R,-1)),W("mousedown",Te,er(()=>re(t(Be)))),w(Fe,Te)});var Ie=Ee(ve,2);{var Pe=Fe=>{var Be=$e(),Le=Ge(Be);ea(Le,()=>(t(a),b(()=>t(a).length)),Te=>{var qe=$e(),Ze=Ge(qe);At(Ze,3,()=>(n(),b(()=>n().rows)),Je=>Je[$],(Je,nt,at)=>{var ct=$e(),it=Ge(ct);{var _e=We=>{var Ke=J1();let Ae;var je=j(Ke);At(je,1,D,Ft,(et,lt)=>{var mt=Z1(),Ot=j(mt);Ce(()=>Xe(Ot,(t(nt),t(lt),b(()=>t(nt)[t(lt).name]||"")))),w(et,mt)}),vt(Ke,(et,lt)=>zt(De,t(De)[lt+t(a).length]=et),et=>{var lt;return(lt=t(De))==null?void 0:lt[et+t(a).length]},()=>[t(at)]),Ce(()=>Ae=Me(Ke,1,"data-row svelte-fjnh72",null,Ae,{highlighted:t(R)==t(at)+t(a).length})),W("mouseenter",Ke,()=>o(R,t(at)+t(a).length)),W("mouseleave",Ke,()=>o(R,-1)),W("mousedown",Ke,er(()=>re(t(nt)))),w(We,Ke)};le(it,We=>{t(nt),b(()=>!Y(t(nt)))&&We(_e)})}w(Je,ct)}),w(Te,qe)}),w(Fe,Be)};le(Ie,Fe=>{n(),b(()=>n()&&n().loaded)&&Fe(Pe)})}var Re=Ee(Ie,2);{var oe=Fe=>{var Be=$1();w(Fe,Be)},Oe=Fe=>{var Be=$e(),Le=Ge(Be);{var Te=Ze=>{var Je=ew();w(Ze,Je)},qe=Ze=>{var Je=$e(),nt=Ge(Je);{var at=ct=>{var it=tw();w(ct,it)};le(nt,ct=>{n(),b(()=>{var it,_e,We;return!((it=n())!=null&&it.loading)&&((_e=n())==null?void 0:_e.loaded)&&!((We=n().rows)!=null&&We.length)})&&ct(at)},!0)}w(Ze,Je)};le(Le,Ze=>{n(),b(()=>{var Je;return((Je=n())==null?void 0:Je.loading)&&!n().loaded})?Ze(Te):Ze(qe,!1)},!0)}w(Fe,Be)};le(Re,Fe=>{n(),b(()=>{var Be;return(Be=n())==null?void 0:Be.loading})?Fe(oe):Fe(Oe,!1)})}Ce(()=>Ye(A,`--num-cols: ${t(p)??""}`)),W("scroll",A,z),w(N,A)},K=N=>{var A=uw(),M=j(A);At(M,3,()=>t(a),Pe=>Pe[$],(Pe,Re,oe)=>{var Oe=nw();let Fe;var Be=j(Oe);vt(Oe,(Le,Te)=>zt(De,t(De)[Te]=Le),Le=>{var Te;return(Te=t(De))==null?void 0:Te[Le]},()=>[t(oe)]),Ce(Le=>{Fe=Me(Oe,1,"option svelte-fjnh72",null,Fe,Le),Xe(Be,`${t(Re),t(g),b(()=>t(Re).primaryDisplay||t(Re)[t(g)])??""} `)},[()=>({selected:Y(t(Re)),highlighted:t(R)==t(oe)})]),W("mouseenter",Oe,()=>o(R,t(oe))),W("mouseleave",Oe,()=>o(R,-1)),W("mousedown",Oe,er(dr(()=>re(t(Re))))),w(Pe,Oe)});var te=Ee(M,2);{var ve=Pe=>{var Re=sw(),oe=Ge(Re);ea(oe,()=>(t(a),b(()=>t(a).length)),Be=>{var Le=$e(),Te=Ge(Le);At(Te,3,()=>(n(),b(()=>n().rows)),qe=>qe[$],(qe,Ze,Je)=>{var nt=$e(),at=Ge(nt);{var ct=it=>{var _e=iw();let We;var Ke=j(_e);vt(_e,(Ae,je)=>zt(De,t(De)[je+t(a).length]=Ae),Ae=>{var je;return(je=t(De))==null?void 0:je[Ae+t(a).length]},()=>[t(Je)]),Ce(()=>{We=Me(_e,1,"option svelte-fjnh72",null,We,{highlighted:t(R)==t(Je)+t(a).length}),Xe(Ke,`${t(Ze),t(g),b(()=>t(Ze).primaryDisplay||t(Ze)[t(g)])??""} `)}),W("mouseenter",_e,()=>o(R,t(Je)+t(a).length)),W("mouseleave",_e,()=>o(R,-1)),W("mousedown",_e,er(()=>re(t(Ze)))),w(it,_e)};le(at,it=>{t(Ze),b(()=>!Y(t(Ze)))&&it(ct)})}w(qe,nt)}),w(Be,Le)});var Oe=Ee(oe,2);{var Fe=Be=>{var Le=aw();w(Be,Le)};le(Oe,Be=>{n(),b(()=>{var Le;return(Le=n())==null?void 0:Le.loading})&&Be(Fe)})}w(Pe,Re)},Ie=Pe=>{var Re=$e(),oe=Ge(Re);{var Oe=Be=>{var Le=ow();w(Be,Le)},Fe=Be=>{var Le=lw();w(Be,Le)};le(oe,Be=>{n(),b(()=>{var Le;return((Le=n())==null?void 0:Le.loading)&&!n().loaded})?Be(Oe):Be(Fe,!1)},!0)}w(Pe,Re)};le(te,Pe=>{n(),b(()=>n()&&n().loaded)?Pe(ve):Pe(Ie,!1)})}w(N,A)};le(B,N=>{v(D()),b(()=>D()&&D().length>1)?N(X):N(K,!1)})}vt(ue,N=>o(fe,N),()=>t(fe)),Ce(()=>{Me(ee,1,Sn((n(),t(H),b(()=>{var N,A;return(N=n())!=null&&N.loading&&we?"ri-loader-2-line":(A=t(H))!=null&&A.value?"ri-filter-fill":"ri-search-line"}))),"svelte-fjnh72"),me=Ye(ee,"",me,{color:t(J)?"var(--spectrum-global-color-blue-400)":"var(--spectrum-global-color-gray-700)"}),Ue=Me(Ne,1,"search svelte-fjnh72",null,Ue,{placeholder:!t(J)}),Vt(Ne,"placeholder",(n(),b(()=>{var N,A,M;return(N=n())!=null&&N.loading&&!((M=(A=n())==null?void 0:A.rows)!=null&&M.length)&&we?"Loading...":"Search"}))),Q=Me(ue,1,"list svelte-fjnh72",null,Q,{"table-mode":D()&&D().length>0})}),W("input",Ne,G),W("keydown",Ne,ge),W("blur",Ne,()=>T("close")),W("scroll",ue,z),W("mousedown",he,er(()=>{})),w(e,ne),pr(r,"api",O);var V=Ct(q);return s(),V}var fw=F("<i></i>"),hw=F("<span> </span>"),gw=F('<div class="item"><span> </span></div>'),vw=F('<span class="count"> </span>'),pw=F("<div><!> <!></div>"),mw=F("<span><!> </span>"),_w=F('<i class="ph ph-caret-down control-icon"></i>'),bw=F("<div><!> <div><!></div> <!></div> <!>",1);function yw(e,r){St(r,!1);const n=()=>He(ke(),"$cellState",s),i=()=>He(ye,"$editorState",s),[s,a]=qt(),l=h(),d=h(),u=h(),g=h(),c=h(),p=h(),_=h(),S=h(),y=h(),T=h(),I=Se.createEventDispatcher(),{API:k}=Se.getContext("sdk");let C=m(r,"value",8),D=m(r,"fieldSchema",12),E=m(r,"cellOptions",8),U=m(r,"simpleView",12,!0),$=m(r,"filter",24,()=>[]),R=m(r,"limit",8,100),H=m(r,"multi",8,!1),J=m(r,"ownId",12),de=h(JSON.stringify(C())),fe=h(),we=h(),pe,De=h(),ke=m(r,"cellState",24,()=>or(E().initialState??"View",{"*":{goTo(Q){return Q},reset(Q){o(c,void 0)}},View:{_enter(){},focus(){if(!E().readonly&&!E().disabled)return"Editing"}},Editing:{_enter(){o(de,JSON.stringify(t(c))),ye.open(),I("enteredit")},_exit(){ye.close(),I("exitedit")},focusout(Q){var B;(B=t(we))!=null&&B.contains(Q==null?void 0:Q.relatedTarget)||this.submit()},clear(){o(c,[])},submit(){return t(_)&&I("change",t(c)),"View"},cancel(){return"View"}}}));const ye=or("Closed",{Open:{close(){return"Closed"},toggle(){return"Closed"}},Closed:{open(){return"Open"},toggle(){return"Open"}}}),ce=Q=>{var B,X,K,V,ie;Q.key=="Escape"?i()=="Open"?ye.close():ke().focusout(Q):Q.keyCode==32&&n()=="Editing"?ye.toggle():Q.key=="Tab"&&i()=="Open"?ke().focusout(Q):i()=="Open"&&(Q.key==="ArrowUp"?(Q.preventDefault(),(B=t(De))==null||B.focusPrev(),(X=t(De))==null||X.scrollIntoView()):Q.key==="ArrowDown"?(Q.preventDefault(),(K=t(De))==null||K.focusNext(),(V=t(De))==null||V.scrollIntoView()):Q.key.length==1&&Q.key.match(/\S/)&&((ie=t(De))==null||ie.setSearch(Q.key)))},Z=Q=>{o(c,Q.detail),H()||ye.close()},Y=Q=>{if(Array.isArray(Q)&&H()){const B=t(c)?t(c).map(K=>K[t(l)]):[],X=Q.filter(K=>!B.includes(K));return X.length>0&&(k.fetchTableDefinition(t(d)).then(K=>{D(D().primaryDisplay=K.primaryDisplay,!0)}),Promise.all(X.map(K=>k.fetchRow(t(d),K,!0))).then(K=>{const V=K.map(ie=>({[t(l)]:ie[t(l)],primaryDisplay:D().primaryDisplay?ie[D().primaryDisplay]:ie.name||ie.id}));o(c,[...t(c)||[],...V])}).catch(K=>{})),t(c)||[]}else return Q&&!Array.isArray(Q)?(t(c)&&t(c).find(X=>X[t(l)]===Q)||(k.fetchTableDefinition(t(d)).then(X=>{D(D().primaryDisplay=X.primaryDisplay,!0)}),k.fetchRow(t(d),Q,!0).then(X=>{o(c,[{[t(l)]:X[t(l)],primaryDisplay:D().primaryDisplay?X[D().primaryDisplay]:X.name||X.id}])}).catch(X=>{o(c,[])})),t(c)||[]):H()?C()&&Array.isArray(C())?C():[]:C()?[C()]:[]};x(()=>v(D()),()=>{var Q;o(l,((Q=D())==null?void 0:Q.relatedField)||"id")}),x(()=>v(D()),()=>{var Q;o(d,(Q=D())==null?void 0:Q.tableId)}),x(()=>v(D()),()=>{var Q;o(u,((Q=D())==null?void 0:Q.relatedColumns)||[])}),x(()=>v(E()),()=>{o(g,E().relViewMode=="pills")}),x(()=>(v(J()),v(E())),()=>{var Q;J(J()||((Q=E())==null?void 0:Q.ownId))}),x(()=>v(C()),()=>{o(c,Y(C()))}),x(()=>n(),()=>{o(p,n()=="Editing")}),x(()=>(t(p),t(de),t(c)),()=>{o(_,t(p)&&t(de)!=JSON.stringify(t(c)))}),x(()=>v(E()),()=>{U(E().relViewMode=="text")}),x(()=>v(E()),()=>{o(S,E().role=="inlineInput")}),x(()=>v(E()),()=>{o(y,E().placeholder||"")}),x(()=>v(E()),()=>{o(T,E().readonly||E().disabled)}),Mt(),Dt();var re=bw(),G=Ge(re);let ae,z;var ge=j(G);{var O=Q=>{var B=fw();Ce(()=>Me(B,1,(v(E()),b(()=>E().icon+" field-icon")))),w(Q,B)};le(ge,Q=>{v(E()),b(()=>{var B;return(B=E())==null?void 0:B.icon})&&Q(O)})}var q=Ee(ge,2);let ne;var se=j(q);{var ee=Q=>{var B=hw(),X=j(B);Ce(()=>Xe(X,t(y))),w(Q,B)},me=Q=>{var B=$e(),X=Ge(B);{var K=ie=>{var N=pw();let A;var M=j(N);At(M,1,()=>t(c),Ft,(Ie,Pe,Re)=>{var oe=$e(),Oe=Ge(oe);{var Fe=Be=>{var Le=gw(),Te=j(Le),qe=j(Te);Ce(()=>Xe(qe,(t(Pe),b(()=>t(Pe).primaryDisplay)))),w(Be,Le)};le(Oe,Be=>{Re<5&&Be(Fe)})}w(Ie,oe)});var te=Ee(M,2);{var ve=Ie=>{var Pe=vw(),Re=j(Pe);Ce(()=>Xe(Re,`(+ ${t(c),b(()=>t(c).length-5)??""})`)),w(Ie,Pe)};le(te,Ie=>{t(c),b(()=>t(c).length>5)&&Ie(ve)})}Ce(()=>A=Me(N,1,"items",null,A,{pills:t(g),withCount:t(c).length>5,inEdit:t(p)})),w(ie,N)},V=ie=>{var N=mw(),A=j(N);{var M=ve=>{var Ie=Mi();Ce(()=>Xe(Ie,`(${t(c),b(()=>t(c).length)??""})`)),w(ve,Ie)};le(A,ve=>{v(E()),t(c),b(()=>E().role=="formInput"&&t(c).length>1)&&ve(M)})}var te=Ee(A);Ce(ve=>Xe(te,` ${ve??""}`),[()=>(t(c),b(()=>t(c).map(ve=>ve.primaryDisplay).join(", ")))]),w(ie,N)};le(X,ie=>{t(g)?ie(K):ie(V,!1)},!0)}w(Q,B)};le(se,Q=>{t(c),b(()=>{var B;return((B=t(c))==null?void 0:B.length)<1})?Q(ee):Q(me,!1)})}var Ne=Ee(q,2);{var Ue=Q=>{var B=_w();w(Q,B)};le(Ne,Q=>{t(T),v(E()),t(p),b(()=>!t(T)&&(E().role=="formInput"||t(p)))&&Q(Ue)})}vt(G,Q=>o(fe,Q),()=>t(fe));var he=Ee(G,2);{var ue=Q=>{{let B=Pt(()=>i()=="Open");Qr(Q,{get anchor(){return t(fe)},useAnchorWidth:!0,get open(){return t(B)},get popup(){return t(we)},set popup(X){o(we,X)},children:(X,K)=>{var V=$e(),ie=Ge(V);{var N=M=>{{let te=Pt(()=>$()??[]);Io(M,{get fieldSchema(){return D()},get filter(){return t(te)},get search(){return pe},get limit(){return R()},get joinColumn(){return v(E()),b(()=>E().joinColumn)},get value(){return t(c)},get ownId(){return J()},get multi(){return H()},$$events:{change:Z}})}},A=M=>{dw(M,{get fieldSchema(){return D()},get filter(){return $()},get multi(){return H()},get value(){return t(c)},get api(){return t(De)},set api(te){o(De,te)},$$events:{change:Z,close:()=>{ke().focusout(null)}},$$legacy:!0})};le(ie,M=>{v(D()),b(()=>D().recursiveTable)?M(N):M(A,!1)})}w(X,V)},$$slots:{default:!0},$$legacy:!0})}};le(he,Q=>{t(p)&&Q(ue)})}Ce(()=>{var Q;ae=Me(G,1,"superCell",null,ae,{isDirty:t(_)&&E().showDirty,inEdit:t(p),inline:t(S),tableCell:E().role=="tableCell",formInput:E().role=="formInput",disabled:E().disabled,readonly:t(T),error:E().error}),Vt(G,"tabindex",(v(E()),b(()=>{var B;return(B=E())!=null&&B.disabled?-1:0}))),z=Ye(G,"",z,{color:(v(E()),b(()=>E().color)),background:(v(E()),b(()=>E().background)),"font-weight":(v(E()),b(()=>E().fontWeight))}),ne=Me(q,1,"value",null,ne,{placeholder:((Q=t(c))==null?void 0:Q.length)<1})}),W("mousedown",G,function(...Q){var B;(B=ye.toggle)==null||B.apply(this,Q)}),W("focusin",G,function(...Q){var B;(B=ke().focus)==null||B.apply(this,Q)}),W("keydown",G,us(ce)),W("focusout",G,function(...Q){var B;(B=ke().focusout)==null||B.apply(this,Q)}),w(e,re),Ct(),a()}var ww=F("<i></i>"),Ew=F('<span class="svelte-tuph9y"> </span>'),Sw=F("<i></i>"),Cw=F('<div><!> <span class="svelte-tuph9y"> </span></div>'),Aw=F("<div></div>"),Tw=F('<i class="ri-close-line clearIcon svelte-tuph9y"></i>'),kw=F('<i class="ph ph-caret-down control-icon svelte-tuph9y"></i>'),Dw=F("<div><!> <div><!> <!></div> <!></div> <!>",1);function xw(e,r){St(r,!1);const n=()=>He(De(),"$cellState",s),i=()=>He(ke,"$editorState",s),[s,a]=qt(),l=h(),d=h(),u=h(),g=h(),c=h(),p=h(),_=h(),S=h(),y=h(),T=h(),I=h(),k=Se.createEventDispatcher();let C=m(r,"value",8),D=m(r,"fieldSchema",8),E=m(r,"cellOptions",8),U=m(r,"simpleView",12,!0),$=m(r,"filter",24,()=>[]),R=m(r,"limit",8,100),H=h(JSON.stringify(C())),J=h(),de=h(),fe=h(),we,pe,De=m(r,"cellState",24,()=>or(E().initialState??"View",{"*":{goTo(X){return X}},View:{_enter(){o(fe,!1)},focus(){if(!E().readonly&&!E().disabled)return"Editing"}},Editing:{_enter(){o(H,JSON.stringify(t(g))),ke.open(),k("enteredit")},_exit(){ke.close(),k("exitedit")},checkFocus(){return we()},focusout(X){var K;(K=t(de))!=null&&K.contains(X.relatedTarget)||this.submit()},popupfocusout(X){},clear(){o(g,[])},submit(){return t(p)&&k("change",t(I)&&t(g)?t(g)[0]:t(g)),ke.close(),"View"},cancel(){return ke.close(),"View"}}}));const ke=or("Closed",{Open:{close(){return"Closed"},toggle(){return"Closed"}},Closed:{open(){return"Open"},toggle(){return"Open"}}}),ye=X=>{X.keyCode==32&&n()=="Editing"?(X.preventDefault(),X.stopPropagation(),ke.toggle()):X.key!="Tab"&&o(fe,!0)},ce=X=>{o(g,X.detail);let K=t(I)?t(g)[0]??{}:t(g);t(S)&&k("change",K),t(T)&&ke.close()},Z=X=>D().relationshipType=="self"&&X?Y(X):t(d)?C()?[...C()]:[]:C()?[C()]:[],Y=X=>{let K;try{K=JSON.parse(X)}catch{K=void 0}return K};x(()=>v(E()),()=>{o(l,E().relViewMode=="pills")}),x(()=>v(D()),()=>{var X,K;o(d,!((K=(X=D())==null?void 0:X.type)!=null&&K.includes("_single")))}),x(()=>v(D()),()=>{var X,K;o(u,(K=(X=D())==null?void 0:X.type)==null?void 0:K.includes("bb_reference"))}),x(()=>v(C()),()=>{o(g,Z(C()))}),x(()=>n(),()=>{o(c,n()=="Editing")}),x(()=>(t(c),t(H),t(g)),()=>{o(p,t(c)&&t(H)!=JSON.stringify(t(g)))}),x(()=>v(E()),()=>{U(E().relViewMode=="text")}),x(()=>v(E()),()=>{o(_,E().role=="inlineInput")}),x(()=>v(E()),()=>{o(S,E().controlType=="expanded")}),x(()=>(v(E()),t(g),t(c)),()=>{var X;o(y,E().controlType=="expanded"&&(((X=t(g))==null?void 0:X.length)>1||t(c)))}),x(()=>(v(D()),t(d)),()=>{var X,K,V;o(T,((X=D())==null?void 0:X.relationshipType)=="one-to-many"||((K=D())==null?void 0:K.relationshipType)=="many-to-one"||((V=D())==null?void 0:V.relationshipType)=="self"||!t(d))}),x(()=>(t(u),t(d)),()=>{o(I,t(u)&&!t(d))}),Mt(),Dt();var re=Dw(),G=Ge(re);let ae;Vt(G,"tabindex","0");let z;var ge=j(G);{var O=X=>{var K=ww();Ce(()=>Me(K,1,(v(E()),b(()=>E().icon+" icon")),"svelte-tuph9y")),w(X,K)};le(ge,X=>{v(E()),b(()=>{var K;return(K=E())==null?void 0:K.icon})&&X(O)})}var q=Ee(ge,2);let ne;var se=j(q);{var ee=X=>{var K=Ew(),V=j(K);Ce(()=>Xe(V,(v(E()),b(()=>E().placeholder??null)))),w(X,K)},me=X=>{var K=$e(),V=Ge(K);{var ie=N=>{var A=Aw();let M;At(A,5,()=>t(g),Ft,(te,ve)=>{var Ie=Cw();let Pe;var Re=j(Ie);{var oe=Be=>{var Le=Sw();Ce(()=>Me(Le,1,Sn((v(D()),b(()=>D().type=="link"?"ri-links-line":"ri-user-line"))),"svelte-tuph9y")),w(Be,Le)};le(Re,Be=>{U()||Be(oe)})}var Oe=Ee(Re,2),Fe=j(Oe);Ce(()=>{Pe=Me(Ie,1,"item svelte-tuph9y",null,Pe,{"rel-bb-reference":!U()&&D().type!="link"}),Xe(Fe,(t(ve),b(()=>t(ve).primaryDisplay)))}),w(te,Ie)}),Ce(()=>M=Me(A,1,"items svelte-tuph9y",null,M,{pills:t(l)})),w(N,A)};le(V,N=>{t(g),b(()=>{var A;return((A=t(g))==null?void 0:A.length)>0})&&N(ie)},!0)}w(X,K)};le(se,X=>{t(g),b(()=>{var K;return((K=t(g))==null?void 0:K.length)<1})?X(ee):X(me,!1)})}var Ne=Ee(se,2);{var Ue=X=>{var K=Tw();W("mousedown",K,er(function(...V){var ie;(ie=De().clear)==null||ie.apply(this,V)})),w(X,K)};le(Ne,X=>{t(c),t(g),b(()=>{var K;return t(c)&&((K=t(g))==null?void 0:K.length)})&&X(Ue)})}var he=Ee(q,2);{var ue=X=>{var K=kw();w(X,K)};le(he,X=>{v(E()),t(c),b(()=>!E().readonly&&(E().role=="formInput"||t(c)))&&X(ue)})}vt(G,X=>o(J,X),()=>t(J));var Q=Ee(G,2);{var B=X=>{{let K=Pt(()=>i()=="Open");Qr(X,{get anchor(){return t(J)},useAnchorWidth:!0,get open(){return t(K)},get popup(){return t(de)},set popup(V){o(de,V)},$$events:{close(...V){var ie;(ie=De().focusout)==null||ie.apply(this,V)}},children:(V,ie)=>{Io(V,{get fieldSchema(){return D()},get filter(){return $()},get search(){return t(fe)},get searchTerm(){return pe},get limit(){return R()},get joinColumn(){return v(E()),b(()=>E().joinColumn)},get value(){return t(g)},multi:!1,$$events:{change:ce,focusout:N=>setTimeout(De().focusout,20,N)}})},$$slots:{default:!0},$$legacy:!0})}};le(Q,X=>{t(c)&&X(B)})}Ce(()=>{var X,K;ae=Me(G,1,"superCell svelte-tuph9y",null,ae,{inEdit:t(c),isDirty:t(p)&&E().showDirty,focused:n()=="Editing",inline:t(_),multirow:t(y),tableCell:E().role=="tableCell",formInput:E().role=="formInput",disabled:E().disabled,readonly:E().readonly,error:E().error}),z=Ye(G,"",z,{color:(v(E()),b(()=>E().color)),background:(v(E()),b(()=>E().background)),"font-weight":(v(E()),b(()=>E().fontWeight))}),ne=Me(q,1,"value svelte-tuph9y",null,ne,{"with-icon":(X=E())==null?void 0:X.icon,placeholder:((K=t(g))==null?void 0:K.length)<1})}),W("keydown",G,ye),W("focusin",G,function(...X){var K;(K=De().focus)==null||K.apply(this,X)}),W("focusout",G,function(...X){var K;(K=De().focusout)==null||K.apply(this,X)}),W("mousedown",G,function(...X){var K;(K=ke.toggle)==null||K.apply(this,X)}),w(e,re),Ct(),a()}var Ow=F('<div class="skeleton svelte-in3ggf"><div class="children svelte-in3ggf"></div></div>');function ph(e,r){let n=m(r,"active",8,!0),i=m(r,"minHeight",8,"2rem");var s=$e(),a=Ge(s);{var l=u=>{var g=Ow();let c;Ce(()=>c=Ye(g,"",c,{"min-height":i()})),w(u,g)},d=u=>{var g=$e(),c=Ge(g);vr(c,r,"default",{},null),w(u,g)};le(a,u=>{n()?u(l):u(d,!1)})}w(e,s)}var Iw=F("<div> </div>"),Rw=F('<div class="buttons svelte-17k8iag"></div>'),Pw=F("<div><i></i> </div>"),Mw=F("<div></div>"),Nw=F('<div class="spectrum-Switch spectrum-Switch--emphasized svelte-17k8iag"><input type="checkbox" class="spectrum-Switch-input"/> <span class="spectrum-Switch-switch"></span></div>'),Lw=F('<div class="switch toggleAll svelte-17k8iag"><div class="text title svelte-17k8iag"> </div> <!></div>'),Fw=F('<div><i></i> <div class="text svelte-17k8iag"> </div> <div class="spectrum-Switch spectrum-Switch--emphasized svelte-17k8iag"><input type="checkbox" class="spectrum-Switch-input"/> <span class="spectrum-Switch-switch small"></span></div></div>'),Vw=F("<div><!> <!></div>"),Uw=F('<div class="option svelte-17k8iag"><span class="svelte-17k8iag"><i class="ri-close-line svelte-17k8iag"></i> No Options Found</span></div>'),Bw=F('<div><span class="svelte-17k8iag"><i class="ri-checkbox-blank-fill svelte-17k8iag"></i> </span></div>'),Hw=F('<div class="options svelte-17k8iag"><!></div>'),zw=F("<div><!></div> <!>",1);function jw(e,r){var Le;St(r,!1);const n=()=>He(ie,"$dataSourceStore",u),i=()=>He(t(R),"$fetch",u),s=()=>He(N(),"$cellState",u),a=()=>He(ne,"$options",u),l=()=>He(X,"$colors",u),d=()=>He(A,"$editorState",u),[u,g]=qt(),c=h(),p=h(),_=h(),S=h(),y=h(),T=h(),I=h(),k=h(),C=h(),D=h(),E=h(),U=h(),$=h(),R=h(),H=h(),J=h(),de=h(),fe=h(),we=h(),pe=h(),De=Se.createEventDispatcher(),{API:ke,QueryUtils:ye,fetchData:ce,memo:Z,derivedMemo:Y}=Se.getContext("sdk");let re=m(r,"cellOptions",8),G=m(r,"value",8),ae=m(r,"fieldSchema",8),z=m(r,"multi",8,!0),ge=m(r,"autofocus",8),O=m(r,"label",8),q=h(),ne=Z([]),se=h({}),ee={},me=h({}),Ne=h([]),Ue=h(-1),he,ue=h(),Q=h(!0),B=h(!1);const X=Y(ne,Te=>{let qe={};return re().optionsSource=="custom"||Te.forEach((Ze,Je)=>qe[Ze]=ee[Ze]??K[Je%14]),qe}),K=["hsla(0, 90%, 75%, 0.35)","hsla(25, 90%, 75%, 0.35)","hsla(50, 80%, 75%, 0.35)","hsla(75, 80%, 75%, 0.35)","hsla(100, 80%, 75%, 0.35)","hsla(125, 90%, 75%, 0.35)","hsla(150, 90%, 75%, 0.35)","hsla(175, 90%, 75%, 0.35)","hsla(200, 90%, 75%, 0.35)","hsla(225, 90%, 75%, 0.35)","hsla(250, 90%, 75%, 0.35)","hsla(275, 90%, 75%, 0.35)","hsla(300, 90%, 75%, 0.35)","hsla(325, 90%, 75%, 0.35)","hsla(350, 90%, 75%, 0.35)"];let V=h(JSON.stringify(Array.isArray(G())?G():G()?[G()]:[]));const ie=Z(((Le=re())==null?void 0:Le.datasource)??{});let N=m(r,"cellState",24,()=>or("Loading",{"*":{goTo(Te){return Te},refresh(){return Qe(ne,[]),"Loading"},loadSchemaOptions(){var Te,qe,Ze;ee=((Te=ae())==null?void 0:Te.optionColors)||{},Qe(ne,((Ze=(qe=ae())==null?void 0:qe.constraints)==null?void 0:Ze.inclusion)||[])},loadDataOptions(Te){Te&&Te.length&&Te.forEach(qe=>{var Ze;a().push((Ze=qe[t(S)])==null?void 0:Ze.toString()),zt(se,t(se)[qe[t(S)]]=qe[t(_)||i().definition.primaryDisplay]),ee[qe[t(S)]]=qe[t(T)],zt(me,t(me)[qe[t(S)]]=qe[t(y)])}),Qe(ne,a())},loadCustomOptions(){var Te;(Te=t(I))!=null&&Te.length&&t(I).forEach(qe=>{a().push(qe.value),zt(se,t(se)[qe.value]=qe.label)}),Qe(ne,a())},clearFilters(){o(Ne,a())}},Loading:{_enter(){var Te;(re().optionsSource!="data"||(Te=i())!=null&&Te.loaded)&&this.goTo.debounce(10,re().initialState||"View")},_exit(){var Te;t(p)=="custom"?this.loadCustomOptions():t(p)=="data"?this.loadDataOptions((Te=i())==null?void 0:Te.rows):this.loadSchemaOptions(),o(Ne,a())},syncFetch(){var Te;if((Te=i())!=null&&Te.loaded)return re().initialState||"View"}},View:{_enter(){},focus(Te){if(!re().readonly&&!re().disabled)return"Editing"}},Editing:{_enter(){o(V,JSON.stringify(Array.isArray(G())?G():G()?[G()]:[])),De("enteredit")},_exit(){A.close(),De("exitedit")},handleKeyboard(Te){},focusout(Te){var qe;if(A.close(),!((qe=t(q))!=null&&qe.contains(Te.relatedTarget))&&t(Q))return this.submit(),"View"},submit(){t(de)&&!re().debounce&&(z()?De("change",t(J)):De("change",t(J)[0]))},cancel(){return"View"}}})),A=or("Closed",{"*":{toggleOption(Te){var Je;let qe=a()[Te],Ze=t(J).indexOf(qe);z()&&Ze>-1?(t(J).splice(Ze,1),o(J,[...t(J)])):z()?o(J,[...t(J),qe]):t(J)[0]==qe?zt(J,t(J).length=0):zt(J,t(J)[0]=qe),(re().debounce||t(pe))&&(clearTimeout(he),he=setTimeout(()=>{De("change",z()?t(J):t(J)[0])},re().debounce??0)),(!z()||t(Ne).length==t(J).length)&&((Je=t(q))==null||Je.focus())},toggleAll(){t(B)?o(J,[]):o(J,[...t(Ne)]),re().debounce&&(clearTimeout(he),he=setTimeout(()=>{De("change",z()?t(J):t(J)[0])},re().debounce??0))},handleKeyboard(Te){Te.keyCode==32&&A.toggle(),Te.key=="Escape"&&this.cancel(),Te.key=="Enter"&&(z()?(this.toggleOption(t(Ue),Te.preventDefault()),this.close()):this.toggleOption(t(Ue))),Te.key=="ArrowDown"&&this.highlightNext(Te.preventDefault(),Te.stopPropagation()),Te.key=="ArrowUp"&&this.highlightPrevious(Te.preventDefault(),Te.stopPropagation()),Te.key=="Escape"&&this.close(Te.stopPropagation())},highlightNext(){o(Ue,t(Ue)+1),t(Ue)>a().length-1&&o(Ue,0)},highlightPrevious(){o(Ue,t(Ue)-1),t(Ue)<0&&o(Ue,a().length-1)}},Open:{_enter(){o(Ue,-1),this.refocus.debounce(10)},_exit(){},filterOptions(Te){Te&&Te.target.value!=""?o(Ne,a().filter(qe=>qe==null?void 0:qe.startsWith(Te.target.value))):o(Ne,a())},close(){return"Closed"},toggle(){return"Closed"}},Closed:{toggle(){return"Open"},open(){return"Open"},filterOptions(Te){this.open(),this.filterOptions(Te)},handleKeyboard(Te){!re().autocomplete&&t(c)=="select"?(Te.keyCode==32&&(Te.preventDefault(),Te.stopPropagation(),this.toggle()),(Te.key=="Backspace"||Te.key=="Delete")&&(Te.stopPropagation(),o(J,[]),De("change",t(J)))):t(c)!="select"&&((Te.keyCode==32||Te.key=="Enter")&&this.toggleOption(t(Ue),Te.preventDefault()),Te.key=="ArrowDown"&&this.highlightNext(Te.preventDefault(),Te.stopPropagation()),Te.key=="ArrowUp"&&this.highlightPrevious(Te.preventDefault(),Te.stopPropagation()),Te.key=="Escape"&&this.close(Te.stopPropagation()))}}});const M=Te=>ce({API:ke,datasource:Te,options:{query:ye.buildQuery(re().filter),sortColumn:re().sortColumn,sortOrder:re().sortOrder,limit:re().limit||1e3}});Se.onMount(()=>{ge()&&setTimeout(()=>{N().focus()},30)}),x(()=>(t(c),t(p),t(_),t(S),t(y),t(T),t(I),t(k),t(C),t(D),t(E),t(U),t($),v(re())),()=>{(Te=>{o(c,Te.controlType),o(p,Te.optionsSource),o(_,Te.labelColumn),o(S,Te.valueColumn),o(y,Te.iconColumn),o(T,Te.colorColumn),o(I,Te.customOptions),o(k,Te.role),o(C,Te.readonly),o(D,Te.disabled),o(E,Te.error),o(U,Te.color),o($,Te.background)})(re())}),x(()=>v(re()),()=>{ie.set(re().datasource)}),x(()=>(t(p),n()),()=>{sn(o(R,t(p)=="data"?M(n()):Z({loaded:!0})),"$fetch",u)}),x(()=>v(G()),()=>{o(J,Array.isArray(G())?G():G()?[G()]:[])}),x(()=>(t(Ne),t(J)),()=>{o(H,t(Ne).length==t(J).length&&t(Ne).length>0)}),x(()=>(v(N()),v(ae()),t(p),t(_),t(S),t(y),t(T),n()),()=>{N().refresh(ae(),t(p),t(_),t(S),t(y),t(T),n())}),x(()=>(v(N()),i()),()=>{N().syncFetch(i())}),x(()=>s(),()=>{o(fe,s()=="Editing")}),x(()=>(t(fe),t(V),t(J)),()=>{o(de,t(fe)&&t(V)!==JSON.stringify(t(J)))}),x(()=>t(c),()=>{o(we,t(c)=="radio")}),x(()=>t(c),()=>{o(pe,t(c)=="buttons")}),x(()=>(t(Ne),t(J)),()=>{o(B,t(Ne).length==t(J).length)}),Mt(),Dt();var te=zw(),ve=Ge(te);let Ie,Pe;var Re=j(ve);{var oe=Te=>{ph(Te,{children:(qe,Ze)=>{var Je=Mi("Initializing ..");w(qe,Je)},$$slots:{default:!0}})},Oe=Te=>{var qe=$e(),Ze=Ge(qe);{var Je=at=>{{let ct=Pt(()=>(v(re()),b(()=>re().optionsViewMode!="text"))),it=Pt(()=>(v(re()),b(()=>re().readonly||re().disabled)));uh(at,{get items(){return t(J)},get itemsColors(){return l()},get itemsLabels(){return t(se)},get showColors(){return t(ct)},get reorderOnly(){return v(re()),b(()=>re().reorderOnly)},get placeholder(){return v(re()),b(()=>re().placeholder)},get readonly(){return t(it)},get editorState(){return A},get cellState(){return N()},get fullSelection(){return t(H)},get inactive(){return t(Q)},set inactive(_e){o(Q,_e)},$$events:{togglePicker(..._e){var We;(We=A.toggle)==null||We.apply(this,_e)},clear:()=>{o(J,[]),A.close(),t(q).focus()},change:_e=>{o(J,[..._e.detail]),t(q).focus()}},$$legacy:!0})}},nt=at=>{var ct=$e(),it=Ge(ct);{var _e=Ke=>{var Ae=$e(),je=Ge(Ae);{var et=mt=>{var Ot=Rw();At(Ot,5,a,Ft,(It,Lt,Tt)=>{var ut=Iw();let rt,st;var ft=j(ut);Ce(_t=>{rt=Me(ut,1,"button svelte-17k8iag",null,rt,_t),st=Ye(ut,"",st,{"--option-color":(l(),t(Lt),b(()=>l()[t(Lt)]))}),Xe(ft,(t(se),t(Lt),b(()=>t(se)[t(Lt)]||t(Lt))))},[()=>{var _t;return{selected:(_t=t(J))==null?void 0:_t.includes(t(Lt))}}]),W("click",ut,()=>A.toggleOption(Tt)),w(It,ut)}),w(mt,Ot)},lt=mt=>{var Ot=$e(),It=Ge(Ot);{var Lt=Tt=>{var ut=Mw();let rt;At(ut,5,a,Ft,(st,ft,_t)=>{var Bt=Pw();let Rt,Ht;var kt=j(Bt);let tr;var nr=Ee(kt);Ce((Wt,Zt)=>{Rt=Me(Bt,1,"radio svelte-17k8iag",null,Rt,Wt),Ht=Ye(Bt,"",Ht,{"--option-color":(l(),t(ft),b(()=>l()[t(ft)]))}),Me(kt,1,Zt,"svelte-17k8iag"),tr=Ye(kt,"",tr,{color:(l(),t(ft),b(()=>l()[t(ft)]))}),Xe(nr,` ${t(se),t(ft),b(()=>t(se)[t(ft)]||t(ft))??""}`)},[()=>{var Wt;return{selected:(Wt=t(J))==null?void 0:Wt.includes(t(ft)),focused:t(Ue)===_t}},()=>Sn((t(we),t(J),t(ft),b(()=>t(we)&&t(J).includes(t(ft))?"ph-fill ph-radio-button":t(we)?"ph ph-circle":t(J).includes(t(ft))?"ph-fill ph-check-square":"ph ph-square")))]),W("mousedown",Bt,Wt=>A.toggleOption(_t)),W("mouseenter",Bt,()=>o(Ue,_t)),w(st,Bt)}),Ce(()=>rt=Me(ut,1,"radios svelte-17k8iag",null,rt,{column:re().direction=="column"})),W("mouseleave",ut,()=>o(Ue,-1)),w(Tt,ut)};le(It,Tt=>{t(we)&&Tt(Lt)},!0)}w(mt,Ot)};le(je,mt=>{t(pe)?mt(et):mt(lt,!1)})}w(Ke,Ae)},We=Ke=>{var Ae=$e(),je=Ge(Ae);{var et=lt=>{var mt=Vw();let Ot;var It=j(mt);{var Lt=ut=>{var rt=Lw(),st=j(rt),ft=j(st),_t=Ee(st,2);{var Bt=Rt=>{var Ht=Nw(),kt=j(Ht);Ce(()=>Tc(kt,t(B))),w(Rt,Ht)};le(_t,Rt=>{v(re()),t(C),t(D),b(()=>re().toggleAll&&!(t(C)||t(D)))&&Rt(Bt)})}Ce(()=>Xe(ft,O()??"Toggle All")),W("click",rt,function(...Rt){var Ht;(Ht=re().toggleAll?A.toggleAll:void 0)==null||Ht.apply(this,Rt)}),W("mouseenter",rt,function(Rt){Yn.call(this,r,Rt)}),w(ut,rt)};le(It,ut=>{v(O()),v(re()),b(()=>O()||re().toggleAll)&&ut(Lt)})}var Tt=Ee(It,2);At(Tt,1,a,Ft,(ut,rt,st)=>{var ft=Fw();let _t,Bt;var Rt=j(ft),Ht=Ee(Rt,2),kt=j(Ht),tr=Ee(Ht,2),nr=j(tr);Vt(nr,"id",st),Ce((Wt,Zt)=>{_t=Me(ft,1,"switch svelte-17k8iag",null,_t,Wt),Bt=Ye(ft,"",Bt,{"--option-color":(l(),t(rt),b(()=>l()[t(rt)]))}),Me(Rt,1,Sn((t(me),t(rt),b(()=>t(me)[t(rt)]||"no-icon"))),"svelte-17k8iag"),Xe(kt,(t(se),t(rt),b(()=>t(se)[t(rt)]||t(rt)))),Tc(nr,Zt)},[()=>({selected:t(J).includes(t(rt)),focused:t(Ue)===st}),()=>(t(J),t(rt),b(()=>t(J).includes(t(rt))))]),W("click",ft,Wt=>A.toggleOption(st)),W("mouseenter",ft,()=>o(Ue,st)),w(ut,ft)}),Ce(()=>Ot=Me(mt,1,"radios svelte-17k8iag",null,Ot,{formInput:t(k)=="formInput",inlineInput:t(k)=="inlineInput",column:re().direction=="column"})),W("mouseleave",mt,()=>o(Ue,-1)),w(lt,mt)};le(je,lt=>{t(c)=="switch"&<(et)},!0)}w(Ke,Ae)};le(it,Ke=>{t(c)=="radio"||t(c)=="buttons"?Ke(_e):Ke(We,!1)},!0)}w(at,ct)};le(Ze,at=>{t(c)=="list"?at(Je):at(nt,!1)},!0)}w(Te,qe)};le(Re,Te=>{s()=="Loading"?Te(oe):Te(Oe,!1)})}vt(ve,Te=>o(q,Te),()=>t(q));var Fe=Ee(ve,2);{var Be=Te=>{{let qe=Pt(()=>d()=="Open");Qr(Te,{get anchor(){return t(q)},useAnchorWidth:!0,maxHeight:400,get open(){return t(qe)},$$events:{close(...Ze){var Je;(Je=N().focusout)==null||Je.apply(this,Ze)}},children:(Ze,Je)=>{var nt=Hw(),at=j(nt);{var ct=_e=>{var We=Uw();w(_e,We)},it=_e=>{var We=$e(),Ke=Ge(We);At(Ke,1,()=>t(Ne),Ft,(Ae,je,et)=>{var lt=Bw();let mt,Ot;var It=j(lt),Lt=Ee(j(It));Ce(Tt=>{mt=Me(lt,1,"option svelte-17k8iag",null,mt,Tt),Ot=Ye(lt,"",Ot,{"--option-color":(l(),t(je),b(()=>l()[t(je)]))}),Xe(Lt,` ${t(se),t(je),b(()=>t(se)[t(je)]||t(je))??""}`)},[()=>{var Tt;return{focused:t(Ue)===et,selected:(Tt=t(J))==null?void 0:Tt.includes(t(je))}}]),W("mousedown",lt,er(Tt=>A.toggleOption.debounce(150,et))),W("mouseenter",lt,()=>o(Ue,et)),w(Ae,lt)}),w(_e,We)};le(at,_e=>{t(Ne),t(J),b(()=>{var We;return((We=t(Ne))==null?void 0:We.length)<1||t(Ne).length==t(J).length})?_e(ct):_e(it,!1)})}vt(nt,_e=>o(ue,_e),()=>t(ue)),W("wheel",nt,_e=>_e.stopPropagation()),W("mouseleave",nt,()=>o(Ue,-1)),w(Ze,nt)},$$slots:{default:!0}})}};le(Fe,Te=>{t(fe)&&t(c)=="list"&&Te(Be)})}Ce(()=>{Ie=Me(ve,1,"superCell multirow",null,Ie,{inEdit:t(fe)&&t(c)!="buttons",isDirty:t(de)&&re().showDirty,disabled:t(D),readonly:t(C),error:t(E),inline:t(k)=="inlineInput",tableCell:t(k)=="tableCell",formInput:t(k)=="formInput","naked-field":t(c)=="buttons"}),Vt(ve,"tabindex",(v(re()),b(()=>{var Te;return(Te=re())!=null&&Te.disabled?-1:0}))),Pe=Ye(ve,"",Pe,{color:t(U),background:t($),"font-weight":(v(re()),b(()=>re().fontWeight))})}),W("focusin",ve,function(...Te){var qe;(qe=N().focus)==null||qe.apply(this,Te)}),W("focusout",ve,function(...Te){var qe;(qe=N().focusout)==null||qe.apply(this,Te)}),W("keydown",ve,function(...Te){var qe;(qe=A.handleKeyboard)==null||qe.apply(this,Te)}),w(e,te),Ct(),g()}function Va(e,r){if(e==null)return{};var n={},i=Object.keys(e),s,a;for(a=0;a<i.length;a++)s=i[a],!(r.indexOf(s)>=0)&&(n[s]=e[s]);return n}function jt(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new jt.InputMask(e,r)}class ir{constructor(r){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},r)}aggregate(r){return this.rawInserted+=r.rawInserted,this.skip=this.skip||r.skip,this.inserted+=r.inserted,this.tailShift+=r.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}jt.ChangeDetails=ir;function Ua(e){return typeof e=="string"||e instanceof String}const xt={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Gw(e){switch(e){case xt.LEFT:return xt.FORCE_LEFT;case xt.RIGHT:return xt.FORCE_RIGHT;default:return e}}function fu(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function Ss(e){return Array.isArray(e)?e:[e,new ir]}function Po(e,r){if(r===e)return!0;var n=Array.isArray(r),i=Array.isArray(e),s;if(n&&i){if(r.length!=e.length)return!1;for(s=0;s<r.length;s++)if(!Po(r[s],e[s]))return!1;return!0}if(n!=i)return!1;if(r&&e&&typeof r=="object"&&typeof e=="object"){var a=r instanceof Date,l=e instanceof Date;if(a&&l)return r.getTime()==e.getTime();if(a!=l)return!1;var d=r instanceof RegExp,u=e instanceof RegExp;if(d&&u)return r.toString()==e.toString();if(d!=u)return!1;var g=Object.keys(r);for(s=0;s<g.length;s++)if(!Object.prototype.hasOwnProperty.call(e,g[s]))return!1;for(s=0;s<g.length;s++)if(!Po(e[g[s]],r[g[s]]))return!1;return!0}else if(r&&e&&typeof r=="function"&&typeof e=="function")return r.toString()===e.toString();return!1}class qw{constructor(r,n,i,s){for(this.value=r,this.cursorPos=n,this.oldValue=i,this.oldSelection=s;this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?xt.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?xt.RIGHT:xt.LEFT}}class Ci{constructor(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0;this.value=r,this.from=n,this.stop=i}toString(){return this.value}extend(r){this.value+=String(r)}appendTo(r){return r.append(this.toString(),{tail:!0}).aggregate(r._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(r){Object.assign(this,r)}unshift(r){if(!this.value.length||r!=null&&this.from>=r)return"";const n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const r=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),r}}class mn{constructor(r){this._value="",this._update(Object.assign({},mn.DEFAULTS,r)),this.isInitialized=!0}updateOptions(r){Object.keys(r).length&&this.withValueRefresh(this._update.bind(this,r))}_update(r){Object.assign(this,r)}get state(){return{_value:this.value}}set state(r){this._value=r._value}reset(){this._value=""}get value(){return this._value}set value(r){this.resolve(r)}resolve(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{input:!0};return this.reset(),this.append(r,n,""),this.doCommit(),this.value}get unmaskedValue(){return this.value}set unmaskedValue(r){this.reset(),this.append(r,{},""),this.doCommit()}get typedValue(){return this.doParse(this.value)}set typedValue(r){this.value=this.doFormat(r)}get rawInputValue(){return this.extractInput(0,this.value.length,{raw:!0})}set rawInputValue(r){this.reset(),this.append(r,{raw:!0},""),this.doCommit()}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(r,n){return r}totalInputPositions(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return Math.min(this.value.length,n-r)}extractInput(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return this.value.slice(r,n)}extractTail(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return new Ci(this.extractInput(r,n),r)}appendTail(r){return Ua(r)&&(r=new Ci(String(r))),r.appendTo(this)}_appendCharRaw(r){return r?(this._value+=r,new ir({inserted:r,rawInserted:r})):new ir}_appendChar(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;const s=this.state;let a;if([r,a]=Ss(this.doPrepare(r,n)),a=a.aggregate(this._appendCharRaw(r,n)),a.inserted){let l,d=this.doValidate(n)!==!1;if(d&&i!=null){const u=this.state;this.overwrite===!0&&(l=i.state,i.unshift(this.value.length-a.tailShift));let g=this.appendTail(i);d=g.rawInserted===i.toString(),!(d&&g.inserted)&&this.overwrite==="shift"&&(this.state=u,l=i.state,i.shift(),g=this.appendTail(i),d=g.rawInserted===i.toString()),d&&g.inserted&&(this.state=u)}d||(a=new ir,this.state=s,i&&l&&(i.state=l))}return a}_appendPlaceholder(){return new ir}_appendEager(){return new ir}append(r,n,i){if(!Ua(r))throw new Error("value should be string");const s=new ir,a=Ua(i)?new Ci(String(i)):i;n!=null&&n.tail&&(n._beforeTailState=this.state);for(let l=0;l<r.length;++l){const d=this._appendChar(r[l],n,a);if(!d.rawInserted&&!this.doSkipInvalid(r[l],n,a))break;s.aggregate(d)}return(this.eager===!0||this.eager==="append")&&n!==null&&n!==void 0&&n.input&&r&&s.aggregate(this._appendEager()),a!=null&&(s.tailShift+=this.appendTail(a).tailShift),s}remove(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return this._value=this.value.slice(0,r)+this.value.slice(n),new ir}withValueRefresh(r){if(this._refreshing||!this.isInitialized)return r();this._refreshing=!0;const n=this.rawInputValue,i=this.value,s=r();return this.rawInputValue=n,this.value&&this.value!==i&&i.indexOf(this.value)===0&&this.append(i.slice(this.value.length),{},""),delete this._refreshing,s}runIsolated(r){if(this._isolated||!this.isInitialized)return r(this);this._isolated=!0;const n=this.state,i=r(this);return this.state=n,delete this._isolated,i}doSkipInvalid(r){return this.skipInvalid}doPrepare(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.prepare?this.prepare(r,this,n):r}doValidate(r){return(!this.validate||this.validate(this.value,this,r))&&(!this.parent||this.parent.doValidate(r))}doCommit(){this.commit&&this.commit(this.value,this)}doFormat(r){return this.format?this.format(r,this):r}doParse(r){return this.parse?this.parse(r,this):r}splice(r,n,i,s){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{input:!0};const l=r+n,d=this.extractTail(l),u=this.eager===!0||this.eager==="remove";let g;u&&(s=Gw(s),g=this.extractInput(0,l,{raw:!0}));let c=r;const p=new ir;if(s!==xt.NONE&&(c=this.nearestInputPos(r,n>1&&r!==0&&!u?xt.NONE:s),p.tailShift=c-r),p.aggregate(this.remove(c)),u&&s!==xt.NONE&&g===this.rawInputValue)if(s===xt.FORCE_LEFT){let _;for(;g===this.rawInputValue&&(_=this.value.length);)p.aggregate(new ir({tailShift:-1})).aggregate(this.remove(_-1))}else s===xt.FORCE_RIGHT&&d.unshift();return p.aggregate(this.append(i,a,d))}maskEquals(r){return this.mask===r}typedValueEquals(r){const n=this.typedValue;return r===n||mn.EMPTY_VALUES.includes(r)&&mn.EMPTY_VALUES.includes(n)||this.doFormat(r)===this.doFormat(this.typedValue)}}mn.DEFAULTS={format:String,parse:e=>e,skipInvalid:!0},mn.EMPTY_VALUES=[void 0,null,""],jt.Masked=mn;function mh(e){if(e==null)throw new Error("mask property should be defined");return e instanceof RegExp?jt.MaskedRegExp:Ua(e)?jt.MaskedPattern:e instanceof Date||e===Date?jt.MaskedDate:e instanceof Number||typeof e=="number"||e===Number?jt.MaskedNumber:Array.isArray(e)||e===Array?jt.MaskedDynamic:jt.Masked&&e.prototype instanceof jt.Masked?e:e instanceof jt.Masked?e.constructor:e instanceof Function?jt.MaskedFunction:(console.warn("Mask not found for mask",e),jt.Masked)}function la(e){if(jt.Masked&&e instanceof jt.Masked)return e;e=Object.assign({},e);const r=e.mask;if(jt.Masked&&r instanceof jt.Masked)return r;const n=mh(r);if(!n)throw new Error("Masked class is not found for provided mask, appropriate module needs to be import manually before creating mask.");return new n(e)}jt.createMask=la;const Ww=["parent","isOptional","placeholderChar","displayChar","lazy","eager"],Yw={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class _h{constructor(r){const{parent:n,isOptional:i,placeholderChar:s,displayChar:a,lazy:l,eager:d}=r,u=Va(r,Ww);this.masked=la(u),Object.assign(this,{parent:n,isOptional:i,placeholderChar:s,displayChar:a,lazy:l,eager:d})}reset(){this.isFilled=!1,this.masked.reset()}remove(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return r===0&&n>=1?(this.isFilled=!1,this.masked.remove(r,n)):new ir}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.isFilled)return new ir;const i=this.masked.state,s=this.masked._appendChar(r,n);return s.inserted&&this.doValidate(n)===!1&&(s.inserted=s.rawInserted="",this.masked.state=i),!s.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(s.inserted=this.placeholderChar),s.skip=!s.inserted&&!this.isOptional,this.isFilled=!!s.inserted,s}append(){return this.masked.append(...arguments)}_appendPlaceholder(){const r=new ir;return this.isFilled||this.isOptional||(this.isFilled=!0,r.inserted=this.placeholderChar),r}_appendEager(){return new ir}extractTail(){return this.masked.extractTail(...arguments)}appendTail(){return this.masked.appendTail(...arguments)}extractInput(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,i=arguments.length>2?arguments[2]:void 0;return this.masked.extractInput(r,n,i)}nearestInputPos(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xt.NONE;const i=0,s=this.value.length,a=Math.min(Math.max(r,i),s);switch(n){case xt.LEFT:case xt.FORCE_LEFT:return this.isComplete?a:i;case xt.RIGHT:case xt.FORCE_RIGHT:return this.isComplete?a:s;case xt.NONE:default:return a}}totalInputPositions(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;return this.value.slice(r,n).length}doValidate(){return this.masked.doValidate(...arguments)&&(!this.parent||this.parent.doValidate(...arguments))}doCommit(){this.masked.doCommit()}get state(){return{masked:this.masked.state,isFilled:this.isFilled}}set state(r){this.masked.state=r.masked,this.isFilled=r.isFilled}}class bh{constructor(r){Object.assign(this,r),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._value.length;return this._value=this._value.slice(0,r)+this._value.slice(n),this._value||(this._isRawInput=!1),new ir}nearestInputPos(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xt.NONE;const i=0,s=this._value.length;switch(n){case xt.LEFT:case xt.FORCE_LEFT:return i;case xt.NONE:case xt.RIGHT:case xt.FORCE_RIGHT:default:return s}}totalInputPositions(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._value.length;return this._isRawInput?n-r:0}extractInput(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._value.length;return(arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}).raw&&this._isRawInput&&this._value.slice(r,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=new ir;if(this.isFilled)return i;const s=this.eager===!0||this.eager==="append",l=this.char===r&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!s)&&!n.tail;return l&&(i.rawInserted=this.char),this._value=i.inserted=this.char,this._isRawInput=l&&(n.raw||n.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const r=new ir;return this.isFilled||(this._value=r.inserted=this.char),r}extractTail(){return arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,new Ci("")}appendTail(r){return Ua(r)&&(r=new Ci(String(r))),r.appendTo(this)}append(r,n,i){const s=this._appendChar(r[0],n);return i!=null&&(s.tailShift+=this.appendTail(i).tailShift),s}doCommit(){}get state(){return{_value:this._value,_isRawInput:this._isRawInput}}set state(r){Object.assign(this,r)}}const Kw=["chunks"];class ua{constructor(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.chunks=r,this.from=n}toString(){return this.chunks.map(String).join("")}extend(r){if(!String(r))return;Ua(r)&&(r=new Ci(String(r)));const n=this.chunks[this.chunks.length-1],i=n&&(n.stop===r.stop||r.stop==null)&&r.from===n.from+n.toString().length;if(r instanceof Ci)i?n.extend(r.toString()):this.chunks.push(r);else if(r instanceof ua){if(r.stop==null){let s;for(;r.chunks.length&&r.chunks[0].stop==null;)s=r.chunks.shift(),s.from+=r.from,this.extend(s)}r.toString()&&(r.stop=r.blockIndex,this.chunks.push(r))}}appendTo(r){if(!(r instanceof jt.MaskedPattern))return new Ci(this.toString()).appendTo(r);const n=new ir;for(let i=0;i<this.chunks.length&&!n.skip;++i){const s=this.chunks[i],a=r._mapPosToBlock(r.value.length),l=s.stop;let d;if(l!=null&&(!a||a.index<=l)){if(s instanceof ua||r._stops.indexOf(l)>=0){const u=r._appendPlaceholder(l);n.aggregate(u)}d=s instanceof ua&&r._blocks[l]}if(d){const u=d.appendTail(s);u.skip=!1,n.aggregate(u),r._value+=u.inserted;const g=s.toString().slice(u.rawInserted.length);g&&n.aggregate(r.append(g,{tail:!0}))}else n.aggregate(r.append(s.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(r=>r.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(r){const{chunks:n}=r,i=Va(r,Kw);Object.assign(this,i),this.chunks=n.map(s=>{const a="chunks"in s?new ua:new Ci;return a.state=s,a})}unshift(r){if(!this.chunks.length||r!=null&&this.from>=r)return"";const n=r!=null?r-this.from:r;let i=0;for(;i<this.chunks.length;){const s=this.chunks[i],a=s.unshift(n);if(s.toString()){if(!a)break;++i}else this.chunks.splice(i,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let r=this.chunks.length-1;for(;0<=r;){const n=this.chunks[r],i=n.shift();if(n.toString()){if(!i)break;--r}else this.chunks.splice(r,1);if(i)return i}return""}}class Xw{constructor(r,n){this.masked=r,this._log=[];const{offset:i,index:s}=r._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=i,this.index=s,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(r){Object.assign(this,r)}pushState(){this._log.push(this.state)}popState(){const r=this._log.pop();return this.state=r,r}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.value.length))}_pushLeft(r){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((n=this.block)===null||n===void 0?void 0:n.value.length)||0){var n;if(r())return this.ok=!0}return this.ok=!1}_pushRight(r){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(r())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,xt.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,xt.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,xt.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,xt.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,xt.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,xt.NONE),!0})}}class Qw extends mn{_update(r){r.mask&&(r.validate=n=>n.search(r.mask)>=0),super._update(r)}}jt.MaskedRegExp=Qw;const Zw=["_blocks"];class Cn extends mn{constructor(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r.definitions=Object.assign({},Yw,r.definitions),super(Object.assign({},Cn.DEFAULTS,r))}_update(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r.definitions=Object.assign({},this.definitions,r.definitions),super._update(r),this._rebuildMask()}_rebuildMask(){const r=this.definitions;this._blocks=[],this._stops=[],this._maskedBlocks={};let n=this.mask;if(!n||!r)return;let i=!1,s=!1;for(let d=0;d<n.length;++d){var a,l;if(this.blocks){const _=n.slice(d),S=Object.keys(this.blocks).filter(T=>_.indexOf(T)===0);S.sort((T,I)=>I.length-T.length);const y=S[0];if(y){const T=la(Object.assign({parent:this,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite},this.blocks[y]));T&&(this._blocks.push(T),this._maskedBlocks[y]||(this._maskedBlocks[y]=[]),this._maskedBlocks[y].push(this._blocks.length-1)),d+=y.length-1;continue}}let u=n[d],g=u in r;if(u===Cn.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(u==="{"||u==="}"){i=!i;continue}if(u==="["||u==="]"){s=!s;continue}if(u===Cn.ESCAPE_CHAR){if(++d,u=n[d],!u)break;g=!1}const c=(a=r[u])!==null&&a!==void 0&&a.mask&&!(((l=r[u])===null||l===void 0?void 0:l.mask.prototype)instanceof jt.Masked)?r[u]:{mask:r[u]},p=g?new _h(Object.assign({parent:this,isOptional:s,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar},c)):new bh({char:u,eager:this.eager,isUnmasking:i});this._blocks.push(p)}}get state(){return Object.assign({},super.state,{_blocks:this._blocks.map(r=>r.state)})}set state(r){const{_blocks:n}=r,i=Va(r,Zw);this._blocks.forEach((s,a)=>s.state=n[a]),super.state=i}reset(){super.reset(),this._blocks.forEach(r=>r.reset())}get isComplete(){return this._blocks.every(r=>r.isComplete)}get isFilled(){return this._blocks.every(r=>r.isFilled)}get isFixed(){return this._blocks.every(r=>r.isFixed)}get isOptional(){return this._blocks.every(r=>r.isOptional)}doCommit(){this._blocks.forEach(r=>r.doCommit()),super.doCommit()}get unmaskedValue(){return this._blocks.reduce((r,n)=>r+=n.unmaskedValue,"")}set unmaskedValue(r){super.unmaskedValue=r}get value(){return this._blocks.reduce((r,n)=>r+=n.value,"")}set value(r){super.value=r}get displayValue(){return this._blocks.reduce((r,n)=>r+=n.displayValue,"")}appendTail(r){return super.appendTail(r).aggregate(this._appendPlaceholder())}_appendEager(){var r;const n=new ir;let i=(r=this._mapPosToBlock(this.value.length))===null||r===void 0?void 0:r.index;if(i==null)return n;this._blocks[i].isFilled&&++i;for(let s=i;s<this._blocks.length;++s){const a=this._blocks[s]._appendEager();if(!a.inserted)break;n.aggregate(a)}return n}_appendCharRaw(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this._mapPosToBlock(this.value.length),s=new ir;if(!i)return s;for(let d=i.index;;++d){var a,l;const u=this._blocks[d];if(!u)break;const g=u._appendChar(r,Object.assign({},n,{_beforeTailState:(a=n._beforeTailState)===null||a===void 0||(l=a._blocks)===null||l===void 0?void 0:l[d]})),c=g.skip;if(s.aggregate(g),c||g.rawInserted)break}return s}extractTail(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;const i=new ua;return r===n||this._forEachBlocksInRange(r,n,(s,a,l,d)=>{const u=s.extractTail(l,d);u.stop=this._findStopBefore(a),u.from=this._blockStartPos(a),u instanceof ua&&(u.blockIndex=a),i.extend(u)}),i}extractInput(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(r===n)return"";let s="";return this._forEachBlocksInRange(r,n,(a,l,d,u)=>{s+=a.extractInput(d,u,i)}),s}_findStopBefore(r){let n;for(let i=0;i<this._stops.length;++i){const s=this._stops[i];if(s<=r)n=s;else break}return n}_appendPlaceholder(r){const n=new ir;if(this.lazy&&r==null)return n;const i=this._mapPosToBlock(this.value.length);if(!i)return n;const s=i.index,a=r??this._blocks.length;return this._blocks.slice(s,a).forEach(l=>{if(!l.lazy||r!=null){const d=l._blocks!=null?[l._blocks.length]:[],u=l._appendPlaceholder(...d);this._value+=u.inserted,n.aggregate(u)}}),n}_mapPosToBlock(r){let n="";for(let i=0;i<this._blocks.length;++i){const s=this._blocks[i],a=n.length;if(n+=s.value,r<=n.length)return{index:i,offset:r-a}}}_blockStartPos(r){return this._blocks.slice(0,r).reduce((n,i)=>n+=i.value.length,0)}_forEachBlocksInRange(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,i=arguments.length>2?arguments[2]:void 0;const s=this._mapPosToBlock(r);if(s){const a=this._mapPosToBlock(n),l=a&&s.index===a.index,d=s.offset,u=a&&l?a.offset:this._blocks[s.index].value.length;if(i(this._blocks[s.index],s.index,d,u),a&&!l){for(let g=s.index+1;g<a.index;++g)i(this._blocks[g],g,0,this._blocks[g].value.length);i(this._blocks[a.index],a.index,0,a.offset)}}}remove(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;const i=super.remove(r,n);return this._forEachBlocksInRange(r,n,(s,a,l,d)=>{i.aggregate(s.remove(l,d))}),i}nearestInputPos(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xt.NONE;if(!this._blocks.length)return 0;const i=new Xw(this,r);if(n===xt.NONE)return i.pushRightBeforeInput()||(i.popState(),i.pushLeftBeforeInput())?i.pos:this.value.length;if(n===xt.LEFT||n===xt.FORCE_LEFT){if(n===xt.LEFT){if(i.pushRightBeforeFilled(),i.ok&&i.pos===r)return r;i.popState()}if(i.pushLeftBeforeInput(),i.pushLeftBeforeRequired(),i.pushLeftBeforeFilled(),n===xt.LEFT){if(i.pushRightBeforeInput(),i.pushRightBeforeRequired(),i.ok&&i.pos<=r||(i.popState(),i.ok&&i.pos<=r))return i.pos;i.popState()}return i.ok?i.pos:n===xt.FORCE_LEFT?0:(i.popState(),i.ok||(i.popState(),i.ok)?i.pos:0)}return n===xt.RIGHT||n===xt.FORCE_RIGHT?(i.pushRightBeforeInput(),i.pushRightBeforeRequired(),i.pushRightBeforeFilled()?i.pos:n===xt.FORCE_RIGHT?this.value.length:(i.popState(),i.ok||(i.popState(),i.ok)?i.pos:this.nearestInputPos(r,xt.LEFT))):r}totalInputPositions(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,i=0;return this._forEachBlocksInRange(r,n,(s,a,l,d)=>{i+=s.totalInputPositions(l,d)}),i}maskedBlock(r){return this.maskedBlocks(r)[0]}maskedBlocks(r){const n=this._maskedBlocks[r];return n?n.map(i=>this._blocks[i]):[]}}Cn.DEFAULTS={lazy:!0,placeholderChar:"_"},Cn.STOP_CHAR="`",Cn.ESCAPE_CHAR="\\",Cn.InputDefinition=_h,Cn.FixedDefinition=bh,jt.MaskedPattern=Cn;class Mo extends Cn{get _matchFrom(){return this.maxLength-String(this.from).length}_update(r){r=Object.assign({to:this.to||0,from:this.from||0,maxLength:this.maxLength||0},r);let n=String(r.to).length;r.maxLength!=null&&(n=Math.max(n,r.maxLength)),r.maxLength=n;const i=String(r.from).padStart(n,"0"),s=String(r.to).padStart(n,"0");let a=0;for(;a<s.length&&s[a]===i[a];)++a;r.mask=s.slice(0,a).replace(/0/g,"\\0")+"0".repeat(n-a),super._update(r)}get isComplete(){return super.isComplete&&!!this.value}boundaries(r){let n="",i="";const[,s,a]=r.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(n="0".repeat(s.length)+a,i="9".repeat(s.length)+a),n=n.padEnd(this.maxLength,"0"),i=i.padEnd(this.maxLength,"9"),[n,i]}doPrepare(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i;if([r,i]=Ss(super.doPrepare(r.replace(/\D/g,""),n)),!this.autofix||!r)return r;const s=String(this.from).padStart(this.maxLength,"0"),a=String(this.to).padStart(this.maxLength,"0");let l=this.value+r;if(l.length>this.maxLength)return"";const[d,u]=this.boundaries(l);return Number(u)<this.from?s[l.length-1]:Number(d)>this.to?this.autofix==="pad"&&l.length<this.maxLength?["",i.aggregate(this.append(s[l.length-1]+r,n))]:a[l.length-1]:r}doValidate(){const r=this.value;if(r.search(/[^0]/)===-1&&r.length<=this._matchFrom)return!0;const[i,s]=this.boundaries(r);return this.from<=Number(s)&&Number(i)<=this.to&&super.doValidate(...arguments)}}jt.MaskedRange=Mo;class Ba extends Cn{constructor(r){super(Object.assign({},Ba.DEFAULTS,r))}_update(r){r.mask===Date&&delete r.mask,r.pattern&&(r.mask=r.pattern);const n=r.blocks;r.blocks=Object.assign({},Ba.GET_DEFAULT_BLOCKS()),r.min&&(r.blocks.Y.from=r.min.getFullYear()),r.max&&(r.blocks.Y.to=r.max.getFullYear()),r.min&&r.max&&r.blocks.Y.from===r.blocks.Y.to&&(r.blocks.m.from=r.min.getMonth()+1,r.blocks.m.to=r.max.getMonth()+1,r.blocks.m.from===r.blocks.m.to&&(r.blocks.d.from=r.min.getDate(),r.blocks.d.to=r.max.getDate())),Object.assign(r.blocks,this.blocks,n),Object.keys(r.blocks).forEach(i=>{const s=r.blocks[i];!("autofix"in s)&&"autofix"in r&&(s.autofix=r.autofix)}),super._update(r)}doValidate(){const r=this.date;return super.doValidate(...arguments)&&(!this.isComplete||this.isDateExist(this.value)&&r!=null&&(this.min==null||this.min<=r)&&(this.max==null||r<=this.max))}isDateExist(r){return this.format(this.parse(r,this),this).indexOf(r)>=0}get date(){return this.typedValue}set date(r){this.typedValue=r}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(r){super.typedValue=r}maskEquals(r){return r===Date||super.maskEquals(r)}}Ba.DEFAULTS={pattern:"d{.}`m{.}`Y",format:e=>{if(!e)return"";const r=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),i=e.getFullYear();return[r,n,i].join(".")},parse:e=>{const[r,n,i]=e.split(".");return new Date(i,n-1,r)}},Ba.GET_DEFAULT_BLOCKS=()=>({d:{mask:Mo,from:1,to:31,maxLength:2},m:{mask:Mo,from:1,to:12,maxLength:2},Y:{mask:Mo,from:1900,to:9999}}),jt.MaskedDate=Ba;class hu{get selectionStart(){let r;try{r=this._unsafeSelectionStart}catch{}return r??this.value.length}get selectionEnd(){let r;try{r=this._unsafeSelectionEnd}catch{}return r??this.value.length}select(r,n){if(!(r==null||n==null||r===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(r,n)}catch{}}_unsafeSelect(r,n){}get isActive(){return!1}bindEvents(r){}unbindEvents(){}}jt.MaskElement=hu;class Ha extends hu{constructor(r){super(),this.input=r,this._handlers={}}get rootElement(){var r,n,i;return(r=(n=(i=this.input).getRootNode)===null||n===void 0?void 0:n.call(i))!==null&&r!==void 0?r:document}get isActive(){return this.input===this.rootElement.activeElement}get _unsafeSelectionStart(){return this.input.selectionStart}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(r,n){this.input.setSelectionRange(r,n)}get value(){return this.input.value}set value(r){this.input.value=r}bindEvents(r){Object.keys(r).forEach(n=>this._toggleEventHandler(Ha.EVENTS_MAP[n],r[n]))}unbindEvents(){Object.keys(this._handlers).forEach(r=>this._toggleEventHandler(r))}_toggleEventHandler(r,n){this._handlers[r]&&(this.input.removeEventListener(r,this._handlers[r]),delete this._handlers[r]),n&&(this.input.addEventListener(r,n),this._handlers[r]=n)}}Ha.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},jt.HTMLMaskElement=Ha;class yh extends Ha{get _unsafeSelectionStart(){const r=this.rootElement,n=r.getSelection&&r.getSelection(),i=n&&n.anchorOffset,s=n&&n.focusOffset;return s==null||i==null||i<s?i:s}get _unsafeSelectionEnd(){const r=this.rootElement,n=r.getSelection&&r.getSelection(),i=n&&n.anchorOffset,s=n&&n.focusOffset;return s==null||i==null||i>s?i:s}_unsafeSelect(r,n){if(!this.rootElement.createRange)return;const i=this.rootElement.createRange();i.setStart(this.input.firstChild||this.input,r),i.setEnd(this.input.lastChild||this.input,n);const s=this.rootElement,a=s.getSelection&&s.getSelection();a&&(a.removeAllRanges(),a.addRange(i))}get value(){return this.input.textContent}set value(r){this.input.textContent=r}}jt.HTMLContenteditableMaskElement=yh;const Jw=["mask"];class $w{constructor(r,n){this.el=r instanceof hu?r:r.isContentEditable&&r.tagName!=="INPUT"&&r.tagName!=="TEXTAREA"?new yh(r):new Ha(r),this.masked=la(n),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}get mask(){return this.masked.mask}maskEquals(r){var n;return r==null||((n=this.masked)===null||n===void 0?void 0:n.maskEquals(r))}set mask(r){if(this.maskEquals(r))return;if(!(r instanceof jt.Masked)&&this.masked.constructor===mh(r)){this.masked.updateOptions({mask:r});return}const n=la({mask:r});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}get value(){return this._value}set value(r){this.value!==r&&(this.masked.value=r,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(r){this.unmaskedValue!==r&&(this.masked.unmaskedValue=r,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(r){this.masked.typedValueEquals(r)||(this.masked.typedValue=r,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];const a=this._listeners[r];a&&a.forEach(l=>l(...i))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(r){!this.el||!this.el.isActive||(this.el.select(r,r),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const r=this.masked.unmaskedValue,n=this.masked.value,i=this.displayValue,s=this.unmaskedValue!==r||this.value!==n;this._unmaskedValue=r,this._value=n,this.el.value!==i&&(this.el.value=i),s&&this._fireChangeEvents()}updateOptions(r){const{mask:n}=r,i=Va(r,Jw),s=!this.maskEquals(n),a=!Po(this.masked,i);s&&(this.mask=n),a&&this.masked.updateOptions(i),(s||a)&&this.updateControl()}updateCursor(r){r!=null&&(this.cursorPos=r,this._delayUpdateCursor(r))}_delayUpdateCursor(r){this._abortUpdateCursor(),this._changingCursorPos=r,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,xt.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(r,n){return this._listeners[r]||(this._listeners[r]=[]),this._listeners[r].push(n),this}off(r,n){if(!this._listeners[r])return this;if(!n)return delete this._listeners[r],this;const i=this._listeners[r].indexOf(n);return i>=0&&this._listeners[r].splice(i,1),this}_onInput(r){if(this._inputEvent=r,this._abortUpdateCursor(),!this._selection)return this.updateValue();const n=new qw(this.el.value,this.cursorPos,this.displayValue,this._selection),i=this.masked.rawInputValue,s=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,a=i===this.masked.rawInputValue?n.removeDirection:xt.NONE;let l=this.masked.nearestInputPos(n.startChangePos+s,a);a!==xt.NONE&&(l=this.masked.nearestInputPos(l,xt.NONE)),this.updateControl(),this.updateCursor(l),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(r){r.preventDefault(),r.stopPropagation()}_onFocus(r){this.alignCursorFriendly()}_onClick(r){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}jt.InputMask=$w;class eE extends Cn{_update(r){r.enum&&(r.mask="*".repeat(r.enum[0].length)),super._update(r)}doValidate(){return this.enum.some(r=>r.indexOf(this.unmaskedValue)>=0)&&super.doValidate(...arguments)}}jt.MaskedEnum=eE;class Ln extends mn{constructor(r){super(Object.assign({},Ln.DEFAULTS,r))}_update(r){super._update(r),this._updateRegExps()}_updateRegExps(){let r="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",i=(this.scale?"(".concat(fu(this.radix),"\\d{0,").concat(this.scale,"})?"):"")+"$";this._numberRegExp=new RegExp(r+n+i),this._mapToRadixRegExp=new RegExp("[".concat(this.mapToRadix.map(fu).join(""),"]"),"g"),this._thousandsSeparatorRegExp=new RegExp(fu(this.thousandsSeparator),"g")}_removeThousandsSeparators(r){return r.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(r){const n=r.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepare(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};r=this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?r.replace(this._mapToRadixRegExp,this.radix):r);const[i,s]=Ss(super.doPrepare(r,n));return r&&!i&&(s.skip=!0),[i,s]}_separatorsCount(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=0;for(let s=0;s<r;++s)this._value.indexOf(this.thousandsSeparator,s)===s&&(++i,n&&(r+=this.thousandsSeparator.length));return i}_separatorsCountFromSlice(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._value;return this._separatorsCount(this._removeThousandsSeparators(r).length,!0)}extractInput(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length,i=arguments.length>2?arguments[2]:void 0;return[r,n]=this._adjustRangeWithSeparators(r,n),this._removeThousandsSeparators(super.extractInput(r,n,i))}_appendCharRaw(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.thousandsSeparator)return super._appendCharRaw(r,n);const i=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,s=this._separatorsCountFromSlice(i);this._value=this._removeThousandsSeparators(this.value);const a=super._appendCharRaw(r,n);this._value=this._insertThousandsSeparators(this._value);const l=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,d=this._separatorsCountFromSlice(l);return a.tailShift+=(d-s)*this.thousandsSeparator.length,a.skip=!a.rawInserted&&r===this.thousandsSeparator,a}_findSeparatorAround(r){if(this.thousandsSeparator){const n=r-this.thousandsSeparator.length+1,i=this.value.indexOf(this.thousandsSeparator,n);if(i<=r)return i}return-1}_adjustRangeWithSeparators(r,n){const i=this._findSeparatorAround(r);i>=0&&(r=i);const s=this._findSeparatorAround(n);return s>=0&&(n=s+this.thousandsSeparator.length),[r,n]}remove(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.value.length;[r,n]=this._adjustRangeWithSeparators(r,n);const i=this.value.slice(0,r),s=this.value.slice(n),a=this._separatorsCount(i.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(i+s));const l=this._separatorsCountFromSlice(i);return new ir({tailShift:(l-a)*this.thousandsSeparator.length})}nearestInputPos(r,n){if(!this.thousandsSeparator)return r;switch(n){case xt.NONE:case xt.LEFT:case xt.FORCE_LEFT:{const i=this._findSeparatorAround(r-1);if(i>=0){const s=i+this.thousandsSeparator.length;if(r<s||this.value.length<=s||n===xt.FORCE_LEFT)return i}break}case xt.RIGHT:case xt.FORCE_RIGHT:{const i=this._findSeparatorAround(r);if(i>=0)return i+this.thousandsSeparator.length}}return r}doValidate(r){let n=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(n){const i=this.number;n=n&&!isNaN(i)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return n&&super.doValidate(r)}doCommit(){if(this.value){const r=this.number;let n=r;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==r&&(this.unmaskedValue=this.doFormat(n));let i=this.value;this.normalizeZeros&&(i=this._normalizeZeros(i)),this.padFractionalZeros&&this.scale>0&&(i=this._padFractionalZeros(i)),this._value=i}super.doCommit()}_normalizeZeros(r){const n=this._removeThousandsSeparators(r).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(i,s,a,l)=>s+l),r.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(r){if(!r)return r;const n=r.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;const s=this.scale===0&&r!==this.thousandsSeparator&&(r===this.radix||r===Ln.UNMASKED_RADIX||this.mapToRadix.includes(r));return super.doSkipInvalid(r,n,i)&&!s}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Ln.UNMASKED_RADIX)}set unmaskedValue(r){super.unmaskedValue=r}get typedValue(){return this.doParse(this.unmaskedValue)}set typedValue(r){this.rawInputValue=this.doFormat(r).replace(Ln.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(r){this.typedValue=r}get allowNegative(){return this.signed||this.min!=null&&this.min<0||this.max!=null&&this.max<0}typedValueEquals(r){return(super.typedValueEquals(r)||Ln.EMPTY_VALUES.includes(r)&&Ln.EMPTY_VALUES.includes(this.typedValue))&&!(r===0&&this.value==="")}}Ln.UNMASKED_RADIX=".",Ln.DEFAULTS={radix:",",thousandsSeparator:"",mapToRadix:[Ln.UNMASKED_RADIX],scale:2,signed:!1,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},Ln.EMPTY_VALUES=[...mn.EMPTY_VALUES,0],jt.MaskedNumber=Ln;class tE extends mn{_update(r){r.mask&&(r.validate=r.mask),super._update(r)}}jt.MaskedFunction=tE;const rE=["compiledMasks","currentMaskRef","currentMask"],nE=["mask"];class No extends mn{constructor(r){super(Object.assign({},No.DEFAULTS,r)),this.currentMask=null}_update(r){super._update(r),"mask"in r&&(this.compiledMasks=Array.isArray(r.mask)?r.mask.map(n=>la(n)):[])}_appendCharRaw(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this._applyDispatch(r,n);return this.currentMask&&i.aggregate(this.currentMask._appendChar(r,this.currentMaskFlags(n))),i}_applyDispatch(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";const s=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,a=this.rawInputValue,l=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:a,d=a.slice(l.length),u=this.currentMask,g=new ir,c=u==null?void 0:u.state;if(this.currentMask=this.doDispatch(r,Object.assign({},n),i),this.currentMask)if(this.currentMask!==u){if(this.currentMask.reset(),l){const p=this.currentMask.append(l,{raw:!0});g.tailShift=p.inserted.length-s.length}d&&(g.tailShift+=this.currentMask.append(d,{raw:!0,tail:!0}).tailShift)}else this.currentMask.state=c;return g}_appendPlaceholder(){const r=this._applyDispatch(...arguments);return this.currentMask&&r.aggregate(this.currentMask._appendPlaceholder()),r}_appendEager(){const r=this._applyDispatch(...arguments);return this.currentMask&&r.aggregate(this.currentMask._appendEager()),r}appendTail(r){const n=new ir;return r&&n.aggregate(this._applyDispatch("",{},r)),n.aggregate(this.currentMask?this.currentMask.appendTail(r):super.appendTail(r))}currentMaskFlags(r){var n,i;return Object.assign({},r,{_beforeTailState:((n=r._beforeTailState)===null||n===void 0?void 0:n.currentMaskRef)===this.currentMask&&((i=r._beforeTailState)===null||i===void 0?void 0:i.currentMask)||r._beforeTailState})}doDispatch(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";return this.dispatch(r,this,n,i)}doValidate(r){return super.doValidate(r)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(r)))}doPrepare(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},[i,s]=Ss(super.doPrepare(r,n));if(this.currentMask){let a;[i,a]=Ss(super.doPrepare(i,this.currentMaskFlags(n))),s=s.aggregate(a)}return[i,s]}reset(){var r;(r=this.currentMask)===null||r===void 0||r.reset(),this.compiledMasks.forEach(n=>n.reset())}get value(){return this.currentMask?this.currentMask.value:""}set value(r){super.value=r}get unmaskedValue(){return this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(r){super.unmaskedValue=r}get typedValue(){return this.currentMask?this.currentMask.typedValue:""}set typedValue(r){let n=String(r);this.currentMask&&(this.currentMask.typedValue=r,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var r;return!!(!((r=this.currentMask)===null||r===void 0)&&r.isComplete)}get isFilled(){var r;return!!(!((r=this.currentMask)===null||r===void 0)&&r.isFilled)}remove(){const r=new ir;return this.currentMask&&r.aggregate(this.currentMask.remove(...arguments)).aggregate(this._applyDispatch()),r}get state(){var r;return Object.assign({},super.state,{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(r=this.currentMask)===null||r===void 0?void 0:r.state})}set state(r){const{compiledMasks:n,currentMaskRef:i,currentMask:s}=r,a=Va(r,rE);this.compiledMasks.forEach((l,d)=>l.state=n[d]),i!=null&&(this.currentMask=i,this.currentMask.state=s),super.state=a}extractInput(){return this.currentMask?this.currentMask.extractInput(...arguments):""}extractTail(){return this.currentMask?this.currentMask.extractTail(...arguments):super.extractTail(...arguments)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(){return this.currentMask?this.currentMask.nearestInputPos(...arguments):super.nearestInputPos(...arguments)}get overwrite(){return this.currentMask?this.currentMask.overwrite:super.overwrite}set overwrite(r){console.warn('"overwrite" option is not available in dynamic mask, use this option in siblings')}get eager(){return this.currentMask?this.currentMask.eager:super.eager}set eager(r){console.warn('"eager" option is not available in dynamic mask, use this option in siblings')}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:super.skipInvalid}set skipInvalid(r){(this.isInitialized||r!==mn.DEFAULTS.skipInvalid)&&console.warn('"skipInvalid" option is not available in dynamic mask, use this option in siblings')}maskEquals(r){return Array.isArray(r)&&this.compiledMasks.every((n,i)=>{if(!r[i])return;const s=r[i],{mask:a}=s,l=Va(s,nE);return Po(n,l)&&n.maskEquals(a)})}typedValueEquals(r){var n;return!!(!((n=this.currentMask)===null||n===void 0)&&n.typedValueEquals(r))}}No.DEFAULTS={dispatch:(e,r,n,i)=>{if(!r.compiledMasks.length)return;const s=r.rawInputValue,a=r.compiledMasks.map((l,d)=>{const u=r.currentMask===l,g=u?l.value.length:l.nearestInputPos(l.value.length,xt.FORCE_LEFT);return l.rawInputValue!==s?(l.reset(),l.append(s,{raw:!0})):u||l.remove(g),l.append(e,r.currentMaskFlags(n)),l.appendTail(i),{index:d,weight:l.rawInputValue.length,totalInputPositions:l.totalInputPositions(0,Math.max(g,l.nearestInputPos(l.value.length,xt.FORCE_LEFT)))}});return a.sort((l,d)=>d.weight-l.weight||d.totalInputPositions-l.totalInputPositions),r.compiledMasks[a[0].index]}},jt.MaskedDynamic=No;const gu={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function wh(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gu.MASKED,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:gu.MASKED;const i=la(e);return s=>i.runIsolated(a=>(a[r]=s,a[n]))}function iE(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return wh(...n)(e)}jt.PIPE_TYPE=gu,jt.createPipe=wh,jt.pipe=iE;try{globalThis.IMask=jt}catch{}var aE=F("<i></i>"),sE=F('<i class="ri-close-line clearIcon"></i>'),oE=F('<input tabindex="0"/> <!>',1),lE=F("<div><span> </span></div>"),uE=F("<div><!> <!></div>");function cE(e,r){St(r,!1);const n=()=>He(R(),"$cellState",i),[i,s]=qt(),a=h(),l=h(),d=h(),u=h(),g=Se.createEventDispatcher();let c=m(r,"value",8),p=m(r,"cellOptions",24,()=>({role:"formInput",initialState:"Editing",debounce:250,placeholder:""})),_=m(r,"autofocus",8),S=m(r,"mask",8,""),y,T=h(),I=h(c()),k=h(!1),C=h(!1),D,E=h();function U(Z){if(!S()||!Z)return Z;const Y=jt.createMask({mask:S()});return Y.unmaskedValue=Z,Y.value}function $(){if(!S()){o(C,!1);return}if(!t(I)){o(C,!1);return}const Z=jt.createMask({mask:S()});Z.resolve(t(I)),o(C,Z.isComplete)}let R=m(r,"cellState",24,()=>{var Z;return or(((Z=p())==null?void 0:Z.initialState)??"View",{"*":{reset(Y){o(I,c()),$(),D&&(D.unmaskedValue=t(I)||""),!S()&&t(E)&&zt(E,t(E).value=t(I)||"")}},View:{_enter(){o(I,c()),$()},focus(){if(!p().readonly&&!p().disabled)return"Editing"}},Editing:{_enter(){o(T,c()),o(I,c()),o(k,!1),$(),g("enteredit"),D&&(D.unmaskedValue=t(I)||""),!S()&&t(E)&&zt(E,t(E).value=t(I)||"")},_exit(){o(T,void 0),g("exitedit"),g("focusout")},clear(){o(I,null),$(),o(k,t(T)!==t(I)),t(E)&&zt(E,t(E).value=t(I))},focusout(Y){this.submit()},submit(){if(t(k)){if(S()&&t(I)&&!t(C))return o(I,t(T)),"View";g("change",t(I))}return"View"},cancel(){return o(I,t(T)),$(),o(k,!1),g("cancel"),D&&(D.unmaskedValue=t(I)),!S()&&t(E)&&zt(E,t(E).value=t(I)),"View"},handleKeyboard(Y){var G;if(!Y)return;o(k,t(T)!==t(I));const re=["Backspace","Delete","Enter","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"];if(t(C)&&!re.includes(Y.key)&&Y.key.length===1){Y.preventDefault();return}if(Y.key=="Enter"&&this.submit(),Y.key=="Escape"&&this.cancel(),Y.key.length===1&&S()){const ae=jt.createMask({mask:S()});if((t(I)||"").length,(((G=ae.blocks[0])==null?void 0:G.placeholder)||(ae.mask.includes("0")?"0":null))==="0"&&!/\d/.test(Y.key)){Y.preventDefault();return}}}}})});const H=Z=>{Z==null||Z.focus()};Se.onMount(()=>{_()&&setTimeout(()=>{R().focus()},50)}),Se.onDestroy(()=>{clearTimeout(y),R().reset()});function J(Z,Y){if(!Y){const re=G=>{o(I,Z.value)};return Z.addEventListener("input",re),Z.value=t(I)||"",{destroy(){Z.removeEventListener("input",re)}}}return D=jt(Z,{mask:Y}),D.unmaskedValue=t(I)||"",D.on("accept",()=>{o(I,D.unmaskedValue),$()}),D.on("complete",()=>{o(C,!0)}),{destroy(){D&&D.destroy()}}}x(()=>n(),()=>{o(a,n()=="Editing")}),x(()=>(t(T),t(I)),()=>{o(k,t(T)!==t(I))}),x(()=>(v(p()),v(S())),()=>{var Z;o(l,(Z=p())!=null&&Z.placeholder?p().placeholder:S())}),x(()=>v(p()),()=>{var Z;o(d,(Z=p())==null?void 0:Z.error)}),x(()=>(t(d),v(p())),()=>{var Z;o(u,t(d)?"ph ph-warning":(Z=p())==null?void 0:Z.icon)}),x(()=>(v(R()),v(c())),()=>{R().reset(c())}),Mt(),Dt();var de=uE();let fe,we;var pe=j(de);{var De=Z=>{var Y=aE();let re;Ce(()=>re=Me(Y,1,t(u)+" field-icon",null,re,{"with-error":t(d)})),w(Z,Y)};le(pe,Z=>{t(u)&&Z(De)})}var ke=Ee(pe,2);{var ye=Z=>{var Y=oE(),re=Ge(Y);let G,ae;vt(re,O=>o(E,O),()=>t(E)),Ut(()=>W("focusout",re,function(...O){var q;(q=R().focusout)==null||q.apply(this,O)})),Ut(()=>W("keydown",re,function(...O){var q;(q=R().handleKeyboard)==null||q.apply(this,O)})),Pr(re,O=>H==null?void 0:H(O)),Pr(re,(O,q)=>J==null?void 0:J(O,q),S);var z=Ee(re,2);{var ge=O=>{var q=sE();W("mousedown",q,us(er(function(...ne){var se;(se=R().clear)==null||se.apply(this,ne)}))),w(O,q)};le(z,O=>{t(I),v(p()),b(()=>{var q;return t(I)&&((q=p())==null?void 0:q.clearIcon)!==!1})&&O(ge)})}Ce(()=>{G=Me(re,1,"editor",null,G,{"with-icon":p().icon}),Vt(re,"placeholder",t(l)),ae=Ye(re,"",ae,{color:(t(C),v(p()),b(()=>t(C)?p().color:"var(--spectrum-global-color-gray-700)")),"text-align":(v(p()),b(()=>p().align=="center"?"center":p().align=="flex-end"?"right":"left")),"padding-right":(v(p()),b(()=>p().align!="flex-start"?"2rem":"0.75rem"))})}),w(Z,Y)},ce=Z=>{var Y=lE();let re,G;var ae=j(Y),z=j(ae);Ce(ge=>{re=Me(Y,1,"value",null,re,{"with-icon":p().icon,placeholder:!c()}),Vt(Y,"tabindex",(v(p()),b(()=>p().readonly||p().disabled?"-1":"0"))),G=Ye(Y,"",G,{"justify-content":(v(p()),b(()=>p().align))}),Xe(z,ge)},[()=>(t(I),t(l),b(()=>U(t(I))||t(l)))]),W("focusin",Y,function(...ge){var O;(O=R().focus)==null||O.apply(this,ge)}),w(Z,Y)};le(ke,Z=>{t(a)?Z(ye):Z(ce,!1)})}Ce(()=>{fe=Me(de,1,"superCell",null,fe,{inEdit:t(a),isDirty:t(k)&&p().showDirty,focused:t(a),inline:p().role=="inlineInput",tableCell:p().role=="tableCell",formInput:p().role=="formInput",disabled:p().disabled,readonly:p().readonly,error:p().error||t(I)&&S()&&!t(C),complete:t(C)}),we=Ye(de,"",we,{color:(v(p()),b(()=>p().color)),background:(n(),v(p()),b(()=>n()=="Editing"&&p().role!="inline"?"var(--spectrum-global-color-gray-50)":p().background)),"font-weight":(v(p()),b(()=>p().fontWeight))})}),w(e,de),Ct(),s()}var dE=F("<span> </span>"),fE=F('<i class="ph ph-x svelte-1nqvnqd"></i>'),hE=F('<div class="tag svelte-1nqvnqd"><span class="tag-wrap svelte-1nqvnqd"><span> </span></span> <!></div>'),gE=F('<i class="ph ph-plus actionIcon svelte-1nqvnqd"></i>'),vE=F('<div class="option loading svelte-1nqvnqd"><i class="ri-loader-2-line rotating svelte-1nqvnqd"></i> Loading...</div>'),pE=F('<i class="ri-checkbox-blank-fill svelte-1nqvnqd"></i>'),mE=F('<div><span class="svelte-1nqvnqd"><!> </span></div>'),_E=F('<div class="option loading svelte-1nqvnqd"><i class="ri-loader-2-line rotating svelte-1nqvnqd"></i> Loading more...</div>'),bE=F("<!> <!>",1),yE=F('<div class="option not-found svelte-1nqvnqd"><span class="svelte-1nqvnqd"><i class="ri-close-line svelte-1nqvnqd"></i> No matches found, Tag will be added as new</span></div>'),wE=F('<div class="options svelte-1nqvnqd"><!></div>'),EE=F('<div class="editor" tabindex="-1"><div class="searchControl svelte-1nqvnqd"><i></i> <input type="text" class="searchInput svelte-1nqvnqd"/></div> <!></div>'),SE=F('<div><div tabindex="-1"><!> <div class="tags svelte-1nqvnqd" tabindex="-1"><!> <!></div></div></div> <!>',1);function CE(e,r){var it;St(r,!1);const n=()=>He(X,"$dataSourceStore",u),i=()=>He(t(U),"$fetch",u),s=()=>He(K(),"$cellState",u),a=()=>He(G,"$options",u),l=()=>He(ue,"$colors",u),d=()=>He(V,"$editorState",u),[u,g]=qt(),c=h(),p=h(),_=h(),S=h(),y=h(),T=h(),I=h(),k=h(),C=h(),D=h(),E=h(),U=h(),$=h(),R=h(),H=h(),J=h(),de=Se.createEventDispatcher(),{API:fe,QueryUtils:we,fetchData:pe,memo:De,derivedMemo:ke}=Se.getContext("sdk");let ye=m(r,"cellOptions",8),ce=m(r,"value",8),Z=m(r,"autofocus",8),Y=h(),re=h(),G=De([]),ae={},z=h([]),ge=h(-1),O,q=h(),ne=h(30),se=h(!0),ee=h(ce()?[...ce()]:[]),me,Ne=h(""),Ue=h();const he=_e=>{if(!_e||!_e.length)return;const We=new Set((t(ee)||[]).map(Ae=>String(Ae||"").toLowerCase().trim())),Ke=[];_e.forEach(Ae=>{const je=String(Ae||"").trim();je&&!We.has(je.toLowerCase())&&(Ke.push(je),We.add(je.toLowerCase()))}),Ke.length&&(o(ee,[...t(ee)||[],...Ke]),K().change())},ue=ke(G,_e=>{let We={};return _e.forEach((Ke,Ae)=>We[Ke]=ae[Ke]??Q[Ae%14]),We}),Q=["hsla(358, 95%, 80%, 0.35)","hsla(22, 90%, 78%, 0.35)","hsla(45, 85%, 76%, 0.35)","hsla(110, 90%, 75%, 0.35)","hsla(175, 95%, 70%, 0.35)","hsla(205, 100%, 65%, 0.35)","hsla(245, 95%, 75%, 0.35)","hsla(310, 90%, 80%, 0.35)","hsla(15, 80%, 75%, 0.35)","hsla(60, 85%, 72%, 0.35)","hsla(135, 95%, 70%, 0.35)","hsla(190, 90%, 75%, 0.35)","hsla(260, 85%, 78%, 0.35)","hsla(330, 95%, 76%, 0.35)"];let B=h(JSON.stringify(Array.isArray(ce())?ce():ce()?[ce()]:[]));const X=De(((it=ye())==null?void 0:it.datasource)??{});let K=m(r,"cellState",24,()=>or("Loading",{"*":{goTo(_e){return _e},refresh(){return Qe(G,[]),"Loading"},loadDataOptions(_e){if(t(ie)){if(_e&&_e.length){const We=_e.map(Ke=>Ke[t(_)]);Qe(G,[...a(),...We])}o(ie,!1)}else Qe(G,[]),_e&&_e.length&&_e.forEach(We=>{a().push(We[t(_)])});Qe(G,a()),o(z,a()),t(se)&&o(se,!1)},loadCustomOptions(){var _e;(_e=t(S))!=null&&_e.length&&t(S).forEach(We=>{a().push(We.value||We)}),Qe(G,a())},clearFilters(){o(z,a())},reset(_e){o(ee,[..._e]),o(B,JSON.stringify(t(ee)))}},Loading:{_enter(){var _e;(!t(p)||(_e=i())!=null&&_e.loaded)&&this.goTo.debounce(5,ye().initialState||"View")},_exit(){var _e;ye().suggestions?this.loadDataOptions((_e=i())==null?void 0:_e.rows):ye().optionsSource=="custom"&&this.loadCustomOptions(),o(z,a())},syncFetch(_e){if(_e!=null&&_e.loaded)return ye().initialState||"View"}},View:{_enter(){},focus(_e){if(!ye().readonly&&!ye().disabled)return"Editing"}},Editing:{_enter(){o(B,JSON.stringify(Array.isArray(ce())?ce():ce()?[ce()]:[])),this.clearFilters(),V.open(),de("enteredit")},_exit(){V.close(),de("exitedit")},focus(){var _e;(_e=t(Y))==null||_e.focus()},focusout(_e){var We,Ke;(We=t(Y))!=null&&We.contains(_e.relatedTarget)||(Ke=t(re))!=null&&Ke.contains(_e.relatedTarget)||this.submit()},change(){ye().debounce&&(clearTimeout(O),O=setTimeout(()=>{de("change",t(ee))},ye().debounce))},submit(){if(t(H))return de("change",t(ee)),"View";this.cancel()},clear(){o(ee,[]),this.submit()},cancel(){var _e;return V.close(),o(ee,JSON.parse(t(B))),(_e=t(Y))==null||_e.blur(),"View"}}})),V=or("Closed",{"*":{close(){return"Closed"},toggleOption(_e){if(!(ye().disabled||ye().readonly))if(typeof _e=="string"){let We=_e,Ke=t(ee).indexOf(We);Ke>-1?(t(ee).splice(Ke,1),o(ee,[...t(ee)])):he([We]),K().change(),A()}else{if(_e<0)return;let We=t(z)[_e],Ke=t(ee).indexOf(We);Ke>-1?(t(ee).splice(Ke,1),o(ee,[...t(ee)])):he([We]),K().change(),A()}}},Open:{_enter(){o(ge,-1),setTimeout(()=>{var _e;return(_e=t(Ue))==null?void 0:_e.focus()},0),V.filterOptions(t(Ne))},_exit(){if(me!=null&&me.trim()&&t(z).length==0){const _e=me.split(",").map(We=>We.trim()).filter(We=>We);he(_e)}o(Ne,""),me=null},filterOptions(_e){var We;if(_e?me=_e.trim():me=null,ye().suggestions){let Ke=[];_e?Ke=[...ye().filter||[],{field:t(_),type:"string",operator:"fuzzy",value:_e,valueType:"Value"}]:Ke=ye().filter||[],o(ie,!1),(We=t(U))==null||We.update({query:we.buildQuery(Ke)}),o(z,a())}else _e?o(z,a().filter(Ke=>Ke==null?void 0:Ke.toLocaleLowerCase().startsWith(_e.toLocaleLowerCase()))):o(z,a())},toggle(){return"Closed"},handleInputKeyboard(_e){var We,Ke;if(_e.key=="Enter"){if(me!=null&&me.trim()){const Ae=me.split(",").map(je=>je.trim()).filter(je=>je);he(Ae),me=null,o(Ne,""),setTimeout(()=>{var je;return(je=t(Ue))==null?void 0:je.focus()},0)}_e.preventDefault();return}if(_e.key==" "&&t(ge)>-1&&(this.toggleOption(t(ge)),_e.preventDefault()),_e.key=="Tab"){(We=t(Y))==null||We.focus(),V.close(),_e.preventDefault();return}if(_e.key=="Escape"){me=null,V.close(),(Ke=t(Y))==null||Ke.focus(),_e.preventDefault(),_e.stopPropagation();return}_e.key=="ArrowDown"&&this.highlightNext(_e.stopPropagation()),_e.key=="ArrowUp"&&this.highlightPrevious(_e.preventDefault(),_e.stopPropagation()),_e.key=="Escape"&&K().cancel()},handleKeyboard(_e){_e.keyCode==32&&(t(ge)>-1?this.toggleOption(t(ge)):ye().autocomplete||this.close(_e.preventDefault())),_e.key=="Escape"&&K().cancel(),(_e.key=="Enter"||_e.key=="Tab")&&t(ge)>-1&&t(z)[t(ge)]&&this.toggleOption(t(ge)),_e.key=="ArrowDown"&&this.highlightNext(),_e.key=="ArrowUp"&&this.highlightPrevious(_e.preventDefault()),t(c)!="inputSelect"},highlightNext(){o(ge,t(ge)+1),t(ge)>t(z).length-1&&o(ge,0)},highlightPrevious(){o(ge,t(ge)-1),t(ge)<0&&o(ge,t(z).length-1)}},Closed:{toggle(){return"Open"},open(){return"Open"},highlightNext(){this.open(),o(ge,0)},handleInputKeyboard(_e){_e.key=="Escape"&&K().cancel(),_e.key!="Tab"&&(this.open(),o(ge,0))},handleKeyboard(_e){_e.key=="Escape"&&K().cancel(),t(c)=="select"&&_e.key!="Tab"&&((_e.key=="ArrowDown"||_e.keyCode==32)&&this.toggle(),(_e.key=="Backspace"||_e.key=="Delete")&&(o(ee,[]),K().change()))}}}),ie=h(!1);const N=()=>{var _e,We,Ke,Ae;(_e=i())!=null&&_e.loading||((Ke=(We=i())==null?void 0:We.rows)==null?void 0:Ke.length)<t(ne)||(o(ie,!0),o(ne,t(ne)+100),(Ae=t(U))==null||Ae.update({limit:t(ne)}))},A=()=>{var Ke,Ae,je;t(z).filter(et=>{var lt;return!((lt=t(ee))!=null&<.includes(et))}).length<10&&!((Ke=i())!=null&&Ke.loading)&&((je=(Ae=i())==null?void 0:Ae.rows)==null?void 0:je.length)>=t(ne)&&N()},M=_e=>{const We=_e.target,Ke=We.scrollTop,Ae=We.scrollHeight,je=We.clientHeight;Ke+je>=Ae-50&&N()},te=_e=>{if(t(p))return pe({API:fe,datasource:_e,options:{limit:t(ne)}})};Se.onMount(()=>{Z()&&setTimeout(()=>{K().focus()},30)}),Se.onDestroy(()=>{clearTimeout(O)}),x(()=>(t(c),t(p),t(_),t(S),t(y),t(T),t(I),t(k),t(C),t(D),t(E),v(ye())),()=>{(_e=>{o(c,_e.controlType),o(p,_e.suggestions),o(_,_e.valueColumn),o(S,_e.customOptions),o(y,_e.optionsViewMode),o(T,_e.role),o(I,_e.readonly),o(k,_e.disabled),o(C,_e.error),o(D,_e.color),o(E,_e.background)})(ye())}),x(()=>v(ye()),()=>{X.set(ye().datasource)}),x(()=>n(),()=>{sn(o(U,te(n())),"$fetch",u)}),x(()=>v(ye()),()=>{ye().suggestions&&(o(ne,15),o(se,!0),o(ie,!1))}),x(()=>v(ye()),()=>{o($,we.buildQuery(ye().filter))}),x(()=>(t(U),t($),t(ne)),()=>{var _e;(_e=t(U))==null||_e.update({query:t($),limit:t(ne)})}),x(()=>(v(K()),i()),()=>{K().syncFetch(i())}),x(()=>(v(K()),i()),()=>{var _e;K().loadDataOptions((_e=i())==null?void 0:_e.rows)}),x(()=>(v(K()),v(ce())),()=>{K().reset(ce())}),x(()=>t(ee),()=>{o(R,t(ee).length<1)}),x(()=>s(),()=>{o(J,s()=="Editing")}),x(()=>(t(J),t(B),t(ee)),()=>{o(H,t(J)&&t(B)!==JSON.stringify(t(ee)))}),x(()=>(t(z),t(p),i()),()=>{var _e;t(z)&&t(p)&&!((_e=i())!=null&&_e.loading)&&setTimeout(()=>A(),0)}),Mt(),Dt();var ve=SE(),Ie=Ge(ve);let Pe,Re;var oe=j(Ie);let Oe;var Fe=j(oe);{var Be=_e=>{var We=dE(),Ke=j(We);Ce(()=>Xe(Ke,(v(ye()),b(()=>ye().placeholder||"Add some Tags")))),w(_e,We)};le(Fe,_e=>{t(R)&&!t(J)&&_e(Be)})}var Le=Ee(Fe,2);let Te;var qe=j(Le);{var Ze=_e=>{var We=$e(),Ke=Ge(We);At(Ke,1,()=>t(ee),Ft,(Ae,je,et)=>{var lt=hE();let mt;var Ot=j(lt),It=j(Ot),Lt=j(It),Tt=Ee(Ot,2);{var ut=rt=>{var st=fE();Ye(st,"",{},{"font-size":"12px","z-index":2}),W("mousedown",st,er(dr(()=>V.toggleOption(t(je))))),w(rt,st)};le(Tt,rt=>{t(J)&&rt(ut)})}Ce(()=>{mt=Ye(lt,"",mt,{"--option-color":(l(),t(je),b(()=>l()[t(je)]||Q[et%Q.length]))}),Xe(Lt,t(je))}),w(Ae,lt)}),w(_e,We)};le(qe,_e=>{t(ee),b(()=>t(ee).length)&&_e(Ze)})}var Je=Ee(qe,2);{var nt=_e=>{var We=gE();W("mouseup",We,er(dr(function(...Ke){var Ae;(Ae=V.toggle)==null||Ae.apply(this,Ke)}))),w(_e,We)};le(Je,_e=>{t(J)&&_e(nt)})}vt(Ie,_e=>o(Y,_e),()=>t(Y));var at=Ee(Ie,2);{var ct=_e=>{{let We=Pt(()=>d()=="Open");Qr(_e,{get anchor(){return t(Y)},useAnchorWidth:!0,maxHeight:250,get open(){return t(We)},children:(Ke,Ae)=>{var je=EE(),et=j(je),lt=j(et);let mt;var Ot=Ee(lt,2);vt(Ot,Tt=>o(Ue,Tt),()=>t(Ue));var It=Ee(et,2);{var Lt=Tt=>{var ut=wE(),rt=j(ut);{var st=ft=>{var _t=$e(),Bt=Ge(_t);{var Rt=kt=>{var tr=vE();w(kt,tr)},Ht=kt=>{var tr=$e(),nr=Ge(tr);{var Wt=ar=>{var Gt=bE(),hr=Ge(Gt);At(hr,1,()=>t(z),Ft,(wr,gr,Nr)=>{var Lr=$e(),Tn=Ge(Lr);{var _r=ln=>{var Fr=mE();let Zn,zi;var pa=j(Fr),di=j(pa);{var Fn=un=>{var $r=pE();w(un,$r)};le(di,un=>{v(ye()),b(()=>ye().optionsViewMode!=="text")&&un(Fn)})}var _n=Ee(di);Ce(()=>{Zn=Me(Fr,1,"option svelte-1nqvnqd",null,Zn,{text:t(y)=="text",focused:t(ge)===Nr}),zi=Ye(Fr,"",zi,{"--option-color":(l(),t(gr),b(()=>l()[t(gr)]))}),Xe(_n,` ${t(gr)??""}`)}),W("mousedown",Fr,er(un=>V.toggleOption(Nr))),W("mouseenter",Fr,()=>o(ge,Nr)),w(ln,Fr)};le(Tn,ln=>{t(ee),t(gr),b(()=>{var Fr;return!((Fr=t(ee))!=null&&Fr.includes(t(gr)))})&&ln(_r)})}w(wr,Lr)});var qr=Ee(hr,2);{var Dr=wr=>{var gr=_E();w(wr,gr)};le(qr,wr=>{i(),b(()=>{var gr;return(gr=i())==null?void 0:gr.loading})&&wr(Dr)})}w(ar,Gt)},Zt=ar=>{var Gt=yE();w(ar,Gt)};le(nr,ar=>{t(z),b(()=>{var Gt;return(Gt=t(z))==null?void 0:Gt.length})?ar(Wt):ar(Zt,!1)},!0)}w(kt,tr)};le(Bt,kt=>{i(),b(()=>{var tr,nr,Wt;return((tr=i())==null?void 0:tr.loading)&&!((Wt=(nr=i())==null?void 0:nr.rows)!=null&&Wt.length)})?kt(Rt):kt(Ht,!1)})}w(ft,_t)};le(rt,ft=>{t(p)&&ft(st)})}vt(ut,ft=>o(q,ft),()=>t(q)),W("wheel",ut,ft=>ft.stopPropagation()),W("mouseleave",ut,()=>o(ge,-1)),W("scroll",ut,function(...ft){var _t;(_t=t(p)?M:null)==null||_t.apply(this,ft)}),W("mousedown",ut,er(dr(function(ft){Yn.call(this,r,ft)}))),w(Tt,ut)};le(It,Tt=>{t(p)&&Tt(Lt)})}vt(je,Tt=>o(re,Tt),()=>t(re)),Ce(()=>{mt=Me(lt,1,Sn(t(p)?"ph ph-magnifying-glass":"ph ph-pencil-simple"),"svelte-1nqvnqd",mt,{actionIcon:!0}),Vt(Ot,"placeholder",t(p)?"Search or Add":"Enter tag...")}),ta(Ot,()=>t(Ne),Tt=>o(Ne,Tt)),W("input",Ot,Tt=>V.filterOptions(Tt.target.value)),W("focusout",Ot,function(...Tt){var ut;(ut=K().focusout)==null||ut.apply(this,Tt)}),W("keydown",et,function(...Tt){var ut;(ut=V.handleInputKeyboard)==null||ut.apply(this,Tt)}),w(Ke,je)},$$slots:{default:!0}})}};le(at,_e=>{t(J)&&_e(ct)})}Ce(()=>{Pe=Me(Ie,1,"superCell",null,Pe,{isDirty:t(H)&&ye().showDirty,inEdit:t(J),disabled:t(k),readonly:t(I),error:t(C),multirow:!0,inline:t(T)=="inlineInput",tableCell:t(T)=="tableCell",formInput:t(T)=="formInput"}),Vt(Ie,"tabindex",(v(ye()),b(()=>{var _e;return(_e=ye())!=null&&_e.disabled?-1:0}))),Re=Ye(Ie,"",Re,{color:t(D),background:t(E)}),Oe=Me(oe,1,"value svelte-1nqvnqd",null,Oe,{placeholder:t(R)}),Te=Ye(Le,"",Te,{"justify-content":(v(ye()),b(()=>ye().align??"flex-start")),"flex-wrap":"wrap"})}),W("focusin",Ie,function(..._e){var We;(We=K().focus)==null||We.apply(this,_e)}),W("focusout",Ie,function(..._e){var We;(We=K().focusout)==null||We.apply(this,_e)}),W("keydown",Ie,function(..._e){var We;(We=V.handleKeyboard)==null||We.apply(this,_e)}),w(e,ve),Ct(),g()}var AE=F('<button class="btn-delete svelte-ab5e84" tabindex="-1" aria-label="Delete" title="Delete" type="button"><i class="ph ph-trash-simple"></i></button>'),TE=F('<div><button class="btn-download svelte-ab5e84" tabindex="-1" type="button"><i class="ph ph-download-simple"></i></button> <a class="filename svelte-ab5e84"> </a> <!></div>'),kE=F('<button class="btn-upload-empty list svelte-ab5e84" aria-label="Upload attachment" type="button"><i class="ph ph-plus"></i> Add Attachment</button>'),DE=F('<div class="attachments svelte-ab5e84"><!> <!></div>'),xE=F('<button type="button"></button>'),OE=F('<button class="btn-nav svelte-ab5e84" aria-label="Previous attachment" type="button"><i class="ph ph-caret-left"></i></button> <div class="indicators svelte-ab5e84"></div> <button class="btn-nav svelte-ab5e84" aria-label="Next attachment" type="button"><i class="ph ph-caret-right"></i></button> <button class="btn-nav svelte-ab5e84" style="align-self: flex-end;" aria-label="Full Screen" type="button"><i class="ph ph-arrows-out-simple"></i></button>',1),IE=F('<button class="btn-nav add svelte-ab5e84" style="align-self: flex-end;" aria-label="Next attachment" type="button"><i class="ph ph-upload"></i></button>'),RE=F('<div class="carousel-controls svelte-ab5e84"><!> <!></div>'),PE=F("<div><!></div>"),ME=F('<div class="carousel-fallback svelte-ab5e84"><div class="pill svelte-ab5e84"> </div> <span class="filename svelte-ab5e84"> </span></div>'),NE=F('<div class="carousel-content svelte-ab5e84"><!></div>'),LE=F('<button class="btn-upload-empty svelte-ab5e84" aria-label="Upload attachment" type="button"><i class="ph ph-plus"></i> Upload Attachment</button>'),FE=F('<div class="carousel-placeholder svelte-ab5e84"><!></div>'),VE=F('<div class="carousel svelte-ab5e84"><!></div>'),UE=F('<div class="slot-container svelte-ab5e84"><!></div>'),BE=F('<div class="grid-overlay-top svelte-ab5e84"><button class="btn-grid-download svelte-ab5e84" tabindex="-1" type="button"><i class="ph ph-download-simple"></i></button> <button class="btn-grid-delete svelte-ab5e84" tabindex="-1" type="button"><i class="ph ph-trash-simple"></i></button></div>'),HE=F('<div><div class="grid-image svelte-ab5e84" role="button" tabindex="0"><!> <!></div></div>'),zE=F('<div><div class="grid-fallback svelte-ab5e84"><div class="pill svelte-ab5e84"> </div> <span class="filename svelte-ab5e84"> </span></div></div>'),jE=F('<div class="grid-item grid-add-item svelte-ab5e84"><button class="btn-upload-empty grid svelte-ab5e84" aria-label="Upload attachment" type="button"><i class="ph ph-plus"></i> <span>Add Images</span></button></div>'),GE=F("<!> <!>",1),qE=F('<button class="btn-upload-empty grid svelte-ab5e84" aria-label="Upload attachment" type="button"><i class="ph ph-plus"></i> <span>Add Images</span></button>'),WE=F('<div class="grid-empty svelte-ab5e84"><!></div>'),YE=F('<div class="attachment-grid-wrapper svelte-ab5e84"><div class="attachment-grid svelte-ab5e84"><!></div></div>'),KE=F('<div class="bulk-actions-overlay svelte-ab5e84"><button class="btn-bulk-action btn-close svelte-ab5e84" type="button" title="Clear Selection"><i class="ph ph-x"></i></button> <span class="selection-count svelte-ab5e84"> </span> <button class="btn-bulk-action btn-bulk-delete svelte-ab5e84" type="button" title="Delete Selected"><i class="ph ph-trash-simple"></i></button></div>'),XE=F('<div tabindex="0"><!> <!> <input type="file" style="display: none"/> <!></div>');function QE(e,r){St(r,!1);const n=()=>He(Z(),"$cellState",i),[i,s]=qt(),a=h(),l=h(),d=h(),u=h(),g=h(),c=h(),p=h(),_=h(),S=h(),y=h(),T=h(),I=h(),k=h(),C=h();let D=m(r,"value",12),E=m(r,"cellOptions",8),U=m(r,"fieldSchema",8),$=m(r,"tableid",8),R=m(r,"API",8);const H="auto";let J=m(r,"inBuilder",8);const de=Se.createEventDispatcher();let fe=D(),we=h(),pe=h(),De=h(),ke=h(new Set),ye=h(0),ce=h(!1),Z=m(r,"cellState",24,()=>or(E().initialState??"View",{"*":{goTo(A){return A}},View:{_enter(){},focus(){if(!E().readonly)return"Editing"}},Editing:{_enter(){var A;fe=D(),(A=t(we))==null||A.focus(),de("enteredit")},_exit(){de("exitedit")},focousout(A){var M;if(!((M=t(we))!=null&&M.contains(A.relatedTarget)))return"View"},change(A){E().debounce&&de("change",D())},submit(A){return D()!==fe&&de("change",D()),de("focusout"),"View"},cancel(){return D(fe),"View"}}}));const Y=async A=>{let M=new FormData;for(let te=0;te<A.length;te++)M.append("file",A[te]);try{let te=await R().uploadAttachment($(),M);return de("change",[...t(l),...te]),te}catch(te){return console.error("Upload failed:",te),[]}};function re(A){t(l).splice(A,1),o(l,[...t(l)]),de("change",t(l))}function G(A){const M=new Set(t(ke));M.has(A)?M.delete(A):M.add(A),o(ke,M)}function ae(){o(ke,new Set)}function z(){if(t(ke).size===0)return;Array.from(t(ke)).sort((M,te)=>te-M).forEach(M=>{t(l).splice(M,1)}),o(l,t(l)),ae(),de("change",t(l))}function ge(){t(De)&&t(De).click()}function O(A){const M=A.target,te=Array.from(M.files||[]);Y(te)}function q(A){var M;!t(_)&&!J()&&((M=t(l))!=null&&M[A])&&se(t(l)[A])&&o(ce,!0)}const ne={next(){var A;((A=t(l))==null?void 0:A.length)>1&&(o(ye,(t(ye)+1)%t(l).length),de("view",{attachment:t(l)[t(ye)],index:t(ye)}))},prev(){var A;((A=t(l))==null?void 0:A.length)>1&&(o(ye,(t(ye)-1+t(l).length)%t(l).length),de("view",{attachment:t(l)[t(ye)],index:t(ye)}))},goTo(A){var M;A>=0&&A<((M=t(l))==null?void 0:M.length)&&(o(ye,A),de("view",{attachment:t(l)[t(ye)],index:t(ye)}))},handleKeydown(A){var M;t(d)==="carousel"&&((M=t(l))==null?void 0:M.length)>1&&(A.key==="ArrowLeft"?(A.preventDefault(),this.prev()):A.key==="ArrowRight"&&(A.preventDefault(),this.next()))}};function se(A){var te;return["jpg","jpeg","png","gif","bmp","webp"].includes((te=A.extension)==null?void 0:te.toLowerCase())}function ee(A){var M,te;if(!(!t(y)||t(y)==="none")){if(t(y)==="view")q(A);else if(t(y)==="select")G(A);else if(t(y)==="custom"){let ve=t(l)[A];(te=(M=E()).onItemClick)==null||te.call(M,{item:ve,index:A})}}}x(()=>v(U()),()=>{var A,M;o(a,((M=(A=U())==null?void 0:A.type)==null?void 0:M.includes("single"))!==!0)}),x(()=>(v(D()),t(a)),()=>{o(l,D()&&t(a)?D():D()?[D()]:[])}),x(()=>v(E()),()=>{o(d,E().controlType||"list")}),x(()=>v(E()),()=>{o(u,E().imageRatio||"landscape")}),x(()=>v(E()),()=>{o(g,E().gridColumns||4)}),x(()=>v(E()),()=>{o(c,!E().readonly&&!E().disabled)}),x(()=>v(E()),()=>{o(p,E().isGallery)}),x(()=>v(E()),()=>{o(_,E().disabled)}),x(()=>v(E()),()=>{o(S,E().readonly)}),x(()=>v(E()),()=>{o(y,E().onClickAction)}),x(()=>n(),()=>{o(T,n()=="Editing")}),x(()=>(t(S),t(_),t(p)),()=>{o(I,!t(S)&&!t(_)&&!t(p))}),x(()=>(t(S),t(_),t(p)),()=>{o(k,!t(S)&&!t(_)&&!t(p))}),x(()=>v(E()),()=>{o(C,E().slotted)}),Mt();var me={height:H};Dt();var Ne=XE();let Ue,he;var ue=j(Ne);{var Q=A=>{var M=DE(),te=j(M);{var ve=Re=>{var oe=$e(),Oe=Ge(oe);At(Oe,1,()=>t(l),Ft,(Fe,Be,Le)=>{var Te=TE();let qe;var Ze=j(Te),Je=Ee(Ze,2),nt=j(Je),at=Ee(Je,2);{var ct=it=>{var _e=AE();W("click",_e,()=>re(Le)),w(it,_e)};le(at,it=>{t(S)||it(ct)})}Ce(it=>{qe=Me(Te,1,"attachment svelte-ab5e84",null,qe,it),Vt(Ze,"aria-label",`Download ${t(Be),b(()=>t(Be).name)??""}`),Vt(Ze,"title",`Download ${t(Be),b(()=>t(Be).name)??""}`),Vt(Je,"href",(t(Be),b(()=>t(Be).url))),Xe(nt,(t(Be),b(()=>t(Be).name)))},[()=>({focused:t(pe)===Le,selected:t(ke).has(Le)})]),W("click",Ze,()=>re(Le)),W("mouseenter",Te,()=>o(pe,Le)),W("click",Te,()=>G(Le)),w(Fe,Te)}),w(Re,oe)};le(te,Re=>{t(l),b(()=>{var oe;return(oe=t(l))==null?void 0:oe.length})&&Re(ve)})}var Ie=Ee(te,2);{var Pe=Re=>{var oe=kE();let Oe;Ce(()=>{oe.disabled=(v(E()),b(()=>E().disabled||E().readonly)),Oe=Ye(oe,"",Oe,{"margin-top":(t(l),b(()=>{var Fe;return(Fe=t(l))!=null&&Fe.length?"0.5rem":"0"}))})}),W("click",oe,ge),w(Re,oe)};le(Ie,Re=>{t(c)&&Re(Pe)})}w(A,M)},B=A=>{var M=$e(),te=Ge(M);{var ve=Pe=>{var Re=VE(),oe=j(Re);{var Oe=Be=>{var Le=NE(),Te=j(Le);{var qe=Je=>{var nt=PE();let at;var ct=j(nt);{var it=_e=>{var We=RE(),Ke=j(We);{var Ae=lt=>{var mt=OE(),Ot=Ge(mt),It=Ee(Ot,2);At(It,5,()=>t(l),Ft,(ut,rt,st)=>{var ft=xE();let _t;Vt(ft,"aria-label",`Go to attachment ${st+1}`),Ce(()=>{_t=Me(ft,1,"indicator svelte-ab5e84",null,_t,{active:st===t(ye)}),ft.disabled=(v(E()),b(()=>E().disabled))}),W("click",ft,dr(()=>ne.goTo(st))),w(ut,ft)});var Lt=Ee(It,2),Tt=Ee(Lt,2);Ce(()=>{Ot.disabled=(v(E()),b(()=>E().disabled)),Lt.disabled=(v(E()),b(()=>E().disabled)),Tt.disabled=(v(E()),b(()=>E().disabled))}),W("click",Ot,dr(function(...ut){var rt;(rt=ne.prev)==null||rt.apply(this,ut)})),W("click",Lt,dr(function(...ut){var rt;(rt=ne.next)==null||rt.apply(this,ut)})),W("click",Tt,dr(()=>q(t(ye)))),w(lt,mt)};le(Ke,lt=>{t(l),b(()=>t(l).length>1)&<(Ae)})}var je=Ee(Ke,2);{var et=lt=>{var mt=IE();W("click",mt,dr(ge)),w(lt,mt)};le(je,lt=>{t(c)&<(et)})}w(_e,We)};le(ct,_e=>{t(l),t(c),b(()=>t(l).length>1||t(c))&&_e(it)})}Ce(_e=>{at=Me(nt,1,"carousel-image svelte-ab5e84",null,at,_e),Ye(nt,`background-image: url('${t(l),t(ye),b(()=>t(l)[t(ye)].url)??""}')`),Vt(nt,"aria-label",(t(l),t(ye),b(()=>t(l)[t(ye)].name)))},[()=>({selected:t(ke).has(t(ye))})]),W("click",nt,()=>{t(T)&&ee(t(l)[t(ye)],t(ye))}),w(Je,nt)},Ze=Je=>{var nt=$e(),at=Ge(nt);{var ct=it=>{var _e=ME(),We=j(_e),Ke=j(We),Ae=Ee(We,2),je=j(Ae);Ce(et=>{Xe(Ke,et),Xe(je,(t(l),t(ye),b(()=>t(l)[t(ye)].name)))},[()=>(t(l),t(ye),b(()=>{var et;return(et=t(l)[t(ye)].extension)==null?void 0:et.toUpperCase()}))]),w(it,_e)};le(at,it=>{t(p)||it(ct)},!0)}w(Je,nt)};le(Te,Je=>{t(l),t(ye),b(()=>se(t(l)[t(ye)]))?Je(qe):Je(Ze,!1)})}w(Be,Le)},Fe=Be=>{var Le=$e(),Te=Ge(Le);{var qe=Ze=>{var Je=FE(),nt=j(Je);{var at=ct=>{var it=LE();Ce(()=>it.disabled=(v(E()),b(()=>E().disabled||E().readonly))),W("click",it,ge),w(ct,it)};le(nt,ct=>{t(c)&&ct(at)})}w(Ze,Je)};le(Te,Ze=>{t(p)||Ze(qe)},!0)}w(Be,Le)};le(oe,Be=>{t(l),b(()=>{var Le;return(Le=t(l))==null?void 0:Le.length})?Be(Oe):Be(Fe,!1)})}w(Pe,Re)},Ie=Pe=>{var Re=$e(),oe=Ge(Re);{var Oe=Fe=>{var Be=YE(),Le=j(Be);let Te;var qe=j(Le);{var Ze=nt=>{var at=GE(),ct=Ge(at);At(ct,1,()=>t(l),Ft,(We,Ke,Ae)=>{var je=$e(),et=Ge(je);{var lt=Ot=>{var It=HE();let Lt;var Tt=j(It),ut=j(Tt);{var rt=_t=>{var Bt=UE(),Rt=j(Bt);vr(Rt,r,"default",{},null),w(_t,Bt)};le(ut,_t=>{t(C)&&_t(rt)})}var st=Ee(ut,2);{var ft=_t=>{var Bt=BE(),Rt=j(Bt),Ht=Ee(Rt,2);Ce(()=>{Vt(Rt,"aria-label",`Download ${t(Ke),b(()=>t(Ke).name)??""}`),Vt(Ht,"aria-label",`Delete ${t(Ke),b(()=>t(Ke).name)??""}`)}),W("click",Rt,()=>{const kt=document.createElement("a");kt.href=t(Ke).url,kt.download=t(Ke).name,document.body.appendChild(kt),kt.click(),document.body.removeChild(kt)}),W("click",Ht,()=>re(Ae)),w(_t,Bt)};le(st,_t=>{!t(p)&&!t(S)&&_t(ft)})}Ce(_t=>{Lt=Me(It,1,"grid-item svelte-ab5e84",null,Lt,_t),Ye(It,`aspect-ratio: ${t(u)==="landscape"?"4 / 3":t(u)==="square"?"1 / 1":"3 / 4"}`),Ye(Tt,`background-image: url('${t(Ke),b(()=>t(Ke).url)??""}');`),Vt(Tt,"aria-label",(t(Ke),b(()=>t(Ke).name)))},[()=>({focused:t(pe)===Ae,selected:t(ke).has(Ae)})]),W("click",Tt,()=>ee(t(Ke))),W("keydown",Tt,_t=>_t.key==="Enter"&&G(Ae)),w(Ot,It)},mt=Ot=>{var It=$e(),Lt=Ge(It);{var Tt=ut=>{var rt=zE();let st;var ft=j(rt),_t=j(ft),Bt=j(_t),Rt=Ee(_t,2),Ht=j(Rt);Ce((kt,tr)=>{st=Me(rt,1,"grid-item svelte-ab5e84",null,st,kt),Ye(rt,`aspect-ratio: ${t(u)==="landscape"?"4 / 3":t(u)==="square"?"1 / 1":"3 / 4"}`),Xe(Bt,tr),Xe(Ht,(t(Ke),b(()=>t(Ke).name)))},[()=>({focused:t(pe)===Ae,selected:t(ke).has(Ae)}),()=>(t(Ke),b(()=>{var kt;return(kt=t(Ke).extension)==null?void 0:kt.toUpperCase()}))]),w(ut,rt)};le(Lt,ut=>{t(p)||ut(Tt)},!0)}w(Ot,It)};le(et,Ot=>{t(Ke),b(()=>se(t(Ke)))?Ot(lt):Ot(mt,!1)})}w(We,je)});var it=Ee(ct,2);{var _e=We=>{var Ke=jE(),Ae=j(Ke);Ce(()=>{Ye(Ke,`aspect-ratio: ${t(u)==="landscape"?"4 / 3":t(u)==="square"?"1 / 1":"3 / 4"}`),Ae.disabled=(v(E()),b(()=>E().disabled||E().readonly))}),W("click",Ae,ge),w(We,Ke)};le(it,We=>{t(c)&&We(_e)})}w(nt,at)},Je=nt=>{var at=WE(),ct=j(at);{var it=_e=>{var We=qE();Ce(()=>We.disabled=(v(E()),b(()=>E().disabled||E().readonly))),W("click",We,ge),w(_e,We)};le(ct,_e=>{t(c)&&_e(it)})}w(nt,at)};le(qe,nt=>{t(l),b(()=>{var at;return(at=t(l))==null?void 0:at.length})?nt(Ze):nt(Je,!1)})}Ce(()=>Te=Ye(Le,"",Te,{"--grid-columns":t(g)})),w(Fe,Be)};le(oe,Fe=>{t(d)=="grid"&&Fe(Oe)},!0)}w(Pe,Re)};le(te,Pe=>{t(d)=="carousel"?Pe(ve):Pe(Ie,!1)},!0)}w(A,M)};le(ue,A=>{t(d)=="list"?A(Q):A(B,!1)})}var X=Ee(ue,2);{var K=A=>{var M=KE(),te=j(M),ve=Ee(te,2),Ie=j(ve),Pe=Ee(ve,2);Ce(()=>Xe(Ie,`${t(ke),b(()=>t(ke).size==1?t(ke).size+" Item ":t(ke).size+" Items ")??""} Selected`)),W("click",te,ae),W("click",Pe,z),w(A,M)};le(X,A=>{t(ke),t(d),t(S),t(p),b(()=>t(ke).size>0&&t(d)==="grid"&&!t(S)&&!t(p))&&A(K)})}var V=Ee(X,2);vt(V,A=>o(De,A),()=>t(De));var ie=Ee(V,2);cu(ie,{get canSelect(){return t(I)},get canDelete(){return t(k)},get items(){return t(l)},set items(A){o(l,A)},get open(){return t(ce)},set open(A){o(ce,A)},get currentIndex(){return t(ye)},set currentIndex(A){o(ye,A)},get selectedIndices(){return t(ke)},set selectedIndices(A){o(ke,A)},$$events:{close:()=>console.log("closed")},$$legacy:!0}),vt(Ne,A=>o(we,A),()=>t(we)),Ce(()=>{Ue=Me(Ne,1,"superCell",null,Ue,{multirow:!0,inEdit:n()=="Editing",inline:E().role=="tableCell",tableCell:E().role=="tableCell",formInput:E().role=="formInput",disabled:E().disabled,readonly:E().readonly}),he=Ye(Ne,"",he,{color:(v(E()),b(()=>E().color)),background:(v(E()),b(()=>E().background))}),V.multiple=t(a)}),W("change",V,O),W("keydown",Ne,A=>{ne.handleKeydown(A)}),W("focusin",Ne,function(...A){var M;(M=Z().focus)==null||M.apply(this,A)}),W("focusout",Ne,function(...A){var M;(M=Z().focousout)==null||M.apply(this,A)}),w(e,Ne),pr(r,"height",H);var N=Ct(me);return s(),N}var ZE=F("<button></button>");function JE(e,r){let n=m(r,"active",8,!1);var i=ZE();let s;Ce(()=>s=Me(i,1,"sc-carousel-button sc-carousel-dot__dot svelte-1mtaq3v",null,s,{"sc-carousel-dot__dot_active":n()})),W("click",i,function(a){Yn.call(this,r,a)}),w(e,i)}var $E=F('<div class="sc-carousel-dots__dot-container svelte-1pld061"><!></div>'),eS=F('<div class="sc-carousel-dots__container svelte-1pld061"></div>');function tS(e,r){St(r,!1);const n=Se.createEventDispatcher();let i=m(r,"pagesCount",8,1),s=m(r,"currentPageIndex",8,0);function a(d){n("pageChange",d)}Dt();var l=eS();At(l,5,()=>(v(i()),b(()=>Array(i()))),Ft,(d,u,g)=>{var c=$E(),p=j(c);{let _=Pt(()=>s()===g);JE(p,{get active(){return t(_)},$$events:{click:()=>a(g)}})}w(d,c)}),w(e,l),Ct()}const Cs="prev",ca="next";var rS=F("<button><i></i></button>");function Eh(e,r){let n=m(r,"direction",8,ca),i=m(r,"disabled",8,!1);var s=rS();let a;var l=j(s);let d;Ce(()=>{a=Me(s,1,"sc-carousel-button sc-carousel-arrow__circle svelte-1pnlyzn",null,a,{"sc-carousel-arrow__circle_disabled":i()}),d=Me(l,1,"sc-carousel-arrow__arrow svelte-1pnlyzn",null,d,{"sc-carousel-arrow__arrow-next":n()===ca,"sc-carousel-arrow__arrow-prev":n()===Cs})}),W("click",s,function(u){Yn.call(this,r,u)}),w(e,s)}var nS=F('<div class="sc-carousel-progress__indicator svelte-1pc71g7"></div>');function iS(e,r){St(r,!1);const n=h(),i=100;let s=m(r,"value",8,0);x(()=>v(s()),()=>{o(n,Math.min(Math.max(s()*i,0),i))}),Mt();var a=nS();Ce(()=>Ye(a,`
|
|
14
|
+
width: ${t(n)??""}%;
|
|
15
|
+
`)),w(e,a),Ct()}function aS(e,r){e.addEventListener("mousedown",r),e.addEventListener("touchstart",r,{passive:!0})}function sS(e,r){e.removeEventListener("mousedown",r),e.removeEventListener("touchstart",r)}function oS(e,r){e.addEventListener("mouseup",r),e.addEventListener("touchend",r)}function Sh(e,r){e.removeEventListener("mouseup",r),e.removeEventListener("touchend",r)}function lS(e,r){e.addEventListener("mousemove",r),e.addEventListener("touchmove",r)}function Ch(e,r){e.removeEventListener("mousemove",r),e.removeEventListener("touchmove",r)}function vu(e){return function(r,n){e.dispatchEvent(new CustomEvent(r,{detail:n}))}}const uS=110,cS=9,dS=111,fS=20;function pu(e){if("TouchEvent"in window&&e instanceof TouchEvent){const r=e.touches[0];return{x:r?r.clientX:0,y:r?r.clientY:0}}return{x:e.clientX,y:e.clientY}}function mu(e,{thresholdProvider:r}){const n=vu(e);let i,s,a=0,l,d=!1;function u(){return Date.now()-l>=dS&&Math.abs(a)>=fS}function g(_){l=Date.now(),a=0,d=!0;const S=pu(_);i=S.x,s=S.y,n("swipeStart",{x:i,y:s}),lS(window,c),oS(window,p)}function c(_){if(!d)return;const S=pu(_),y=S.x-i,T=S.y-s;i=S.x,s=S.y,n("swipeMove",{x:i,y:s,dx:y,dy:T}),y!==0&&Math.sign(y)!==Math.sign(a)&&(a=0),a+=y,Math.abs(a)>r()&&(n("swipeThresholdReached",{direction:a>0?Cs:ca}),Sh(window,p),Ch(window,c))}function p(_){if(Sh(window,p),Ch(window,c),d=!1,!u()){n("swipeFailed");return}const S=pu(_);n("swipeEnd",{x:S.x,y:S.y})}return aS(e,g),{destroy(){sS(e,g)}}}function hS(e,r){e.addEventListener("mouseenter",r)}function gS(e,r){e.removeEventListener("mouseenter",r)}function vS(e,r){e.addEventListener("mouseleave",r)}function Ah(e,r){e.removeEventListener("mouseleave",r)}function _u(e){const r=vu(e);function n(){vS(e,i),r("hovered",{value:!0})}function i(){r("hovered",{value:!1}),Ah(e,i)}return hS(e,n),{destroy(){gS(e,n),Ah(e,i)}}}const pS=(e,r)=>{const n=r.x-e.x,i=r.y-e.y;return Math.sqrt(n*n+i*i)};function za(e,r,n){return Math.max(e,Math.min(r,n))}function mS(e,r){e.addEventListener("touchstart",r,{passive:!0})}function _S(e,r){e.removeEventListener("touchstart",r)}function bS(e,r){e.addEventListener("touchend",r)}function Th(e,r){e.removeEventListener("touchend",r)}function bu(e){const r=vu(e);let n=0,i={x:0,y:0};function s({tapEndedAt:d,tapEndedPos:u}){const g=d-n,c=pS(i,u);return g<=uS&&c<=cS}function a(d){n=Date.now();const u=d.touches[0];i={x:u.clientX,y:u.clientY},bS(e,l)}function l(d){Th(e,l);const u=d.changedTouches[0];s({tapEndedAt:Date.now(),tapEndedPos:{x:u.clientX,y:u.clientY}})&&r("tapped")}return mS(e,a),{destroy(){_S(e,a),Th(e,l)}}}function yS({currentParticleIndex:e,particlesCount:r,clonesCountHead:n,clonesCountTotal:i,particlesToScroll:s}){return e===r-n?0:e===0?kh({particlesCountWithoutClones:r-i,particlesToScroll:s})-1:Math.floor((e-n)/s)}function wS({currentParticleIndex:e,particlesToScroll:r}){return Math.ceil(e/r)}function ES({currentParticleIndex:e,particlesCount:r,clonesCountHead:n,clonesCountTotal:i,infinite:s,particlesToScroll:a}){return s?yS({currentParticleIndex:e,particlesCount:r,clonesCountHead:n,clonesCountTotal:i,particlesToScroll:a}):wS({currentParticleIndex:e,particlesToScroll:a})}function kh({particlesCountWithoutClones:e,particlesToScroll:r}){return Math.ceil(e/r)}function SS({particlesCountWithoutClones:e,particlesToScroll:r,particlesToShow:n}){const i=Dh({particlesCountWithoutClones:e,particlesToScroll:r,particlesToShow:n});return Math.ceil(e/r)-i}function CS({infinite:e,particlesCountWithoutClones:r,particlesToScroll:n,particlesToShow:i}){return e?kh({particlesCountWithoutClones:r,particlesToScroll:n}):SS({particlesCountWithoutClones:r,particlesToScroll:n,particlesToShow:i})}function AS({pageIndex:e,clonesCountHead:r,clonesCountTail:n,particlesToScroll:i,particlesCount:s}){return za(0,Math.min(r+e*i,s-n),s-1)}function TS({pageIndex:e,particlesToScroll:r,particlesCount:n,particlesToShow:i}){return za(0,Math.min(e*r,n-i),n-1)}function yu({infinite:e,pageIndex:r,clonesCountHead:n,clonesCountTail:i,particlesToScroll:s,particlesCount:a,particlesToShow:l}){return e?AS({pageIndex:r,clonesCountHead:n,clonesCountTail:i,particlesToScroll:s,particlesCount:a}):TS({pageIndex:r,particlesToScroll:s,particlesCount:a,particlesToShow:l})}function kS({particlesContainerChildren:e,particleWidth:r}){for(let n=0;n<e.length;n++)e[n].style.minWidth=`${r}px`,e[n].style.maxWidth=`${r}px`}function Dh({particlesToScroll:e,particlesToShow:r,particlesCountWithoutClones:n}){const i=e-r;let s=r;for(;;){const a=n-s-i;if(a<r)return Math.max(a,0);s+=r+i}}function DS(e){return new ResizeObserver(r=>{e({width:r[0].contentRect.width})})}function xS({clonesCountHead:e,clonesCountTail:r,particlesContainerChildren:n}){const i=[];for(let l=0;l<r;l++)i.push(n[l].cloneNode(!0));const s=[],a=n.length;for(let l=a-1;l>a-1-e;l--)s.push(n[l].cloneNode(!0));return{clonesToAppend:i,clonesToPrepend:s}}function OS({particlesContainer:e,clonesToAppend:r,clonesToPrepend:n}){for(let i=0;i<r.length;i++)e.append(r[i]);for(let i=0;i<n.length;i++)e.prepend(n[i])}function IS({infinite:e,particlesToShow:r,partialPageSize:n}){const i=e?{head:Math.ceil(n||r),tail:Math.ceil(r)}:{head:0,tail:0};return{...i,total:i.head+i.tail}}const As=(e,r,n)=>e&&e.hasOwnProperty(r)?e[r]:n,wu=e=>r=>{e[r]&&e[r]()};var RS="Expected a function",xh="__lodash_hash_undefined__",PS="[object Function]",MS="[object GeneratorFunction]",NS="[object Symbol]",LS=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,FS=/^\w*$/,VS=/^\./,US=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,BS=/[\\^$.*+?()[\]{}|]/g,HS=/\\(\\)?/g,zS=/^\[object .+?Constructor\]$/,jS=typeof Rn=="object"&&Rn&&Rn.Object===Object&&Rn,GS=typeof self=="object"&&self&&self.Object===Object&&self,Eu=jS||GS||Function("return this")();function qS(e,r){return e==null?void 0:e[r]}function WS(e){var r=!1;if(e!=null&&typeof e.toString!="function")try{r=!!(e+"")}catch{}return r}var YS=Array.prototype,KS=Function.prototype,Oh=Object.prototype,Su=Eu["__core-js_shared__"],Ih=function(){var e=/[^.]+$/.exec(Su&&Su.keys&&Su.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Rh=KS.toString,Cu=Oh.hasOwnProperty,Ph=Oh.toString,XS=RegExp("^"+Rh.call(Cu).replace(BS,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mh=Eu.Symbol,QS=YS.splice,ZS=Fh(Eu,"Map"),Ts=Fh(Object,"create"),Nh=Mh?Mh.prototype:void 0,Lh=Nh?Nh.toString:void 0;function da(e){var r=-1,n=e?e.length:0;for(this.clear();++r<n;){var i=e[r];this.set(i[0],i[1])}}function JS(){this.__data__=Ts?Ts(null):{}}function $S(e){return this.has(e)&&delete this.__data__[e]}function eC(e){var r=this.__data__;if(Ts){var n=r[e];return n===xh?void 0:n}return Cu.call(r,e)?r[e]:void 0}function tC(e){var r=this.__data__;return Ts?r[e]!==void 0:Cu.call(r,e)}function rC(e,r){var n=this.__data__;return n[e]=Ts&&r===void 0?xh:r,this}da.prototype.clear=JS,da.prototype.delete=$S,da.prototype.get=eC,da.prototype.has=tC,da.prototype.set=rC;function ja(e){var r=-1,n=e?e.length:0;for(this.clear();++r<n;){var i=e[r];this.set(i[0],i[1])}}function nC(){this.__data__=[]}function iC(e){var r=this.__data__,n=Lo(r,e);if(n<0)return!1;var i=r.length-1;return n==i?r.pop():QS.call(r,n,1),!0}function aC(e){var r=this.__data__,n=Lo(r,e);return n<0?void 0:r[n][1]}function sC(e){return Lo(this.__data__,e)>-1}function oC(e,r){var n=this.__data__,i=Lo(n,e);return i<0?n.push([e,r]):n[i][1]=r,this}ja.prototype.clear=nC,ja.prototype.delete=iC,ja.prototype.get=aC,ja.prototype.has=sC,ja.prototype.set=oC;function fa(e){var r=-1,n=e?e.length:0;for(this.clear();++r<n;){var i=e[r];this.set(i[0],i[1])}}function lC(){this.__data__={hash:new da,map:new(ZS||ja),string:new da}}function uC(e){return Fo(this,e).delete(e)}function cC(e){return Fo(this,e).get(e)}function dC(e){return Fo(this,e).has(e)}function fC(e,r){return Fo(this,e).set(e,r),this}fa.prototype.clear=lC,fa.prototype.delete=uC,fa.prototype.get=cC,fa.prototype.has=dC,fa.prototype.set=fC;function Lo(e,r){for(var n=e.length;n--;)if(SC(e[n][0],r))return n;return-1}function hC(e,r){r=mC(r,e)?[r]:pC(r);for(var n=0,i=r.length;e!=null&&n<i;)e=e[wC(r[n++])];return n&&n==i?e:void 0}function gC(e){if(!Uh(e)||bC(e))return!1;var r=CC(e)||WS(e)?XS:zS;return r.test(EC(e))}function vC(e){if(typeof e=="string")return e;if(Tu(e))return Lh?Lh.call(e):"";var r=e+"";return r=="0"&&1/e==-1/0?"-0":r}function pC(e){return Vh(e)?e:yC(e)}function Fo(e,r){var n=e.__data__;return _C(r)?n[typeof r=="string"?"string":"hash"]:n.map}function Fh(e,r){var n=qS(e,r);return gC(n)?n:void 0}function mC(e,r){if(Vh(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Tu(e)?!0:FS.test(e)||!LS.test(e)||r!=null&&e in Object(r)}function _C(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}function bC(e){return!!Ih&&Ih in e}var yC=Au(function(e){e=TC(e);var r=[];return VS.test(e)&&r.push(""),e.replace(US,function(n,i,s,a){r.push(s?a.replace(HS,"$1"):i||n)}),r});function wC(e){if(typeof e=="string"||Tu(e))return e;var r=e+"";return r=="0"&&1/e==-1/0?"-0":r}function EC(e){if(e!=null){try{return Rh.call(e)}catch{}try{return e+""}catch{}}return""}function Au(e,r){if(typeof e!="function"||r&&typeof r!="function")throw new TypeError(RS);var n=function(){var i=arguments,s=r?r.apply(this,i):i[0],a=n.cache;if(a.has(s))return a.get(s);var l=e.apply(this,i);return n.cache=a.set(s,l),l};return n.cache=new(Au.Cache||fa),n}Au.Cache=fa;function SC(e,r){return e===r||e!==e&&r!==r}var Vh=Array.isArray;function CC(e){var r=Uh(e)?Ph.call(e):"";return r==PS||r==MS}function Uh(e){var r=typeof e;return!!e&&(r=="object"||r=="function")}function AC(e){return!!e&&typeof e=="object"}function Tu(e){return typeof e=="symbol"||AC(e)&&Ph.call(e)==NS}function TC(e){return e==null?"":vC(e)}function kC(e,r,n){var i=e==null?void 0:hC(e,r);return i===void 0?n:i}var DC=kC;const Vo=Sl(DC);var Uo={exports:{}};Uo.exports,function(e,r){var n=200,i="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",l="[object Array]",d="[object Boolean]",u="[object Date]",g="[object Error]",c="[object Function]",p="[object GeneratorFunction]",_="[object Map]",S="[object Number]",y="[object Object]",T="[object Promise]",I="[object RegExp]",k="[object Set]",C="[object String]",D="[object Symbol]",E="[object WeakMap]",U="[object ArrayBuffer]",$="[object DataView]",R="[object Float32Array]",H="[object Float64Array]",J="[object Int8Array]",de="[object Int16Array]",fe="[object Int32Array]",we="[object Uint8Array]",pe="[object Uint8ClampedArray]",De="[object Uint16Array]",ke="[object Uint32Array]",ye=/[\\^$.*+?()[\]{}|]/g,ce=/\w*$/,Z=/^\[object .+?Constructor\]$/,Y=/^(?:0|[1-9]\d*)$/,re={};re[a]=re[l]=re[U]=re[$]=re[d]=re[u]=re[R]=re[H]=re[J]=re[de]=re[fe]=re[_]=re[S]=re[y]=re[I]=re[k]=re[C]=re[D]=re[we]=re[pe]=re[De]=re[ke]=!0,re[g]=re[c]=re[E]=!1;var G=typeof Rn=="object"&&Rn&&Rn.Object===Object&&Rn,ae=typeof self=="object"&&self&&self.Object===Object&&self,z=G||ae||Function("return this")(),ge=r&&!r.nodeType&&r,O=ge&&!0&&e&&!e.nodeType&&e,q=O&&O.exports===ge;function ne(f,P){return f.set(P[0],P[1]),f}function se(f,P){return f.add(P),f}function ee(f,P){for(var be=-1,ze=f?f.length:0;++be<ze&&P(f[be],be,f)!==!1;);return f}function me(f,P){for(var be=-1,ze=P.length,Et=f.length;++be<ze;)f[Et+be]=P[be];return f}function Ne(f,P,be,ze){for(var Et=-1,bt=f?f.length:0;++Et<bt;)be=P(be,f[Et],Et,f);return be}function Ue(f,P){for(var be=-1,ze=Array(f);++be<f;)ze[be]=P(be);return ze}function he(f,P){return f==null?void 0:f[P]}function ue(f){var P=!1;if(f!=null&&typeof f.toString!="function")try{P=!!(f+"")}catch{}return P}function Q(f){var P=-1,be=Array(f.size);return f.forEach(function(ze,Et){be[++P]=[Et,ze]}),be}function B(f,P){return function(be){return f(P(be))}}function X(f){var P=-1,be=Array(f.size);return f.forEach(function(ze){be[++P]=ze}),be}var K=Array.prototype,V=Function.prototype,ie=Object.prototype,N=z["__core-js_shared__"],A=function(){var f=/[^.]+$/.exec(N&&N.keys&&N.keys.IE_PROTO||"");return f?"Symbol(src)_1."+f:""}(),M=V.toString,te=ie.hasOwnProperty,ve=ie.toString,Ie=RegExp("^"+M.call(te).replace(ye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pe=q?z.Buffer:void 0,Re=z.Symbol,oe=z.Uint8Array,Oe=B(Object.getPrototypeOf,Object),Fe=Object.create,Be=ie.propertyIsEnumerable,Le=K.splice,Te=Object.getOwnPropertySymbols,qe=Pe?Pe.isBuffer:void 0,Ze=B(Object.keys,Object),Je=cn(z,"DataView"),nt=cn(z,"Map"),at=cn(z,"Promise"),ct=cn(z,"Set"),it=cn(z,"WeakMap"),_e=cn(Object,"create"),We=Er(Je),Ke=Er(nt),Ae=Er(at),je=Er(ct),et=Er(it),lt=Re?Re.prototype:void 0,mt=lt?lt.valueOf:void 0;function Ot(f){var P=-1,be=f?f.length:0;for(this.clear();++P<be;){var ze=f[P];this.set(ze[0],ze[1])}}function It(){this.__data__=_e?_e(null):{}}function Lt(f){return this.has(f)&&delete this.__data__[f]}function Tt(f){var P=this.__data__;if(_e){var be=P[f];return be===i?void 0:be}return te.call(P,f)?P[f]:void 0}function ut(f){var P=this.__data__;return _e?P[f]!==void 0:te.call(P,f)}function rt(f,P){var be=this.__data__;return be[f]=_e&&P===void 0?i:P,this}Ot.prototype.clear=It,Ot.prototype.delete=Lt,Ot.prototype.get=Tt,Ot.prototype.has=ut,Ot.prototype.set=rt;function st(f){var P=-1,be=f?f.length:0;for(this.clear();++P<be;){var ze=f[P];this.set(ze[0],ze[1])}}function ft(){this.__data__=[]}function _t(f){var P=this.__data__,be=Tn(P,f);if(be<0)return!1;var ze=P.length-1;return be==ze?P.pop():Le.call(P,be,1),!0}function Bt(f){var P=this.__data__,be=Tn(P,f);return be<0?void 0:P[be][1]}function Rt(f){return Tn(this.__data__,f)>-1}function Ht(f,P){var be=this.__data__,ze=Tn(be,f);return ze<0?be.push([f,P]):be[ze][1]=P,this}st.prototype.clear=ft,st.prototype.delete=_t,st.prototype.get=Bt,st.prototype.has=Rt,st.prototype.set=Ht;function kt(f){var P=-1,be=f?f.length:0;for(this.clear();++P<be;){var ze=f[P];this.set(ze[0],ze[1])}}function tr(){this.__data__={hash:new Ot,map:new(nt||st),string:new Ot}}function nr(f){return tn(this,f).delete(f)}function Wt(f){return tn(this,f).get(f)}function Zt(f){return tn(this,f).has(f)}function ar(f,P){return tn(this,f).set(f,P),this}kt.prototype.clear=tr,kt.prototype.delete=nr,kt.prototype.get=Wt,kt.prototype.has=Zt,kt.prototype.set=ar;function Gt(f){this.__data__=new st(f)}function hr(){this.__data__=new st}function qr(f){return this.__data__.delete(f)}function Dr(f){return this.__data__.get(f)}function wr(f){return this.__data__.has(f)}function gr(f,P){var be=this.__data__;if(be instanceof st){var ze=be.__data__;if(!nt||ze.length<n-1)return ze.push([f,P]),this;be=this.__data__=new kt(ze)}return be.set(f,P),this}Gt.prototype.clear=hr,Gt.prototype.delete=qr,Gt.prototype.get=Dr,Gt.prototype.has=wr,Gt.prototype.set=gr;function Nr(f,P){var be=Un(f)||Vn(f)?Ue(f.length,String):[],ze=be.length,Et=!!ze;for(var bt in f)te.call(f,bt)&&!(Et&&(bt=="length"||ba(bt,ze)))&&be.push(bt);return be}function Lr(f,P,be){var ze=f[P];(!(te.call(f,P)&&ki(ze,be))||be===void 0&&!(P in f))&&(f[P]=be)}function Tn(f,P){for(var be=f.length;be--;)if(ki(f[be][0],P))return be;return-1}function _r(f,P){return f&&en(P,$n(P),f)}function ln(f,P,be,ze,Et,bt,Xt){var Qt;if(ze&&(Qt=bt?ze(f,Et,bt,Xt):ze(f)),Qt!==void 0)return Qt;if(!dn(f))return f;var cr=Un(f);if(cr){if(Qt=Kr(f),!P)return Ti(f,Qt)}else{var Jt=bn(f),xr=Jt==c||Jt==p;if(Vr(f))return Fn(f,P);if(Jt==y||Jt==a||xr&&!bt){if(ue(f))return bt?f:{};if(Qt=yn(xr?{}:f),!P)return ma(f,_r(Qt,f))}else{if(!re[Jt])return bt?f:{};Qt=_a(f,Jt,ln,P)}}Xt||(Xt=new Gt);var rn=Xt.get(f);if(rn)return rn;if(Xt.set(f,Qt),!cr)var ht=be?Yr(f):$n(f);return ee(ht||f,function(Yt,Sr){ht&&(Sr=Yt,Yt=f[Sr]),Lr(Qt,Sr,ln(Yt,P,be,ze,Sr,f,Xt))}),Qt}function Fr(f){return dn(f)?Fe(f):{}}function Zn(f,P,be){var ze=P(f);return Un(f)?ze:me(ze,be(f))}function zi(f){return ve.call(f)}function pa(f){if(!dn(f)||gi(f))return!1;var P=Bn(f)||ue(f)?Ie:Z;return P.test(Er(f))}function di(f){if(!ji(f))return Ze(f);var P=[];for(var be in Object(f))te.call(f,be)&&be!="constructor"&&P.push(be);return P}function Fn(f,P){if(P)return f.slice();var be=new f.constructor(f.length);return f.copy(be),be}function _n(f){var P=new f.constructor(f.byteLength);return new oe(P).set(new oe(f)),P}function un(f,P){var be=P?_n(f.buffer):f.buffer;return new f.constructor(be,f.byteOffset,f.byteLength)}function $r(f,P,be){var ze=P?be(Q(f),!0):Q(f);return Ne(ze,ne,new f.constructor)}function Wr(f){var P=new f.constructor(f.source,ce.exec(f));return P.lastIndex=f.lastIndex,P}function fi(f,P,be){var ze=P?be(X(f),!0):X(f);return Ne(ze,se,new f.constructor)}function hi(f){return mt?Object(mt.call(f)):{}}function Ai(f,P){var be=P?_n(f.buffer):f.buffer;return new f.constructor(be,f.byteOffset,f.length)}function Ti(f,P){var be=-1,ze=f.length;for(P||(P=Array(ze));++be<ze;)P[be]=f[be];return P}function en(f,P,be,ze){be||(be={});for(var Et=-1,bt=P.length;++Et<bt;){var Xt=P[Et],Qt=void 0;Lr(be,Xt,Qt===void 0?f[Xt]:Qt)}return be}function ma(f,P){return en(f,lr(f),P)}function Yr(f){return Zn(f,$n,lr)}function tn(f,P){var be=f.__data__;return Jn(P)?be[typeof P=="string"?"string":"hash"]:be.map}function cn(f,P){var be=he(f,P);return pa(be)?be:void 0}var lr=Te?B(Te,Object):Qa,bn=zi;(Je&&bn(new Je(new ArrayBuffer(1)))!=$||nt&&bn(new nt)!=_||at&&bn(at.resolve())!=T||ct&&bn(new ct)!=k||it&&bn(new it)!=E)&&(bn=function(f){var P=ve.call(f),be=P==y?f.constructor:void 0,ze=be?Er(be):void 0;if(ze)switch(ze){case We:return $;case Ke:return _;case Ae:return T;case je:return k;case et:return E}return P});function Kr(f){var P=f.length,be=f.constructor(P);return P&&typeof f[0]=="string"&&te.call(f,"index")&&(be.index=f.index,be.input=f.input),be}function yn(f){return typeof f.constructor=="function"&&!ji(f)?Fr(Oe(f)):{}}function _a(f,P,be,ze){var Et=f.constructor;switch(P){case U:return _n(f);case d:case u:return new Et(+f);case $:return un(f,ze);case R:case H:case J:case de:case fe:case we:case pe:case De:case ke:return Ai(f,ze);case _:return $r(f,ze,be);case S:case C:return new Et(f);case I:return Wr(f);case k:return fi(f,ze,be);case D:return hi(f)}}function ba(f,P){return P=P??s,!!P&&(typeof f=="number"||Y.test(f))&&f>-1&&f%1==0&&f<P}function Jn(f){var P=typeof f;return P=="string"||P=="number"||P=="symbol"||P=="boolean"?f!=="__proto__":f===null}function gi(f){return!!A&&A in f}function ji(f){var P=f&&f.constructor,be=typeof P=="function"&&P.prototype||ie;return f===be}function Er(f){if(f!=null){try{return M.call(f)}catch{}try{return f+""}catch{}}return""}function ur(f){return ln(f,!0,!0)}function ki(f,P){return f===P||f!==f&&P!==P}function Vn(f){return Xa(f)&&te.call(f,"callee")&&(!Be.call(f,"callee")||ve.call(f)==a)}var Un=Array.isArray;function kn(f){return f!=null&&Dn(f.length)&&!Bn(f)}function Xa(f){return Hn(f)&&kn(f)}var Vr=qe||xn;function Bn(f){var P=dn(f)?ve.call(f):"";return P==c||P==p}function Dn(f){return typeof f=="number"&&f>-1&&f%1==0&&f<=s}function dn(f){var P=typeof f;return!!f&&(P=="object"||P=="function")}function Hn(f){return!!f&&typeof f=="object"}function $n(f){return kn(f)?Nr(f):di(f)}function Qa(){return[]}function xn(){return!1}e.exports=ur}(Uo,Uo.exports);var xC=Uo.exports;const OC=Sl(xC);var Bo={exports:{}};Bo.exports,function(e,r){var n=200,i="__lodash_hash_undefined__",s=1,a=2,l=9007199254740991,d="[object Arguments]",u="[object Array]",g="[object AsyncFunction]",c="[object Boolean]",p="[object Date]",_="[object Error]",S="[object Function]",y="[object GeneratorFunction]",T="[object Map]",I="[object Number]",k="[object Null]",C="[object Object]",D="[object Promise]",E="[object Proxy]",U="[object RegExp]",$="[object Set]",R="[object String]",H="[object Symbol]",J="[object Undefined]",de="[object WeakMap]",fe="[object ArrayBuffer]",we="[object DataView]",pe="[object Float32Array]",De="[object Float64Array]",ke="[object Int8Array]",ye="[object Int16Array]",ce="[object Int32Array]",Z="[object Uint8Array]",Y="[object Uint8ClampedArray]",re="[object Uint16Array]",G="[object Uint32Array]",ae=/[\\^$.*+?()[\]{}|]/g,z=/^\[object .+?Constructor\]$/,ge=/^(?:0|[1-9]\d*)$/,O={};O[pe]=O[De]=O[ke]=O[ye]=O[ce]=O[Z]=O[Y]=O[re]=O[G]=!0,O[d]=O[u]=O[fe]=O[c]=O[we]=O[p]=O[_]=O[S]=O[T]=O[I]=O[C]=O[U]=O[$]=O[R]=O[de]=!1;var q=typeof Rn=="object"&&Rn&&Rn.Object===Object&&Rn,ne=typeof self=="object"&&self&&self.Object===Object&&self,se=q||ne||Function("return this")(),ee=r&&!r.nodeType&&r,me=ee&&!0&&e&&!e.nodeType&&e,Ne=me&&me.exports===ee,Ue=Ne&&q.process,he=function(){try{return Ue&&Ue.binding&&Ue.binding("util")}catch{}}(),ue=he&&he.isTypedArray;function Q(f,P){for(var be=-1,ze=f==null?0:f.length,Et=0,bt=[];++be<ze;){var Xt=f[be];P(Xt,be,f)&&(bt[Et++]=Xt)}return bt}function B(f,P){for(var be=-1,ze=P.length,Et=f.length;++be<ze;)f[Et+be]=P[be];return f}function X(f,P){for(var be=-1,ze=f==null?0:f.length;++be<ze;)if(P(f[be],be,f))return!0;return!1}function K(f,P){for(var be=-1,ze=Array(f);++be<f;)ze[be]=P(be);return ze}function V(f){return function(P){return f(P)}}function ie(f,P){return f.has(P)}function N(f,P){return f==null?void 0:f[P]}function A(f){var P=-1,be=Array(f.size);return f.forEach(function(ze,Et){be[++P]=[Et,ze]}),be}function M(f,P){return function(be){return f(P(be))}}function te(f){var P=-1,be=Array(f.size);return f.forEach(function(ze){be[++P]=ze}),be}var ve=Array.prototype,Ie=Function.prototype,Pe=Object.prototype,Re=se["__core-js_shared__"],oe=Ie.toString,Oe=Pe.hasOwnProperty,Fe=function(){var f=/[^.]+$/.exec(Re&&Re.keys&&Re.keys.IE_PROTO||"");return f?"Symbol(src)_1."+f:""}(),Be=Pe.toString,Le=RegExp("^"+oe.call(Oe).replace(ae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Te=Ne?se.Buffer:void 0,qe=se.Symbol,Ze=se.Uint8Array,Je=Pe.propertyIsEnumerable,nt=ve.splice,at=qe?qe.toStringTag:void 0,ct=Object.getOwnPropertySymbols,it=Te?Te.isBuffer:void 0,_e=M(Object.keys,Object),We=lr(se,"DataView"),Ke=lr(se,"Map"),Ae=lr(se,"Promise"),je=lr(se,"Set"),et=lr(se,"WeakMap"),lt=lr(Object,"create"),mt=Er(We),Ot=Er(Ke),It=Er(Ae),Lt=Er(je),Tt=Er(et),ut=qe?qe.prototype:void 0,rt=ut?ut.valueOf:void 0;function st(f){var P=-1,be=f==null?0:f.length;for(this.clear();++P<be;){var ze=f[P];this.set(ze[0],ze[1])}}function ft(){this.__data__=lt?lt(null):{},this.size=0}function _t(f){var P=this.has(f)&&delete this.__data__[f];return this.size-=P?1:0,P}function Bt(f){var P=this.__data__;if(lt){var be=P[f];return be===i?void 0:be}return Oe.call(P,f)?P[f]:void 0}function Rt(f){var P=this.__data__;return lt?P[f]!==void 0:Oe.call(P,f)}function Ht(f,P){var be=this.__data__;return this.size+=this.has(f)?0:1,be[f]=lt&&P===void 0?i:P,this}st.prototype.clear=ft,st.prototype.delete=_t,st.prototype.get=Bt,st.prototype.has=Rt,st.prototype.set=Ht;function kt(f){var P=-1,be=f==null?0:f.length;for(this.clear();++P<be;){var ze=f[P];this.set(ze[0],ze[1])}}function tr(){this.__data__=[],this.size=0}function nr(f){var P=this.__data__,be=Fn(P,f);if(be<0)return!1;var ze=P.length-1;return be==ze?P.pop():nt.call(P,be,1),--this.size,!0}function Wt(f){var P=this.__data__,be=Fn(P,f);return be<0?void 0:P[be][1]}function Zt(f){return Fn(this.__data__,f)>-1}function ar(f,P){var be=this.__data__,ze=Fn(be,f);return ze<0?(++this.size,be.push([f,P])):be[ze][1]=P,this}kt.prototype.clear=tr,kt.prototype.delete=nr,kt.prototype.get=Wt,kt.prototype.has=Zt,kt.prototype.set=ar;function Gt(f){var P=-1,be=f==null?0:f.length;for(this.clear();++P<be;){var ze=f[P];this.set(ze[0],ze[1])}}function hr(){this.size=0,this.__data__={hash:new st,map:new(Ke||kt),string:new st}}function qr(f){var P=cn(this,f).delete(f);return this.size-=P?1:0,P}function Dr(f){return cn(this,f).get(f)}function wr(f){return cn(this,f).has(f)}function gr(f,P){var be=cn(this,f),ze=be.size;return be.set(f,P),this.size+=be.size==ze?0:1,this}Gt.prototype.clear=hr,Gt.prototype.delete=qr,Gt.prototype.get=Dr,Gt.prototype.has=wr,Gt.prototype.set=gr;function Nr(f){var P=-1,be=f==null?0:f.length;for(this.__data__=new Gt;++P<be;)this.add(f[P])}function Lr(f){return this.__data__.set(f,i),this}function Tn(f){return this.__data__.has(f)}Nr.prototype.add=Nr.prototype.push=Lr,Nr.prototype.has=Tn;function _r(f){var P=this.__data__=new kt(f);this.size=P.size}function ln(){this.__data__=new kt,this.size=0}function Fr(f){var P=this.__data__,be=P.delete(f);return this.size=P.size,be}function Zn(f){return this.__data__.get(f)}function zi(f){return this.__data__.has(f)}function pa(f,P){var be=this.__data__;if(be instanceof kt){var ze=be.__data__;if(!Ke||ze.length<n-1)return ze.push([f,P]),this.size=++be.size,this;be=this.__data__=new Gt(ze)}return be.set(f,P),this.size=be.size,this}_r.prototype.clear=ln,_r.prototype.delete=Fr,_r.prototype.get=Zn,_r.prototype.has=zi,_r.prototype.set=pa;function di(f,P){var be=Vn(f),ze=!be&&ki(f),Et=!be&&!ze&&kn(f),bt=!be&&!ze&&!Et&&Hn(f),Xt=be||ze||Et||bt,Qt=Xt?K(f.length,String):[],cr=Qt.length;for(var Jt in f)Oe.call(f,Jt)&&!(Xt&&(Jt=="length"||Et&&(Jt=="offset"||Jt=="parent")||bt&&(Jt=="buffer"||Jt=="byteLength"||Jt=="byteOffset")||_a(Jt,cr)))&&Qt.push(Jt);return Qt}function Fn(f,P){for(var be=f.length;be--;)if(ur(f[be][0],P))return be;return-1}function _n(f,P,be){var ze=P(f);return Vn(f)?ze:B(ze,be(f))}function un(f){return f==null?f===void 0?J:k:at&&at in Object(f)?bn(f):ji(f)}function $r(f){return dn(f)&&un(f)==d}function Wr(f,P,be,ze,Et){return f===P?!0:f==null||P==null||!dn(f)&&!dn(P)?f!==f&&P!==P:fi(f,P,be,ze,Wr,Et)}function fi(f,P,be,ze,Et,bt){var Xt=Vn(f),Qt=Vn(P),cr=Xt?u:yn(f),Jt=Qt?u:yn(P);cr=cr==d?C:cr,Jt=Jt==d?C:Jt;var xr=cr==C,rn=Jt==C,ht=cr==Jt;if(ht&&kn(f)){if(!kn(P))return!1;Xt=!0,xr=!1}if(ht&&!xr)return bt||(bt=new _r),Xt||Hn(f)?en(f,P,be,ze,Et,bt):ma(f,P,cr,be,ze,Et,bt);if(!(be&s)){var Yt=xr&&Oe.call(f,"__wrapped__"),Sr=rn&&Oe.call(P,"__wrapped__");if(Yt||Sr){var vi=Yt?f.value():f,zn=Sr?P.value():P;return bt||(bt=new _r),Et(vi,zn,be,ze,bt)}}return ht?(bt||(bt=new _r),Yr(f,P,be,ze,Et,bt)):!1}function hi(f){if(!Dn(f)||Jn(f))return!1;var P=Vr(f)?Le:z;return P.test(Er(f))}function Ai(f){return dn(f)&&Bn(f.length)&&!!O[un(f)]}function Ti(f){if(!gi(f))return _e(f);var P=[];for(var be in Object(f))Oe.call(f,be)&&be!="constructor"&&P.push(be);return P}function en(f,P,be,ze,Et,bt){var Xt=be&s,Qt=f.length,cr=P.length;if(Qt!=cr&&!(Xt&&cr>Qt))return!1;var Jt=bt.get(f);if(Jt&&bt.get(P))return Jt==P;var xr=-1,rn=!0,ht=be&a?new Nr:void 0;for(bt.set(f,P),bt.set(P,f);++xr<Qt;){var Yt=f[xr],Sr=P[xr];if(ze)var vi=Xt?ze(Sr,Yt,xr,P,f,bt):ze(Yt,Sr,xr,f,P,bt);if(vi!==void 0){if(vi)continue;rn=!1;break}if(ht){if(!X(P,function(zn,ei){if(!ie(ht,ei)&&(Yt===zn||Et(Yt,zn,be,ze,bt)))return ht.push(ei)})){rn=!1;break}}else if(!(Yt===Sr||Et(Yt,Sr,be,ze,bt))){rn=!1;break}}return bt.delete(f),bt.delete(P),rn}function ma(f,P,be,ze,Et,bt,Xt){switch(be){case we:if(f.byteLength!=P.byteLength||f.byteOffset!=P.byteOffset)return!1;f=f.buffer,P=P.buffer;case fe:return!(f.byteLength!=P.byteLength||!bt(new Ze(f),new Ze(P)));case c:case p:case I:return ur(+f,+P);case _:return f.name==P.name&&f.message==P.message;case U:case R:return f==P+"";case T:var Qt=A;case $:var cr=ze&s;if(Qt||(Qt=te),f.size!=P.size&&!cr)return!1;var Jt=Xt.get(f);if(Jt)return Jt==P;ze|=a,Xt.set(f,P);var xr=en(Qt(f),Qt(P),ze,Et,bt,Xt);return Xt.delete(f),xr;case H:if(rt)return rt.call(f)==rt.call(P)}return!1}function Yr(f,P,be,ze,Et,bt){var Xt=be&s,Qt=tn(f),cr=Qt.length,Jt=tn(P),xr=Jt.length;if(cr!=xr&&!Xt)return!1;for(var rn=cr;rn--;){var ht=Qt[rn];if(!(Xt?ht in P:Oe.call(P,ht)))return!1}var Yt=bt.get(f);if(Yt&&bt.get(P))return Yt==P;var Sr=!0;bt.set(f,P),bt.set(P,f);for(var vi=Xt;++rn<cr;){ht=Qt[rn];var zn=f[ht],ei=P[ht];if(ze)var Is=Xt?ze(ei,zn,ht,P,f,bt):ze(zn,ei,ht,f,P,bt);if(!(Is===void 0?zn===ei||Et(zn,ei,be,ze,bt):Is)){Sr=!1;break}vi||(vi=ht=="constructor")}if(Sr&&!vi){var Or=f.constructor,ya=P.constructor;Or!=ya&&"constructor"in f&&"constructor"in P&&!(typeof Or=="function"&&Or instanceof Or&&typeof ya=="function"&&ya instanceof ya)&&(Sr=!1)}return bt.delete(f),bt.delete(P),Sr}function tn(f){return _n(f,$n,Kr)}function cn(f,P){var be=f.__data__;return ba(P)?be[typeof P=="string"?"string":"hash"]:be.map}function lr(f,P){var be=N(f,P);return hi(be)?be:void 0}function bn(f){var P=Oe.call(f,at),be=f[at];try{f[at]=void 0;var ze=!0}catch{}var Et=Be.call(f);return ze&&(P?f[at]=be:delete f[at]),Et}var Kr=ct?function(f){return f==null?[]:(f=Object(f),Q(ct(f),function(P){return Je.call(f,P)}))}:Qa,yn=un;(We&&yn(new We(new ArrayBuffer(1)))!=we||Ke&&yn(new Ke)!=T||Ae&&yn(Ae.resolve())!=D||je&&yn(new je)!=$||et&&yn(new et)!=de)&&(yn=function(f){var P=un(f),be=P==C?f.constructor:void 0,ze=be?Er(be):"";if(ze)switch(ze){case mt:return we;case Ot:return T;case It:return D;case Lt:return $;case Tt:return de}return P});function _a(f,P){return P=P??l,!!P&&(typeof f=="number"||ge.test(f))&&f>-1&&f%1==0&&f<P}function ba(f){var P=typeof f;return P=="string"||P=="number"||P=="symbol"||P=="boolean"?f!=="__proto__":f===null}function Jn(f){return!!Fe&&Fe in f}function gi(f){var P=f&&f.constructor,be=typeof P=="function"&&P.prototype||Pe;return f===be}function ji(f){return Be.call(f)}function Er(f){if(f!=null){try{return oe.call(f)}catch{}try{return f+""}catch{}}return""}function ur(f,P){return f===P||f!==f&&P!==P}var ki=$r(function(){return arguments}())?$r:function(f){return dn(f)&&Oe.call(f,"callee")&&!Je.call(f,"callee")},Vn=Array.isArray;function Un(f){return f!=null&&Bn(f.length)&&!Vr(f)}var kn=it||xn;function Xa(f,P){return Wr(f,P)}function Vr(f){if(!Dn(f))return!1;var P=un(f);return P==S||P==y||P==g||P==E}function Bn(f){return typeof f=="number"&&f>-1&&f%1==0&&f<=l}function Dn(f){var P=typeof f;return f!=null&&(P=="object"||P=="function")}function dn(f){return f!=null&&typeof f=="object"}var Hn=ue?V(ue):Ai;function $n(f){return Un(f)?di(f):Ti(f)}function Qa(){return[]}function xn(){return!1}e.exports=Xa}(Bo,Bo.exports);var IC=Bo.exports;const RC=Sl(IC),PC=(e,r)=>RC(e,r),MC=e=>Object.keys(e||{}),NC=(e,r)=>{const n={};return e.forEach(i=>{n[i]=r[i]}),n},LC=()=>{const e={},r=(n,i)=>{const{watcherName:s,fn:a}=n,{prop:l,value:d}=i;e[s]||(e[s]={deps:{},fn:a}),e[s].deps[l]=d};return{subscribers:e,subscribe(n,i){n&&r(n,i)},notify(n,i){Object.entries(e).forEach(([s,{deps:a,fn:l}])=>{const d=MC(a);if(d.includes(i)){const u=NC(d,n);PC(a,u)||(e[s].deps=u,l())}})}}},FC=()=>{let e=null;return{targetWatcher(r,n){e={watcherName:r,fn:n},e.fn(),e=null},getTarget(){return e}}};function VC(e,r){const n=Vo(e,"data",{}),i=Vo(e,"watch",{}),s=Vo(e,"methods",{}),a=Vo(r,"onChange",()=>{}),{subscribe:l,notify:d,subscribers:u}=LC(),{targetWatcher:g,getTarget:c}=FC();let p;const _={},S=()=>({data:p,methods:_});let y=!1;const T=k=>(...C)=>{y=!0;const D=k(...C);return y=!1,D};Object.entries(s).forEach(([k,C])=>{_[k]=T((...D)=>C(S(),...D)),Object.defineProperty(_[k],"name",{value:k})}),p=new Proxy(OC(n),{get(k,C){return c()&&!y&&l(c(),{prop:C,value:k[C]}),Reflect.get(...arguments)},set(k,C,D){return k[C]===D||(Reflect.set(...arguments),c()||(a&&a(C,D),d(p,C))),!0}}),Object.entries(i).forEach(([k,C])=>{g(k,()=>{C(S())})});const I=[p,_];return I._internal={_getSubscribers(){return u}},I}function UC({pageIndex:e,particlesToShow:r,particlesToScroll:n,particlesCount:i}){const s=e===0?0:r-n,a=e*r-e*s,l=a+Math.max(r,n)-1,d=[];for(let u=a;u<=Math.min(i-1,l);u++)d.push(u);return d}function BC({infinite:e,pageIndex:r,pagesCount:n,particlesCount:i,particlesToShow:s,particlesToScroll:a}){const l=za(0,r,n-1);let d=l-1,u=l+1;d=e?d<0?n-1:d:Math.max(0,d),u=e?u>n-1?0:u:Math.min(n-1,u);const g=[...new Set([d,l,u,0,n-1])].sort((p,_)=>p-_),c=g.flatMap(p=>UC({pageIndex:p,particlesToShow:s,particlesToScroll:a,particlesCount:i}));return{pageIndexes:g,particleIndexes:[...new Set(c)].sort((p,_)=>p-_)}}const HC=(e,r)=>(e(),setInterval(e,r)),zC=35,Bh=1;class jC{constructor({onProgressValueChange:r}){this._onProgressValueChange=r,this._autoplayDuration,this._onProgressValueChange,this._interval,this._paused=!1}setAutoplayDuration(r){this._autoplayDuration=r}start(r){return new Promise(n=>{this.reset();const i=Math.min(zC,Math.max(this._autoplayDuration,1));let s=-i;this._interval=HC(async()=>{if(this._paused)return;s+=i;const a=s/this._autoplayDuration;this._onProgressValueChange(a),a>Bh&&(this.reset(),await r(),n())},i)})}pause(){this._paused=!0}resume(){this._paused=!1}reset(){clearInterval(this._interval),this._onProgressValueChange(Bh)}}function GC(e){const r=new jC({onProgressValueChange:a=>{e("progressValue",1-a)}}),n=VC({data:{particlesCountWithoutClones:0,particlesToShow:1,particlesToShowInit:1,particlesToScroll:1,particlesToScrollInit:1,particlesCount:1,currentParticleIndex:1,infinite:!1,autoplayDuration:1e3,clonesCountHead:0,clonesCountTail:0,clonesCountTotal:0,partialPageSize:1,currentPageIndex:1,pagesCount:1,pauseOnFocus:!1,focused:!1,autoplay:!1,autoplayDirection:"next",disabled:!1,durationMsInit:1e3,durationMs:1e3,offset:0,particleWidth:0,loaded:[]},watch:{setLoaded({data:a}){a.loaded=BC({infinite:a.infinite,pageIndex:a.currentPageIndex,pagesCount:a.pagesCount,particlesCount:a.particlesCountWithoutClones,particlesToShow:a.particlesToShow,particlesToScroll:a.particlesToScroll}).particleIndexes},setCurrentPageIndex({data:a}){a.currentPageIndex=ES({currentParticleIndex:a.currentParticleIndex,particlesCount:a.particlesCount,clonesCountHead:a.clonesCountHead,clonesCountTotal:a.clonesCountTotal,infinite:a.infinite,particlesToScroll:a.particlesToScroll})},setPartialPageSize({data:a}){a.partialPageSize=Dh({particlesToScroll:a.particlesToScroll,particlesToShow:a.particlesToShow,particlesCountWithoutClones:a.particlesCountWithoutClones})},setClonesCount({data:a}){const{head:l,tail:d}=IS({infinite:a.infinite,particlesToShow:a.particlesToShow,partialPageSize:a.partialPageSize});a.clonesCountHead=l,a.clonesCountTail=d,a.clonesCountTotal=l+d},setProgressManagerAutoplayDuration({data:a}){r.setAutoplayDuration(a.autoplayDuration)},toggleProgressManager({data:{pauseOnFocus:a,focused:l}}){a&&(l?r.pause():r.resume())},initDuration({data:a}){a.durationMs=a.durationMsInit},applyAutoplay({data:a,methods:{_applyAutoplayIfNeeded:l}}){a.autoplay&&l(a.autoplay)},setPagesCount({data:a}){a.pagesCount=CS({infinite:a.infinite,particlesCountWithoutClones:a.particlesCountWithoutClones,particlesToScroll:a.particlesToScroll,particlesToShow:a.particlesToShow})},setParticlesToShow({data:a}){a.particlesToShow=za(1,a.particlesToShowInit,a.particlesCountWithoutClones)},setParticlesToScroll({data:a}){a.particlesToScroll=za(1,a.particlesToScrollInit,a.particlesCountWithoutClones)}},methods:{_prev({data:a}){a.currentParticleIndex=yu({infinite:a.infinite,pageIndex:a.currentPageIndex-1,clonesCountHead:a.clonesCountHead,clonesCountTail:a.clonesCountTail,particlesToScroll:a.particlesToScroll,particlesCount:a.particlesCount,particlesToShow:a.particlesToShow})},_next({data:a}){a.currentParticleIndex=yu({infinite:a.infinite,pageIndex:a.currentPageIndex+1,clonesCountHead:a.clonesCountHead,clonesCountTail:a.clonesCountTail,particlesToScroll:a.particlesToScroll,particlesCount:a.particlesCount,particlesToShow:a.particlesToShow})},_moveToParticle({data:a},l){a.currentParticleIndex=za(0,l,a.particlesCount-1)},toggleFocused({data:a}){a.focused=!a.focused},async _applyAutoplayIfNeeded({data:a,methods:l}){if(!a.infinite&&(a.autoplayDirection===ca&&a.currentParticleIndex===a.particlesCount-1||a.autoplayDirection===Cs&&a.currentParticleIndex===0)){r.reset();return}if(a.autoplay){const d=()=>wu({[ca]:async()=>l.showNextPage(),[Cs]:async()=>l.showPrevPage()})(a.autoplayDirection);await r.start(d)}},async _jumpIfNeeded({data:a,methods:l}){let d=!1;return a.infinite&&(a.currentParticleIndex===0?(await l.showParticle(a.particlesCount-a.clonesCountTotal,{animated:!1}),d=!0):a.currentParticleIndex===a.particlesCount-a.clonesCountTail&&(await l.showParticle(a.clonesCountHead,{animated:!1}),d=!0)),d},async changePage({data:a,methods:l},d,u){if(r.reset(),a.disabled)return;a.disabled=!0,d(),await l.offsetPage({animated:As(u,"animated",!0)}),a.disabled=!1,!await l._jumpIfNeeded()&&l._applyAutoplayIfNeeded()},async showNextPage({data:a,methods:l},d){a.disabled||await l.changePage(l._next,d)},async showPrevPage({data:a,methods:l},d){a.disabled||await l.changePage(l._prev,d)},async showParticle({methods:a},l,d){await a.changePage(()=>a._moveToParticle(l),d)},_getParticleIndexByPageIndex({data:a},l){return yu({infinite:a.infinite,pageIndex:l,clonesCountHead:a.clonesCountHead,clonesCountTail:a.clonesCountTail,particlesToScroll:a.particlesToScroll,particlesCount:a.particlesCount,particlesToShow:a.particlesToShow})},async showPage({methods:a},l,d){const u=a._getParticleIndexByPageIndex(l);await a.showParticle(u,d)},offsetPage({data:a},l){const d=As(l,"animated",!0);return new Promise(u=>{a.durationMs=d?a.durationMsInit:0,a.offset=-a.currentParticleIndex*a.particleWidth,setTimeout(()=>{u()},a.durationMs)})}}},{onChange:e}),[i,s]=n;return[{data:i,progressManager:r},s,n._internal]}var qC=F('<div class="sc-carousel__arrow-container svelte-1yu03g9"><!></div>'),WC=F('<div class="sc-carousel-progress__container svelte-1yu03g9"><!></div>'),YC=F('<div class="sc-carousel__arrow-container svelte-1yu03g9"><!></div>'),KC=F('<div class="sc-carousel__carousel-container svelte-1yu03g9"><div class="sc-carousel__content-container svelte-1yu03g9"><!> <div class="sc-carousel__pages-window svelte-1yu03g9"><div class="sc-carousel__pages-container svelte-1yu03g9"><!></div> <!></div> <!></div> <!></div>');function XC(e,r){St(r,!1);let n=h([]),i=h(),s=h(),a=h(0),l=h(0),d=h(1);const u=GC((M,te)=>{wu({currentPageIndex:()=>o(i,te),progressValue:()=>o(s,te),offset:()=>o(a,te),durationMs:()=>o(l,te),pagesCount:()=>o(d,te),loaded:()=>o(n,te)})(M)}),g=es(()=>wg(u,3)),c=h(t(g)[0].data),p=t(g)[0].progressManager,_=t(g)[1];t(g)[2];const S=Se.createEventDispatcher();let y=m(r,"timingFunction",8,"ease-in-out"),T=m(r,"arrows",8,!0),I=m(r,"infinite",8,!0),k=m(r,"initialPageIndex",8,0),C=m(r,"duration",8,500),D=m(r,"autoplay",8,!1),E=m(r,"autoplayDuration",8,3e3),U=m(r,"autoplayDirection",8,ca),$=m(r,"pauseOnFocus",8,!1),R=m(r,"autoplayProgressVisible",8,!1),H=m(r,"dots",8,!0),J=m(r,"swiping",8,!0),de=m(r,"particlesToShow",8,1),fe=m(r,"particlesToScroll",8,1);async function we(M,te){const ve=As(te,"animated",!0);if(typeof M!="number")throw new Error("pageIndex should be a number");await _.showPage(M,{animated:ve})}async function pe(M){const te=As(M,"animated",!0);await _.showPrevPage({animated:te})}async function De(M){const te=As(M,"animated",!0);await _.showNextPage({animated:te})}let ke=h(0),ye=h(),ce=h();const Z=DS(({width:M})=>{o(ke,M),zt(c,t(c).particleWidth=t(ke)/t(c).particlesToShow),kS({particlesContainerChildren:t(ce).children,particleWidth:t(c).particleWidth}),_.offsetPage({animated:!1})});function Y(){const{clonesToAppend:M,clonesToPrepend:te}=xS({clonesCountHead:t(c).clonesCountHead,clonesCountTail:t(c).clonesCountTail,particlesContainerChildren:t(ce).children});OS({particlesContainer:t(ce),clonesToAppend:M,clonesToPrepend:te})}Se.onMount(()=>{(async()=>(await Se.tick(),t(ce)&&t(ye)&&(zt(c,t(c).particlesCountWithoutClones=t(ce).children.length),await Se.tick(),t(c).infinite&&Y(),zt(c,t(c).particlesCount=t(ce).children.length),_.showPage(k(),{animated:!1}),Z.observe(t(ye)))))()}),Se.onDestroy(()=>{Z.disconnect(),p.reset()});async function re(M){await _.showPage(M,{animated:!0})}function G(){J()&&zt(c,t(c).durationMs=0)}async function ae(M){J()&&await wu({[ca]:_.showNextPage,[Cs]:_.showPrevPage})(M.detail.direction)}function z(M){J()&&zt(c,t(c).offset+=M.detail.dx)}function ge(){J()&&_.showParticle(t(c).currentParticleIndex)}async function O(){J()&&await _.offsetPage({animated:!0})}function q(M){zt(c,t(c).focused=M.detail.value)}function ne(){_.toggleFocused()}function se(){_.showPrevPage()}x(()=>t(i),()=>{S("pageChange",t(i))}),x(()=>v(I()),()=>{zt(c,t(c).infinite=I())}),x(()=>v(C()),()=>{zt(c,t(c).durationMsInit=C())}),x(()=>v(D()),()=>{zt(c,t(c).autoplay=D())}),x(()=>v(E()),()=>{zt(c,t(c).autoplayDuration=E())}),x(()=>v(U()),()=>{zt(c,t(c).autoplayDirection=U())}),x(()=>v($()),()=>{zt(c,t(c).pauseOnFocus=$())}),x(()=>v(de()),()=>{zt(c,t(c).particlesToShowInit=de())}),x(()=>v(fe()),()=>{zt(c,t(c).particlesToScrollInit=fe())}),Mt();var ee={goTo:we,goToPrev:pe,goToNext:De};Dt();var me=KC(),Ne=j(me),Ue=j(Ne);{var he=M=>{var te=$e(),ve=Ge(te);vr(ve,r,"prev",{get showPrevPage(){return b(()=>_.showPrevPage)}},Ie=>{var Pe=qC(),Re=j(Pe);{let oe=Pt(()=>!I()&&t(i)===0);Eh(Re,{direction:"prev",get disabled(){return t(oe)},$$events:{click:se}})}w(Ie,Pe)}),w(M,te)};le(Ue,M=>{T()&&M(he)})}var ue=Ee(Ue,2),Q=j(ue),B=j(Q);vr(B,r,"default",{get loaded(){return t(n)},get currentPageIndex(){return t(i)}},null),Pr(Q,(M,te)=>mu==null?void 0:mu(M,te),()=>({thresholdProvider:()=>t(ke)/3})),Ut(()=>W("swipeStart",Q,G)),Ut(()=>W("swipeMove",Q,z)),Ut(()=>W("swipeEnd",Q,ge)),Ut(()=>W("swipeFailed",Q,O)),Ut(()=>W("swipeThresholdReached",Q,ae)),vt(Q,M=>o(ce,M),()=>t(ce));var X=Ee(Q,2);{var K=M=>{var te=WC(),ve=j(te);iS(ve,{get value(){return t(s)}}),w(M,te)};le(X,M=>{R()&&M(K)})}vt(ue,M=>o(ye,M),()=>t(ye)),Pr(ue,M=>_u==null?void 0:_u(M)),Ut(()=>W("hovered",ue,q)),Pr(ue,M=>bu==null?void 0:bu(M)),Ut(()=>W("tapped",ue,ne));var V=Ee(ue,2);{var ie=M=>{var te=$e(),ve=Ge(te);vr(ve,r,"next",{get showNextPage(){return b(()=>_.showNextPage)}},Ie=>{var Pe=YC(),Re=j(Pe);{let oe=Pt(()=>!I()&&t(i)===t(d)-1);Eh(Re,{direction:"next",get disabled(){return t(oe)},$$events:{click(...Oe){var Fe;(Fe=_.showNextPage)==null||Fe.apply(this,Oe)}}})}w(Ie,Pe)}),w(M,te)};le(V,M=>{T()&&M(ie)})}var N=Ee(Ne,2);{var A=M=>{var te=$e(),ve=Ge(te);vr(ve,r,"dots",{get currentPageIndex(){return t(i)},get pagesCount(){return t(d)},showPage:re},Ie=>{tS(Ie,{get pagesCount(){return t(d)},get currentPageIndex(){return t(i)},$$events:{pageChange:Pe=>re(Pe.detail)}})}),w(M,te)};le(N,M=>{H()&&M(A)})}return Ce(()=>Ye(Q,`
|
|
16
|
+
transform: translateX(${t(a)??""}px);
|
|
17
|
+
transition-duration: ${t(l)??""}ms;
|
|
18
|
+
transition-timing-function: ${y()??""};
|
|
19
|
+
`)),w(e,me),pr(r,"goTo",we),pr(r,"goToPrev",pe),pr(r,"goToNext",De),Ct(ee)}var QC=F('<div class="slot-container svelte-15fd5yc"><!></div>'),ZC=F("<div><!></div>"),JC=F('<div class="slider-fallback svelte-15fd5yc"><div class="pill svelte-15fd5yc"> </div> <span class="filename svelte-15fd5yc"> </span></div>'),$C=F('<div class="slider-item svelte-15fd5yc"><!></div>'),eA=F('<div slot="prev" class="slider-navbutton svelte-15fd5yc"><i class="ph ph-caret-left"></i></div>'),tA=F('<div slot="next" class="slider-navbutton svelte-15fd5yc"><i class="ph ph-caret-right"></i></div>'),rA=F('<button class="btn-upload-empty svelte-15fd5yc" aria-label="Upload attachment" type="button"><i class="ph ph-plus"></i> Upload Attachment</button>'),nA=F('<div class="slider-placeholder svelte-15fd5yc"><!></div>'),iA=F('<div tabindex="0"><div class="slider svelte-15fd5yc"><!></div> <input type="file" style="display: none"/> <!></div>');function aA(e,r){St(r,!1);const n=()=>He(Y(),"$cellState",i),[i,s]=qt(),a=h(),l=h(),d=h(),u=h(),g=h(),c=h(),p=h(),_=h(),S=h(),y=h(),T=h(),I=h(),k=h(),C=h(),D=h(),E=h(),U=h(),$=h();let R=m(r,"value",12),H=m(r,"cellOptions",8),J=m(r,"fieldSchema",8),de=m(r,"tableid",8),fe=m(r,"API",8),we=m(r,"inBuilder",8);const pe=Se.createEventDispatcher();let De=R(),ke=h(),ye=h(),ce=h(new Set),Z=0,Y=m(r,"cellState",24,()=>or(H().initialState??"View",{"*":{goTo(V){return V}},View:{_enter(){},focus(){if(!H().readonly)return"Editing"}},Editing:{_enter(){var V;De=R(),(V=t(ke))==null||V.focus(),pe("enteredit")},_exit(){pe("exitedit")},focousout(V){var ie;if(!((ie=t(ke))!=null&&ie.contains(V.relatedTarget)))return"View"},change(V){H().debounce&&pe("change",R())},submit(V){return R()!==De&&pe("change",R()),pe("focusout"),"View"},cancel(){return R(De),"View"}}}));const re=async V=>{let ie=new FormData;for(let N=0;N<V.length;N++)ie.append("file",V[N]);try{let N=await fe().uploadAttachment(de(),ie);return pe("change",[...t(l),...N]),N}catch(N){return console.error("Upload failed:",N),[]}};function G(V){t(l).splice(V,1),o(l,[...t(l)]),pe("change",t(l))}function ae(V){const ie=new Set(t(ce));ie.has(V)?ie.delete(V):ie.add(V),o(ce,ie)}function z(){t(ye)&&t(ye).click()}function ge(V){const ie=V.target,N=Array.from(ie.files||[]);re(N)}let O=h(!1),q=h(0);function ne(V){var ie,N;if(!(!t($)||t($)==="none")){if(t($)==="view")se(V);else if(t($)==="select")ae(V);else if(t($)==="custom"){let A=t(l)[V];(N=(ie=H()).onItemClick)==null||N.call(ie,{item:A,index:V})}}}function se(V=Z){var ie;!t(g)&&!we()&&((ie=t(l))!=null&&ie[V])&&ee(t(l)[V])&&(o(q,V),o(O,!0))}function ee(V){var N;return["jpg","jpeg","png","gif","bmp","webp"].includes((N=V.extension)==null?void 0:N.toLowerCase())}x(()=>v(J()),()=>{var V,ie;o(a,((ie=(V=J())==null?void 0:V.type)==null?void 0:ie.includes("single"))!==!0)}),x(()=>(v(R()),t(a)),()=>{o(l,R()&&t(a)?R():R()?[R()]:[])}),x(()=>v(H()),()=>{o(d,!H().readonly&&!H().disabled)}),x(()=>v(H()),()=>{o(u,H().isGallery)}),x(()=>v(H()),()=>{o(g,H().disabled)}),x(()=>v(H()),()=>{o(c,H().readonly)}),x(()=>(t(c),t(g),t(u)),()=>{o(p,!t(c)&&!t(g)&&!t(u))}),x(()=>(t(c),t(g),t(u)),()=>{o(_,!t(c)&&!t(g)&&!t(u))}),x(()=>v(H()),()=>{o(S,H().slotted)}),x(()=>(v(H()),t(l)),()=>{var V;o(y,H().carouselDots!==void 0?H().carouselDots:((V=t(l))==null?void 0:V.length)>1)}),x(()=>(v(H()),t(l)),()=>{var V;o(T,H().carouselArrows!==void 0?H().carouselArrows:((V=t(l))==null?void 0:V.length)>1)}),x(()=>(v(H()),t(l)),()=>{var V;o(I,H().carouselInfinite!==void 0?H().carouselInfinite:((V=t(l))==null?void 0:V.length)>1)}),x(()=>v(H()),()=>{o(k,H().carouselAutoplay!==void 0?H().carouselAutoplay:!1)}),x(()=>v(H()),()=>{o(C,H().carouselAutoplaySpeed!==void 0?H().carouselAutoplaySpeed:1e3)}),x(()=>v(H()),()=>{o(D,H().carouselItemsToShow!==void 0?H().carouselItemsToShow:3)}),x(()=>v(H()),()=>{o(E,H().carouselItemsToScroll!==void 0?H().carouselItemsToScroll:1)}),x(()=>v(H()),()=>{o(U,H().carouselMode==="marquee")}),x(()=>v(H()),()=>{o($,H().onClickAction)}),Mt(),Dt();var me=iA();let Ne,Ue;var he=j(me),ue=j(he);{var Q=V=>{var ie=$e(),N=Ge(ie);ea(N,()=>t(D),A=>{{let M=Pt(()=>t(y)&&!t(U)),te=Pt(()=>t(T)&&!t(U)),ve=Pt(()=>t(k)||t(U));XC(A,{get particlesToShow(){return t(D)},get particlesToScroll(){return t(E)},get dots(){return t(M)},get arrows(){return t(te)},get infinite(){return t(I)},get autoplay(){return t(ve)},height:"100%",children:(Ie,Pe)=>{var Re=$e(),oe=Ge(Re);At(oe,1,()=>t(l),Ft,(Oe,Fe,Be)=>{var Le=$C();Ye(Le,"",{},{height:"100%"});var Te=j(Le);{var qe=Je=>{var nt=ZC();let at;var ct=j(nt);{var it=_e=>{var We=QC(),Ke=j(We);vr(Ke,r,"default",{},null),w(_e,We)};le(ct,_e=>{t(S)&&_e(it)})}Ce(_e=>{at=Me(nt,1,"slider-image svelte-15fd5yc",null,at,_e),Ye(nt,`background-image: url('${t(Fe),b(()=>t(Fe).url)??""}')`),Vt(nt,"aria-label",(t(Fe),b(()=>t(Fe).name)))},[()=>({selected:t(ce).has(Be)})]),w(Je,nt)},Ze=Je=>{var nt=$e(),at=Ge(nt);{var ct=it=>{var _e=JC(),We=j(_e),Ke=j(We),Ae=Ee(We,2),je=j(Ae);Ce(et=>{Xe(Ke,et),Xe(je,(t(Fe),b(()=>t(Fe).name)))},[()=>(t(Fe),b(()=>{var et;return(et=t(Fe).extension)==null?void 0:et.toUpperCase()}))]),w(it,_e)};le(at,it=>{t(u)||it(ct)},!0)}w(Je,nt)};le(Te,Je=>{t(Fe),b(()=>ee(t(Fe)))?Je(qe):Je(Ze,!1)})}W("click",Le,()=>{ne(Be)}),w(Oe,Le)}),w(Ie,Re)},$$slots:{default:!0,prev:(Ie,Pe)=>{var Re=eA();const oe=Pt(()=>Pe.showPrevPage);W("click",Re,function(...Oe){var Fe;(Fe=t(oe))==null||Fe.apply(this,Oe)}),w(Ie,Re)},next:(Ie,Pe)=>{var Re=tA();const oe=Pt(()=>Pe.showNextPage);W("click",Re,function(...Oe){var Fe;(Fe=t(oe))==null||Fe.apply(this,Oe)}),w(Ie,Re)}}})}}),w(V,ie)},B=V=>{var ie=$e(),N=Ge(ie);{var A=M=>{var te=nA(),ve=j(te);{var Ie=Pe=>{var Re=rA();Ce(()=>Re.disabled=(v(H()),b(()=>H().disabled||H().readonly))),W("click",Re,z),w(Pe,Re)};le(ve,Pe=>{t(d)&&Pe(Ie)})}w(M,te)};le(N,M=>{t(u)||M(A)},!0)}w(V,ie)};le(ue,V=>{t(l),b(()=>{var ie;return(ie=t(l))==null?void 0:ie.length})?V(Q):V(B,!1)})}var X=Ee(he,2);vt(X,V=>o(ye,V),()=>t(ye));var K=Ee(X,2);cu(K,{get canSelect(){return t(p)},get canDelete(){return t(_)},get items(){return t(l)},set items(V){o(l,V)},get open(){return t(O)},set open(V){o(O,V)},get currentIndex(){return t(q)},set currentIndex(V){o(q,V)},get selectedIndices(){return t(ce)},set selectedIndices(V){o(ce,V)},$$events:{close:()=>console.log("lightbox closed"),delete:V=>{G(V.detail.index)}},$$legacy:!0}),vt(me,V=>o(ke,V),()=>t(ke)),Ce(()=>{Ne=Me(me,1,"superCell",null,Ne,{multirow:!0,inEdit:n()=="Editing",inline:H().role=="tableCell",tableCell:H().role=="tableCell",formInput:H().role=="formInput",disabled:H().disabled,readonly:H().readonly}),Ue=Ye(me,"",Ue,{color:(v(H()),b(()=>H().color)),background:(v(H()),b(()=>H().background)),overflow:"hidden"}),X.multiple=t(a)}),W("change",X,ge),W("focusin",me,function(...V){var ie;(ie=Y().focus)==null||ie.apply(this,V)}),W("focusout",me,function(...V){var ie;(ie=Y().focousout)==null||ie.apply(this,V)}),w(e,me),Ct(),s()}function ku({target:e}){e.style.height="1px",e.style.height=+e.scrollHeight+"px"}function sA(e){return ku({target:e}),e.style.overflow="hidden",e.addEventListener("input",ku),{destroy:()=>e.removeEventListener("input",ku)}}dt.CellAttachment=lu,dt.CellAttachmentExpanded=QE,dt.CellAttachmentSlider=aA,dt.CellBoolean=tu,dt.CellColor=w1,dt.CellDateRange=I1,dt.CellDatetime=au,dt.CellIcon=Y1,dt.CellJSON=ou,dt.CellLink=Ro,dt.CellLinkAdvanced=xw,dt.CellLinkPickerSelect=fh,dt.CellLinkPickerTree=Io,dt.CellNumber=Es,dt.CellOptions=oa,dt.CellOptionsAdvanced=jw,dt.CellSQLLink=yw,dt.CellSkeleton=ph,dt.CellString=Jr,dt.CellStringMask=cE,dt.CellStringSimple=eu,dt.CellTags=CE,dt.IconButton=$l,dt.SuperButton=ra,dt.SuperField=Bv,dt.SuperForm=zp,dt.SuperLightbox=cu,dt.SuperList=uh,dt.SuperPopover=Qr,dt.SuperTable=Z0,dt.SuperTableColumn=uu,dt.SuperTabs=i1,dt.SuperTree=su,dt.Tooltip=no,dt.autoresizeTextarea=sA,dt.clickOutside=ro,dt.defaultOperatorMap=ch,dt.positionDropdown=to,Object.defineProperty(dt,Symbol.toStringTag,{value:"Module"})});
|