@kubex/zinc 1.1.89 → 1.1.90
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/custom-elements.json +837 -805
- package/dist/vscode.html-custom-data.json +94 -94
- package/dist/web-types.json +250 -250
- package/dist/zn.d.ts +7 -1
- package/dist/zn.min.js +5 -5
- package/docs/pages/components/editor.md +0 -1
- package/package.json +1 -1
- package/src/components/absolute-container/absolute-container.component.ts +23 -4
- package/src/components/scroll-container/scroll-container.component.ts +31 -6
package/dist/zn.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{a as $n,b as P_,c as ur,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var $0=$n((btt,T0)=>{var so=-1,Ar=1,Ve=0;function wl(i,o,t,r,n){if(i===o)return i?[[Ve,i]]:[];if(t!=null){var a=F5(i,o,t);if(a)return a}var s=ku(i,o),l=i.substring(0,s);i=i.substring(s),o=o.substring(s),s=Cd(i,o);var d=i.substring(i.length-s);i=i.substring(0,i.length-s),o=o.substring(0,o.length-s);var h=q5(i,o);return l&&h.unshift([Ve,l]),d&&h.push([Ve,d]),Cu(h,n),r&&N5(h),h}function q5(i,o){var t;if(!i)return[[Ar,o]];if(!o)return[[so,i]];var r=i.length>o.length?i:o,n=i.length>o.length?o:i,a=r.indexOf(n);if(a!==-1)return t=[[Ar,r.substring(0,a)],[Ve,n],[Ar,r.substring(a+n.length)]],i.length>o.length&&(t[0][0]=t[2][0]=so),t;if(n.length===1)return[[so,i],[Ar,o]];var s=D5(i,o);if(s){var l=s[0],d=s[1],h=s[2],m=s[3],f=s[4],b=wl(l,h),g=wl(d,m);return b.concat([[Ve,f]],g)}return I5(i,o)}function I5(i,o){for(var t=i.length,r=o.length,n=Math.ceil((t+r)/2),a=n,s=2*n,l=new Array(s),d=new Array(s),h=0;h<s;h++)l[h]=-1,d[h]=-1;l[a+1]=0,d[a+1]=0;for(var m=t-r,f=m%2!==0,b=0,g=0,v=0,x=0,_=0;_<n;_++){for(var k=-_+b;k<=_-g;k+=2){var N=a+k,G;k===-_||k!==_&&l[N-1]<l[N+1]?G=l[N+1]:G=l[N-1]+1;for(var I=G-k;G<t&&I<r&&i.charAt(G)===o.charAt(I);)G++,I++;if(l[N]=G,G>t)g+=2;else if(I>r)b+=2;else if(f){var w=a+m-k;if(w>=0&&w<s&&d[w]!==-1){var $=t-d[w];if(G>=$)return x0(i,o,G,I)}}}for(var L=-_+v;L<=_-x;L+=2){var w=a+L,$;L===-_||L!==_&&d[w-1]<d[w+1]?$=d[w+1]:$=d[w-1]+1;for(var W=$-L;$<t&&W<r&&i.charAt(t-$-1)===o.charAt(r-W-1);)$++,W++;if(d[w]=$,$>t)x+=2;else if(W>r)v+=2;else if(!f){var N=a+m-L;if(N>=0&&N<s&&l[N]!==-1){var G=l[N],I=a+G-N;if($=t-$,G>=$)return x0(i,o,G,I)}}}}return[[so,i],[Ar,o]]}function x0(i,o,t,r){var n=i.substring(0,t),a=o.substring(0,r),s=i.substring(t),l=o.substring(r),d=wl(n,a),h=wl(s,l);return d.concat(h)}function ku(i,o){if(!i||!o||i.charAt(0)!==o.charAt(0))return 0;for(var t=0,r=Math.min(i.length,o.length),n=r,a=0;t<n;)i.substring(a,n)==o.substring(a,n)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return k0(i.charCodeAt(n-1))&&n--,n}function y0(i,o){var t=i.length,r=o.length;if(t==0||r==0)return 0;t>r?i=i.substring(t-r):t<r&&(o=o.substring(0,t));var n=Math.min(t,r);if(i==o)return n;for(var a=0,s=1;;){var l=i.substring(n-s),d=o.indexOf(l);if(d==-1)return a;s+=d,(d==0||i.substring(n-s)==o.substring(0,s))&&(a=s,s++)}}function Cd(i,o){if(!i||!o||i.slice(-1)!==o.slice(-1))return 0;for(var t=0,r=Math.min(i.length,o.length),n=r,a=0;t<n;)i.substring(i.length-n,i.length-a)==o.substring(o.length-n,o.length-a)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return C0(i.charCodeAt(i.length-n))&&n--,n}function D5(i,o){var t=i.length>o.length?i:o,r=i.length>o.length?o:i;if(t.length<4||r.length*2<t.length)return null;function n(g,v,x){for(var _=g.substring(x,x+Math.floor(g.length/4)),k=-1,N="",G,I,w,$;(k=v.indexOf(_,k+1))!==-1;){var L=ku(g.substring(x),v.substring(k)),W=Cd(g.substring(0,x),v.substring(0,k));N.length<W+L&&(N=v.substring(k-W,k)+v.substring(k,k+L),G=g.substring(0,x-W),I=g.substring(x+L),w=v.substring(0,k-W),$=v.substring(k+L))}return N.length*2>=g.length?[G,I,w,$,N]:null}var a=n(t,r,Math.ceil(t.length/4)),s=n(t,r,Math.ceil(t.length/2)),l;if(!a&&!s)return null;s?a?l=a[4].length>s[4].length?a:s:l=s:l=a;var d,h,m,f;i.length>o.length?(d=l[0],h=l[1],m=l[2],f=l[3]):(m=l[0],f=l[1],d=l[2],h=l[3]);var b=l[4];return[d,h,m,f,b]}function N5(i){for(var o=!1,t=[],r=0,n=null,a=0,s=0,l=0,d=0,h=0;a<i.length;)i[a][0]==Ve?(t[r++]=a,s=d,l=h,d=0,h=0,n=i[a][1]):(i[a][0]==Ar?d+=i[a][1].length:h+=i[a][1].length,n&&n.length<=Math.max(s,l)&&n.length<=Math.max(d,h)&&(i.splice(t[r-1],0,[so,n]),i[t[r-1]+1][0]=Ar,r--,r--,a=r>0?t[r-1]:-1,s=0,l=0,d=0,h=0,n=null,o=!0)),a++;for(o&&Cu(i),P5(i),a=1;a<i.length;){if(i[a-1][0]==so&&i[a][0]==Ar){var m=i[a-1][1],f=i[a][1],b=y0(m,f),g=y0(f,m);b>=g?(b>=m.length/2||b>=f.length/2)&&(i.splice(a,0,[Ve,f.substring(0,b)]),i[a-1][1]=m.substring(0,m.length-b),i[a+1][1]=f.substring(b),a++):(g>=m.length/2||g>=f.length/2)&&(i.splice(a,0,[Ve,m.substring(0,g)]),i[a-1][0]=Ar,i[a-1][1]=f.substring(0,f.length-g),i[a+1][0]=so,i[a+1][1]=m.substring(g),a++),a++}a++}}var z0=/[^a-zA-Z0-9]/,w0=/\s/,_0=/[\r\n]/,R5=/\n\r?\n$/,O5=/^\r?\n\r?\n/;function P5(i){function o(g,v){if(!g||!v)return 6;var x=g.charAt(g.length-1),_=v.charAt(0),k=x.match(z0),N=_.match(z0),G=k&&x.match(w0),I=N&&_.match(w0),w=G&&x.match(_0),$=I&&_.match(_0),L=w&&g.match(R5),W=$&&v.match(O5);return L||W?5:w||$?4:k&&!G&&I?3:G||I?2:k||N?1:0}for(var t=1;t<i.length-1;){if(i[t-1][0]==Ve&&i[t+1][0]==Ve){var r=i[t-1][1],n=i[t][1],a=i[t+1][1],s=Cd(r,n);if(s){var l=n.substring(n.length-s);r=r.substring(0,r.length-s),n=l+n.substring(0,n.length-s),a=l+a}for(var d=r,h=n,m=a,f=o(r,n)+o(n,a);n.charAt(0)===a.charAt(0);){r+=n.charAt(0),n=n.substring(1)+a.charAt(0),a=a.substring(1);var b=o(r,n)+o(n,a);b>=f&&(f=b,d=r,h=n,m=a)}i[t-1][1]!=d&&(d?i[t-1][1]=d:(i.splice(t-1,1),t--),i[t][1]=h,m?i[t+1][1]=m:(i.splice(t+1,1),t--))}t++}}function Cu(i,o){i.push([Ve,""]);for(var t=0,r=0,n=0,a="",s="",l;t<i.length;){if(t<i.length-1&&!i[t][1]){i.splice(t,1);continue}switch(i[t][0]){case Ar:n++,s+=i[t][1],t++;break;case so:r++,a+=i[t][1],t++;break;case Ve:var d=t-n-r-1;if(o){if(d>=0&&E0(i[d][1])){var h=i[d][1].slice(-1);if(i[d][1]=i[d][1].slice(0,-1),a=h+a,s=h+s,!i[d][1]){i.splice(d,1),t--;var m=d-1;i[m]&&i[m][0]===Ar&&(n++,s=i[m][1]+s,m--),i[m]&&i[m][0]===so&&(r++,a=i[m][1]+a,m--),d=m}}if(S0(i[t][1])){var h=i[t][1].charAt(0);i[t][1]=i[t][1].slice(1),a+=h,s+=h}}if(t<i.length-1&&!i[t][1]){i.splice(t,1);break}if(a.length>0||s.length>0){a.length>0&&s.length>0&&(l=ku(s,a),l!==0&&(d>=0?i[d][1]+=s.substring(0,l):(i.splice(0,0,[Ve,s.substring(0,l)]),t++),s=s.substring(l),a=a.substring(l)),l=Cd(s,a),l!==0&&(i[t][1]=s.substring(s.length-l)+i[t][1],s=s.substring(0,s.length-l),a=a.substring(0,a.length-l)));var f=n+r;a.length===0&&s.length===0?(i.splice(t-f,f),t=t-f):a.length===0?(i.splice(t-f,f,[Ar,s]),t=t-f+1):s.length===0?(i.splice(t-f,f,[so,a]),t=t-f+1):(i.splice(t-f,f,[so,a],[Ar,s]),t=t-f+2)}t!==0&&i[t-1][0]===Ve?(i[t-1][1]+=i[t][1],i.splice(t,1)):t++,n=0,r=0,a="",s="";break}}i[i.length-1][1]===""&&i.pop();var b=!1;for(t=1;t<i.length-1;)i[t-1][0]===Ve&&i[t+1][0]===Ve&&(i[t][1].substring(i[t][1].length-i[t-1][1].length)===i[t-1][1]?(i[t][1]=i[t-1][1]+i[t][1].substring(0,i[t][1].length-i[t-1][1].length),i[t+1][1]=i[t-1][1]+i[t+1][1],i.splice(t-1,1),b=!0):i[t][1].substring(0,i[t+1][1].length)==i[t+1][1]&&(i[t-1][1]+=i[t+1][1],i[t][1]=i[t][1].substring(i[t+1][1].length)+i[t+1][1],i.splice(t+1,1),b=!0)),t++;b&&Cu(i,o)}function k0(i){return i>=55296&&i<=56319}function C0(i){return i>=56320&&i<=57343}function S0(i){return C0(i.charCodeAt(0))}function E0(i){return k0(i.charCodeAt(i.length-1))}function H5(i){for(var o=[],t=0;t<i.length;t++)i[t][1].length>0&&o.push(i[t]);return o}function _u(i,o,t,r){return E0(i)||S0(r)?null:H5([[Ve,i],[so,o],[Ar,t],[Ve,r]])}function F5(i,o,t){var r=typeof t=="number"?{index:t,length:0}:t.oldRange,n=typeof t=="number"?null:t.newRange,a=i.length,s=o.length;if(r.length===0&&(n===null||n.length===0)){var l=r.index,d=i.slice(0,l),h=i.slice(l),m=n?n.index:null;t:{var f=l+s-a;if(m!==null&&m!==f||f<0||f>s)break t;var b=o.slice(0,f),g=o.slice(f);if(g!==h)break t;var v=Math.min(l,f),x=d.slice(0,v),_=b.slice(0,v);if(x!==_)break t;var k=d.slice(v),N=b.slice(v);return _u(x,k,N,h)}t:{if(m!==null&&m!==l)break t;var G=l,b=o.slice(0,G),g=o.slice(G);if(b!==d)break t;var I=Math.min(a-G,s-G),w=h.slice(h.length-I),$=g.slice(g.length-I);if(w!==$)break t;var k=h.slice(0,h.length-I),N=g.slice(0,g.length-I);return _u(d,k,N,w)}}if(r.length>0&&n&&n.length===0)t:{var x=i.slice(0,r.index),w=i.slice(r.index+r.length),v=x.length,I=w.length;if(s<v+I)break t;var _=o.slice(0,v),$=o.slice(s-I);if(x!==_||w!==$)break t;var k=i.slice(v,a-I),N=o.slice(v,s-I);return _u(x,k,N,w)}return null}function Sd(i,o,t,r){return wl(i,o,t,r,!0)}Sd.INSERT=Ar;Sd.DELETE=so;Sd.EQUAL=Ve;T0.exports=Sd});var Hu=$n((_l,ts)=>{var B5=200,F0="__lodash_hash_undefined__",B0=9007199254740991,qu="[object Arguments]",V5="[object Array]",V0="[object Boolean]",U0="[object Date]",U5="[object Error]",Iu="[object Function]",j0="[object GeneratorFunction]",Ed="[object Map]",G0="[object Number]",Du="[object Object]",A0="[object Promise]",W0="[object RegExp]",Td="[object Set]",K0="[object String]",Y0="[object Symbol]",Eu="[object WeakMap]",X0="[object ArrayBuffer]",$d="[object DataView]",Q0="[object Float32Array]",J0="[object Float64Array]",Z0="[object Int8Array]",t1="[object Int16Array]",e1="[object Int32Array]",r1="[object Uint8Array]",o1="[object Uint8ClampedArray]",n1="[object Uint16Array]",i1="[object Uint32Array]",j5=/[\\^$.*+?()[\]{}|]/g,G5=/\w*$/,W5=/^\[object .+?Constructor\]$/,K5=/^(?:0|[1-9]\d*)$/,Gt={};Gt[qu]=Gt[V5]=Gt[X0]=Gt[$d]=Gt[V0]=Gt[U0]=Gt[Q0]=Gt[J0]=Gt[Z0]=Gt[t1]=Gt[e1]=Gt[Ed]=Gt[G0]=Gt[Du]=Gt[W0]=Gt[Td]=Gt[K0]=Gt[Y0]=Gt[r1]=Gt[o1]=Gt[n1]=Gt[i1]=!0;Gt[U5]=Gt[Iu]=Gt[Eu]=!1;var Y5=typeof global=="object"&&global&&global.Object===Object&&global,X5=typeof self=="object"&&self&&self.Object===Object&&self,On=Y5||X5||Function("return this")(),a1=typeof _l=="object"&&_l&&!_l.nodeType&&_l,L0=a1&&typeof ts=="object"&&ts&&!ts.nodeType&&ts,Q5=L0&&L0.exports===a1;function J5(i,o){return i.set(o[0],o[1]),i}function Z5(i,o){return i.add(o),i}function t4(i,o){for(var t=-1,r=i?i.length:0;++t<r&&o(i[t],t,i)!==!1;);return i}function e4(i,o){for(var t=-1,r=o.length,n=i.length;++t<r;)i[n+t]=o[t];return i}function s1(i,o,t,r){var n=-1,a=i?i.length:0;for(r&&a&&(t=i[++n]);++n<a;)t=o(t,i[n],n,i);return t}function r4(i,o){for(var t=-1,r=Array(i);++t<i;)r[t]=o(t);return r}function o4(i,o){return i?.[o]}function l1(i){var o=!1;if(i!=null&&typeof i.toString!="function")try{o=!!(i+"")}catch{}return o}function M0(i){var o=-1,t=Array(i.size);return i.forEach(function(r,n){t[++o]=[n,r]}),t}function Nu(i,o){return function(t){return i(o(t))}}function q0(i){var o=-1,t=Array(i.size);return i.forEach(function(r){t[++o]=r}),t}var n4=Array.prototype,i4=Function.prototype,Ad=Object.prototype,Su=On["__core-js_shared__"],I0=(function(){var i=/[^.]+$/.exec(Su&&Su.keys&&Su.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),c1=i4.toString,bi=Ad.hasOwnProperty,Ld=Ad.toString,a4=RegExp("^"+c1.call(bi).replace(j5,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D0=Q5?On.Buffer:void 0,N0=On.Symbol,R0=On.Uint8Array,s4=Nu(Object.getPrototypeOf,Object),l4=Object.create,c4=Ad.propertyIsEnumerable,d4=n4.splice,O0=Object.getOwnPropertySymbols,p4=D0?D0.isBuffer:void 0,h4=Nu(Object.keys,Object),Tu=os(On,"DataView"),kl=os(On,"Map"),$u=os(On,"Promise"),Au=os(On,"Set"),Lu=os(On,"WeakMap"),Cl=os(Object,"create"),u4=ua(Tu),m4=ua(kl),f4=ua($u),g4=ua(Au),b4=ua(Lu),P0=N0?N0.prototype:void 0,H0=P0?P0.valueOf:void 0;function ha(i){var o=-1,t=i?i.length:0;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function v4(){this.__data__=Cl?Cl(null):{}}function x4(i){return this.has(i)&&delete this.__data__[i]}function y4(i){var o=this.__data__;if(Cl){var t=o[i];return t===F0?void 0:t}return bi.call(o,i)?o[i]:void 0}function z4(i){var o=this.__data__;return Cl?o[i]!==void 0:bi.call(o,i)}function w4(i,o){var t=this.__data__;return t[i]=Cl&&o===void 0?F0:o,this}ha.prototype.clear=v4;ha.prototype.delete=x4;ha.prototype.get=y4;ha.prototype.has=z4;ha.prototype.set=w4;function Pn(i){var o=-1,t=i?i.length:0;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function _4(){this.__data__=[]}function k4(i){var o=this.__data__,t=Md(o,i);if(t<0)return!1;var r=o.length-1;return t==r?o.pop():d4.call(o,t,1),!0}function C4(i){var o=this.__data__,t=Md(o,i);return t<0?void 0:o[t][1]}function S4(i){return Md(this.__data__,i)>-1}function E4(i,o){var t=this.__data__,r=Md(t,i);return r<0?t.push([i,o]):t[r][1]=o,this}Pn.prototype.clear=_4;Pn.prototype.delete=k4;Pn.prototype.get=C4;Pn.prototype.has=S4;Pn.prototype.set=E4;function es(i){var o=-1,t=i?i.length:0;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function T4(){this.__data__={hash:new ha,map:new(kl||Pn),string:new ha}}function $4(i){return qd(this,i).delete(i)}function A4(i){return qd(this,i).get(i)}function L4(i){return qd(this,i).has(i)}function M4(i,o){return qd(this,i).set(i,o),this}es.prototype.clear=T4;es.prototype.delete=$4;es.prototype.get=A4;es.prototype.has=L4;es.prototype.set=M4;function rs(i){this.__data__=new Pn(i)}function q4(){this.__data__=new Pn}function I4(i){return this.__data__.delete(i)}function D4(i){return this.__data__.get(i)}function N4(i){return this.__data__.has(i)}function R4(i,o){var t=this.__data__;if(t instanceof Pn){var r=t.__data__;if(!kl||r.length<B5-1)return r.push([i,o]),this;t=this.__data__=new es(r)}return t.set(i,o),this}rs.prototype.clear=q4;rs.prototype.delete=I4;rs.prototype.get=D4;rs.prototype.has=N4;rs.prototype.set=R4;function O4(i,o){var t=Ou(i)||l8(i)?r4(i.length,String):[],r=t.length,n=!!r;for(var a in i)(o||bi.call(i,a))&&!(n&&(a=="length"||n8(a,r)))&&t.push(a);return t}function d1(i,o,t){var r=i[o];(!(bi.call(i,o)&&m1(r,t))||t===void 0&&!(o in i))&&(i[o]=t)}function Md(i,o){for(var t=i.length;t--;)if(m1(i[t][0],o))return t;return-1}function P4(i,o){return i&&p1(o,Pu(o),i)}function Mu(i,o,t,r,n,a,s){var l;if(r&&(l=a?r(i,n,a,s):r(i)),l!==void 0)return l;if(!Id(i))return i;var d=Ou(i);if(d){if(l=e8(i),!o)return J4(i,l)}else{var h=pa(i),m=h==Iu||h==j0;if(d8(i))return j4(i,o);if(h==Du||h==qu||m&&!a){if(l1(i))return a?i:{};if(l=r8(m?{}:i),!o)return Z4(i,P4(l,i))}else{if(!Gt[h])return a?i:{};l=o8(i,h,Mu,o)}}s||(s=new rs);var f=s.get(i);if(f)return f;if(s.set(i,l),!d)var b=t?t8(i):Pu(i);return t4(b||i,function(g,v){b&&(v=g,g=i[v]),d1(l,v,Mu(g,o,t,r,v,i,s))}),l}function H4(i){return Id(i)?l4(i):{}}function F4(i,o,t){var r=o(i);return Ou(i)?r:e4(r,t(i))}function B4(i){return Ld.call(i)}function V4(i){if(!Id(i)||a8(i))return!1;var o=g1(i)||l1(i)?a4:W5;return o.test(ua(i))}function U4(i){if(!u1(i))return h4(i);var o=[];for(var t in Object(i))bi.call(i,t)&&t!="constructor"&&o.push(t);return o}function j4(i,o){if(o)return i.slice();var t=new i.constructor(i.length);return i.copy(t),t}function Ru(i){var o=new i.constructor(i.byteLength);return new R0(o).set(new R0(i)),o}function G4(i,o){var t=o?Ru(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.byteLength)}function W4(i,o,t){var r=o?t(M0(i),!0):M0(i);return s1(r,J5,new i.constructor)}function K4(i){var o=new i.constructor(i.source,G5.exec(i));return o.lastIndex=i.lastIndex,o}function Y4(i,o,t){var r=o?t(q0(i),!0):q0(i);return s1(r,Z5,new i.constructor)}function X4(i){return H0?Object(H0.call(i)):{}}function Q4(i,o){var t=o?Ru(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.length)}function J4(i,o){var t=-1,r=i.length;for(o||(o=Array(r));++t<r;)o[t]=i[t];return o}function p1(i,o,t,r){t||(t={});for(var n=-1,a=o.length;++n<a;){var s=o[n],l=r?r(t[s],i[s],s,t,i):void 0;d1(t,s,l===void 0?i[s]:l)}return t}function Z4(i,o){return p1(i,h1(i),o)}function t8(i){return F4(i,Pu,h1)}function qd(i,o){var t=i.__data__;return i8(o)?t[typeof o=="string"?"string":"hash"]:t.map}function os(i,o){var t=o4(i,o);return V4(t)?t:void 0}var h1=O0?Nu(O0,Object):u8,pa=B4;(Tu&&pa(new Tu(new ArrayBuffer(1)))!=$d||kl&&pa(new kl)!=Ed||$u&&pa($u.resolve())!=A0||Au&&pa(new Au)!=Td||Lu&&pa(new Lu)!=Eu)&&(pa=function(i){var o=Ld.call(i),t=o==Du?i.constructor:void 0,r=t?ua(t):void 0;if(r)switch(r){case u4:return $d;case m4:return Ed;case f4:return A0;case g4:return Td;case b4:return Eu}return o});function e8(i){var o=i.length,t=i.constructor(o);return o&&typeof i[0]=="string"&&bi.call(i,"index")&&(t.index=i.index,t.input=i.input),t}function r8(i){return typeof i.constructor=="function"&&!u1(i)?H4(s4(i)):{}}function o8(i,o,t,r){var n=i.constructor;switch(o){case X0:return Ru(i);case V0:case U0:return new n(+i);case $d:return G4(i,r);case Q0:case J0:case Z0:case t1:case e1:case r1:case o1:case n1:case i1:return Q4(i,r);case Ed:return W4(i,r,t);case G0:case K0:return new n(i);case W0:return K4(i);case Td:return Y4(i,r,t);case Y0:return X4(i)}}function n8(i,o){return o=o??B0,!!o&&(typeof i=="number"||K5.test(i))&&i>-1&&i%1==0&&i<o}function i8(i){var o=typeof i;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?i!=="__proto__":i===null}function a8(i){return!!I0&&I0 in i}function u1(i){var o=i&&i.constructor,t=typeof o=="function"&&o.prototype||Ad;return i===t}function ua(i){if(i!=null){try{return c1.call(i)}catch{}try{return i+""}catch{}}return""}function s8(i){return Mu(i,!0,!0)}function m1(i,o){return i===o||i!==i&&o!==o}function l8(i){return c8(i)&&bi.call(i,"callee")&&(!c4.call(i,"callee")||Ld.call(i)==qu)}var Ou=Array.isArray;function f1(i){return i!=null&&p8(i.length)&&!g1(i)}function c8(i){return h8(i)&&f1(i)}var d8=p4||m8;function g1(i){var o=Id(i)?Ld.call(i):"";return o==Iu||o==j0}function p8(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=B0}function Id(i){var o=typeof i;return!!i&&(o=="object"||o=="function")}function h8(i){return!!i&&typeof i=="object"}function Pu(i){return f1(i)?O4(i):U4(i)}function u8(){return[]}function m8(){return!1}ts.exports=s8});var Ju=$n((Sl,is)=>{var f8=200,Qu="__lodash_hash_undefined__",Bd=1,T1=2,$1=9007199254740991,Dd="[object Arguments]",Uu="[object Array]",g8="[object AsyncFunction]",A1="[object Boolean]",L1="[object Date]",M1="[object Error]",q1="[object Function]",b8="[object GeneratorFunction]",Nd="[object Map]",I1="[object Number]",v8="[object Null]",ns="[object Object]",b1="[object Promise]",x8="[object Proxy]",D1="[object RegExp]",Rd="[object Set]",N1="[object String]",y8="[object Symbol]",z8="[object Undefined]",ju="[object WeakMap]",R1="[object ArrayBuffer]",Od="[object DataView]",w8="[object Float32Array]",_8="[object Float64Array]",k8="[object Int8Array]",C8="[object Int16Array]",S8="[object Int32Array]",E8="[object Uint8Array]",T8="[object Uint8ClampedArray]",$8="[object Uint16Array]",A8="[object Uint32Array]",L8=/[\\^$.*+?()[\]{}|]/g,M8=/^\[object .+?Constructor\]$/,q8=/^(?:0|[1-9]\d*)$/,Qt={};Qt[w8]=Qt[_8]=Qt[k8]=Qt[C8]=Qt[S8]=Qt[E8]=Qt[T8]=Qt[$8]=Qt[A8]=!0;Qt[Dd]=Qt[Uu]=Qt[R1]=Qt[A1]=Qt[Od]=Qt[L1]=Qt[M1]=Qt[q1]=Qt[Nd]=Qt[I1]=Qt[ns]=Qt[D1]=Qt[Rd]=Qt[N1]=Qt[ju]=!1;var O1=typeof global=="object"&&global&&global.Object===Object&&global,I8=typeof self=="object"&&self&&self.Object===Object&&self,Hn=O1||I8||Function("return this")(),P1=typeof Sl=="object"&&Sl&&!Sl.nodeType&&Sl,v1=P1&&typeof is=="object"&&is&&!is.nodeType&&is,H1=v1&&v1.exports===P1,Fu=H1&&O1.process,x1=(function(){try{return Fu&&Fu.binding&&Fu.binding("util")}catch{}})(),y1=x1&&x1.isTypedArray;function D8(i,o){for(var t=-1,r=i==null?0:i.length,n=0,a=[];++t<r;){var s=i[t];o(s,t,i)&&(a[n++]=s)}return a}function N8(i,o){for(var t=-1,r=o.length,n=i.length;++t<r;)i[n+t]=o[t];return i}function R8(i,o){for(var t=-1,r=i==null?0:i.length;++t<r;)if(o(i[t],t,i))return!0;return!1}function O8(i,o){for(var t=-1,r=Array(i);++t<i;)r[t]=o(t);return r}function P8(i){return function(o){return i(o)}}function H8(i,o){return i.has(o)}function F8(i,o){return i?.[o]}function B8(i){var o=-1,t=Array(i.size);return i.forEach(function(r,n){t[++o]=[n,r]}),t}function V8(i,o){return function(t){return i(o(t))}}function U8(i){var o=-1,t=Array(i.size);return i.forEach(function(r){t[++o]=r}),t}var j8=Array.prototype,G8=Function.prototype,Vd=Object.prototype,Bu=Hn["__core-js_shared__"],F1=G8.toString,bn=Vd.hasOwnProperty,z1=(function(){var i=/[^.]+$/.exec(Bu&&Bu.keys&&Bu.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),B1=Vd.toString,W8=RegExp("^"+F1.call(bn).replace(L8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),w1=H1?Hn.Buffer:void 0,Pd=Hn.Symbol,_1=Hn.Uint8Array,V1=Vd.propertyIsEnumerable,K8=j8.splice,ma=Pd?Pd.toStringTag:void 0,k1=Object.getOwnPropertySymbols,Y8=w1?w1.isBuffer:void 0,X8=V8(Object.keys,Object),Gu=as(Hn,"DataView"),El=as(Hn,"Map"),Wu=as(Hn,"Promise"),Ku=as(Hn,"Set"),Yu=as(Hn,"WeakMap"),Tl=as(Object,"create"),Q8=ba(Gu),J8=ba(El),Z8=ba(Wu),t6=ba(Ku),e6=ba(Yu),C1=Pd?Pd.prototype:void 0,Vu=C1?C1.valueOf:void 0;function fa(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function r6(){this.__data__=Tl?Tl(null):{},this.size=0}function o6(i){var o=this.has(i)&&delete this.__data__[i];return this.size-=o?1:0,o}function n6(i){var o=this.__data__;if(Tl){var t=o[i];return t===Qu?void 0:t}return bn.call(o,i)?o[i]:void 0}function i6(i){var o=this.__data__;return Tl?o[i]!==void 0:bn.call(o,i)}function a6(i,o){var t=this.__data__;return this.size+=this.has(i)?0:1,t[i]=Tl&&o===void 0?Qu:o,this}fa.prototype.clear=r6;fa.prototype.delete=o6;fa.prototype.get=n6;fa.prototype.has=i6;fa.prototype.set=a6;function Fn(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function s6(){this.__data__=[],this.size=0}function l6(i){var o=this.__data__,t=Ud(o,i);if(t<0)return!1;var r=o.length-1;return t==r?o.pop():K8.call(o,t,1),--this.size,!0}function c6(i){var o=this.__data__,t=Ud(o,i);return t<0?void 0:o[t][1]}function d6(i){return Ud(this.__data__,i)>-1}function p6(i,o){var t=this.__data__,r=Ud(t,i);return r<0?(++this.size,t.push([i,o])):t[r][1]=o,this}Fn.prototype.clear=s6;Fn.prototype.delete=l6;Fn.prototype.get=c6;Fn.prototype.has=d6;Fn.prototype.set=p6;function ga(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function h6(){this.size=0,this.__data__={hash:new fa,map:new(El||Fn),string:new fa}}function u6(i){var o=jd(this,i).delete(i);return this.size-=o?1:0,o}function m6(i){return jd(this,i).get(i)}function f6(i){return jd(this,i).has(i)}function g6(i,o){var t=jd(this,i),r=t.size;return t.set(i,o),this.size+=t.size==r?0:1,this}ga.prototype.clear=h6;ga.prototype.delete=u6;ga.prototype.get=m6;ga.prototype.has=f6;ga.prototype.set=g6;function Hd(i){var o=-1,t=i==null?0:i.length;for(this.__data__=new ga;++o<t;)this.add(i[o])}function b6(i){return this.__data__.set(i,Qu),this}function v6(i){return this.__data__.has(i)}Hd.prototype.add=Hd.prototype.push=b6;Hd.prototype.has=v6;function xi(i){var o=this.__data__=new Fn(i);this.size=o.size}function x6(){this.__data__=new Fn,this.size=0}function y6(i){var o=this.__data__,t=o.delete(i);return this.size=o.size,t}function z6(i){return this.__data__.get(i)}function w6(i){return this.__data__.has(i)}function _6(i,o){var t=this.__data__;if(t instanceof Fn){var r=t.__data__;if(!El||r.length<f8-1)return r.push([i,o]),this.size=++t.size,this;t=this.__data__=new ga(r)}return t.set(i,o),this.size=t.size,this}xi.prototype.clear=x6;xi.prototype.delete=y6;xi.prototype.get=z6;xi.prototype.has=w6;xi.prototype.set=_6;function k6(i,o){var t=Fd(i),r=!t&&P6(i),n=!t&&!r&&Xu(i),a=!t&&!r&&!n&&X1(i),s=t||r||n||a,l=s?O8(i.length,String):[],d=l.length;for(var h in i)(o||bn.call(i,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||I6(h,d)))&&l.push(h);return l}function Ud(i,o){for(var t=i.length;t--;)if(G1(i[t][0],o))return t;return-1}function C6(i,o,t){var r=o(i);return Fd(i)?r:N8(r,t(i))}function Al(i){return i==null?i===void 0?z8:v8:ma&&ma in Object(i)?M6(i):O6(i)}function S1(i){return $l(i)&&Al(i)==Dd}function U1(i,o,t,r,n){return i===o?!0:i==null||o==null||!$l(i)&&!$l(o)?i!==i&&o!==o:S6(i,o,t,r,U1,n)}function S6(i,o,t,r,n,a){var s=Fd(i),l=Fd(o),d=s?Uu:vi(i),h=l?Uu:vi(o);d=d==Dd?ns:d,h=h==Dd?ns:h;var m=d==ns,f=h==ns,b=d==h;if(b&&Xu(i)){if(!Xu(o))return!1;s=!0,m=!1}if(b&&!m)return a||(a=new xi),s||X1(i)?j1(i,o,t,r,n,a):A6(i,o,d,t,r,n,a);if(!(t&Bd)){var g=m&&bn.call(i,"__wrapped__"),v=f&&bn.call(o,"__wrapped__");if(g||v){var x=g?i.value():i,_=v?o.value():o;return a||(a=new xi),n(x,_,t,r,a)}}return b?(a||(a=new xi),L6(i,o,t,r,n,a)):!1}function E6(i){if(!Y1(i)||N6(i))return!1;var o=W1(i)?W8:M8;return o.test(ba(i))}function T6(i){return $l(i)&&K1(i.length)&&!!Qt[Al(i)]}function $6(i){if(!R6(i))return X8(i);var o=[];for(var t in Object(i))bn.call(i,t)&&t!="constructor"&&o.push(t);return o}function j1(i,o,t,r,n,a){var s=t&Bd,l=i.length,d=o.length;if(l!=d&&!(s&&d>l))return!1;var h=a.get(i);if(h&&a.get(o))return h==o;var m=-1,f=!0,b=t&T1?new Hd:void 0;for(a.set(i,o),a.set(o,i);++m<l;){var g=i[m],v=o[m];if(r)var x=s?r(v,g,m,o,i,a):r(g,v,m,i,o,a);if(x!==void 0){if(x)continue;f=!1;break}if(b){if(!R8(o,function(_,k){if(!H8(b,k)&&(g===_||n(g,_,t,r,a)))return b.push(k)})){f=!1;break}}else if(!(g===v||n(g,v,t,r,a))){f=!1;break}}return a.delete(i),a.delete(o),f}function A6(i,o,t,r,n,a,s){switch(t){case Od:if(i.byteLength!=o.byteLength||i.byteOffset!=o.byteOffset)return!1;i=i.buffer,o=o.buffer;case R1:return!(i.byteLength!=o.byteLength||!a(new _1(i),new _1(o)));case A1:case L1:case I1:return G1(+i,+o);case M1:return i.name==o.name&&i.message==o.message;case D1:case N1:return i==o+"";case Nd:var l=B8;case Rd:var d=r&Bd;if(l||(l=U8),i.size!=o.size&&!d)return!1;var h=s.get(i);if(h)return h==o;r|=T1,s.set(i,o);var m=j1(l(i),l(o),r,n,a,s);return s.delete(i),m;case y8:if(Vu)return Vu.call(i)==Vu.call(o)}return!1}function L6(i,o,t,r,n,a){var s=t&Bd,l=E1(i),d=l.length,h=E1(o),m=h.length;if(d!=m&&!s)return!1;for(var f=d;f--;){var b=l[f];if(!(s?b in o:bn.call(o,b)))return!1}var g=a.get(i);if(g&&a.get(o))return g==o;var v=!0;a.set(i,o),a.set(o,i);for(var x=s;++f<d;){b=l[f];var _=i[b],k=o[b];if(r)var N=s?r(k,_,b,o,i,a):r(_,k,b,i,o,a);if(!(N===void 0?_===k||n(_,k,t,r,a):N)){v=!1;break}x||(x=b=="constructor")}if(v&&!x){var G=i.constructor,I=o.constructor;G!=I&&"constructor"in i&&"constructor"in o&&!(typeof G=="function"&&G instanceof G&&typeof I=="function"&&I instanceof I)&&(v=!1)}return a.delete(i),a.delete(o),v}function E1(i){return C6(i,B6,q6)}function jd(i,o){var t=i.__data__;return D6(o)?t[typeof o=="string"?"string":"hash"]:t.map}function as(i,o){var t=F8(i,o);return E6(t)?t:void 0}function M6(i){var o=bn.call(i,ma),t=i[ma];try{i[ma]=void 0;var r=!0}catch{}var n=B1.call(i);return r&&(o?i[ma]=t:delete i[ma]),n}var q6=k1?function(i){return i==null?[]:(i=Object(i),D8(k1(i),function(o){return V1.call(i,o)}))}:V6,vi=Al;(Gu&&vi(new Gu(new ArrayBuffer(1)))!=Od||El&&vi(new El)!=Nd||Wu&&vi(Wu.resolve())!=b1||Ku&&vi(new Ku)!=Rd||Yu&&vi(new Yu)!=ju)&&(vi=function(i){var o=Al(i),t=o==ns?i.constructor:void 0,r=t?ba(t):"";if(r)switch(r){case Q8:return Od;case J8:return Nd;case Z8:return b1;case t6:return Rd;case e6:return ju}return o});function I6(i,o){return o=o??$1,!!o&&(typeof i=="number"||q8.test(i))&&i>-1&&i%1==0&&i<o}function D6(i){var o=typeof i;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?i!=="__proto__":i===null}function N6(i){return!!z1&&z1 in i}function R6(i){var o=i&&i.constructor,t=typeof o=="function"&&o.prototype||Vd;return i===t}function O6(i){return B1.call(i)}function ba(i){if(i!=null){try{return F1.call(i)}catch{}try{return i+""}catch{}}return""}function G1(i,o){return i===o||i!==i&&o!==o}var P6=S1((function(){return arguments})())?S1:function(i){return $l(i)&&bn.call(i,"callee")&&!V1.call(i,"callee")},Fd=Array.isArray;function H6(i){return i!=null&&K1(i.length)&&!W1(i)}var Xu=Y8||U6;function F6(i,o){return U1(i,o)}function W1(i){if(!Y1(i))return!1;var o=Al(i);return o==q1||o==b8||o==g8||o==x8}function K1(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=$1}function Y1(i){var o=typeof i;return i!=null&&(o=="object"||o=="function")}function $l(i){return i!=null&&typeof i=="object"}var X1=y1?P8(y1):T6;function B6(i){return H6(i)?k6(i):$6(i)}function V6(){return[]}function U6(){return!1}is.exports=F6});var Q1=$n(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});var j6=Hu(),G6=Ju(),Zu;(function(i){function o(a={},s={},l=!1){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let d=j6(s);l||(d=Object.keys(d).reduce((h,m)=>(d[m]!=null&&(h[m]=d[m]),h),{}));for(let h in a)a[h]!==void 0&&s[h]===void 0&&(d[h]=a[h]);return Object.keys(d).length>0?d:void 0}i.compose=o;function t(a={},s={}){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let l=Object.keys(a).concat(Object.keys(s)).reduce((d,h)=>(G6(a[h],s[h])||(d[h]=s[h]===void 0?null:s[h]),d),{});return Object.keys(l).length>0?l:void 0}i.diff=t;function r(a={},s={}){a=a||{};let l=Object.keys(s).reduce((d,h)=>(s[h]!==a[h]&&a[h]!==void 0&&(d[h]=s[h]),d),{});return Object.keys(a).reduce((d,h)=>(a[h]!==s[h]&&s[h]===void 0&&(d[h]=null),d),l)}i.invert=r;function n(a,s,l=!1){if(typeof a!="object")return s;if(typeof s!="object")return;if(!l)return s;let d=Object.keys(s).reduce((h,m)=>(a[m]===void 0&&(h[m]=s[m]),h),{});return Object.keys(d).length>0?d:void 0}i.transform=n})(Zu||(Zu={}));tm.default=Zu});var om=$n(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});var em;(function(i){function o(t){return typeof t.delete=="number"?t.delete:typeof t.retain=="number"?t.retain:typeof t.retain=="object"&&t.retain!==null?1:typeof t.insert=="string"?t.insert.length:1}i.length=o})(em||(em={}));rm.default=em});var Z1=$n(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});var J1=om(),nm=class{constructor(o){this.ops=o,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(o){o||(o=1/0);let t=this.ops[this.index];if(t){let r=this.offset,n=J1.default.length(t);if(o>=n-r?(o=n-r,this.index+=1,this.offset=0):this.offset+=o,typeof t.delete=="number")return{delete:o};{let a={};return t.attributes&&(a.attributes=t.attributes),typeof t.retain=="number"?a.retain=o:typeof t.retain=="object"&&t.retain!==null?a.retain=t.retain:typeof t.insert=="string"?a.insert=t.insert.substr(r,o):a.insert=t.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?J1.default.length(this.ops[this.index])-this.offset:1/0}peekType(){let o=this.ops[this.index];return o?typeof o.delete=="number"?"delete":typeof o.retain=="number"||typeof o.retain=="object"&&o.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{let o=this.offset,t=this.index,r=this.next(),n=this.ops.slice(this.index);return this.offset=o,this.index=t,[r].concat(n)}}else return[]}};im.default=nm});var Ur=$n((Vn,Wd)=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.AttributeMap=Vn.OpIterator=Vn.Op=void 0;var Gd=$0(),W6=Hu(),am=Ju(),va=Q1();Vn.AttributeMap=va.default;var Bn=om();Vn.Op=Bn.default;var wo=Z1();Vn.OpIterator=wo.default;var K6="\0",tx=(i,o)=>{if(typeof i!="object"||i===null)throw new Error(`cannot retain a ${typeof i}`);if(typeof o!="object"||o===null)throw new Error(`cannot retain a ${typeof o}`);let t=Object.keys(i)[0];if(!t||t!==Object.keys(o)[0])throw new Error(`embed types not matched: ${t} != ${Object.keys(o)[0]}`);return[t,i[t],o[t]]},Un=class i{constructor(o){Array.isArray(o)?this.ops=o:o!=null&&Array.isArray(o.ops)?this.ops=o.ops:this.ops=[]}static registerEmbed(o,t){this.handlers[o]=t}static unregisterEmbed(o){delete this.handlers[o]}static getHandler(o){let t=this.handlers[o];if(!t)throw new Error(`no handlers for embed type "${o}"`);return t}insert(o,t){let r={};return typeof o=="string"&&o.length===0?this:(r.insert=o,t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r))}delete(o){return o<=0?this:this.push({delete:o})}retain(o,t){if(typeof o=="number"&&o<=0)return this;let r={retain:o};return t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r)}push(o){let t=this.ops.length,r=this.ops[t-1];if(o=W6(o),typeof r=="object"){if(typeof o.delete=="number"&&typeof r.delete=="number")return this.ops[t-1]={delete:r.delete+o.delete},this;if(typeof r.delete=="number"&&o.insert!=null&&(t-=1,r=this.ops[t-1],typeof r!="object"))return this.ops.unshift(o),this;if(am(o.attributes,r.attributes)){if(typeof o.insert=="string"&&typeof r.insert=="string")return this.ops[t-1]={insert:r.insert+o.insert},typeof o.attributes=="object"&&(this.ops[t-1].attributes=o.attributes),this;if(typeof o.retain=="number"&&typeof r.retain=="number")return this.ops[t-1]={retain:r.retain+o.retain},typeof o.attributes=="object"&&(this.ops[t-1].attributes=o.attributes),this}}return t===this.ops.length?this.ops.push(o):this.ops.splice(t,0,o),this}chop(){let o=this.ops[this.ops.length-1];return o&&typeof o.retain=="number"&&!o.attributes&&this.ops.pop(),this}filter(o){return this.ops.filter(o)}forEach(o){this.ops.forEach(o)}map(o){return this.ops.map(o)}partition(o){let t=[],r=[];return this.forEach(n=>{(o(n)?t:r).push(n)}),[t,r]}reduce(o,t){return this.ops.reduce(o,t)}changeLength(){return this.reduce((o,t)=>t.insert?o+Bn.default.length(t):t.delete?o-t.delete:o,0)}length(){return this.reduce((o,t)=>o+Bn.default.length(t),0)}slice(o=0,t=1/0){let r=[],n=new wo.default(this.ops),a=0;for(;a<t&&n.hasNext();){let s;a<o?s=n.next(o-a):(s=n.next(t-a),r.push(s)),a+=Bn.default.length(s)}return new i(r)}compose(o){let t=new wo.default(this.ops),r=new wo.default(o.ops),n=[],a=r.peek();if(a!=null&&typeof a.retain=="number"&&a.attributes==null){let l=a.retain;for(;t.peekType()==="insert"&&t.peekLength()<=l;)l-=t.peekLength(),n.push(t.next());a.retain-l>0&&r.next(a.retain-l)}let s=new i(n);for(;t.hasNext()||r.hasNext();)if(r.peekType()==="insert")s.push(r.next());else if(t.peekType()==="delete")s.push(t.next());else{let l=Math.min(t.peekLength(),r.peekLength()),d=t.next(l),h=r.next(l);if(h.retain){let m={};if(typeof d.retain=="number")m.retain=typeof h.retain=="number"?l:h.retain;else if(typeof h.retain=="number")d.retain==null?m.insert=d.insert:m.retain=d.retain;else{let b=d.retain==null?"insert":"retain",[g,v,x]=tx(d[b],h.retain),_=i.getHandler(g);m[b]={[g]:_.compose(v,x,b==="retain")}}let f=va.default.compose(d.attributes,h.attributes,typeof d.retain=="number");if(f&&(m.attributes=f),s.push(m),!r.hasNext()&&am(s.ops[s.ops.length-1],m)){let b=new i(t.rest());return s.concat(b).chop()}}else typeof h.delete=="number"&&(typeof d.retain=="number"||typeof d.retain=="object"&&d.retain!==null)&&s.push(h)}return s.chop()}concat(o){let t=new i(this.ops.slice());return o.ops.length>0&&(t.push(o.ops[0]),t.ops=t.ops.concat(o.ops.slice(1))),t}diff(o,t){if(this.ops===o.ops)return new i;let r=[this,o].map(d=>d.map(h=>{if(h.insert!=null)return typeof h.insert=="string"?h.insert:K6;let m=d===o?"on":"with";throw new Error("diff() called "+m+" non-document")}).join("")),n=new i,a=Gd(r[0],r[1],t,!0),s=new wo.default(this.ops),l=new wo.default(o.ops);return a.forEach(d=>{let h=d[1].length;for(;h>0;){let m=0;switch(d[0]){case Gd.INSERT:m=Math.min(l.peekLength(),h),n.push(l.next(m));break;case Gd.DELETE:m=Math.min(h,s.peekLength()),s.next(m),n.delete(m);break;case Gd.EQUAL:m=Math.min(s.peekLength(),l.peekLength(),h);let f=s.next(m),b=l.next(m);am(f.insert,b.insert)?n.retain(m,va.default.diff(f.attributes,b.attributes)):n.push(b).delete(m);break}h-=m}}),n.chop()}eachLine(o,t=`
|
|
2
|
-
`){let r=new wo.default(this.ops),n=new i,a=0;for(;r.hasNext();){if(r.peekType()!=="insert")return;let s=r.peek(),l=Bn.default.length(s)-r.peekLength(),d=typeof s.insert=="string"?s.insert.indexOf(t,l)-l:-1;if(d<0)n.push(r.next());else if(d>0)n.push(r.next(d));else{if(o(n,r.next(1).attributes||{},a)===!1)return;a+=1,n=new i}}n.length()>0&&o(n,{},a)}invert(o){let t=new i;return this.reduce((r,n)=>{if(n.insert)t.delete(Bn.default.length(n));else{if(typeof n.retain=="number"&&n.attributes==null)return t.retain(n.retain),r+n.retain;if(n.delete||typeof n.retain=="number"){let a=n.delete||n.retain;return o.slice(r,r+a).forEach(l=>{n.delete?t.push(l):n.retain&&n.attributes&&t.retain(Bn.default.length(l),va.default.invert(n.attributes,l.attributes))}),r+a}else if(typeof n.retain=="object"&&n.retain!==null){let a=o.slice(r,r+1),s=new wo.default(a.ops).next(),[l,d,h]=tx(n.retain,s.insert),m=i.getHandler(l);return t.retain({[l]:m.invert(d,h)},va.default.invert(n.attributes,s.attributes)),r+1}}return r},0),t.chop()}transform(o,t=!1){if(t=!!t,typeof o=="number")return this.transformPosition(o,t);let r=o,n=new wo.default(this.ops),a=new wo.default(r.ops),s=new i;for(;n.hasNext()||a.hasNext();)if(n.peekType()==="insert"&&(t||a.peekType()!=="insert"))s.retain(Bn.default.length(n.next()));else if(a.peekType()==="insert")s.push(a.next());else{let l=Math.min(n.peekLength(),a.peekLength()),d=n.next(l),h=a.next(l);if(d.delete)continue;if(h.delete)s.push(h);else{let m=d.retain,f=h.retain,b=typeof f=="object"&&f!==null?f:l;if(typeof m=="object"&&m!==null&&typeof f=="object"&&f!==null){let g=Object.keys(m)[0];if(g===Object.keys(f)[0]){let v=i.getHandler(g);v&&(b={[g]:v.transform(m[g],f[g],t)})}}s.retain(b,va.default.transform(d.attributes,h.attributes,t))}}return s.chop()}transformPosition(o,t=!1){t=!!t;let r=new wo.default(this.ops),n=0;for(;r.hasNext()&&n<=o;){let a=r.peekLength(),s=r.peekType();if(r.next(),s==="delete"){o-=Math.min(a,o-n);continue}else s==="insert"&&(n<o||!t)&&(o+=a);n+=a}return o}};Un.Op=Bn.default;Un.OpIterator=wo.default;Un.AttributeMap=va.default;Un.handlers={};Vn.default=Un;typeof Wd=="object"&&(Wd.exports=Un,Wd.exports.default=Un)});var gz=$n((vlt,Cm)=>{"use strict";var AT=Object.prototype.hasOwnProperty,Mr="~";function Fl(){}Object.create&&(Fl.prototype=Object.create(null),new Fl().__proto__||(Mr=!1));function LT(i,o,t){this.fn=i,this.context=o,this.once=t||!1}function fz(i,o,t,r,n){if(typeof t!="function")throw new TypeError("The listener must be a function");var a=new LT(t,r||i,n),s=Mr?Mr+o:o;return i._events[s]?i._events[s].fn?i._events[s]=[i._events[s],a]:i._events[s].push(a):(i._events[s]=a,i._eventsCount++),i}function yp(i,o){--i._eventsCount===0?i._events=new Fl:delete i._events[o]}function wr(){this._events=new Fl,this._eventsCount=0}wr.prototype.eventNames=function(){var o=[],t,r;if(this._eventsCount===0)return o;for(r in t=this._events)AT.call(t,r)&&o.push(Mr?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(t)):o};wr.prototype.listeners=function(o){var t=Mr?Mr+o:o,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,a=r.length,s=new Array(a);n<a;n++)s[n]=r[n].fn;return s};wr.prototype.listenerCount=function(o){var t=Mr?Mr+o:o,r=this._events[t];return r?r.fn?1:r.length:0};wr.prototype.emit=function(o,t,r,n,a,s){var l=Mr?Mr+o:o;if(!this._events[l])return!1;var d=this._events[l],h=arguments.length,m,f;if(d.fn){switch(d.once&&this.removeListener(o,d.fn,void 0,!0),h){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,r),!0;case 4:return d.fn.call(d.context,t,r,n),!0;case 5:return d.fn.call(d.context,t,r,n,a),!0;case 6:return d.fn.call(d.context,t,r,n,a,s),!0}for(f=1,m=new Array(h-1);f<h;f++)m[f-1]=arguments[f];d.fn.apply(d.context,m)}else{var b=d.length,g;for(f=0;f<b;f++)switch(d[f].once&&this.removeListener(o,d[f].fn,void 0,!0),h){case 1:d[f].fn.call(d[f].context);break;case 2:d[f].fn.call(d[f].context,t);break;case 3:d[f].fn.call(d[f].context,t,r);break;case 4:d[f].fn.call(d[f].context,t,r,n);break;default:if(!m)for(g=1,m=new Array(h-1);g<h;g++)m[g-1]=arguments[g];d[f].fn.apply(d[f].context,m)}}return!0};wr.prototype.on=function(o,t,r){return fz(this,o,t,r,!1)};wr.prototype.once=function(o,t,r){return fz(this,o,t,r,!0)};wr.prototype.removeListener=function(o,t,r,n){var a=Mr?Mr+o:o;if(!this._events[a])return this;if(!t)return yp(this,a),this;var s=this._events[a];if(s.fn)s.fn===t&&(!n||s.once)&&(!r||s.context===r)&&yp(this,a);else{for(var l=0,d=[],h=s.length;l<h;l++)(s[l].fn!==t||n&&!s[l].once||r&&s[l].context!==r)&&d.push(s[l]);d.length?this._events[a]=d.length===1?d[0]:d:yp(this,a)}return this};wr.prototype.removeAllListeners=function(o){var t;return o?(t=Mr?Mr+o:o,this._events[t]&&yp(this,t)):(this._events=new Fl,this._eventsCount=0),this};wr.prototype.off=wr.prototype.removeListener;wr.prototype.addListener=wr.prototype.on;wr.prefixed=Mr;wr.EventEmitter=wr;typeof Cm<"u"&&(Cm.exports=wr)});var uf=$n((mc,hf)=>{(function(i,o){typeof mc=="object"&&typeof hf=="object"?hf.exports=o():typeof define=="function"&&define.amd?define([],o):typeof mc=="object"?mc.AirDatepicker=o():i.AirDatepicker=o()})(mc,(function(){return(function(){"use strict";var i={d:function(R,y){for(var S in y)i.o(y,S)&&!i.o(R,S)&&Object.defineProperty(R,S,{enumerable:!0,get:y[S]})},o:function(R,y){return Object.prototype.hasOwnProperty.call(R,y)}},o={};i.d(o,{default:function(){return it}});var t={days:"days",months:"months",years:"years",day:"day",month:"month",year:"year",eventChangeViewDate:"changeViewDate",eventChangeCurrentView:"changeCurrentView",eventChangeFocusDate:"changeFocusDate",eventChangeSelectedDate:"changeSelectedDate",eventChangeTime:"changeTime",eventChangeLastSelectedDate:"changeLastSelectedDate",actionSelectDate:"selectDate",actionUnselectDate:"unselectDate",cssClassWeekend:"-weekend-"},r={classes:"",inline:!1,locale:{days:["\u0412\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435","\u041F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A","\u0412\u0442\u043E\u0440\u043D\u0438\u043A","\u0421\u0440\u0435\u0434\u0430","\u0427\u0435\u0442\u0432\u0435\u0440\u0433","\u041F\u044F\u0442\u043D\u0438\u0446\u0430","\u0421\u0443\u0431\u0431\u043E\u0442\u0430"],daysShort:["\u0412\u043E\u0441","\u041F\u043E\u043D","\u0412\u0442\u043E","\u0421\u0440\u0435","\u0427\u0435\u0442","\u041F\u044F\u0442","\u0421\u0443\u0431"],daysMin:["\u0412\u0441","\u041F\u043D","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041F\u0442","\u0421\u0431"],months:["\u042F\u043D\u0432\u0430\u0440\u044C","\u0424\u0435\u0432\u0440\u0430\u043B\u044C","\u041C\u0430\u0440\u0442","\u0410\u043F\u0440\u0435\u043B\u044C","\u041C\u0430\u0439","\u0418\u044E\u043D\u044C","\u0418\u044E\u043B\u044C","\u0410\u0432\u0433\u0443\u0441\u0442","\u0421\u0435\u043D\u0442\u044F\u0431\u0440\u044C","\u041E\u043A\u0442\u044F\u0431\u0440\u044C","\u041D\u043E\u044F\u0431\u0440\u044C","\u0414\u0435\u043A\u0430\u0431\u0440\u044C"],monthsShort:["\u042F\u043D\u0432","\u0424\u0435\u0432","\u041C\u0430\u0440","\u0410\u043F\u0440","\u041C\u0430\u0439","\u0418\u044E\u043D","\u0418\u044E\u043B","\u0410\u0432\u0433","\u0421\u0435\u043D","\u041E\u043A\u0442","\u041D\u043E\u044F","\u0414\u0435\u043A"],today:"\u0421\u0435\u0433\u043E\u0434\u043D\u044F",clear:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",dateFormat:"dd.MM.yyyy",timeFormat:"HH:mm",firstDay:1},startDate:new Date,firstDay:"",weekends:[6,0],dateFormat:"",altField:"",altFieldDateFormat:"T",toggleSelected:!0,keyboardNav:!0,selectedDates:!1,container:"",isMobile:!1,visible:!1,position:"bottom left",offset:12,view:t.days,minView:t.days,showOtherMonths:!0,selectOtherMonths:!0,moveToOtherMonthsOnSelect:!0,showOtherYears:!0,selectOtherYears:!0,moveToOtherYearsOnSelect:!0,minDate:"",maxDate:"",disableNavWhenOutOfRange:!0,multipleDates:!1,multipleDatesSeparator:", ",range:!1,dynamicRange:!0,buttons:!1,monthsField:"monthsShort",showEvent:"focus",autoClose:!1,fixedHeight:!1,prevHtml:'<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',nextHtml:'<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',navTitles:{days:"MMMM, <i>yyyy</i>",months:"yyyy",years:"yyyy1 - yyyy2"},timepicker:!1,onlyTimepicker:!1,dateTimeSeparator:" ",timeFormat:"",minHours:0,maxHours:24,minMinutes:0,maxMinutes:59,hoursStep:1,minutesStep:1,onSelect:!1,onChangeViewDate:!1,onChangeView:!1,onRenderCell:!1,onShow:!1,onHide:!1,onClickDayName:!1};function n(R){let y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document;return typeof R=="string"?y.querySelector(R):R}function a(){let{tagName:R="div",className:y="",innerHtml:S="",id:z="",attrs:q={}}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=document.createElement(R);return y&&M.classList.add(...y.split(" ")),z&&(M.id=z),S&&(M.innerHTML=S),q&&s(M,q),M}function s(R,y){for(let[S,z]of Object.entries(y))z!==void 0&&R.setAttribute(S,z);return R}function l(R){return new Date(R.getFullYear(),R.getMonth()+1,0).getDate()}function d(R){let y=R.getHours(),{hours:S,dayPeriod:z}=h(y);return{year:R.getFullYear(),month:R.getMonth(),fullMonth:R.getMonth()+1<10?"0"+(R.getMonth()+1):R.getMonth()+1,date:R.getDate(),fullDate:R.getDate()<10?"0"+R.getDate():R.getDate(),day:R.getDay(),hours:y,fullHours:m(y),hours12:S,dayPeriod:z,fullHours12:m(S),minutes:R.getMinutes(),fullMinutes:R.getMinutes()<10?"0"+R.getMinutes():R.getMinutes()}}function h(R){return{dayPeriod:R>11?"pm":"am",hours:R%12==0?12:R%12}}function m(R){return R<10?"0"+R:R}function f(R){let y=10*Math.floor(R.getFullYear()/10);return[y,y+9]}function b(){let R=[];for(var y=arguments.length,S=new Array(y),z=0;z<y;z++)S[z]=arguments[z];return S.forEach((q=>{if(typeof q=="object")for(let M in q)q[M]&&R.push(M);else q&&R.push(q)})),R.join(" ")}function g(R,y){let S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.days;if(!R||!y)return!1;let z=d(R),q=d(y);return{[t.days]:z.date===q.date&&z.month===q.month&&z.year===q.year,[t.months]:z.month===q.month&&z.year===q.year,[t.years]:z.year===q.year}[S]}function v(R,y,S){let z=_(R,!1).getTime(),q=_(y,!1).getTime();return S?z>=q:z>q}function x(R,y){return!v(R,y,!0)}function _(R){let y=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],S=new Date(R.getTime());return typeof y!="boolean"||y||(function(z){z.setHours(0,0,0,0)})(S),S}function k(R,y,S){R.length?R.forEach((z=>{z.addEventListener(y,S)})):R.addEventListener(y,S)}function N(R,y){return!(!R||R===document||R instanceof DocumentFragment)&&(R.matches(y)?R:N(R.parentNode,y))}function G(R,y,S){return R>S?S:R<y?y:R}function I(R){for(var y=arguments.length,S=new Array(y>1?y-1:0),z=1;z<y;z++)S[z-1]=arguments[z];return S.filter((q=>q)).forEach((q=>{for(let[M,A]of Object.entries(q))if(A!==void 0&&A.toString()==="[object Object]"){let P=R[M]!==void 0?R[M].toString():void 0,U=A.toString(),Y=Array.isArray(A)?[]:{};R[M]=R[M]?P!==U?Y:R[M]:Y,I(R[M],A)}else R[M]=A})),R}function w(R){let y=R;return R instanceof Date||(typeof R=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(R)&&(R+="T00:00:00"),y=new Date(R)),isNaN(y.getTime())&&(console.log(`Unable to convert value "${R}" to Date object`),y=!1),y}function $(R){let y="\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";return new RegExp("(^|>|"+y+")("+R+")($|<|"+y+")","g")}function L(R,y,S){return(y=(function(z){var q=(function(M,A){if(typeof M!="object"||M===null)return M;var P=M[Symbol.toPrimitive];if(P!==void 0){var U=P.call(M,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)})(z);return typeof q=="symbol"?q:String(q)})(y))in R?Object.defineProperty(R,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):R[y]=S,R}class W{constructor(){let{type:y,date:S,dp:z,opts:q,body:M}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};L(this,"focus",(()=>{this.$cell.classList.add("-focus-"),this.focused=!0})),L(this,"removeFocus",(()=>{this.$cell.classList.remove("-focus-"),this.focused=!1})),L(this,"select",(()=>{this.$cell.classList.add("-selected-"),this.selected=!0})),L(this,"removeSelect",(()=>{this.$cell.classList.remove("-selected-","-range-from-","-range-to-"),this.selected=!1})),L(this,"onChangeSelectedDate",(()=>{this.isDisabled||(this._handleSelectedStatus(),this.opts.range&&this._handleRangeStatus())})),L(this,"onChangeFocusDate",(A=>{if(!A)return void(this.focused&&this.removeFocus());let P=g(A,this.date,this.type);P?this.focus():!P&&this.focused&&this.removeFocus(),this.opts.range&&this._handleRangeStatus()})),L(this,"render",(()=>(this.$cell.innerHTML=this._getHtml(),this._handleClasses(),this.$cell))),this.type=y,this.singleType=this.type.slice(0,-1),this.date=S,this.dp=z,this.opts=q,this.body=M,this.customData=!1,this.init()}init(){var y,S;let{onRenderCell:z}=this.opts;z&&(this.customData=z({date:this.date,cellType:this.singleType,datepicker:this.dp})),this._createElement(),this._bindDatepickerEvents(),(y=this.customData)!==null&&y!==void 0&&y.disabled?this.dp.disableDate(this.date):((S=this.customData)===null||S===void 0?void 0:S.disabled)===!1&&this.dp.enableDate(this.date)}_bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeFocusDate,this.onChangeFocusDate)}unbindDatepickerEvents(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeFocusDate,this.onChangeFocusDate)}_createElement(){var y;let{year:S,month:z,fullMonth:q,date:M,fullDate:A}=d(this.date),P=((y=this.customData)===null||y===void 0?void 0:y.attrs)||{};this.$cell=a({attrs:{"data-year":S,"data-month":z,"data-date":M,"data-iso-date":`${S}-${q}-${A}`,...P}}),this.$cell.adpCell=this}_getClassName(){var y;let S=new Date,{selectOtherMonths:z,selectOtherYears:q}=this.opts,{minDate:M,maxDate:A,isDateDisabled:P}=this.dp,{day:U}=d(this.date),Y=this._isOutOfMinMaxRange(),ot=P(this.date),et=b("air-datepicker-cell",`-${this.singleType}-`,{"-current-":g(S,this.date,this.type),"-min-date-":M&&g(M,this.date,this.type),"-max-date-":A&&g(A,this.date,this.type)}),at="";switch(this.type){case t.days:at=b({"-weekend-":this.dp.isWeekend(U),"-other-month-":this.isOtherMonth,"-disabled-":this.isOtherMonth&&!z||Y||ot});break;case t.months:at=b({"-disabled-":Y});break;case t.years:at=b({"-other-decade-":this.isOtherDecade,"-disabled-":Y||this.isOtherDecade&&!q})}return b(et,at,(y=this.customData)===null||y===void 0?void 0:y.classes).split(" ")}_getHtml(){var y;let{year:S,month:z,date:q}=d(this.date),{showOtherMonths:M,showOtherYears:A}=this.opts;if((y=this.customData)!==null&&y!==void 0&&y.html)return this.customData.html;switch(this.type){case t.days:return!M&&this.isOtherMonth?"":q;case t.months:return this.dp.locale[this.opts.monthsField][z];case t.years:return!A&&this.isOtherDecade?"":S}}_isOutOfMinMaxRange(){let{minDate:y,maxDate:S}=this.dp,{type:z,date:q}=this,{month:M,year:A,date:P}=d(q),U=z===t.days,Y=z===t.years,ot=!!y&&new Date(A,Y?y.getMonth():M,U?P:y.getDate()),et=!!S&&new Date(A,Y?S.getMonth():M,U?P:S.getDate());return y&&S?x(ot,y)||v(et,S):y?x(ot,y):S?v(et,S):void 0}destroy(){this.unbindDatepickerEvents()}_handleRangeStatus(){let{selectedDates:y,focusDate:S,rangeDateTo:z,rangeDateFrom:q}=this.dp,M=y.length;if(this.$cell.classList.remove("-range-from-","-range-to-","-in-range-"),!M)return;let A=q,P=z;if(M===1&&S){let at=v(S,y[0]);A=at?y[0]:S,P=at?S:y[0]}let U=b({"-in-range-":A&&P&&(Y=this.date,ot=A,et=P,v(Y,ot)&&x(Y,et)),"-range-from-":A&&g(this.date,A,this.type),"-range-to-":P&&g(this.date,P,this.type)});var Y,ot,et;U&&this.$cell.classList.add(...U.split(" "))}_handleSelectedStatus(){let y=this.dp._checkIfDateIsSelected(this.date,this.type);y?this.select():!y&&this.selected&&this.removeSelect()}_handleInitialFocusStatus(){g(this.dp.focusDate,this.date,this.type)&&this.focus()}_handleClasses(){this.$cell.setAttribute("class",""),this._handleInitialFocusStatus(),this.dp.hasSelectedDates&&(this._handleSelectedStatus(),this.dp.opts.range&&this._handleRangeStatus()),this.$cell.classList.add(...this._getClassName())}get isDisabled(){return this.$cell.matches(".-disabled-")}get isOtherMonth(){return this.dp.isOtherMonth(this.date)}get isOtherDecade(){return this.dp.isOtherDecade(this.date)}}function tt(R,y,S){return(y=(function(z){var q=(function(M,A){if(typeof M!="object"||M===null)return M;var P=M[Symbol.toPrimitive];if(P!==void 0){var U=P.call(M,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)})(z);return typeof q=="symbol"?q:String(q)})(y))in R?Object.defineProperty(R,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):R[y]=S,R}let ht={[t.days]:`<div class="air-datepicker-body--day-names"></div><div class="air-datepicker-body--cells -${t.days}-"></div>`,[t.months]:`<div class="air-datepicker-body--cells -${t.months}-"></div>`,[t.years]:`<div class="air-datepicker-body--cells -${t.years}-"></div>`},gt=".air-datepicker-cell";class _t{constructor(y){let{dp:S,type:z,opts:q}=y;tt(this,"handleClick",(M=>{let A=M.target.closest(gt).adpCell;if(A.isDisabled)return;if(!this.dp.isMinViewReached)return void this.dp.down();let P=this.dp._checkIfDateIsSelected(A.date,A.type);P?this.dp._handleAlreadySelectedDates(P,A.date):this.dp.selectDate(A.date)})),tt(this,"handleDayNameClick",(M=>{let A=M.target.getAttribute("data-day-index");this.opts.onClickDayName({dayIndex:Number(A),datepicker:this.dp})})),tt(this,"onChangeCurrentView",(M=>{M!==this.type?this.hide():(this.show(),this.render())})),tt(this,"onMouseOverCell",(M=>{let A=N(M.target,gt);this.dp.setFocusDate(!!A&&A.adpCell.date)})),tt(this,"onMouseOutCell",(()=>{this.dp.setFocusDate(!1)})),tt(this,"onClickBody",(M=>{let{onClickDayName:A}=this.opts,P=M.target;P.closest(gt)&&this.handleClick(M),A&&P.closest(".air-datepicker-body--day-name")&&this.handleDayNameClick(M)})),tt(this,"onMouseDown",(M=>{this.pressed=!0;let A=N(M.target,gt),P=A&&A.adpCell;g(P.date,this.dp.rangeDateFrom)&&(this.rangeFromFocused=!0),g(P.date,this.dp.rangeDateTo)&&(this.rangeToFocused=!0)})),tt(this,"onMouseMove",(M=>{if(!this.pressed||!this.dp.isMinViewReached)return;M.preventDefault();let A=N(M.target,gt),P=A&&A.adpCell,{selectedDates:U,rangeDateTo:Y,rangeDateFrom:ot}=this.dp;if(!P||P.isDisabled)return;let{date:et}=P;if(U.length===2){if(this.rangeFromFocused&&!v(et,Y)){let{hours:at,minutes:fe}=d(ot);et.setHours(at),et.setMinutes(fe),this.dp.rangeDateFrom=et,this.dp.replaceDate(ot,et)}if(this.rangeToFocused&&!x(et,ot)){let{hours:at,minutes:fe}=d(Y);et.setHours(at),et.setMinutes(fe),this.dp.rangeDateTo=et,this.dp.replaceDate(Y,et)}}})),tt(this,"onMouseUp",(()=>{this.pressed=!1,this.rangeFromFocused=!1,this.rangeToFocused=!1})),tt(this,"onChangeViewDate",((M,A)=>{if(!this.isVisible)return;let P=f(M),U=f(A);switch(this.dp.currentView){case t.days:if(g(M,A,t.months))return;break;case t.months:if(g(M,A,t.years))return;break;case t.years:if(P[0]===U[0]&&P[1]===U[1])return}this.render()})),tt(this,"render",(()=>{this.destroyCells(),this._generateCells(),this.cells.forEach((M=>{this.$cells.appendChild(M.render())}))})),this.dp=S,this.type=z,this.opts=q,this.cells=[],this.$el="",this.pressed=!1,this.isVisible=!0,this.init()}init(){this._buildBaseHtml(),this.type===t.days&&this.renderDayNames(),this.render(),this._bindEvents(),this._bindDatepickerEvents()}_bindEvents(){let{range:y,dynamicRange:S}=this.opts;k(this.$el,"mouseover",this.onMouseOverCell),k(this.$el,"mouseout",this.onMouseOutCell),k(this.$el,"click",this.onClickBody),y&&S&&(k(this.$el,"mousedown",this.onMouseDown),k(this.$el,"mousemove",this.onMouseMove),k(window.document,"mouseup",this.onMouseUp))}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView)}_buildBaseHtml(){this.$el=a({className:`air-datepicker-body -${this.type}-`,innerHtml:ht[this.type]}),this.$names=n(".air-datepicker-body--day-names",this.$el),this.$cells=n(".air-datepicker-body--cells",this.$el)}_getDayNamesHtml(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.dp.locale.firstDay,S="",z=this.dp.isWeekend,{onClickDayName:q}=this.opts,M=y,A=0;for(;A<7;){let P=M%7;S+=`<div class="${b("air-datepicker-body--day-name",{[t.cssClassWeekend]:z(P),"-clickable-":!!q})}" data-day-index='${P}'>${this.dp.locale.daysMin[P]}</div>`,A++,M++}return S}renderDayNames(){this.$names.innerHTML=this._getDayNamesHtml()}_generateCell(y){let{type:S,dp:z,opts:q}=this;return new W({type:S,dp:z,opts:q,date:y,body:this})}_generateCells(){_t.getDatesFunction(this.type)(this.dp,(y=>{this.cells.push(this._generateCell(y))}))}show(){this.isVisible=!0,this.$el.classList.remove("-hidden-")}hide(){this.isVisible=!1,this.$el.classList.add("-hidden-")}destroyCells(){this.cells.forEach((y=>y.destroy())),this.cells=[],this.$cells.innerHTML=""}destroy(){this.destroyCells(),this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView)}static getDaysDates(y,S){let{viewDate:z,opts:{fixedHeight:q},locale:{firstDay:M}}=y,A=l(z),{year:P,month:U}=d(z),Y=new Date(P,U,1),ot=new Date(P,U,A),et=Y.getDay()-M,at=6-ot.getDay()+M;et=et<0?et+7:et,at=at>6?at-7:at;let fe=(function(Wi,ph){let{year:$c,month:R_,date:O_}=d(Wi);return new Date($c,R_,O_-ph)})(Y,et),Pr=A+et+at,hr=fe.getDate(),{year:on,month:js}=d(fe),ji=0;q&&(Pr=42);let Gi=[];for(;ji<Pr;){let Wi=new Date(on,js,hr+ji);S&&S(Wi),Gi.push(Wi),ji++}return Gi}static getMonthsDates(y,S){let{year:z}=y.parsedViewDate,q=0,M=[];for(;q<12;){let A=new Date(z,q);M.push(A),S&&S(A),q++}return M}static getYearsDates(y,S){let z=f(y.viewDate),q=z[0]-1,M=z[1]+1,A=q,P=[];for(;A<=M;){let U=new Date(A,0);P.push(U),S&&S(U),A++}return P}static getDatesFunction(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return{[t.days]:_t.getDaysDates,[t.months]:_t.getMonthsDates,[t.years]:_t.getYearsDates}[y]}}function Rt(R,y,S){return(y=(function(z){var q=(function(M,A){if(typeof M!="object"||M===null)return M;var P=M[Symbol.toPrimitive];if(P!==void 0){var U=P.call(M,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)})(z);return typeof q=="symbol"?q:String(q)})(y))in R?Object.defineProperty(R,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):R[y]=S,R}class we{constructor(y){let{dp:S,opts:z}=y;Rt(this,"onClickNav",(q=>{let M=N(q.target,".air-datepicker-nav--action");if(!M)return;let A=M.dataset.action;this.dp[A]()})),Rt(this,"onChangeViewDate",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),Rt(this,"onChangeCurrentView",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),Rt(this,"onClickNavTitle",(()=>{this.dp.isFinalView||this.dp.up()})),Rt(this,"update",(()=>{let{prevHtml:q,nextHtml:M}=this.opts;this.$prev.innerHTML=q,this.$next.innerHTML=M,this._resetNavStatus(),this.render(),this.handleNavStatus()})),Rt(this,"renderDelay",(()=>{setTimeout(this.render)})),Rt(this,"render",(()=>{this.$title.innerHTML=this._getTitle(),(function(q,M){for(let A in M)M[A]?q.classList.add(A):q.classList.remove(A)})(this.$title,{"-disabled-":this.dp.isFinalView})})),this.dp=S,this.opts=z,this.init()}init(){this._createElement(),this._buildBaseHtml(),this._defineDOM(),this.render(),this.handleNavStatus(),this._bindEvents(),this._bindDatepickerEvents()}_defineDOM(){this.$title=n(".air-datepicker-nav--title",this.$el),this.$prev=n('[data-action="prev"]',this.$el),this.$next=n('[data-action="next"]',this.$el)}_bindEvents(){this.$el.addEventListener("click",this.onClickNav),this.$title.addEventListener("click",this.onClickNavTitle)}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.on(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.on(t.eventChangeTime,this.render))}destroy(){this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.off(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.off(t.eventChangeTime,this.render))}_createElement(){this.$el=a({tagName:"nav",className:"air-datepicker-nav"})}_getTitle(){let{dp:y,opts:S}=this,z=S.navTitles[y.currentView];return typeof z=="function"?z(y):y.formatDate(y.viewDate,z)}handleNavStatus(){let{disableNavWhenOutOfRange:y}=this.opts,{minDate:S,maxDate:z}=this.dp;if(!S&&!z||!y)return;let{year:q,month:M}=this.dp.parsedViewDate,A=!!S&&d(S),P=!!z&&d(z);switch(this.dp.currentView){case t.days:S&&A.month>=M&&A.year>=q&&this._disableNav("prev"),z&&P.month<=M&&P.year<=q&&this._disableNav("next");break;case t.months:S&&A.year>=q&&this._disableNav("prev"),z&&P.year<=q&&this._disableNav("next");break;case t.years:{let U=f(this.dp.viewDate);S&&A.year>=U[0]&&this._disableNav("prev"),z&&P.year<=U[1]&&this._disableNav("next");break}}}_disableNav(y){n('[data-action="'+y+'"]',this.$el).classList.add("-disabled-")}_resetNavStatus(){(function(y){for(var S=arguments.length,z=new Array(S>1?S-1:0),q=1;q<S;q++)z[q-1]=arguments[q];y.length?y.forEach((M=>{M.classList.remove(...z)})):y.classList.remove(...z)})(this.$el.querySelectorAll(".air-datepicker-nav--action"),"-disabled-")}_buildBaseHtml(){let{prevHtml:y,nextHtml:S}=this.opts;this.$el.innerHTML=`<div class="air-datepicker-nav--action" data-action="prev">${y}</div><div class="air-datepicker-nav--title"></div><div class="air-datepicker-nav--action" data-action="next">${S}</div>`}get isNavIsFunction(){let{navTitles:y}=this.opts;return Object.keys(y).find((S=>typeof y[S]=="function"))}}var Ke={today:{content:R=>R.locale.today,onClick:R=>R.setViewDate(new Date)},clear:{content:R=>R.locale.clear,onClick:R=>R.clear()}};class pr{constructor(y){let{dp:S,opts:z}=y;this.dp=S,this.opts=z,this.init()}init(){this.createElement(),this.render()}createElement(){this.$el=a({className:"air-datepicker-buttons"})}destroy(){this.$el.parentNode.removeChild(this.$el)}clearHtml(){return this.$el.innerHTML="",this}generateButtons(){let{buttons:y}=this.opts;Array.isArray(y)||(y=[y]),y.forEach((S=>{let z=S;typeof S=="string"&&Ke[S]&&(z=Ke[S]);let q=this.createButton(z);z.onClick&&this.attachEventToButton(q,z.onClick),this.$el.appendChild(q)}))}attachEventToButton(y,S){y.addEventListener("click",(()=>{S(this.dp)}))}createButton(y){let{content:S,className:z,tagName:q="button",attrs:M={}}=y;return a({tagName:q,innerHtml:`<span tabindex='-1'>${typeof S=="function"?S(this.dp):S}</span>`,className:b("air-datepicker-button",z),attrs:M})}render(){this.generateButtons()}}function Ae(R,y,S){return(y=(function(z){var q=(function(M,A){if(typeof M!="object"||M===null)return M;var P=M[Symbol.toPrimitive];if(P!==void 0){var U=P.call(M,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)})(z);return typeof q=="symbol"?q:String(q)})(y))in R?Object.defineProperty(R,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):R[y]=S,R}class Ye{constructor(){let{opts:y,dp:S}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ae(this,"toggleTimepickerIsActive",(q=>{this.dp.timepickerIsActive=q})),Ae(this,"onChangeSelectedDate",(q=>{let{date:M,updateTime:A=!1}=q;M&&(this.setMinMaxTime(M),this.setCurrentTime(!!A&&M),this.addTimeToDate(M))})),Ae(this,"onChangeLastSelectedDate",(q=>{q&&(this.setTime(q),this.render())})),Ae(this,"onChangeInputRange",(q=>{let M=q.target;this[M.getAttribute("name")]=M.value,this.updateText(),this.dp.trigger(t.eventChangeTime,{hours:this.hours,minutes:this.minutes})})),Ae(this,"onMouseEnterLeave",(q=>{let M=q.target.getAttribute("name"),A=this.$minutesText;M==="hours"&&(A=this.$hoursText),A.classList.toggle("-focus-")})),Ae(this,"onFocus",(()=>{this.toggleTimepickerIsActive(!0)})),Ae(this,"onBlur",(()=>{this.toggleTimepickerIsActive(!1)})),this.opts=y,this.dp=S;let{timeFormat:z}=this.dp.locale;z&&(z.match($("h"))||z.match($("hh")))&&(this.ampm=!0),this.init()}init(){this.setTime(this.dp.lastSelectedDate||this.dp.viewDate),this.createElement(),this.buildHtml(),this.defineDOM(),this.render(),this.bindDatepickerEvents(),this.bindDOMEvents()}bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate)}bindDOMEvents(){let y="input";navigator.userAgent.match(/trident/gi)&&(y="change"),k(this.$ranges,y,this.onChangeInputRange),k(this.$ranges,"mouseenter",this.onMouseEnterLeave),k(this.$ranges,"mouseleave",this.onMouseEnterLeave),k(this.$ranges,"focus",this.onFocus),k(this.$ranges,"mousedown",this.onFocus),k(this.$ranges,"blur",this.onBlur)}createElement(){this.$el=a({className:b("air-datepicker-time",{"-am-pm-":this.dp.ampm})})}destroy(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate),this.$el.parentNode.removeChild(this.$el)}buildHtml(){let{ampm:y,hours:S,displayHours:z,minutes:q,minHours:M,minMinutes:A,maxHours:P,maxMinutes:U,dayPeriod:Y,opts:{hoursStep:ot,minutesStep:et}}=this;this.$el.innerHTML=`<div class="air-datepicker-time--current"> <span class="air-datepicker-time--current-hours">${m(z)}</span> <span class="air-datepicker-time--current-colon">:</span> <span class="air-datepicker-time--current-minutes">${m(q)}</span> `+(y?`<span class='air-datepicker-time--current-ampm'>${Y}</span>`:"")+`</div><div class="air-datepicker-time--sliders"> <div class="air-datepicker-time--row"> <input type="range" name="hours" value="${S}" min="${M}" max="${P}" step="${ot}"/> </div> <div class="air-datepicker-time--row"> <input type="range" name="minutes" value="${q}" min="${A}" max="${U}" step="${et}"/> </div></div>`}defineDOM(){let y=S=>n(S,this.$el);this.$ranges=this.$el.querySelectorAll('[type="range"]'),this.$hours=y('[name="hours"]'),this.$minutes=y('[name="minutes"]'),this.$hoursText=y(".air-datepicker-time--current-hours"),this.$minutesText=y(".air-datepicker-time--current-minutes"),this.$ampm=y(".air-datepicker-time--current-ampm")}setTime(y){this.setMinMaxTime(y),this.setCurrentTime(y)}addTimeToDate(y){y&&(y.setHours(this.hours),y.setMinutes(this.minutes))}setMinMaxTime(y){if(this.setMinMaxTimeFromOptions(),y){let{minDate:S,maxDate:z}=this.dp;S&&g(y,S)&&this.setMinTimeFromMinDate(S),z&&g(y,z)&&this.setMaxTimeFromMaxDate(z)}}setCurrentTime(y){let{hours:S,minutes:z}=y?d(y):this;this.hours=G(S,this.minHours,this.maxHours),this.minutes=G(z,this.minMinutes,this.maxMinutes)}setMinMaxTimeFromOptions(){let{minHours:y,minMinutes:S,maxHours:z,maxMinutes:q}=this.opts;this.minHours=G(y,0,23),this.minMinutes=G(S,0,59),this.maxHours=G(z,0,23),this.maxMinutes=G(q,0,59)}setMinTimeFromMinDate(y){let{lastSelectedDate:S}=this.dp;this.minHours=y.getHours(),S&&S.getHours()>y.getHours()?this.minMinutes=this.opts.minMinutes:this.minMinutes=y.getMinutes()}setMaxTimeFromMaxDate(y){let{lastSelectedDate:S}=this.dp;this.maxHours=y.getHours(),S&&S.getHours()<y.getHours()?this.maxMinutes=this.opts.maxMinutes:this.maxMinutes=y.getMinutes()}updateSliders(){s(this.$hours,{min:this.minHours,max:this.maxHours}).value=this.hours,s(this.$minutes,{min:this.minMinutes,max:this.maxMinutes}).value=this.minutes}updateText(){this.$hoursText.innerHTML=m(this.displayHours),this.$minutesText.innerHTML=m(this.minutes),this.ampm&&(this.$ampm.innerHTML=this.dayPeriod)}set hours(y){this._hours=y;let{hours:S,dayPeriod:z}=h(y);this.displayHours=this.ampm?S:y,this.dayPeriod=z}get hours(){return this._hours}render(){this.updateSliders(),this.updateText()}}function _e(R,y,S){return(y=(function(z){var q=(function(M,A){if(typeof M!="object"||M===null)return M;var P=M[Symbol.toPrimitive];if(P!==void 0){var U=P.call(M,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)})(z);return typeof q=="symbol"?q:String(q)})(y))in R?Object.defineProperty(R,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):R[y]=S,R}class ri{constructor(y){let{dp:S,opts:z}=y;_e(this,"pressedKeys",new Set),_e(this,"hotKeys",new Map([[[["Control","ArrowRight"],["Control","ArrowUp"]],q=>q.month++],[[["Control","ArrowLeft"],["Control","ArrowDown"]],q=>q.month--],[[["Shift","ArrowRight"],["Shift","ArrowUp"]],q=>q.year++],[[["Shift","ArrowLeft"],["Shift","ArrowDown"]],q=>q.year--],[[["Alt","ArrowRight"],["Alt","ArrowUp"]],q=>q.year+=10],[[["Alt","ArrowLeft"],["Alt","ArrowDown"]],q=>q.year-=10],[["Control","Shift","ArrowUp"],(q,M)=>M.up()]])),_e(this,"handleHotKey",(q=>{let M=this.hotKeys.get(q),A=d(this.getInitialFocusDate());M(A,this.dp);let{year:P,month:U,date:Y}=A,ot=l(new Date(P,U));ot<Y&&(Y=ot);let et=this.dp.getClampedDate(new Date(P,U,Y));this.dp.setFocusDate(et,{viewDateTransition:!0})})),_e(this,"isHotKeyPressed",(()=>{let q=!1,M=this.pressedKeys.size,A=P=>this.pressedKeys.has(P);for(let[P]of this.hotKeys){if(q)break;if(Array.isArray(P[0]))P.forEach((U=>{q||M!==U.length||(q=U.every(A)&&P)}));else{if(M!==P.length)continue;q=P.every(A)&&P}}return q})),_e(this,"isArrow",(q=>q>=37&&q<=40)),_e(this,"onKeyDown",(q=>{if(!this.dp.visible&&!this.dp.treatAsInline)return;let{key:M,which:A}=q,{dp:P,dp:{focusDate:U},opts:Y}=this;this.registerKey(M);let ot=this.isHotKeyPressed();if(ot)return q.preventDefault(),void this.handleHotKey(ot);if(this.isArrow(A))return q.preventDefault(),void this.focusNextCell(M);if(M==="Enter"){if(P.currentView!==Y.minView)return void P.down();if(U){let et=P._checkIfDateIsSelected(U);return void(et?P._handleAlreadySelectedDates(et,U):P.selectDate(U))}}M==="Escape"&&this.dp.hide()})),_e(this,"onKeyUp",(q=>{this.removeKey(q.key)})),this.dp=S,this.opts=z,this.init()}init(){this.bindKeyboardEvents()}bindKeyboardEvents(){let{$el:y}=this.dp;y.addEventListener("keydown",this.onKeyDown),y.addEventListener("keyup",this.onKeyUp)}destroy(){let{$el:y}=this.dp;y.removeEventListener("keydown",this.onKeyDown),y.removeEventListener("keyup",this.onKeyUp),this.hotKeys=null,this.pressedKeys=null}getInitialFocusDate(){let{focusDate:y,currentView:S,selectedDates:z,parsedViewDate:{year:q,month:M}}=this.dp,A=y||z[z.length-1];if(!A)switch(S){case t.days:A=new Date(q,M,new Date().getDate());break;case t.months:A=new Date(q,M,1);break;case t.years:A=new Date(q,0,1)}return A}focusNextCell(y){let S=this.getInitialFocusDate(),{currentView:z}=this.dp,{days:q,months:M,years:A}=t,P=d(S),U=P.year,Y=P.month,ot=P.date;switch(y){case"ArrowLeft":z===q&&(ot-=1),z===M&&(Y-=1),z===A&&(U-=1);break;case"ArrowUp":z===q&&(ot-=7),z===M&&(Y-=3),z===A&&(U-=4);break;case"ArrowRight":z===q&&(ot+=1),z===M&&(Y+=1),z===A&&(U+=1);break;case"ArrowDown":z===q&&(ot+=7),z===M&&(Y+=3),z===A&&(U+=4)}let et=this.dp.getClampedDate(new Date(U,Y,ot));this.dp.setFocusDate(et,{viewDateTransition:!0})}registerKey(y){this.pressedKeys.add(y)}removeKey(y){this.pressedKeys.delete(y)}}let qa={on(R,y){this.__events||(this.__events={}),this.__events[R]?this.__events[R].push(y):this.__events[R]=[y]},off(R,y){this.__events&&this.__events[R]&&(this.__events[R]=this.__events[R].filter((S=>S!==y)))},removeAllEvents(){this.__events={}},trigger(R){for(var y=arguments.length,S=new Array(y>1?y-1:0),z=1;z<y;z++)S[z-1]=arguments[z];this.__events&&this.__events[R]&&this.__events[R].forEach((q=>{q(...S)}))}};function mt(R,y,S){return(y=(function(z){var q=(function(M,A){if(typeof M!="object"||M===null)return M;var P=M[Symbol.toPrimitive];if(P!==void 0){var U=P.call(M,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)})(z);return typeof q=="symbol"?q:String(q)})(y))in R?Object.defineProperty(R,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):R[y]=S,R}let Io="",Do="",ut=!1;class it{static buildGlobalContainer(y){ut=!0,Io=a({className:y,id:y}),n("body").appendChild(Io)}constructor(y,S){var z=this;if(mt(this,"viewIndexes",[t.days,t.months,t.years]),mt(this,"next",(()=>{let{year:A,month:P}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date(A,P+1,1));break;case t.months:this.setViewDate(new Date(A+1,P,1));break;case t.years:this.setViewDate(new Date(A+10,0,1))}})),mt(this,"prev",(()=>{let{year:A,month:P}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date(A,P-1,1));break;case t.months:this.setViewDate(new Date(A-1,P,1));break;case t.years:this.setViewDate(new Date(A-10,0,1))}})),mt(this,"_finishHide",(()=>{this.hideAnimation=!1,this._destroyComponents(),this.$container.removeChild(this.$datepicker)})),mt(this,"setPosition",(function(A){let P=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(typeof(A=A||z.opts.position)=="function")return void(z.customHide=A({$datepicker:z.$datepicker,$target:z.$el,$pointer:z.$pointer,isViewChange:P,done:z._finishHide}));let U,Y,{isMobile:ot}=z.opts,et=z.$el.getBoundingClientRect(),at=z.$el.getBoundingClientRect(),fe=z.$datepicker.offsetParent,Pr=z.$el.offsetParent,hr=z.$datepicker.getBoundingClientRect(),on=A.split(" "),js=window.scrollY,ji=window.scrollX,Gi=z.opts.offset,Wi=on[0],ph=on[1];if(ot)z.$datepicker.style.cssText="left: 50%; top: 50%";else{if(fe===Pr&&fe!==document.body&&(at={top:z.$el.offsetTop,left:z.$el.offsetLeft,width:et.width,height:z.$el.offsetHeight},js=0,ji=0),fe!==Pr&&fe!==document.body){let $c=fe.getBoundingClientRect();at={top:et.top-$c.top,left:et.left-$c.left,width:et.width,height:et.height},js=0,ji=0}switch(Wi){case"top":U=at.top-hr.height-Gi;break;case"right":Y=at.left+at.width+Gi;break;case"bottom":U=at.top+at.height+Gi;break;case"left":Y=at.left-hr.width-Gi}switch(ph){case"top":U=at.top;break;case"right":Y=at.left+at.width-hr.width;break;case"bottom":U=at.top+at.height-hr.height;break;case"left":Y=at.left;break;case"center":/left|right/.test(Wi)?U=at.top+at.height/2-hr.height/2:Y=at.left+at.width/2-hr.width/2}z.$datepicker.style.cssText=`left: ${Y+ji}px; top: ${U+js}px`}})),mt(this,"_setInputValue",(()=>{let{opts:A,$altField:P,locale:{dateFormat:U}}=this,{altFieldDateFormat:Y,altField:ot}=A;ot&&P&&(P.value=this._getInputValue(Y)),this.$el.value=this._getInputValue(U),this.$el.dispatchEvent(new Event("change"))})),mt(this,"_getInputValue",(A=>{let{selectedDates:P,opts:U}=this,{multipleDates:Y,multipleDatesSeparator:ot}=U;if(!P.length)return"";let et=typeof A=="function",at=et?A(Y?P:P[0]):P.map((fe=>this.formatDate(fe,A)));return at=et?at:at.join(ot),at})),mt(this,"_checkIfDateIsSelected",(function(A){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.days,U=!1;return z.selectedDates.some((Y=>{let ot=g(A,Y,P);return U=ot&&Y,ot})),U})),mt(this,"_scheduleCallAfterTransition",(A=>{this._cancelScheduledCall(),A&&A(!1),this._onTransitionEnd=()=>{A&&A(!0)},this.$datepicker.addEventListener("transitionend",this._onTransitionEnd,{once:!0})})),mt(this,"_cancelScheduledCall",(()=>{this.$datepicker.removeEventListener("transitionend",this._onTransitionEnd)})),mt(this,"setViewDate",(A=>{if(!((A=w(A))instanceof Date)||g(A,this.viewDate))return;let P=this.viewDate;this.viewDate=A;let{onChangeViewDate:U}=this.opts;if(U){let{month:Y,year:ot}=this.parsedViewDate;U({month:Y,year:ot,decade:this.curDecade})}this.trigger(t.eventChangeViewDate,A,P)})),mt(this,"setFocusDate",(function(A){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!A||(A=w(A))instanceof Date)&&(z.focusDate=A,z.trigger(t.eventChangeFocusDate,A,P))})),mt(this,"setCurrentView",(function(A){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(z.viewIndexes.includes(A)){if(z.currentView=A,z.elIsInput&&z.visible&&z.setPosition(void 0,!0),z.trigger(t.eventChangeCurrentView,A),!z.views[A]){let U=z.views[A]=new _t({dp:z,opts:z.opts,type:A});z.shouldUpdateDOM&&z.$content.appendChild(U.$el)}z.opts.onChangeView&&!P.silent&&z.opts.onChangeView(A)}})),mt(this,"_updateLastSelectedDate",(A=>{this.lastSelectedDate=A,this.trigger(t.eventChangeLastSelectedDate,A)})),mt(this,"destroy",(()=>{if(this.isDestroyed)return;let{showEvent:A,isMobile:P}=this.opts,U=this.$datepicker.parentNode;U&&U.removeChild(this.$datepicker),this.$el.removeEventListener(A,this._onFocus),this.$el.removeEventListener("blur",this._onBlur),window.removeEventListener("resize",this._onResize),P&&this._removeMobileAttributes(),this.keyboardNav&&this.keyboardNav.destroy(),this.views=null,this.nav=null,this.$datepicker=null,this.opts={},this.$customContainer=null,this.viewDate=null,this.focusDate=null,this.selectedDates=[],this.rangeDateFrom=null,this.rangeDateTo=null,this.isDestroyed=!0})),mt(this,"update",(function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},U=I({},z.opts),{silent:Y}=P;I(z.opts,A);let{timepicker:ot,buttons:et,range:at,selectedDates:fe,isMobile:Pr}=z.opts,hr=z.visible||z.treatAsInline;z._createMinMaxDates(),z._limitViewDateByMaxMinDates(),z._handleLocale(),fe&&(z.selectedDates=[],z.selectDate(fe,{silent:Y})),A.view&&z.setCurrentView(A.view,{silent:Y}),z._setInputValue(),U.range&&!at?(z.rangeDateTo=!1,z.rangeDateFrom=!1):!U.range&&at&&z.selectedDates.length&&(z.rangeDateFrom=z.selectedDates[0],z.rangeDateTo=z.selectedDates[1]),U.timepicker&&!ot?(hr&&z.timepicker.destroy(),z.timepicker=!1,z.$timepicker.parentNode.removeChild(z.$timepicker)):!U.timepicker&&ot&&z._addTimepicker(),!U.buttons&&et?z._addButtons():U.buttons&&!et?(z.buttons.destroy(),z.$buttons.parentNode.removeChild(z.$buttons)):hr&&U.buttons&&et&&z.buttons.clearHtml().render(),!U.isMobile&&Pr?(z.treatAsInline||Do||z._createMobileOverlay(),z._addMobileAttributes(),z.visible&&z._showMobileOverlay()):U.isMobile&&!Pr&&(z._removeMobileAttributes(),z.visible&&(Do.classList.remove("-active-"),typeof z.opts.position!="function"&&z.setPosition())),hr&&(z.nav.update(),z.views[z.currentView].render(),z.currentView===t.days&&z.views[z.currentView].renderDayNames())})),mt(this,"disableDate",((A,P)=>{(Array.isArray(A)?A:[A]).forEach((U=>{let Y=w(U);if(!Y)return;let ot=P?"delete":"add";this.disabledDates[ot](this.formatDate(Y,"yyyy-MM-dd"));let et=this.getCell(Y,this.currentViewSingular);et&&et.adpCell.render()}),[])})),mt(this,"enableDate",(A=>{this.disableDate(A,!0)})),mt(this,"isDateDisabled",(A=>{let P=w(A);return this.disabledDates.has(this.formatDate(P,"yyyy-MM-dd"))})),mt(this,"isOtherMonth",(A=>{let{month:P}=d(A);return P!==this.parsedViewDate.month})),mt(this,"isOtherYear",(A=>{let{year:P}=d(A);return P!==this.parsedViewDate.year})),mt(this,"isOtherDecade",(A=>{let{year:P}=d(A),[U,Y]=f(this.viewDate);return P<U||P>Y})),mt(this,"_onChangeSelectedDate",(A=>{let{silent:P}=A;setTimeout((()=>{this._setInputValue(),this.opts.onSelect&&!P&&this._triggerOnSelect()}))})),mt(this,"_onChangeFocusedDate",(function(A){let{viewDateTransition:P}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!A)return;let U=!1;P&&(U=z.isOtherMonth(A)||z.isOtherYear(A)||z.isOtherDecade(A)),U&&z.setViewDate(A),z.opts.onFocus&&z.opts.onFocus({datepicker:z,date:A})})),mt(this,"_onChangeTime",(A=>{let{hours:P,minutes:U}=A,Y=new Date,{lastSelectedDate:ot,opts:{onSelect:et}}=this,at=ot;ot||(at=Y);let fe=this.getCell(at,this.currentViewSingular),Pr=fe&&fe.adpCell;Pr&&Pr.isDisabled||(at.setHours(P),at.setMinutes(U),ot?(this._setInputValue(),et&&this._triggerOnSelect()):this.selectDate(at))})),mt(this,"_onFocus",(A=>{this.visible||this.show()})),mt(this,"_onBlur",(A=>{this.inFocus||!this.visible||this.opts.isMobile||this.hide()})),mt(this,"_onMouseDown",(A=>{this.inFocus=!0})),mt(this,"_onMouseUp",(A=>{this.inFocus=!1,this.$el.focus()})),mt(this,"_onResize",(()=>{this.visible&&typeof this.opts.position!="function"&&this.setPosition()})),mt(this,"_onClickOverlay",(()=>{this.visible&&this.hide()})),mt(this,"getViewDates",(function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return _t.getDatesFunction(A)(z)})),mt(this,"isWeekend",(A=>this.opts.weekends.includes(A))),mt(this,"getClampedDate",(A=>{let{minDate:P,maxDate:U}=this,Y=A;return U&&v(A,U)?Y=U:P&&x(A,P)&&(Y=P),Y})),this.$el=n(y),!this.$el)return;this.$datepicker=a({className:"air-datepicker"}),this.opts=I({},r,S),this.$customContainer=!!this.opts.container&&n(this.opts.container),this.$altField=n(this.opts.altField||!1);let{view:q,startDate:M}=this.opts;M||(this.opts.startDate=new Date),this.$el.nodeName==="INPUT"&&(this.elIsInput=!0),this.inited=!1,this.visible=!1,this.viewDate=w(this.opts.startDate),this.focusDate=!1,this.initialReadonly=this.$el.getAttribute("readonly"),this.customHide=!1,this.currentView=q,this.selectedDates=[],this.disabledDates=new Set,this.isDestroyed=!1,this.views={},this.keys=[],this.rangeDateFrom="",this.rangeDateTo="",this.timepickerIsActive=!1,this.treatAsInline=this.opts.inline||!this.elIsInput,this.init()}init(){let{opts:y,treatAsInline:S,opts:{inline:z,isMobile:q,selectedDates:M,keyboardNav:A,onlyTimepicker:P}}=this,U=n("body");(!ut||ut&&Io&&!U.contains(Io))&&!z&&this.elIsInput&&!this.$customContainer&&it.buildGlobalContainer(it.defaultGlobalContainerId),!q||Do||S||this._createMobileOverlay(),this._handleLocale(),this._bindSubEvents(),this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this.elIsInput&&(z||this._bindEvents(),A&&!P&&(this.keyboardNav=new ri({dp:this,opts:y}))),M&&this.selectDate(M,{silent:!0}),this.opts.visible&&!S&&this.show(),q&&!S&&this.$el.setAttribute("readonly",!0),S&&this._createComponents()}_createMobileOverlay(){Do=a({className:"air-datepicker-overlay"}),Io.appendChild(Do)}_createComponents(){let{opts:y,treatAsInline:S,opts:{inline:z,buttons:q,timepicker:M,position:A,classes:P,onlyTimepicker:U,isMobile:Y}}=this;this._buildBaseHtml(),this.elIsInput&&(z||this._setPositionClasses(A)),!z&&this.elIsInput||this.$datepicker.classList.add("-inline-"),P&&this.$datepicker.classList.add(...P.split(" ")),U&&this.$datepicker.classList.add("-only-timepicker-"),Y&&!S&&this._addMobileAttributes(),this.views[this.currentView]=new _t({dp:this,type:this.currentView,opts:y}),this.nav=new we({dp:this,opts:y}),M&&this._addTimepicker(),q&&this._addButtons(),this.$content.appendChild(this.views[this.currentView].$el),this.$nav.appendChild(this.nav.$el)}_destroyComponents(){for(let y in this.views)this.views[y].destroy();this.views={},this.nav.destroy(),this.timepicker&&this.timepicker.destroy()}_addMobileAttributes(){Do.addEventListener("click",this._onClickOverlay),this.$datepicker.classList.add("-is-mobile-"),this.$el.setAttribute("readonly",!0)}_removeMobileAttributes(){Do.removeEventListener("click",this._onClickOverlay),this.$datepicker.classList.remove("-is-mobile-"),this.initialReadonly||this.initialReadonly===""||this.$el.removeAttribute("readonly")}_createMinMaxDates(){let{minDate:y,maxDate:S}=this.opts;this.minDate=!!y&&w(y),this.maxDate=!!S&&w(S)}_addTimepicker(){this.$timepicker=a({className:"air-datepicker--time"}),this.$datepicker.appendChild(this.$timepicker),this.timepicker=new Ye({dp:this,opts:this.opts}),this.$timepicker.appendChild(this.timepicker.$el)}_addButtons(){this.$buttons=a({className:"air-datepicker--buttons"}),this.$datepicker.appendChild(this.$buttons),this.buttons=new pr({dp:this,opts:this.opts}),this.$buttons.appendChild(this.buttons.$el)}_bindSubEvents(){this.on(t.eventChangeSelectedDate,this._onChangeSelectedDate),this.on(t.eventChangeFocusDate,this._onChangeFocusedDate),this.on(t.eventChangeTime,this._onChangeTime)}_buildBaseHtml(){let{inline:y}=this.opts;var S,z;this.elIsInput?y?(S=this.$datepicker,(z=this.$el).parentNode.insertBefore(S,z.nextSibling)):this.$container.appendChild(this.$datepicker):this.$el.appendChild(this.$datepicker),this.$datepicker.innerHTML='<i class="air-datepicker--pointer"></i><div class="air-datepicker--navigation"></div><div class="air-datepicker--content"></div>',this.$content=n(".air-datepicker--content",this.$datepicker),this.$pointer=n(".air-datepicker--pointer",this.$datepicker),this.$nav=n(".air-datepicker--navigation",this.$datepicker)}_handleLocale(){let{locale:y,dateFormat:S,firstDay:z,timepicker:q,onlyTimepicker:M,timeFormat:A,dateTimeSeparator:P}=this.opts;var U;this.locale=(U=y,JSON.parse(JSON.stringify(U))),S&&(this.locale.dateFormat=S),A!==void 0&&A!==""&&(this.locale.timeFormat=A);let{timeFormat:Y}=this.locale;if(z!==""&&(this.locale.firstDay=z),q&&typeof S!="function"){let ot=Y?P:"";this.locale.dateFormat=[this.locale.dateFormat,Y||""].join(ot)}M&&typeof S!="function"&&(this.locale.dateFormat=this.locale.timeFormat)}_setPositionClasses(y){if(typeof y=="function")return void this.$datepicker.classList.add("-custom-position-");let S=(y=y.split(" "))[0],z=`air-datepicker -${S}-${y[1]}- -from-${S}-`;this.$datepicker.classList.add(...z.split(" "))}_bindEvents(){this.$el.addEventListener(this.opts.showEvent,this._onFocus),this.$el.addEventListener("blur",this._onBlur),this.$datepicker.addEventListener("mousedown",this._onMouseDown),this.$datepicker.addEventListener("mouseup",this._onMouseUp),window.addEventListener("resize",this._onResize)}_limitViewDateByMaxMinDates(){let{viewDate:y,minDate:S,maxDate:z}=this;z&&v(y,z)&&this.setViewDate(z),S&&x(y,S)&&this.setViewDate(S)}formatDate(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.viewDate,S=arguments.length>1?arguments[1]:void 0;if(y=w(y),!(y instanceof Date))return;let z=S,q=this.locale,M=d(y),A=M.dayPeriod,P=f(y),U=it.replacer,Y={T:y.getTime(),m:M.minutes,mm:M.fullMinutes,h:M.hours12,hh:M.fullHours12,H:M.hours,HH:M.fullHours,aa:A,AA:A.toUpperCase(),E:q.daysShort[M.day],EEEE:q.days[M.day],d:M.date,dd:M.fullDate,M:M.month+1,MM:M.fullMonth,MMM:q.monthsShort[M.month],MMMM:q.months[M.month],yy:M.year.toString().slice(-2),yyyy:M.year,yyyy1:P[0],yyyy2:P[1]};for(let[ot,et]of Object.entries(Y))z=U(z,$(ot),et);return z}down(y){this._handleUpDownActions(y,"down")}up(y){this._handleUpDownActions(y,"up")}selectDate(y){let S,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{currentView:q,parsedViewDate:M,selectedDates:A}=this,{updateTime:P,silent:U}=z,{moveToOtherMonthsOnSelect:Y,moveToOtherYearsOnSelect:ot,multipleDates:et,range:at,autoClose:fe,onBeforeSelect:Pr}=this.opts,hr=A.length;if(Array.isArray(y))return y.forEach((on=>{this.selectDate(on,z)})),new Promise((on=>{setTimeout(on)}));if((y=w(y))instanceof Date){if(Pr&&!U&&!Pr({date:y,datepicker:this}))return Promise.resolve();if(q===t.days&&y.getMonth()!==M.month&&Y&&(S=new Date(y.getFullYear(),y.getMonth(),1)),q===t.years&&y.getFullYear()!==M.year&&ot&&(S=new Date(y.getFullYear(),0,1)),S&&this.setViewDate(S),et&&!at){if(hr===et)return;this._checkIfDateIsSelected(y)||A.push(y)}else if(at)switch(hr){case 1:A.push(y),this.rangeDateTo||(this.rangeDateTo=y),v(this.rangeDateFrom,this.rangeDateTo)&&(this.rangeDateTo=this.rangeDateFrom,this.rangeDateFrom=y),this.selectedDates=[this.rangeDateFrom,this.rangeDateTo];break;case 2:this.selectedDates=[y],this.rangeDateFrom=y,this.rangeDateTo="";break;default:this.selectedDates=[y],this.rangeDateFrom=y}else this.selectedDates=[y];return this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,silent:z?.silent,date:y,updateTime:P}),this._updateLastSelectedDate(y),fe&&!this.timepickerIsActive&&this.visible&&(et||at?at&&hr===1&&this.hide():this.hide()),new Promise((on=>{setTimeout(on)}))}}unselectDate(y){let S=this.selectedDates,z=this;if((y=w(y))instanceof Date)return S.some(((q,M)=>{if(g(q,y))return S.splice(M,1),z.selectedDates.length?(z.rangeDateTo="",z.rangeDateFrom=S[0],z._updateLastSelectedDate(z.selectedDates[z.selectedDates.length-1])):(z.rangeDateFrom="",z.rangeDateTo="",z._updateLastSelectedDate(!1)),this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,date:y}),!0}))}replaceDate(y,S){let z=this.selectedDates.find((M=>g(M,y,this.currentView))),q=this.selectedDates.indexOf(z);q<0||g(this.selectedDates[q],S,this.currentView)||(this.selectedDates[q]=S,this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,date:S,updateTime:!0}),this._updateLastSelectedDate(S))}clear(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.selectedDates=[],this.rangeDateFrom=!1,this.rangeDateTo=!1,this.lastSelectedDate=!1,this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,silent:y.silent}),new Promise((S=>{setTimeout(S)}))}show(){let{onShow:y,isMobile:S}=this.opts;this._cancelScheduledCall(),this.visible||this.hideAnimation||this._createComponents(),this.setPosition(this.opts.position),this.$datepicker.classList.add("-active-"),this.visible=!0,y&&this._scheduleCallAfterTransition(y),S&&this._showMobileOverlay()}hide(){let{onHide:y,isMobile:S}=this.opts,z=this._hasTransition();this.visible=!1,this.hideAnimation=!0,this.$datepicker.classList.remove("-active-"),this.customHide&&this.customHide(),this.elIsInput&&this.$el.blur(),this._scheduleCallAfterTransition((q=>{!this.customHide&&(q&&z||!q&&!z)&&this._finishHide(),y&&y(q)})),S&&Do.classList.remove("-active-")}_triggerOnSelect(){let y=[],S=[],{selectedDates:z,locale:q,opts:{onSelect:M,multipleDates:A,range:P}}=this,U=A||P,Y=typeof q.dateFormat=="function";z.length&&(y=z.map(_),S=Y?A?q.dateFormat(y):y.map((ot=>q.dateFormat(ot))):y.map((ot=>this.formatDate(ot,q.dateFormat)))),M({date:U?y:y[0],formattedDate:U?S:S[0],datepicker:this})}_handleAlreadySelectedDates(y,S){let{selectedDates:z,rangeDateFrom:q,rangeDateTo:M}=this,{range:A,toggleSelected:P}=this.opts,U=z.length,Y=typeof P=="function"?P({datepicker:this,date:S}):P,ot=!!(A&&U===1&&y),et=ot?_(S):S;A&&!Y&&(U!==2&&this.selectDate(et),U===2&&g(q,M))||(Y?this.unselectDate(et):this._updateLastSelectedDate(ot?et:y))}_handleUpDownActions(y,S){if(!((y=w(y||this.focusDate||this.viewDate))instanceof Date))return;let z=S==="up"?this.viewIndex+1:this.viewIndex-1;z>2&&(z=2),z<0&&(z=0),this.setViewDate(new Date(y.getFullYear(),y.getMonth(),1)),this.setCurrentView(this.viewIndexes[z])}getCell(y){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.day;if(!((y=w(y))instanceof Date))return;let{year:z,month:q,date:M}=d(y),A=`[data-year="${z}"]`,P=`[data-month="${q}"]`,U={[t.day]:`${A}${P}[data-date="${M}"]`,[t.month]:`${A}${P}`,[t.year]:`${A}`};return this.views[this.currentView]?this.views[this.currentView].$el.querySelector(U[S]):void 0}_showMobileOverlay(){Do.classList.add("-active-")}_hasTransition(){return window.getComputedStyle(this.$datepicker).getPropertyValue("transition-duration").split(", ").reduce(((y,S)=>parseFloat(S)+y),0)>0}get shouldUpdateDOM(){return this.visible||this.treatAsInline}get parsedViewDate(){return d(this.viewDate)}get currentViewSingular(){return this.currentView.slice(0,-1)}get curDecade(){return f(this.viewDate)}get viewIndex(){return this.viewIndexes.indexOf(this.currentView)}get isFinalView(){return this.currentView===t.years}get hasSelectedDates(){return this.selectedDates.length>0}get isMinViewReached(){return this.currentView===this.opts.minView||this.currentView===t.days}get $container(){return this.$customContainer||Io}static replacer(y,S,z){return y.replace(S,(function(q,M,A,P){return M+z+P}))}}var xt;return mt(it,"defaults",r),mt(it,"version","3.6.0"),mt(it,"defaultGlobalContainerId","air-datepicker-global-container"),xt=it.prototype,Object.assign(xt,qa),o.default})()}))});var Ws=globalThis,og=i=>i,Ac=Ws.trustedTypes,ng=Ac?Ac.createPolicy("lit-html",{createHTML:i=>i}):void 0,uh="$lit$",An=`lit$${Math.random().toFixed(9).slice(2)}$`,mh="?"+An,H_=`<${mh}>`,Xi=document,Ks=()=>Xi.createComment(""),Ys=i=>i===null||typeof i!="object"&&typeof i!="function",fh=Array.isArray,dg=i=>fh(i)||typeof i?.[Symbol.iterator]=="function",hh=`[
|
|
1
|
+
import{a as $n,b as P_,c as ur,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var $0=$n((gtt,T0)=>{var so=-1,Ar=1,Ve=0;function wl(i,o,t,r,n){if(i===o)return i?[[Ve,i]]:[];if(t!=null){var a=F5(i,o,t);if(a)return a}var s=ku(i,o),l=i.substring(0,s);i=i.substring(s),o=o.substring(s),s=Cd(i,o);var d=i.substring(i.length-s);i=i.substring(0,i.length-s),o=o.substring(0,o.length-s);var h=q5(i,o);return l&&h.unshift([Ve,l]),d&&h.push([Ve,d]),Cu(h,n),r&&N5(h),h}function q5(i,o){var t;if(!i)return[[Ar,o]];if(!o)return[[so,i]];var r=i.length>o.length?i:o,n=i.length>o.length?o:i,a=r.indexOf(n);if(a!==-1)return t=[[Ar,r.substring(0,a)],[Ve,n],[Ar,r.substring(a+n.length)]],i.length>o.length&&(t[0][0]=t[2][0]=so),t;if(n.length===1)return[[so,i],[Ar,o]];var s=D5(i,o);if(s){var l=s[0],d=s[1],h=s[2],m=s[3],f=s[4],b=wl(l,h),g=wl(d,m);return b.concat([[Ve,f]],g)}return I5(i,o)}function I5(i,o){for(var t=i.length,r=o.length,n=Math.ceil((t+r)/2),a=n,s=2*n,l=new Array(s),d=new Array(s),h=0;h<s;h++)l[h]=-1,d[h]=-1;l[a+1]=0,d[a+1]=0;for(var m=t-r,f=m%2!==0,b=0,g=0,v=0,x=0,_=0;_<n;_++){for(var k=-_+b;k<=_-g;k+=2){var N=a+k,G;k===-_||k!==_&&l[N-1]<l[N+1]?G=l[N+1]:G=l[N-1]+1;for(var I=G-k;G<t&&I<r&&i.charAt(G)===o.charAt(I);)G++,I++;if(l[N]=G,G>t)g+=2;else if(I>r)b+=2;else if(f){var w=a+m-k;if(w>=0&&w<s&&d[w]!==-1){var $=t-d[w];if(G>=$)return x0(i,o,G,I)}}}for(var L=-_+v;L<=_-x;L+=2){var w=a+L,$;L===-_||L!==_&&d[w-1]<d[w+1]?$=d[w+1]:$=d[w-1]+1;for(var W=$-L;$<t&&W<r&&i.charAt(t-$-1)===o.charAt(r-W-1);)$++,W++;if(d[w]=$,$>t)x+=2;else if(W>r)v+=2;else if(!f){var N=a+m-L;if(N>=0&&N<s&&l[N]!==-1){var G=l[N],I=a+G-N;if($=t-$,G>=$)return x0(i,o,G,I)}}}}return[[so,i],[Ar,o]]}function x0(i,o,t,r){var n=i.substring(0,t),a=o.substring(0,r),s=i.substring(t),l=o.substring(r),d=wl(n,a),h=wl(s,l);return d.concat(h)}function ku(i,o){if(!i||!o||i.charAt(0)!==o.charAt(0))return 0;for(var t=0,r=Math.min(i.length,o.length),n=r,a=0;t<n;)i.substring(a,n)==o.substring(a,n)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return k0(i.charCodeAt(n-1))&&n--,n}function y0(i,o){var t=i.length,r=o.length;if(t==0||r==0)return 0;t>r?i=i.substring(t-r):t<r&&(o=o.substring(0,t));var n=Math.min(t,r);if(i==o)return n;for(var a=0,s=1;;){var l=i.substring(n-s),d=o.indexOf(l);if(d==-1)return a;s+=d,(d==0||i.substring(n-s)==o.substring(0,s))&&(a=s,s++)}}function Cd(i,o){if(!i||!o||i.slice(-1)!==o.slice(-1))return 0;for(var t=0,r=Math.min(i.length,o.length),n=r,a=0;t<n;)i.substring(i.length-n,i.length-a)==o.substring(o.length-n,o.length-a)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return C0(i.charCodeAt(i.length-n))&&n--,n}function D5(i,o){var t=i.length>o.length?i:o,r=i.length>o.length?o:i;if(t.length<4||r.length*2<t.length)return null;function n(g,v,x){for(var _=g.substring(x,x+Math.floor(g.length/4)),k=-1,N="",G,I,w,$;(k=v.indexOf(_,k+1))!==-1;){var L=ku(g.substring(x),v.substring(k)),W=Cd(g.substring(0,x),v.substring(0,k));N.length<W+L&&(N=v.substring(k-W,k)+v.substring(k,k+L),G=g.substring(0,x-W),I=g.substring(x+L),w=v.substring(0,k-W),$=v.substring(k+L))}return N.length*2>=g.length?[G,I,w,$,N]:null}var a=n(t,r,Math.ceil(t.length/4)),s=n(t,r,Math.ceil(t.length/2)),l;if(!a&&!s)return null;s?a?l=a[4].length>s[4].length?a:s:l=s:l=a;var d,h,m,f;i.length>o.length?(d=l[0],h=l[1],m=l[2],f=l[3]):(m=l[0],f=l[1],d=l[2],h=l[3]);var b=l[4];return[d,h,m,f,b]}function N5(i){for(var o=!1,t=[],r=0,n=null,a=0,s=0,l=0,d=0,h=0;a<i.length;)i[a][0]==Ve?(t[r++]=a,s=d,l=h,d=0,h=0,n=i[a][1]):(i[a][0]==Ar?d+=i[a][1].length:h+=i[a][1].length,n&&n.length<=Math.max(s,l)&&n.length<=Math.max(d,h)&&(i.splice(t[r-1],0,[so,n]),i[t[r-1]+1][0]=Ar,r--,r--,a=r>0?t[r-1]:-1,s=0,l=0,d=0,h=0,n=null,o=!0)),a++;for(o&&Cu(i),P5(i),a=1;a<i.length;){if(i[a-1][0]==so&&i[a][0]==Ar){var m=i[a-1][1],f=i[a][1],b=y0(m,f),g=y0(f,m);b>=g?(b>=m.length/2||b>=f.length/2)&&(i.splice(a,0,[Ve,f.substring(0,b)]),i[a-1][1]=m.substring(0,m.length-b),i[a+1][1]=f.substring(b),a++):(g>=m.length/2||g>=f.length/2)&&(i.splice(a,0,[Ve,m.substring(0,g)]),i[a-1][0]=Ar,i[a-1][1]=f.substring(0,f.length-g),i[a+1][0]=so,i[a+1][1]=m.substring(g),a++),a++}a++}}var z0=/[^a-zA-Z0-9]/,w0=/\s/,_0=/[\r\n]/,R5=/\n\r?\n$/,O5=/^\r?\n\r?\n/;function P5(i){function o(g,v){if(!g||!v)return 6;var x=g.charAt(g.length-1),_=v.charAt(0),k=x.match(z0),N=_.match(z0),G=k&&x.match(w0),I=N&&_.match(w0),w=G&&x.match(_0),$=I&&_.match(_0),L=w&&g.match(R5),W=$&&v.match(O5);return L||W?5:w||$?4:k&&!G&&I?3:G||I?2:k||N?1:0}for(var t=1;t<i.length-1;){if(i[t-1][0]==Ve&&i[t+1][0]==Ve){var r=i[t-1][1],n=i[t][1],a=i[t+1][1],s=Cd(r,n);if(s){var l=n.substring(n.length-s);r=r.substring(0,r.length-s),n=l+n.substring(0,n.length-s),a=l+a}for(var d=r,h=n,m=a,f=o(r,n)+o(n,a);n.charAt(0)===a.charAt(0);){r+=n.charAt(0),n=n.substring(1)+a.charAt(0),a=a.substring(1);var b=o(r,n)+o(n,a);b>=f&&(f=b,d=r,h=n,m=a)}i[t-1][1]!=d&&(d?i[t-1][1]=d:(i.splice(t-1,1),t--),i[t][1]=h,m?i[t+1][1]=m:(i.splice(t+1,1),t--))}t++}}function Cu(i,o){i.push([Ve,""]);for(var t=0,r=0,n=0,a="",s="",l;t<i.length;){if(t<i.length-1&&!i[t][1]){i.splice(t,1);continue}switch(i[t][0]){case Ar:n++,s+=i[t][1],t++;break;case so:r++,a+=i[t][1],t++;break;case Ve:var d=t-n-r-1;if(o){if(d>=0&&E0(i[d][1])){var h=i[d][1].slice(-1);if(i[d][1]=i[d][1].slice(0,-1),a=h+a,s=h+s,!i[d][1]){i.splice(d,1),t--;var m=d-1;i[m]&&i[m][0]===Ar&&(n++,s=i[m][1]+s,m--),i[m]&&i[m][0]===so&&(r++,a=i[m][1]+a,m--),d=m}}if(S0(i[t][1])){var h=i[t][1].charAt(0);i[t][1]=i[t][1].slice(1),a+=h,s+=h}}if(t<i.length-1&&!i[t][1]){i.splice(t,1);break}if(a.length>0||s.length>0){a.length>0&&s.length>0&&(l=ku(s,a),l!==0&&(d>=0?i[d][1]+=s.substring(0,l):(i.splice(0,0,[Ve,s.substring(0,l)]),t++),s=s.substring(l),a=a.substring(l)),l=Cd(s,a),l!==0&&(i[t][1]=s.substring(s.length-l)+i[t][1],s=s.substring(0,s.length-l),a=a.substring(0,a.length-l)));var f=n+r;a.length===0&&s.length===0?(i.splice(t-f,f),t=t-f):a.length===0?(i.splice(t-f,f,[Ar,s]),t=t-f+1):s.length===0?(i.splice(t-f,f,[so,a]),t=t-f+1):(i.splice(t-f,f,[so,a],[Ar,s]),t=t-f+2)}t!==0&&i[t-1][0]===Ve?(i[t-1][1]+=i[t][1],i.splice(t,1)):t++,n=0,r=0,a="",s="";break}}i[i.length-1][1]===""&&i.pop();var b=!1;for(t=1;t<i.length-1;)i[t-1][0]===Ve&&i[t+1][0]===Ve&&(i[t][1].substring(i[t][1].length-i[t-1][1].length)===i[t-1][1]?(i[t][1]=i[t-1][1]+i[t][1].substring(0,i[t][1].length-i[t-1][1].length),i[t+1][1]=i[t-1][1]+i[t+1][1],i.splice(t-1,1),b=!0):i[t][1].substring(0,i[t+1][1].length)==i[t+1][1]&&(i[t-1][1]+=i[t+1][1],i[t][1]=i[t][1].substring(i[t+1][1].length)+i[t+1][1],i.splice(t+1,1),b=!0)),t++;b&&Cu(i,o)}function k0(i){return i>=55296&&i<=56319}function C0(i){return i>=56320&&i<=57343}function S0(i){return C0(i.charCodeAt(0))}function E0(i){return k0(i.charCodeAt(i.length-1))}function H5(i){for(var o=[],t=0;t<i.length;t++)i[t][1].length>0&&o.push(i[t]);return o}function _u(i,o,t,r){return E0(i)||S0(r)?null:H5([[Ve,i],[so,o],[Ar,t],[Ve,r]])}function F5(i,o,t){var r=typeof t=="number"?{index:t,length:0}:t.oldRange,n=typeof t=="number"?null:t.newRange,a=i.length,s=o.length;if(r.length===0&&(n===null||n.length===0)){var l=r.index,d=i.slice(0,l),h=i.slice(l),m=n?n.index:null;t:{var f=l+s-a;if(m!==null&&m!==f||f<0||f>s)break t;var b=o.slice(0,f),g=o.slice(f);if(g!==h)break t;var v=Math.min(l,f),x=d.slice(0,v),_=b.slice(0,v);if(x!==_)break t;var k=d.slice(v),N=b.slice(v);return _u(x,k,N,h)}t:{if(m!==null&&m!==l)break t;var G=l,b=o.slice(0,G),g=o.slice(G);if(b!==d)break t;var I=Math.min(a-G,s-G),w=h.slice(h.length-I),$=g.slice(g.length-I);if(w!==$)break t;var k=h.slice(0,h.length-I),N=g.slice(0,g.length-I);return _u(d,k,N,w)}}if(r.length>0&&n&&n.length===0)t:{var x=i.slice(0,r.index),w=i.slice(r.index+r.length),v=x.length,I=w.length;if(s<v+I)break t;var _=o.slice(0,v),$=o.slice(s-I);if(x!==_||w!==$)break t;var k=i.slice(v,a-I),N=o.slice(v,s-I);return _u(x,k,N,w)}return null}function Sd(i,o,t,r){return wl(i,o,t,r,!0)}Sd.INSERT=Ar;Sd.DELETE=so;Sd.EQUAL=Ve;T0.exports=Sd});var Hu=$n((_l,ts)=>{var B5=200,F0="__lodash_hash_undefined__",B0=9007199254740991,qu="[object Arguments]",V5="[object Array]",V0="[object Boolean]",U0="[object Date]",U5="[object Error]",Iu="[object Function]",j0="[object GeneratorFunction]",Ed="[object Map]",G0="[object Number]",Du="[object Object]",A0="[object Promise]",W0="[object RegExp]",Td="[object Set]",K0="[object String]",Y0="[object Symbol]",Eu="[object WeakMap]",X0="[object ArrayBuffer]",$d="[object DataView]",Q0="[object Float32Array]",J0="[object Float64Array]",Z0="[object Int8Array]",t1="[object Int16Array]",e1="[object Int32Array]",r1="[object Uint8Array]",o1="[object Uint8ClampedArray]",n1="[object Uint16Array]",i1="[object Uint32Array]",j5=/[\\^$.*+?()[\]{}|]/g,G5=/\w*$/,W5=/^\[object .+?Constructor\]$/,K5=/^(?:0|[1-9]\d*)$/,Gt={};Gt[qu]=Gt[V5]=Gt[X0]=Gt[$d]=Gt[V0]=Gt[U0]=Gt[Q0]=Gt[J0]=Gt[Z0]=Gt[t1]=Gt[e1]=Gt[Ed]=Gt[G0]=Gt[Du]=Gt[W0]=Gt[Td]=Gt[K0]=Gt[Y0]=Gt[r1]=Gt[o1]=Gt[n1]=Gt[i1]=!0;Gt[U5]=Gt[Iu]=Gt[Eu]=!1;var Y5=typeof global=="object"&&global&&global.Object===Object&&global,X5=typeof self=="object"&&self&&self.Object===Object&&self,On=Y5||X5||Function("return this")(),a1=typeof _l=="object"&&_l&&!_l.nodeType&&_l,L0=a1&&typeof ts=="object"&&ts&&!ts.nodeType&&ts,Q5=L0&&L0.exports===a1;function J5(i,o){return i.set(o[0],o[1]),i}function Z5(i,o){return i.add(o),i}function t4(i,o){for(var t=-1,r=i?i.length:0;++t<r&&o(i[t],t,i)!==!1;);return i}function e4(i,o){for(var t=-1,r=o.length,n=i.length;++t<r;)i[n+t]=o[t];return i}function s1(i,o,t,r){var n=-1,a=i?i.length:0;for(r&&a&&(t=i[++n]);++n<a;)t=o(t,i[n],n,i);return t}function r4(i,o){for(var t=-1,r=Array(i);++t<i;)r[t]=o(t);return r}function o4(i,o){return i?.[o]}function l1(i){var o=!1;if(i!=null&&typeof i.toString!="function")try{o=!!(i+"")}catch{}return o}function M0(i){var o=-1,t=Array(i.size);return i.forEach(function(r,n){t[++o]=[n,r]}),t}function Nu(i,o){return function(t){return i(o(t))}}function q0(i){var o=-1,t=Array(i.size);return i.forEach(function(r){t[++o]=r}),t}var n4=Array.prototype,i4=Function.prototype,Ad=Object.prototype,Su=On["__core-js_shared__"],I0=(function(){var i=/[^.]+$/.exec(Su&&Su.keys&&Su.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),c1=i4.toString,bi=Ad.hasOwnProperty,Ld=Ad.toString,a4=RegExp("^"+c1.call(bi).replace(j5,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D0=Q5?On.Buffer:void 0,N0=On.Symbol,R0=On.Uint8Array,s4=Nu(Object.getPrototypeOf,Object),l4=Object.create,c4=Ad.propertyIsEnumerable,d4=n4.splice,O0=Object.getOwnPropertySymbols,p4=D0?D0.isBuffer:void 0,h4=Nu(Object.keys,Object),Tu=os(On,"DataView"),kl=os(On,"Map"),$u=os(On,"Promise"),Au=os(On,"Set"),Lu=os(On,"WeakMap"),Cl=os(Object,"create"),u4=ua(Tu),m4=ua(kl),f4=ua($u),g4=ua(Au),b4=ua(Lu),P0=N0?N0.prototype:void 0,H0=P0?P0.valueOf:void 0;function ha(i){var o=-1,t=i?i.length:0;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function v4(){this.__data__=Cl?Cl(null):{}}function x4(i){return this.has(i)&&delete this.__data__[i]}function y4(i){var o=this.__data__;if(Cl){var t=o[i];return t===F0?void 0:t}return bi.call(o,i)?o[i]:void 0}function z4(i){var o=this.__data__;return Cl?o[i]!==void 0:bi.call(o,i)}function w4(i,o){var t=this.__data__;return t[i]=Cl&&o===void 0?F0:o,this}ha.prototype.clear=v4;ha.prototype.delete=x4;ha.prototype.get=y4;ha.prototype.has=z4;ha.prototype.set=w4;function Pn(i){var o=-1,t=i?i.length:0;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function _4(){this.__data__=[]}function k4(i){var o=this.__data__,t=Md(o,i);if(t<0)return!1;var r=o.length-1;return t==r?o.pop():d4.call(o,t,1),!0}function C4(i){var o=this.__data__,t=Md(o,i);return t<0?void 0:o[t][1]}function S4(i){return Md(this.__data__,i)>-1}function E4(i,o){var t=this.__data__,r=Md(t,i);return r<0?t.push([i,o]):t[r][1]=o,this}Pn.prototype.clear=_4;Pn.prototype.delete=k4;Pn.prototype.get=C4;Pn.prototype.has=S4;Pn.prototype.set=E4;function es(i){var o=-1,t=i?i.length:0;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function T4(){this.__data__={hash:new ha,map:new(kl||Pn),string:new ha}}function $4(i){return qd(this,i).delete(i)}function A4(i){return qd(this,i).get(i)}function L4(i){return qd(this,i).has(i)}function M4(i,o){return qd(this,i).set(i,o),this}es.prototype.clear=T4;es.prototype.delete=$4;es.prototype.get=A4;es.prototype.has=L4;es.prototype.set=M4;function rs(i){this.__data__=new Pn(i)}function q4(){this.__data__=new Pn}function I4(i){return this.__data__.delete(i)}function D4(i){return this.__data__.get(i)}function N4(i){return this.__data__.has(i)}function R4(i,o){var t=this.__data__;if(t instanceof Pn){var r=t.__data__;if(!kl||r.length<B5-1)return r.push([i,o]),this;t=this.__data__=new es(r)}return t.set(i,o),this}rs.prototype.clear=q4;rs.prototype.delete=I4;rs.prototype.get=D4;rs.prototype.has=N4;rs.prototype.set=R4;function O4(i,o){var t=Ou(i)||l8(i)?r4(i.length,String):[],r=t.length,n=!!r;for(var a in i)(o||bi.call(i,a))&&!(n&&(a=="length"||n8(a,r)))&&t.push(a);return t}function d1(i,o,t){var r=i[o];(!(bi.call(i,o)&&m1(r,t))||t===void 0&&!(o in i))&&(i[o]=t)}function Md(i,o){for(var t=i.length;t--;)if(m1(i[t][0],o))return t;return-1}function P4(i,o){return i&&p1(o,Pu(o),i)}function Mu(i,o,t,r,n,a,s){var l;if(r&&(l=a?r(i,n,a,s):r(i)),l!==void 0)return l;if(!Id(i))return i;var d=Ou(i);if(d){if(l=e8(i),!o)return J4(i,l)}else{var h=pa(i),m=h==Iu||h==j0;if(d8(i))return j4(i,o);if(h==Du||h==qu||m&&!a){if(l1(i))return a?i:{};if(l=r8(m?{}:i),!o)return Z4(i,P4(l,i))}else{if(!Gt[h])return a?i:{};l=o8(i,h,Mu,o)}}s||(s=new rs);var f=s.get(i);if(f)return f;if(s.set(i,l),!d)var b=t?t8(i):Pu(i);return t4(b||i,function(g,v){b&&(v=g,g=i[v]),d1(l,v,Mu(g,o,t,r,v,i,s))}),l}function H4(i){return Id(i)?l4(i):{}}function F4(i,o,t){var r=o(i);return Ou(i)?r:e4(r,t(i))}function B4(i){return Ld.call(i)}function V4(i){if(!Id(i)||a8(i))return!1;var o=g1(i)||l1(i)?a4:W5;return o.test(ua(i))}function U4(i){if(!u1(i))return h4(i);var o=[];for(var t in Object(i))bi.call(i,t)&&t!="constructor"&&o.push(t);return o}function j4(i,o){if(o)return i.slice();var t=new i.constructor(i.length);return i.copy(t),t}function Ru(i){var o=new i.constructor(i.byteLength);return new R0(o).set(new R0(i)),o}function G4(i,o){var t=o?Ru(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.byteLength)}function W4(i,o,t){var r=o?t(M0(i),!0):M0(i);return s1(r,J5,new i.constructor)}function K4(i){var o=new i.constructor(i.source,G5.exec(i));return o.lastIndex=i.lastIndex,o}function Y4(i,o,t){var r=o?t(q0(i),!0):q0(i);return s1(r,Z5,new i.constructor)}function X4(i){return H0?Object(H0.call(i)):{}}function Q4(i,o){var t=o?Ru(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.length)}function J4(i,o){var t=-1,r=i.length;for(o||(o=Array(r));++t<r;)o[t]=i[t];return o}function p1(i,o,t,r){t||(t={});for(var n=-1,a=o.length;++n<a;){var s=o[n],l=r?r(t[s],i[s],s,t,i):void 0;d1(t,s,l===void 0?i[s]:l)}return t}function Z4(i,o){return p1(i,h1(i),o)}function t8(i){return F4(i,Pu,h1)}function qd(i,o){var t=i.__data__;return i8(o)?t[typeof o=="string"?"string":"hash"]:t.map}function os(i,o){var t=o4(i,o);return V4(t)?t:void 0}var h1=O0?Nu(O0,Object):u8,pa=B4;(Tu&&pa(new Tu(new ArrayBuffer(1)))!=$d||kl&&pa(new kl)!=Ed||$u&&pa($u.resolve())!=A0||Au&&pa(new Au)!=Td||Lu&&pa(new Lu)!=Eu)&&(pa=function(i){var o=Ld.call(i),t=o==Du?i.constructor:void 0,r=t?ua(t):void 0;if(r)switch(r){case u4:return $d;case m4:return Ed;case f4:return A0;case g4:return Td;case b4:return Eu}return o});function e8(i){var o=i.length,t=i.constructor(o);return o&&typeof i[0]=="string"&&bi.call(i,"index")&&(t.index=i.index,t.input=i.input),t}function r8(i){return typeof i.constructor=="function"&&!u1(i)?H4(s4(i)):{}}function o8(i,o,t,r){var n=i.constructor;switch(o){case X0:return Ru(i);case V0:case U0:return new n(+i);case $d:return G4(i,r);case Q0:case J0:case Z0:case t1:case e1:case r1:case o1:case n1:case i1:return Q4(i,r);case Ed:return W4(i,r,t);case G0:case K0:return new n(i);case W0:return K4(i);case Td:return Y4(i,r,t);case Y0:return X4(i)}}function n8(i,o){return o=o??B0,!!o&&(typeof i=="number"||K5.test(i))&&i>-1&&i%1==0&&i<o}function i8(i){var o=typeof i;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?i!=="__proto__":i===null}function a8(i){return!!I0&&I0 in i}function u1(i){var o=i&&i.constructor,t=typeof o=="function"&&o.prototype||Ad;return i===t}function ua(i){if(i!=null){try{return c1.call(i)}catch{}try{return i+""}catch{}}return""}function s8(i){return Mu(i,!0,!0)}function m1(i,o){return i===o||i!==i&&o!==o}function l8(i){return c8(i)&&bi.call(i,"callee")&&(!c4.call(i,"callee")||Ld.call(i)==qu)}var Ou=Array.isArray;function f1(i){return i!=null&&p8(i.length)&&!g1(i)}function c8(i){return h8(i)&&f1(i)}var d8=p4||m8;function g1(i){var o=Id(i)?Ld.call(i):"";return o==Iu||o==j0}function p8(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=B0}function Id(i){var o=typeof i;return!!i&&(o=="object"||o=="function")}function h8(i){return!!i&&typeof i=="object"}function Pu(i){return f1(i)?O4(i):U4(i)}function u8(){return[]}function m8(){return!1}ts.exports=s8});var Ju=$n((Sl,is)=>{var f8=200,Qu="__lodash_hash_undefined__",Bd=1,T1=2,$1=9007199254740991,Dd="[object Arguments]",Uu="[object Array]",g8="[object AsyncFunction]",A1="[object Boolean]",L1="[object Date]",M1="[object Error]",q1="[object Function]",b8="[object GeneratorFunction]",Nd="[object Map]",I1="[object Number]",v8="[object Null]",ns="[object Object]",b1="[object Promise]",x8="[object Proxy]",D1="[object RegExp]",Rd="[object Set]",N1="[object String]",y8="[object Symbol]",z8="[object Undefined]",ju="[object WeakMap]",R1="[object ArrayBuffer]",Od="[object DataView]",w8="[object Float32Array]",_8="[object Float64Array]",k8="[object Int8Array]",C8="[object Int16Array]",S8="[object Int32Array]",E8="[object Uint8Array]",T8="[object Uint8ClampedArray]",$8="[object Uint16Array]",A8="[object Uint32Array]",L8=/[\\^$.*+?()[\]{}|]/g,M8=/^\[object .+?Constructor\]$/,q8=/^(?:0|[1-9]\d*)$/,Qt={};Qt[w8]=Qt[_8]=Qt[k8]=Qt[C8]=Qt[S8]=Qt[E8]=Qt[T8]=Qt[$8]=Qt[A8]=!0;Qt[Dd]=Qt[Uu]=Qt[R1]=Qt[A1]=Qt[Od]=Qt[L1]=Qt[M1]=Qt[q1]=Qt[Nd]=Qt[I1]=Qt[ns]=Qt[D1]=Qt[Rd]=Qt[N1]=Qt[ju]=!1;var O1=typeof global=="object"&&global&&global.Object===Object&&global,I8=typeof self=="object"&&self&&self.Object===Object&&self,Hn=O1||I8||Function("return this")(),P1=typeof Sl=="object"&&Sl&&!Sl.nodeType&&Sl,v1=P1&&typeof is=="object"&&is&&!is.nodeType&&is,H1=v1&&v1.exports===P1,Fu=H1&&O1.process,x1=(function(){try{return Fu&&Fu.binding&&Fu.binding("util")}catch{}})(),y1=x1&&x1.isTypedArray;function D8(i,o){for(var t=-1,r=i==null?0:i.length,n=0,a=[];++t<r;){var s=i[t];o(s,t,i)&&(a[n++]=s)}return a}function N8(i,o){for(var t=-1,r=o.length,n=i.length;++t<r;)i[n+t]=o[t];return i}function R8(i,o){for(var t=-1,r=i==null?0:i.length;++t<r;)if(o(i[t],t,i))return!0;return!1}function O8(i,o){for(var t=-1,r=Array(i);++t<i;)r[t]=o(t);return r}function P8(i){return function(o){return i(o)}}function H8(i,o){return i.has(o)}function F8(i,o){return i?.[o]}function B8(i){var o=-1,t=Array(i.size);return i.forEach(function(r,n){t[++o]=[n,r]}),t}function V8(i,o){return function(t){return i(o(t))}}function U8(i){var o=-1,t=Array(i.size);return i.forEach(function(r){t[++o]=r}),t}var j8=Array.prototype,G8=Function.prototype,Vd=Object.prototype,Bu=Hn["__core-js_shared__"],F1=G8.toString,bn=Vd.hasOwnProperty,z1=(function(){var i=/[^.]+$/.exec(Bu&&Bu.keys&&Bu.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),B1=Vd.toString,W8=RegExp("^"+F1.call(bn).replace(L8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),w1=H1?Hn.Buffer:void 0,Pd=Hn.Symbol,_1=Hn.Uint8Array,V1=Vd.propertyIsEnumerable,K8=j8.splice,ma=Pd?Pd.toStringTag:void 0,k1=Object.getOwnPropertySymbols,Y8=w1?w1.isBuffer:void 0,X8=V8(Object.keys,Object),Gu=as(Hn,"DataView"),El=as(Hn,"Map"),Wu=as(Hn,"Promise"),Ku=as(Hn,"Set"),Yu=as(Hn,"WeakMap"),Tl=as(Object,"create"),Q8=ba(Gu),J8=ba(El),Z8=ba(Wu),t6=ba(Ku),e6=ba(Yu),C1=Pd?Pd.prototype:void 0,Vu=C1?C1.valueOf:void 0;function fa(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function r6(){this.__data__=Tl?Tl(null):{},this.size=0}function o6(i){var o=this.has(i)&&delete this.__data__[i];return this.size-=o?1:0,o}function n6(i){var o=this.__data__;if(Tl){var t=o[i];return t===Qu?void 0:t}return bn.call(o,i)?o[i]:void 0}function i6(i){var o=this.__data__;return Tl?o[i]!==void 0:bn.call(o,i)}function a6(i,o){var t=this.__data__;return this.size+=this.has(i)?0:1,t[i]=Tl&&o===void 0?Qu:o,this}fa.prototype.clear=r6;fa.prototype.delete=o6;fa.prototype.get=n6;fa.prototype.has=i6;fa.prototype.set=a6;function Fn(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function s6(){this.__data__=[],this.size=0}function l6(i){var o=this.__data__,t=Ud(o,i);if(t<0)return!1;var r=o.length-1;return t==r?o.pop():K8.call(o,t,1),--this.size,!0}function c6(i){var o=this.__data__,t=Ud(o,i);return t<0?void 0:o[t][1]}function d6(i){return Ud(this.__data__,i)>-1}function p6(i,o){var t=this.__data__,r=Ud(t,i);return r<0?(++this.size,t.push([i,o])):t[r][1]=o,this}Fn.prototype.clear=s6;Fn.prototype.delete=l6;Fn.prototype.get=c6;Fn.prototype.has=d6;Fn.prototype.set=p6;function ga(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function h6(){this.size=0,this.__data__={hash:new fa,map:new(El||Fn),string:new fa}}function u6(i){var o=jd(this,i).delete(i);return this.size-=o?1:0,o}function m6(i){return jd(this,i).get(i)}function f6(i){return jd(this,i).has(i)}function g6(i,o){var t=jd(this,i),r=t.size;return t.set(i,o),this.size+=t.size==r?0:1,this}ga.prototype.clear=h6;ga.prototype.delete=u6;ga.prototype.get=m6;ga.prototype.has=f6;ga.prototype.set=g6;function Hd(i){var o=-1,t=i==null?0:i.length;for(this.__data__=new ga;++o<t;)this.add(i[o])}function b6(i){return this.__data__.set(i,Qu),this}function v6(i){return this.__data__.has(i)}Hd.prototype.add=Hd.prototype.push=b6;Hd.prototype.has=v6;function xi(i){var o=this.__data__=new Fn(i);this.size=o.size}function x6(){this.__data__=new Fn,this.size=0}function y6(i){var o=this.__data__,t=o.delete(i);return this.size=o.size,t}function z6(i){return this.__data__.get(i)}function w6(i){return this.__data__.has(i)}function _6(i,o){var t=this.__data__;if(t instanceof Fn){var r=t.__data__;if(!El||r.length<f8-1)return r.push([i,o]),this.size=++t.size,this;t=this.__data__=new ga(r)}return t.set(i,o),this.size=t.size,this}xi.prototype.clear=x6;xi.prototype.delete=y6;xi.prototype.get=z6;xi.prototype.has=w6;xi.prototype.set=_6;function k6(i,o){var t=Fd(i),r=!t&&P6(i),n=!t&&!r&&Xu(i),a=!t&&!r&&!n&&X1(i),s=t||r||n||a,l=s?O8(i.length,String):[],d=l.length;for(var h in i)(o||bn.call(i,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||I6(h,d)))&&l.push(h);return l}function Ud(i,o){for(var t=i.length;t--;)if(G1(i[t][0],o))return t;return-1}function C6(i,o,t){var r=o(i);return Fd(i)?r:N8(r,t(i))}function Al(i){return i==null?i===void 0?z8:v8:ma&&ma in Object(i)?M6(i):O6(i)}function S1(i){return $l(i)&&Al(i)==Dd}function U1(i,o,t,r,n){return i===o?!0:i==null||o==null||!$l(i)&&!$l(o)?i!==i&&o!==o:S6(i,o,t,r,U1,n)}function S6(i,o,t,r,n,a){var s=Fd(i),l=Fd(o),d=s?Uu:vi(i),h=l?Uu:vi(o);d=d==Dd?ns:d,h=h==Dd?ns:h;var m=d==ns,f=h==ns,b=d==h;if(b&&Xu(i)){if(!Xu(o))return!1;s=!0,m=!1}if(b&&!m)return a||(a=new xi),s||X1(i)?j1(i,o,t,r,n,a):A6(i,o,d,t,r,n,a);if(!(t&Bd)){var g=m&&bn.call(i,"__wrapped__"),v=f&&bn.call(o,"__wrapped__");if(g||v){var x=g?i.value():i,_=v?o.value():o;return a||(a=new xi),n(x,_,t,r,a)}}return b?(a||(a=new xi),L6(i,o,t,r,n,a)):!1}function E6(i){if(!Y1(i)||N6(i))return!1;var o=W1(i)?W8:M8;return o.test(ba(i))}function T6(i){return $l(i)&&K1(i.length)&&!!Qt[Al(i)]}function $6(i){if(!R6(i))return X8(i);var o=[];for(var t in Object(i))bn.call(i,t)&&t!="constructor"&&o.push(t);return o}function j1(i,o,t,r,n,a){var s=t&Bd,l=i.length,d=o.length;if(l!=d&&!(s&&d>l))return!1;var h=a.get(i);if(h&&a.get(o))return h==o;var m=-1,f=!0,b=t&T1?new Hd:void 0;for(a.set(i,o),a.set(o,i);++m<l;){var g=i[m],v=o[m];if(r)var x=s?r(v,g,m,o,i,a):r(g,v,m,i,o,a);if(x!==void 0){if(x)continue;f=!1;break}if(b){if(!R8(o,function(_,k){if(!H8(b,k)&&(g===_||n(g,_,t,r,a)))return b.push(k)})){f=!1;break}}else if(!(g===v||n(g,v,t,r,a))){f=!1;break}}return a.delete(i),a.delete(o),f}function A6(i,o,t,r,n,a,s){switch(t){case Od:if(i.byteLength!=o.byteLength||i.byteOffset!=o.byteOffset)return!1;i=i.buffer,o=o.buffer;case R1:return!(i.byteLength!=o.byteLength||!a(new _1(i),new _1(o)));case A1:case L1:case I1:return G1(+i,+o);case M1:return i.name==o.name&&i.message==o.message;case D1:case N1:return i==o+"";case Nd:var l=B8;case Rd:var d=r&Bd;if(l||(l=U8),i.size!=o.size&&!d)return!1;var h=s.get(i);if(h)return h==o;r|=T1,s.set(i,o);var m=j1(l(i),l(o),r,n,a,s);return s.delete(i),m;case y8:if(Vu)return Vu.call(i)==Vu.call(o)}return!1}function L6(i,o,t,r,n,a){var s=t&Bd,l=E1(i),d=l.length,h=E1(o),m=h.length;if(d!=m&&!s)return!1;for(var f=d;f--;){var b=l[f];if(!(s?b in o:bn.call(o,b)))return!1}var g=a.get(i);if(g&&a.get(o))return g==o;var v=!0;a.set(i,o),a.set(o,i);for(var x=s;++f<d;){b=l[f];var _=i[b],k=o[b];if(r)var N=s?r(k,_,b,o,i,a):r(_,k,b,i,o,a);if(!(N===void 0?_===k||n(_,k,t,r,a):N)){v=!1;break}x||(x=b=="constructor")}if(v&&!x){var G=i.constructor,I=o.constructor;G!=I&&"constructor"in i&&"constructor"in o&&!(typeof G=="function"&&G instanceof G&&typeof I=="function"&&I instanceof I)&&(v=!1)}return a.delete(i),a.delete(o),v}function E1(i){return C6(i,B6,q6)}function jd(i,o){var t=i.__data__;return D6(o)?t[typeof o=="string"?"string":"hash"]:t.map}function as(i,o){var t=F8(i,o);return E6(t)?t:void 0}function M6(i){var o=bn.call(i,ma),t=i[ma];try{i[ma]=void 0;var r=!0}catch{}var n=B1.call(i);return r&&(o?i[ma]=t:delete i[ma]),n}var q6=k1?function(i){return i==null?[]:(i=Object(i),D8(k1(i),function(o){return V1.call(i,o)}))}:V6,vi=Al;(Gu&&vi(new Gu(new ArrayBuffer(1)))!=Od||El&&vi(new El)!=Nd||Wu&&vi(Wu.resolve())!=b1||Ku&&vi(new Ku)!=Rd||Yu&&vi(new Yu)!=ju)&&(vi=function(i){var o=Al(i),t=o==ns?i.constructor:void 0,r=t?ba(t):"";if(r)switch(r){case Q8:return Od;case J8:return Nd;case Z8:return b1;case t6:return Rd;case e6:return ju}return o});function I6(i,o){return o=o??$1,!!o&&(typeof i=="number"||q8.test(i))&&i>-1&&i%1==0&&i<o}function D6(i){var o=typeof i;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?i!=="__proto__":i===null}function N6(i){return!!z1&&z1 in i}function R6(i){var o=i&&i.constructor,t=typeof o=="function"&&o.prototype||Vd;return i===t}function O6(i){return B1.call(i)}function ba(i){if(i!=null){try{return F1.call(i)}catch{}try{return i+""}catch{}}return""}function G1(i,o){return i===o||i!==i&&o!==o}var P6=S1((function(){return arguments})())?S1:function(i){return $l(i)&&bn.call(i,"callee")&&!V1.call(i,"callee")},Fd=Array.isArray;function H6(i){return i!=null&&K1(i.length)&&!W1(i)}var Xu=Y8||U6;function F6(i,o){return U1(i,o)}function W1(i){if(!Y1(i))return!1;var o=Al(i);return o==q1||o==b8||o==g8||o==x8}function K1(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=$1}function Y1(i){var o=typeof i;return i!=null&&(o=="object"||o=="function")}function $l(i){return i!=null&&typeof i=="object"}var X1=y1?P8(y1):T6;function B6(i){return H6(i)?k6(i):$6(i)}function V6(){return[]}function U6(){return!1}is.exports=F6});var Q1=$n(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});var j6=Hu(),G6=Ju(),Zu;(function(i){function o(a={},s={},l=!1){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let d=j6(s);l||(d=Object.keys(d).reduce((h,m)=>(d[m]!=null&&(h[m]=d[m]),h),{}));for(let h in a)a[h]!==void 0&&s[h]===void 0&&(d[h]=a[h]);return Object.keys(d).length>0?d:void 0}i.compose=o;function t(a={},s={}){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let l=Object.keys(a).concat(Object.keys(s)).reduce((d,h)=>(G6(a[h],s[h])||(d[h]=s[h]===void 0?null:s[h]),d),{});return Object.keys(l).length>0?l:void 0}i.diff=t;function r(a={},s={}){a=a||{};let l=Object.keys(s).reduce((d,h)=>(s[h]!==a[h]&&a[h]!==void 0&&(d[h]=s[h]),d),{});return Object.keys(a).reduce((d,h)=>(a[h]!==s[h]&&s[h]===void 0&&(d[h]=null),d),l)}i.invert=r;function n(a,s,l=!1){if(typeof a!="object")return s;if(typeof s!="object")return;if(!l)return s;let d=Object.keys(s).reduce((h,m)=>(a[m]===void 0&&(h[m]=s[m]),h),{});return Object.keys(d).length>0?d:void 0}i.transform=n})(Zu||(Zu={}));tm.default=Zu});var om=$n(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});var em;(function(i){function o(t){return typeof t.delete=="number"?t.delete:typeof t.retain=="number"?t.retain:typeof t.retain=="object"&&t.retain!==null?1:typeof t.insert=="string"?t.insert.length:1}i.length=o})(em||(em={}));rm.default=em});var Z1=$n(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});var J1=om(),nm=class{constructor(o){this.ops=o,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(o){o||(o=1/0);let t=this.ops[this.index];if(t){let r=this.offset,n=J1.default.length(t);if(o>=n-r?(o=n-r,this.index+=1,this.offset=0):this.offset+=o,typeof t.delete=="number")return{delete:o};{let a={};return t.attributes&&(a.attributes=t.attributes),typeof t.retain=="number"?a.retain=o:typeof t.retain=="object"&&t.retain!==null?a.retain=t.retain:typeof t.insert=="string"?a.insert=t.insert.substr(r,o):a.insert=t.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?J1.default.length(this.ops[this.index])-this.offset:1/0}peekType(){let o=this.ops[this.index];return o?typeof o.delete=="number"?"delete":typeof o.retain=="number"||typeof o.retain=="object"&&o.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{let o=this.offset,t=this.index,r=this.next(),n=this.ops.slice(this.index);return this.offset=o,this.index=t,[r].concat(n)}}else return[]}};im.default=nm});var Ur=$n((Vn,Wd)=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.AttributeMap=Vn.OpIterator=Vn.Op=void 0;var Gd=$0(),W6=Hu(),am=Ju(),va=Q1();Vn.AttributeMap=va.default;var Bn=om();Vn.Op=Bn.default;var wo=Z1();Vn.OpIterator=wo.default;var K6="\0",tx=(i,o)=>{if(typeof i!="object"||i===null)throw new Error(`cannot retain a ${typeof i}`);if(typeof o!="object"||o===null)throw new Error(`cannot retain a ${typeof o}`);let t=Object.keys(i)[0];if(!t||t!==Object.keys(o)[0])throw new Error(`embed types not matched: ${t} != ${Object.keys(o)[0]}`);return[t,i[t],o[t]]},Un=class i{constructor(o){Array.isArray(o)?this.ops=o:o!=null&&Array.isArray(o.ops)?this.ops=o.ops:this.ops=[]}static registerEmbed(o,t){this.handlers[o]=t}static unregisterEmbed(o){delete this.handlers[o]}static getHandler(o){let t=this.handlers[o];if(!t)throw new Error(`no handlers for embed type "${o}"`);return t}insert(o,t){let r={};return typeof o=="string"&&o.length===0?this:(r.insert=o,t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r))}delete(o){return o<=0?this:this.push({delete:o})}retain(o,t){if(typeof o=="number"&&o<=0)return this;let r={retain:o};return t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r)}push(o){let t=this.ops.length,r=this.ops[t-1];if(o=W6(o),typeof r=="object"){if(typeof o.delete=="number"&&typeof r.delete=="number")return this.ops[t-1]={delete:r.delete+o.delete},this;if(typeof r.delete=="number"&&o.insert!=null&&(t-=1,r=this.ops[t-1],typeof r!="object"))return this.ops.unshift(o),this;if(am(o.attributes,r.attributes)){if(typeof o.insert=="string"&&typeof r.insert=="string")return this.ops[t-1]={insert:r.insert+o.insert},typeof o.attributes=="object"&&(this.ops[t-1].attributes=o.attributes),this;if(typeof o.retain=="number"&&typeof r.retain=="number")return this.ops[t-1]={retain:r.retain+o.retain},typeof o.attributes=="object"&&(this.ops[t-1].attributes=o.attributes),this}}return t===this.ops.length?this.ops.push(o):this.ops.splice(t,0,o),this}chop(){let o=this.ops[this.ops.length-1];return o&&typeof o.retain=="number"&&!o.attributes&&this.ops.pop(),this}filter(o){return this.ops.filter(o)}forEach(o){this.ops.forEach(o)}map(o){return this.ops.map(o)}partition(o){let t=[],r=[];return this.forEach(n=>{(o(n)?t:r).push(n)}),[t,r]}reduce(o,t){return this.ops.reduce(o,t)}changeLength(){return this.reduce((o,t)=>t.insert?o+Bn.default.length(t):t.delete?o-t.delete:o,0)}length(){return this.reduce((o,t)=>o+Bn.default.length(t),0)}slice(o=0,t=1/0){let r=[],n=new wo.default(this.ops),a=0;for(;a<t&&n.hasNext();){let s;a<o?s=n.next(o-a):(s=n.next(t-a),r.push(s)),a+=Bn.default.length(s)}return new i(r)}compose(o){let t=new wo.default(this.ops),r=new wo.default(o.ops),n=[],a=r.peek();if(a!=null&&typeof a.retain=="number"&&a.attributes==null){let l=a.retain;for(;t.peekType()==="insert"&&t.peekLength()<=l;)l-=t.peekLength(),n.push(t.next());a.retain-l>0&&r.next(a.retain-l)}let s=new i(n);for(;t.hasNext()||r.hasNext();)if(r.peekType()==="insert")s.push(r.next());else if(t.peekType()==="delete")s.push(t.next());else{let l=Math.min(t.peekLength(),r.peekLength()),d=t.next(l),h=r.next(l);if(h.retain){let m={};if(typeof d.retain=="number")m.retain=typeof h.retain=="number"?l:h.retain;else if(typeof h.retain=="number")d.retain==null?m.insert=d.insert:m.retain=d.retain;else{let b=d.retain==null?"insert":"retain",[g,v,x]=tx(d[b],h.retain),_=i.getHandler(g);m[b]={[g]:_.compose(v,x,b==="retain")}}let f=va.default.compose(d.attributes,h.attributes,typeof d.retain=="number");if(f&&(m.attributes=f),s.push(m),!r.hasNext()&&am(s.ops[s.ops.length-1],m)){let b=new i(t.rest());return s.concat(b).chop()}}else typeof h.delete=="number"&&(typeof d.retain=="number"||typeof d.retain=="object"&&d.retain!==null)&&s.push(h)}return s.chop()}concat(o){let t=new i(this.ops.slice());return o.ops.length>0&&(t.push(o.ops[0]),t.ops=t.ops.concat(o.ops.slice(1))),t}diff(o,t){if(this.ops===o.ops)return new i;let r=[this,o].map(d=>d.map(h=>{if(h.insert!=null)return typeof h.insert=="string"?h.insert:K6;let m=d===o?"on":"with";throw new Error("diff() called "+m+" non-document")}).join("")),n=new i,a=Gd(r[0],r[1],t,!0),s=new wo.default(this.ops),l=new wo.default(o.ops);return a.forEach(d=>{let h=d[1].length;for(;h>0;){let m=0;switch(d[0]){case Gd.INSERT:m=Math.min(l.peekLength(),h),n.push(l.next(m));break;case Gd.DELETE:m=Math.min(h,s.peekLength()),s.next(m),n.delete(m);break;case Gd.EQUAL:m=Math.min(s.peekLength(),l.peekLength(),h);let f=s.next(m),b=l.next(m);am(f.insert,b.insert)?n.retain(m,va.default.diff(f.attributes,b.attributes)):n.push(b).delete(m);break}h-=m}}),n.chop()}eachLine(o,t=`
|
|
2
|
+
`){let r=new wo.default(this.ops),n=new i,a=0;for(;r.hasNext();){if(r.peekType()!=="insert")return;let s=r.peek(),l=Bn.default.length(s)-r.peekLength(),d=typeof s.insert=="string"?s.insert.indexOf(t,l)-l:-1;if(d<0)n.push(r.next());else if(d>0)n.push(r.next(d));else{if(o(n,r.next(1).attributes||{},a)===!1)return;a+=1,n=new i}}n.length()>0&&o(n,{},a)}invert(o){let t=new i;return this.reduce((r,n)=>{if(n.insert)t.delete(Bn.default.length(n));else{if(typeof n.retain=="number"&&n.attributes==null)return t.retain(n.retain),r+n.retain;if(n.delete||typeof n.retain=="number"){let a=n.delete||n.retain;return o.slice(r,r+a).forEach(l=>{n.delete?t.push(l):n.retain&&n.attributes&&t.retain(Bn.default.length(l),va.default.invert(n.attributes,l.attributes))}),r+a}else if(typeof n.retain=="object"&&n.retain!==null){let a=o.slice(r,r+1),s=new wo.default(a.ops).next(),[l,d,h]=tx(n.retain,s.insert),m=i.getHandler(l);return t.retain({[l]:m.invert(d,h)},va.default.invert(n.attributes,s.attributes)),r+1}}return r},0),t.chop()}transform(o,t=!1){if(t=!!t,typeof o=="number")return this.transformPosition(o,t);let r=o,n=new wo.default(this.ops),a=new wo.default(r.ops),s=new i;for(;n.hasNext()||a.hasNext();)if(n.peekType()==="insert"&&(t||a.peekType()!=="insert"))s.retain(Bn.default.length(n.next()));else if(a.peekType()==="insert")s.push(a.next());else{let l=Math.min(n.peekLength(),a.peekLength()),d=n.next(l),h=a.next(l);if(d.delete)continue;if(h.delete)s.push(h);else{let m=d.retain,f=h.retain,b=typeof f=="object"&&f!==null?f:l;if(typeof m=="object"&&m!==null&&typeof f=="object"&&f!==null){let g=Object.keys(m)[0];if(g===Object.keys(f)[0]){let v=i.getHandler(g);v&&(b={[g]:v.transform(m[g],f[g],t)})}}s.retain(b,va.default.transform(d.attributes,h.attributes,t))}}return s.chop()}transformPosition(o,t=!1){t=!!t;let r=new wo.default(this.ops),n=0;for(;r.hasNext()&&n<=o;){let a=r.peekLength(),s=r.peekType();if(r.next(),s==="delete"){o-=Math.min(a,o-n);continue}else s==="insert"&&(n<o||!t)&&(o+=a);n+=a}return o}};Un.Op=Bn.default;Un.OpIterator=wo.default;Un.AttributeMap=va.default;Un.handlers={};Vn.default=Un;typeof Wd=="object"&&(Wd.exports=Un,Wd.exports.default=Un)});var gz=$n((blt,Cm)=>{"use strict";var AT=Object.prototype.hasOwnProperty,Mr="~";function Fl(){}Object.create&&(Fl.prototype=Object.create(null),new Fl().__proto__||(Mr=!1));function LT(i,o,t){this.fn=i,this.context=o,this.once=t||!1}function fz(i,o,t,r,n){if(typeof t!="function")throw new TypeError("The listener must be a function");var a=new LT(t,r||i,n),s=Mr?Mr+o:o;return i._events[s]?i._events[s].fn?i._events[s]=[i._events[s],a]:i._events[s].push(a):(i._events[s]=a,i._eventsCount++),i}function yp(i,o){--i._eventsCount===0?i._events=new Fl:delete i._events[o]}function wr(){this._events=new Fl,this._eventsCount=0}wr.prototype.eventNames=function(){var o=[],t,r;if(this._eventsCount===0)return o;for(r in t=this._events)AT.call(t,r)&&o.push(Mr?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(t)):o};wr.prototype.listeners=function(o){var t=Mr?Mr+o:o,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,a=r.length,s=new Array(a);n<a;n++)s[n]=r[n].fn;return s};wr.prototype.listenerCount=function(o){var t=Mr?Mr+o:o,r=this._events[t];return r?r.fn?1:r.length:0};wr.prototype.emit=function(o,t,r,n,a,s){var l=Mr?Mr+o:o;if(!this._events[l])return!1;var d=this._events[l],h=arguments.length,m,f;if(d.fn){switch(d.once&&this.removeListener(o,d.fn,void 0,!0),h){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,r),!0;case 4:return d.fn.call(d.context,t,r,n),!0;case 5:return d.fn.call(d.context,t,r,n,a),!0;case 6:return d.fn.call(d.context,t,r,n,a,s),!0}for(f=1,m=new Array(h-1);f<h;f++)m[f-1]=arguments[f];d.fn.apply(d.context,m)}else{var b=d.length,g;for(f=0;f<b;f++)switch(d[f].once&&this.removeListener(o,d[f].fn,void 0,!0),h){case 1:d[f].fn.call(d[f].context);break;case 2:d[f].fn.call(d[f].context,t);break;case 3:d[f].fn.call(d[f].context,t,r);break;case 4:d[f].fn.call(d[f].context,t,r,n);break;default:if(!m)for(g=1,m=new Array(h-1);g<h;g++)m[g-1]=arguments[g];d[f].fn.apply(d[f].context,m)}}return!0};wr.prototype.on=function(o,t,r){return fz(this,o,t,r,!1)};wr.prototype.once=function(o,t,r){return fz(this,o,t,r,!0)};wr.prototype.removeListener=function(o,t,r,n){var a=Mr?Mr+o:o;if(!this._events[a])return this;if(!t)return yp(this,a),this;var s=this._events[a];if(s.fn)s.fn===t&&(!n||s.once)&&(!r||s.context===r)&&yp(this,a);else{for(var l=0,d=[],h=s.length;l<h;l++)(s[l].fn!==t||n&&!s[l].once||r&&s[l].context!==r)&&d.push(s[l]);d.length?this._events[a]=d.length===1?d[0]:d:yp(this,a)}return this};wr.prototype.removeAllListeners=function(o){var t;return o?(t=Mr?Mr+o:o,this._events[t]&&yp(this,t)):(this._events=new Fl,this._eventsCount=0),this};wr.prototype.off=wr.prototype.removeListener;wr.prototype.addListener=wr.prototype.on;wr.prefixed=Mr;wr.EventEmitter=wr;typeof Cm<"u"&&(Cm.exports=wr)});var uf=$n((mc,hf)=>{(function(i,o){typeof mc=="object"&&typeof hf=="object"?hf.exports=o():typeof define=="function"&&define.amd?define([],o):typeof mc=="object"?mc.AirDatepicker=o():i.AirDatepicker=o()})(mc,(function(){return(function(){"use strict";var i={d:function(R,y){for(var S in y)i.o(y,S)&&!i.o(R,S)&&Object.defineProperty(R,S,{enumerable:!0,get:y[S]})},o:function(R,y){return Object.prototype.hasOwnProperty.call(R,y)}},o={};i.d(o,{default:function(){return it}});var t={days:"days",months:"months",years:"years",day:"day",month:"month",year:"year",eventChangeViewDate:"changeViewDate",eventChangeCurrentView:"changeCurrentView",eventChangeFocusDate:"changeFocusDate",eventChangeSelectedDate:"changeSelectedDate",eventChangeTime:"changeTime",eventChangeLastSelectedDate:"changeLastSelectedDate",actionSelectDate:"selectDate",actionUnselectDate:"unselectDate",cssClassWeekend:"-weekend-"},r={classes:"",inline:!1,locale:{days:["\u0412\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435","\u041F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A","\u0412\u0442\u043E\u0440\u043D\u0438\u043A","\u0421\u0440\u0435\u0434\u0430","\u0427\u0435\u0442\u0432\u0435\u0440\u0433","\u041F\u044F\u0442\u043D\u0438\u0446\u0430","\u0421\u0443\u0431\u0431\u043E\u0442\u0430"],daysShort:["\u0412\u043E\u0441","\u041F\u043E\u043D","\u0412\u0442\u043E","\u0421\u0440\u0435","\u0427\u0435\u0442","\u041F\u044F\u0442","\u0421\u0443\u0431"],daysMin:["\u0412\u0441","\u041F\u043D","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041F\u0442","\u0421\u0431"],months:["\u042F\u043D\u0432\u0430\u0440\u044C","\u0424\u0435\u0432\u0440\u0430\u043B\u044C","\u041C\u0430\u0440\u0442","\u0410\u043F\u0440\u0435\u043B\u044C","\u041C\u0430\u0439","\u0418\u044E\u043D\u044C","\u0418\u044E\u043B\u044C","\u0410\u0432\u0433\u0443\u0441\u0442","\u0421\u0435\u043D\u0442\u044F\u0431\u0440\u044C","\u041E\u043A\u0442\u044F\u0431\u0440\u044C","\u041D\u043E\u044F\u0431\u0440\u044C","\u0414\u0435\u043A\u0430\u0431\u0440\u044C"],monthsShort:["\u042F\u043D\u0432","\u0424\u0435\u0432","\u041C\u0430\u0440","\u0410\u043F\u0440","\u041C\u0430\u0439","\u0418\u044E\u043D","\u0418\u044E\u043B","\u0410\u0432\u0433","\u0421\u0435\u043D","\u041E\u043A\u0442","\u041D\u043E\u044F","\u0414\u0435\u043A"],today:"\u0421\u0435\u0433\u043E\u0434\u043D\u044F",clear:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",dateFormat:"dd.MM.yyyy",timeFormat:"HH:mm",firstDay:1},startDate:new Date,firstDay:"",weekends:[6,0],dateFormat:"",altField:"",altFieldDateFormat:"T",toggleSelected:!0,keyboardNav:!0,selectedDates:!1,container:"",isMobile:!1,visible:!1,position:"bottom left",offset:12,view:t.days,minView:t.days,showOtherMonths:!0,selectOtherMonths:!0,moveToOtherMonthsOnSelect:!0,showOtherYears:!0,selectOtherYears:!0,moveToOtherYearsOnSelect:!0,minDate:"",maxDate:"",disableNavWhenOutOfRange:!0,multipleDates:!1,multipleDatesSeparator:", ",range:!1,dynamicRange:!0,buttons:!1,monthsField:"monthsShort",showEvent:"focus",autoClose:!1,fixedHeight:!1,prevHtml:'<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',nextHtml:'<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',navTitles:{days:"MMMM, <i>yyyy</i>",months:"yyyy",years:"yyyy1 - yyyy2"},timepicker:!1,onlyTimepicker:!1,dateTimeSeparator:" ",timeFormat:"",minHours:0,maxHours:24,minMinutes:0,maxMinutes:59,hoursStep:1,minutesStep:1,onSelect:!1,onChangeViewDate:!1,onChangeView:!1,onRenderCell:!1,onShow:!1,onHide:!1,onClickDayName:!1};function n(R){let y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document;return typeof R=="string"?y.querySelector(R):R}function a(){let{tagName:R="div",className:y="",innerHtml:S="",id:z="",attrs:q={}}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=document.createElement(R);return y&&M.classList.add(...y.split(" ")),z&&(M.id=z),S&&(M.innerHTML=S),q&&s(M,q),M}function s(R,y){for(let[S,z]of Object.entries(y))z!==void 0&&R.setAttribute(S,z);return R}function l(R){return new Date(R.getFullYear(),R.getMonth()+1,0).getDate()}function d(R){let y=R.getHours(),{hours:S,dayPeriod:z}=h(y);return{year:R.getFullYear(),month:R.getMonth(),fullMonth:R.getMonth()+1<10?"0"+(R.getMonth()+1):R.getMonth()+1,date:R.getDate(),fullDate:R.getDate()<10?"0"+R.getDate():R.getDate(),day:R.getDay(),hours:y,fullHours:m(y),hours12:S,dayPeriod:z,fullHours12:m(S),minutes:R.getMinutes(),fullMinutes:R.getMinutes()<10?"0"+R.getMinutes():R.getMinutes()}}function h(R){return{dayPeriod:R>11?"pm":"am",hours:R%12==0?12:R%12}}function m(R){return R<10?"0"+R:R}function f(R){let y=10*Math.floor(R.getFullYear()/10);return[y,y+9]}function b(){let R=[];for(var y=arguments.length,S=new Array(y),z=0;z<y;z++)S[z]=arguments[z];return S.forEach((q=>{if(typeof q=="object")for(let M in q)q[M]&&R.push(M);else q&&R.push(q)})),R.join(" ")}function g(R,y){let S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.days;if(!R||!y)return!1;let z=d(R),q=d(y);return{[t.days]:z.date===q.date&&z.month===q.month&&z.year===q.year,[t.months]:z.month===q.month&&z.year===q.year,[t.years]:z.year===q.year}[S]}function v(R,y,S){let z=_(R,!1).getTime(),q=_(y,!1).getTime();return S?z>=q:z>q}function x(R,y){return!v(R,y,!0)}function _(R){let y=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],S=new Date(R.getTime());return typeof y!="boolean"||y||(function(z){z.setHours(0,0,0,0)})(S),S}function k(R,y,S){R.length?R.forEach((z=>{z.addEventListener(y,S)})):R.addEventListener(y,S)}function N(R,y){return!(!R||R===document||R instanceof DocumentFragment)&&(R.matches(y)?R:N(R.parentNode,y))}function G(R,y,S){return R>S?S:R<y?y:R}function I(R){for(var y=arguments.length,S=new Array(y>1?y-1:0),z=1;z<y;z++)S[z-1]=arguments[z];return S.filter((q=>q)).forEach((q=>{for(let[M,A]of Object.entries(q))if(A!==void 0&&A.toString()==="[object Object]"){let P=R[M]!==void 0?R[M].toString():void 0,U=A.toString(),Y=Array.isArray(A)?[]:{};R[M]=R[M]?P!==U?Y:R[M]:Y,I(R[M],A)}else R[M]=A})),R}function w(R){let y=R;return R instanceof Date||(typeof R=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(R)&&(R+="T00:00:00"),y=new Date(R)),isNaN(y.getTime())&&(console.log(`Unable to convert value "${R}" to Date object`),y=!1),y}function $(R){let y="\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";return new RegExp("(^|>|"+y+")("+R+")($|<|"+y+")","g")}function L(R,y,S){return(y=(function(z){var q=(function(M,A){if(typeof M!="object"||M===null)return M;var P=M[Symbol.toPrimitive];if(P!==void 0){var U=P.call(M,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)})(z);return typeof q=="symbol"?q:String(q)})(y))in R?Object.defineProperty(R,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):R[y]=S,R}class W{constructor(){let{type:y,date:S,dp:z,opts:q,body:M}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};L(this,"focus",(()=>{this.$cell.classList.add("-focus-"),this.focused=!0})),L(this,"removeFocus",(()=>{this.$cell.classList.remove("-focus-"),this.focused=!1})),L(this,"select",(()=>{this.$cell.classList.add("-selected-"),this.selected=!0})),L(this,"removeSelect",(()=>{this.$cell.classList.remove("-selected-","-range-from-","-range-to-"),this.selected=!1})),L(this,"onChangeSelectedDate",(()=>{this.isDisabled||(this._handleSelectedStatus(),this.opts.range&&this._handleRangeStatus())})),L(this,"onChangeFocusDate",(A=>{if(!A)return void(this.focused&&this.removeFocus());let P=g(A,this.date,this.type);P?this.focus():!P&&this.focused&&this.removeFocus(),this.opts.range&&this._handleRangeStatus()})),L(this,"render",(()=>(this.$cell.innerHTML=this._getHtml(),this._handleClasses(),this.$cell))),this.type=y,this.singleType=this.type.slice(0,-1),this.date=S,this.dp=z,this.opts=q,this.body=M,this.customData=!1,this.init()}init(){var y,S;let{onRenderCell:z}=this.opts;z&&(this.customData=z({date:this.date,cellType:this.singleType,datepicker:this.dp})),this._createElement(),this._bindDatepickerEvents(),(y=this.customData)!==null&&y!==void 0&&y.disabled?this.dp.disableDate(this.date):((S=this.customData)===null||S===void 0?void 0:S.disabled)===!1&&this.dp.enableDate(this.date)}_bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeFocusDate,this.onChangeFocusDate)}unbindDatepickerEvents(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeFocusDate,this.onChangeFocusDate)}_createElement(){var y;let{year:S,month:z,fullMonth:q,date:M,fullDate:A}=d(this.date),P=((y=this.customData)===null||y===void 0?void 0:y.attrs)||{};this.$cell=a({attrs:{"data-year":S,"data-month":z,"data-date":M,"data-iso-date":`${S}-${q}-${A}`,...P}}),this.$cell.adpCell=this}_getClassName(){var y;let S=new Date,{selectOtherMonths:z,selectOtherYears:q}=this.opts,{minDate:M,maxDate:A,isDateDisabled:P}=this.dp,{day:U}=d(this.date),Y=this._isOutOfMinMaxRange(),ot=P(this.date),et=b("air-datepicker-cell",`-${this.singleType}-`,{"-current-":g(S,this.date,this.type),"-min-date-":M&&g(M,this.date,this.type),"-max-date-":A&&g(A,this.date,this.type)}),at="";switch(this.type){case t.days:at=b({"-weekend-":this.dp.isWeekend(U),"-other-month-":this.isOtherMonth,"-disabled-":this.isOtherMonth&&!z||Y||ot});break;case t.months:at=b({"-disabled-":Y});break;case t.years:at=b({"-other-decade-":this.isOtherDecade,"-disabled-":Y||this.isOtherDecade&&!q})}return b(et,at,(y=this.customData)===null||y===void 0?void 0:y.classes).split(" ")}_getHtml(){var y;let{year:S,month:z,date:q}=d(this.date),{showOtherMonths:M,showOtherYears:A}=this.opts;if((y=this.customData)!==null&&y!==void 0&&y.html)return this.customData.html;switch(this.type){case t.days:return!M&&this.isOtherMonth?"":q;case t.months:return this.dp.locale[this.opts.monthsField][z];case t.years:return!A&&this.isOtherDecade?"":S}}_isOutOfMinMaxRange(){let{minDate:y,maxDate:S}=this.dp,{type:z,date:q}=this,{month:M,year:A,date:P}=d(q),U=z===t.days,Y=z===t.years,ot=!!y&&new Date(A,Y?y.getMonth():M,U?P:y.getDate()),et=!!S&&new Date(A,Y?S.getMonth():M,U?P:S.getDate());return y&&S?x(ot,y)||v(et,S):y?x(ot,y):S?v(et,S):void 0}destroy(){this.unbindDatepickerEvents()}_handleRangeStatus(){let{selectedDates:y,focusDate:S,rangeDateTo:z,rangeDateFrom:q}=this.dp,M=y.length;if(this.$cell.classList.remove("-range-from-","-range-to-","-in-range-"),!M)return;let A=q,P=z;if(M===1&&S){let at=v(S,y[0]);A=at?y[0]:S,P=at?S:y[0]}let U=b({"-in-range-":A&&P&&(Y=this.date,ot=A,et=P,v(Y,ot)&&x(Y,et)),"-range-from-":A&&g(this.date,A,this.type),"-range-to-":P&&g(this.date,P,this.type)});var Y,ot,et;U&&this.$cell.classList.add(...U.split(" "))}_handleSelectedStatus(){let y=this.dp._checkIfDateIsSelected(this.date,this.type);y?this.select():!y&&this.selected&&this.removeSelect()}_handleInitialFocusStatus(){g(this.dp.focusDate,this.date,this.type)&&this.focus()}_handleClasses(){this.$cell.setAttribute("class",""),this._handleInitialFocusStatus(),this.dp.hasSelectedDates&&(this._handleSelectedStatus(),this.dp.opts.range&&this._handleRangeStatus()),this.$cell.classList.add(...this._getClassName())}get isDisabled(){return this.$cell.matches(".-disabled-")}get isOtherMonth(){return this.dp.isOtherMonth(this.date)}get isOtherDecade(){return this.dp.isOtherDecade(this.date)}}function tt(R,y,S){return(y=(function(z){var q=(function(M,A){if(typeof M!="object"||M===null)return M;var P=M[Symbol.toPrimitive];if(P!==void 0){var U=P.call(M,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)})(z);return typeof q=="symbol"?q:String(q)})(y))in R?Object.defineProperty(R,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):R[y]=S,R}let ht={[t.days]:`<div class="air-datepicker-body--day-names"></div><div class="air-datepicker-body--cells -${t.days}-"></div>`,[t.months]:`<div class="air-datepicker-body--cells -${t.months}-"></div>`,[t.years]:`<div class="air-datepicker-body--cells -${t.years}-"></div>`},gt=".air-datepicker-cell";class _t{constructor(y){let{dp:S,type:z,opts:q}=y;tt(this,"handleClick",(M=>{let A=M.target.closest(gt).adpCell;if(A.isDisabled)return;if(!this.dp.isMinViewReached)return void this.dp.down();let P=this.dp._checkIfDateIsSelected(A.date,A.type);P?this.dp._handleAlreadySelectedDates(P,A.date):this.dp.selectDate(A.date)})),tt(this,"handleDayNameClick",(M=>{let A=M.target.getAttribute("data-day-index");this.opts.onClickDayName({dayIndex:Number(A),datepicker:this.dp})})),tt(this,"onChangeCurrentView",(M=>{M!==this.type?this.hide():(this.show(),this.render())})),tt(this,"onMouseOverCell",(M=>{let A=N(M.target,gt);this.dp.setFocusDate(!!A&&A.adpCell.date)})),tt(this,"onMouseOutCell",(()=>{this.dp.setFocusDate(!1)})),tt(this,"onClickBody",(M=>{let{onClickDayName:A}=this.opts,P=M.target;P.closest(gt)&&this.handleClick(M),A&&P.closest(".air-datepicker-body--day-name")&&this.handleDayNameClick(M)})),tt(this,"onMouseDown",(M=>{this.pressed=!0;let A=N(M.target,gt),P=A&&A.adpCell;g(P.date,this.dp.rangeDateFrom)&&(this.rangeFromFocused=!0),g(P.date,this.dp.rangeDateTo)&&(this.rangeToFocused=!0)})),tt(this,"onMouseMove",(M=>{if(!this.pressed||!this.dp.isMinViewReached)return;M.preventDefault();let A=N(M.target,gt),P=A&&A.adpCell,{selectedDates:U,rangeDateTo:Y,rangeDateFrom:ot}=this.dp;if(!P||P.isDisabled)return;let{date:et}=P;if(U.length===2){if(this.rangeFromFocused&&!v(et,Y)){let{hours:at,minutes:fe}=d(ot);et.setHours(at),et.setMinutes(fe),this.dp.rangeDateFrom=et,this.dp.replaceDate(ot,et)}if(this.rangeToFocused&&!x(et,ot)){let{hours:at,minutes:fe}=d(Y);et.setHours(at),et.setMinutes(fe),this.dp.rangeDateTo=et,this.dp.replaceDate(Y,et)}}})),tt(this,"onMouseUp",(()=>{this.pressed=!1,this.rangeFromFocused=!1,this.rangeToFocused=!1})),tt(this,"onChangeViewDate",((M,A)=>{if(!this.isVisible)return;let P=f(M),U=f(A);switch(this.dp.currentView){case t.days:if(g(M,A,t.months))return;break;case t.months:if(g(M,A,t.years))return;break;case t.years:if(P[0]===U[0]&&P[1]===U[1])return}this.render()})),tt(this,"render",(()=>{this.destroyCells(),this._generateCells(),this.cells.forEach((M=>{this.$cells.appendChild(M.render())}))})),this.dp=S,this.type=z,this.opts=q,this.cells=[],this.$el="",this.pressed=!1,this.isVisible=!0,this.init()}init(){this._buildBaseHtml(),this.type===t.days&&this.renderDayNames(),this.render(),this._bindEvents(),this._bindDatepickerEvents()}_bindEvents(){let{range:y,dynamicRange:S}=this.opts;k(this.$el,"mouseover",this.onMouseOverCell),k(this.$el,"mouseout",this.onMouseOutCell),k(this.$el,"click",this.onClickBody),y&&S&&(k(this.$el,"mousedown",this.onMouseDown),k(this.$el,"mousemove",this.onMouseMove),k(window.document,"mouseup",this.onMouseUp))}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView)}_buildBaseHtml(){this.$el=a({className:`air-datepicker-body -${this.type}-`,innerHtml:ht[this.type]}),this.$names=n(".air-datepicker-body--day-names",this.$el),this.$cells=n(".air-datepicker-body--cells",this.$el)}_getDayNamesHtml(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.dp.locale.firstDay,S="",z=this.dp.isWeekend,{onClickDayName:q}=this.opts,M=y,A=0;for(;A<7;){let P=M%7;S+=`<div class="${b("air-datepicker-body--day-name",{[t.cssClassWeekend]:z(P),"-clickable-":!!q})}" data-day-index='${P}'>${this.dp.locale.daysMin[P]}</div>`,A++,M++}return S}renderDayNames(){this.$names.innerHTML=this._getDayNamesHtml()}_generateCell(y){let{type:S,dp:z,opts:q}=this;return new W({type:S,dp:z,opts:q,date:y,body:this})}_generateCells(){_t.getDatesFunction(this.type)(this.dp,(y=>{this.cells.push(this._generateCell(y))}))}show(){this.isVisible=!0,this.$el.classList.remove("-hidden-")}hide(){this.isVisible=!1,this.$el.classList.add("-hidden-")}destroyCells(){this.cells.forEach((y=>y.destroy())),this.cells=[],this.$cells.innerHTML=""}destroy(){this.destroyCells(),this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView)}static getDaysDates(y,S){let{viewDate:z,opts:{fixedHeight:q},locale:{firstDay:M}}=y,A=l(z),{year:P,month:U}=d(z),Y=new Date(P,U,1),ot=new Date(P,U,A),et=Y.getDay()-M,at=6-ot.getDay()+M;et=et<0?et+7:et,at=at>6?at-7:at;let fe=(function(Wi,ph){let{year:$c,month:R_,date:O_}=d(Wi);return new Date($c,R_,O_-ph)})(Y,et),Pr=A+et+at,hr=fe.getDate(),{year:on,month:js}=d(fe),ji=0;q&&(Pr=42);let Gi=[];for(;ji<Pr;){let Wi=new Date(on,js,hr+ji);S&&S(Wi),Gi.push(Wi),ji++}return Gi}static getMonthsDates(y,S){let{year:z}=y.parsedViewDate,q=0,M=[];for(;q<12;){let A=new Date(z,q);M.push(A),S&&S(A),q++}return M}static getYearsDates(y,S){let z=f(y.viewDate),q=z[0]-1,M=z[1]+1,A=q,P=[];for(;A<=M;){let U=new Date(A,0);P.push(U),S&&S(U),A++}return P}static getDatesFunction(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return{[t.days]:_t.getDaysDates,[t.months]:_t.getMonthsDates,[t.years]:_t.getYearsDates}[y]}}function Rt(R,y,S){return(y=(function(z){var q=(function(M,A){if(typeof M!="object"||M===null)return M;var P=M[Symbol.toPrimitive];if(P!==void 0){var U=P.call(M,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)})(z);return typeof q=="symbol"?q:String(q)})(y))in R?Object.defineProperty(R,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):R[y]=S,R}class we{constructor(y){let{dp:S,opts:z}=y;Rt(this,"onClickNav",(q=>{let M=N(q.target,".air-datepicker-nav--action");if(!M)return;let A=M.dataset.action;this.dp[A]()})),Rt(this,"onChangeViewDate",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),Rt(this,"onChangeCurrentView",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),Rt(this,"onClickNavTitle",(()=>{this.dp.isFinalView||this.dp.up()})),Rt(this,"update",(()=>{let{prevHtml:q,nextHtml:M}=this.opts;this.$prev.innerHTML=q,this.$next.innerHTML=M,this._resetNavStatus(),this.render(),this.handleNavStatus()})),Rt(this,"renderDelay",(()=>{setTimeout(this.render)})),Rt(this,"render",(()=>{this.$title.innerHTML=this._getTitle(),(function(q,M){for(let A in M)M[A]?q.classList.add(A):q.classList.remove(A)})(this.$title,{"-disabled-":this.dp.isFinalView})})),this.dp=S,this.opts=z,this.init()}init(){this._createElement(),this._buildBaseHtml(),this._defineDOM(),this.render(),this.handleNavStatus(),this._bindEvents(),this._bindDatepickerEvents()}_defineDOM(){this.$title=n(".air-datepicker-nav--title",this.$el),this.$prev=n('[data-action="prev"]',this.$el),this.$next=n('[data-action="next"]',this.$el)}_bindEvents(){this.$el.addEventListener("click",this.onClickNav),this.$title.addEventListener("click",this.onClickNavTitle)}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.on(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.on(t.eventChangeTime,this.render))}destroy(){this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.off(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.off(t.eventChangeTime,this.render))}_createElement(){this.$el=a({tagName:"nav",className:"air-datepicker-nav"})}_getTitle(){let{dp:y,opts:S}=this,z=S.navTitles[y.currentView];return typeof z=="function"?z(y):y.formatDate(y.viewDate,z)}handleNavStatus(){let{disableNavWhenOutOfRange:y}=this.opts,{minDate:S,maxDate:z}=this.dp;if(!S&&!z||!y)return;let{year:q,month:M}=this.dp.parsedViewDate,A=!!S&&d(S),P=!!z&&d(z);switch(this.dp.currentView){case t.days:S&&A.month>=M&&A.year>=q&&this._disableNav("prev"),z&&P.month<=M&&P.year<=q&&this._disableNav("next");break;case t.months:S&&A.year>=q&&this._disableNav("prev"),z&&P.year<=q&&this._disableNav("next");break;case t.years:{let U=f(this.dp.viewDate);S&&A.year>=U[0]&&this._disableNav("prev"),z&&P.year<=U[1]&&this._disableNav("next");break}}}_disableNav(y){n('[data-action="'+y+'"]',this.$el).classList.add("-disabled-")}_resetNavStatus(){(function(y){for(var S=arguments.length,z=new Array(S>1?S-1:0),q=1;q<S;q++)z[q-1]=arguments[q];y.length?y.forEach((M=>{M.classList.remove(...z)})):y.classList.remove(...z)})(this.$el.querySelectorAll(".air-datepicker-nav--action"),"-disabled-")}_buildBaseHtml(){let{prevHtml:y,nextHtml:S}=this.opts;this.$el.innerHTML=`<div class="air-datepicker-nav--action" data-action="prev">${y}</div><div class="air-datepicker-nav--title"></div><div class="air-datepicker-nav--action" data-action="next">${S}</div>`}get isNavIsFunction(){let{navTitles:y}=this.opts;return Object.keys(y).find((S=>typeof y[S]=="function"))}}var Ke={today:{content:R=>R.locale.today,onClick:R=>R.setViewDate(new Date)},clear:{content:R=>R.locale.clear,onClick:R=>R.clear()}};class pr{constructor(y){let{dp:S,opts:z}=y;this.dp=S,this.opts=z,this.init()}init(){this.createElement(),this.render()}createElement(){this.$el=a({className:"air-datepicker-buttons"})}destroy(){this.$el.parentNode.removeChild(this.$el)}clearHtml(){return this.$el.innerHTML="",this}generateButtons(){let{buttons:y}=this.opts;Array.isArray(y)||(y=[y]),y.forEach((S=>{let z=S;typeof S=="string"&&Ke[S]&&(z=Ke[S]);let q=this.createButton(z);z.onClick&&this.attachEventToButton(q,z.onClick),this.$el.appendChild(q)}))}attachEventToButton(y,S){y.addEventListener("click",(()=>{S(this.dp)}))}createButton(y){let{content:S,className:z,tagName:q="button",attrs:M={}}=y;return a({tagName:q,innerHtml:`<span tabindex='-1'>${typeof S=="function"?S(this.dp):S}</span>`,className:b("air-datepicker-button",z),attrs:M})}render(){this.generateButtons()}}function Ae(R,y,S){return(y=(function(z){var q=(function(M,A){if(typeof M!="object"||M===null)return M;var P=M[Symbol.toPrimitive];if(P!==void 0){var U=P.call(M,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)})(z);return typeof q=="symbol"?q:String(q)})(y))in R?Object.defineProperty(R,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):R[y]=S,R}class Ye{constructor(){let{opts:y,dp:S}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ae(this,"toggleTimepickerIsActive",(q=>{this.dp.timepickerIsActive=q})),Ae(this,"onChangeSelectedDate",(q=>{let{date:M,updateTime:A=!1}=q;M&&(this.setMinMaxTime(M),this.setCurrentTime(!!A&&M),this.addTimeToDate(M))})),Ae(this,"onChangeLastSelectedDate",(q=>{q&&(this.setTime(q),this.render())})),Ae(this,"onChangeInputRange",(q=>{let M=q.target;this[M.getAttribute("name")]=M.value,this.updateText(),this.dp.trigger(t.eventChangeTime,{hours:this.hours,minutes:this.minutes})})),Ae(this,"onMouseEnterLeave",(q=>{let M=q.target.getAttribute("name"),A=this.$minutesText;M==="hours"&&(A=this.$hoursText),A.classList.toggle("-focus-")})),Ae(this,"onFocus",(()=>{this.toggleTimepickerIsActive(!0)})),Ae(this,"onBlur",(()=>{this.toggleTimepickerIsActive(!1)})),this.opts=y,this.dp=S;let{timeFormat:z}=this.dp.locale;z&&(z.match($("h"))||z.match($("hh")))&&(this.ampm=!0),this.init()}init(){this.setTime(this.dp.lastSelectedDate||this.dp.viewDate),this.createElement(),this.buildHtml(),this.defineDOM(),this.render(),this.bindDatepickerEvents(),this.bindDOMEvents()}bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate)}bindDOMEvents(){let y="input";navigator.userAgent.match(/trident/gi)&&(y="change"),k(this.$ranges,y,this.onChangeInputRange),k(this.$ranges,"mouseenter",this.onMouseEnterLeave),k(this.$ranges,"mouseleave",this.onMouseEnterLeave),k(this.$ranges,"focus",this.onFocus),k(this.$ranges,"mousedown",this.onFocus),k(this.$ranges,"blur",this.onBlur)}createElement(){this.$el=a({className:b("air-datepicker-time",{"-am-pm-":this.dp.ampm})})}destroy(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate),this.$el.parentNode.removeChild(this.$el)}buildHtml(){let{ampm:y,hours:S,displayHours:z,minutes:q,minHours:M,minMinutes:A,maxHours:P,maxMinutes:U,dayPeriod:Y,opts:{hoursStep:ot,minutesStep:et}}=this;this.$el.innerHTML=`<div class="air-datepicker-time--current"> <span class="air-datepicker-time--current-hours">${m(z)}</span> <span class="air-datepicker-time--current-colon">:</span> <span class="air-datepicker-time--current-minutes">${m(q)}</span> `+(y?`<span class='air-datepicker-time--current-ampm'>${Y}</span>`:"")+`</div><div class="air-datepicker-time--sliders"> <div class="air-datepicker-time--row"> <input type="range" name="hours" value="${S}" min="${M}" max="${P}" step="${ot}"/> </div> <div class="air-datepicker-time--row"> <input type="range" name="minutes" value="${q}" min="${A}" max="${U}" step="${et}"/> </div></div>`}defineDOM(){let y=S=>n(S,this.$el);this.$ranges=this.$el.querySelectorAll('[type="range"]'),this.$hours=y('[name="hours"]'),this.$minutes=y('[name="minutes"]'),this.$hoursText=y(".air-datepicker-time--current-hours"),this.$minutesText=y(".air-datepicker-time--current-minutes"),this.$ampm=y(".air-datepicker-time--current-ampm")}setTime(y){this.setMinMaxTime(y),this.setCurrentTime(y)}addTimeToDate(y){y&&(y.setHours(this.hours),y.setMinutes(this.minutes))}setMinMaxTime(y){if(this.setMinMaxTimeFromOptions(),y){let{minDate:S,maxDate:z}=this.dp;S&&g(y,S)&&this.setMinTimeFromMinDate(S),z&&g(y,z)&&this.setMaxTimeFromMaxDate(z)}}setCurrentTime(y){let{hours:S,minutes:z}=y?d(y):this;this.hours=G(S,this.minHours,this.maxHours),this.minutes=G(z,this.minMinutes,this.maxMinutes)}setMinMaxTimeFromOptions(){let{minHours:y,minMinutes:S,maxHours:z,maxMinutes:q}=this.opts;this.minHours=G(y,0,23),this.minMinutes=G(S,0,59),this.maxHours=G(z,0,23),this.maxMinutes=G(q,0,59)}setMinTimeFromMinDate(y){let{lastSelectedDate:S}=this.dp;this.minHours=y.getHours(),S&&S.getHours()>y.getHours()?this.minMinutes=this.opts.minMinutes:this.minMinutes=y.getMinutes()}setMaxTimeFromMaxDate(y){let{lastSelectedDate:S}=this.dp;this.maxHours=y.getHours(),S&&S.getHours()<y.getHours()?this.maxMinutes=this.opts.maxMinutes:this.maxMinutes=y.getMinutes()}updateSliders(){s(this.$hours,{min:this.minHours,max:this.maxHours}).value=this.hours,s(this.$minutes,{min:this.minMinutes,max:this.maxMinutes}).value=this.minutes}updateText(){this.$hoursText.innerHTML=m(this.displayHours),this.$minutesText.innerHTML=m(this.minutes),this.ampm&&(this.$ampm.innerHTML=this.dayPeriod)}set hours(y){this._hours=y;let{hours:S,dayPeriod:z}=h(y);this.displayHours=this.ampm?S:y,this.dayPeriod=z}get hours(){return this._hours}render(){this.updateSliders(),this.updateText()}}function _e(R,y,S){return(y=(function(z){var q=(function(M,A){if(typeof M!="object"||M===null)return M;var P=M[Symbol.toPrimitive];if(P!==void 0){var U=P.call(M,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)})(z);return typeof q=="symbol"?q:String(q)})(y))in R?Object.defineProperty(R,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):R[y]=S,R}class ri{constructor(y){let{dp:S,opts:z}=y;_e(this,"pressedKeys",new Set),_e(this,"hotKeys",new Map([[[["Control","ArrowRight"],["Control","ArrowUp"]],q=>q.month++],[[["Control","ArrowLeft"],["Control","ArrowDown"]],q=>q.month--],[[["Shift","ArrowRight"],["Shift","ArrowUp"]],q=>q.year++],[[["Shift","ArrowLeft"],["Shift","ArrowDown"]],q=>q.year--],[[["Alt","ArrowRight"],["Alt","ArrowUp"]],q=>q.year+=10],[[["Alt","ArrowLeft"],["Alt","ArrowDown"]],q=>q.year-=10],[["Control","Shift","ArrowUp"],(q,M)=>M.up()]])),_e(this,"handleHotKey",(q=>{let M=this.hotKeys.get(q),A=d(this.getInitialFocusDate());M(A,this.dp);let{year:P,month:U,date:Y}=A,ot=l(new Date(P,U));ot<Y&&(Y=ot);let et=this.dp.getClampedDate(new Date(P,U,Y));this.dp.setFocusDate(et,{viewDateTransition:!0})})),_e(this,"isHotKeyPressed",(()=>{let q=!1,M=this.pressedKeys.size,A=P=>this.pressedKeys.has(P);for(let[P]of this.hotKeys){if(q)break;if(Array.isArray(P[0]))P.forEach((U=>{q||M!==U.length||(q=U.every(A)&&P)}));else{if(M!==P.length)continue;q=P.every(A)&&P}}return q})),_e(this,"isArrow",(q=>q>=37&&q<=40)),_e(this,"onKeyDown",(q=>{if(!this.dp.visible&&!this.dp.treatAsInline)return;let{key:M,which:A}=q,{dp:P,dp:{focusDate:U},opts:Y}=this;this.registerKey(M);let ot=this.isHotKeyPressed();if(ot)return q.preventDefault(),void this.handleHotKey(ot);if(this.isArrow(A))return q.preventDefault(),void this.focusNextCell(M);if(M==="Enter"){if(P.currentView!==Y.minView)return void P.down();if(U){let et=P._checkIfDateIsSelected(U);return void(et?P._handleAlreadySelectedDates(et,U):P.selectDate(U))}}M==="Escape"&&this.dp.hide()})),_e(this,"onKeyUp",(q=>{this.removeKey(q.key)})),this.dp=S,this.opts=z,this.init()}init(){this.bindKeyboardEvents()}bindKeyboardEvents(){let{$el:y}=this.dp;y.addEventListener("keydown",this.onKeyDown),y.addEventListener("keyup",this.onKeyUp)}destroy(){let{$el:y}=this.dp;y.removeEventListener("keydown",this.onKeyDown),y.removeEventListener("keyup",this.onKeyUp),this.hotKeys=null,this.pressedKeys=null}getInitialFocusDate(){let{focusDate:y,currentView:S,selectedDates:z,parsedViewDate:{year:q,month:M}}=this.dp,A=y||z[z.length-1];if(!A)switch(S){case t.days:A=new Date(q,M,new Date().getDate());break;case t.months:A=new Date(q,M,1);break;case t.years:A=new Date(q,0,1)}return A}focusNextCell(y){let S=this.getInitialFocusDate(),{currentView:z}=this.dp,{days:q,months:M,years:A}=t,P=d(S),U=P.year,Y=P.month,ot=P.date;switch(y){case"ArrowLeft":z===q&&(ot-=1),z===M&&(Y-=1),z===A&&(U-=1);break;case"ArrowUp":z===q&&(ot-=7),z===M&&(Y-=3),z===A&&(U-=4);break;case"ArrowRight":z===q&&(ot+=1),z===M&&(Y+=1),z===A&&(U+=1);break;case"ArrowDown":z===q&&(ot+=7),z===M&&(Y+=3),z===A&&(U+=4)}let et=this.dp.getClampedDate(new Date(U,Y,ot));this.dp.setFocusDate(et,{viewDateTransition:!0})}registerKey(y){this.pressedKeys.add(y)}removeKey(y){this.pressedKeys.delete(y)}}let qa={on(R,y){this.__events||(this.__events={}),this.__events[R]?this.__events[R].push(y):this.__events[R]=[y]},off(R,y){this.__events&&this.__events[R]&&(this.__events[R]=this.__events[R].filter((S=>S!==y)))},removeAllEvents(){this.__events={}},trigger(R){for(var y=arguments.length,S=new Array(y>1?y-1:0),z=1;z<y;z++)S[z-1]=arguments[z];this.__events&&this.__events[R]&&this.__events[R].forEach((q=>{q(...S)}))}};function mt(R,y,S){return(y=(function(z){var q=(function(M,A){if(typeof M!="object"||M===null)return M;var P=M[Symbol.toPrimitive];if(P!==void 0){var U=P.call(M,"string");if(typeof U!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(M)})(z);return typeof q=="symbol"?q:String(q)})(y))in R?Object.defineProperty(R,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):R[y]=S,R}let Io="",Do="",ut=!1;class it{static buildGlobalContainer(y){ut=!0,Io=a({className:y,id:y}),n("body").appendChild(Io)}constructor(y,S){var z=this;if(mt(this,"viewIndexes",[t.days,t.months,t.years]),mt(this,"next",(()=>{let{year:A,month:P}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date(A,P+1,1));break;case t.months:this.setViewDate(new Date(A+1,P,1));break;case t.years:this.setViewDate(new Date(A+10,0,1))}})),mt(this,"prev",(()=>{let{year:A,month:P}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date(A,P-1,1));break;case t.months:this.setViewDate(new Date(A-1,P,1));break;case t.years:this.setViewDate(new Date(A-10,0,1))}})),mt(this,"_finishHide",(()=>{this.hideAnimation=!1,this._destroyComponents(),this.$container.removeChild(this.$datepicker)})),mt(this,"setPosition",(function(A){let P=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(typeof(A=A||z.opts.position)=="function")return void(z.customHide=A({$datepicker:z.$datepicker,$target:z.$el,$pointer:z.$pointer,isViewChange:P,done:z._finishHide}));let U,Y,{isMobile:ot}=z.opts,et=z.$el.getBoundingClientRect(),at=z.$el.getBoundingClientRect(),fe=z.$datepicker.offsetParent,Pr=z.$el.offsetParent,hr=z.$datepicker.getBoundingClientRect(),on=A.split(" "),js=window.scrollY,ji=window.scrollX,Gi=z.opts.offset,Wi=on[0],ph=on[1];if(ot)z.$datepicker.style.cssText="left: 50%; top: 50%";else{if(fe===Pr&&fe!==document.body&&(at={top:z.$el.offsetTop,left:z.$el.offsetLeft,width:et.width,height:z.$el.offsetHeight},js=0,ji=0),fe!==Pr&&fe!==document.body){let $c=fe.getBoundingClientRect();at={top:et.top-$c.top,left:et.left-$c.left,width:et.width,height:et.height},js=0,ji=0}switch(Wi){case"top":U=at.top-hr.height-Gi;break;case"right":Y=at.left+at.width+Gi;break;case"bottom":U=at.top+at.height+Gi;break;case"left":Y=at.left-hr.width-Gi}switch(ph){case"top":U=at.top;break;case"right":Y=at.left+at.width-hr.width;break;case"bottom":U=at.top+at.height-hr.height;break;case"left":Y=at.left;break;case"center":/left|right/.test(Wi)?U=at.top+at.height/2-hr.height/2:Y=at.left+at.width/2-hr.width/2}z.$datepicker.style.cssText=`left: ${Y+ji}px; top: ${U+js}px`}})),mt(this,"_setInputValue",(()=>{let{opts:A,$altField:P,locale:{dateFormat:U}}=this,{altFieldDateFormat:Y,altField:ot}=A;ot&&P&&(P.value=this._getInputValue(Y)),this.$el.value=this._getInputValue(U),this.$el.dispatchEvent(new Event("change"))})),mt(this,"_getInputValue",(A=>{let{selectedDates:P,opts:U}=this,{multipleDates:Y,multipleDatesSeparator:ot}=U;if(!P.length)return"";let et=typeof A=="function",at=et?A(Y?P:P[0]):P.map((fe=>this.formatDate(fe,A)));return at=et?at:at.join(ot),at})),mt(this,"_checkIfDateIsSelected",(function(A){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.days,U=!1;return z.selectedDates.some((Y=>{let ot=g(A,Y,P);return U=ot&&Y,ot})),U})),mt(this,"_scheduleCallAfterTransition",(A=>{this._cancelScheduledCall(),A&&A(!1),this._onTransitionEnd=()=>{A&&A(!0)},this.$datepicker.addEventListener("transitionend",this._onTransitionEnd,{once:!0})})),mt(this,"_cancelScheduledCall",(()=>{this.$datepicker.removeEventListener("transitionend",this._onTransitionEnd)})),mt(this,"setViewDate",(A=>{if(!((A=w(A))instanceof Date)||g(A,this.viewDate))return;let P=this.viewDate;this.viewDate=A;let{onChangeViewDate:U}=this.opts;if(U){let{month:Y,year:ot}=this.parsedViewDate;U({month:Y,year:ot,decade:this.curDecade})}this.trigger(t.eventChangeViewDate,A,P)})),mt(this,"setFocusDate",(function(A){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!A||(A=w(A))instanceof Date)&&(z.focusDate=A,z.trigger(t.eventChangeFocusDate,A,P))})),mt(this,"setCurrentView",(function(A){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(z.viewIndexes.includes(A)){if(z.currentView=A,z.elIsInput&&z.visible&&z.setPosition(void 0,!0),z.trigger(t.eventChangeCurrentView,A),!z.views[A]){let U=z.views[A]=new _t({dp:z,opts:z.opts,type:A});z.shouldUpdateDOM&&z.$content.appendChild(U.$el)}z.opts.onChangeView&&!P.silent&&z.opts.onChangeView(A)}})),mt(this,"_updateLastSelectedDate",(A=>{this.lastSelectedDate=A,this.trigger(t.eventChangeLastSelectedDate,A)})),mt(this,"destroy",(()=>{if(this.isDestroyed)return;let{showEvent:A,isMobile:P}=this.opts,U=this.$datepicker.parentNode;U&&U.removeChild(this.$datepicker),this.$el.removeEventListener(A,this._onFocus),this.$el.removeEventListener("blur",this._onBlur),window.removeEventListener("resize",this._onResize),P&&this._removeMobileAttributes(),this.keyboardNav&&this.keyboardNav.destroy(),this.views=null,this.nav=null,this.$datepicker=null,this.opts={},this.$customContainer=null,this.viewDate=null,this.focusDate=null,this.selectedDates=[],this.rangeDateFrom=null,this.rangeDateTo=null,this.isDestroyed=!0})),mt(this,"update",(function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},U=I({},z.opts),{silent:Y}=P;I(z.opts,A);let{timepicker:ot,buttons:et,range:at,selectedDates:fe,isMobile:Pr}=z.opts,hr=z.visible||z.treatAsInline;z._createMinMaxDates(),z._limitViewDateByMaxMinDates(),z._handleLocale(),fe&&(z.selectedDates=[],z.selectDate(fe,{silent:Y})),A.view&&z.setCurrentView(A.view,{silent:Y}),z._setInputValue(),U.range&&!at?(z.rangeDateTo=!1,z.rangeDateFrom=!1):!U.range&&at&&z.selectedDates.length&&(z.rangeDateFrom=z.selectedDates[0],z.rangeDateTo=z.selectedDates[1]),U.timepicker&&!ot?(hr&&z.timepicker.destroy(),z.timepicker=!1,z.$timepicker.parentNode.removeChild(z.$timepicker)):!U.timepicker&&ot&&z._addTimepicker(),!U.buttons&&et?z._addButtons():U.buttons&&!et?(z.buttons.destroy(),z.$buttons.parentNode.removeChild(z.$buttons)):hr&&U.buttons&&et&&z.buttons.clearHtml().render(),!U.isMobile&&Pr?(z.treatAsInline||Do||z._createMobileOverlay(),z._addMobileAttributes(),z.visible&&z._showMobileOverlay()):U.isMobile&&!Pr&&(z._removeMobileAttributes(),z.visible&&(Do.classList.remove("-active-"),typeof z.opts.position!="function"&&z.setPosition())),hr&&(z.nav.update(),z.views[z.currentView].render(),z.currentView===t.days&&z.views[z.currentView].renderDayNames())})),mt(this,"disableDate",((A,P)=>{(Array.isArray(A)?A:[A]).forEach((U=>{let Y=w(U);if(!Y)return;let ot=P?"delete":"add";this.disabledDates[ot](this.formatDate(Y,"yyyy-MM-dd"));let et=this.getCell(Y,this.currentViewSingular);et&&et.adpCell.render()}),[])})),mt(this,"enableDate",(A=>{this.disableDate(A,!0)})),mt(this,"isDateDisabled",(A=>{let P=w(A);return this.disabledDates.has(this.formatDate(P,"yyyy-MM-dd"))})),mt(this,"isOtherMonth",(A=>{let{month:P}=d(A);return P!==this.parsedViewDate.month})),mt(this,"isOtherYear",(A=>{let{year:P}=d(A);return P!==this.parsedViewDate.year})),mt(this,"isOtherDecade",(A=>{let{year:P}=d(A),[U,Y]=f(this.viewDate);return P<U||P>Y})),mt(this,"_onChangeSelectedDate",(A=>{let{silent:P}=A;setTimeout((()=>{this._setInputValue(),this.opts.onSelect&&!P&&this._triggerOnSelect()}))})),mt(this,"_onChangeFocusedDate",(function(A){let{viewDateTransition:P}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!A)return;let U=!1;P&&(U=z.isOtherMonth(A)||z.isOtherYear(A)||z.isOtherDecade(A)),U&&z.setViewDate(A),z.opts.onFocus&&z.opts.onFocus({datepicker:z,date:A})})),mt(this,"_onChangeTime",(A=>{let{hours:P,minutes:U}=A,Y=new Date,{lastSelectedDate:ot,opts:{onSelect:et}}=this,at=ot;ot||(at=Y);let fe=this.getCell(at,this.currentViewSingular),Pr=fe&&fe.adpCell;Pr&&Pr.isDisabled||(at.setHours(P),at.setMinutes(U),ot?(this._setInputValue(),et&&this._triggerOnSelect()):this.selectDate(at))})),mt(this,"_onFocus",(A=>{this.visible||this.show()})),mt(this,"_onBlur",(A=>{this.inFocus||!this.visible||this.opts.isMobile||this.hide()})),mt(this,"_onMouseDown",(A=>{this.inFocus=!0})),mt(this,"_onMouseUp",(A=>{this.inFocus=!1,this.$el.focus()})),mt(this,"_onResize",(()=>{this.visible&&typeof this.opts.position!="function"&&this.setPosition()})),mt(this,"_onClickOverlay",(()=>{this.visible&&this.hide()})),mt(this,"getViewDates",(function(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return _t.getDatesFunction(A)(z)})),mt(this,"isWeekend",(A=>this.opts.weekends.includes(A))),mt(this,"getClampedDate",(A=>{let{minDate:P,maxDate:U}=this,Y=A;return U&&v(A,U)?Y=U:P&&x(A,P)&&(Y=P),Y})),this.$el=n(y),!this.$el)return;this.$datepicker=a({className:"air-datepicker"}),this.opts=I({},r,S),this.$customContainer=!!this.opts.container&&n(this.opts.container),this.$altField=n(this.opts.altField||!1);let{view:q,startDate:M}=this.opts;M||(this.opts.startDate=new Date),this.$el.nodeName==="INPUT"&&(this.elIsInput=!0),this.inited=!1,this.visible=!1,this.viewDate=w(this.opts.startDate),this.focusDate=!1,this.initialReadonly=this.$el.getAttribute("readonly"),this.customHide=!1,this.currentView=q,this.selectedDates=[],this.disabledDates=new Set,this.isDestroyed=!1,this.views={},this.keys=[],this.rangeDateFrom="",this.rangeDateTo="",this.timepickerIsActive=!1,this.treatAsInline=this.opts.inline||!this.elIsInput,this.init()}init(){let{opts:y,treatAsInline:S,opts:{inline:z,isMobile:q,selectedDates:M,keyboardNav:A,onlyTimepicker:P}}=this,U=n("body");(!ut||ut&&Io&&!U.contains(Io))&&!z&&this.elIsInput&&!this.$customContainer&&it.buildGlobalContainer(it.defaultGlobalContainerId),!q||Do||S||this._createMobileOverlay(),this._handleLocale(),this._bindSubEvents(),this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this.elIsInput&&(z||this._bindEvents(),A&&!P&&(this.keyboardNav=new ri({dp:this,opts:y}))),M&&this.selectDate(M,{silent:!0}),this.opts.visible&&!S&&this.show(),q&&!S&&this.$el.setAttribute("readonly",!0),S&&this._createComponents()}_createMobileOverlay(){Do=a({className:"air-datepicker-overlay"}),Io.appendChild(Do)}_createComponents(){let{opts:y,treatAsInline:S,opts:{inline:z,buttons:q,timepicker:M,position:A,classes:P,onlyTimepicker:U,isMobile:Y}}=this;this._buildBaseHtml(),this.elIsInput&&(z||this._setPositionClasses(A)),!z&&this.elIsInput||this.$datepicker.classList.add("-inline-"),P&&this.$datepicker.classList.add(...P.split(" ")),U&&this.$datepicker.classList.add("-only-timepicker-"),Y&&!S&&this._addMobileAttributes(),this.views[this.currentView]=new _t({dp:this,type:this.currentView,opts:y}),this.nav=new we({dp:this,opts:y}),M&&this._addTimepicker(),q&&this._addButtons(),this.$content.appendChild(this.views[this.currentView].$el),this.$nav.appendChild(this.nav.$el)}_destroyComponents(){for(let y in this.views)this.views[y].destroy();this.views={},this.nav.destroy(),this.timepicker&&this.timepicker.destroy()}_addMobileAttributes(){Do.addEventListener("click",this._onClickOverlay),this.$datepicker.classList.add("-is-mobile-"),this.$el.setAttribute("readonly",!0)}_removeMobileAttributes(){Do.removeEventListener("click",this._onClickOverlay),this.$datepicker.classList.remove("-is-mobile-"),this.initialReadonly||this.initialReadonly===""||this.$el.removeAttribute("readonly")}_createMinMaxDates(){let{minDate:y,maxDate:S}=this.opts;this.minDate=!!y&&w(y),this.maxDate=!!S&&w(S)}_addTimepicker(){this.$timepicker=a({className:"air-datepicker--time"}),this.$datepicker.appendChild(this.$timepicker),this.timepicker=new Ye({dp:this,opts:this.opts}),this.$timepicker.appendChild(this.timepicker.$el)}_addButtons(){this.$buttons=a({className:"air-datepicker--buttons"}),this.$datepicker.appendChild(this.$buttons),this.buttons=new pr({dp:this,opts:this.opts}),this.$buttons.appendChild(this.buttons.$el)}_bindSubEvents(){this.on(t.eventChangeSelectedDate,this._onChangeSelectedDate),this.on(t.eventChangeFocusDate,this._onChangeFocusedDate),this.on(t.eventChangeTime,this._onChangeTime)}_buildBaseHtml(){let{inline:y}=this.opts;var S,z;this.elIsInput?y?(S=this.$datepicker,(z=this.$el).parentNode.insertBefore(S,z.nextSibling)):this.$container.appendChild(this.$datepicker):this.$el.appendChild(this.$datepicker),this.$datepicker.innerHTML='<i class="air-datepicker--pointer"></i><div class="air-datepicker--navigation"></div><div class="air-datepicker--content"></div>',this.$content=n(".air-datepicker--content",this.$datepicker),this.$pointer=n(".air-datepicker--pointer",this.$datepicker),this.$nav=n(".air-datepicker--navigation",this.$datepicker)}_handleLocale(){let{locale:y,dateFormat:S,firstDay:z,timepicker:q,onlyTimepicker:M,timeFormat:A,dateTimeSeparator:P}=this.opts;var U;this.locale=(U=y,JSON.parse(JSON.stringify(U))),S&&(this.locale.dateFormat=S),A!==void 0&&A!==""&&(this.locale.timeFormat=A);let{timeFormat:Y}=this.locale;if(z!==""&&(this.locale.firstDay=z),q&&typeof S!="function"){let ot=Y?P:"";this.locale.dateFormat=[this.locale.dateFormat,Y||""].join(ot)}M&&typeof S!="function"&&(this.locale.dateFormat=this.locale.timeFormat)}_setPositionClasses(y){if(typeof y=="function")return void this.$datepicker.classList.add("-custom-position-");let S=(y=y.split(" "))[0],z=`air-datepicker -${S}-${y[1]}- -from-${S}-`;this.$datepicker.classList.add(...z.split(" "))}_bindEvents(){this.$el.addEventListener(this.opts.showEvent,this._onFocus),this.$el.addEventListener("blur",this._onBlur),this.$datepicker.addEventListener("mousedown",this._onMouseDown),this.$datepicker.addEventListener("mouseup",this._onMouseUp),window.addEventListener("resize",this._onResize)}_limitViewDateByMaxMinDates(){let{viewDate:y,minDate:S,maxDate:z}=this;z&&v(y,z)&&this.setViewDate(z),S&&x(y,S)&&this.setViewDate(S)}formatDate(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.viewDate,S=arguments.length>1?arguments[1]:void 0;if(y=w(y),!(y instanceof Date))return;let z=S,q=this.locale,M=d(y),A=M.dayPeriod,P=f(y),U=it.replacer,Y={T:y.getTime(),m:M.minutes,mm:M.fullMinutes,h:M.hours12,hh:M.fullHours12,H:M.hours,HH:M.fullHours,aa:A,AA:A.toUpperCase(),E:q.daysShort[M.day],EEEE:q.days[M.day],d:M.date,dd:M.fullDate,M:M.month+1,MM:M.fullMonth,MMM:q.monthsShort[M.month],MMMM:q.months[M.month],yy:M.year.toString().slice(-2),yyyy:M.year,yyyy1:P[0],yyyy2:P[1]};for(let[ot,et]of Object.entries(Y))z=U(z,$(ot),et);return z}down(y){this._handleUpDownActions(y,"down")}up(y){this._handleUpDownActions(y,"up")}selectDate(y){let S,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{currentView:q,parsedViewDate:M,selectedDates:A}=this,{updateTime:P,silent:U}=z,{moveToOtherMonthsOnSelect:Y,moveToOtherYearsOnSelect:ot,multipleDates:et,range:at,autoClose:fe,onBeforeSelect:Pr}=this.opts,hr=A.length;if(Array.isArray(y))return y.forEach((on=>{this.selectDate(on,z)})),new Promise((on=>{setTimeout(on)}));if((y=w(y))instanceof Date){if(Pr&&!U&&!Pr({date:y,datepicker:this}))return Promise.resolve();if(q===t.days&&y.getMonth()!==M.month&&Y&&(S=new Date(y.getFullYear(),y.getMonth(),1)),q===t.years&&y.getFullYear()!==M.year&&ot&&(S=new Date(y.getFullYear(),0,1)),S&&this.setViewDate(S),et&&!at){if(hr===et)return;this._checkIfDateIsSelected(y)||A.push(y)}else if(at)switch(hr){case 1:A.push(y),this.rangeDateTo||(this.rangeDateTo=y),v(this.rangeDateFrom,this.rangeDateTo)&&(this.rangeDateTo=this.rangeDateFrom,this.rangeDateFrom=y),this.selectedDates=[this.rangeDateFrom,this.rangeDateTo];break;case 2:this.selectedDates=[y],this.rangeDateFrom=y,this.rangeDateTo="";break;default:this.selectedDates=[y],this.rangeDateFrom=y}else this.selectedDates=[y];return this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,silent:z?.silent,date:y,updateTime:P}),this._updateLastSelectedDate(y),fe&&!this.timepickerIsActive&&this.visible&&(et||at?at&&hr===1&&this.hide():this.hide()),new Promise((on=>{setTimeout(on)}))}}unselectDate(y){let S=this.selectedDates,z=this;if((y=w(y))instanceof Date)return S.some(((q,M)=>{if(g(q,y))return S.splice(M,1),z.selectedDates.length?(z.rangeDateTo="",z.rangeDateFrom=S[0],z._updateLastSelectedDate(z.selectedDates[z.selectedDates.length-1])):(z.rangeDateFrom="",z.rangeDateTo="",z._updateLastSelectedDate(!1)),this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,date:y}),!0}))}replaceDate(y,S){let z=this.selectedDates.find((M=>g(M,y,this.currentView))),q=this.selectedDates.indexOf(z);q<0||g(this.selectedDates[q],S,this.currentView)||(this.selectedDates[q]=S,this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,date:S,updateTime:!0}),this._updateLastSelectedDate(S))}clear(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.selectedDates=[],this.rangeDateFrom=!1,this.rangeDateTo=!1,this.lastSelectedDate=!1,this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,silent:y.silent}),new Promise((S=>{setTimeout(S)}))}show(){let{onShow:y,isMobile:S}=this.opts;this._cancelScheduledCall(),this.visible||this.hideAnimation||this._createComponents(),this.setPosition(this.opts.position),this.$datepicker.classList.add("-active-"),this.visible=!0,y&&this._scheduleCallAfterTransition(y),S&&this._showMobileOverlay()}hide(){let{onHide:y,isMobile:S}=this.opts,z=this._hasTransition();this.visible=!1,this.hideAnimation=!0,this.$datepicker.classList.remove("-active-"),this.customHide&&this.customHide(),this.elIsInput&&this.$el.blur(),this._scheduleCallAfterTransition((q=>{!this.customHide&&(q&&z||!q&&!z)&&this._finishHide(),y&&y(q)})),S&&Do.classList.remove("-active-")}_triggerOnSelect(){let y=[],S=[],{selectedDates:z,locale:q,opts:{onSelect:M,multipleDates:A,range:P}}=this,U=A||P,Y=typeof q.dateFormat=="function";z.length&&(y=z.map(_),S=Y?A?q.dateFormat(y):y.map((ot=>q.dateFormat(ot))):y.map((ot=>this.formatDate(ot,q.dateFormat)))),M({date:U?y:y[0],formattedDate:U?S:S[0],datepicker:this})}_handleAlreadySelectedDates(y,S){let{selectedDates:z,rangeDateFrom:q,rangeDateTo:M}=this,{range:A,toggleSelected:P}=this.opts,U=z.length,Y=typeof P=="function"?P({datepicker:this,date:S}):P,ot=!!(A&&U===1&&y),et=ot?_(S):S;A&&!Y&&(U!==2&&this.selectDate(et),U===2&&g(q,M))||(Y?this.unselectDate(et):this._updateLastSelectedDate(ot?et:y))}_handleUpDownActions(y,S){if(!((y=w(y||this.focusDate||this.viewDate))instanceof Date))return;let z=S==="up"?this.viewIndex+1:this.viewIndex-1;z>2&&(z=2),z<0&&(z=0),this.setViewDate(new Date(y.getFullYear(),y.getMonth(),1)),this.setCurrentView(this.viewIndexes[z])}getCell(y){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.day;if(!((y=w(y))instanceof Date))return;let{year:z,month:q,date:M}=d(y),A=`[data-year="${z}"]`,P=`[data-month="${q}"]`,U={[t.day]:`${A}${P}[data-date="${M}"]`,[t.month]:`${A}${P}`,[t.year]:`${A}`};return this.views[this.currentView]?this.views[this.currentView].$el.querySelector(U[S]):void 0}_showMobileOverlay(){Do.classList.add("-active-")}_hasTransition(){return window.getComputedStyle(this.$datepicker).getPropertyValue("transition-duration").split(", ").reduce(((y,S)=>parseFloat(S)+y),0)>0}get shouldUpdateDOM(){return this.visible||this.treatAsInline}get parsedViewDate(){return d(this.viewDate)}get currentViewSingular(){return this.currentView.slice(0,-1)}get curDecade(){return f(this.viewDate)}get viewIndex(){return this.viewIndexes.indexOf(this.currentView)}get isFinalView(){return this.currentView===t.years}get hasSelectedDates(){return this.selectedDates.length>0}get isMinViewReached(){return this.currentView===this.opts.minView||this.currentView===t.days}get $container(){return this.$customContainer||Io}static replacer(y,S,z){return y.replace(S,(function(q,M,A,P){return M+z+P}))}}var xt;return mt(it,"defaults",r),mt(it,"version","3.6.0"),mt(it,"defaultGlobalContainerId","air-datepicker-global-container"),xt=it.prototype,Object.assign(xt,qa),o.default})()}))});var Ws=globalThis,og=i=>i,Ac=Ws.trustedTypes,ng=Ac?Ac.createPolicy("lit-html",{createHTML:i=>i}):void 0,uh="$lit$",An=`lit$${Math.random().toFixed(9).slice(2)}$`,mh="?"+An,H_=`<${mh}>`,Xi=document,Ks=()=>Xi.createComment(""),Ys=i=>i===null||typeof i!="object"&&typeof i!="function",fh=Array.isArray,dg=i=>fh(i)||typeof i?.[Symbol.iterator]=="function",hh=`[
|
|
3
3
|
\f\r]`,Gs=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ig=/-->/g,ag=/>/g,Ki=RegExp(`>|${hh}(?:([^\\s"'>=/]+)(${hh}*=${hh}*(?:[^
|
|
4
4
|
\f\r"'\`<>=]|("|')|))|$)`,"g"),sg=/'/g,lg=/"/g,pg=/^(?:script|style|textarea|title)$/i,gh=i=>(o,...t)=>({_$litType$:i,strings:o,values:t}),u=gh(1),No=gh(2),hg=gh(3),ae=Symbol.for("lit-noChange"),V=Symbol.for("lit-nothing"),cg=new WeakMap,Yi=Xi.createTreeWalker(Xi,129);function ug(i,o){if(!fh(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return ng!==void 0?ng.createHTML(o):o}var mg=(i,o)=>{let t=i.length-1,r=[],n,a=o===2?"<svg>":o===3?"<math>":"",s=Gs;for(let l=0;l<t;l++){let d=i[l],h,m,f=-1,b=0;for(;b<d.length&&(s.lastIndex=b,m=s.exec(d),m!==null);)b=s.lastIndex,s===Gs?m[1]==="!--"?s=ig:m[1]!==void 0?s=ag:m[2]!==void 0?(pg.test(m[2])&&(n=RegExp("</"+m[2],"g")),s=Ki):m[3]!==void 0&&(s=Ki):s===Ki?m[0]===">"?(s=n??Gs,f=-1):m[1]===void 0?f=-2:(f=s.lastIndex-m[2].length,h=m[1],s=m[3]===void 0?Ki:m[3]==='"'?lg:sg):s===lg||s===sg?s=Ki:s===ig||s===ag?s=Gs:(s=Ki,n=void 0);let g=s===Ki&&i[l+1].startsWith("/>")?" ":"";a+=s===Gs?d+H_:f>=0?(r.push(h),d.slice(0,f)+uh+d.slice(f)+An+g):d+An+(f===-2?l:g)}return[ug(i,a+(i[t]||"<?>")+(o===2?"</svg>":o===3?"</math>":"")),r]},Xs=class i{constructor({strings:o,_$litType$:t},r){let n;this.parts=[];let a=0,s=0,l=o.length-1,d=this.parts,[h,m]=mg(o,t);if(this.el=i.createElement(h,r),Yi.currentNode=this.el.content,t===2||t===3){let f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(n=Yi.nextNode())!==null&&d.length<l;){if(n.nodeType===1){if(n.hasAttributes())for(let f of n.getAttributeNames())if(f.endsWith(uh)){let b=m[s++],g=n.getAttribute(f).split(An),v=/([.?@])?(.*)/.exec(b);d.push({type:1,index:a,name:v[2],strings:g,ctor:v[1]==="."?Mc:v[1]==="?"?qc:v[1]==="@"?Ic:Ji}),n.removeAttribute(f)}else f.startsWith(An)&&(d.push({type:6,index:a}),n.removeAttribute(f));if(pg.test(n.tagName)){let f=n.textContent.split(An),b=f.length-1;if(b>0){n.textContent=Ac?Ac.emptyScript:"";for(let g=0;g<b;g++)n.append(f[g],Ks()),Yi.nextNode(),d.push({type:2,index:++a});n.append(f[b],Ks())}}}else if(n.nodeType===8)if(n.data===mh)d.push({type:2,index:a});else{let f=-1;for(;(f=n.data.indexOf(An,f+1))!==-1;)d.push({type:7,index:a}),f+=An.length-1}a++}}static createElement(o,t){let r=Xi.createElement("template");return r.innerHTML=o,r}};function Qi(i,o,t=i,r){if(o===ae)return o;let n=r!==void 0?t._$Co?.[r]:t._$Cl,a=Ys(o)?void 0:o._$litDirective$;return n?.constructor!==a&&(n?._$AO?.(!1),a===void 0?n=void 0:(n=new a(i),n._$AT(i,t,r)),r!==void 0?(t._$Co??(t._$Co=[]))[r]=n:t._$Cl=n),n!==void 0&&(o=Qi(i,n._$AS(i,o.values),n,r)),o}var Lc=class{constructor(o,t){this._$AV=[],this._$AN=void 0,this._$AD=o,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(o){let{el:{content:t},parts:r}=this._$AD,n=(o?.creationScope??Xi).importNode(t,!0);Yi.currentNode=n;let a=Yi.nextNode(),s=0,l=0,d=r[0];for(;d!==void 0;){if(s===d.index){let h;d.type===2?h=new Ia(a,a.nextSibling,this,o):d.type===1?h=new d.ctor(a,d.name,d.strings,this,o):d.type===6&&(h=new Dc(a,this,o)),this._$AV.push(h),d=r[++l]}s!==d?.index&&(a=Yi.nextNode(),s++)}return Yi.currentNode=Xi,n}p(o){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(o,r,t),t+=r.strings.length-2):r._$AI(o[t])),t++}},Ia=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(o,t,r,n){this.type=2,this._$AH=V,this._$AN=void 0,this._$AA=o,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let o=this._$AA.parentNode,t=this._$AM;return t!==void 0&&o?.nodeType===11&&(o=t.parentNode),o}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(o,t=this){o=Qi(this,o,t),Ys(o)?o===V||o==null||o===""?(this._$AH!==V&&this._$AR(),this._$AH=V):o!==this._$AH&&o!==ae&&this._(o):o._$litType$!==void 0?this.$(o):o.nodeType!==void 0?this.T(o):dg(o)?this.k(o):this._(o)}O(o){return this._$AA.parentNode.insertBefore(o,this._$AB)}T(o){this._$AH!==o&&(this._$AR(),this._$AH=this.O(o))}_(o){this._$AH!==V&&Ys(this._$AH)?this._$AA.nextSibling.data=o:this.T(Xi.createTextNode(o)),this._$AH=o}$(o){let{values:t,_$litType$:r}=o,n=typeof r=="number"?this._$AC(o):(r.el===void 0&&(r.el=Xs.createElement(ug(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{let a=new Lc(n,this),s=a.u(this.options);a.p(t),this.T(s),this._$AH=a}}_$AC(o){let t=cg.get(o.strings);return t===void 0&&cg.set(o.strings,t=new Xs(o)),t}k(o){fh(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,n=0;for(let a of o)n===t.length?t.push(r=new i(this.O(Ks()),this.O(Ks()),this,this.options)):r=t[n],r._$AI(a),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(o=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);o!==this._$AB;){let r=og(o).nextSibling;og(o).remove(),o=r}}setConnected(o){this._$AM===void 0&&(this._$Cv=o,this._$AP?.(o))}},Ji=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(o,t,r,n,a){this.type=1,this._$AH=V,this._$AN=void 0,this.element=o,this.name=t,this._$AM=n,this.options=a,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=V}_$AI(o,t=this,r,n){let a=this.strings,s=!1;if(a===void 0)o=Qi(this,o,t,0),s=!Ys(o)||o!==this._$AH&&o!==ae,s&&(this._$AH=o);else{let l=o,d,h;for(o=a[0],d=0;d<a.length-1;d++)h=Qi(this,l[r+d],t,d),h===ae&&(h=this._$AH[d]),s||(s=!Ys(h)||h!==this._$AH[d]),h===V?o=V:o!==V&&(o+=(h??"")+a[d+1]),this._$AH[d]=h}s&&!n&&this.j(o)}j(o){o===V?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,o??"")}},Mc=class extends Ji{constructor(){super(...arguments),this.type=3}j(o){this.element[this.name]=o===V?void 0:o}},qc=class extends Ji{constructor(){super(...arguments),this.type=4}j(o){this.element.toggleAttribute(this.name,!!o&&o!==V)}},Ic=class extends Ji{constructor(o,t,r,n,a){super(o,t,r,n,a),this.type=5}_$AI(o,t=this){if((o=Qi(this,o,t,0)??V)===ae)return;let r=this._$AH,n=o===V&&r!==V||o.capture!==r.capture||o.once!==r.once||o.passive!==r.passive,a=o!==V&&(r===V||n);n&&this.element.removeEventListener(this.name,this,r),a&&this.element.addEventListener(this.name,this,o),this._$AH=o}handleEvent(o){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,o):this._$AH.handleEvent(o)}},Dc=class{constructor(o,t,r){this.element=o,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(o){Qi(this,o)}},fg={M:uh,P:An,A:mh,C:1,L:mg,R:Lc,D:dg,V:Qi,I:Ia,H:Ji,N:qc,U:Ic,B:Mc,F:Dc},F_=Ws.litHtmlPolyfillSupport;F_?.(Xs,Ia),(Ws.litHtmlVersions??(Ws.litHtmlVersions=[])).push("3.3.3");var Da=(i,o,t)=>{let r=t?.renderBefore??o,n=r._$litPart$;if(n===void 0){let a=t?.renderBefore??null;r._$litPart$=n=new Ia(o.insertBefore(Ks(),a),a,void 0,t??{})}return n._$AI(i),n};var or={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},se=i=>(...o)=>({_$litDirective$:i,values:o}),Xe=class{constructor(o){}get _$AU(){return this._$AM._$AU}_$AT(o,t,r){this._$Ct=o,this._$AM=t,this._$Ci=r}_$AS(o,t){return this.update(o,t)}update(o,t){return this.render(...t)}};var D=se(class extends Xe{constructor(i){if(super(i),i.type!==or.ATTRIBUTE||i.name!=="class"||i.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter(o=>i[o]).join(" ")+" "}update(i,[o]){if(this.st===void 0){this.st=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(let r in o)o[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(o)}let t=i.element.classList;for(let r of this.st)r in o||(t.remove(r),this.st.delete(r));for(let r in o){let n=!!o[r];n===this.st.has(r)||this.nt?.has(r)||(n?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return ae}});var Nc=globalThis,Rc=Nc.ShadowRoot&&(Nc.ShadyCSS===void 0||Nc.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,bh=Symbol(),gg=new WeakMap,Qs=class{constructor(o,t,r){if(this._$cssResult$=!0,r!==bh)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=o,this.t=t}get styleSheet(){let o=this.o,t=this.t;if(Rc&&o===void 0){let r=t!==void 0&&t.length===1;r&&(o=gg.get(t)),o===void 0&&((this.o=o=new CSSStyleSheet).replaceSync(this.cssText),r&&gg.set(t,o))}return o}toString(){return this.cssText}},T=i=>new Qs(typeof i=="string"?i:i+"",void 0,bh),E=(i,...o)=>{let t=i.length===1?i[0]:o.reduce((r,n,a)=>r+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+i[a+1],i[0]);return new Qs(t,i,bh)},bg=(i,o)=>{if(Rc)i.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of o){let r=document.createElement("style"),n=Nc.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=t.cssText,i.appendChild(r)}},vh=Rc?i=>i:i=>i instanceof CSSStyleSheet?(o=>{let t="";for(let r of o.cssRules)t+=r.cssText;return T(t)})(i):i;var{is:B_,defineProperty:V_,getOwnPropertyDescriptor:U_,getOwnPropertyNames:j_,getOwnPropertySymbols:G_,getPrototypeOf:W_}=Object,oi=globalThis,vg=oi.trustedTypes,K_=vg?vg.emptyScript:"",Y_=oi.reactiveElementPolyfillSupport,Js=(i,o)=>i,ni={toAttribute(i,o){switch(o){case Boolean:i=i?K_:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,o){let t=i;switch(o){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},Na=(i,o)=>!B_(i,o),xg={attribute:!0,type:String,converter:ni,reflect:!1,useDefault:!1,hasChanged:Na};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),oi.litPropertyMetadata??(oi.litPropertyMetadata=new WeakMap);var Ln=class extends HTMLElement{static addInitializer(o){this._$Ei(),(this.l??(this.l=[])).push(o)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(o,t=xg){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(o)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(o,t),!t.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(o,r,t);n!==void 0&&V_(this.prototype,o,n)}}static getPropertyDescriptor(o,t,r){let{get:n,set:a}=U_(this.prototype,o)??{get(){return this[t]},set(s){this[t]=s}};return{get:n,set(s){let l=n?.call(this);a?.call(this,s),this.requestUpdate(o,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(o){return this.elementProperties.get(o)??xg}static _$Ei(){if(this.hasOwnProperty(Js("elementProperties")))return;let o=W_(this);o.finalize(),o.l!==void 0&&(this.l=[...o.l]),this.elementProperties=new Map(o.elementProperties)}static finalize(){if(this.hasOwnProperty(Js("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Js("properties"))){let t=this.properties,r=[...j_(t),...G_(t)];for(let n of r)this.createProperty(n,t[n])}let o=this[Symbol.metadata];if(o!==null){let t=litPropertyMetadata.get(o);if(t!==void 0)for(let[r,n]of t)this.elementProperties.set(r,n)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let n=this._$Eu(t,r);n!==void 0&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(o){let t=[];if(Array.isArray(o)){let r=new Set(o.flat(1/0).reverse());for(let n of r)t.unshift(vh(n))}else o!==void 0&&t.push(vh(o));return t}static _$Eu(o,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof o=="string"?o.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(o=>this.enableUpdating=o),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(o=>o(this))}addController(o){(this._$EO??(this._$EO=new Set)).add(o),this.renderRoot!==void 0&&this.isConnected&&o.hostConnected?.()}removeController(o){this._$EO?.delete(o)}_$E_(){let o=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(o.set(r,this[r]),delete this[r]);o.size>0&&(this._$Ep=o)}createRenderRoot(){let o=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return bg(o,this.constructor.elementStyles),o}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach(o=>o.hostConnected?.())}enableUpdating(o){}disconnectedCallback(){this._$EO?.forEach(o=>o.hostDisconnected?.())}attributeChangedCallback(o,t,r){this._$AK(o,r)}_$ET(o,t){let r=this.constructor.elementProperties.get(o),n=this.constructor._$Eu(o,r);if(n!==void 0&&r.reflect===!0){let a=(r.converter?.toAttribute!==void 0?r.converter:ni).toAttribute(t,r.type);this._$Em=o,a==null?this.removeAttribute(n):this.setAttribute(n,a),this._$Em=null}}_$AK(o,t){let r=this.constructor,n=r._$Eh.get(o);if(n!==void 0&&this._$Em!==n){let a=r.getPropertyOptions(n),s=typeof a.converter=="function"?{fromAttribute:a.converter}:a.converter?.fromAttribute!==void 0?a.converter:ni;this._$Em=n;let l=s.fromAttribute(t,a.type);this[n]=l??this._$Ej?.get(n)??l,this._$Em=null}}requestUpdate(o,t,r,n=!1,a){if(o!==void 0){let s=this.constructor;if(n===!1&&(a=this[o]),r??(r=s.getPropertyOptions(o)),!((r.hasChanged??Na)(a,t)||r.useDefault&&r.reflect&&a===this._$Ej?.get(o)&&!this.hasAttribute(s._$Eu(o,r))))return;this.C(o,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(o,t,{useDefault:r,reflect:n,wrapped:a},s){r&&!(this._$Ej??(this._$Ej=new Map)).has(o)&&(this._$Ej.set(o,s??t??this[o]),a!==!0||s!==void 0)||(this._$AL.has(o)||(this.hasUpdated||r||(t=void 0),this._$AL.set(o,t)),n===!0&&this._$Em!==o&&(this._$Eq??(this._$Eq=new Set)).add(o))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let o=this.scheduleUpdate();return o!=null&&await o,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[n,a]of this._$Ep)this[n]=a;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[n,a]of r){let{wrapped:s}=a,l=this[n];s!==!0||this._$AL.has(n)||l===void 0||this.C(n,void 0,a,l)}}let o=!1,t=this._$AL;try{o=this.shouldUpdate(t),o?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw o=!1,this._$EM(),r}o&&this._$AE(t)}willUpdate(o){}_$AE(o){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(o)),this.updated(o)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(o){return!0}update(o){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(o){}firstUpdated(o){}};Ln.elementStyles=[],Ln.shadowRootOptions={mode:"open"},Ln[Js("elementProperties")]=new Map,Ln[Js("finalized")]=new Map,Y_?.({ReactiveElement:Ln}),(oi.reactiveElementVersions??(oi.reactiveElementVersions=[])).push("2.1.2");var Zs=globalThis,ii=class extends Ln{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;let o=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=o.firstChild),o}update(o){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(o),this._$Do=Da(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ae}};ii._$litElement$=!0,ii.finalized=!0,Zs.litElementHydrateSupport?.({LitElement:ii});var X_=Zs.litElementPolyfillSupport;X_?.({LitElement:ii});(Zs.litElementVersions??(Zs.litElementVersions=[])).push("4.2.2");var yg=new WeakMap;function zg(i){let o=yg.get(i);return o||(o=window.getComputedStyle(i,null),yg.set(i,o)),o}function Q_(i){if(typeof i.checkVisibility=="function")return i.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});let o=zg(i);return o.visibility!=="hidden"&&o.display!=="none"}function J_(i){let o=zg(i),{overflowY:t,overflowX:r}=o;return t==="scroll"||r==="scroll"?!0:t!=="auto"||r!=="auto"?!1:i.scrollHeight>i.clientHeight&&t==="auto"||i.scrollWidth>i.clientWidth&&r==="auto"}function Z_(i){let o=i.tagName.toLowerCase(),t=Number(i.getAttribute("tabindex"));return i.hasAttribute("tabindex")&&(isNaN(t)||t<=-1)||i.hasAttribute("disabled")||i.closest("[inert]")||o==="input"&&i.getAttribute("type")==="radio"&&!i.hasAttribute("checked")||!Q_(i)?!1:(o==="audio"||o==="video")&&i.hasAttribute("controls")||i.hasAttribute("tabindex")||i.hasAttribute("contenteditable")&&i.getAttribute("contenteditable")!=="false"||["button","input","select","textarea","a","audio","video","summary","iframe"].includes(o)?!0:J_(i)}function wg(i){let o=xh(i),t=o[0]??null,r=o[o.length-1]??null;return{start:t,end:r}}function tk(i,o){return i.getRootNode({composed:!0})?.host!==o}function xh(i){let o=new WeakMap,t=[];function r(n){if(n instanceof Element){if(n.hasAttribute("inert")||n.closest("[inert]")||o.has(n))return;o.set(n,!0),!t.includes(n)&&Z_(n)&&t.push(n),n instanceof HTMLSlotElement&&tk(n,i)&&n.assignedElements({flatten:!0}).forEach(a=>{r(a)}),n.shadowRoot!==null&&n.shadowRoot.mode==="open"&&r(n.shadowRoot)}for(let a of n.children)r(a)}return r(i),t.sort((n,a)=>{let s=Number(n.getAttribute("tabindex"))||0;return(Number(a.getAttribute("tabindex"))||0)-s})}var _g=new WeakMap,yh=class{constructor(o){this.handleKeyDown=o=>{if(o.key==="Enter"){if(o.altKey||o.ctrlKey||o.metaKey||o.shiftKey||o.isComposing||o.defaultPrevented)return;let r=o.target;if(this.isSelectOption(r)){o.preventDefault(),setTimeout(()=>{let a=this.findParentSelect(r);a&&this.focusNextControl(a)},0);return}if(this.shouldSkipEnterKey(r)||r.hasAttribute("trigger-submit"))return;let n=this.findParentGroup(r);if(n){o.preventDefault(),this.focusNextInGroup(r,n)||this.focusNextControl(n);return}o.preventDefault(),this.areRequiredFieldsFilled()?this.submitForm():this.focusNextControl(r);return}if(o.key==="ArrowDown"){let t=o.target,r=t.tagName;if(!(o.altKey||o.ctrlKey||o.metaKey||o.shiftKey)&&!o.defaultPrevented){let a=this.findParentGroup(t);if(a){o.preventDefault(),this.focusNextInGroup(t,a)||this.focusNextControl(a);return}(r==="ZN-CHECKBOX"||r==="ZN-TOGGLE")&&(o.preventDefault(),this.focusNextControl(t))}}if(o.key==="ArrowUp"){let t=o.target,r=t.tagName;if(!(o.altKey||o.ctrlKey||o.metaKey||o.shiftKey)&&!o.defaultPrevented){let a=this.findParentGroup(t);if(a){o.preventDefault(),this.focusPreviousInGroup(t,a)||this.focusPreviousControl(a);return}(r==="ZN-CHECKBOX"||r==="ZN-TOGGLE")&&(o.preventDefault(),this.focusPreviousControl(t))}}};this.form=o,this.form.addEventListener("keydown",this.handleKeyDown,!0)}shouldSkipEnterKey(o){let t=o.tagName.toLowerCase();return t==="zn-textarea"||t==="textarea"||(t==="zn-input"||t==="input")&&o.getAttribute("type")==="search"?!0:t==="button"||t==="zn-button"}shouldExcludeFromNavigation(o){let t=o.tagName.toLowerCase();return t==="button"||t==="zn-button"}isSelectOption(o){return o.tagName.toLowerCase()==="zn-option"}findParentSelect(o){let t=o;for(;t;){if(t.tagName.toLowerCase()==="zn-select")return t;let r=t.getRootNode();if(r instanceof ShadowRoot)t=r.host;else if(t.parentElement)t=t.parentElement;else break}return null}findParentGroup(o){let t=o;for(;t;){let r=t.tagName;if(r==="ZN-RADIO-GROUP"||r==="ZN-CHECKBOX-GROUP")return t;let n=t.getRootNode();if(n instanceof ShadowRoot)t=n.host;else if(t.parentElement)t=t.parentElement;else break}return null}getGroupItems(o){let t=o.tagName==="ZN-RADIO-GROUP"?"ZN-RADIO":"ZN-CHECKBOX",r=[],n=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tagName===t?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}),a;for(;a=n.nextNode();)r.push(a);return r}focusNextInGroup(o,t){let r=this.getGroupItems(t);if(r.length===0)return!1;let n=-1;for(let a=0;a<r.length;a++)if(r[a]===o||r[a].contains(o)){n=a;break}if(n>=0&&n<r.length-1){let a=r[n+1];if(typeof a.focus=="function")return a.focus(),!0}return!1}focusPreviousInGroup(o,t){let r=this.getGroupItems(t);if(r.length===0)return!1;let n=-1;for(let a=0;a<r.length;a++)if(r[a]===o||r[a].contains(o)){n=a;break}if(n>0){let a=r[n-1];if(typeof a.focus=="function")return a.focus(),!0}return!1}areRequiredFieldsFilled(){let o=Zi.get(this.form);if(!o)return!0;for(let t of o){let r=t;if(!r.name||r.disabled)continue;let n=r.value;if(!(n!=null&&n!=="")||typeof r.checkValidity=="function"&&!r.checkValidity())return!1}return!0}getNavigableControls(){let o=xh(this.form),t=[],r=new Set;for(let n of o){let a=n.tagName.toLowerCase();if(["zn-input","zn-select","zn-datepicker","zn-textarea","zn-file","zn-checkbox","zn-radio","zn-radio-group","zn-toggle"].includes(a)){if(a==="zn-radio"){let h=n.closest("zn-radio-group");if(h){r.has(h)||(r.add(h),this.shouldExcludeFromNavigation(h)||t.push(h));continue}}if(r.has(n)||(r.add(n),this.shouldExcludeFromNavigation(n)))continue;t.push(n);continue}let l=n.getRootNode().host;if(l&&l!==this.form){let h=l.tagName.toLowerCase();if(["zn-input","zn-select","zn-datepicker","zn-textarea","zn-file","zn-checkbox","zn-radio","zn-radio-group","zn-toggle"].includes(h)){if(h==="zn-radio"){let f=l.closest("zn-radio-group");if(f){r.has(f)||(r.add(f),this.shouldExcludeFromNavigation(f)||t.push(f));continue}}if(r.has(l)||(r.add(l),this.shouldExcludeFromNavigation(l)))continue;t.push(l);continue}}if(["input","select"].includes(a)){if(r.has(n)||(r.add(n),n.getAttribute("type")==="search"))continue;t.push(n)}}return t}findCurrentControlIndex(o,t){for(let r=0;r<t.length;r++){let n=t[r];if(n===o)return r;let a=o.getRootNode();if(a instanceof ShadowRoot&&a.host===n||n.contains(o)||o.contains(n))return r}return-1}focusNextControl(o){let t=this.getNavigableControls(),r=this.findCurrentControlIndex(o,t);if(r>=0&&r<t.length-1){let n=t[r+1];if(typeof n.focus=="function"&&(n.focus(),n.tagName.toLowerCase()==="zn-select")){let s=n;typeof s.show=="function"&&setTimeout(()=>{s.show?.()},0)}}}focusPreviousControl(o){let t=this.getNavigableControls(),r=this.findCurrentControlIndex(o,t);if(r>0){let n=t[r-1];if(typeof n.focus=="function"&&(n.focus(),n.tagName.toLowerCase()==="zn-select")){let s=n;typeof s.show=="function"&&setTimeout(()=>{s.show?.()},0)}}}submitForm(){let o=this.form.querySelector('[type="submit"]');if(o)o.click();else if(typeof this.form.requestSubmit=="function")this.form.requestSubmit();else{let t=new Event("submit",{bubbles:!0,cancelable:!0});this.form.dispatchEvent(t)}}destroy(){this.form.removeEventListener("keydown",this.handleKeyDown,!0)}};function kg(i){let o=_g.get(i);return o||(o=new yh(i),_g.set(i,o)),o}var mr=class{constructor(o,t,r=0){this.storage=o,this.prefix=t,this.ttl=r*1e3,this.cleanup()}get(o){return!o||o.length<1?null:this.stripTtl(this.storage.getItem(this.prefix+o))}stripTtl(o){if(o===null)return null;let t=o.split(",");if(t.length===1)return t[0];let r=t.shift(),n=r?parseInt(r):0;return n>0&&n<Date.now()?null:t.join(",")||""}setWithTTL(o,t,r){!o||o.length<1||(r=r>0?Date.now()+r*1e3:0,this.storage.setItem(this.prefix+o,r+","+t))}set(o,t){this.setWithTTL(o,t,this.ttl)}remove(o){this.storage.removeItem(this.prefix+o)}cleanup(){for(let o=0;o<this.storage.length;o++){let t=this.storage.key(o);t!==null&&t.startsWith(this.prefix)&&this.stripTtl(this.storage.getItem(t))===null&&this.storage.removeItem(t)}}};var Zi=new WeakMap,tl=new WeakMap,el=new WeakMap,Oc=new WeakMap,zh=new WeakSet,Pc=new WeakMap,$g="znform:";function wh(i=!1){try{return i?window.localStorage:window.sessionStorage}catch{return null}}function ek(i=!1,o=0){let t=wh(i);return t?new mr(t,$g,o):null}function Cg(i){let o=i?.getAttribute("store-ttl");return o&&Number(o)||0}function Sg(i){return!!i?.hasAttribute("local-storage")}function Ag(i){return i?.getAttribute("store-key")||""}function rk(i){return i.getAttribute("store-key")||""}function ok(i){return i.getAttribute("name")||("name"in i&&typeof i.name=="string"?i.name:"")}function Lg(i,o){let t=rk(i),r=Ag(o);if(t)return r?`${r}:${t}`:t;let n=ok(i);return r&&n?`${r}:${n}`:""}function Mg(i,o){let t=Sg(i)||Sg(o),r=Cg(i)||Cg(o);return ek(t,r)}function qg(i,o){let t=Lg(i,o),n=(t?Mg(i,o):null)?.get(t);if(!n)return null;try{return JSON.parse(n)}catch{return{value:n}}}function Ig(i,o,t){let r=Lg(i,o),n=r?Mg(i,o):null;n&&n.set(r,JSON.stringify(t))}function nk(i){return i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement||i instanceof HTMLSelectElement}function ik(i){return i instanceof HTMLInputElement&&(i.type==="checkbox"||i.type==="radio")?{checked:i.checked,value:i.value}:{value:i.value}}function ak(i){i.querySelectorAll("input, textarea, select").forEach(t=>{let r=qg(t,i);if(r){if(t instanceof HTMLInputElement&&(t.type==="checkbox"||t.type==="radio")){typeof r.checked=="boolean"&&(t.checked=r.checked);return}"value"in r&&(t.value=String(r.value??""))}})}function Eg(i,o){!nk(i)||i.form!==o||Ig(i,o,ik(i))}function sk(i,o){let t={value:o};return"checked"in i&&typeof i.checked=="boolean"&&(t.checked=i.checked),"indeterminate"in i&&typeof i.indeterminate=="boolean"&&(t.indeterminate=i.indeterminate),t}function Tg(i,o){let t=[],r=$g+o;for(let n=0;n<i.length;n++){let a=i.key(n);(a===r||a?.startsWith(r+":"))&&t.push(a)}t.forEach(n=>i.removeItem(n))}function lk(i){let o=typeof i=="string"?i:Ag(i);if(!o)return;let t=wh(!0),r=wh(!1);t&&Tg(t,o),r&&r!==t&&Tg(r,o)}var nt=class{constructor(o,t){this.handleFormData=o=>{let t=this.options.disabled(this.host),r=this.options.name(this.host),n=this.options.value(this.host),a=this.host.tagName.toLowerCase()==="zn-button";if(this.host.isConnected&&!t&&!a&&r.length>0&&typeof n<"u"){let s=m=>{o.formData.append(r,m.toString())},l=(m,f)=>{let b=m,g=f??(typeof b.name=="string"?b.name:void 0);typeof g=="string"?o.formData.append(r,m,g):o.formData.append(r,m)},d=m=>typeof FileList<"u"&&m instanceof FileList,h=m=>typeof Blob<"u"&&m instanceof Blob;if(d(n)){if(n.length>0)for(let m=0;m<n.length;m++){let f=n.item(m);f&&l(f,f.name)}}else h(n)?l(n,n.name):Array.isArray(n)?n.forEach(m=>{if(h(m))l(m,m.name);else if(d(m)){let f=m;for(let b=0;b<f.length;b++){let g=f.item(b);g&&l(g,g.name)}}else s(m)}):s(n);this.host.dispatchEvent(new CustomEvent("zn-formdata",{bubbles:!0,composed:!0}))}};this.handleFormSubmit=o=>{let t=this.options.disabled(this.host),r=this.options.reportValidity;this.form&&!this.form.noValidate&&Zi.get(this.form)?.forEach(s=>{this.setUserInteracted(s,!0)});let n=this.form?.querySelector('[type="submit"]'),a=n?.innerHTML??"Submit";n&&(n.setAttribute("data-original-text",a),setTimeout(()=>{n.disabled=!0,n.innerHTML=this.form?.hasAttribute("data-no-loading-text")?a:this.form?.getAttribute("data-loading-text")||"Processing..."},20),setTimeout(()=>{n.disabled=!1,n.innerHTML=a},15e3)),this.form&&!this.form.noValidate&&!t&&!r(this.host)&&(o.preventDefault(),o.stopImmediatePropagation(),n&&(n.disabled=!1,n.innerHTML=a))};this.enableSubmit=o=>{if(o.target!==this.form)return;let r=this.form?.querySelector('[type="submit"]');if(r){let n=r.getAttribute("data-original-text")??r.innerHTML;r.disabled=!1,r.innerHTML=n}};this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),Pc.set(this.host,[])};this.handleInteraction=o=>{let t=Pc.get(this.host);t.includes(o.type)||t.push(o.type),t.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0),this.persistHostValue(),this.checkFormValidity()};this.checkFormValidity=()=>{let o=this.form?.querySelector('[type="submit"]');if(this.form&&!this.form.noValidate){let t=this.form.querySelectorAll("*");for(let r of t)if(typeof r.checkValidity=="function"&&!r.checkValidity())return o?.setAttribute("disabled","disabled"),!1}return o?.removeAttribute("disabled"),!0};this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){let o=this.form.querySelectorAll("*");for(let t of o)if(typeof t.reportValidity=="function"&&!t.reportValidity())return!1}return!0};(this.host=o).addController(this),this.options={form:r=>{let n=r.form;if(n){let s=r.getRootNode().querySelector(`#${n}`);if(s)return s}return r.closest("form")},name:r=>r.name,value:r=>r.value,defaultValue:r=>r.defaultValue,disabled:r=>r.disabled??!1,reportValidity:r=>typeof r.reportValidity=="function"?r.reportValidity():!0,checkValidity:r=>typeof r.checkValidity=="function"?r.checkValidity():!0,setValue:(r,n)=>r.value=n,assumeInteractionOn:["zn-input"],...t}}async hostConnected(){let o=this.options.form(this.host);o&&this.attachForm(o),Pc.set(this.host,[]),this.options.assumeInteractionOn.forEach(t=>{this.host.addEventListener(t,this.handleInteraction)}),await this.host.updateComplete,this.restorePersistedValue(),o&&this.checkFormValidity()}hostDisconnected(){this.detachForm(),Pc.delete(this.host),this.options.assumeInteractionOn.forEach(o=>{this.host.removeEventListener(o,this.handleInteraction)})}hostUpdated(){let o=this.options.form(this.host);o||this.detachForm(),o&&this.form!==o&&(this.detachForm(),this.attachForm(o)),this.host.hasUpdated&&this.setValidity(this.host.validity?.valid)}attachForm(o){if(!o){this.form=void 0;return}this.form=o,Zi.has(this.form)?Zi.get(this.form).add(this.host):Zi.set(this.form,new Set([this.host])),this.form.hasAttribute("data-enter-navigation")&&kg(this.form),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),this.form.addEventListener("complete",this.enableSubmit),this.form.addEventListener("cancelled",this.enableSubmit),this.form.addEventListener("error",this.enableSubmit),this.attachFormPersistence(this.form),tl.has(this.form)||(tl.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),el.has(this.form)||(el.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())}detachForm(){if(!this.form)return;let o=Zi.get(this.form);o&&(o.delete(this.host),o.size<=0&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),this.form.removeEventListener("complete",this.enableSubmit),this.form.removeEventListener("cancelled",this.enableSubmit),this.form.removeEventListener("error",this.enableSubmit),this.detachFormPersistence(this.form),tl.has(this.form)&&(this.form.reportValidity=tl.get(this.form),tl.delete(this.form)),el.has(this.form)&&(this.form.checkValidity=el.get(this.form),el.delete(this.form)),this.form=void 0))}attachFormPersistence(o){if(Oc.has(o))return;let t=n=>Eg(n.target,o),r=n=>Eg(n.target,o);o.addEventListener("input",t),o.addEventListener("change",r),Oc.set(o,{handleInput:t,handleChange:r}),ak(o)}detachFormPersistence(o){let t=Oc.get(o);t&&(o.removeEventListener("input",t.handleInput),o.removeEventListener("change",t.handleChange),Oc.delete(o))}restorePersistedValue(){let o=qg(this.host,this.form);o&&("checked"in this.host&&typeof o.checked=="boolean"?this.options.setValue(this.host,o.checked):"value"in o&&this.options.setValue(this.host,o.value),"indeterminate"in this.host&&typeof o.indeterminate=="boolean"&&(this.host.indeterminate=o.indeterminate))}persistHostValue(){Ig(this.host,this.form,sk(this.host,this.options.value(this.host)))}setUserInteracted(o,t){t?zh.add(o):zh.delete(o),o.requestUpdate()}doAction(o,t){if(this.form){let r=document.createElement("button");r.type=o,r.style.position="absolute",r.style.width="0",r.style.height="0",r.style.clipPath="inset(50%)",r.style.overflow="hidden",r.style.whiteSpace="nowrap",t&&(r.name=t.name,r.value=t.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(n=>{t.hasAttribute(n)&&r.setAttribute(n,t.getAttribute(n))})),this.form.append(r),this.form instanceof HTMLFormElement&&document.dispatchEvent(new CustomEvent("zn-register-element",{detail:{element:this.form}})),r.click(),r.remove()}}getForm(){return this.form??null}reset(o){this.doAction("reset",o)}submit(o){this.doAction("submit",o)}setValidity(o){let t=this.host,r=!!zh.has(t),n=!!t.required;t.toggleAttribute("data-required",n),t.toggleAttribute("data-optional",!n),t.toggleAttribute("data-invalid",!o),t.toggleAttribute("data-valid",o),t.toggleAttribute("data-user-invalid",!o&&r),t.toggleAttribute("data-user-valid",o&&r)}updateValidity(){let o=this.host;this.setValidity(o.validity?.valid)}emitInvalidEvent(o){let t=new CustomEvent("zn-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});o||t.preventDefault(),this.host.dispatchEvent(t)||o?.preventDefault()}},ge=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}),Hc=Object.freeze({...ge,customError:!0,valid:!1}),Fc=Object.freeze({...ge,valueMissing:!0,valid:!1});var Q=class{constructor(o,...t){this.slotNames=[];this.handleSlotChange=o=>{let t=o.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()};(this.host=o).addController(this),this.slotNames=t}hasDefaultSlot(){return[...this.host.childNodes].some(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent.trim()!=="")return!0;if(o.nodeType===o.ELEMENT_NODE){let t=o;if(t.tagName.toLowerCase()==="zn-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(o){return this.host.querySelector(`:scope > [slot="${o}"]`)!==null}test(o){return o==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(o)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}getSlot(o){return this.host.querySelector(`:scope > [slot="${o}"]`)}getDefaultSlot(){return[...this.host.childNodes].filter(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent.trim()!=="")return!0;if(o.nodeType===o.ELEMENT_NODE){let t=o;if(t.tagName.toLowerCase()==="zn-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}getSlots(o){return this.host.querySelectorAll(`:scope > [slot="${o}"]`)}};function Dg(i){if(!i)return"";let o=i.assignedNodes({flatten:!0}),t="";return[...o].forEach(r=>{r.nodeType===Node.TEXT_NODE&&(t+=r.textContent)}),t}var Rg=Symbol.for(""),ck=i=>{if(i?.r===Rg)return i?._$litStatic$};var Mn=(i,...o)=>({_$litStatic$:o.reduce((t,r,n)=>t+(a=>{if(a._$litStatic$!==void 0)return a._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${a}. Use 'unsafeStatic' to pass non-literal values, but
|
|
5
5
|
take care to ensure page security.`)})(r)+i[n+1],i[0]),r:Rg}),Ng=new Map,_h=i=>(o,...t)=>{let r=t.length,n,a,s=[],l=[],d,h=0,m=!1;for(;h<r;){for(d=o[h];h<r&&(a=t[h],(n=ck(a))!==void 0);)d+=n+o[++h],m=!0;h!==r&&l.push(a),s.push(d),h++}if(h===r&&s.push(o[r]),m){let f=s.join("$$lit$$");(o=Ng.get(f))===void 0&&(s.raw=s,Ng.set(f,o=s)),t=l}return i(o,...t)},le=_h(u),wq=_h(No),_q=_h(hg);var H=i=>i??V;var Og=i=>(o,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(i,o)}):customElements.define(i,o)};var dk={attribute:!0,type:String,converter:ni,reflect:!1,hasChanged:Na},pk=(i=dk,o,t)=>{let{kind:r,metadata:n}=t,a=globalThis.litPropertyMetadata.get(n);if(a===void 0&&globalThis.litPropertyMetadata.set(n,a=new Map),r==="setter"&&((i=Object.create(i)).wrapped=!0),a.set(t.name,i),r==="accessor"){let{name:s}=t;return{set(l){let d=o.get.call(this);o.set.call(this,l),this.requestUpdate(s,d,i,!0,l)},init(l){return l!==void 0&&this.C(s,void 0,i,l),l}}}if(r==="setter"){let{name:s}=t;return function(l){let d=this[s];o.call(this,l),this.requestUpdate(s,d,i,!0,l)}}throw Error("Unsupported decorator location: "+r)};function p(i){return(o,t)=>typeof t=="object"?pk(i,o,t):((r,n,a)=>{let s=n.hasOwnProperty(a);return n.constructor.createProperty(a,r),s?Object.getOwnPropertyDescriptor(n,a):void 0})(i,o,t)}function O(i){return p({...i,state:!0,attribute:!1})}function Pg(i){return(o,t)=>{let r=typeof o=="function"?o:o[t];Object.assign(r,i)}}var nn=(i,o,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof o!="object"&&Object.defineProperty(i,o,t),t);function F(i,o){return(t,r,n)=>{let a=s=>s.renderRoot?.querySelector(i)??null;if(o){let{get:s,set:l}=typeof r=="object"?t:n??(()=>{let d=Symbol();return{get(){return this[d]},set(h){this[d]=h}}})();return nn(t,r,{get(){let d=s.call(this);return d===void 0&&(d=a(this),(d!==null||this.hasUpdated)&&l.call(this,d)),d}})}return nn(t,r,{get(){return a(this)}})}}var hk;function Ra(i){return(o,t)=>nn(o,t,{get(){return(this.renderRoot??hk??(hk=document.createDocumentFragment())).querySelectorAll(i)}})}function Hg(i){return(o,t)=>nn(o,t,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(i)??null}})}function Fg(i){return(o,t)=>{let{slot:r}=i??{},n="slot"+(r?`[name=${r}]`:":not([name])");return nn(o,t,{get(){return this.renderRoot?.querySelector(n)?.assignedNodes(i)??[]}})}}var Bg="important",uk=" !"+Bg,Sr=se(class extends Xe{constructor(i){if(super(i),i.type!==or.ATTRIBUTE||i.name!=="style"||i.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(i){return Object.keys(i).reduce((o,t)=>{let r=i[t];return r==null?o:o+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(i,[o]){let{style:t}=i.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(o)),this.render(o);for(let r of this.ft)o[r]==null&&(this.ft.delete(r),r.includes("-")?t.removeProperty(r):t[r]=null);for(let r in o){let n=o[r];if(n!=null){this.ft.add(r);let a=typeof n=="string"&&n.endsWith(uk);r.includes("-")||a?t.setProperty(r,a?n.slice(0,-11):n,a?Bg:""):t[r]=n}}return ae}});function K(i,o){let t={waitUntilFirstUpdate:!1,...o};return(r,n)=>{let{update:a}=r,s=Array.isArray(i)?i:[i];r.update=function(l){s.forEach(d=>{let h=d;if(l.has(h)){let m=l.get(h),f=this[h];m!==f&&(!t.waitUntilFirstUpdate||this.hasUpdated)&&this[n](m,f)}}),a.call(this,l)}}}var mk=Object.defineProperty,fk=(i,o,t)=>o in i?mk(i,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[o]=t,kh=(i,o,t)=>(fk(i,typeof o!="symbol"?o+"":o,t),t),gk=(i,o,t)=>{if(!o.has(i))throw TypeError("Cannot "+t)},Ch=(i,o)=>{if(Object(o)!==o)throw TypeError('Cannot use the "in" operator on this value');return i.has(o)},Bc=(i,o,t)=>{if(o.has(i))throw TypeError("Cannot add the same private member more than once");o instanceof WeakSet?o.add(i):o.set(i,t)},Vg=(i,o,t)=>(gk(i,o,"access private method"),t);function Ug(i,o){return Object.is(i,o)}var Le=null,rl=!1,Vc=1,Uc=Symbol("SIGNAL");function Oa(i){let o=Le;return Le=i,o}function bk(){return Le}function vk(){return rl}var Ah={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function jc(i){if(rl)throw new Error(typeof ngDevMode<"u"&&ngDevMode?"Assertion error: signal read during notification phase":"");if(Le===null)return;Le.consumerOnSignalRead(i);let o=Le.nextProducerIndex++;if(Pa(Le),o<Le.producerNode.length&&Le.producerNode[o]!==i&&Th(Le)){let t=Le.producerNode[o];Gc(t,Le.producerIndexOfThis[o])}Le.producerNode[o]!==i&&(Le.producerNode[o]=i,Le.producerIndexOfThis[o]=Th(Le)?Wg(i,Le,o):0),Le.producerLastReadVersion[o]=i.version}function xk(){Vc++}function jg(i){if(!(!i.dirty&&i.lastCleanEpoch===Vc)){if(!i.producerMustRecompute(i)&&!kk(i)){i.dirty=!1,i.lastCleanEpoch=Vc;return}i.producerRecomputeValue(i),i.dirty=!1,i.lastCleanEpoch=Vc}}function Gg(i){if(i.liveConsumerNode===void 0)return;let o=rl;rl=!0;try{for(let t of i.liveConsumerNode)t.dirty||zk(t)}finally{rl=o}}function yk(){return Le?.consumerAllowSignalWrites!==!1}function zk(i){var o;i.dirty=!0,Gg(i),(o=i.consumerMarkedDirty)==null||o.call(i.wrapper??i)}function wk(i){return i&&(i.nextProducerIndex=0),Oa(i)}function _k(i,o){if(Oa(o),!(!i||i.producerNode===void 0||i.producerIndexOfThis===void 0||i.producerLastReadVersion===void 0)){if(Th(i))for(let t=i.nextProducerIndex;t<i.producerNode.length;t++)Gc(i.producerNode[t],i.producerIndexOfThis[t]);for(;i.producerNode.length>i.nextProducerIndex;)i.producerNode.pop(),i.producerLastReadVersion.pop(),i.producerIndexOfThis.pop()}}function kk(i){Pa(i);for(let o=0;o<i.producerNode.length;o++){let t=i.producerNode[o],r=i.producerLastReadVersion[o];if(r!==t.version||(jg(t),r!==t.version))return!0}return!1}function Wg(i,o,t){var r;if(Lh(i),Pa(i),i.liveConsumerNode.length===0){(r=i.watched)==null||r.call(i.wrapper);for(let n=0;n<i.producerNode.length;n++)i.producerIndexOfThis[n]=Wg(i.producerNode[n],i,n)}return i.liveConsumerIndexOfThis.push(t),i.liveConsumerNode.push(o)-1}function Gc(i,o){var t;if(Lh(i),Pa(i),typeof ngDevMode<"u"&&ngDevMode&&o>=i.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${o} is out of bounds of ${i.liveConsumerNode.length} consumers)`);if(i.liveConsumerNode.length===1){(t=i.unwatched)==null||t.call(i.wrapper);for(let n=0;n<i.producerNode.length;n++)Gc(i.producerNode[n],i.producerIndexOfThis[n])}let r=i.liveConsumerNode.length-1;if(i.liveConsumerNode[o]=i.liveConsumerNode[r],i.liveConsumerIndexOfThis[o]=i.liveConsumerIndexOfThis[r],i.liveConsumerNode.length--,i.liveConsumerIndexOfThis.length--,o<i.liveConsumerNode.length){let n=i.liveConsumerIndexOfThis[o],a=i.liveConsumerNode[o];Pa(a),a.producerIndexOfThis[n]=o}}function Th(i){var o;return i.consumerIsAlwaysLive||(((o=i?.liveConsumerNode)==null?void 0:o.length)??0)>0}function Pa(i){i.producerNode??(i.producerNode=[]),i.producerIndexOfThis??(i.producerIndexOfThis=[]),i.producerLastReadVersion??(i.producerLastReadVersion=[])}function Lh(i){i.liveConsumerNode??(i.liveConsumerNode=[]),i.liveConsumerIndexOfThis??(i.liveConsumerIndexOfThis=[])}function Kg(i){if(jg(i),jc(i),i.value===$h)throw i.error;return i.value}function Ck(i){let o=Object.create(Sk);o.computation=i;let t=()=>Kg(o);return t[Uc]=o,t}var Sh=Symbol("UNSET"),Eh=Symbol("COMPUTING"),$h=Symbol("ERRORED"),Sk={...Ah,value:Sh,dirty:!0,error:null,equal:Ug,producerMustRecompute(i){return i.value===Sh||i.value===Eh},producerRecomputeValue(i){if(i.value===Eh)throw new Error("Detected cycle in computations.");let o=i.value;i.value=Eh;let t=wk(i),r,n=!1;try{r=i.computation.call(i.wrapper),n=o!==Sh&&o!==$h&&i.equal.call(i.wrapper,o,r)}catch(a){r=$h,i.error=a}finally{_k(i,t)}if(n){i.value=o;return}i.value=r,i.version++}};function Ek(){throw new Error}var Tk=Ek;function $k(){Tk()}function Ak(i){let o=Object.create(qk);o.value=i;let t=()=>(jc(o),o.value);return t[Uc]=o,t}function Lk(){return jc(this),this.value}function Mk(i,o){yk()||$k(),i.equal.call(i.wrapper,i.value,o)||(i.value=o,Ik(i))}var qk={...Ah,equal:Ug,value:void 0};function Ik(i){i.version++,xk(),Gg(i)}var nr=Symbol("node"),Yt;(i=>{var o,t,r,n,a,s;class l{constructor(m,f={}){Bc(this,t),kh(this,o);let g=Ak(m)[Uc];if(this[nr]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[i.subtle.watched],g.unwatched=f[i.subtle.unwatched]}}get(){if(!(0,i.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return Lk.call(this[nr])}set(m){if(!(0,i.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(vk())throw new Error("Writes to signals not permitted during Watcher callback");let f=this[nr];Mk(f,m)}}o=nr,t=new WeakSet,r=function(){},i.isState=h=>typeof h=="object"&&Ch(t,h),i.State=l;class d{constructor(m,f){Bc(this,a),kh(this,n);let g=Ck(m)[Uc];if(g.consumerAllowSignalWrites=!0,this[nr]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[i.subtle.watched],g.unwatched=f[i.subtle.unwatched]}}get(){if(!(0,i.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return Kg(this[nr])}}n=nr,a=new WeakSet,s=function(){},i.isComputed=h=>typeof h=="object"&&Ch(a,h),i.Computed=d,(h=>{var m,f,b,g,v;function x($){let L,W=null;try{W=Oa(null),L=$()}finally{Oa(W)}return L}h.untrack=x;function _($){var L;if(!(0,i.isComputed)($)&&!(0,i.isWatcher)($))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((L=$[nr].producerNode)==null?void 0:L.map(W=>W.wrapper))??[]}h.introspectSources=_;function k($){var L;if(!(0,i.isComputed)($)&&!(0,i.isState)($))throw new TypeError("Called introspectSinks without a Signal argument");return((L=$[nr].liveConsumerNode)==null?void 0:L.map(W=>W.wrapper))??[]}h.introspectSinks=k;function N($){if(!(0,i.isComputed)($)&&!(0,i.isState)($))throw new TypeError("Called hasSinks without a Signal argument");let L=$[nr].liveConsumerNode;return L?L.length>0:!1}h.hasSinks=N;function G($){if(!(0,i.isComputed)($)&&!(0,i.isWatcher)($))throw new TypeError("Called hasSources without a Computed or Watcher argument");let L=$[nr].producerNode;return L?L.length>0:!1}h.hasSources=G;class I{constructor(L){Bc(this,f),Bc(this,g),kh(this,m);let W=Object.create(Ah);W.wrapper=this,W.consumerMarkedDirty=L,W.consumerIsAlwaysLive=!0,W.consumerAllowSignalWrites=!1,W.producerNode=[],this[nr]=W}watch(...L){if(!(0,i.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");Vg(this,g,v).call(this,L);let W=this[nr];W.dirty=!1;let tt=Oa(W);for(let ht of L)jc(ht[nr]);Oa(tt)}unwatch(...L){if(!(0,i.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");Vg(this,g,v).call(this,L);let W=this[nr];Pa(W);for(let tt=W.producerNode.length-1;tt>=0;tt--)if(L.includes(W.producerNode[tt].wrapper)){Gc(W.producerNode[tt],W.producerIndexOfThis[tt]);let ht=W.producerNode.length-1;if(W.producerNode[tt]=W.producerNode[ht],W.producerIndexOfThis[tt]=W.producerIndexOfThis[ht],W.producerNode.length--,W.producerIndexOfThis.length--,W.nextProducerIndex--,tt<W.producerNode.length){let gt=W.producerIndexOfThis[tt],_t=W.producerNode[tt];Lh(_t),_t.liveConsumerIndexOfThis[gt]=tt}}}getPending(){if(!(0,i.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[nr].producerNode.filter(W=>W.dirty).map(W=>W.wrapper)}}m=nr,f=new WeakSet,b=function(){},g=new WeakSet,v=function($){for(let L of $)if(!(0,i.isComputed)(L)&&!(0,i.isState)(L))throw new TypeError("Called watch/unwatch without a Computed or State argument")},i.isWatcher=$=>Ch(f,$),h.Watcher=I;function w(){var $;return($=bk())==null?void 0:$.wrapper}h.currentComputed=w,h.watched=Symbol("watched"),h.unwatched=Symbol("unwatched")})(i.subtle||(i.subtle={}))})(Yt||(Yt={}));var Mh=!1,Yg=new Yt.subtle.Watcher(()=>{Mh||(Mh=!0,queueMicrotask(()=>{Mh=!1;for(let i of Yg.getPending())i.get();Yg.watch()}))}),Dk=Symbol("SignalWatcherBrand"),Nk=new FinalizationRegistry(i=>{i.unwatch(...Yt.subtle.introspectSources(i))}),Xg=new WeakMap;function Wc(i){return i[Dk]===!0?(console.warn("SignalWatcher should not be applied to the same class more than once."),i):class extends i{constructor(){super(...arguments),this._$St=new Map,this._$So=new Yt.State(0),this._$Si=!1}_$Sl(){var o,t;let r=[],n=[];this._$St.forEach((s,l)=>{(s?.beforeUpdate?r:n).push(l)});let a=(o=this.h)===null||o===void 0?void 0:o.getPending().filter(s=>s!==this._$Su&&!this._$St.has(s));r.forEach(s=>s.get()),(t=this._$Su)===null||t===void 0||t.get(),a.forEach(s=>s.get()),n.forEach(s=>s.get())}_$Sv(){this.isUpdatePending||queueMicrotask(()=>{this.isUpdatePending||this._$Sl()})}_$S_(){if(this.h!==void 0)return;this._$Su=new Yt.Computed(()=>{this._$So.get(),super.performUpdate()});let o=this.h=new Yt.subtle.Watcher(function(){let t=Xg.get(this);t!==void 0&&(t._$Si===!1&&(new Set(this.getPending()).has(t._$Su)?t.requestUpdate():t._$Sv()),this.watch())});Xg.set(o,this),Nk.register(this,o),o.watch(this._$Su),o.watch(...Array.from(this._$St).map(([t])=>t))}_$Sp(){if(this.h===void 0)return;let o=!1;this.h.unwatch(...Yt.subtle.introspectSources(this.h).filter(t=>{var r;let n=((r=this._$St.get(t))===null||r===void 0?void 0:r.manualDispose)!==!0;return n&&this._$St.delete(t),o||(o=!n),n})),o||(this._$Su=void 0,this.h=void 0,this._$St.clear())}updateEffect(o,t){var r;this._$S_();let n=new Yt.Computed(()=>{o()});return this.h.watch(n),this._$St.set(n,t),(r=t?.beforeUpdate)!==null&&r!==void 0&&r?Yt.subtle.untrack(()=>n.get()):this.updateComplete.then(()=>Yt.subtle.untrack(()=>n.get())),()=>{this._$St.delete(n),this.h.unwatch(n),this.isConnected===!1&&this._$Sp()}}performUpdate(){this.isUpdatePending&&(this._$S_(),this._$Si=!0,this._$So.set(this._$So.get()+1),this._$Si=!1,this._$Sl())}connectedCallback(){super.connectedCallback(),this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected===!1&&this._$Sp()})}}}var{I:Rk}=fg,Qg=i=>i;var Kc=i=>i.strings===void 0,Jg=()=>document.createComment(""),Ha=(i,o,t)=>{let r=i._$AA.parentNode,n=o===void 0?i._$AB:o._$AA;if(t===void 0){let a=r.insertBefore(Jg(),n),s=r.insertBefore(Jg(),n);t=new Rk(a,s,i,i.options)}else{let a=t._$AB.nextSibling,s=t._$AM,l=s!==i;if(l){let d;t._$AQ?.(i),t._$AM=i,t._$AP!==void 0&&(d=i._$AU)!==s._$AU&&t._$AP(d)}if(a!==n||l){let d=t._$AA;for(;d!==a;){let h=Qg(d).nextSibling;Qg(r).insertBefore(d,n),d=h}}}return t},ai=(i,o,t=i)=>(i._$AI(o,t),i),Ok={},Fa=(i,o=Ok)=>i._$AH=o,Zg=i=>i._$AH,Yc=i=>{i._$AR(),i._$AA.remove()};var ol=(i,o)=>{let t=i._$AN;if(t===void 0)return!1;for(let r of t)r._$AO?.(o,!1),ol(r,o);return!0},Xc=i=>{let o,t;do{if((o=i._$AM)===void 0)break;t=o._$AN,t.delete(i),i=o}while(t?.size===0)},tb=i=>{for(let o;o=i._$AM;i=o){let t=o._$AN;if(t===void 0)o._$AN=t=new Set;else if(t.has(i))break;t.add(i),Fk(o)}};function Pk(i){this._$AN!==void 0?(Xc(this),this._$AM=i,tb(this)):this._$AM=i}function Hk(i,o=!1,t=0){let r=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(o)if(Array.isArray(r))for(let a=t;a<r.length;a++)ol(r[a],!1),Xc(r[a]);else r!=null&&(ol(r,!1),Xc(r));else ol(this,i)}var Fk=i=>{i.type==or.CHILD&&(i._$AP??(i._$AP=Hk),i._$AQ??(i._$AQ=Pk))},si=class extends Xe{constructor(){super(...arguments),this._$AN=void 0}_$AT(o,t,r){super._$AT(o,t,r),tb(this),this.isConnected=o._$AU}_$AO(o,t=!0){o!==this.isConnected&&(this.isConnected=o,o?this.reconnected?.():this.disconnected?.()),t&&(ol(this,o),Xc(this))}setValue(o){if(Kc(this._$Ct))this._$Ct._$AI(o,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=o,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var qh=!1,Ih=new Yt.subtle.Watcher(async()=>{qh||(qh=!0,queueMicrotask(()=>{qh=!1;for(let i of Ih.getPending())i.get();Ih.watch()}))}),Qc=class extends si{_$S_(){var o,t;this._$Sm===void 0&&(this._$Sj=new Yt.Computed(()=>{var r;let n=(r=this._$SW)===null||r===void 0?void 0:r.get();return this.setValue(n),n}),this._$Sm=(t=(o=this._$Sk)===null||o===void 0?void 0:o.h)!==null&&t!==void 0?t:Ih,this._$Sm.watch(this._$Sj),Yt.subtle.untrack(()=>{var r;return(r=this._$Sj)===null||r===void 0?void 0:r.get()}))}_$Sp(){this._$Sm!==void 0&&(this._$Sm.unwatch(this._$SW),this._$Sm=void 0)}render(o){return Yt.subtle.untrack(()=>o.get())}update(o,[t]){var r,n;return(r=this._$Sk)!==null&&r!==void 0||(this._$Sk=(n=o.options)===null||n===void 0?void 0:n.host),t!==this._$SW&&this._$SW!==void 0&&this._$Sp(),this._$SW=t,this._$S_(),Yt.subtle.untrack(()=>this._$SW.get())}disconnected(){this._$Sp()}reconnected(){this._$S_()}},Dh=se(Qc);var Nh=i=>(o,...t)=>i(o,...t.map(r=>r instanceof Yt.State||r instanceof Yt.Computed?Dh(r):r)),Bk=Nh(u),Vk=Nh(No);var NI=Yt.State,RI=Yt.Computed,eb=(i,o)=>new Yt.State(i,o);function ob(){return typeof document>"u"?"light":document.documentElement.getAttribute("t")||document.body.getAttribute("t")||"light"}var Jc=eb(ob()),rb=!1;function Uk(){rb||typeof window>"u"||(rb=!0,window.addEventListener("theme-change",i=>{let o=i.detail,t;typeof o=="string"?t=o:o&&typeof o=="object"&&"theme"in o&&typeof o.theme=="string"?t=o.theme:t=ob(),t!==Jc.get()&&Jc.set(t)}))}Uk();var jk=Wc(ii),C=class extends jk{willUpdate(o){this.t=Jc.get(),super.willUpdate(o)}static define(o,t=this,r={}){let n=customElements.get(o);if(!n){customElements.define(o,class extends t{},r);return}let a=" (unknown version)",s=a;"version"in t&&t.version&&typeof t.version=="string"&&(a=` v${t.version}`),"version"in n&&n.version&&typeof n.version=="string"&&(s=` v${n.version}`),!(a&&s&&a===s)&&console.warn(`Attempted to register <${o}>${a} but it is already registered as <${o}>${s}.`)}constructor(){super(),Object.entries(this.constructor.dependencies).forEach(([o,t])=>{this.constructor.define(o,t)})}emit(o,t){let r=new CustomEvent(o,{bubbles:!0,cancelable:!0,composed:!0,detail:{element:this},...t});return this.dispatchEvent(r),r}};C.dependencies={},c([p()],C.prototype,"dir",2),c([p()],C.prototype,"lang",2),c([p({reflect:!0})],C.prototype,"t",2);var ta=class extends Xe{constructor(o){if(super(o),this.it=V,o.type!==or.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(o){if(o===V||o==null)return this._t=void 0,this.it=o;if(o===ae)return o;if(typeof o!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(o===this.it)return this._t;this.it=o;let t=[o];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};ta.directiveName="unsafeHTML",ta.resultType=1;var Qe=se(ta);function go(i,o){return new Promise(t=>{function r(n){n.target===i&&(i.removeEventListener(o,r),t())}i.addEventListener(o,r)})}var Rh=class{constructor(){this.openDropdowns=new Set;this.openTooltips=new Set}registerDropdown(o){this.openDropdowns.add(o)}unregisterDropdown(o){this.openDropdowns.delete(o)}isDropdownOpen(){return this.openDropdowns.size>0}registerTooltip(o){this.openTooltips.add(o)}unregisterTooltip(o){this.openTooltips.delete(o)}isTooltipOpen(){return this.openTooltips.size>0}},Gk=new Rh,Ro=Gk;var nb=E`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block}.dropdown::part(popup){z-index:var(--zn-z-index-dropdown)}`;var be=class extends C{constructor(){super(...arguments);this.open=!1;this.placement="bottom-start";this.disabled=!1;this.stayOpenOnSelect=!1;this.distance=0;this.skidding=0;this.hoist=!0;this.sync=void 0;this.fetchedContent="";this.handlePanelSelect=t=>{let r=t.target;!this.stayOpenOnSelect&&r.tagName.toLowerCase()==="zn-menu"&&(this.hide().then(n=>n),this.focusOnTrigger())};this.handlePreload=()=>{this.preloadContent().then(t=>t)}}connectedCallback(){super.connectedCallback(),this.containingElement||(this.containingElement=this)}focusOnTrigger(){let t=this.trigger?.assignedElements({flatten:!0})[0];typeof t?.focus=="function"&&t.focus()}firstUpdated(t){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0),super.firstUpdated(t)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide().then(t=>t)}getMenu(){return this.panel.assignedElements({flatten:!0}).find(t=>t.tagName.toLowerCase()==="zn-menu")}addOpenListeners(){this.panel.addEventListener("zn-select",this.handlePanelSelect),"CloseWatcher"in window?(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide().then(t=>t),this.focusOnTrigger()}):this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown.bind(this)),document.addEventListener("mousedown",this.handleDocumentMouseDown.bind(this)),this.closeWatcher?.destroy()}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("zn-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.closeWatcher?.destroy()}async preloadContent(){if(this.uri&&!this.fetchedContent){let t=await fetch(this.uri,{credentials:"same-origin",headers:{"x-kx-inline":"inline"}});this.fetchedContent=await t.text(),this.requestUpdate()}}async handleTriggerClick(){this.open?await this.hide():(await this.show(),this.focusOnTrigger())}handleKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.hide().then(r=>r),this.focusOnTrigger())}async handleTriggerKeyDown(t){if([" ","Enter","Tab"].includes(t.key)){t.preventDefault(),await this.handleTriggerClick();return}let r=this.getMenu();if(r){let n=r.getAllItems(),a=n[0],s=n[n.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||(this.show().then(l=>l),await this.updateComplete),n.length>0&&this.updateComplete.then(()=>{(t.key==="ArrowDown"||t.key==="Home")&&(r.setCurrentItem(a),a.focus()),(t.key==="ArrowUp"||t.key==="End")&&(r.setCurrentItem(s),s.focus())}))}}handleTriggerKeyUp(t){t.key===" "&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}handleDocumentMouseDown(t){let r=t.composedPath();this.containingElement&&!r.includes(this.containingElement)&&this.hide().then(n=>n)}handleDocumentKeyDown(t){if(t.key==="Escape"&&this.open&&!this.closeWatcher){t.stopPropagation(),this.focusOnTrigger(),this.hide().then(r=>r);return}if(t.key==="Tab"){if(this.open){t.preventDefault(),this.hide().then(r=>r),this.focusOnTrigger();return}setTimeout(()=>{let r=this.containingElement?.getRootNode()instanceof ShadowRoot?document.activeElement?.shadowRoot?.activeElement:document.activeElement;(!this.containingElement||r?.closest(this.containingElement.tagName.toLowerCase())!==this.containingElement)&&this.hide().then(n=>n)})}}async show(){if(!this.open)return this.open=!0,go(this,"zn-after-show")}async hide(){if(this.open)return this.open=!1,go(this,"zn-after-hide")}reposition(){this.popup.reposition()}updateAccessibleTrigger(){let r=this.trigger.assignedElements({flatten:!0}).find(a=>wg(a).start),n=null;r&&(r.tagName.toLowerCase()==="zn-button"?n=r.button:n=r),n&&(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded",this.open.toString()))}handleOpenChange(){if(this.disabled){this.open=!1;return}if(this.updateAccessibleTrigger(),this.open)this.emit("zn-show"),Ro.registerDropdown(this),this.addOpenListeners(),this.panel.hidden=!1,this.popup.active=!0,this.panel.focus(),this.emit("zn-after-show");else{this.emit("zn-hide"),Ro.unregisterDropdown(this),this.removeOpenListeners();let t=this.getRootNode().activeElement;t&&this.panel.assignedElements({flatten:!0}).some(r=>r.contains(t))&&(this.focusOnTrigger(),t.blur()),this.panel.blur(),this.panel.hidden=!0,this.popup.active=!1,this.emit("zn-after-hide")}}render(){return u`
|
|
@@ -135,7 +135,7 @@ import{a as $n,b as P_,c as ur,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var $
|
|
|
135
135
|
${this.loadingText}<span class="loading-countdown"></span>
|
|
136
136
|
</span>
|
|
137
137
|
</div>
|
|
138
|
-
`:null}`}};st.styles=T(pb),st.dependencies={"zn-tooltip":Oo,"zn-icon":ct},c([F(".button")],st.prototype,"button",2),c([Ra(".loading-countdown")],st.prototype,"countdownContainer",2),c([p({})],st.prototype,"color",2),c([p({attribute:"hover-color"})],st.prototype,"hoverColor",2),c([p({type:Boolean})],st.prototype,"text",2),c([p({type:Boolean})],st.prototype,"outline",2),c([p({type:Boolean})],st.prototype,"disabled",2),c([p({type:Boolean})],st.prototype,"grow",2),c([p({type:Boolean})],st.prototype,"square",2),c([p({attribute:"icon-button",converter:{fromAttribute:t=>t==="small"||t==="round"?t:t!==null,toAttribute:t=>t==="small"||t==="round"?t:t?"":null}})],st.prototype,"iconButton",2),c([p({type:Boolean})],st.prototype,"plain",2),c([p({type:Boolean,attribute:"no-hover"})],st.prototype,"noHover",2),c([p({type:Boolean,attribute:"panel-bg"})],st.prototype,"panelBackground",2),c([p({attribute:"dropdown-closer",type:Boolean})],st.prototype,"dropdownCloser",2),c([p({type:Number})],st.prototype,"notification",2),c([p({attribute:"muted-notifications",type:Boolean})],st.prototype,"mutedNotifications",2),c([p()],st.prototype,"verticalAlign",2),c([p()],st.prototype,"content",2),c([p()],st.prototype,"icon",2),c([p()],st.prototype,"gaid",2),c([p({attribute:"icon-position"})],st.prototype,"iconPosition",2),c([p({attribute:"icon-size"})],st.prototype,"iconSize",2),c([p({attribute:"icon-color"})],st.prototype,"iconColor",2),c([p({attribute:"icon-fill"})],st.prototype,"iconFill",2),c([p({attribute:"icon-library"})],st.prototype,"iconLibrary",2),c([p()],st.prototype,"type",2),c([p()],st.prototype,"name",2),c([p()],st.prototype,"value",2),c([p()],st.prototype,"form",2),c([p({attribute:"formaction"})],st.prototype,"formAction",2),c([p({attribute:"formenctype"})],st.prototype,"formEnctype",2),c([p({attribute:"formmethod"})],st.prototype,"formMethod",2),c([p({attribute:"formnovalidate",type:Boolean})],st.prototype,"formNoValidate",2),c([p({attribute:"formtarget"})],st.prototype,"formTarget",2),c([p()],st.prototype,"href",2),c([p()],st.prototype,"target",2),c([p({attribute:"data-target"})],st.prototype,"dataTarget",2),c([p()],st.prototype,"rel",2),c([p()],st.prototype,"tooltip",2),c([p({type:Boolean,attribute:"auto-click"})],st.prototype,"autoClick",2),c([p({type:Number,attribute:"auto-click-delay"})],st.prototype,"autoClickDelay",2),c([p({type:String,attribute:"loading-text"})],st.prototype,"loadingText",2),c([p({type:String,attribute:"loading-text-position"})],st.prototype,"loadingTextPosition",2),c([p({type:Boolean})],st.prototype,"loading",2),c([K("autoClick")],st.prototype,"handleAutoClickChange",1);var Ct=st;st.define("zn-button");var Lt=class{constructor(o,{target:t,config:r,callback:n,skipInitial:a}){this.t=new Set,this.o=!1,this.i=!1,this.h=o,t!==null&&this.t.add(t??o),this.l=r,this.o=a??this.o,this.callback=n,window.MutationObserver?(this.u=new MutationObserver(s=>{this.handleChanges(s),this.h.requestUpdate()}),o.addController(this)):console.warn("MutationController error: browser does not support MutationObserver.")}handleChanges(o){this.value=this.callback?.(o,this.u)}hostConnected(){for(let o of this.t)this.observe(o)}hostDisconnected(){this.disconnect()}async hostUpdated(){let o=this.u.takeRecords();(o.length||!this.o&&this.i)&&this.handleChanges(o),this.i=!1}observe(o){this.t.add(o),this.u.observe(o,this.l),this.i=!0,this.h.requestUpdate()}disconnect(){this.u.disconnect()}};var Va=class extends C{constructor(){super(),new Lt(this,{config:{childList:!0,subtree:!0,attributes:!0,characterData:!0},callback:()=>this.resize(),skipInitial:!0})}firstUpdated(o){super.firstUpdated(o),this.resize()}resize(){let o=0;Array.from(this.children).forEach(t=>{o+=t.getBoundingClientRect().height}),this.style.minHeight=o+"px"}createRenderRoot(){return this}};var Wk=Va;Va.define("zn-absolute-container");var an=Math.min,Po=Math.max,al=Math.round,sl=Math.floor,sn=i=>({x:i,y:i}),Kk={left:"right",right:"left",bottom:"top",top:"bottom"};function Hh(i,o,t){return Po(i,an(o,t))}function ea(i,o){return typeof i=="function"?i(o):i}function ci(i){return i.split("-")[0]}function ra(i){return i.split("-")[1]}function Fh(i){return i==="x"?"y":"x"}function td(i){return i==="y"?"height":"width"}function ln(i){let o=i[0];return o==="t"||o==="b"?"y":"x"}function ed(i){return Fh(ln(i))}function mb(i,o,t){t===void 0&&(t=!1);let r=ra(i),n=ed(i),a=td(n),s=n==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return o.reference[a]>o.floating[a]&&(s=il(s)),[s,il(s)]}function fb(i){let o=il(i);return[Zc(i),o,Zc(o)]}function Zc(i){return i.includes("start")?i.replace("start","end"):i.replace("end","start")}var hb=["left","right"],ub=["right","left"],Yk=["top","bottom"],Xk=["bottom","top"];function Qk(i,o,t){switch(i){case"top":case"bottom":return t?o?ub:hb:o?hb:ub;case"left":case"right":return o?Yk:Xk;default:return[]}}function gb(i,o,t,r){let n=ra(i),a=Qk(ci(i),t==="start",r);return n&&(a=a.map(s=>s+"-"+n),o&&(a=a.concat(a.map(Zc)))),a}function il(i){let o=ci(i);return Kk[o]+i.slice(o.length)}function Jk(i){var o,t,r,n;return{top:(o=i.top)!=null?o:0,right:(t=i.right)!=null?t:0,bottom:(r=i.bottom)!=null?r:0,left:(n=i.left)!=null?n:0}}function Bh(i){return typeof i!="number"?Jk(i):{top:i,right:i,bottom:i,left:i}}function oa(i){let{x:o,y:t,width:r,height:n}=i;return{width:r,height:n,top:t,left:o,right:o+r,bottom:t+n,x:o,y:t}}function bb(i,o,t){let{reference:r,floating:n}=i,a=ln(o),s=ed(o),l=td(s),d=ci(o),h=a==="y",m=r.x+r.width/2-n.width/2,f=r.y+r.height/2-n.height/2,b=r[l]/2-n[l]/2,g;switch(d){case"top":g={x:m,y:r.y-n.height};break;case"bottom":g={x:m,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-n.width,y:f};break;default:g={x:r.x,y:r.y}}let v=ra(o);return v&&(g[s]+=b*(v==="end"?1:-1)*(t&&h?-1:1)),g}async function vb(i,o){var t;o===void 0&&(o={});let{x:r,y:n,platform:a,rects:s,elements:l,strategy:d}=i,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:f="floating",altBoundary:b=!1,padding:g=0}=ea(o,i),v=Bh(g),_=l[b?f==="floating"?"reference":"floating":f],k=oa(await a.getClippingRect({element:(t=await(a.isElement==null?void 0:a.isElement(_)))==null||t?_:_.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:h,rootBoundary:m,strategy:d})),N=f==="floating"?{x:r,y:n,width:s.floating.width,height:s.floating.height}:s.reference,G=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),I=await(a.isElement==null?void 0:a.isElement(G))&&await(a.getScale==null?void 0:a.getScale(G))||{x:1,y:1},w=oa(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:G,strategy:d}):N);return{top:(k.top-w.top+v.top)/I.y,bottom:(w.bottom-k.bottom+v.bottom)/I.y,left:(k.left-w.left+v.left)/I.x,right:(w.right-k.right+v.right)/I.x}}var Zk=50,xb=async(i,o,t)=>{let{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:s}=t,l=s.detectOverflow?s:{...s,detectOverflow:vb},d=await(s.isRTL==null?void 0:s.isRTL(o)),h=await s.getElementRects({reference:i,floating:o,strategy:n}),{x:m,y:f}=bb(h,r,d),b=r,g=0,v={};for(let x=0;x<a.length;x++){let _=a[x];if(!_)continue;let{name:k,fn:N}=_,{x:G,y:I,data:w,reset:$}=await N({x:m,y:f,initialPlacement:r,placement:b,strategy:n,middlewareData:v,rects:h,platform:l,elements:{reference:i,floating:o}});m=G??m,f=I??f,v[k]={...v[k],...w},$&&g<Zk&&(g++,typeof $=="object"&&($.placement&&(b=$.placement),$.rects&&(h=$.rects===!0?await s.getElementRects({reference:i,floating:o,strategy:n}):$.rects),{x:m,y:f}=bb(h,b,d)),x=-1)}return{x:m,y:f,placement:b,strategy:n,middlewareData:v}},yb=i=>({name:"arrow",options:i,async fn(o){let{x:t,y:r,placement:n,rects:a,platform:s,elements:l,middlewareData:d}=o,{element:h,padding:m=0}=ea(i,o)||{};if(h==null)return{};let f=Bh(m),b={x:t,y:r},g=ed(n),v=td(g),x=await s.getDimensions(h),_=g==="y",k=_?"top":"left",N=_?"bottom":"right",G=_?"clientHeight":"clientWidth",I=a.reference[v]+a.reference[g]-b[g]-a.floating[v],w=b[g]-a.reference[g],$=await(s.getOffsetParent==null?void 0:s.getOffsetParent(h)),L=$?$[G]:0;(!L||!await(s.isElement==null?void 0:s.isElement($)))&&(L=l.floating[G]||a.floating[v]);let W=I/2-w/2,tt=L/2-x[v]/2-1,ht=an(f[k],tt),gt=an(f[N],tt),_t=L-x[v]-gt,Rt=L/2-x[v]/2+W,we=Hh(ht,Rt,_t),Ke=!d.arrow&&ra(n)!=null&&Rt!==we&&a.reference[v]/2-(Rt<ht?ht:gt)-x[v]/2<0,pr=Ke?Rt<ht?Rt-ht:Rt-_t:0;return{[g]:b[g]+pr,data:{[g]:we,centerOffset:Rt-we-pr,...Ke&&{alignmentOffset:pr}},reset:Ke}}});var zb=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(o){var t,r;let{placement:n,middlewareData:a,rects:s,initialPlacement:l,platform:d,elements:h}=o,{mainAxis:m=!0,crossAxis:f=!0,fallbackPlacements:b,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:x=!0,..._}=ea(i,o);if((t=a.arrow)!=null&&t.alignmentOffset)return{};let k=ci(n),N=ln(l),G=ci(l)===l,I=await(d.isRTL==null?void 0:d.isRTL(h.floating)),w=b||(G||!x?[il(l)]:fb(l)),$=v!=="none";!b&&$&&w.push(...gb(l,x,v,I));let L=[l,...w],W=await d.detectOverflow(o,_),tt=[],ht=((r=a.flip)==null?void 0:r.overflows)||[];if(m&&tt.push(W[k]),f){let we=mb(n,s,I);tt.push(W[we[0]],W[we[1]])}if(ht=[...ht,{placement:n,overflows:tt}],!tt.every(we=>we<=0)){var gt,_t;let we=(((gt=a.flip)==null?void 0:gt.index)||0)+1,Ke=L[we];if(Ke&&(!(f==="alignment"?N!==ln(Ke):!1)||ht.every(Ye=>ln(Ye.placement)===N?Ye.overflows[0]>0:!0)))return{data:{index:we,overflows:ht},reset:{placement:Ke}};let pr=(_t=ht.filter(Ae=>Ae.overflows[0]<=0).sort((Ae,Ye)=>Ae.overflows[1]-Ye.overflows[1])[0])==null?void 0:_t.placement;if(!pr)switch(g){case"bestFit":{var Rt;let Ae=(Rt=ht.filter(Ye=>{if($){let _e=ln(Ye.placement);return _e===N||_e==="y"}return!0}).map(Ye=>[Ye.placement,Ye.overflows.filter(_e=>_e>0).reduce((_e,ri)=>_e+ri,0)]).sort((Ye,_e)=>Ye[1]-_e[1])[0])==null?void 0:Rt[0];Ae&&(pr=Ae);break}case"initialPlacement":pr=l;break}if(n!==pr)return{reset:{placement:pr}}}return{}}}};var t3=new Set(["left","top"]);async function e3(i,o){let{placement:t,platform:r,elements:n}=i,a=await(r.isRTL==null?void 0:r.isRTL(n.floating)),s=ci(t),l=ra(t),d=ln(t)==="y",h=t3.has(s)?-1:1,m=a&&d?-1:1,f=ea(o,i),{mainAxis:b,crossAxis:g,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof v=="number"&&(g=l==="end"?v*-1:v),d?{x:g*m,y:b*h}:{x:b*h,y:g*m}}var wb=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(o){var t,r;let{x:n,y:a,placement:s,middlewareData:l}=o,d=await e3(o,i);return s===((t=l.offset)==null?void 0:t.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:n+d.x,y:a+d.y,data:{...d,placement:s}}}}},_b=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(o){let{x:t,y:r,placement:n,platform:a}=o,{mainAxis:s=!0,crossAxis:l=!1,limiter:d={fn:N=>{let{x:G,y:I}=N;return{x:G,y:I}}},...h}=ea(i,o),m={x:t,y:r},f=await a.detectOverflow(o,h),b=ln(n),g=Fh(b),v=m[g],x=m[b],_=(N,G)=>Hh(G+f[N==="y"?"top":"left"],G,G-f[N==="y"?"bottom":"right"]);s&&(v=_(g,v)),l&&(x=_(b,x));let k=d.fn({...o,[g]:v,[b]:x});return{...k,data:{x:k.x-t,y:k.y-r,enabled:{[g]:s,[b]:l}}}}}};var kb=function(i){return i===void 0&&(i={}),{name:"size",options:i,async fn(o){let{placement:t,rects:r,platform:n,elements:a}=o,{apply:s=()=>{},...l}=ea(i,o),d=await n.detectOverflow(o,l),h=ci(t),m=ra(t),f=ln(t)==="y",{width:b,height:g}=r.floating,v,x;h==="top"||h==="bottom"?(v=h,x=m===(await(n.isRTL==null?void 0:n.isRTL(a.floating))?"start":"end")?"left":"right"):(x=h,v=m==="end"?"top":"bottom");let _=g-d.top-d.bottom,k=b-d.left-d.right,N=an(g-d[v],_),G=an(b-d[x],k),I=o.middlewareData.shift,w=!I,$=N,L=G;I!=null&&I.enabled.x&&(L=k),I!=null&&I.enabled.y&&($=_),w&&!m&&(f?L=b-2*Po(d.left,d.right):$=g-2*Po(d.top,d.bottom)),await s({...o,availableWidth:L,availableHeight:$});let W=await n.getDimensions(a.floating);return b!==W.width||g!==W.height?{reset:{rects:!0}}:{}}}};function rd(){return typeof window<"u"}function ia(i){return Sb(i)?(i.nodeName||"").toLowerCase():"#document"}function Er(i){var o;return(i==null||(o=i.ownerDocument)==null?void 0:o.defaultView)||window}function cn(i){var o;return(o=(Sb(i)?i.ownerDocument:i.document)||window.document)==null?void 0:o.documentElement}function Sb(i){return rd()?i instanceof Node||i instanceof Er(i).Node:!1}function Ho(i){return rd()?i instanceof Element||i instanceof Er(i).Element:!1}function qn(i){return rd()?i instanceof HTMLElement||i instanceof Er(i).HTMLElement:!1}function Cb(i){return!rd()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof Er(i).ShadowRoot}function ll(i){let{overflow:o,overflowX:t,overflowY:r,display:n}=Fo(i);return/auto|scroll|overlay|hidden|clip/.test(o+r+t)&&n!=="inline"&&n!=="contents"}function Eb(i){return/^(table|td|th)$/.test(ia(i))}function cl(i){try{if(i.matches(":popover-open"))return!0}catch{}try{return i.matches(":modal")}catch{return!1}}var r3=/transform|translate|scale|rotate|perspective|filter/,o3=/paint|layout|strict|content/,na=i=>!!i&&i!=="none",Vh;function ja(i){let o=Ho(i)?Fo(i):i;return na(o.transform)||na(o.translate)||na(o.scale)||na(o.rotate)||na(o.perspective)||!od()&&(na(o.backdropFilter)||na(o.filter))||r3.test(o.willChange||"")||o3.test(o.contain||"")}function Tb(i){let o=di(i);for(;qn(o)&&!Ga(o);){if(ja(o))return o;if(cl(o))return null;o=di(o)}return null}function od(){return Vh==null&&(Vh=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Vh}function Ga(i){return/^(html|body|#document)$/.test(ia(i))}function Fo(i){return Er(i).getComputedStyle(i)}function dl(i){return Ho(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.scrollX,scrollTop:i.scrollY}}function di(i){if(ia(i)==="html")return i;let o=i.assignedSlot||i.parentNode||Cb(i)&&i.host||cn(i);return Cb(o)?o.host:o}function $b(i){let o=di(i);return Ga(o)?(i.ownerDocument||i).body:qn(o)&&ll(o)?o:$b(o)}function Ua(i,o,t){var r;o===void 0&&(o=[]),t===void 0&&(t=!0);let n=$b(i),a=n===((r=i.ownerDocument)==null?void 0:r.body),s=Er(n);if(a){let l=nd(s);return o.concat(s,s.visualViewport||[],ll(n)?n:[],l&&t?Ua(l):[])}else return o.concat(n,Ua(n,[],t))}function nd(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function Mb(i){let o=Fo(i),t=parseFloat(o.width)||0,r=parseFloat(o.height)||0,n=qn(i),a=n?i.offsetWidth:t,s=n?i.offsetHeight:r,l=al(t)!==a||al(r)!==s;return l&&(t=a,r=s),{width:t,height:r,$:l}}function jh(i){return Ho(i)?i:i.contextElement}function Wa(i){let o=jh(i);if(!qn(o))return sn(1);let t=o.getBoundingClientRect(),{width:r,height:n,$:a}=Mb(o),s=(a?al(t.width):t.width)/r,l=(a?al(t.height):t.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var n3=sn(0);function qb(i){let o=Er(i);return!od()||!o.visualViewport?n3:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function i3(i,o,t){return o===void 0&&(o=!1),!!t&&o&&t===Er(i)}function aa(i,o,t,r){o===void 0&&(o=!1),t===void 0&&(t=!1);let n=i.getBoundingClientRect(),a=jh(i),s=sn(1);o&&(r?Ho(r)&&(s=Wa(r)):s=Wa(i));let l=i3(a,t,r)?qb(a):sn(0),d=(n.left+l.x)/s.x,h=(n.top+l.y)/s.y,m=n.width/s.x,f=n.height/s.y;if(a&&r){let b=Er(a),g=Ho(r)?Er(r):r,v=b,x=nd(v);for(;x&&g!==v;){let _=Wa(x),k=x.getBoundingClientRect(),N=Fo(x),G=k.left+(x.clientLeft+parseFloat(N.paddingLeft))*_.x,I=k.top+(x.clientTop+parseFloat(N.paddingTop))*_.y;d*=_.x,h*=_.y,m*=_.x,f*=_.y,d+=G,h+=I,v=Er(x),x=nd(v)}}return oa({width:m,height:f,x:d,y:h})}function id(i,o){let t=dl(i).scrollLeft;return o?o.left+t:aa(cn(i)).left+t}function Ib(i,o){let t=i.getBoundingClientRect(),r=t.left+o.scrollLeft-id(i,t),n=t.top+o.scrollTop;return{x:r,y:n}}function a3(i){let{elements:o,rect:t,offsetParent:r,strategy:n}=i,a=n==="fixed",s=cn(r),l=o?cl(o.floating):!1;if(r===s||l&&a)return t;let d={scrollLeft:0,scrollTop:0},h=sn(1),m=sn(0),f=qn(r);if((f||!a)&&((ia(r)!=="body"||ll(s))&&(d=dl(r)),f)){let g=aa(r);h=Wa(r),m.x=g.x+r.clientLeft,m.y=g.y+r.clientTop}let b=s&&!f&&!a?Ib(s,d):sn(0);return{width:t.width*h.x,height:t.height*h.y,x:t.x*h.x-d.scrollLeft*h.x+m.x+b.x,y:t.y*h.y-d.scrollTop*h.y+m.y+b.y}}function s3(i){return i.getClientRects?Array.from(i.getClientRects()):[]}function l3(i){let o=dl(i),t=i.ownerDocument.body,r=Po(i.scrollWidth,i.clientWidth,t.scrollWidth,t.clientWidth),n=Po(i.scrollHeight,i.clientHeight,t.scrollHeight,t.clientHeight),a=-o.scrollLeft+id(i),s=-o.scrollTop;return Fo(t).direction==="rtl"&&(a+=Po(i.clientWidth,t.clientWidth)-r),{width:r,height:n,x:a,y:s}}var c3=25;function d3(i,o,t){t===void 0&&(t="viewport");let r=t==="layoutViewport",n=Er(i),a=cn(i),s=n.visualViewport,l=a.clientWidth,d=a.clientHeight,h=0,m=0;if(s){let b=!od()||o==="fixed";r?b||(h=-s.offsetLeft,m=-s.offsetTop):(l=s.width,d=s.height,b&&(h=s.offsetLeft,m=s.offsetTop))}if(id(a)<=0){let b=a.ownerDocument,g=b.body,v=getComputedStyle(g),x=b.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,_=Math.abs(a.clientWidth-g.clientWidth-x),k=getComputedStyle(a).scrollbarGutter==="stable both-edges"?_/2:_;k<=c3&&(l-=k)}return{width:l,height:d,x:h,y:m}}function p3(i,o){let t=aa(i,!0,o==="fixed"),r=t.top+i.clientTop,n=t.left+i.clientLeft,a=Wa(i),s=i.clientWidth*a.x,l=i.clientHeight*a.y,d=n*a.x,h=r*a.y;return{width:s,height:l,x:d,y:h}}function Ab(i,o,t){let r;if(o==="viewport"||o==="layoutViewport")r=d3(i,t,o);else if(o==="document")r=l3(cn(i));else if(Ho(o))r=p3(o,t);else{let n=qb(i);r={x:o.x-n.x,y:o.y-n.y,width:o.width,height:o.height}}return oa(r)}function h3(i,o){let t=o.get(i);if(t)return t;let r=Ua(i,[],!1).filter(l=>Ho(l)&&ia(l)!=="body"),n=null,a=Fo(i).position==="fixed",s=a?di(i):i;for(;Ho(s)&&!Ga(s);){let l=Fo(s),d=ja(s),h=n?n.position:a?"fixed":"";!d&&(h==="fixed"||h==="absolute"&&l.position==="static")?r=r.filter(f=>f!==s):n=l,s=di(s)}return o.set(i,r),r}function u3(i){let{element:o,boundary:t,rootBoundary:r,strategy:n}=i,s=[...t==="clippingAncestors"?cl(o)?[]:h3(o,this._c):[].concat(t),r],l=Ab(o,s[0],n),d=l.top,h=l.right,m=l.bottom,f=l.left;for(let b=1;b<s.length;b++){let g=Ab(o,s[b],n);d=Po(g.top,d),h=an(g.right,h),m=an(g.bottom,m),f=Po(g.left,f)}return{width:h-f,height:m-d,x:f,y:d}}function m3(i){let{width:o,height:t}=Mb(i);return{width:o,height:t}}function f3(i,o,t){let r=qn(o),n=cn(o),a=t==="fixed",s=aa(i,!0,a,o),l={scrollLeft:0,scrollTop:0},d=sn(0);if((r||!a)&&((ia(o)!=="body"||ll(n))&&(l=dl(o)),r)){let b=aa(o,!0,a,o);d.x=b.x+o.clientLeft,d.y=b.y+o.clientTop}!r&&n&&(d.x=id(n));let h=n&&!r&&!a?Ib(n,l):sn(0),m=s.left+l.scrollLeft-d.x-h.x,f=s.top+l.scrollTop-d.y-h.y;return{x:m,y:f,width:s.width,height:s.height}}function Uh(i){return Fo(i).position==="static"}function Lb(i,o){if(!qn(i)||Fo(i).position==="fixed")return null;if(o)return o(i);let t=i.offsetParent;return cn(i)===t&&(t=t.ownerDocument.body),t}function Db(i,o){let t=Er(i);if(cl(i))return t;if(!qn(i)){let n=di(i);for(;n&&!Ga(n);){if(Ho(n)&&!Uh(n))return n;n=di(n)}return t}let r=Lb(i,o);for(;r&&Eb(r)&&Uh(r);)r=Lb(r,o);return r&&Ga(r)&&Uh(r)&&!ja(r)?t:r||Tb(i)||t}var g3=async function(i){let o=this.getOffsetParent||Db,t=this.getDimensions,r=await t(i.floating);return{reference:f3(i.reference,await o(i.floating),i.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function b3(i){return Fo(i).direction==="rtl"}var pl={convertOffsetParentRelativeRectToViewportRelativeRect:a3,getDocumentElement:cn,getClippingRect:u3,getOffsetParent:Db,getElementRects:g3,getClientRects:s3,getDimensions:m3,getScale:Wa,isElement:Ho,isRTL:b3};function Nb(i,o){return i.x===o.x&&i.y===o.y&&i.width===o.width&&i.height===o.height}function v3(i,o,t){let r=null,n,a=cn(i);function s(){var m;clearTimeout(n),(m=r)==null||m.disconnect(),r=null}function l(m,f){m===void 0&&(m=!1),f===void 0&&(f=1),s();let b=i.getBoundingClientRect(),{left:g,top:v,width:x,height:_}=b;if(m||o(),!x||!_)return;let k=sl(v),N=sl(a.clientWidth-(g+x)),G=sl(a.clientHeight-(v+_)),I=sl(g),$={rootMargin:-k+"px "+-N+"px "+-G+"px "+-I+"px",threshold:Po(0,an(1,f))||1},L=!0;function W(tt){let ht=tt[0].intersectionRatio;if(!Nb(b,i.getBoundingClientRect()))return l();if(ht!==f){if(!L)return l();ht?l(!1,ht):n=setTimeout(()=>{l(!1,1e-7)},1e3)}L=!1}try{r=new IntersectionObserver(W,{...$,root:a.ownerDocument})}catch{r=new IntersectionObserver(W,$)}r.observe(i)}let d=Er(i),h=()=>l(t);return d.addEventListener("resize",h),l(!0),()=>{d.removeEventListener("resize",h),s()}}function ad(i,o,t,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=jh(i),m=n||a?[...h?Ua(h):[],...o?Ua(o):[]]:[];m.forEach(k=>{n&&k.addEventListener("scroll",t),a&&k.addEventListener("resize",t)});let f=h&&l?v3(h,t,a):null,b=-1,g=null;s&&(g=new ResizeObserver(k=>{let[N]=k;N&&N.target===h&&g&&o&&(g.unobserve(o),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var G;(G=g)==null||G.observe(o)})),t()}),h&&!d&&g.observe(h),o&&g.observe(o));let v,x=d?aa(i):null;d&&_();function _(){let k=aa(i);x&&!Nb(x,k)&&t(),x=k,v=requestAnimationFrame(_)}return t(),()=>{var k;m.forEach(N=>{n&&N.removeEventListener("scroll",t),a&&N.removeEventListener("resize",t)}),f?.(),(k=g)==null||k.disconnect(),g=null,d&&cancelAnimationFrame(v)}}var sd=wb;var ld=_b,cd=zb,hl=kb;var Rb=yb;var dd=(i,o,t)=>{let r=new Map,n=t??{},a={...pl,...n.platform,_c:r};return xb(i,o,{...n,platform:a})};function Ob(i){return x3(i)}function Gh(i){return i.assignedSlot?i.assignedSlot:i.parentNode instanceof ShadowRoot?i.parentNode.host:i.parentNode}function x3(i){for(let o=i;o;o=Gh(o))if(o instanceof Element&&getComputedStyle(o).display==="none")return null;for(let o=Gh(i);o;o=Gh(o)){if(!(o instanceof Element))continue;let t=getComputedStyle(o);if(t.display!=="contents"&&(t.position!=="static"||ja(t)||o.tagName==="BODY"))return o}return null}var Pb=E`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--arrow-color:rgb(var(--zn-color-text));--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}.popup{position:absolute;isolation:isolate;margin:0;border:0;padding:0;background:transparent;overflow:visible;max-width:var(--auto-size-available-width,none)}.popup--fixed{position:fixed}.popup:not(.popup--active){display:none}.popup__arrow{position:absolute;width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);rotate:45deg;background:var(--arrow-color);z-index:-1}.popup{}.popup-hover-bridge:not(.popup-hover-bridge--visible){display:none}.popup-hover-bridge{position:fixed;z-index:calc(var(--zn-z-index-dropdown) - 1);top:0;right:0;bottom:0;left:0;clip-path:polygon(var(--hover-bridge-top-left-x,0) var(--hover-bridge-top-left-y,0),var(--hover-bridge-top-right-x,0) var(--hover-bridge-top-right-y,0),var(--hover-bridge-bottom-right-x,0) var(--hover-bridge-bottom-right-y,0),var(--hover-bridge-bottom-left-x,0) var(--hover-bridge-bottom-left-y,0))}`;function y3(i){return i!==null&&typeof i=="object"&&"getBoundingClientRect"in i&&("contextElement"in i?i instanceof Element:!0)}var Tt=class extends C{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="fixed";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0;this.hoverBridge=!1;this.handleAnchorHover=()=>{this.active||this.start()};this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){let t=this.anchorEl.getBoundingClientRect(),r=this.popup.getBoundingClientRect(),n=this.placement.includes("top")||this.placement.includes("bottom"),a,s,l,d,h,m,f,b;n?t.top<r.top?(a=t.left,s=t.bottom,l=t.right,d=t.bottom,h=r.left,m=r.top,f=r.right,b=r.top):(a=r.left,s=r.bottom,l=r.right,d=r.bottom,h=t.left,m=t.top,f=t.right,b=t.top):t.left<r.left?(a=t.right,s=t.top,l=r.left,d=r.top,h=t.right,m=t.bottom,f=r.left,b=r.bottom):(a=r.right,s=r.top,l=t.left,d=t.top,h=r.right,m=r.bottom,f=t.left,b=t.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${a}px`),this.style.setProperty("--hover-bridge-top-left-y",`${s}px`),this.style.setProperty("--hover-bridge-top-right-x",`${l}px`),this.style.setProperty("--hover-bridge-top-right-y",`${d}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${h}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${m}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${f}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${b}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.active&&this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element||y3(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&!this.active&&this.anchorEl instanceof Element&&(this.anchorEl.removeEventListener("mouseover",this.handleAnchorHover),this.anchorEl.addEventListener("mouseover",this.handleAnchorHover))}start(){this.anchorEl&&(this.cleanup=ad(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),this.popup.hidePopover(),requestAnimationFrame(()=>t())):t()})}reposition(){if(!this.active||!this.anchorEl)return;let t=[sd({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(hl({apply:({rects:n})=>{let a=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.minWidth=a?`${n.reference.width}px`:"",this.popup.style.minHeight=s?`${n.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(cd({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(ld({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(hl({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:n,availableHeight:a})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${a}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${n}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(Rb({element:this.arrowEl,padding:this.arrowPadding}));let r=this.strategy==="absolute"?n=>pl.getOffsetParent(n,Ob):pl.getOffsetParent;dd(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:{...pl,getOffsetParent:r}}).then(({x:n,y:a,middlewareData:s,placement:l})=>{let d={top:"bottom",right:"left",bottom:"top",left:"right"}[l.split("-")[0]];if(this.setAttribute("data-current-placement",l),Object.assign(this.popup.style,{left:`${n}px`,top:`${a}px`}),!!this.popup?.isConnected&&(this.popup.showPopover(),this.arrow)){let h=s.arrow.x,m=s.arrow.y,f="",b="",g="",v;this.arrowPlacement==="start"?(f=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",b="",v=typeof h=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="end"?(b=typeof h=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",v="",g=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="center"?(v=typeof h=="number"?"calc(50% - var(--arrow-size-diagonal))":"",f=typeof m=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(v=typeof h=="number"?`${h}px`:"",f=typeof m=="number"?`${m}px`:""),Object.assign(this.arrowEl.style,{top:f,right:b,bottom:g,left:v,[d]:"calc(var(--arrow-size-diagonal) * -1)"})}}),requestAnimationFrame(()=>this.updateHoverBridge())}render(){return u`
|
|
138
|
+
`:null}`}};st.styles=T(pb),st.dependencies={"zn-tooltip":Oo,"zn-icon":ct},c([F(".button")],st.prototype,"button",2),c([Ra(".loading-countdown")],st.prototype,"countdownContainer",2),c([p({})],st.prototype,"color",2),c([p({attribute:"hover-color"})],st.prototype,"hoverColor",2),c([p({type:Boolean})],st.prototype,"text",2),c([p({type:Boolean})],st.prototype,"outline",2),c([p({type:Boolean})],st.prototype,"disabled",2),c([p({type:Boolean})],st.prototype,"grow",2),c([p({type:Boolean})],st.prototype,"square",2),c([p({attribute:"icon-button",converter:{fromAttribute:t=>t==="small"||t==="round"?t:t!==null,toAttribute:t=>t==="small"||t==="round"?t:t?"":null}})],st.prototype,"iconButton",2),c([p({type:Boolean})],st.prototype,"plain",2),c([p({type:Boolean,attribute:"no-hover"})],st.prototype,"noHover",2),c([p({type:Boolean,attribute:"panel-bg"})],st.prototype,"panelBackground",2),c([p({attribute:"dropdown-closer",type:Boolean})],st.prototype,"dropdownCloser",2),c([p({type:Number})],st.prototype,"notification",2),c([p({attribute:"muted-notifications",type:Boolean})],st.prototype,"mutedNotifications",2),c([p()],st.prototype,"verticalAlign",2),c([p()],st.prototype,"content",2),c([p()],st.prototype,"icon",2),c([p()],st.prototype,"gaid",2),c([p({attribute:"icon-position"})],st.prototype,"iconPosition",2),c([p({attribute:"icon-size"})],st.prototype,"iconSize",2),c([p({attribute:"icon-color"})],st.prototype,"iconColor",2),c([p({attribute:"icon-fill"})],st.prototype,"iconFill",2),c([p({attribute:"icon-library"})],st.prototype,"iconLibrary",2),c([p()],st.prototype,"type",2),c([p()],st.prototype,"name",2),c([p()],st.prototype,"value",2),c([p()],st.prototype,"form",2),c([p({attribute:"formaction"})],st.prototype,"formAction",2),c([p({attribute:"formenctype"})],st.prototype,"formEnctype",2),c([p({attribute:"formmethod"})],st.prototype,"formMethod",2),c([p({attribute:"formnovalidate",type:Boolean})],st.prototype,"formNoValidate",2),c([p({attribute:"formtarget"})],st.prototype,"formTarget",2),c([p()],st.prototype,"href",2),c([p()],st.prototype,"target",2),c([p({attribute:"data-target"})],st.prototype,"dataTarget",2),c([p()],st.prototype,"rel",2),c([p()],st.prototype,"tooltip",2),c([p({type:Boolean,attribute:"auto-click"})],st.prototype,"autoClick",2),c([p({type:Number,attribute:"auto-click-delay"})],st.prototype,"autoClickDelay",2),c([p({type:String,attribute:"loading-text"})],st.prototype,"loadingText",2),c([p({type:String,attribute:"loading-text-position"})],st.prototype,"loadingTextPosition",2),c([p({type:Boolean})],st.prototype,"loading",2),c([K("autoClick")],st.prototype,"handleAutoClickChange",1);var Ct=st;st.define("zn-button");var Lt=class{constructor(o,{target:t,config:r,callback:n,skipInitial:a}){this.t=new Set,this.o=!1,this.i=!1,this.h=o,t!==null&&this.t.add(t??o),this.l=r,this.o=a??this.o,this.callback=n,window.MutationObserver?(this.u=new MutationObserver(s=>{this.handleChanges(s),this.h.requestUpdate()}),o.addController(this)):console.warn("MutationController error: browser does not support MutationObserver.")}handleChanges(o){this.value=this.callback?.(o,this.u)}hostConnected(){for(let o of this.t)this.observe(o)}hostDisconnected(){this.disconnect()}async hostUpdated(){let o=this.u.takeRecords();(o.length||!this.o&&this.i)&&this.handleChanges(o),this.i=!1}observe(o){this.t.add(o),this.u.observe(o,this.l),this.i=!0,this.h.requestUpdate()}disconnect(){this.u.disconnect()}};var Va=class extends C{constructor(){super();this._resizeFrame=null;new Lt(this,{config:{childList:!0,subtree:!0,attributes:!0,characterData:!0},callback:()=>this.resize(),skipInitial:!0})}firstUpdated(t){super.firstUpdated(t),this.resize()}disconnectedCallback(){super.disconnectedCallback(),this._resizeFrame!==null&&(cancelAnimationFrame(this._resizeFrame),this._resizeFrame=null)}resize(){this._resizeFrame===null&&(this._resizeFrame=requestAnimationFrame(()=>{this._resizeFrame=null;let t=0;Array.from(this.children).forEach(n=>{t+=n.getBoundingClientRect().height});let r=t+"px";this.style.minHeight!==r&&(this.style.minHeight=r)}))}createRenderRoot(){return this}};var Wk=Va;Va.define("zn-absolute-container");var an=Math.min,Po=Math.max,al=Math.round,sl=Math.floor,sn=i=>({x:i,y:i}),Kk={left:"right",right:"left",bottom:"top",top:"bottom"};function Hh(i,o,t){return Po(i,an(o,t))}function ea(i,o){return typeof i=="function"?i(o):i}function ci(i){return i.split("-")[0]}function ra(i){return i.split("-")[1]}function Fh(i){return i==="x"?"y":"x"}function td(i){return i==="y"?"height":"width"}function ln(i){let o=i[0];return o==="t"||o==="b"?"y":"x"}function ed(i){return Fh(ln(i))}function mb(i,o,t){t===void 0&&(t=!1);let r=ra(i),n=ed(i),a=td(n),s=n==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return o.reference[a]>o.floating[a]&&(s=il(s)),[s,il(s)]}function fb(i){let o=il(i);return[Zc(i),o,Zc(o)]}function Zc(i){return i.includes("start")?i.replace("start","end"):i.replace("end","start")}var hb=["left","right"],ub=["right","left"],Yk=["top","bottom"],Xk=["bottom","top"];function Qk(i,o,t){switch(i){case"top":case"bottom":return t?o?ub:hb:o?hb:ub;case"left":case"right":return o?Yk:Xk;default:return[]}}function gb(i,o,t,r){let n=ra(i),a=Qk(ci(i),t==="start",r);return n&&(a=a.map(s=>s+"-"+n),o&&(a=a.concat(a.map(Zc)))),a}function il(i){let o=ci(i);return Kk[o]+i.slice(o.length)}function Jk(i){var o,t,r,n;return{top:(o=i.top)!=null?o:0,right:(t=i.right)!=null?t:0,bottom:(r=i.bottom)!=null?r:0,left:(n=i.left)!=null?n:0}}function Bh(i){return typeof i!="number"?Jk(i):{top:i,right:i,bottom:i,left:i}}function oa(i){let{x:o,y:t,width:r,height:n}=i;return{width:r,height:n,top:t,left:o,right:o+r,bottom:t+n,x:o,y:t}}function bb(i,o,t){let{reference:r,floating:n}=i,a=ln(o),s=ed(o),l=td(s),d=ci(o),h=a==="y",m=r.x+r.width/2-n.width/2,f=r.y+r.height/2-n.height/2,b=r[l]/2-n[l]/2,g;switch(d){case"top":g={x:m,y:r.y-n.height};break;case"bottom":g={x:m,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:f};break;case"left":g={x:r.x-n.width,y:f};break;default:g={x:r.x,y:r.y}}let v=ra(o);return v&&(g[s]+=b*(v==="end"?1:-1)*(t&&h?-1:1)),g}async function vb(i,o){var t;o===void 0&&(o={});let{x:r,y:n,platform:a,rects:s,elements:l,strategy:d}=i,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:f="floating",altBoundary:b=!1,padding:g=0}=ea(o,i),v=Bh(g),_=l[b?f==="floating"?"reference":"floating":f],k=oa(await a.getClippingRect({element:(t=await(a.isElement==null?void 0:a.isElement(_)))==null||t?_:_.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:h,rootBoundary:m,strategy:d})),N=f==="floating"?{x:r,y:n,width:s.floating.width,height:s.floating.height}:s.reference,G=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),I=await(a.isElement==null?void 0:a.isElement(G))&&await(a.getScale==null?void 0:a.getScale(G))||{x:1,y:1},w=oa(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:G,strategy:d}):N);return{top:(k.top-w.top+v.top)/I.y,bottom:(w.bottom-k.bottom+v.bottom)/I.y,left:(k.left-w.left+v.left)/I.x,right:(w.right-k.right+v.right)/I.x}}var Zk=50,xb=async(i,o,t)=>{let{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:s}=t,l=s.detectOverflow?s:{...s,detectOverflow:vb},d=await(s.isRTL==null?void 0:s.isRTL(o)),h=await s.getElementRects({reference:i,floating:o,strategy:n}),{x:m,y:f}=bb(h,r,d),b=r,g=0,v={};for(let x=0;x<a.length;x++){let _=a[x];if(!_)continue;let{name:k,fn:N}=_,{x:G,y:I,data:w,reset:$}=await N({x:m,y:f,initialPlacement:r,placement:b,strategy:n,middlewareData:v,rects:h,platform:l,elements:{reference:i,floating:o}});m=G??m,f=I??f,v[k]={...v[k],...w},$&&g<Zk&&(g++,typeof $=="object"&&($.placement&&(b=$.placement),$.rects&&(h=$.rects===!0?await s.getElementRects({reference:i,floating:o,strategy:n}):$.rects),{x:m,y:f}=bb(h,b,d)),x=-1)}return{x:m,y:f,placement:b,strategy:n,middlewareData:v}},yb=i=>({name:"arrow",options:i,async fn(o){let{x:t,y:r,placement:n,rects:a,platform:s,elements:l,middlewareData:d}=o,{element:h,padding:m=0}=ea(i,o)||{};if(h==null)return{};let f=Bh(m),b={x:t,y:r},g=ed(n),v=td(g),x=await s.getDimensions(h),_=g==="y",k=_?"top":"left",N=_?"bottom":"right",G=_?"clientHeight":"clientWidth",I=a.reference[v]+a.reference[g]-b[g]-a.floating[v],w=b[g]-a.reference[g],$=await(s.getOffsetParent==null?void 0:s.getOffsetParent(h)),L=$?$[G]:0;(!L||!await(s.isElement==null?void 0:s.isElement($)))&&(L=l.floating[G]||a.floating[v]);let W=I/2-w/2,tt=L/2-x[v]/2-1,ht=an(f[k],tt),gt=an(f[N],tt),_t=L-x[v]-gt,Rt=L/2-x[v]/2+W,we=Hh(ht,Rt,_t),Ke=!d.arrow&&ra(n)!=null&&Rt!==we&&a.reference[v]/2-(Rt<ht?ht:gt)-x[v]/2<0,pr=Ke?Rt<ht?Rt-ht:Rt-_t:0;return{[g]:b[g]+pr,data:{[g]:we,centerOffset:Rt-we-pr,...Ke&&{alignmentOffset:pr}},reset:Ke}}});var zb=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(o){var t,r;let{placement:n,middlewareData:a,rects:s,initialPlacement:l,platform:d,elements:h}=o,{mainAxis:m=!0,crossAxis:f=!0,fallbackPlacements:b,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:x=!0,..._}=ea(i,o);if((t=a.arrow)!=null&&t.alignmentOffset)return{};let k=ci(n),N=ln(l),G=ci(l)===l,I=await(d.isRTL==null?void 0:d.isRTL(h.floating)),w=b||(G||!x?[il(l)]:fb(l)),$=v!=="none";!b&&$&&w.push(...gb(l,x,v,I));let L=[l,...w],W=await d.detectOverflow(o,_),tt=[],ht=((r=a.flip)==null?void 0:r.overflows)||[];if(m&&tt.push(W[k]),f){let we=mb(n,s,I);tt.push(W[we[0]],W[we[1]])}if(ht=[...ht,{placement:n,overflows:tt}],!tt.every(we=>we<=0)){var gt,_t;let we=(((gt=a.flip)==null?void 0:gt.index)||0)+1,Ke=L[we];if(Ke&&(!(f==="alignment"?N!==ln(Ke):!1)||ht.every(Ye=>ln(Ye.placement)===N?Ye.overflows[0]>0:!0)))return{data:{index:we,overflows:ht},reset:{placement:Ke}};let pr=(_t=ht.filter(Ae=>Ae.overflows[0]<=0).sort((Ae,Ye)=>Ae.overflows[1]-Ye.overflows[1])[0])==null?void 0:_t.placement;if(!pr)switch(g){case"bestFit":{var Rt;let Ae=(Rt=ht.filter(Ye=>{if($){let _e=ln(Ye.placement);return _e===N||_e==="y"}return!0}).map(Ye=>[Ye.placement,Ye.overflows.filter(_e=>_e>0).reduce((_e,ri)=>_e+ri,0)]).sort((Ye,_e)=>Ye[1]-_e[1])[0])==null?void 0:Rt[0];Ae&&(pr=Ae);break}case"initialPlacement":pr=l;break}if(n!==pr)return{reset:{placement:pr}}}return{}}}};var t3=new Set(["left","top"]);async function e3(i,o){let{placement:t,platform:r,elements:n}=i,a=await(r.isRTL==null?void 0:r.isRTL(n.floating)),s=ci(t),l=ra(t),d=ln(t)==="y",h=t3.has(s)?-1:1,m=a&&d?-1:1,f=ea(o,i),{mainAxis:b,crossAxis:g,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof v=="number"&&(g=l==="end"?v*-1:v),d?{x:g*m,y:b*h}:{x:b*h,y:g*m}}var wb=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(o){var t,r;let{x:n,y:a,placement:s,middlewareData:l}=o,d=await e3(o,i);return s===((t=l.offset)==null?void 0:t.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:n+d.x,y:a+d.y,data:{...d,placement:s}}}}},_b=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(o){let{x:t,y:r,placement:n,platform:a}=o,{mainAxis:s=!0,crossAxis:l=!1,limiter:d={fn:N=>{let{x:G,y:I}=N;return{x:G,y:I}}},...h}=ea(i,o),m={x:t,y:r},f=await a.detectOverflow(o,h),b=ln(n),g=Fh(b),v=m[g],x=m[b],_=(N,G)=>Hh(G+f[N==="y"?"top":"left"],G,G-f[N==="y"?"bottom":"right"]);s&&(v=_(g,v)),l&&(x=_(b,x));let k=d.fn({...o,[g]:v,[b]:x});return{...k,data:{x:k.x-t,y:k.y-r,enabled:{[g]:s,[b]:l}}}}}};var kb=function(i){return i===void 0&&(i={}),{name:"size",options:i,async fn(o){let{placement:t,rects:r,platform:n,elements:a}=o,{apply:s=()=>{},...l}=ea(i,o),d=await n.detectOverflow(o,l),h=ci(t),m=ra(t),f=ln(t)==="y",{width:b,height:g}=r.floating,v,x;h==="top"||h==="bottom"?(v=h,x=m===(await(n.isRTL==null?void 0:n.isRTL(a.floating))?"start":"end")?"left":"right"):(x=h,v=m==="end"?"top":"bottom");let _=g-d.top-d.bottom,k=b-d.left-d.right,N=an(g-d[v],_),G=an(b-d[x],k),I=o.middlewareData.shift,w=!I,$=N,L=G;I!=null&&I.enabled.x&&(L=k),I!=null&&I.enabled.y&&($=_),w&&!m&&(f?L=b-2*Po(d.left,d.right):$=g-2*Po(d.top,d.bottom)),await s({...o,availableWidth:L,availableHeight:$});let W=await n.getDimensions(a.floating);return b!==W.width||g!==W.height?{reset:{rects:!0}}:{}}}};function rd(){return typeof window<"u"}function ia(i){return Sb(i)?(i.nodeName||"").toLowerCase():"#document"}function Er(i){var o;return(i==null||(o=i.ownerDocument)==null?void 0:o.defaultView)||window}function cn(i){var o;return(o=(Sb(i)?i.ownerDocument:i.document)||window.document)==null?void 0:o.documentElement}function Sb(i){return rd()?i instanceof Node||i instanceof Er(i).Node:!1}function Ho(i){return rd()?i instanceof Element||i instanceof Er(i).Element:!1}function qn(i){return rd()?i instanceof HTMLElement||i instanceof Er(i).HTMLElement:!1}function Cb(i){return!rd()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof Er(i).ShadowRoot}function ll(i){let{overflow:o,overflowX:t,overflowY:r,display:n}=Fo(i);return/auto|scroll|overlay|hidden|clip/.test(o+r+t)&&n!=="inline"&&n!=="contents"}function Eb(i){return/^(table|td|th)$/.test(ia(i))}function cl(i){try{if(i.matches(":popover-open"))return!0}catch{}try{return i.matches(":modal")}catch{return!1}}var r3=/transform|translate|scale|rotate|perspective|filter/,o3=/paint|layout|strict|content/,na=i=>!!i&&i!=="none",Vh;function ja(i){let o=Ho(i)?Fo(i):i;return na(o.transform)||na(o.translate)||na(o.scale)||na(o.rotate)||na(o.perspective)||!od()&&(na(o.backdropFilter)||na(o.filter))||r3.test(o.willChange||"")||o3.test(o.contain||"")}function Tb(i){let o=di(i);for(;qn(o)&&!Ga(o);){if(ja(o))return o;if(cl(o))return null;o=di(o)}return null}function od(){return Vh==null&&(Vh=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Vh}function Ga(i){return/^(html|body|#document)$/.test(ia(i))}function Fo(i){return Er(i).getComputedStyle(i)}function dl(i){return Ho(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.scrollX,scrollTop:i.scrollY}}function di(i){if(ia(i)==="html")return i;let o=i.assignedSlot||i.parentNode||Cb(i)&&i.host||cn(i);return Cb(o)?o.host:o}function $b(i){let o=di(i);return Ga(o)?(i.ownerDocument||i).body:qn(o)&&ll(o)?o:$b(o)}function Ua(i,o,t){var r;o===void 0&&(o=[]),t===void 0&&(t=!0);let n=$b(i),a=n===((r=i.ownerDocument)==null?void 0:r.body),s=Er(n);if(a){let l=nd(s);return o.concat(s,s.visualViewport||[],ll(n)?n:[],l&&t?Ua(l):[])}else return o.concat(n,Ua(n,[],t))}function nd(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function Mb(i){let o=Fo(i),t=parseFloat(o.width)||0,r=parseFloat(o.height)||0,n=qn(i),a=n?i.offsetWidth:t,s=n?i.offsetHeight:r,l=al(t)!==a||al(r)!==s;return l&&(t=a,r=s),{width:t,height:r,$:l}}function jh(i){return Ho(i)?i:i.contextElement}function Wa(i){let o=jh(i);if(!qn(o))return sn(1);let t=o.getBoundingClientRect(),{width:r,height:n,$:a}=Mb(o),s=(a?al(t.width):t.width)/r,l=(a?al(t.height):t.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var n3=sn(0);function qb(i){let o=Er(i);return!od()||!o.visualViewport?n3:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function i3(i,o,t){return o===void 0&&(o=!1),!!t&&o&&t===Er(i)}function aa(i,o,t,r){o===void 0&&(o=!1),t===void 0&&(t=!1);let n=i.getBoundingClientRect(),a=jh(i),s=sn(1);o&&(r?Ho(r)&&(s=Wa(r)):s=Wa(i));let l=i3(a,t,r)?qb(a):sn(0),d=(n.left+l.x)/s.x,h=(n.top+l.y)/s.y,m=n.width/s.x,f=n.height/s.y;if(a&&r){let b=Er(a),g=Ho(r)?Er(r):r,v=b,x=nd(v);for(;x&&g!==v;){let _=Wa(x),k=x.getBoundingClientRect(),N=Fo(x),G=k.left+(x.clientLeft+parseFloat(N.paddingLeft))*_.x,I=k.top+(x.clientTop+parseFloat(N.paddingTop))*_.y;d*=_.x,h*=_.y,m*=_.x,f*=_.y,d+=G,h+=I,v=Er(x),x=nd(v)}}return oa({width:m,height:f,x:d,y:h})}function id(i,o){let t=dl(i).scrollLeft;return o?o.left+t:aa(cn(i)).left+t}function Ib(i,o){let t=i.getBoundingClientRect(),r=t.left+o.scrollLeft-id(i,t),n=t.top+o.scrollTop;return{x:r,y:n}}function a3(i){let{elements:o,rect:t,offsetParent:r,strategy:n}=i,a=n==="fixed",s=cn(r),l=o?cl(o.floating):!1;if(r===s||l&&a)return t;let d={scrollLeft:0,scrollTop:0},h=sn(1),m=sn(0),f=qn(r);if((f||!a)&&((ia(r)!=="body"||ll(s))&&(d=dl(r)),f)){let g=aa(r);h=Wa(r),m.x=g.x+r.clientLeft,m.y=g.y+r.clientTop}let b=s&&!f&&!a?Ib(s,d):sn(0);return{width:t.width*h.x,height:t.height*h.y,x:t.x*h.x-d.scrollLeft*h.x+m.x+b.x,y:t.y*h.y-d.scrollTop*h.y+m.y+b.y}}function s3(i){return i.getClientRects?Array.from(i.getClientRects()):[]}function l3(i){let o=dl(i),t=i.ownerDocument.body,r=Po(i.scrollWidth,i.clientWidth,t.scrollWidth,t.clientWidth),n=Po(i.scrollHeight,i.clientHeight,t.scrollHeight,t.clientHeight),a=-o.scrollLeft+id(i),s=-o.scrollTop;return Fo(t).direction==="rtl"&&(a+=Po(i.clientWidth,t.clientWidth)-r),{width:r,height:n,x:a,y:s}}var c3=25;function d3(i,o,t){t===void 0&&(t="viewport");let r=t==="layoutViewport",n=Er(i),a=cn(i),s=n.visualViewport,l=a.clientWidth,d=a.clientHeight,h=0,m=0;if(s){let b=!od()||o==="fixed";r?b||(h=-s.offsetLeft,m=-s.offsetTop):(l=s.width,d=s.height,b&&(h=s.offsetLeft,m=s.offsetTop))}if(id(a)<=0){let b=a.ownerDocument,g=b.body,v=getComputedStyle(g),x=b.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,_=Math.abs(a.clientWidth-g.clientWidth-x),k=getComputedStyle(a).scrollbarGutter==="stable both-edges"?_/2:_;k<=c3&&(l-=k)}return{width:l,height:d,x:h,y:m}}function p3(i,o){let t=aa(i,!0,o==="fixed"),r=t.top+i.clientTop,n=t.left+i.clientLeft,a=Wa(i),s=i.clientWidth*a.x,l=i.clientHeight*a.y,d=n*a.x,h=r*a.y;return{width:s,height:l,x:d,y:h}}function Ab(i,o,t){let r;if(o==="viewport"||o==="layoutViewport")r=d3(i,t,o);else if(o==="document")r=l3(cn(i));else if(Ho(o))r=p3(o,t);else{let n=qb(i);r={x:o.x-n.x,y:o.y-n.y,width:o.width,height:o.height}}return oa(r)}function h3(i,o){let t=o.get(i);if(t)return t;let r=Ua(i,[],!1).filter(l=>Ho(l)&&ia(l)!=="body"),n=null,a=Fo(i).position==="fixed",s=a?di(i):i;for(;Ho(s)&&!Ga(s);){let l=Fo(s),d=ja(s),h=n?n.position:a?"fixed":"";!d&&(h==="fixed"||h==="absolute"&&l.position==="static")?r=r.filter(f=>f!==s):n=l,s=di(s)}return o.set(i,r),r}function u3(i){let{element:o,boundary:t,rootBoundary:r,strategy:n}=i,s=[...t==="clippingAncestors"?cl(o)?[]:h3(o,this._c):[].concat(t),r],l=Ab(o,s[0],n),d=l.top,h=l.right,m=l.bottom,f=l.left;for(let b=1;b<s.length;b++){let g=Ab(o,s[b],n);d=Po(g.top,d),h=an(g.right,h),m=an(g.bottom,m),f=Po(g.left,f)}return{width:h-f,height:m-d,x:f,y:d}}function m3(i){let{width:o,height:t}=Mb(i);return{width:o,height:t}}function f3(i,o,t){let r=qn(o),n=cn(o),a=t==="fixed",s=aa(i,!0,a,o),l={scrollLeft:0,scrollTop:0},d=sn(0);if((r||!a)&&((ia(o)!=="body"||ll(n))&&(l=dl(o)),r)){let b=aa(o,!0,a,o);d.x=b.x+o.clientLeft,d.y=b.y+o.clientTop}!r&&n&&(d.x=id(n));let h=n&&!r&&!a?Ib(n,l):sn(0),m=s.left+l.scrollLeft-d.x-h.x,f=s.top+l.scrollTop-d.y-h.y;return{x:m,y:f,width:s.width,height:s.height}}function Uh(i){return Fo(i).position==="static"}function Lb(i,o){if(!qn(i)||Fo(i).position==="fixed")return null;if(o)return o(i);let t=i.offsetParent;return cn(i)===t&&(t=t.ownerDocument.body),t}function Db(i,o){let t=Er(i);if(cl(i))return t;if(!qn(i)){let n=di(i);for(;n&&!Ga(n);){if(Ho(n)&&!Uh(n))return n;n=di(n)}return t}let r=Lb(i,o);for(;r&&Eb(r)&&Uh(r);)r=Lb(r,o);return r&&Ga(r)&&Uh(r)&&!ja(r)?t:r||Tb(i)||t}var g3=async function(i){let o=this.getOffsetParent||Db,t=this.getDimensions,r=await t(i.floating);return{reference:f3(i.reference,await o(i.floating),i.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function b3(i){return Fo(i).direction==="rtl"}var pl={convertOffsetParentRelativeRectToViewportRelativeRect:a3,getDocumentElement:cn,getClippingRect:u3,getOffsetParent:Db,getElementRects:g3,getClientRects:s3,getDimensions:m3,getScale:Wa,isElement:Ho,isRTL:b3};function Nb(i,o){return i.x===o.x&&i.y===o.y&&i.width===o.width&&i.height===o.height}function v3(i,o,t){let r=null,n,a=cn(i);function s(){var m;clearTimeout(n),(m=r)==null||m.disconnect(),r=null}function l(m,f){m===void 0&&(m=!1),f===void 0&&(f=1),s();let b=i.getBoundingClientRect(),{left:g,top:v,width:x,height:_}=b;if(m||o(),!x||!_)return;let k=sl(v),N=sl(a.clientWidth-(g+x)),G=sl(a.clientHeight-(v+_)),I=sl(g),$={rootMargin:-k+"px "+-N+"px "+-G+"px "+-I+"px",threshold:Po(0,an(1,f))||1},L=!0;function W(tt){let ht=tt[0].intersectionRatio;if(!Nb(b,i.getBoundingClientRect()))return l();if(ht!==f){if(!L)return l();ht?l(!1,ht):n=setTimeout(()=>{l(!1,1e-7)},1e3)}L=!1}try{r=new IntersectionObserver(W,{...$,root:a.ownerDocument})}catch{r=new IntersectionObserver(W,$)}r.observe(i)}let d=Er(i),h=()=>l(t);return d.addEventListener("resize",h),l(!0),()=>{d.removeEventListener("resize",h),s()}}function ad(i,o,t,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=jh(i),m=n||a?[...h?Ua(h):[],...o?Ua(o):[]]:[];m.forEach(k=>{n&&k.addEventListener("scroll",t),a&&k.addEventListener("resize",t)});let f=h&&l?v3(h,t,a):null,b=-1,g=null;s&&(g=new ResizeObserver(k=>{let[N]=k;N&&N.target===h&&g&&o&&(g.unobserve(o),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var G;(G=g)==null||G.observe(o)})),t()}),h&&!d&&g.observe(h),o&&g.observe(o));let v,x=d?aa(i):null;d&&_();function _(){let k=aa(i);x&&!Nb(x,k)&&t(),x=k,v=requestAnimationFrame(_)}return t(),()=>{var k;m.forEach(N=>{n&&N.removeEventListener("scroll",t),a&&N.removeEventListener("resize",t)}),f?.(),(k=g)==null||k.disconnect(),g=null,d&&cancelAnimationFrame(v)}}var sd=wb;var ld=_b,cd=zb,hl=kb;var Rb=yb;var dd=(i,o,t)=>{let r=new Map,n=t??{},a={...pl,...n.platform,_c:r};return xb(i,o,{...n,platform:a})};function Ob(i){return x3(i)}function Gh(i){return i.assignedSlot?i.assignedSlot:i.parentNode instanceof ShadowRoot?i.parentNode.host:i.parentNode}function x3(i){for(let o=i;o;o=Gh(o))if(o instanceof Element&&getComputedStyle(o).display==="none")return null;for(let o=Gh(i);o;o=Gh(o)){if(!(o instanceof Element))continue;let t=getComputedStyle(o);if(t.display!=="contents"&&(t.position!=="static"||ja(t)||o.tagName==="BODY"))return o}return null}var Pb=E`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--arrow-color:rgb(var(--zn-color-text));--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}.popup{position:absolute;isolation:isolate;margin:0;border:0;padding:0;background:transparent;overflow:visible;max-width:var(--auto-size-available-width,none)}.popup--fixed{position:fixed}.popup:not(.popup--active){display:none}.popup__arrow{position:absolute;width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);rotate:45deg;background:var(--arrow-color);z-index:-1}.popup{}.popup-hover-bridge:not(.popup-hover-bridge--visible){display:none}.popup-hover-bridge{position:fixed;z-index:calc(var(--zn-z-index-dropdown) - 1);top:0;right:0;bottom:0;left:0;clip-path:polygon(var(--hover-bridge-top-left-x,0) var(--hover-bridge-top-left-y,0),var(--hover-bridge-top-right-x,0) var(--hover-bridge-top-right-y,0),var(--hover-bridge-bottom-right-x,0) var(--hover-bridge-bottom-right-y,0),var(--hover-bridge-bottom-left-x,0) var(--hover-bridge-bottom-left-y,0))}`;function y3(i){return i!==null&&typeof i=="object"&&"getBoundingClientRect"in i&&("contextElement"in i?i instanceof Element:!0)}var Tt=class extends C{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="fixed";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0;this.hoverBridge=!1;this.handleAnchorHover=()=>{this.active||this.start()};this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){let t=this.anchorEl.getBoundingClientRect(),r=this.popup.getBoundingClientRect(),n=this.placement.includes("top")||this.placement.includes("bottom"),a,s,l,d,h,m,f,b;n?t.top<r.top?(a=t.left,s=t.bottom,l=t.right,d=t.bottom,h=r.left,m=r.top,f=r.right,b=r.top):(a=r.left,s=r.bottom,l=r.right,d=r.bottom,h=t.left,m=t.top,f=t.right,b=t.top):t.left<r.left?(a=t.right,s=t.top,l=r.left,d=r.top,h=t.right,m=t.bottom,f=r.left,b=r.bottom):(a=r.right,s=r.top,l=t.left,d=t.top,h=r.right,m=r.bottom,f=t.left,b=t.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${a}px`),this.style.setProperty("--hover-bridge-top-left-y",`${s}px`),this.style.setProperty("--hover-bridge-top-right-x",`${l}px`),this.style.setProperty("--hover-bridge-top-right-y",`${d}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${h}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${m}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${f}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${b}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.active&&this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element||y3(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&!this.active&&this.anchorEl instanceof Element&&(this.anchorEl.removeEventListener("mouseover",this.handleAnchorHover),this.anchorEl.addEventListener("mouseover",this.handleAnchorHover))}start(){this.anchorEl&&(this.cleanup=ad(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),this.popup.hidePopover(),requestAnimationFrame(()=>t())):t()})}reposition(){if(!this.active||!this.anchorEl)return;let t=[sd({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(hl({apply:({rects:n})=>{let a=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.minWidth=a?`${n.reference.width}px`:"",this.popup.style.minHeight=s?`${n.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(cd({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(ld({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(hl({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:n,availableHeight:a})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${a}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${n}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(Rb({element:this.arrowEl,padding:this.arrowPadding}));let r=this.strategy==="absolute"?n=>pl.getOffsetParent(n,Ob):pl.getOffsetParent;dd(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:{...pl,getOffsetParent:r}}).then(({x:n,y:a,middlewareData:s,placement:l})=>{let d={top:"bottom",right:"left",bottom:"top",left:"right"}[l.split("-")[0]];if(this.setAttribute("data-current-placement",l),Object.assign(this.popup.style,{left:`${n}px`,top:`${a}px`}),!!this.popup?.isConnected&&(this.popup.showPopover(),this.arrow)){let h=s.arrow.x,m=s.arrow.y,f="",b="",g="",v;this.arrowPlacement==="start"?(f=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",b="",v=typeof h=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="end"?(b=typeof h=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",v="",g=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="center"?(v=typeof h=="number"?"calc(50% - var(--arrow-size-diagonal))":"",f=typeof m=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(v=typeof h=="number"?`${h}px`:"",f=typeof m=="number"?`${m}px`:""),Object.assign(this.arrowEl.style,{top:f,right:b,bottom:g,left:v,[d]:"calc(var(--arrow-size-diagonal) * -1)"})}}),requestAnimationFrame(()=>this.updateHoverBridge())}render(){return u`
|
|
139
139
|
<slot class="anchor" name="anchor" @slotchange="${this.handleAnchorChange}"></slot>
|
|
140
140
|
|
|
141
141
|
<span
|
|
@@ -2271,7 +2271,7 @@ import{a as $n,b as P_,c as ur,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var $
|
|
|
2271
2271
|
</div>
|
|
2272
2272
|
</div>
|
|
2273
2273
|
</div>
|
|
2274
|
-
`}};$r.styles=T(h0),c([p()],$r.prototype,"caption",2),c([p()],$r.prototype,"description",2),c([p()],$r.prototype,"amount",2),c([p()],$r.prototype,"type",2),c([p()],$r.prototype,"previous",2),c([p()],$r.prototype,"currency",2),c([p({type:Boolean,attribute:"show-delta"})],$r.prototype,"showDelta",2),c([p()],$r.prototype,"color",2);var k5=$r;$r.define("zn-stat");var u0=E`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{display:contents;--zn-scroll-footer-height:0px;--zn-scroll-header-height:0px}.container{max-height:100%;max-width:100%;height:100%;width:100%;display:flex;flex-direction:column;position:relative;overflow:hidden}.scroll-container{container-type:inline-size;display:flex;flex-direction:column;height:100%;max-height:100%;max-width:100%;width:100%;overflow-y:auto;flex-grow:1;margin:0;padding:0 0 var(--zn-scroll-footer-height,0px) 0}.scroll-header{display:contents}.scroll-footer{padding:0;margin:0;position:absolute;bottom:0;left:0;right:0;display:flex}`;var gn=class extends C{constructor(){super(...arguments);this.startScrolled=!1;this._footerResizeObserver=new te(this,{target:null,callback:()=>
|
|
2274
|
+
`}};$r.styles=T(h0),c([p()],$r.prototype,"caption",2),c([p()],$r.prototype,"description",2),c([p()],$r.prototype,"amount",2),c([p()],$r.prototype,"type",2),c([p()],$r.prototype,"previous",2),c([p()],$r.prototype,"currency",2),c([p({type:Boolean,attribute:"show-delta"})],$r.prototype,"showDelta",2),c([p()],$r.prototype,"color",2);var k5=$r;$r.define("zn-stat");var u0=E`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host ::-webkit-scrollbar{width:5px;height:5px}:host{}:host ::-webkit-scrollbar-track{background:transparent}:host{}:host ::-webkit-scrollbar-thumb{background:rgba(var(--inverse-base),0.2);border-radius:5px}:host{}:host ::-webkit-scrollbar-thumb:hover{background:rgba(var(--inverse-base),0.6)}:host{display:contents;--zn-scroll-footer-height:0px;--zn-scroll-header-height:0px}.container{max-height:100%;max-width:100%;height:100%;width:100%;display:flex;flex-direction:column;position:relative;overflow:hidden}.scroll-container{container-type:inline-size;display:flex;flex-direction:column;height:100%;max-height:100%;max-width:100%;width:100%;overflow-y:auto;flex-grow:1;margin:0;padding:0 0 var(--zn-scroll-footer-height,0px) 0}.scroll-header{display:contents}.scroll-footer{padding:0;margin:0;position:absolute;bottom:0;left:0;right:0;display:flex}`;var gn=class extends C{constructor(){super(...arguments);this.startScrolled=!1;this._footerObserved=!1;this._footerHeightFrame=null;this._footerResizeObserver=new te(this,{target:null,callback:()=>this._syncFooterHeight()});this._domObserver=new Lt(this,{target:null,config:{childList:!0,subtree:!0},callback:()=>{setTimeout(()=>this.scrollEnd(),100),this.footer&&(this._syncFooterHeight(),this._footerObserved||(this._footerObserved=!0,this._footerResizeObserver.observe(this.footer)))}})}firstUpdated(t){super.firstUpdated(t),this.startScrolled&&this.container&&setTimeout(this.scrollEnd.bind(this),10)}disconnectedCallback(){super.disconnectedCallback(),this._footerHeightFrame!==null&&(cancelAnimationFrame(this._footerHeightFrame),this._footerHeightFrame=null)}scrollEnd(){this.container.scrollTop=this.container.scrollHeight}_syncFooterHeight(){this._footerHeightFrame===null&&(this._footerHeightFrame=requestAnimationFrame(()=>{this._footerHeightFrame=null;let t=`${this.footer?.clientHeight??0}px`;this.style.getPropertyValue("--zn-scroll-footer-height")!==t&&this.style.setProperty("--zn-scroll-footer-height",t)}))}connectedCallback(){super.connectedCallback(),this.startScrolled&&this._domObserver.observe(this)}render(){return u`
|
|
2275
2275
|
<div class="container">
|
|
2276
2276
|
<div class="scroll-header">
|
|
2277
2277
|
<slot name="header"></slot>
|
|
@@ -4503,7 +4503,7 @@ ${this.parser.parse(i)}</blockquote>
|
|
|
4503
4503
|
${i}</tr>
|
|
4504
4504
|
`}tablecell(i){let o=this.parser.parseInline(i.tokens),t=i.header?"th":"td";return(i.align?`<${t} align="${i.align}">`:`<${t}>`)+o+`</${t}>
|
|
4505
4505
|
`}strong({tokens:i}){return`<strong>${this.parser.parseInline(i)}</strong>`}em({tokens:i}){return`<em>${this.parser.parseInline(i)}</em>`}codespan({text:i}){return`<code>${En(i,!0)}</code>`}br(i){return"<br>"}del({tokens:i}){return`<del>${this.parser.parseInline(i)}</del>`}link({href:i,title:o,tokens:t}){let r=this.parser.parseInline(t),n=M2(i);if(n===null)return r;i=n;let a='<a href="'+i+'"';return o&&(a+=' title="'+En(o)+'"'),a+=">"+r+"</a>",a}image({href:i,title:o,text:t,tokens:r}){r&&(t=this.parser.parseInline(r,this.parser.textRenderer));let n=M2(i);if(n===null)return En(t);i=n;let a=`<img src="${i}" alt="${En(t)}"`;return o&&(a+=` title="${En(o)}"`),a+=">",a}text(i){return"tokens"in i&&i.tokens?this.parser.parseInline(i.tokens):"escaped"in i&&i.escaped?i.text:En(i.text)}},qf=class{strong({text:i}){return i}em({text:i}){return i}codespan({text:i}){return i}del({text:i}){return i}html({text:i}){return i}text({text:i}){return i}link({text:i}){return""+i}image({text:i}){return""+i}br(){return""}checkbox({raw:i}){return i}},en=class kf{constructor(o){B(this,"options");B(this,"renderer");B(this,"textRenderer");this.options=o||Aa,this.options.renderer=this.options.renderer||new Qp,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new qf}static parse(o,t){return new kf(t).parse(o)}static parseInline(o,t){return new kf(t).parseInline(o)}parse(o){this.renderer.parser=this;let t="";for(let r=0;r<o.length;r++){let n=o[r];if(this.options.extensions?.renderers?.[n.type]){let s=n,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){t+=l||"";continue}}let a=n;switch(a.type){case"space":{t+=this.renderer.space(a);break}case"hr":{t+=this.renderer.hr(a);break}case"heading":{t+=this.renderer.heading(a);break}case"code":{t+=this.renderer.code(a);break}case"table":{t+=this.renderer.table(a);break}case"blockquote":{t+=this.renderer.blockquote(a);break}case"list":{t+=this.renderer.list(a);break}case"checkbox":{t+=this.renderer.checkbox(a);break}case"html":{t+=this.renderer.html(a);break}case"def":{t+=this.renderer.def(a);break}case"paragraph":{t+=this.renderer.paragraph(a);break}case"text":{t+=this.renderer.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return t}parseInline(o,t=this.renderer){this.renderer.parser=this;let r="";for(let n=0;n<o.length;n++){let a=o[n];if(this.options.extensions?.renderers?.[a.type]){let l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=l||"";continue}}let s=a;switch(s.type){case"escape":{r+=t.text(s);break}case"html":{r+=t.html(s);break}case"link":{r+=t.link(s);break}case"image":{r+=t.image(s);break}case"checkbox":{r+=t.checkbox(s);break}case"strong":{r+=t.strong(s);break}case"em":{r+=t.em(s);break}case"codespan":{r+=t.codespan(s);break}case"br":{r+=t.br(s);break}case"del":{r+=t.del(s);break}case"text":{r+=t.text(s);break}default:{let l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}},Kp,xc=(Kp=class{constructor(i){B(this,"options");B(this,"block");this.options=i||Aa}preprocess(i){return i}postprocess(i){return i}processAllTokens(i){return i}emStrongMask(i){return i}provideLexer(i=this.block){return i?tn.lex:tn.lexInline}provideParser(i=this.block){return i?en.parse:en.parseInline}},B(Kp,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),B(Kp,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Kp),tM=class{constructor(...i){B(this,"defaults",Cf());B(this,"options",this.setOptions);B(this,"parse",this.parseMarkdown(!0));B(this,"parseInline",this.parseMarkdown(!1));B(this,"Parser",en);B(this,"Renderer",Qp);B(this,"TextRenderer",qf);B(this,"Lexer",tn);B(this,"Tokenizer",Xp);B(this,"Hooks",xc);this.use(...i)}walkTokens(i,o){let t=[];for(let r of i)switch(t=t.concat(o.call(this,r)),r.type){case"table":{let n=r;for(let a of n.header)t=t.concat(this.walkTokens(a.tokens,o));for(let a of n.rows)for(let s of a)t=t.concat(this.walkTokens(s.tokens,o));break}case"list":{let n=r;t=t.concat(this.walkTokens(n.items,o));break}default:{let n=r;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(a=>{let s=n[a].flat(1/0);t=t.concat(this.walkTokens(s,o))}):n.tokens&&(t=t.concat(this.walkTokens(n.tokens,o)))}}return t}use(...i){let o=this.defaults.extensions||{renderers:{},childTokens:{}};return i.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let a=o.renderers[n.name];a?o.renderers[n.name]=function(...s){let l=n.renderer.apply(this,s);return l===!1&&(l=a.apply(this,s)),l}:o.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=o[n.level];a?a.unshift(n.tokenizer):o[n.level]=[n.tokenizer],n.start&&(n.level==="block"?o.startBlock?o.startBlock.push(n.start):o.startBlock=[n.start]:n.level==="inline"&&(o.startInline?o.startInline.push(n.start):o.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(o.childTokens[n.name]=n.childTokens)}),r.extensions=o),t.renderer){let n=this.defaults.renderer||new Qp(this.defaults);for(let a in t.renderer){if(!(a in n))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,l=t.renderer[s],d=n[s];n[s]=(...h)=>{let m=l.apply(n,h);return m===!1&&(m=d.apply(n,h)),m||""}}r.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new Xp(this.defaults);for(let a in t.tokenizer){if(!(a in n))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,l=t.tokenizer[s],d=n[s];n[s]=(...h)=>{let m=l.apply(n,h);return m===!1&&(m=d.apply(n,h)),m}}r.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new xc;for(let a in t.hooks){if(!(a in n))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,l=t.hooks[s],d=n[s];xc.passThroughHooks.has(a)?n[s]=h=>{if(this.defaults.async&&xc.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await l.call(n,h);return d.call(n,f)})();let m=l.call(n,h);return d.call(n,m)}:n[s]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(n,h);return f===!1&&(f=await d.apply(n,h)),f})();let m=l.apply(n,h);return m===!1&&(m=d.apply(n,h)),m}}r.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,a=t.walkTokens;r.walkTokens=function(s){let l=[];return l.push(a.call(this,s)),n&&(l=l.concat(n.call(this,s))),l}}this.defaults={...this.defaults,...r}}),this}setOptions(i){return this.defaults={...this.defaults,...i},this}lexer(i,o){return tn.lex(i,o??this.defaults)}parser(i,o){return en.parse(i,o??this.defaults)}parseMarkdown(i){return(o,t)=>{let r={...t},n={...this.defaults,...r},a=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&r.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof o>"u"||o===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof o!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(o)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=i),n.async)return(async()=>{let s=n.hooks?await n.hooks.preprocess(o):o,l=await(n.hooks?await n.hooks.provideLexer(i):i?tn.lex:tn.lexInline)(s,n),d=n.hooks?await n.hooks.processAllTokens(l):l;n.walkTokens&&await Promise.all(this.walkTokens(d,n.walkTokens));let h=await(n.hooks?await n.hooks.provideParser(i):i?en.parse:en.parseInline)(d,n);return n.hooks?await n.hooks.postprocess(h):h})().catch(a);try{n.hooks&&(o=n.hooks.preprocess(o));let s=(n.hooks?n.hooks.provideLexer(i):i?tn.lex:tn.lexInline)(o,n);n.hooks&&(s=n.hooks.processAllTokens(s)),n.walkTokens&&this.walkTokens(s,n.walkTokens);let l=(n.hooks?n.hooks.provideParser(i):i?en.parse:en.parseInline)(s,n);return n.hooks&&(l=n.hooks.postprocess(l)),l}catch(s){return a(s)}}}onError(i,o){return t=>{if(t.message+=`
|
|
4506
|
-
Please report this to https://github.com/markedjs/marked.`,i){let r="<p>An error occurred:</p><pre>"+En(t.message+"",!0)+"</pre>";return o?Promise.resolve(r):r}if(o)return Promise.reject(t);throw t}}},$a=new tM;function Mt(i,o){return $a.parse(i,o)}Mt.options=Mt.setOptions=function(i){return $a.setOptions(i),Mt.defaults=$a.defaults,N2(Mt.defaults),Mt};Mt.getDefaults=Cf;Mt.defaults=Aa;Mt.use=function(...i){return $a.use(...i),Mt.defaults=$a.defaults,N2(Mt.defaults),Mt};Mt.walkTokens=function(i,o){return $a.walkTokens(i,o)};Mt.parseInline=$a.parseInline;Mt.Parser=en;Mt.parser=en.parse;Mt.Renderer=Qp;Mt.TextRenderer=qf;Mt.Lexer=tn;Mt.lexer=tn.lex;Mt.Tokenizer=Xp;Mt.Hooks=xc;Mt.parse=Mt;var
|
|
4506
|
+
Please report this to https://github.com/markedjs/marked.`,i){let r="<p>An error occurred:</p><pre>"+En(t.message+"",!0)+"</pre>";return o?Promise.resolve(r):r}if(o)return Promise.reject(t);throw t}}},$a=new tM;function Mt(i,o){return $a.parse(i,o)}Mt.options=Mt.setOptions=function(i){return $a.setOptions(i),Mt.defaults=$a.defaults,N2(Mt.defaults),Mt};Mt.getDefaults=Cf;Mt.defaults=Aa;Mt.use=function(...i){return $a.use(...i),Mt.defaults=$a.defaults,N2(Mt.defaults),Mt};Mt.walkTokens=function(i,o){return $a.walkTokens(i,o)};Mt.parseInline=$a.parseInline;Mt.Parser=en;Mt.parser=en.parse;Mt.Renderer=Qp;Mt.TextRenderer=qf;Mt.Lexer=tn;Mt.lexer=tn.lex;Mt.Tokenizer=Xp;Mt.Hooks=xc;Mt.parse=Mt;var P2t=Mt.options,H2t=Mt.setOptions,F2t=Mt.use,B2t=Mt.walkTokens,V2t=Mt.parseInline;var U2t=en.parse,j2t=tn.lex;var G2=E`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.panel{border:1px solid rgb(var(--zn-border-color));background-color:rgba(var(--zn-panel),var(--zn-panel-opacity));border-radius:var(--zn-border-radius)}.markdown-editor{display:flex;flex-direction:column;gap:var(--zn-spacing-small);width:100%;height:100%;min-height:0}:host([expanded]){position:absolute;top:10px;bottom:10px;left:var(--zn-sp-padding);right:var(--zn-sp-padding);z-index:var(--zn-z-index-editor-action,1000000)}:host([expanded]) .panel,:host([expanded]) .panel__inner,:host([expanded]) .panel__content,:host([expanded]) .panel__body{height:100%;max-height:100%}:host([expanded]) .markdown-editor{height:100%}.markdown-editor__label{font-size:var(--zn-input-label-font-size-medium);color:var(--zn-input-label-color);font-weight:var(--zn-font-weight-semibold)}.markdown-editor__toolbar{display:flex;align-items:end;gap:var(--zn-spacing-small);justify-content:flex-end;flex-wrap:wrap}.markdown-editor__markdown-link{display:inline-flex;align-items:center;gap:var(--zn-spacing-x-small);margin-right:auto;font-size:var(--zn-input-label-font-size-small);line-height:1;color:var(--zn-color-neutral-500,#656d76);text-decoration:none;cursor:pointer;transition:color 0.15s ease;padding-left:var(--zn-spacing-x-small)}.markdown-editor__markdown-link:hover{color:var(--zn-color-primary-600,#0969da)}.markdown-editor__markdown-link span{white-space:nowrap}.markdown-editor__view-toggle{display:inline-flex}.markdown-editor__body{display:flex;flex:1;min-height:0;gap:var(--zn-spacing-medium)}.markdown-editor__editor,.markdown-editor__preview-wrapper{flex:1;min-width:0;min-height:0;display:flex}.markdown-editor__editor[hidden],.markdown-editor__preview-wrapper[hidden]{display:none}.markdown-editor__editor zn-textarea{flex:1;width:100%}.markdown-editor__preview-wrapper{overflow:hidden}.markdown-editor__preview{flex:1;background:var(--zn-color-neutral-0,white);border:1px solid var(--zn-color-neutral-200);border-radius:var(--zn-border-radius);padding:var(--zn-spacing-x-large);overflow-y:auto;font-family:inherit;line-height:1.7;color:var(--zn-color-text,#222)}.markdown-editor__preview h1{font-size:1.8em;margin:0.8em 0 0.4em;border-bottom:1px solid var(--zn-color-neutral-200);padding-bottom:0.3em}.markdown-editor__preview h2{font-size:1.5em;margin:0.8em 0 0.4em;border-bottom:1px solid var(--zn-color-neutral-200);padding-bottom:0.2em}.markdown-editor__preview h3{font-size:1.25em;margin:0.7em 0 0.3em}.markdown-editor__preview h4,.markdown-editor__preview h5,.markdown-editor__preview h6{font-size:1.1em;margin:0.6em 0 0.3em}.markdown-editor__preview p{margin:0.6em 0}.markdown-editor__preview ul,.markdown-editor__preview ol{margin:0.6em 0;padding-left:2em;display:block}.markdown-editor__preview ul{list-style-type:disc}.markdown-editor__preview ol{list-style-type:decimal}.markdown-editor__preview ul ul{list-style-type:circle}.markdown-editor__preview ul ul ul{list-style-type:square}.markdown-editor__preview li{margin:0.2em 0;display:list-item}.markdown-editor__preview blockquote{border-left:4px solid var(--zn-color-neutral-300);margin:0.8em 0;padding:0.4em 1em;color:var(--zn-color-neutral-600,#555)}.markdown-editor__preview table{border-collapse:collapse;width:100%;margin:0.8em 0}.markdown-editor__preview th,.markdown-editor__preview td{border:1px solid var(--zn-color-neutral-300);padding:0.4em 0.8em;text-align:left}.markdown-editor__preview th{background:var(--zn-color-neutral-100);font-weight:bold}.markdown-editor__preview code{background:var(--zn-color-neutral-100);padding:0.15em 0.4em;border-radius:3px;font-size:0.9em}.markdown-editor__preview pre{background:var(--zn-color-neutral-100);padding:1em;border-radius:4px;overflow-x:auto}.markdown-editor__preview pre code{background:none;padding:0}.markdown-editor__preview hr{border:none;border-top:1px solid var(--zn-color-neutral-300);margin:1.5em 0}.markdown-editor__preview a{color:var(--zn-color-primary-600)}.markdown-editor__help-text{font-size:var(--zn-input-help-text-font-size-medium);color:var(--zn-input-help-text-color)}`;var eM=[{mode:"editor",icon:"edit_note",label:"Editor"},{mode:"split",icon:"vertical_split",label:"Split"},{mode:"preview",icon:"visibility",label:"Preview"}],Zt=class extends Xt{constructor(){super(...arguments);this.formControlController=new nt(this,{assumeInteractionOn:["zn-input","zn-change"]});this.markdownSlotController=new Q(this,"label","help-text","actions","footer");this.debounceTimer=null;this.name="";this.value="";this.defaultValue="";this.label="";this.helpText="";this.placeholder="Enter markdown content...";this.rows=20;this.viewMode="editor";this.storageKey="zn-markdown-editor-view-mode";this.required=!1;this.readonly=!1;this.disabled=!1;this.expanded=!1;this.handleInput=()=>{this.value=this.textarea.value,this.emit("zn-input"),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.renderPreview(),150)};this.handleChange=()=>{this.value=this.textarea.value,this.emit("zn-change"),this.renderPreview()};this.handleViewToggle=t=>{let n=t.target.closest("[data-mode]")?.dataset.mode;!n||n===this.viewMode||(this.viewMode=n)};this.handleExpandToggle=()=>{this.expanded=!this.expanded}}get validity(){return this.textarea?.validity}get validationMessage(){return this.textarea?.validationMessage??""}checkValidity(){return this.textarea?.checkValidity()??!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.textarea?.reportValidity()??!0}setCustomValidity(t){this.textarea?.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.textarea?.focus(t)}blur(){this.textarea?.blur()}connectedCallback(){if(super.connectedCallback(),!this.hasAttribute("value")&&!this.value){let r=Array.from(this.childNodes).filter(s=>s.nodeType===Node.TEXT_NODE),a=r.map(s=>s.textContent??"").join("").replace(/\r\n/g,`
|
|
4507
4507
|
`).trim();a.length>0&&(this.value=a,this.defaultValue=a,r.forEach(s=>{(s.textContent??"").trim().length>0&&s.parentNode?.removeChild(s)}))}let t=this.readStoredViewMode();t&&(this.viewMode=t),this.addEventListener("toggle",this.handleExpandToggle)}disconnectedCallback(){super.disconnectedCallback(),this.debounceTimer&&clearTimeout(this.debounceTimer),this.removeEventListener("toggle",this.handleExpandToggle)}firstUpdated(t){super.firstUpdated(t),this.formControlController.updateValidity(),this.viewMode!=="editor"&&this.renderPreview()}readStoredViewMode(){if(!this.storageKey)return null;try{let t=localStorage.getItem(this.storageKey);if(t==="editor"||t==="split"||t==="preview")return t}catch{}return null}writeStoredViewMode(t){if(this.storageKey)try{localStorage.setItem(this.storageKey,t)}catch{}}renderPreview(){if(this.viewMode==="editor"||!this.previewEl)return;let t=Mt.parse(this.value||"",{async:!1});this.previewEl.innerHTML=typeof t=="string"?t:""}async handleViewModeChange(){await this.updateComplete,this.writeStoredViewMode(this.viewMode),this.renderPreview(),this.dispatchEvent(new CustomEvent("zn-view-mode-change",{bubbles:!0,composed:!0,detail:{mode:this.viewMode}}))}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.renderPreview()}handleMarkedReady(){this.renderPreview()}render(){let t=this.markdownSlotController.test("label"),r=this.markdownSlotController.test("help-text"),n=this.markdownSlotController.test("actions"),a=this.markdownSlotController.test("footer"),s=!!this.label||t,l=!!this.helpText||r,d=!!this.caption||n,h=this.viewMode==="editor"||this.viewMode==="split",m=this.viewMode==="preview"||this.viewMode==="split";return u`
|
|
4508
4508
|
<div part="base" class=${D({panel:!0,"panel--flush":this.flush||this.tabbed,"panel--flush-x":this.flushX,"panel--flush-y":this.flushY,"panel--flush-footer":this.flushFooter,"panel--tabbed":this.tabbed,"panel--transparent":this.transparent,"panel--has-actions":n,"panel--has-footer":a,"panel--has-header":d,"panel--cosmic":this.cosmic,"panel--shadow":this.shadow})}>
|
|
4509
4509
|
|