@kvass/widgets 1.2.6 → 1.2.8
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/Flatfinder-xVhUSkxC.js +15 -0
- package/dist/_plugin-vue_export-helper.js +17 -0
- package/dist/contact.js +21 -0
- package/dist/flatfinder.js +185 -0
- package/dist/font-selector.js +1 -0
- package/dist/img-comparison-slider.js +1 -0
- package/dist/index.es.js +12 -0
- package/dist/index.js +1 -0
- package/dist/map.js +2028 -0
- package/dist/project-portal.js +1 -0
- package/dist/vimeo.js +1 -0
- package/dist/youtube.js +1 -0
- package/package.json +4 -1
- package/.github/workflows/semantic-release.yml +0 -21
- package/.prettierrc +0 -6
- package/.releaserc +0 -3
- package/index.html +0 -38
- package/src/contact/README.md +0 -80
- package/src/contact/api.js +0 -82
- package/src/contact/components/Checkbox.ce.vue +0 -127
- package/src/contact/components/Field.ce.vue +0 -156
- package/src/contact/components/Fieldset.ce.vue +0 -63
- package/src/contact/components/Form.ce.vue +0 -407
- package/src/contact/main.js +0 -9
- package/src/contact/utils.js +0 -14
- package/src/flatfinder/README.md +0 -58
- package/src/flatfinder/components/Flatfinder.ce.vue +0 -34
- package/src/flatfinder/main.js +0 -4
- package/src/font-selector/README.md +0 -60
- package/src/font-selector/components/FontSelector.ce.vue +0 -246
- package/src/font-selector/main.js +0 -4
- package/src/font-selector/providers.js +0 -48
- package/src/font-selector/selector.svg +0 -7
- package/src/img-comparison-slider/README.md +0 -69
- package/src/img-comparison-slider/components/ImgComparisonSlider.ce.vue +0 -139
- package/src/img-comparison-slider/main.js +0 -7
- package/src/map/README.md +0 -59
- package/src/map/components/Map.ce.vue +0 -66
- package/src/map/main.js +0 -4
- package/src/project-portal/App.ce.vue +0 -308
- package/src/project-portal/api.js +0 -48
- package/src/project-portal/assets/logo.png +0 -0
- package/src/project-portal/assets/map-pin-solid.svg +0 -1
- package/src/project-portal/components/Card.ce.vue +0 -110
- package/src/project-portal/components/Category.ce.vue +0 -87
- package/src/project-portal/components/CategorySelector.ce.vue +0 -43
- package/src/project-portal/components/ProjectTypeSelector.ce.vue +0 -70
- package/src/project-portal/main.js +0 -16
- package/src/project-portal/styles/_variables.scss +0 -19
- package/src/project-portal/styles/components/_card.scss +0 -178
- package/src/utils/index.js +0 -40
- package/src/vimeo/README.md +0 -58
- package/src/vimeo/components/Vimeo.ce.vue +0 -311
- package/src/vimeo/main.js +0 -4
- package/src/youtube/README.md +0 -58
- package/src/youtube/components/Youtube.ce.vue +0 -322
- package/src/youtube/main.js +0 -4
- package/vite.config.js +0 -51
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{q as yt,E as Bi,I as Ls,r as dt,H as bi,b as lt,o as z,e as pt,w as _t,G as On,c as rt,f as Z,F as Vs,a as Wt,m as At,j as ce,a0 as $s,d as et,O as zs,z as Br,v as je,C as yi,t as Vt,A as Rr,g as En,Q as Hs,i as wn,D as ki,n as rn,y as _n,K as Us,L as Gs,N as Ys,s as Ri,a2 as qs}from"./_plugin-vue_export-helper.js";function jr(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=jr(t[e]))&&(i&&(i+=" "),i+=n);else for(e in t)t[e]&&(i&&(i+=" "),i+=e);return i}function Xs(){for(var t,e,n=0,i="";n<arguments.length;)(t=arguments[n++])&&(e=jr(t))&&(i&&(i+=" "),i+=e);return i}const ji=t=>typeof t=="boolean"?"".concat(t):t===0?"0":t,Ni=Xs,Ws=(t,e)=>n=>{var i;if(e?.variants==null)return Ni(t,n?.class,n?.className);const{variants:r,defaultVariants:s}=e,a=Object.keys(r).map(c=>{const u=n?.[c],d=s?.[c];if(u===null)return null;const h=ji(u)||ji(d);return r[c][h]}),l=n&&Object.entries(n).reduce((c,u)=>{let[d,h]=u;return h===void 0||(c[d]=h),c},{}),o=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((c,u)=>{let{class:d,className:h,...p}=u;return Object.entries(p).every(v=>{let[f,b]=v;return Array.isArray(b)?b.includes({...s,...l}[f]):{...s,...l}[f]===b})?[...c,d,h]:c},[]);return Ni(t,a,o,n?.class,n?.className)},ke=/^[a-z0-9]+(-[a-z0-9]+)*$/,Cn=(t,e,n,i="")=>{const r=t.split(":");if(t.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;i=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const l=r.pop(),o=r.pop(),c={provider:r.length>0?r[0]:i,prefix:o,name:l};return e&&!qe(c)?null:c}const s=r[0],a=s.split("-");if(a.length>1){const l={provider:i,prefix:a.shift(),name:a.join("-")};return e&&!qe(l)?null:l}if(n&&i===""){const l={provider:i,prefix:"",name:s};return e&&!qe(l,n)?null:l}return null},qe=(t,e)=>t?!!((t.provider===""||t.provider.match(ke))&&(e&&t.prefix===""||t.prefix.match(ke))&&t.name.match(ke)):!1,Nr=Object.freeze({left:0,top:0,width:16,height:16}),sn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Sn=Object.freeze({...Nr,...sn}),Jn=Object.freeze({...Sn,body:"",hidden:!1});function Ks(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(n.rotate=i),n}function Li(t,e){const n=Ks(t,e);for(const i in Jn)i in sn?i in t&&!(i in n)&&(n[i]=sn[i]):i in e?n[i]=e[i]:i in t&&(n[i]=t[i]);return n}function Zs(t,e){const n=t.icons,i=t.aliases||Object.create(null),r=Object.create(null);function s(a){if(n[a])return r[a]=[];if(!(a in r)){r[a]=null;const l=i[a]&&i[a].parent,o=l&&s(l);o&&(r[a]=[l].concat(o))}return r[a]}return(e||Object.keys(n).concat(Object.keys(i))).forEach(s),r}function Qs(t,e,n){const i=t.icons,r=t.aliases||Object.create(null);let s={};function a(l){s=Li(i[l]||r[l],s)}return a(e),n.forEach(a),Li(t,s)}function Lr(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(r=>{e(r,null),n.push(r)});const i=Zs(t);for(const r in i){const s=i[r];s&&(e(r,Qs(t,r,s)),n.push(r))}return n}const Js={provider:"",aliases:{},not_found:{},...Nr};function Mn(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function Vr(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!Mn(t,Js))return null;const n=e.icons;for(const r in n){const s=n[r];if(!r.match(ke)||typeof s.body!="string"||!Mn(s,Jn))return null}const i=e.aliases||Object.create(null);for(const r in i){const s=i[r],a=s.parent;if(!r.match(ke)||typeof a!="string"||!n[a]&&!i[a]||!Mn(s,Jn))return null}return e}const Vi=Object.create(null);function ta(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function Qt(t,e){const n=Vi[t]||(Vi[t]=Object.create(null));return n[e]||(n[e]=ta(t,e))}function xi(t,e){return Vr(e)?Lr(e,(n,i)=>{i?t.icons[n]=i:t.missing.add(n)}):[]}function ea(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}let Te=!1;function $r(t){return typeof t=="boolean"&&(Te=t),Te}function na(t){const e=typeof t=="string"?Cn(t,!0,Te):t;if(e){const n=Qt(e.provider,e.prefix),i=e.name;return n.icons[i]||(n.missing.has(i)?null:void 0)}}function ia(t,e){const n=Cn(t,!0,Te);if(!n)return!1;const i=Qt(n.provider,n.prefix);return ea(i,n.name,e)}function ra(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),Te&&!e&&!t.prefix){let r=!1;return Vr(t)&&(t.prefix="",Lr(t,(s,a)=>{a&&ia(s,a)&&(r=!0)})),r}const n=t.prefix;if(!qe({provider:e,prefix:n,name:"a"}))return!1;const i=Qt(e,n);return!!xi(i,t)}const zr=Object.freeze({width:null,height:null}),Hr=Object.freeze({...zr,...sn}),sa=/(-?[0-9.]*[0-9]+[0-9.]*)/g,aa=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function $i(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const i=t.split(sa);if(i===null||!i.length)return t;const r=[];let s=i.shift(),a=aa.test(s);for(;;){if(a){const l=parseFloat(s);isNaN(l)?r.push(s):r.push(Math.ceil(l*e*n)/n)}else r.push(s);if(s=i.shift(),s===void 0)return r.join("");a=!a}}const oa=t=>t==="unset"||t==="undefined"||t==="none";function la(t,e){const n={...Sn,...t},i={...Hr,...e},r={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,i].forEach(v=>{const f=[],b=v.hFlip,k=v.vFlip;let M=v.rotate;b?k?M+=2:(f.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),f.push("scale(-1 1)"),r.top=r.left=0):k&&(f.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),f.push("scale(1 -1)"),r.top=r.left=0);let O;switch(M<0&&(M-=Math.floor(M/4)*4),M=M%4,M){case 1:O=r.height/2+r.top,f.unshift("rotate(90 "+O.toString()+" "+O.toString()+")");break;case 2:f.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:O=r.width/2+r.left,f.unshift("rotate(-90 "+O.toString()+" "+O.toString()+")");break}M%2===1&&(r.left!==r.top&&(O=r.left,r.left=r.top,r.top=O),r.width!==r.height&&(O=r.width,r.width=r.height,r.height=O)),f.length&&(s='<g transform="'+f.join(" ")+'">'+s+"</g>")});const a=i.width,l=i.height,o=r.width,c=r.height;let u,d;a===null?(d=l===null?"1em":l==="auto"?c:l,u=$i(d,o/c)):(u=a==="auto"?o:a,d=l===null?$i(u,c/o):l==="auto"?c:l);const h={},p=(v,f)=>{oa(f)||(h[v]=f.toString())};return p("width",u),p("height",d),h.viewBox=r.left.toString()+" "+r.top.toString()+" "+o.toString()+" "+c.toString(),{attributes:h,body:s}}const ua=/\sid="(\S+)"/g,ca="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let da=0;function ha(t,e=ca){const n=[];let i;for(;i=ua.exec(t);)n.push(i[1]);if(!n.length)return t;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const a=typeof e=="function"?e(s):e+(da++).toString(),l=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+a+r+"$3")}),t=t.replace(new RegExp(r,"g"),""),t}const ti=Object.create(null);function pa(t,e){ti[t]=e}function ei(t){return ti[t]||ti[""]}function Ei(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const wi=Object.create(null),Ne=["https://api.simplesvg.com","https://api.unisvg.com"],ni=[];for(;Ne.length>0;)Ne.length===1||Math.random()>.5?ni.push(Ne.shift()):ni.push(Ne.pop());wi[""]=Ei({resources:["https://api.iconify.design"].concat(ni)});function Ur(t,e){const n=Ei(e);return n===null?!1:(wi[t]=n,!0)}function _i(t){return wi[t]}const fa=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let zi=fa();function ga(t,e){const n=_i(t);if(!n)return 0;let i;if(!n.maxURL)i=0;else{let r=0;n.resources.forEach(a=>{r=Math.max(r,a.length)});const s=e+".json?icons=";i=n.maxURL-r-n.path.length-s.length}return i}function ma(t){return t===404}const va=(t,e,n)=>{const i=[],r=ga(t,e),s="icons";let a={type:s,provider:t,prefix:e,icons:[]},l=0;return n.forEach((o,c)=>{l+=o.length+1,l>=r&&c>0&&(i.push(a),a={type:s,provider:t,prefix:e,icons:[]},l=o.length),a.icons.push(o)}),i.push(a),i};function ba(t){if(typeof t=="string"){const e=_i(t);if(e)return e.path}return"/"}const ya=(t,e,n)=>{if(!zi){n("abort",424);return}let i=ba(e.provider);switch(e.type){case"icons":{const s=e.prefix,a=e.icons.join(","),l=new URLSearchParams({icons:a});i+=s+".json?"+l.toString();break}case"custom":{const s=e.uri;i+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let r=503;zi(t+i).then(s=>{const a=s.status;if(a!==200){setTimeout(()=>{n(ma(a)?"abort":"next",a)});return}return r=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",r)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",r)})},ka={prepare:va,send:ya};function xa(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((r,s)=>r.provider!==s.provider?r.provider.localeCompare(s.provider):r.prefix!==s.prefix?r.prefix.localeCompare(s.prefix):r.name.localeCompare(s.name));let i={provider:"",prefix:"",name:""};return t.forEach(r=>{if(i.name===r.name&&i.prefix===r.prefix&&i.provider===r.provider)return;i=r;const s=r.provider,a=r.prefix,l=r.name,o=n[s]||(n[s]=Object.create(null)),c=o[a]||(o[a]=Qt(s,a));let u;l in c.icons?u=e.loaded:a===""||c.missing.has(l)?u=e.missing:u=e.pending;const d={provider:s,prefix:a,name:l};u.push(d)}),e}function Gr(t,e){t.forEach(n=>{const i=n.loaderCallbacks;i&&(n.loaderCallbacks=i.filter(r=>r.id!==e))})}function Ea(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const i=t.provider,r=t.prefix;e.forEach(s=>{const a=s.icons,l=a.pending.length;a.pending=a.pending.filter(o=>{if(o.prefix!==r)return!0;const c=o.name;if(t.icons[c])a.loaded.push({provider:i,prefix:r,name:c});else if(t.missing.has(c))a.missing.push({provider:i,prefix:r,name:c});else return n=!0,!0;return!1}),a.pending.length!==l&&(n||Gr([t],s.id),s.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),s.abort))})}))}let wa=0;function _a(t,e,n){const i=wa++,r=Gr.bind(null,n,i);if(!e.pending.length)return r;const s={id:i,icons:e,callback:t,abort:r};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(s)}),r}function Ca(t,e=!0,n=!1){const i=[];return t.forEach(r=>{const s=typeof r=="string"?Cn(r,e,n):r;s&&i.push(s)}),i}var Sa={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Aa(t,e,n,i){const r=t.resources.length,s=t.random?Math.floor(Math.random()*r):t.index;let a;if(t.random){let A=t.resources.slice(0);for(a=[];A.length>1;){const G=Math.floor(Math.random()*A.length);a.push(A[G]),A=A.slice(0,G).concat(A.slice(G+1))}a=a.concat(A)}else a=t.resources.slice(s).concat(t.resources.slice(0,s));const l=Date.now();let o="pending",c=0,u,d=null,h=[],p=[];typeof i=="function"&&p.push(i);function v(){d&&(clearTimeout(d),d=null)}function f(){o==="pending"&&(o="aborted"),v(),h.forEach(A=>{A.status==="pending"&&(A.status="aborted")}),h=[]}function b(A,G){G&&(p=[]),typeof A=="function"&&p.push(A)}function k(){return{startTime:l,payload:e,status:o,queriesSent:c,queriesPending:h.length,subscribe:b,abort:f}}function M(){o="failed",p.forEach(A=>{A(void 0,u)})}function O(){h.forEach(A=>{A.status==="pending"&&(A.status="aborted")}),h=[]}function F(A,G,_){const m=G!=="success";switch(h=h.filter(g=>g!==A),o){case"pending":break;case"failed":if(m||!t.dataAfterTimeout)return;break;default:return}if(G==="abort"){u=_,M();return}if(m){u=_,h.length||(a.length?H():M());return}if(v(),O(),!t.random){const g=t.resources.indexOf(A.resource);g!==-1&&g!==t.index&&(t.index=g)}o="completed",p.forEach(g=>{g(_)})}function H(){if(o!=="pending")return;v();const A=a.shift();if(A===void 0){if(h.length){d=setTimeout(()=>{v(),o==="pending"&&(O(),M())},t.timeout);return}M();return}const G={status:"pending",resource:A,callback:(_,m)=>{F(G,_,m)}};h.push(G),c++,d=setTimeout(H,t.rotate),n(A,e,G.callback)}return setTimeout(H),k}function Yr(t){const e={...Sa,...t};let n=[];function i(){n=n.filter(a=>a().status==="pending")}function r(a,l,o){const c=Aa(e,a,l,(u,d)=>{i(),o&&o(u,d)});return n.push(c),c}function s(a){return n.find(l=>a(l))||null}return{query:r,find:s,setIndex:a=>{e.index=a},getIndex:()=>e.index,cleanup:i}}function Hi(){}const Pn=Object.create(null);function Fa(t){if(!Pn[t]){const e=_i(t);if(!e)return;const n=Yr(e),i={config:e,redundancy:n};Pn[t]=i}return Pn[t]}function Ta(t,e,n){let i,r;if(typeof t=="string"){const s=ei(t);if(!s)return n(void 0,424),Hi;r=s.send;const a=Fa(t);a&&(i=a.redundancy)}else{const s=Ei(t);if(s){i=Yr(s);const a=t.resources?t.resources[0]:"",l=ei(a);l&&(r=l.send)}}return!i||!r?(n(void 0,424),Hi):i.query(e,r,n)().abort}const Ui="iconify2",De="iconify",qr=De+"-count",Gi=De+"-version",Xr=36e5,Da=168;function ii(t,e){try{return t.getItem(e)}catch{}}function Ci(t,e,n){try{return t.setItem(e,n),!0}catch{}}function Yi(t,e){try{t.removeItem(e)}catch{}}function ri(t,e){return Ci(t,qr,e.toString())}function si(t){return parseInt(ii(t,qr))||0}const An={local:!0,session:!0},Wr={local:new Set,session:new Set};let Si=!1;function Ia(t){Si=t}let Le=typeof window>"u"?{}:window;function Kr(t){const e=t+"Storage";try{if(Le&&Le[e]&&typeof Le[e].length=="number")return Le[e]}catch{}An[t]=!1}function Zr(t,e){const n=Kr(t);if(!n)return;const i=ii(n,Gi);if(i!==Ui){if(i){const l=si(n);for(let o=0;o<l;o++)Yi(n,De+o.toString())}Ci(n,Gi,Ui),ri(n,0);return}const r=Math.floor(Date.now()/Xr)-Da,s=l=>{const o=De+l.toString(),c=ii(n,o);if(typeof c=="string"){try{const u=JSON.parse(c);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>r&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&e(u,l))return!0}catch{}Yi(n,o)}};let a=si(n);for(let l=a-1;l>=0;l--)s(l)||(l===a-1?(a--,ri(n,a)):Wr[t].add(l))}function Qr(){if(!Si){Ia(!0);for(const t in An)Zr(t,e=>{const n=e.data,i=e.provider,r=n.prefix,s=Qt(i,r);if(!xi(s,n).length)return!1;const a=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,a):a,!0})}}function Oa(t,e){const n=t.lastModifiedCached;if(n&&n>=e)return n===e;if(t.lastModifiedCached=e,n)for(const i in An)Zr(i,r=>{const s=r.data;return r.provider!==t.provider||s.prefix!==t.prefix||s.lastModified===e});return!0}function Ma(t,e){Si||Qr();function n(i){let r;if(!An[i]||!(r=Kr(i)))return;const s=Wr[i];let a;if(s.size)s.delete(a=Array.from(s).shift());else if(a=si(r),!ri(r,a+1))return;const l={cached:Math.floor(Date.now()/Xr),provider:t.provider,data:e};return Ci(r,De+a.toString(),JSON.stringify(l))}e.lastModified&&!Oa(t,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&(e=Object.assign({},e),delete e.not_found),n("local")||n("session"))}function qi(){}function Pa(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,Ea(t)}))}function Ba(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:i}=t,r=t.iconsToLoad;delete t.iconsToLoad;let s;!r||!(s=ei(n))||s.prepare(n,i,r).forEach(a=>{Ta(n,a,l=>{if(typeof l!="object")a.icons.forEach(o=>{t.missing.add(o)});else try{const o=xi(t,l);if(!o.length)return;const c=t.pendingIcons;c&&o.forEach(u=>{c.delete(u)}),Ma(t,l)}catch(o){console.error(o)}Pa(t)})})}))}const Ra=(t,e)=>{const n=Ca(t,!0,$r()),i=xa(n);if(!i.pending.length){let o=!0;return e&&setTimeout(()=>{o&&e(i.loaded,i.missing,i.pending,qi)}),()=>{o=!1}}const r=Object.create(null),s=[];let a,l;return i.pending.forEach(o=>{const{provider:c,prefix:u}=o;if(u===l&&c===a)return;a=c,l=u,s.push(Qt(c,u));const d=r[c]||(r[c]=Object.create(null));d[u]||(d[u]=[])}),i.pending.forEach(o=>{const{provider:c,prefix:u,name:d}=o,h=Qt(c,u),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(d)||(p.add(d),r[c][u].push(d))}),s.forEach(o=>{const{provider:c,prefix:u}=o;r[c][u].length&&Ba(o,r[c][u])}),e?_a(e,i,s):qi};function ja(t,e){const n={...t};for(const i in e){const r=e[i],s=typeof r;i in zr?(r===null||r&&(s==="string"||s==="number"))&&(n[i]=r):s===typeof n[i]&&(n[i]=i==="rotate"?r%4:r)}return n}const Na=/[\s,]+/;function La(t,e){e.split(Na).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function Va(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function i(r){for(;r<0;)r+=4;return r%4}if(n===""){const r=parseInt(t);return isNaN(r)?0:i(r)}else if(n!==t){let r=0;switch(n){case"%":r=25;break;case"deg":r=90}if(r){let s=parseFloat(t.slice(0,t.length-n.length));return isNaN(s)?0:(s=s/r,s%1===0?i(s):0)}}return e}function $a(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)n+=" "+i+'="'+e[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function za(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Ha(t){return"data:image/svg+xml,"+za(t)}function Ua(t){return'url("'+Ha(t)+'")'}const Xi={...Hr,inline:!1},Ga={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Ya={display:"inline-block"},ai={backgroundColor:"currentColor"},Jr={backgroundColor:"transparent"},Wi={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Ki={webkitMask:ai,mask:ai,background:Jr};for(const t in Ki){const e=Ki[t];for(const n in Wi)e[t+n]=Wi[n]}const Xe={};["horizontal","vertical"].forEach(t=>{const e=t.slice(0,1)+"Flip";Xe[t+"-flip"]=e,Xe[t.slice(0,1)+"-flip"]=e,Xe[t+"Flip"]=e});function Zi(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}const Qi=(t,e)=>{const n=ja(Xi,e),i={...Ga},r=e.mode||"svg",s={},a=e.style,l=typeof a=="object"&&!(a instanceof Array)?a:{};for(let f in e){const b=e[f];if(b!==void 0)switch(f){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":n[f]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&La(n,b);break;case"color":s.color=b;break;case"rotate":typeof b=="string"?n[f]=Va(b):typeof b=="number"&&(n[f]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete i["aria-hidden"];break;default:{const k=Xe[f];k?(b===!0||b==="true"||b===1)&&(n[k]=!0):Xi[f]===void 0&&(i[f]=b)}}}const o=la(t,n),c=o.attributes;if(n.inline&&(s.verticalAlign="-0.125em"),r==="svg"){i.style={...s,...l},Object.assign(i,c);let f=0,b=e.id;return typeof b=="string"&&(b=b.replace(/-/g,"_")),i.innerHTML=ha(o.body,b?()=>b+"ID"+f++:"iconifyVue"),Ri("svg",i)}const{body:u,width:d,height:h}=t,p=r==="mask"||(r==="bg"?!1:u.indexOf("currentColor")!==-1),v=$a(u,{...c,width:d+"",height:h+""});return i.style={...s,"--svg":Ua(v),width:Zi(c.width),height:Zi(c.height),...Ya,...p?ai:Jr,...l},Ri("span",i)};$r(!0);pa("",ka);if(typeof document<"u"&&typeof window<"u"){Qr();const t=window;if(t.IconifyPreload!==void 0){const e=t.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof e=="object"&&e!==null&&(e instanceof Array?e:[e]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!ra(i))&&console.error(n)}catch{console.error(n)}})}if(t.IconifyProviders!==void 0){const e=t.IconifyProviders;if(typeof e=="object"&&e!==null)for(let n in e){const i="IconifyProviders["+n+"] is invalid.";try{const r=e[n];if(typeof r!="object"||!r||r.resources===void 0)continue;Ur(n,r)||console.error(i)}catch{console.error(i)}}}}const qa={...Sn,body:""},Bn=yt({inheritAttrs:!1,data(){return{iconMounted:!1,counter:0}},mounted(){this._name="",this._loadingIcon=null,this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(t,e){if(typeof t=="object"&&t!==null&&typeof t.body=="string")return this._name="",this.abortLoading(),{data:t};let n;if(typeof t!="string"||(n=Cn(t,!1,!0))===null)return this.abortLoading(),null;const i=na(n);if(!i)return(!this._loadingIcon||this._loadingIcon.name!==t)&&(this.abortLoading(),this._name="",i!==null&&(this._loadingIcon={name:t,abort:Ra([n],()=>{this.counter++})})),null;this.abortLoading(),this._name!==t&&(this._name=t,e&&e(t));const r=["iconify"];return n.prefix!==""&&r.push("iconify--"+n.prefix),n.provider!==""&&r.push("iconify--"+n.provider),{data:i,classes:r}}},render(){this.counter;const t=this.$attrs,e=this.iconMounted?this.getIcon(t.icon,t.onLoad):null;if(!e)return Qi(qa,t);let n=t;return e.classes&&(n={...t,class:(typeof t.class=="string"?t.class+" ":"")+e.classes.join(" ")}),Qi({...Sn,...e.data},n)}});Ur("",{resources:["https://icons.ui.kvass.no"]});function Xa(t){return!t||typeof t!="object"?!1:typeof t.then=="function"&&typeof t.catch=="function"}const Wa=["xxs","xs","sm","default","lg","xl","xxl","3xl","4xl"],Ka=(t,e)=>e==="default"?`var(--k-ui-${t})`:`var(--k-ui-${t}-${e})`,Ji=t=>{switch(t){case"start":case"end":return`flex-${t}`;default:return t}},Za=(t,e="spacing")=>t.split(" ").map(n=>typeof n=="number"||typeof n=="string"&&n.match(/^\d+$/)?`${n}rem`:typeof n=="string"&&Wa.includes(n)?Ka(e,n):n).join(" ");function Qa(){var t=new Date().getTime(),e=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var i=Math.random()*16;return t>0?(i=(t+i)%16|0,t=Math.floor(t/16)):(i=(e+i)%16|0,e=Math.floor(e/16)),(n==="x"?i:i&3|8).toString(16)})}const Ja=(t,e)=>Object.fromEntries(Object.entries(e).map(([n,i])=>[`--k-${t}-${n}`,i])),ts=yt({__name:"Spinner",props:{size:{default:"medium"}},setup(t){return(e,n)=>(z(),rt("span",{class:rn(`k-spinner k-spinner--size-${e.size}`)},null,2))}}),to={class:"k-button__content"},eo={key:0,class:"k-button__icon k-button__icon--left"},no={key:1,class:"k-button__icon k-button__icon--right"},io={key:2,class:"k-button__confirm-label"},Ie=yt({__name:"Button",props:{variant:{default:"secondary"},size:{default:"medium"},loading:{type:Boolean},promise:{},confirm:{type:Boolean},is:{type:[String,Object,Function],default:"button"},stateTimeout:{default:1e3},confirmLabel:{default:"Are you sure?"},label:{},icon:{},iconLeft:{},iconRight:{}},emits:["idle","loading","success","error","confirm","click"],setup(t,{emit:e}){const n=t,i={success:"success",confirm:"warning",error:"danger",loading:null,idle:null},r=lt(()=>!d.value||o.value==="loading"?n.variant:o.value=="confirm"?"warning":i[o.value]||n.variant),s=lt(()=>n.loading||o.value==="loading"),a=dt(),l=lt(()=>{if(o.value)return["error","success"].includes(o.value)||s.value}),o=dt("idle"),c=dt(),u=dt(),d=lt(()=>o.value||s.value),h=lt(()=>["error","success"].includes(o.value)),p=lt(()=>o.value==="success"?"fa-pro-regular:check":"fa-pro-regular:exclamation-circle");function v(F){if(!F)return;f(),u.value=F,a.value=setTimeout(()=>o.value="loading",100);let H=A=>{f(),n.stateTimeout?(o.value=A,c.value=setTimeout(()=>{f(),e(A)},n.stateTimeout)):e(A)};u.value.then(()=>H("success")).catch(()=>H("error"))}function f(){a.value&&clearTimeout(a.value),c.value&&clearTimeout(c.value),u.value=null,o.value="idle"}bi(()=>n.promise,F=>{F&&Xa(F)&&v(F)});const b=dt(),k=lt(()=>o.value==="confirm");function M(F){if(n.confirm&&o.value!=="confirm")return o.value="confirm";f(),e("click",F)}const O=Ws("k-button",{variants:{variant:{primary:"k-button--variant-primary",secondary:"k-button--variant-secondary",tertiary:"k-button--variant-tertiary",danger:"k-button--variant-danger",warning:"k-button--variant-warning",success:"k-button--variant-success"},size:{small:"k-button--size-small",medium:"k-button--size-medium",large:"k-button--size-large"},isLoading:{true:"k-button--loading"},isBusy:{true:"k-button--busy"}}});return(F,H)=>(z(),pt(En(F.is),At({type:"button",class:je(O)({variant:r.value,size:F.size,isLoading:s.value,isBusy:l.value}),"aria-busy":l.value,inert:l.value},F.$attrs,{onClick:M,ref_key:"rootElement",ref:b}),{default:_t(()=>[Br(Wt("span",to,[F.icon||F.iconLeft||F.$slots.icon||F.$slots["icon-left"]?(z(),rt("span",eo,[Z(F.$slots,"icon-left",{},()=>[Z(F.$slots,"icon",{},()=>[ce(je(Bn),{icon:F.icon||F.iconLeft},null,8,["icon"])])])])):et("",!0),Z(F.$slots,"default",{},()=>[yi(Vt(F.label),1)]),F.iconRight||F.$slots["icon-right"]?(z(),rt("span",no,[Z(F.$slots,"icon-right",{},()=>[ce(je(Bn),{icon:F.iconRight},null,8,["icon"])])])):et("",!0)],512),[[Rr,!k.value]]),s.value?(z(),pt(ts,{key:0})):et("",!0),h.value?(z(),pt(je(Bn),{key:1,class:"k-button__state-indicator",icon:p.value},null,8,["icon"])):et("",!0),k.value?(z(),rt("span",io,Vt(F.confirmLabel),1)):et("",!0)]),_:3},16,["class","aria-busy","inert"]))}});var $t=(t,e=[])=>({parts:(...n)=>{if(ro(e))return $t(t,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>$t(t,[...e,...n]),rename:n=>$t(n,e),keys:()=>e,build:()=>[...new Set(e)].reduce((n,i)=>Object.assign(n,{[i]:{selector:[`&[data-scope="${ne(t)}"][data-part="${ne(i)}"]`,`& [data-scope="${ne(t)}"][data-part="${ne(i)}"]`].join(", "),attrs:{"data-scope":ne(t),"data-part":ne(i)}}}),{})}),ne=t=>t.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),ro=t=>t.length===0;function an(t){return typeof t=="object"&&t?.nodeType===Node.ELEMENT_NODE&&typeof t?.nodeName=="string"}function on(t,e){return!t||!e||!an(t)||!an(e)?!1:t===e||t.contains(e)}var so=t=>t.nodeType===Node.DOCUMENT_NODE?t:t.ownerDocument??document;function Me(t){const e={getRootNode:n=>{var i;return((i=n.getRootNode)==null?void 0:i.call(n))??document},getDoc:n=>so(e.getRootNode(n)),getWin:n=>e.getDoc(n).defaultView??window,getActiveElement:n=>e.getDoc(n).activeElement,getById:(n,i)=>e.getRootNode(n).getElementById(i),setValue:(n,i)=>{n==null||i==null||(n.value=i.toString())}};return{...e,...t}}var ao=t=>t.nodeType===Node.DOCUMENT_NODE;function Ai(t){return ao(t)?t:t?.ownerDocument??document}function oo(t){return t?.ownerDocument.defaultView??window}function ln(t){var e;return((e=t.composedPath)==null?void 0:e.call(t)[0])??t.target}var es=()=>typeof document<"u";function lo(){const t=navigator.userAgentData;return t?.platform??navigator.platform}var ns=t=>es()&&t.test(lo()),uo=()=>es()&&!!navigator.maxTouchPoints,co=()=>ns(/^Mac/)&&!uo(),ho=()=>ns(/mac|iphone|ipad|ipod/i),po=()=>ho()&&!co();function is(t,e){return Array.from(t?.querySelectorAll(e)??[])}function fo(t){const e=new Set;function n(i){const r=globalThis.requestAnimationFrame(i);e.add(()=>globalThis.cancelAnimationFrame(r))}return n(()=>n(t)),function(){e.forEach(i=>i())}}function Oe(t){const e=globalThis.requestAnimationFrame(t);return()=>{globalThis.cancelAnimationFrame(e)}}const go=Symbol(),tr=Object.getPrototypeOf,oi=new WeakMap,mo=t=>t&&(oi.has(t)?oi.get(t):tr(t)===Object.prototype||tr(t)===Array.prototype),vo=t=>mo(t)&&t[go]||null,er=(t,e=!0)=>{oi.set(t,e)};var Rn=t=>typeof t=="object"&&t!==null,qt=new WeakMap,me=new WeakSet,bo=(t=Object.is,e=(c,u)=>new Proxy(c,u),n=c=>Rn(c)&&!me.has(c)&&(Array.isArray(c)||!(Symbol.iterator in c))&&!(c instanceof WeakMap)&&!(c instanceof WeakSet)&&!(c instanceof Error)&&!(c instanceof Number)&&!(c instanceof Date)&&!(c instanceof String)&&!(c instanceof RegExp)&&!(c instanceof ArrayBuffer),i=c=>{switch(c.status){case"fulfilled":return c.value;case"rejected":throw c.reason;default:throw c}},r=new WeakMap,s=(c,u,d=i)=>{const h=r.get(c);if(h?.[0]===u)return h[1];const p=Array.isArray(c)?[]:Object.create(Object.getPrototypeOf(c));return er(p,!0),r.set(c,[u,p]),Reflect.ownKeys(c).forEach(v=>{const f=Reflect.get(c,v);me.has(f)?(er(f,!1),p[v]=f):f instanceof Promise?Object.defineProperty(p,v,{get(){return d(f)}}):qt.has(f)?p[v]=he(f,d):p[v]=f}),Object.freeze(p)},a=new WeakMap,l=[1,1],o=c=>{if(!Rn(c))throw new Error("object required");const u=a.get(c);if(u)return u;let d=l[0];const h=new Set,p=(_,m=++l[0])=>{d!==m&&(d=m,h.forEach(g=>g(_,m)))};let v=l[1];const f=(_=++l[1])=>(v!==_&&!h.size&&(v=_,k.forEach(([m])=>{const g=m[1](_);g>d&&(d=g)})),d),b=_=>(m,g)=>{const E=[...m];E[1]=[_,...E[1]],p(E,g)},k=new Map,M=(_,m)=>{if(h.size){const g=m[3](b(_));k.set(_,[m,g])}else k.set(_,[m])},O=_=>{var m;const g=k.get(_);g&&(k.delete(_),(m=g[1])==null||m.call(g))},F=_=>(h.add(_),h.size===1&&k.forEach(([m,g],E)=>{const I=m[3](b(E));k.set(E,[m,I])}),()=>{h.delete(_),h.size===0&&k.forEach(([m,g],E)=>{g&&(g(),k.set(E,[m]))})}),H=Array.isArray(c)?[]:Object.create(Object.getPrototypeOf(c)),A=e(H,{deleteProperty(_,m){const g=Reflect.get(_,m);O(m);const E=Reflect.deleteProperty(_,m);return E&&p(["delete",[m],g]),E},set(_,m,g,E){var I;const P=Reflect.has(_,m),B=Reflect.get(_,m,E);if(P&&(t(B,g)||a.has(g)&&t(B,a.get(g))))return!0;O(m),Rn(g)&&(g=vo(g)||g);let R=g;if(!((I=Object.getOwnPropertyDescriptor(_,m))!=null&&I.set))if(g instanceof Promise)g.then(N=>{g.status="fulfilled",g.value=N,p(["resolve",[m],N])}).catch(N=>{g.status="rejected",g.reason=N,p(["reject",[m],N])});else{!qt.has(g)&&n(g)&&(R=Fi(g));const N=!me.has(R)&&qt.get(R);N&&M(m,N)}return Reflect.set(_,m,R,E),p(["set",[m],g,B]),!0}});a.set(c,A);const G=[H,f,s,F];return qt.set(A,G),Reflect.ownKeys(c).forEach(_=>{const m=Object.getOwnPropertyDescriptor(c,_);m.get||m.set?Object.defineProperty(H,_,m):A[_]=c[_]}),A})=>[o,qt,me,t,e,n,i,r,s,a,l],[yo]=bo();function Fi(t={}){return yo(t)}function li(t,e,n){const i=qt.get(t);let r;const s=[],a=i[3];let l=!1;const o=a(c=>{if(s.push(c),n){e(s.splice(0));return}r||(r=Promise.resolve().then(()=>{r=void 0,l&&e(s.splice(0))}))});return l=!0,()=>{l=!1,o()}}function he(t,e){const n=qt.get(t),[i,r,s]=n;return s(i,r(),e)}function nr(t){return me.add(t),t}function ko(t,e){Object.keys(e).forEach(i=>{if(Object.getOwnPropertyDescriptor(t,i))throw new Error("object property already defined");const r=e[i],{get:s,set:a}=typeof r=="function"?{get:r}:r,l={};l.get=()=>s(he(n)),a&&(l.set=o=>a(n,o)),Object.defineProperty(t,i,l)});const n=Fi(t);return n}var xo=(t,e)=>Object.is(t,e);function ir(t,e,n,i,r){let s=Reflect.get(he(t),e);const a=r||xo;function l(){const o=he(t);a(s,o[e])||(n(o[e]),s=Reflect.get(o,e))}return li(t,l,i)}function rr(t,e,n){typeof n.value=="object"&&(n.value=le(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||e==="__proto__"?Object.defineProperty(t,e,n):t[e]=n.value}function le(t){if(typeof t!="object")return t;var e=0,n,i,r,s=Object.prototype.toString.call(t);if(s==="[object Object]"?r=Object.create(t.__proto__||null):s==="[object Array]"?r=Array(t.length):s==="[object Set]"?(r=new Set,t.forEach(function(a){r.add(le(a))})):s==="[object Map]"?(r=new Map,t.forEach(function(a,l){r.set(le(l),le(a))})):s==="[object Date]"?r=new Date(+t):s==="[object RegExp]"?r=new RegExp(t.source,t.flags):s==="[object DataView]"?r=new t.constructor(le(t.buffer)):s==="[object ArrayBuffer]"?r=t.slice(0):s.slice(-6)==="Array]"&&(r=new t.constructor(t)),r){for(i=Object.getOwnPropertySymbols(t);e<i.length;e++)rr(r,i[e],Object.getOwnPropertyDescriptor(t,i[e]));for(e=0,i=Object.getOwnPropertyNames(t);e<i.length;e++)Object.hasOwnProperty.call(r,n=i[e])&&r[n]===t[n]||rr(r,n,Object.getOwnPropertyDescriptor(t,n))}return r||t}var Eo=Object.defineProperty,wo=(t,e,n)=>e in t?Eo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,x=(t,e,n)=>(wo(t,typeof e!="symbol"?e+"":e,n),n);function _o(t){for(;t.length>0;)t.pop();return t}var sr=(t,...e)=>(typeof t=="function"?t(...e):t)??void 0,Ft=t=>t,jn=()=>{},Co=(()=>{let t=0;return()=>(t++,t.toString(36))})(),xe=t=>Array.isArray(t),Ee=t=>!(t==null||typeof t!="object"||xe(t)),So=t=>typeof t=="number"&&!Number.isNaN(t),Tt=t=>typeof t=="string",ui=t=>typeof t=="function";function un(t){if(!Ao(t)||t===void 0)return t;const e=Reflect.ownKeys(t).filter(i=>typeof i=="string"),n={};for(const i of e){const r=t[i];r!==void 0&&(n[i]=un(r))}return n}var Ao=t=>t&&typeof t=="object"&&t.constructor===Object;function Nn(...t){t.length===1?t[0]:t[1],t.length!==2||t[0]}function We(...t){const e=t.length===1?t[0]:t[1];t.length!==2||t[0]}function rs(t,...e){for(const n of e){const i=un(n);for(const r in i)Ee(n[r])?(t[r]||(t[r]={}),rs(t[r],n[r])):t[r]=n[r]}return t}function ar(t){return le(t)}function st(t){return Tt(t)?{type:t}:t}function Rt(t){return t?xe(t)?t.slice():[t]:[]}function ss(t){return Ee(t)&&t.predicate!=null}var Fo=()=>!0;function as(t,e){return t=t??Fo,(n,i,r)=>{if(Tt(t)){const s=e[t];return ui(s)?s(n,i,r):s}return ss(t)?t.predicate(e)(n,i,r):t?.(n,i,r)}}function Ln(t,e){return(n,i,r)=>ss(t)?t.predicate(e)(n,i,r):t}function To(t){const e=t.computed??Ft({}),n=t.context??Ft({}),i=Fi({value:t.initial??"",previousValue:"",event:Ft({}),previousEvent:Ft({}),context:ko(n,e),done:!1,tags:[],hasTag(r){return this.tags.includes(r)},matches(...r){return r.includes(this.value)},can(r){return Ft(this).nextEvents.includes(r)},get nextEvents(){var r,s;const a=((s=(r=t.states)==null?void 0:r[this.value])==null?void 0:s.on)??{},l=t?.on??{};return Object.keys({...a,...l})},get changed(){return this.event.value==="machine.init"||!this.previousValue?!1:this.value!==this.previousValue}});return Ft(i)}function Ve(t,e){return(n,i)=>{if(So(t))return t;if(ui(t))return t(n,i);if(Tt(t)){const r=Number.parseFloat(t);if(!Number.isNaN(r))return r;if(e){const s=e?.[t];return We(s==null,`[@zag-js/core > determine-delay] Cannot determine delay for \`${t}\`. It doesn't exist in \`options.delays\``),ui(s)?s(n,i):s}}}}function Do(t){return Tt(t)?{target:t}:t}function Io(t,e){return(n,i,r)=>Rt(t).map(Do).find(s=>as(s.guard,e)(n,i,r)??s.target??s.actions)}var Oo=class os{constructor(e,n){var i,r,s,a,l,o;x(this,"status","Not Started"),x(this,"state"),x(this,"initialState"),x(this,"initialContext"),x(this,"id"),x(this,"type","machine"),x(this,"activityEvents",new Map),x(this,"delayedEvents",new Map),x(this,"stateListeners",new Set),x(this,"contextListeners",new Set),x(this,"eventListeners",new Set),x(this,"doneListeners",new Set),x(this,"contextWatchers",new Set),x(this,"removeStateListener",jn),x(this,"removeEventListener",jn),x(this,"removeContextListener",jn),x(this,"parent"),x(this,"children",new Map),x(this,"guardMap"),x(this,"actionMap"),x(this,"delayMap"),x(this,"activityMap"),x(this,"sync"),x(this,"options"),x(this,"config"),x(this,"start",u=>{if(this.state.value="",this.status==="Running")return this;this.status="Running",this.removeStateListener=li(this.state,()=>{this.stateListeners.forEach(b=>{b(this.stateSnapshot)})},this.sync),this.removeEventListener=ir(this.state,"event",b=>{this.executeActions(this.config.onEvent,b),this.eventListeners.forEach(k=>{k(b)})},this.sync),this.removeContextListener=li(this.state.context,()=>{this.log("Context:",this.contextSnapshot),this.contextListeners.forEach(b=>{b(this.contextSnapshot)})},this.sync||this.options.debug),this.setupContextWatchers(),this.executeActivities(st("machine.start"),Rt(this.config.activities),"machine.start"),this.executeActions(this.config.entry,st("machine.start"));const d=st("machine.init"),h=Ee(u)?u.value:u,p=Ee(u)?u.context:void 0;p&&this.setContext(p);const v={target:h??this.config.initial},f=this.getNextStateInfo(v,d);return this.initialState=f,this.performStateChangeEffects(this.state.value,f,d),this}),x(this,"setupContextWatchers",()=>{var u;for(const[d,h]of Object.entries(this.config.watch??{})){const p=(u=this.options.compareFns)==null?void 0:u[d],v=ir(this.state.context,d,()=>{this.executeActions(h,this.state.event)},this.sync,p);this.contextWatchers.add(v)}}),x(this,"stop",()=>{if(this.status!=="Stopped")return this.performExitEffects(this.state.value,st("machine.stop")),this.executeActions(this.config.exit,st("machine.stop")),this.setState(""),this.setEvent("machine.stop"),this.stopStateListeners(),this.stopChildren(),this.stopActivities(),this.stopDelayedEvents(),this.stopContextWatchers(),this.stopEventListeners(),this.stopContextListeners(),this.status="Stopped",this}),x(this,"stopEventListeners",()=>{this.eventListeners.clear(),this.removeEventListener()}),x(this,"stopContextListeners",()=>{this.contextListeners.clear(),this.removeContextListener()}),x(this,"stopStateListeners",()=>{this.removeStateListener(),this.stateListeners.clear()}),x(this,"stopContextWatchers",()=>{this.contextWatchers.forEach(u=>u()),this.contextWatchers.clear()}),x(this,"stopDelayedEvents",()=>{this.delayedEvents.forEach(u=>{u.forEach(d=>d())}),this.delayedEvents.clear()}),x(this,"stopActivities",u=>{var d,h;u?((d=this.activityEvents.get(u))==null||d.forEach(p=>p()),(h=this.activityEvents.get(u))==null||h.clear(),this.activityEvents.delete(u)):(this.activityEvents.forEach(p=>{p.forEach(v=>v()),p.clear()}),this.activityEvents.clear())}),x(this,"sendChild",(u,d)=>{const h=st(u),p=sr(d,this.contextSnapshot),v=this.children.get(p);v||We(`[@zag-js/core] Cannot send '${h.type}' event to unknown child`),v.send(h)}),x(this,"stopChild",u=>{this.children.has(u)||We(`[@zag-js/core > stop-child] Cannot stop unknown child ${u}`),this.children.get(u).stop(),this.children.delete(u)}),x(this,"removeChild",u=>{this.children.delete(u)}),x(this,"stopChildren",()=>{this.children.forEach(u=>u.stop()),this.children.clear()}),x(this,"setParent",u=>{this.parent=u}),x(this,"spawn",(u,d)=>{const h=sr(u);return d&&(h.id=d),h.type="machine.actor",h.setParent(this),this.children.set(h.id,Ft(h)),h.onDone(()=>{this.removeChild(h.id)}).start(),Ft(nr(h))}),x(this,"addActivityCleanup",(u,d)=>{var h;u&&(this.activityEvents.has(u)?(h=this.activityEvents.get(u))==null||h.add(d):this.activityEvents.set(u,new Set([d])))}),x(this,"setState",u=>{this.state.previousValue=this.state.value,this.state.value=u;const d=this.getStateNode(u);u==null?_o(this.state.tags):this.state.tags=Rt(d?.tags)}),x(this,"transformContext",u=>{var d,h;return(h=(d=this.options)==null?void 0:d.transformContext)==null||h.call(d,u),u}),x(this,"setContext",u=>{u&&rs(this.state.context,this.transformContext(u))}),x(this,"withContext",u=>{const d=this.transformContext(u),h={...this.config.context,...un(d)};return new os({...this.config,context:h},this.options)}),x(this,"setOptions",u=>{const d=un(u);this.actionMap={...this.actionMap,...d.actions},this.delayMap={...this.delayMap,...d.delays},this.activityMap={...this.activityMap,...d.activities},this.guardMap={...this.guardMap,...d.guards}}),x(this,"getStateNode",u=>{var d;if(u)return(d=this.config.states)==null?void 0:d[u]}),x(this,"getNextStateInfo",(u,d)=>{const h=this.determineTransition(u,d),p=!(h!=null&&h.target),v=h?.target??this.state.value,f=this.state.value!==v,b=this.getStateNode(v),k={reenter:!p&&!f&&!(h!=null&&h.internal),transition:h,stateNode:b,target:v,changed:f};return this.log("NextState:",`[${d.type}]`,this.state.value,"---->",k.target),k}),x(this,"getActionFromDelayedTransition",u=>{const d=st("machine.after"),h=Ve(u.delay,this.delayMap)(this.contextSnapshot,d);let p;return{entry:()=>{p=globalThis.setTimeout(()=>{const v=this.getNextStateInfo(u,d);this.performStateChangeEffects(this.state.value,v,d)},h)},exit:()=>{globalThis.clearTimeout(p)}}}),x(this,"getDelayedEventActions",u=>{const d=this.getStateNode(u),h=st("machine.after");if(!d||!d.after)return;const p=[],v=[];if(xe(d.after)){const f=this.determineTransition(d.after,h);if(!f)return;const b=this.getActionFromDelayedTransition(f);p.push(b.entry),v.push(b.exit)}else if(Ee(d.after))for(const f in d.after){const b=d.after[f];let k={};if(xe(b)){const O=this.determineTransition(b,h);O&&(k=O)}else Tt(b)?k={target:b,delay:f}:k={...b,delay:f};const M=this.getActionFromDelayedTransition(k);p.push(M.entry),v.push(M.exit)}return{entries:p,exits:v}}),x(this,"executeActions",(u,d)=>{var h;const p=Ln(u,this.guardMap)(this.contextSnapshot,d,this.guardMeta);for(const v of Rt(p)){const f=Tt(v)?(h=this.actionMap)==null?void 0:h[v]:v;Nn(Tt(v)&&!f,`[@zag-js/core > execute-actions] No implementation found for action: \`${v}\``),f?.(this.state.context,d,this.meta)}}),x(this,"executeActivities",(u,d,h)=>{var p;for(const v of d){const f=Tt(v)?(p=this.activityMap)==null?void 0:p[v]:v;if(!f){Nn(`[@zag-js/core > execute-activity] No implementation found for activity: \`${v}\``);continue}const b=f(this.state.context,u,this.meta);b&&this.addActivityCleanup(h??this.state.value,b)}}),x(this,"createEveryActivities",(u,d)=>{if(!u)return;const h=st("machine.every");if(xe(u)){const p=Rt(u).find(f=>{const b=f.delay,k=Ve(b,this.delayMap)(this.contextSnapshot,h);return as(f.guard,this.guardMap)(this.contextSnapshot,h,this.guardMeta)??k!=null});if(!p)return;const v=Ve(p.delay,this.delayMap)(this.contextSnapshot,h);d(()=>{const f=globalThis.setInterval(()=>{this.executeActions(p.actions,h)},v);return()=>{globalThis.clearInterval(f)}})}else for(const p in u){const v=u?.[p],f=Ve(p,this.delayMap)(this.contextSnapshot,h);d(()=>{const b=globalThis.setInterval(()=>{this.executeActions(v,h)},f);return()=>{globalThis.clearInterval(b)}})}}),x(this,"setEvent",u=>{this.state.previousEvent=this.state.event,this.state.event=nr(st(u))}),x(this,"performExitEffects",(u,d)=>{const h=this.state.value;if(h==="")return;const p=u?this.getStateNode(u):void 0;this.stopActivities(h);const v=Ln(p?.exit,this.guardMap)(this.contextSnapshot,d,this.guardMeta),f=Rt(v),b=this.delayedEvents.get(h);b&&f.push(...b),this.executeActions(f,d),this.eventListeners.clear()}),x(this,"performEntryEffects",(u,d)=>{const h=this.getStateNode(u),p=Rt(h?.activities);this.createEveryActivities(h?.every,k=>{p.unshift(k)}),p.length>0&&this.executeActivities(d,p);const v=Ln(h?.entry,this.guardMap)(this.contextSnapshot,d,this.guardMeta),f=Rt(v),b=this.getDelayedEventActions(u);h!=null&&h.after&&b&&(this.delayedEvents.set(u,b?.exits),f.push(...b.entries)),this.executeActions(f,d),h?.type==="final"&&(this.state.done=!0,this.doneListeners.forEach(k=>{k(this.stateSnapshot)}),this.stop())}),x(this,"performTransitionEffects",(u,d)=>{const h=this.determineTransition(u,d);this.executeActions(h?.actions,d)}),x(this,"performStateChangeEffects",(u,d,h)=>{this.setEvent(h);const p=d.changed||d.reenter;p&&this.performExitEffects(u,h),this.performTransitionEffects(d.transition,h),this.setState(d.target),p&&this.performEntryEffects(d.target,h)}),x(this,"determineTransition",(u,d)=>{const h=Io(u,this.guardMap);return h?.(this.contextSnapshot,d,this.guardMeta)}),x(this,"sendParent",u=>{var d;this.parent||We("[@zag-js/core > send-parent] Cannot send event to an unknown parent");const h=st(u);(d=this.parent)==null||d.send(h)}),x(this,"log",(...u)=>{}),x(this,"send",u=>{const d=st(u);this.transition(this.state.value,d)}),x(this,"transition",(u,d)=>{var h,p;const v=Tt(u)?this.getStateNode(u):u?.stateNode,f=st(d);if(!v&&!this.config.on){const M=this.status==="Stopped"?"[@zag-js/core > transition] Cannot transition a stopped machine":`[@zag-js/core > transition] State does not have a definition for \`state\`: ${u}, \`event\`: ${f.type}`;Nn(M);return}const b=((h=v?.on)==null?void 0:h[f.type])??((p=this.config.on)==null?void 0:p[f.type]),k=this.getNextStateInfo(b,f);return this.performStateChangeEffects(this.state.value,k,f),k.stateNode}),x(this,"subscribe",u=>(this.stateListeners.add(u),this.status==="Running"&&u(this.stateSnapshot),()=>{this.stateListeners.delete(u)})),x(this,"onDone",u=>(this.doneListeners.add(u),this)),x(this,"onTransition",u=>(this.stateListeners.add(u),this.status==="Running"&&u(this.stateSnapshot),this)),x(this,"onChange",u=>(this.contextListeners.add(u),this)),x(this,"onEvent",u=>(this.eventListeners.add(u),this)),this.config=ar(e),this.options=ar(n??{}),this.id=this.config.id??`machine-${Co()}`,this.guardMap=((i=this.options)==null?void 0:i.guards)??{},this.actionMap=((r=this.options)==null?void 0:r.actions)??{},this.delayMap=((s=this.options)==null?void 0:s.delays)??{},this.activityMap=((a=this.options)==null?void 0:a.activities)??{},this.sync=((l=this.options)==null?void 0:l.sync)??!1,this.state=To(this.config),this.initialContext=he(this.state.context),this.transformContext(this.state.context);const c=st("machine.created");this.executeActions((o=this.config)==null?void 0:o.created,c)}get stateSnapshot(){return Ft(he(this.state))}getState(){return this.stateSnapshot}get contextSnapshot(){return this.stateSnapshot.context}get self(){const e=this;return{id:this.id,send:this.send.bind(this),sendParent:this.sendParent.bind(this),sendChild:this.sendChild.bind(this),stop:this.stop.bind(this),stopChild:this.stopChild.bind(this),spawn:this.spawn.bind(this),get state(){return e.stateSnapshot},get initialContext(){return e.initialContext},get initialState(){var n;return((n=e.initialState)==null?void 0:n.target)??""}}}get meta(){var e;return{state:this.stateSnapshot,guards:this.guardMap,send:this.send.bind(this),self:this.self,initialContext:this.initialContext,initialState:((e=this.initialState)==null?void 0:e.target)??"",getState:()=>this.stateSnapshot,getAction:n=>this.actionMap[n],getGuard:n=>this.guardMap[n]}}get guardMeta(){return{state:this.stateSnapshot}}get[Symbol.toStringTag](){return"Machine"}},Mo=(t,e)=>new Oo(t,e),ls=t=>t.ownerDocument.defaultView||window;function Po(t,e){const{type:n="HTMLInputElement",property:i="value"}=e,r=ls(t)[n].prototype;return Object.getOwnPropertyDescriptor(r,i)??{}}function Bo(t,e,n={}){var i;(i=Po(t,n).set)==null||i.call(t,e)}function us(t,e){const{value:n,bubbles:i=!0}=e;if(!t)return;const r=ls(t);t instanceof r.HTMLInputElement&&(Bo(t,`${n}`),t.dispatchEvent(new r.Event("input",{bubbles:i})))}var or=(t,...e)=>(typeof t=="function"?t(...e):t)??void 0,lr=(...t)=>(...e)=>{t.forEach(function(n){n?.(...e)})};function cs(t){if(!Ro(t)||t===void 0)return t;const e=Reflect.ownKeys(t).filter(i=>typeof i=="string"),n={};for(const i of e){const r=t[i];r!==void 0&&(n[i]=cs(r))}return n}var Ro=t=>t&&typeof t=="object"&&t.constructor===Object;function jo(...t){t.length===1?t[0]:t[1],t.length!==2||t[0]}var No=$t("checkbox").parts("root","label","control");No.build();var $e=Me({getRootId:t=>{var e;return((e=t.ids)==null?void 0:e.root)??`checkbox:${t.id}`},getLabelId:t=>{var e;return((e=t.ids)==null?void 0:e.label)??`checkbox:${t.id}:label`},getControlId:t=>{var e;return((e=t.ids)==null?void 0:e.control)??`checkbox:${t.id}:control`},getHiddenInputId:t=>{var e;return((e=t.ids)==null?void 0:e.hiddenInput)??`checkbox:${t.id}:hidden`},getRootEl:t=>$e.getById(t,$e.getRootId(t)),getHiddenInputEl:t=>$e.getById(t,$e.getHiddenInputId(t))});function Lo(t){return new Proxy({},{get(){return t}})}function Vo(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}var ur={htmlFor:"for",className:"class",onDoubleClick:"onDblclick",onChange:"onInput",onFocus:"onFocusin",onBlur:"onFocusout",defaultValue:"value",defaultChecked:"checked"};function $o(t){return t in ur?ur[t]:t.startsWith("on")?`on${Vo(t.substr(2))}`:t.toLowerCase()}var zo=Lo(t=>{const e={};for(const n in t){const i=t[n];n==="children"?typeof i=="string"&&(e.innerHTML=i):e[$o(n)]=t[n]}return e});function Ho(t,e){const{actions:n,state:i,context:r}=e??{},s=typeof t=="function"?t():t,a=r?s.withContext(r.value):s;return wn(()=>{a.start(i),a.state.can("SETUP")&&a.send("SETUP"),ki(()=>{a.stop()})}),Ys(()=>{a.setOptions({actions:n})}),r&&bi(r,a.setContext,{deep:!0}),a}function Uo(t,e){const n=Ho(t,e),i=Hs(n.state);return wn(()=>{const r=n.subscribe(s=>{i.value=s});ki(()=>{r?.()})}),[i,n.send,n]}function Go(t={}){const{prefix:e}=t,n=Qa();return e?`${e}-${n}`:n}function zt(t){return typeof t=="string"||t instanceof String}function cr(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function ds(t,e){return Array.isArray(e)?ds(t,(n,i)=>e.includes(i)):Object.entries(t).reduce((n,i)=>{let[r,s]=i;return e(s,r)&&(n[r]=s),n},{})}const w={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Yo(t){switch(t){case w.LEFT:return w.FORCE_LEFT;case w.RIGHT:return w.FORCE_RIGHT;default:return t}}function Vn(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function cn(t,e){if(e===t)return!0;const n=Array.isArray(e),i=Array.isArray(t);let r;if(n&&i){if(e.length!=t.length)return!1;for(r=0;r<e.length;r++)if(!cn(e[r],t[r]))return!1;return!0}if(n!=i)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const s=e instanceof Date,a=t instanceof Date;if(s&&a)return e.getTime()==t.getTime();if(s!=a)return!1;const l=e instanceof RegExp,o=t instanceof RegExp;if(l&&o)return e.toString()==t.toString();if(l!=o)return!1;const c=Object.keys(e);for(r=0;r<c.length;r++)if(!Object.prototype.hasOwnProperty.call(t,c[r]))return!1;for(r=0;r<c.length;r++)if(!cn(t[c[r]],e[c[r]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class qo{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?w.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?w.RIGHT:w.LEFT}}function D(t,e){return new D.InputMask(t,e)}function hs(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?D.MaskedRegExp:zt(t)?D.MaskedPattern:t===Date?D.MaskedDate:t===Number?D.MaskedNumber:Array.isArray(t)||t===Array?D.MaskedDynamic:D.Masked&&t.prototype instanceof D.Masked?t:D.Masked&&t instanceof D.Masked?t.constructor:t instanceof Function?D.MaskedFunction:(console.warn("Mask not found for mask",t),D.Masked)}function dn(t){if(!t)throw new Error("Options in not defined");if(D.Masked){if(t.prototype instanceof D.Masked)return{mask:t};const{mask:e=void 0,...n}=t instanceof D.Masked?{mask:t}:cr(t)&&t.mask instanceof D.Masked?t:{};if(e){const i=e.mask;return{...ds(e,(r,s)=>!s.startsWith("_")),mask:e.constructor,_mask:i,...n}}}return cr(t)?{...t}:{mask:t}}function Jt(t){if(D.Masked&&t instanceof D.Masked)return t;const e=dn(t),n=hs(e.mask);if(!n)throw new Error("Masked class is not found for provided mask, appropriate module needs to be imported manually before creating mask.");return e.mask===n&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new n(e)}D.createMask=Jt;class Ti{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,n){if(!(e==null||n==null||e===this.selectionStart&&n===this.selectionEnd))try{this._unsafeSelect(e,n)}catch{}}get isActive(){return!1}}D.MaskElement=Ti;class ee extends Ti{constructor(e){super(),this.input=e,this._handlers={}}get rootElement(){var e,n,i;return(e=(n=(i=this.input).getRootNode)==null?void 0:n.call(i))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){Object.keys(e).forEach(n=>this._toggleEventHandler(ee.EVENTS_MAP[n],e[n]))}unbindEvents(){Object.keys(this._handlers).forEach(e=>this._toggleEventHandler(e))}_toggleEventHandler(e,n){this._handlers[e]&&(this.input.removeEventListener(e,this._handlers[e]),delete this._handlers[e]),n&&(this.input.addEventListener(e,n),this._handlers[e]=n)}}ee.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"};D.HTMLMaskElement=ee;class Xo extends ee{constructor(e){super(e),this.input=e,this._handlers={}}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,n){this.input.setSelectionRange(e,n)}get value(){return this.input.value}set value(e){this.input.value=e}}D.HTMLMaskElement=ee;class ps extends ee{get _unsafeSelectionStart(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),i=n&&n.anchorOffset,r=n&&n.focusOffset;return r==null||i==null||i<r?i:r}get _unsafeSelectionEnd(){const e=this.rootElement,n=e.getSelection&&e.getSelection(),i=n&&n.anchorOffset,r=n&&n.focusOffset;return r==null||i==null||i>r?i:r}_unsafeSelect(e,n){if(!this.rootElement.createRange)return;const i=this.rootElement.createRange();i.setStart(this.input.firstChild||this.input,e),i.setEnd(this.input.lastChild||this.input,n);const r=this.rootElement,s=r.getSelection&&r.getSelection();s&&(s.removeAllRanges(),s.addRange(i))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}D.HTMLContenteditableMaskElement=ps;class Wo{constructor(e,n){this.el=e instanceof Ti?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new ps(e):new Xo(e),this.masked=Jt(n),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var n;return e==null||((n=this.masked)==null?void 0:n.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof D.Masked)&&this.masked.constructor===hs(e)){this.masked.updateOptions({mask:e});return}const n=e instanceof D.Masked?e:Jt({mask:e});n.unmaskedValue=this.masked.unmaskedValue,this.masked=n}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,n){const i=this._listeners[e];i&&i.forEach(r=>r(n))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const e=this.masked.unmaskedValue,n=this.masked.value,i=this.displayValue,r=this.unmaskedValue!==e||this.value!==n;this._unmaskedValue=e,this._value=n,this.el.value!==i&&(this.el.value=i),r&&this._fireChangeEvents()}updateOptions(e){const{mask:n,...i}=e,r=!this.maskEquals(n),s=!cn(this.masked,i);r&&(this.mask=n),s&&this.masked.updateOptions(i),(r||s)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,w.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,n){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(n),this}off(e,n){if(!this._listeners[e])return this;if(!n)return delete this._listeners[e],this;const i=this._listeners[e].indexOf(n);return i>=0&&this._listeners[e].splice(i,1),this}_onInput(e){if(this._inputEvent=e,this._abortUpdateCursor(),!this._selection)return this.updateValue();const n=new qo({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),i=this.masked.rawInputValue,r=this.masked.splice(n.startChangePos,n.removed.length,n.inserted,n.removeDirection,{input:!0,raw:!0}).offset,s=i===this.masked.rawInputValue?n.removeDirection:w.NONE;let a=this.masked.nearestInputPos(n.startChangePos+r,s);s!==w.NONE&&(a=this.masked.nearestInputPos(a,w.NONE)),this.updateControl(),this.updateCursor(a),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}D.InputMask=Wo;class ${static normalize(e){return Array.isArray(e)?e:[e,new $]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},e)}aggregate(e){return this.rawInserted+=e.rawInserted,this.skip=this.skip||e.skip,this.inserted+=e.inserted,this.tailShift+=e.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}D.ChangeDetails=$;class Dt{constructor(e,n,i){e===void 0&&(e=""),n===void 0&&(n=0),this.value=e,this.from=n,this.stop=i}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const n=this.value[0];return this.value=this.value.slice(1),n}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class ft{constructor(e){this._value="",this._update({...ft.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){Object.keys(e).length&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,n){n===void 0&&(n={input:!0}),this.reset(),this.append(e,n,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,n){return e}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),Math.min(this.displayValue.length,n-e)}extractInput(e,n,i){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this.displayValue.slice(e,n)}extractTail(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),new Dt(this.extractInput(e,n),e)}appendTail(e){return zt(e)&&(e=new Dt(String(e))),e.appendTo(this)}_appendCharRaw(e,n){return e?(this._value+=e,new $({inserted:e,rawInserted:e})):new $}_appendChar(e,n,i){n===void 0&&(n={});const r=this.state;let s;if([e,s]=this.doPrepareChar(e,n),s=s.aggregate(this._appendCharRaw(e,n)),s.inserted){let a,l=this.doValidate(n)!==!1;if(l&&i!=null){const o=this.state;this.overwrite===!0&&(a=i.state,i.unshift(this.displayValue.length-s.tailShift));let c=this.appendTail(i);l=c.rawInserted===i.toString(),!(l&&c.inserted)&&this.overwrite==="shift"&&(this.state=o,a=i.state,i.shift(),c=this.appendTail(i),l=c.rawInserted===i.toString()),l&&c.inserted&&(this.state=o)}l||(s=new $,this.state=r,i&&a&&(i.state=a))}return s}_appendPlaceholder(){return new $}_appendEager(){return new $}append(e,n,i){if(!zt(e))throw new Error("value should be string");const r=zt(i)?new Dt(String(i)):i;n!=null&&n.tail&&(n._beforeTailState=this.state);let s;[e,s]=this.doPrepare(e,n);for(let a=0;a<e.length;++a){const l=this._appendChar(e[a],n,r);if(!l.rawInserted&&!this.doSkipInvalid(e[a],n,r))break;s.aggregate(l)}return(this.eager===!0||this.eager==="append")&&n!=null&&n.input&&e&&s.aggregate(this._appendEager()),r!=null&&(s.tailShift+=this.appendTail(r).tailShift),s}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(n),new $}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const n=this.rawInputValue,i=this.value,r=e();return this.rawInputValue=n,this.value&&this.value!==i&&i.indexOf(this.value)===0&&this.append(i.slice(this.displayValue.length),{},""),delete this._refreshing,r}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const n=this.state,i=e(this);return this.state=n,delete this._isolated,i}doSkipInvalid(e,n,i){return!!this.skipInvalid}doPrepare(e,n){return n===void 0&&(n={}),$.normalize(this.prepare?this.prepare(e,this,n):e)}doPrepareChar(e,n){return n===void 0&&(n={}),$.normalize(this.prepareChar?this.prepareChar(e,this,n):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,n,i,r,s){r===void 0&&(r=w.NONE),s===void 0&&(s={input:!0});const a=e+n,l=this.extractTail(a),o=this.eager===!0||this.eager==="remove";let c;o&&(r=Yo(r),c=this.extractInput(0,a,{raw:!0}));let u=e;const d=new $;if(r!==w.NONE&&(u=this.nearestInputPos(e,n>1&&e!==0&&!o?w.NONE:r),d.tailShift=u-e),d.aggregate(this.remove(u)),o&&r!==w.NONE&&c===this.rawInputValue)if(r===w.FORCE_LEFT){let h;for(;c===this.rawInputValue&&(h=this.displayValue.length);)d.aggregate(new $({tailShift:-1})).aggregate(this.remove(h-1))}else r===w.FORCE_RIGHT&&l.unshift();return d.aggregate(this.append(i,s,l))}maskEquals(e){return this.mask===e}typedValueEquals(e){const n=this.typedValue;return e===n||ft.EMPTY_VALUES.includes(e)&&ft.EMPTY_VALUES.includes(n)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}}ft.DEFAULTS={skipInvalid:!0};ft.EMPTY_VALUES=[void 0,null,""];D.Masked=ft;class Kt{constructor(e,n){e===void 0&&(e=[]),n===void 0&&(n=0),this.chunks=e,this.from=n}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=zt(e)?new Dt(String(e)):e;const n=this.chunks[this.chunks.length-1],i=n&&(n.stop===e.stop||e.stop==null)&&e.from===n.from+n.toString().length;if(e instanceof Dt)i?n.extend(e.toString()):this.chunks.push(e);else if(e instanceof Kt){if(e.stop==null){let r;for(;e.chunks.length&&e.chunks[0].stop==null;)r=e.chunks.shift(),r.from+=e.from,this.extend(r)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof D.MaskedPattern))return new Dt(this.toString()).appendTo(e);const n=new $;for(let i=0;i<this.chunks.length&&!n.skip;++i){const r=this.chunks[i],s=e._mapPosToBlock(e.displayValue.length),a=r.stop;let l;if(a!=null&&(!s||s.index<=a)){if(r instanceof Kt||e._stops.indexOf(a)>=0){const o=e._appendPlaceholder(a);n.aggregate(o)}l=r instanceof Kt&&e._blocks[a]}if(l){const o=l.appendTail(r);o.skip=!1,n.aggregate(o),e._value+=o.inserted;const c=r.toString().slice(o.rawInserted.length);c&&n.aggregate(e.append(c,{tail:!0}))}else n.aggregate(e.append(r.toString(),{tail:!0}))}return n}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:n,...i}=e;Object.assign(this,i),this.chunks=n.map(r=>{const s="chunks"in r?new Kt:new Dt;return s.state=r,s})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const n=e!=null?e-this.from:e;let i=0;for(;i<this.chunks.length;){const r=this.chunks[i],s=r.unshift(n);if(r.toString()){if(!s)break;++i}else this.chunks.splice(i,1);if(s)return s}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const n=this.chunks[e],i=n.shift();if(n.toString()){if(!i)break;--e}else this.chunks.splice(e,1);if(i)return i}return""}}class Ko{constructor(e,n){this.masked=e,this._log=[];const{offset:i,index:r}=e._mapPosToBlock(n)||(n<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=i,this.index=r,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((n=this.block)==null?void 0:n.displayValue.length)||0){var n;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,w.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,w.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,w.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,w.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,w.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,w.NONE),!0})}}class fs{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(n),this._value||(this._isRawInput=!1),new $}nearestInputPos(e,n){n===void 0&&(n=w.NONE);const i=0,r=this._value.length;switch(n){case w.LEFT:case w.FORCE_LEFT:return i;case w.NONE:case w.RIGHT:case w.FORCE_RIGHT:default:return r}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),this._isRawInput?n-e:0}extractInput(e,n,i){return e===void 0&&(e=0),n===void 0&&(n=this._value.length),i===void 0&&(i={}),i.raw&&this._isRawInput&&this._value.slice(e,n)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,n){n===void 0&&(n={});const i=new $;if(this.isFilled)return i;const r=this.eager===!0||this.eager==="append",s=this.char===e&&(this.isUnmasking||n.input||n.raw)&&(!n.raw||!r)&&!n.tail;return s&&(i.rawInserted=this.char),this._value=i.inserted=this.char,this._isRawInput=s&&(n.raw||n.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new $;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new Dt("")}appendTail(e){return zt(e)&&(e=new Dt(String(e))),e.appendTo(this)}append(e,n,i){const r=this._appendChar(e[0],n);return i!=null&&(r.tailShift+=this.appendTail(i).tailShift),r}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}}class hn{constructor(e){const{parent:n,isOptional:i,placeholderChar:r,displayChar:s,lazy:a,eager:l,...o}=e;this.masked=Jt(o),Object.assign(this,{parent:n,isOptional:i,placeholderChar:r,displayChar:s,lazy:a,eager:l})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),e===0&&n>=1?(this.isFilled=!1,this.masked.remove(e,n)):new $}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,n){if(n===void 0&&(n={}),this.isFilled)return new $;const i=this.masked.state,r=this.masked._appendChar(e,this.currentMaskFlags(n));return r.inserted&&this.doValidate(n)===!1&&(r.inserted=r.rawInserted="",this.masked.state=i),!r.inserted&&!this.isOptional&&!this.lazy&&!n.input&&(r.inserted=this.placeholderChar),r.skip=!r.inserted&&!this.isOptional,this.isFilled=!!r.inserted,r}append(e,n,i){return this.masked.append(e,this.currentMaskFlags(n),i)}_appendPlaceholder(){const e=new $;return this.isFilled||this.isOptional||(this.isFilled=!0,e.inserted=this.placeholderChar),e}_appendEager(){return new $}extractTail(e,n){return this.masked.extractTail(e,n)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,n,i){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.masked.extractInput(e,n,i)}nearestInputPos(e,n){n===void 0&&(n=w.NONE);const i=0,r=this.value.length,s=Math.min(Math.max(e,i),r);switch(n){case w.LEFT:case w.FORCE_LEFT:return this.isComplete?s:i;case w.RIGHT:case w.FORCE_RIGHT:return this.isComplete?s:r;case w.NONE:default:return s}}totalInputPositions(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.value.length),this.value.slice(e,n).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var n;return{...e,_beforeTailState:(e==null||(n=e._beforeTailState)==null?void 0:n.masked)||e?._beforeTailState}}}hn.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class Zo extends ft{updateOptions(e){super.updateOptions(e)}_update(e){const n=e.mask;n&&(e.validate=i=>i.search(n)>=0),super._update(e)}}D.MaskedRegExp=Zo;class gt extends ft{constructor(e){super({...gt.DEFAULTS,...e,definitions:Object.assign({},hn.DEFAULT_DEFINITIONS,e?.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const n=this.mask;if(!n||!e)return;let i=!1,r=!1;for(let s=0;s<n.length;++s){if(this.blocks){const c=n.slice(s),u=Object.keys(this.blocks).filter(h=>c.indexOf(h)===0);u.sort((h,p)=>p.length-h.length);const d=u[0];if(d){const{expose:h,...p}=dn(this.blocks[d]),v=Jt({lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,...p,parent:this});v&&(this._blocks.push(v),h&&(this.exposeBlock=v),this._maskedBlocks[d]||(this._maskedBlocks[d]=[]),this._maskedBlocks[d].push(this._blocks.length-1)),s+=d.length-1;continue}}let a=n[s],l=a in e;if(a===gt.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(a==="{"||a==="}"){i=!i;continue}if(a==="["||a==="]"){r=!r;continue}if(a===gt.ESCAPE_CHAR){if(++s,a=n[s],!a)break;l=!1}const o=l?new hn({isOptional:r,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...dn(e[a]),parent:this}):new fs({char:a,eager:this.eager,isUnmasking:i});this._blocks.push(o)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){const{_blocks:n,...i}=e;this._blocks.forEach((r,s)=>r.state=n[s]),super.state=i}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,n)=>e+=n.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(n),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,n)=>e+=n.value,"")}set value(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(n),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const n=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(n),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,n)=>e+=n.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const n=new $;let i=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(i==null)return n;this._blocks[i].isFilled&&++i;for(let r=i;r<this._blocks.length;++r){const s=this._blocks[r]._appendEager();if(!s.inserted)break;n.aggregate(s)}return n}_appendCharRaw(e,n){n===void 0&&(n={});const i=this._mapPosToBlock(this.displayValue.length),r=new $;if(!i)return r;for(let a=i.index;;++a){var s;const l=this._blocks[a];if(!l)break;const o=l._appendChar(e,{...n,_beforeTailState:(s=n._beforeTailState)==null||(s=s._blocks)==null?void 0:s[a]}),c=o.skip;if(r.aggregate(o),c||o.rawInserted)break}return r}extractTail(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const i=new Kt;return e===n||this._forEachBlocksInRange(e,n,(r,s,a,l)=>{const o=r.extractTail(a,l);o.stop=this._findStopBefore(s),o.from=this._blockStartPos(s),o instanceof Kt&&(o.blockIndex=s),i.extend(o)}),i}extractInput(e,n,i){if(e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),i===void 0&&(i={}),e===n)return"";let r="";return this._forEachBlocksInRange(e,n,(s,a,l,o)=>{r+=s.extractInput(l,o,i)}),r}_findStopBefore(e){let n;for(let i=0;i<this._stops.length;++i){const r=this._stops[i];if(r<=e)n=r;else break}return n}_appendPlaceholder(e){const n=new $;if(this.lazy&&e==null)return n;const i=this._mapPosToBlock(this.displayValue.length);if(!i)return n;const r=i.index,s=e??this._blocks.length;return this._blocks.slice(r,s).forEach(a=>{if(!a.lazy||e!=null){var l;const o=a._appendPlaceholder((l=a._blocks)==null?void 0:l.length);this._value+=o.inserted,n.aggregate(o)}}),n}_mapPosToBlock(e){let n="";for(let i=0;i<this._blocks.length;++i){const r=this._blocks[i],s=n.length;if(n+=r.displayValue,e<=n.length)return{index:i,offset:e-s}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((n,i)=>n+=i.displayValue.length,0)}_forEachBlocksInRange(e,n,i){n===void 0&&(n=this.displayValue.length);const r=this._mapPosToBlock(e);if(r){const s=this._mapPosToBlock(n),a=s&&r.index===s.index,l=r.offset,o=s&&a?s.offset:this._blocks[r.index].displayValue.length;if(i(this._blocks[r.index],r.index,l,o),s&&!a){for(let c=r.index+1;c<s.index;++c)i(this._blocks[c],c,0,this._blocks[c].displayValue.length);i(this._blocks[s.index],s.index,0,s.offset)}}}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);const i=super.remove(e,n);return this._forEachBlocksInRange(e,n,(r,s,a,l)=>{i.aggregate(r.remove(a,l))}),i}nearestInputPos(e,n){if(n===void 0&&(n=w.NONE),!this._blocks.length)return 0;const i=new Ko(this,e);if(n===w.NONE)return i.pushRightBeforeInput()||(i.popState(),i.pushLeftBeforeInput())?i.pos:this.displayValue.length;if(n===w.LEFT||n===w.FORCE_LEFT){if(n===w.LEFT){if(i.pushRightBeforeFilled(),i.ok&&i.pos===e)return e;i.popState()}if(i.pushLeftBeforeInput(),i.pushLeftBeforeRequired(),i.pushLeftBeforeFilled(),n===w.LEFT){if(i.pushRightBeforeInput(),i.pushRightBeforeRequired(),i.ok&&i.pos<=e||(i.popState(),i.ok&&i.pos<=e))return i.pos;i.popState()}return i.ok?i.pos:n===w.FORCE_LEFT?0:(i.popState(),i.ok||(i.popState(),i.ok)?i.pos:0)}return n===w.RIGHT||n===w.FORCE_RIGHT?(i.pushRightBeforeInput(),i.pushRightBeforeRequired(),i.pushRightBeforeFilled()?i.pos:n===w.FORCE_RIGHT?this.displayValue.length:(i.popState(),i.ok||(i.popState(),i.ok)?i.pos:this.nearestInputPos(e,w.LEFT))):e}totalInputPositions(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length);let i=0;return this._forEachBlocksInRange(e,n,(r,s,a,l)=>{i+=r.totalInputPositions(a,l)}),i}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const n=this._maskedBlocks[e];return n?n.map(i=>this._blocks[i]):[]}}gt.DEFAULTS={lazy:!0,placeholderChar:"_"};gt.STOP_CHAR="`";gt.ESCAPE_CHAR="\\";gt.InputDefinition=hn;gt.FixedDefinition=fs;D.MaskedPattern=gt;class Ke extends gt{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:n=this.to||0,from:i=this.from||0,maxLength:r=this.maxLength||0,autofix:s=this.autofix,...a}=e;this.to=n,this.from=i,this.maxLength=Math.max(String(n).length,r),this.autofix=s;const l=String(this.from).padStart(this.maxLength,"0"),o=String(this.to).padStart(this.maxLength,"0");let c=0;for(;c<o.length&&o[c]===l[c];)++c;a.mask=o.slice(0,c).replace(/0/g,"\\0")+"0".repeat(this.maxLength-c),super._update(a)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let n="",i="";const[,r,s]=e.match(/^(\D*)(\d*)(\D*)/)||[];return s&&(n="0".repeat(r.length)+s,i="9".repeat(r.length)+s),n=n.padEnd(this.maxLength,"0"),i=i.padEnd(this.maxLength,"9"),[n,i]}doPrepareChar(e,n){n===void 0&&(n={});let i;if([e,i]=super.doPrepareChar(e.replace(/\D/g,""),n),!this.autofix||!e)return[e,i];const r=String(this.from).padStart(this.maxLength,"0"),s=String(this.to).padStart(this.maxLength,"0"),a=this.value+e;if(a.length>this.maxLength)return["",i];const[l,o]=this.boundaries(a);return Number(o)<this.from?[r[a.length-1],i]:Number(l)>this.to?this.autofix==="pad"&&a.length<this.maxLength?["",i.aggregate(this.append(r[a.length-1]+e,n))]:[s[a.length-1],i]:[e,i]}doValidate(e){const n=this.value;if(n.search(/[^0]/)===-1&&n.length<=this._matchFrom)return!0;const[i,r]=this.boundaries(n);return this.from<=Number(r)&&Number(i)<=this.to&&super.doValidate(e)}}D.MaskedRange=Ke;class Zt extends gt{constructor(e){const{mask:n,pattern:i,...r}={...Zt.DEFAULTS,...e};super({...r,mask:zt(n)?n:i})}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:n,pattern:i,blocks:r,...s}={...Zt.DEFAULTS,...e},a=Object.assign({},Zt.GET_DEFAULT_BLOCKS());e.min&&(a.Y.from=e.min.getFullYear()),e.max&&(a.Y.to=e.max.getFullYear()),e.min&&e.max&&a.Y.from===a.Y.to&&(a.m.from=e.min.getMonth()+1,a.m.to=e.max.getMonth()+1,a.m.from===a.m.to&&(a.d.from=e.min.getDate(),a.d.to=e.max.getDate())),Object.assign(a,this.blocks,r),Object.keys(a).forEach(l=>{const o=a[l];!("autofix"in o)&&"autofix"in e&&(o.autofix=e.autofix)}),super._update({...s,mask:zt(n)?n:i,blocks:a})}doValidate(e){const n=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&n!=null&&(this.min==null||this.min<=n)&&(this.max==null||n<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}}Zt.GET_DEFAULT_BLOCKS=()=>({d:{mask:Ke,from:1,to:31,maxLength:2},m:{mask:Ke,from:1,to:12,maxLength:2},Y:{mask:Ke,from:1900,to:9999}});Zt.DEFAULTS={mask:Date,pattern:"d{.}`m{.}`Y",format:(t,e)=>{if(!t)return"";const n=String(t.getDate()).padStart(2,"0"),i=String(t.getMonth()+1).padStart(2,"0"),r=t.getFullYear();return[n,i,r].join(".")},parse:(t,e)=>{const[n,i,r]=t.split(".").map(Number);return new Date(r,i-1,n)}};D.MaskedDate=Zt;class Pe extends ft{constructor(e){super({...Pe.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(n=>{const{expose:i,...r}=dn(n),s=Jt({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...r});return i&&(this.exposeMask=s),s}):[])}_appendCharRaw(e,n){n===void 0&&(n={});const i=this._applyDispatch(e,n);return this.currentMask&&i.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(n))),i}_applyDispatch(e,n,i){e===void 0&&(e=""),n===void 0&&(n={}),i===void 0&&(i="");const r=n.tail&&n._beforeTailState!=null?n._beforeTailState._value:this.value,s=this.rawInputValue,a=n.tail&&n._beforeTailState!=null?n._beforeTailState._rawInputValue:s,l=s.slice(a.length),o=this.currentMask,c=new $,u=o?.state;if(this.currentMask=this.doDispatch(e,{...n},i),this.currentMask)if(this.currentMask!==o){if(this.currentMask.reset(),a){const d=this.currentMask.append(a,{raw:!0});c.tailShift=d.inserted.length-r.length}l&&(c.tailShift+=this.currentMask.append(l,{raw:!0,tail:!0}).tailShift)}else u&&(this.currentMask.state=u);return c}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const n=new $;return e&&n.aggregate(this._applyDispatch("",{},e)),n.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var n,i;return{...e,_beforeTailState:((n=e._beforeTailState)==null?void 0:n.currentMaskRef)===this.currentMask&&((i=e._beforeTailState)==null?void 0:i.currentMask)||e._beforeTailState}}doDispatch(e,n,i){return n===void 0&&(n={}),i===void 0&&(i=""),this.dispatch(e,this,n,i)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,n){n===void 0&&(n={});let[i,r]=super.doPrepare(e,n);if(this.currentMask){let s;[i,s]=super.doPrepare(i,this.currentMaskFlags(n)),r=r.aggregate(s)}return[i,r]}doPrepareChar(e,n){n===void 0&&(n={});let[i,r]=super.doPrepareChar(e,n);if(this.currentMask){let s;[i,s]=super.doPrepareChar(i,this.currentMaskFlags(n)),r=r.aggregate(s)}return[i,r]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(n=>n.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let n=String(e);this.currentMask&&(this.currentMask.typedValue=e,n=this.currentMask.unmaskedValue),this.unmaskedValue=n}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,n){const i=new $;return this.currentMask&&i.aggregate(this.currentMask.remove(e,n)).aggregate(this._applyDispatch()),i}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(n=>n.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:n,currentMaskRef:i,currentMask:r,...s}=e;n&&this.compiledMasks.forEach((a,l)=>a.state=n[l]),i!=null&&(this.currentMask=i,this.currentMask.state=r),super.state=s}extractInput(e,n,i){return this.currentMask?this.currentMask.extractInput(e,n,i):""}extractTail(e,n){return this.currentMask?this.currentMask.extractTail(e,n):super.extractTail(e,n)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,n){return this.currentMask?this.currentMask.nearestInputPos(e,n):super.nearestInputPos(e,n)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((n,i)=>{if(!e[i])return;const{mask:r,...s}=e[i];return cn(n,s)&&n.maskEquals(r)}):super.maskEquals(e)}typedValueEquals(e){var n;return!!((n=this.currentMask)!=null&&n.typedValueEquals(e))}}Pe.DEFAULTS=void 0;Pe.DEFAULTS={dispatch:(t,e,n,i)=>{if(!e.compiledMasks.length)return;const r=e.rawInputValue,s=e.compiledMasks.map((a,l)=>{const o=e.currentMask===a,c=o?a.displayValue.length:a.nearestInputPos(a.displayValue.length,w.FORCE_LEFT);return a.rawInputValue!==r?(a.reset(),a.append(r,{raw:!0})):o||a.remove(c),a.append(t,e.currentMaskFlags(n)),a.appendTail(i),{index:l,weight:a.rawInputValue.length,totalInputPositions:a.totalInputPositions(0,Math.max(c,a.nearestInputPos(a.displayValue.length,w.FORCE_LEFT)))}});return s.sort((a,l)=>l.weight-a.weight||l.totalInputPositions-a.totalInputPositions),e.compiledMasks[s[0].index]}};D.MaskedDynamic=Pe;class Qo extends gt{constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:n,...i}=e;if(n){const r=n.map(l=>l.length),s=Math.min(...r),a=Math.max(...r)-s;i.mask="*".repeat(s),a&&(i.mask+="["+"*".repeat(a)+"]"),this.enum=n}super._update(i)}doValidate(e){return this.enum.some(n=>n.indexOf(this.unmaskedValue)===0)&&super.doValidate(e)}}D.MaskedEnum=Qo;class Jo extends ft{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}D.MaskedFunction=Jo;class bt extends ft{constructor(e){super({...bt.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),n="\\d*",i=(this.scale?"("+Vn(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+n+i),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Vn).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Vn(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const n=e.split(this.radix);return n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),n.join(this.radix)}doPrepareChar(e,n){n===void 0&&(n={});const[i,r]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(n.input&&n.raw||!n.input&&!n.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),n);return e&&!i&&(r.skip=!0),i&&!this.allowPositive&&!this.value&&i!=="-"&&r.aggregate(this._appendChar("-")),[i,r]}_separatorsCount(e,n){n===void 0&&(n=!1);let i=0;for(let r=0;r<e;++r)this._value.indexOf(this.thousandsSeparator,r)===r&&(++i,n&&(e+=this.thousandsSeparator.length));return i}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,n,i){return e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n),this._removeThousandsSeparators(super.extractInput(e,n,i))}_appendCharRaw(e,n){if(n===void 0&&(n={}),!this.thousandsSeparator)return super._appendCharRaw(e,n);const i=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,r=this._separatorsCountFromSlice(i);this._value=this._removeThousandsSeparators(this.value);const s=super._appendCharRaw(e,n);this._value=this._insertThousandsSeparators(this._value);const a=n.tail&&n._beforeTailState?n._beforeTailState._value:this._value,l=this._separatorsCountFromSlice(a);return s.tailShift+=(l-r)*this.thousandsSeparator.length,s.skip=!s.rawInserted&&e===this.thousandsSeparator,s}_findSeparatorAround(e){if(this.thousandsSeparator){const n=e-this.thousandsSeparator.length+1,i=this.value.indexOf(this.thousandsSeparator,n);if(i<=e)return i}return-1}_adjustRangeWithSeparators(e,n){const i=this._findSeparatorAround(e);i>=0&&(e=i);const r=this._findSeparatorAround(n);return r>=0&&(n=r+this.thousandsSeparator.length),[e,n]}remove(e,n){e===void 0&&(e=0),n===void 0&&(n=this.displayValue.length),[e,n]=this._adjustRangeWithSeparators(e,n);const i=this.value.slice(0,e),r=this.value.slice(n),s=this._separatorsCount(i.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(i+r));const a=this._separatorsCountFromSlice(i);return new $({tailShift:(a-s)*this.thousandsSeparator.length})}nearestInputPos(e,n){if(!this.thousandsSeparator)return e;switch(n){case w.NONE:case w.LEFT:case w.FORCE_LEFT:{const i=this._findSeparatorAround(e-1);if(i>=0){const r=i+this.thousandsSeparator.length;if(e<r||this.value.length<=r||n===w.FORCE_LEFT)return i}break}case w.RIGHT:case w.FORCE_RIGHT:{const i=this._findSeparatorAround(e);if(i>=0)return i+this.thousandsSeparator.length}}return e}doValidate(e){let n=!!this._removeThousandsSeparators(this.value).match(this._numberRegExp);if(n){const i=this.number;n=n&&!isNaN(i)&&(this.min==null||this.min>=0||this.min<=this.number)&&(this.max==null||this.max<=0||this.number<=this.max)}return n&&super.doValidate(e)}doCommit(){if(this.value){const e=this.number;let n=e;this.min!=null&&(n=Math.max(n,this.min)),this.max!=null&&(n=Math.min(n,this.max)),n!==e&&(this.unmaskedValue=this.format(n,this));let i=this.value;this.normalizeZeros&&(i=this._normalizeZeros(i)),this.padFractionalZeros&&this.scale>0&&(i=this._padFractionalZeros(i)),this._value=i}super.doCommit()}_normalizeZeros(e){const n=this._removeThousandsSeparators(e).split(this.radix);return n[0]=n[0].replace(/^(\D*)(0*)(\d*)/,(i,r,s,a)=>r+a),e.length&&!/\d$/.test(n[0])&&(n[0]=n[0]+"0"),n.length>1&&(n[1]=n[1].replace(/0*$/,""),n[1].length||(n.length=1)),this._insertThousandsSeparators(n.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const n=e.split(this.radix);return n.length<2&&n.push(""),n[1]=n[1].padEnd(this.scale,"0"),n.join(this.radix)}doSkipInvalid(e,n,i){n===void 0&&(n={});const r=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===bt.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,n,i)&&!r}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,bt.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(bt.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||bt.EMPTY_VALUES.includes(e)&&bt.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}bt.UNMASKED_RADIX=".";bt.EMPTY_VALUES=[...ft.EMPTY_VALUES,0];bt.DEFAULTS={mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[bt.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})};D.MaskedNumber=bt;const ci={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function gs(t,e,n){e===void 0&&(e=ci.MASKED),n===void 0&&(n=ci.MASKED);const i=Jt(t);return r=>i.runIsolated(s=>(s[e]=r,s[n]))}function tl(t,e,n,i){return gs(e,n,i)(t)}D.PIPE_TYPE=ci;D.createPipe=gs;D.pipe=tl;try{globalThis.IMask=D}catch{}const el=["src","alt"],nl=yt({__name:"Image",props:{src:{},preview:{},alt:{},caption:{},captionVisibility:{default:"hover"},captionTheme:{default:"dark"},size:{default:"cover"},position:{default:"center"},width:{},height:{},aspectRatio:{}},emits:["loaded","error"],setup(t,{emit:e}){const n=t,i=dt(),r=dt(!1),s=dt(!1),a=dt(),l=lt(()=>({"--k-image-size":n.size,"--k-image-preview":n.preview||"","--k-image-position":n.position,"--k-image-width":n.width||"initial","--k-image-height":n.height||"initial","--k-image-aspectratio":(n.aspectRatio==="natural"?a.value:n.aspectRatio)||"initial"}));function o(){r.value=!0;const{naturalWidth:u=0,naturalHeight:d=0}=i.value||{};a.value=`${u}/${d}`,e("loaded")}function c(){r.value=!0,s.value=!0,e("error")}return wn(()=>{var u;return((u=i.value)==null?void 0:u.complete)&&o()}),(u,d)=>(z(),rt("figure",{class:rn(["k-image",[`k-image--size-${u.size}`,{"k-image--loaded":r.value,"k-image--loading":!r.value}]]),style:_n(l.value)},[r.value?et("",!0):(z(),pt(ts,{key:0,size:"small"})),Br(Wt("img",{src:u.src,alt:u.alt||u.caption,onLoad:o,onError:c,ref_key:"image",ref:i},null,40,el),[[Rr,!s.value]]),u.$slots.caption||u.caption?(z(),rt("figcaption",{key:1,class:rn(`k-image__caption k-image__caption--visibility-${u.captionVisibility} k-image__caption--theme-${!r.value||s.value?"light":u.captionTheme}`)},[Z(u.$slots,"caption",{},()=>[yi(Vt(u.caption),1)])],2)):et("",!0)],6))}}),il={key:1,class:"k-card__content"},rl={key:0,class:"k-card__title"},sl={key:2,class:"k-card__footer"},al=yt({inheritAttrs:!1,__name:"Card",props:{is:{default:"div"},title:{},variant:{default:"border"},thumbnail:{},thumbnailSize:{default:"cover"},headerMinHeight:{}},setup(t){return(e,n)=>(z(),pt(En(e.is),At({class:`k-card k-card--variant-${e.variant}`,style:`--k-header-min-height: ${e.headerMinHeight||""}`},e.$attrs),{default:_t(()=>[e.$slots.header||e.thumbnail?(z(),rt("div",{key:0,class:rn(["k-card__header",[{"k-card__header--has-thumbnail":!e.$slots.header&&e.thumbnail},`k-card__header--thumbnail-size-${e.thumbnailSize}`]])},[Z(e.$slots,"header",{},()=>[e.thumbnail?(z(),pt(nl,{key:0,class:"k-card__thumbnail",src:e.thumbnail,size:e.thumbnailSize},null,8,["src","size"])):et("",!0)])],2)):et("",!0),e.$slots.default||e.title?(z(),rt("div",il,[e.title?(z(),rt("div",rl,Vt(e.title),1)):et("",!0),Z(e.$slots,"default")])):et("",!0),e.$slots.footer?(z(),rt("div",sl,[Z(e.$slots,"footer")])):et("",!0)]),_:3},16,["class","style"]))}});var di=(t,e,n,i)=>{const r=typeof t=="function"?t():t;return r?.addEventListener(e,n,i),()=>{r?.removeEventListener(e,n,i)}},ol=t=>t.button===2||ll()&&t.ctrlKey&&t.button===0,ll=()=>/Mac|iPod|iPhone|iPad/.test(window.navigator.platform);function dr(t,e,n){if(!t)return;const i=t.ownerDocument.defaultView||window,r=new i.CustomEvent(e,n);return t.dispatchEvent(r)}function hr(t){return Math.max(0,Math.min(1,t))}function ms(t,e){const{left:n,top:i,width:r,height:s}=e.getBoundingClientRect(),a={x:t.x-n,y:t.y-i},l={x:hr(a.x/r),y:hr(a.y/s)};function o(c={}){const{dir:u="ltr",orientation:d="horizontal",inverted:h}=c,p=typeof h=="object"?h.x:h,v=typeof h=="object"?h.y:h;return d==="horizontal"?u==="rtl"||p?1-l.x:l.x:v?1-l.y:l.y}return{offset:a,percent:l,getPercentValue:o}}function ul(t,e,n){return Math.round((t-e)/n)*n+e}function cl(t,e,n){return Math.min(Math.max(t,e),n)}function dl(t,e,n){return(t-e)/(n-e)}function vs(t,e,n,i){const r=t*(n-e)+e,s=ul(r,e,i);return cl(s,e,n)}function hi(t,e){const n={min:t[0],max:t[1]},i={min:e[0],max:e[1]};return function(r){if(n.min===n.max||i.min===i.max)return i.min;const s=(i.max-i.min)/(n.max-n.min);return i.min+s*(r-n.min)}}var hl=$t("slider").parts("root","label","thumb","output","track","range","control","markerGroup","marker");hl.build();function pl(t){const{height:e=0}=t.thumbSize??{},n=hi([t.min,t.max],[-e/2,e/2]);return parseFloat(n(t.value).toFixed(2))}function fl(t){const{width:e=0}=t.thumbSize??{};if(t.isRtl){const i=hi([t.max,t.min],[-e/2,e/2]);return-1*parseFloat(i(t.value).toFixed(2))}const n=hi([t.min,t.max],[-e/2,e/2]);return parseFloat(n(t.value).toFixed(2))}function gl(t,e){if(t.thumbAlignment==="center")return`${e}%`;const n=t.isVertical?pl(t):fl(t);return`calc(${e}% - ${n}px)`}function Di(t){let e=dl(t.value,t.min,t.max)*100;return gl(t,e)}function bs(t){let e="visible";return t.thumbAlignment==="contain"&&!t.hasMeasuredThumbSize&&(e="hidden"),e}function ml(t){const e=t.isVertical?"bottom":"insetInlineStart";return{visibility:bs(t),position:"absolute",transform:"var(--slider-thumb-transform)",[e]:"var(--slider-thumb-offset)"}}function vl(t){let e="0%",n=`${100-t.valuePercent}%`;if(t.origin==="center"){const i=t.valuePercent<50;e=i?`${t.valuePercent}%`:"50%",n=i?"50%":n}return{start:e,end:n}}function bl(t){return t.isVertical?{position:"absolute",bottom:"var(--slider-range-start)",top:"var(--slider-range-end)"}:{position:"absolute",[t.isRtl?"right":"left"]:"var(--slider-range-start)",[t.isRtl?"left":"right"]:"var(--slider-range-end)"}}function yl(){return{touchAction:"none",userSelect:"none",position:"relative"}}function kl(t){const e=vl(t);return{"--slider-thumb-transform":t.isVertical?"translateY(50%)":t.isRtl?"translateX(50%)":"translateX(-50%)","--slider-thumb-offset":Di(t),"--slider-range-start":e.start,"--slider-range-end":e.end}}function xl(t,e){return{visibility:bs(t),position:"absolute",pointerEvents:"none",[t.isHorizontal?"insetInlineStart":"bottom"]:Di({...t,value:e}),translate:"var(--tx) var(--ty)","--tx":t.isHorizontal?t.isRtl?"50%":"-50%":"0%","--ty":t.isHorizontal?"0%":"50%"}}function El(){return{userSelect:"none"}}function wl(){return{position:"relative"}}function _l(){return{userSelect:"none",pointerEvents:"none",position:"relative"}}var Cl={getThumbOffset:Di,getControlStyle:yl,getThumbStyle:ml,getRangeStyle:bl,getRootStyle:kl,getMarkerStyle:xl,getLabelStyle:El,getTrackStyle:wl,getMarkerGroupStyle:_l},it=Me({...Cl,getRootId:t=>{var e;return((e=t.ids)==null?void 0:e.root)??`slider:${t.id}`},getThumbId:t=>{var e;return((e=t.ids)==null?void 0:e.thumb)??`slider:${t.id}:thumb`},getControlId:t=>{var e;return((e=t.ids)==null?void 0:e.control)??`slider:${t.id}:control`},getHiddenInputId:t=>{var e;return((e=t.ids)==null?void 0:e.hiddenInput)??`slider:${t.id}:input`},getOutputId:t=>{var e;return((e=t.ids)==null?void 0:e.output)??`slider:${t.id}:output`},getTrackId:t=>{var e;return((e=t.ids)==null?void 0:e.track)??`slider:${t.id}track`},getRangeId:t=>{var e;return((e=t.ids)==null?void 0:e.track)??`slider:${t.id}:range`},getLabelId:t=>{var e;return((e=t.ids)==null?void 0:e.label)??`slider:${t.id}:label`},getMarkerId:(t,e)=>`slider:${t.id}:marker:${e}`,getRootEl:t=>it.getById(t,it.getRootId(t)),getThumbEl:t=>it.getById(t,it.getThumbId(t)),getControlEl:t=>it.getById(t,it.getControlId(t)),getHiddenInputEl:t=>it.getById(t,it.getHiddenInputId(t)),getValueFromPoint(t,e){const n=it.getControlEl(t);if(!n)return;const i=ms(e,n).getPercentValue({orientation:t.orientation,dir:t.dir,inverted:{y:!0}});return vs(i,t.min,t.max,t.step)},dispatchChangeEvent(t){const e=it.getHiddenInputEl(t);e&&us(e,{value:t.value})}}),Sl=$t("range-slider").parts("root","label","thumb","output","track","range","control","markerGroup","marker");Sl.build();function Al(t){const e=t[0],n=t[t.length-1];return[e,n]}function Fl(t){const[e,n]=Al(t.valuePercent);return{start:`${e}%`,end:`${100-n}%`}}function Tl(t){let e="visible";return t.thumbAlignment==="contain"&&!t.hasMeasuredThumbSize&&(e="hidden"),e}function Dl(t,e){const n=t.isVertical?"bottom":"insetInlineStart";return{visibility:Tl(t),position:"absolute",transform:"var(--slider-thumb-transform)",[n]:`var(--slider-thumb-offset-${e})`}}function Il(t){const e=Fl(t);return{...t.value.reduce((n,i,r)=>{const s=it.getThumbOffset({...t,value:i});return{...n,[`--slider-thumb-offset-${r}`]:s}},{}),"--slider-thumb-transform":t.isVertical?"translateY(50%)":t.isRtl?"translateX(50%)":"translateX(-50%)","--slider-range-start":e.start,"--slider-range-end":e.end}}var Ol={getRootStyle:Il,getControlStyle:it.getControlStyle,getThumbStyle:Dl,getRangeStyle:it.getRangeStyle,getMarkerStyle:it.getMarkerStyle,getMarkerGroupStyle:it.getMarkerGroupStyle},at=Me({...Ol,getRootId:t=>{var e;return((e=t.ids)==null?void 0:e.root)??`slider:${t.id}`},getThumbId:(t,e)=>{var n,i;return((i=(n=t.ids)==null?void 0:n.thumb)==null?void 0:i.call(n,e))??`slider:${t.id}:thumb:${e}`},getHiddenInputId:(t,e)=>`slider:${t.id}:input:${e}`,getControlId:t=>{var e;return((e=t.ids)==null?void 0:e.control)??`slider:${t.id}:control`},getTrackId:t=>{var e;return((e=t.ids)==null?void 0:e.track)??`slider:${t.id}:track`},getRangeId:t=>{var e;return((e=t.ids)==null?void 0:e.range)??`slider:${t.id}:range`},getLabelId:t=>{var e;return((e=t.ids)==null?void 0:e.label)??`slider:${t.id}:label`},getOutputId:t=>{var e;return((e=t.ids)==null?void 0:e.output)??`slider:${t.id}:output`},getMarkerId:(t,e)=>{var n,i;return((i=(n=t.ids)==null?void 0:n.marker)==null?void 0:i.call(n,e))??`slider:${t.id}:marker:${e}`},getRootEl:t=>at.getById(t,at.getRootId(t)),getThumbEl:(t,e)=>at.getById(t,at.getThumbId(t,e)),getHiddenInputEl:(t,e)=>at.getById(t,at.getHiddenInputId(t,e)),getControlEl:t=>at.getById(t,at.getControlId(t)),getElements:t=>is(at.getControlEl(t),"[role=slider]"),getFirstEl:t=>at.getElements(t)[0],getRangeEl:t=>at.getById(t,at.getRangeId(t)),getValueFromPoint(t,e){const n=at.getControlEl(t);if(!n)return;const i=ms(e,n).getPercentValue({orientation:t.orientation,dir:t.dir,inverted:{y:!0}});return vs(i,t.min,t.max,t.step)},dispatchChangeEvent(t){Array.from(t.value).forEach((e,n)=>{const i=at.getHiddenInputEl(t,n);i&&us(i,{value:e})})}}),Ml=$t("radio-group").parts("root","label","radio","radioLabel","radioControl","indicator");Ml.build();var J=Me({getRootId:t=>{var e;return((e=t.ids)==null?void 0:e.root)??`radio-group:${t.id}`},getLabelId:t=>{var e;return((e=t.ids)==null?void 0:e.label)??`radio-group:${t.id}:label`},getRadioId:(t,e)=>{var n,i;return((i=(n=t.ids)==null?void 0:n.radio)==null?void 0:i.call(n,e))??`radio-group:${t.id}:radio:${e}`},getRadioHiddenInputId:(t,e)=>{var n,i;return((i=(n=t.ids)==null?void 0:n.radioHiddenInput)==null?void 0:i.call(n,e))??`radio-group:${t.id}:radio:input:${e}`},getRadioControlId:(t,e)=>{var n,i;return((i=(n=t.ids)==null?void 0:n.radioControl)==null?void 0:i.call(n,e))??`radio-group:${t.id}:radio:control:${e}`},getRadioLabelId:(t,e)=>{var n,i;return((i=(n=t.ids)==null?void 0:n.radioLabel)==null?void 0:i.call(n,e))??`radio-group:${t.id}:radio:label:${e}`},getIndicatorId:t=>{var e;return((e=t.ids)==null?void 0:e.indicator)??`radio-group:${t.id}:indicator`},getRootEl:t=>J.getById(t,J.getRootId(t)),getRadioHiddenInputEl:(t,e)=>J.getById(t,J.getRadioHiddenInputId(t,e)),getIndicatorEl:t=>J.getById(t,J.getIndicatorId(t)),getFirstEnabledInputEl:t=>{var e;return(e=J.getRootEl(t))==null?void 0:e.querySelector("input:not(:disabled)")},getFirstEnabledAndCheckedInputEl:t=>{var e;return(e=J.getRootEl(t))==null?void 0:e.querySelector("input:not(:disabled):checked")},getInputEls:t=>{const e=`input[type=radio][data-ownedby='${CSS.escape(J.getRootId(t))}']:not([disabled])`;return is(J.getRootEl(t),e)},getActiveRadioEl:t=>{if(t.value)return J.getById(t,J.getRadioId(t,t.value))},getOffsetRect:t=>({left:t?.offsetLeft??0,top:t?.offsetTop??0,width:t?.offsetWidth??0,height:t?.offsetHeight??0}),getRectById:(t,e)=>{const n=J.getById(t,J.getRadioId(t,e));if(n)return J.resolveRect(J.getOffsetRect(n))},resolveRect:t=>({width:`${t.width}px`,height:`${t.height}px`,left:`${t.left}px`,top:`${t.top}px`})});const Pl=yt({__name:"Flex",props:{is:{type:[Object,Function],default:"div"},gap:{default:"default"},justify:{},align:{},direction:{default:"row"},nowrap:{type:Boolean}},setup(t){const e=t,n=lt(()=>Ja("flex",{justify:Ji(e.justify)||"initial",align:Ji(e.align)||"initial",wrap:e.nowrap?"nowrap":"wrap",gap:Za(e.gap),direction:e.direction}));return(i,r)=>(z(),pt(En(i.is),{class:"k-flex",style:_n(n.value)},{default:_t(()=>[Z(i.$slots,"default")]),_:3},8,["style"]))}});var fe=new WeakMap,mt=[];function Bl(t,e={}){const{rootEl:n}=e,i=t.filter(Boolean);if(i.length===0)return;const r=i[0].ownerDocument||document,s=r.defaultView??window,a=new Set(i),l=new Set,o=n??r.body;let c=p=>{for(let k of p.querySelectorAll("[data-live-announcer], [data-zag-top-layer]"))a.add(k);let v=k=>{if(a.has(k)||l.has(k.parentElement)&&k.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let M of a)if(k.contains(M))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},f=r.createTreeWalker(p,NodeFilter.SHOW_ELEMENT,{acceptNode:v}),b=v(p);if(b===NodeFilter.FILTER_ACCEPT&&u(p),b!==NodeFilter.FILTER_REJECT){let k=f.nextNode();for(;k!=null;)u(k),k=f.nextNode()}},u=p=>{let v=fe.get(p)??0;p.getAttribute("aria-hidden")==="true"&&v===0||(v===0&&p.setAttribute("aria-hidden","true"),l.add(p),fe.set(p,v+1))};mt.length&&mt[mt.length-1].disconnect(),c(o);const d=new s.MutationObserver(p=>{for(let v of p)if(!(v.type!=="childList"||v.addedNodes.length===0)&&![...a,...l].some(f=>f.contains(v.target))){for(let f of v.removedNodes)f instanceof s.Element&&(a.delete(f),l.delete(f));for(let f of v.addedNodes)(f instanceof s.HTMLElement||f instanceof s.SVGElement)&&(f.dataset.liveAnnouncer==="true"||f.dataset.zagTopLayer==="true")?a.add(f):f instanceof s.Element&&c(f)}});d.observe(o,{childList:!0,subtree:!0});let h={observe(){d.observe(o,{childList:!0,subtree:!0})},disconnect(){d.disconnect()}};return mt.push(h),()=>{d.disconnect();for(let p of l){let v=fe.get(p);v===1?(p.removeAttribute("aria-hidden"),fe.delete(p)):fe.set(p,v-1)}h===mt[mt.length-1]?(mt.pop(),mt.length&&mt[mt.length-1].observe()):mt.splice(mt.indexOf(h),1)}}function Rl(t,e={}){const{defer:n}=e,i=n?Oe:s=>s(),r=[];return r.push(i(()=>{const s=typeof t=="function"?t():t;r.push(Bl(s,e))})),()=>{r.forEach(s=>s?.())}}var jl=t=>typeof t=="object"&&t!==null&&t.nodeType===1;function Nl(t){return jl(t)?t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0:!1}var Ll="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type";function ys(t){return!t||t.closest("[inert]")?!1:t.matches(Ll)&&Nl(t)}function Vl(t){const e={each(n){var i;for(let r=0;r<((i=t.frames)==null?void 0:i.length);r+=1){const s=t.frames[r];s&&n(s)}},addEventListener(n,i,r){return e.each(s=>{try{s.document.addEventListener(n,i,r)}catch(a){console.warn(a)}}),()=>{try{e.removeEventListener(n,i,r)}catch(s){console.warn(s)}}},removeEventListener(n,i,r){e.each(s=>{try{s.document.removeEventListener(n,i,r)}catch(a){console.warn(a)}})}};return e}var pr="pointerdown.outside",fr="focus.outside";function $l(t){const e=t.composedPath()??[t.target];for(const n of e)if(an(n)&&ys(n))return!0;return!1}var zl=t=>"clientY"in t;function Hl(t,e){if(!zl(e)||!t)return!1;const n=t.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=e.clientY&&e.clientY<=n.top+n.height&&n.left<=e.clientX&&e.clientX<=n.left+n.width}function Ul(t,e){const{exclude:n,onFocusOutside:i,onPointerDownOutside:r,onInteractOutside:s}=e;if(!t)return;const a=Ai(t),l=oo(t),o=Vl(l);function c(f){const b=ln(f);return!an(b)||on(t,b)||Hl(t,f)?!1:!(n!=null&&n(b))}let u;function d(f){function b(){if(!(!t||!c(f))){if(r||s){const k=lr(r,s);t.addEventListener(pr,k,{once:!0})}dr(t,pr,{bubbles:!1,cancelable:!0,detail:{originalEvent:f,contextmenu:ol(f),focusable:$l(f)}})}}f.pointerType==="touch"?(o.removeEventListener("click",b),a.removeEventListener("click",b),u=b,a.addEventListener("click",b,{once:!0}),o.addEventListener("click",b,{once:!0})):b()}const h=new Set,p=setTimeout(()=>{h.add(o.addEventListener("pointerdown",d,!0)),h.add(di(a,"pointerdown",d,!0))},0);function v(f){if(!(!t||!c(f))){if(i||s){const b=lr(i,s);t.addEventListener(fr,b,{once:!0})}dr(t,fr,{bubbles:!1,cancelable:!0,detail:{originalEvent:f,contextmenu:!1,focusable:ys(ln(f))}})}}return h.add(di(a,"focusin",v,!0)),h.add(o.addEventListener("focusin",v,!0)),()=>{clearTimeout(p),u&&(o.removeEventListener("click",u),a.removeEventListener("click",u)),h.forEach(f=>f())}}function Gl(t,e){const{defer:n}=e,i=n?Oe:s=>s(),r=[];return r.push(i(()=>{const s=typeof t=="function"?t():t;r.push(Ul(s,e))})),()=>{r.forEach(s=>s?.())}}function Yl(t,e){const n=i=>{i.key==="Escape"&&e?.(i)};return di(Ai(t),"keydown",n)}var Et={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(t=>t.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(t){var e;const n=this.indexOf(t),i=this.topMostPointerBlockingLayer()?this.indexOf((e=this.topMostPointerBlockingLayer())==null?void 0:e.node):-1;return n<i},isTopMost(t){const e=this.layers[this.count()-1];return e?.node===t},getNestedLayers(t){return Array.from(this.layers).slice(this.indexOf(t)+1)},isInNestedLayer(t,e){return this.getNestedLayers(t).some(n=>on(n.node,e))},isInBranch(t){return Array.from(this.branches).some(e=>on(e,t))},add(t){this.layers.push(t)},addBranch(t){this.branches.push(t)},remove(t){const e=this.indexOf(t);e<0||(e<this.count()-1&&this.getNestedLayers(t).forEach(n=>n.dismiss()),this.layers.splice(e,1))},removeBranch(t){const e=this.branches.indexOf(t);e>=0&&this.branches.splice(e,1)},indexOf(t){return this.layers.findIndex(e=>e.node===t)},dismiss(t){var e;(e=this.layers[this.indexOf(t)])==null||e.dismiss()},clear(){this.remove(this.layers[0].node)}},gr;function mr(){Et.layers.forEach(({node:t})=>{t.style.pointerEvents=Et.isBelowPointerBlockingLayer(t)?"none":"auto"})}function ql(t){t.style.pointerEvents=""}var $n="data-inert";function Xl(t){const e=Ai(t);return Et.hasPointerBlockingLayer()&&!e.body.hasAttribute($n)&&(gr=document.body.style.pointerEvents,e.body.style.pointerEvents="none",e.body.setAttribute($n,"")),()=>{Et.hasPointerBlockingLayer()||(e.body.style.pointerEvents=gr,e.body.removeAttribute($n),e.body.style.length===0&&e.body.removeAttribute("style"))}}function Wl(t,e){if(!t){jo("[@zag-js/dismissable] node is `null` or `undefined`");return}const{onDismiss:n,pointerBlocking:i,exclude:r,debug:s}=e,a={dismiss:n,node:t,pointerBlocking:i};Et.add(a),mr();function l(h){var p,v;const f=ln(h.detail.originalEvent);Et.isBelowPointerBlockingLayer(t)||Et.isInBranch(f)||((p=e.onPointerDownOutside)==null||p.call(e,h),(v=e.onInteractOutside)==null||v.call(e,h),!h.defaultPrevented&&(s&&console.log("onPointerDownOutside:",h.detail.originalEvent),n?.()))}function o(h){var p,v;const f=ln(h.detail.originalEvent);Et.isInBranch(f)||((p=e.onFocusOutside)==null||p.call(e,h),(v=e.onInteractOutside)==null||v.call(e,h),!h.defaultPrevented&&(s&&console.log("onFocusOutside:",h.detail.originalEvent),n?.()))}function c(h){var p;Et.isTopMost(t)&&((p=e.onEscapeKeyDown)==null||p.call(e,h),!h.defaultPrevented&&n&&(h.preventDefault(),n()))}function u(h){if(!t)return!1;const p=typeof r=="function"?r():r;return(Array.isArray(p)?p:[p]).some(v=>on(v,h))||Et.isInNestedLayer(t,h)}const d=[i?Xl(t):void 0,Yl(t,c),Gl(t,{exclude:u,onFocusOutside:o,onPointerDownOutside:l})];return()=>{Et.remove(t),mr(),ql(t),d.forEach(h=>h?.())}}function Kl(t,e){const{defer:n}=e,i=n?Oe:s=>s(),r=[];return r.push(i(()=>{const s=typeof t=="function"?t():t;r.push(Wl(s,e))})),()=>{r.forEach(s=>s?.())}}var zn="data-zag-scroll-lock";function vr(t,e){if(!t)return;const n=t.style.cssText;return Object.assign(t.style,e),()=>{t.style.cssText=n}}function Zl(t,e,n){if(!t)return;const i=t.style.getPropertyValue(e);return t.style.setProperty(e,n),()=>{i?t.style.setProperty(e,i):t.style.removeProperty(e)}}function Ql(t){const e=t.getBoundingClientRect().left;return Math.round(e)+t.scrollLeft?"paddingLeft":"paddingRight"}function Jl(t){const e=t??document,n=e.defaultView??window,{documentElement:i,body:r}=e;if(r.hasAttribute(zn))return;r.setAttribute(zn,"");const s=n.innerWidth-i.clientWidth,a=()=>Zl(i,"--scrollbar-width",`${s}px`),l=Ql(i),o=()=>vr(r,{overflow:"hidden",[l]:`${s}px`}),c=()=>{const{scrollX:d,scrollY:h,visualViewport:p}=n,v=p?.offsetLeft??0,f=p?.offsetTop??0,b=vr(r,{position:"fixed",overflow:"hidden",top:`${-(h-Math.floor(f))}px`,left:`${-(d-Math.floor(v))}px`,right:"0",[l]:`${s}px`});return()=>{b?.(),n.scrollTo(d,h)}},u=[a(),po()?c():o()];return()=>{u.forEach(d=>d?.()),r.removeAttribute(zn)}}/*!
|
|
2
|
+
* tabbable 6.2.0
|
|
3
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
4
|
+
*/var ks=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],pn=ks.join(","),xs=typeof Element>"u",te=xs?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,fn=!xs&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},gn=function t(e,n){var i;n===void 0&&(n=!0);var r=e==null||(i=e.getAttribute)===null||i===void 0?void 0:i.call(e,"inert"),s=r===""||r==="true",a=s||n&&e&&t(e.parentNode);return a},tu=function(t){var e,n=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return n===""||n==="true"},Es=function(t,e,n){if(gn(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(pn));return e&&te.call(t,pn)&&i.unshift(t),i=i.filter(n),i},ws=function t(e,n,i){for(var r=[],s=Array.from(e);s.length;){var a=s.shift();if(!gn(a,!1))if(a.tagName==="SLOT"){var l=a.assignedElements(),o=l.length?l:a.children,c=t(o,!0,i);i.flatten?r.push.apply(r,c):r.push({scopeParent:a,candidates:c})}else{var u=te.call(a,pn);u&&i.filter(a)&&(n||!e.includes(a))&&r.push(a);var d=a.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(a),h=!gn(d,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(a));if(d&&h){var p=t(d===!0?a.children:d.children,!0,i);i.flatten?r.push.apply(r,p):r.push({scopeParent:a,candidates:p})}else s.unshift.apply(s,a.children)}}return r},_s=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Xt=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||tu(t))&&!_s(t)?0:t.tabIndex},eu=function(t,e){var n=Xt(t);return n<0&&e&&!_s(t)?0:n},nu=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Cs=function(t){return t.tagName==="INPUT"},iu=function(t){return Cs(t)&&t.type==="hidden"},ru=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return e},su=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]},au=function(t){if(!t.name)return!0;var e=t.form||fn(t),n=function(s){return e.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(t.name));else try{i=n(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var r=su(i,t.form);return!r||r===t},ou=function(t){return Cs(t)&&t.type==="radio"},lu=function(t){return ou(t)&&!au(t)},uu=function(t){var e,n=t&&fn(t),i=(e=n)===null||e===void 0?void 0:e.host,r=!1;if(n&&n!==t){var s,a,l;for(r=!!((s=i)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!r&&i;){var o,c,u;n=fn(i),i=(o=n)===null||o===void 0?void 0:o.host,r=!!((c=i)!==null&&c!==void 0&&(u=c.ownerDocument)!==null&&u!==void 0&&u.contains(i))}}return r},br=function(t){var e=t.getBoundingClientRect(),n=e.width,i=e.height;return n===0&&i===0},cu=function(t,e){var n=e.displayCheck,i=e.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var r=te.call(t,"details>summary:first-of-type"),s=r?t.parentElement:t;if(te.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof i=="function"){for(var a=t;t;){var l=t.parentElement,o=fn(t);if(l&&!l.shadowRoot&&i(l)===!0)return br(t);t.assignedSlot?t=t.assignedSlot:!l&&o!==t.ownerDocument?t=o.host:t=l}t=a}if(uu(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return br(t);return!1},du=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var n=0;n<e.children.length;n++){var i=e.children.item(n);if(i.tagName==="LEGEND")return te.call(e,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}e=e.parentElement}return!1},mn=function(t,e){return!(e.disabled||gn(e)||iu(e)||cu(e,t)||ru(e)||du(e))},pi=function(t,e){return!(lu(e)||Xt(e)<0||!mn(t,e))},hu=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},pu=function t(e){var n=[],i=[];return e.forEach(function(r,s){var a=!!r.scopeParent,l=a?r.scopeParent:r,o=eu(l,a),c=a?t(r.candidates):l;o===0?a?n.push.apply(n,c):n.push(l):i.push({documentOrder:s,tabIndex:o,item:r,isScope:a,content:c})}),i.sort(nu).reduce(function(r,s){return s.isScope?r.push.apply(r,s.content):r.push(s.content),r},[]).concat(n)},fu=function(t,e){e=e||{};var n;return e.getShadowRoot?n=ws([t],e.includeContainer,{filter:pi.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:hu}):n=Es(t,e.includeContainer,pi.bind(null,e)),pu(n)},gu=function(t,e){e=e||{};var n;return e.getShadowRoot?n=ws([t],e.includeContainer,{filter:mn.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):n=Es(t,e.includeContainer,mn.bind(null,e)),n},ie=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return te.call(t,pn)===!1?!1:pi(e,t)},mu=ks.concat("iframe").join(","),Hn=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return te.call(t,mu)===!1?!1:mn(e,t)};/*!
|
|
5
|
+
* focus-trap 7.5.2
|
|
6
|
+
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
7
|
+
*/function yr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function kr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?yr(Object(n),!0).forEach(function(i){vu(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yr(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function vu(t,e,n){return e=yu(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function bu(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yu(t){var e=bu(t,"string");return typeof e=="symbol"?e:String(e)}var xr={activateTrap:function(t,e){if(t.length>0){var n=t[t.length-1];n!==e&&n.pause()}var i=t.indexOf(e);i===-1||t.splice(i,1),t.push(e)},deactivateTrap:function(t,e){var n=t.indexOf(e);n!==-1&&t.splice(n,1),t.length>0&&t[t.length-1].unpause()}},ku=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},xu=function(t){return t?.key==="Escape"||t?.key==="Esc"||t?.keyCode===27},we=function(t){return t?.key==="Tab"||t?.keyCode===9},Eu=function(t){return we(t)&&!t.shiftKey},wu=function(t){return we(t)&&t.shiftKey},Er=function(t){return setTimeout(t,0)},wr=function(t,e){var n=-1;return t.every(function(i,r){return e(i)?(n=r,!1):!0}),n},ge=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return typeof t=="function"?t.apply(void 0,n):t},ze=function(t){return t.target.shadowRoot&&typeof t.composedPath=="function"?t.composedPath()[0]:t.target},_u=[],Cu=function(t,e){var n=e?.document||document,i=e?.trapStack||_u,r=kr({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Eu,isKeyBackward:wu},e),s={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},a,l=function(m,g,E){return m&&m[g]!==void 0?m[g]:r[E||g]},o=function(m,g){var E=typeof g?.composedPath=="function"?g.composedPath():void 0;return s.containerGroups.findIndex(function(I){var P=I.container,B=I.tabbableNodes;return P.contains(m)||E?.includes(P)||B.find(function(R){return R===m})})},c=function(m){var g=r[m];if(typeof g=="function"){for(var E=arguments.length,I=new Array(E>1?E-1:0),P=1;P<E;P++)I[P-1]=arguments[P];g=g.apply(void 0,I)}if(g===!0&&(g=void 0),!g){if(g===void 0||g===!1)return g;throw new Error("`".concat(m,"` was specified but was not a node, or did not return a node"))}var B=g;if(typeof g=="string"&&(B=n.querySelector(g),!B))throw new Error("`".concat(m,"` as selector refers to no known node"));return B},u=function(){var m=c("initialFocus");if(m===!1)return!1;if(m===void 0||!Hn(m,r.tabbableOptions))if(o(n.activeElement)>=0)m=n.activeElement;else{var g=s.tabbableGroups[0],E=g&&g.firstTabbableNode;m=E||c("fallbackFocus")}if(!m)throw new Error("Your focus-trap needs to have at least one focusable element");return m},d=function(){if(s.containerGroups=s.containers.map(function(m){var g=fu(m,r.tabbableOptions),E=gu(m,r.tabbableOptions),I=g.length>0?g[0]:void 0,P=g.length>0?g[g.length-1]:void 0,B=E.find(function(U){return ie(U)}),R=E.slice().reverse().find(function(U){return ie(U)}),N=!!g.find(function(U){return Xt(U)>0});return{container:m,tabbableNodes:g,focusableNodes:E,posTabIndexesFound:N,firstTabbableNode:I,lastTabbableNode:P,firstDomTabbableNode:B,lastDomTabbableNode:R,nextTabbableNode:function(U){var Pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Bt=g.indexOf(U);return Bt<0?Pt?E.slice(E.indexOf(U)+1).find(function(kt){return ie(kt)}):E.slice(0,E.indexOf(U)).reverse().find(function(kt){return ie(kt)}):g[Bt+(Pt?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(m){return m.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(s.containerGroups.find(function(m){return m.posTabIndexesFound})&&s.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},h=function m(g){if(g!==!1&&g!==n.activeElement){if(!g||!g.focus){m(u());return}g.focus({preventScroll:!!r.preventScroll}),s.mostRecentlyFocusedNode=g,ku(g)&&g.select()}},p=function(m){var g=c("setReturnFocus",m);return g||(g===!1?!1:m)},v=function(m){var g=m.target,E=m.event,I=m.isBackward,P=I===void 0?!1:I;g=g||ze(E),d();var B=null;if(s.tabbableGroups.length>0){var R=o(g,E),N=R>=0?s.containerGroups[R]:void 0;if(R<0)P?B=s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:B=s.tabbableGroups[0].firstTabbableNode;else if(P){var U=wr(s.tabbableGroups,function(Dn){var In=Dn.firstTabbableNode;return g===In});if(U<0&&(N.container===g||Hn(g,r.tabbableOptions)&&!ie(g,r.tabbableOptions)&&!N.nextTabbableNode(g,!1))&&(U=R),U>=0){var Pt=U===0?s.tabbableGroups.length-1:U-1,Bt=s.tabbableGroups[Pt];B=Xt(g)>=0?Bt.lastTabbableNode:Bt.lastDomTabbableNode}else we(E)||(B=N.nextTabbableNode(g,!1))}else{var kt=wr(s.tabbableGroups,function(Dn){var In=Dn.lastTabbableNode;return g===In});if(kt<0&&(N.container===g||Hn(g,r.tabbableOptions)&&!ie(g,r.tabbableOptions)&&!N.nextTabbableNode(g))&&(kt=R),kt>=0){var Ns=kt===s.tabbableGroups.length-1?0:kt+1,Pi=s.tabbableGroups[Ns];B=Xt(g)>=0?Pi.firstTabbableNode:Pi.firstDomTabbableNode}else we(E)||(B=N.nextTabbableNode(g))}}else B=c("fallbackFocus");return B},f=function(m){var g=ze(m);if(!(o(g,m)>=0)){if(ge(r.clickOutsideDeactivates,m)){a.deactivate({returnFocus:r.returnFocusOnDeactivate});return}ge(r.allowOutsideClick,m)||m.preventDefault()}},b=function(m){var g=ze(m),E=o(g,m)>=0;if(E||g instanceof Document)E&&(s.mostRecentlyFocusedNode=g);else{m.stopImmediatePropagation();var I,P=!0;if(s.mostRecentlyFocusedNode)if(Xt(s.mostRecentlyFocusedNode)>0){var B=o(s.mostRecentlyFocusedNode),R=s.containerGroups[B].tabbableNodes;if(R.length>0){var N=R.findIndex(function(U){return U===s.mostRecentlyFocusedNode});N>=0&&(r.isKeyForward(s.recentNavEvent)?N+1<R.length&&(I=R[N+1],P=!1):N-1>=0&&(I=R[N-1],P=!1))}}else s.containerGroups.some(function(U){return U.tabbableNodes.some(function(Pt){return Xt(Pt)>0})})||(P=!1);else P=!1;P&&(I=v({target:s.mostRecentlyFocusedNode,isBackward:r.isKeyBackward(s.recentNavEvent)})),h(I||s.mostRecentlyFocusedNode||u())}s.recentNavEvent=void 0},k=function(m){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;s.recentNavEvent=m;var E=v({event:m,isBackward:g});E&&(we(m)&&m.preventDefault(),h(E))},M=function(m){if(xu(m)&&ge(r.escapeDeactivates,m)!==!1){m.preventDefault(),a.deactivate();return}(r.isKeyForward(m)||r.isKeyBackward(m))&&k(m,r.isKeyBackward(m))},O=function(m){var g=ze(m);o(g,m)>=0||ge(r.clickOutsideDeactivates,m)||ge(r.allowOutsideClick,m)||(m.preventDefault(),m.stopImmediatePropagation())},F=function(){if(s.active)return xr.activateTrap(i,a),s.delayInitialFocusTimer=r.delayInitialFocus?Er(function(){h(u())}):h(u()),n.addEventListener("focusin",b,!0),n.addEventListener("mousedown",f,{capture:!0,passive:!1}),n.addEventListener("touchstart",f,{capture:!0,passive:!1}),n.addEventListener("click",O,{capture:!0,passive:!1}),n.addEventListener("keydown",M,{capture:!0,passive:!1}),a},H=function(){if(s.active)return n.removeEventListener("focusin",b,!0),n.removeEventListener("mousedown",f,!0),n.removeEventListener("touchstart",f,!0),n.removeEventListener("click",O,!0),n.removeEventListener("keydown",M,!0),a},A=function(m){var g=m.some(function(E){var I=Array.from(E.removedNodes);return I.some(function(P){return P===s.mostRecentlyFocusedNode})});g&&h(u())},G=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(A):void 0,_=function(){G&&(G.disconnect(),s.active&&!s.paused&&s.containers.map(function(m){G.observe(m,{subtree:!0,childList:!0})}))};return a={get active(){return s.active},get paused(){return s.paused},activate:function(m){if(s.active)return this;var g=l(m,"onActivate"),E=l(m,"onPostActivate"),I=l(m,"checkCanFocusTrap");I||d(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=n.activeElement,g?.();var P=function(){I&&d(),F(),_(),E?.()};return I?(I(s.containers.concat()).then(P,P),this):(P(),this)},deactivate:function(m){if(!s.active)return this;var g=kr({onDeactivate:r.onDeactivate,onPostDeactivate:r.onPostDeactivate,checkCanReturnFocus:r.checkCanReturnFocus},m);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,H(),s.active=!1,s.paused=!1,_(),xr.deactivateTrap(i,a);var E=l(g,"onDeactivate"),I=l(g,"onPostDeactivate"),P=l(g,"checkCanReturnFocus"),B=l(g,"returnFocus","returnFocusOnDeactivate");E?.();var R=function(){Er(function(){B&&h(p(s.nodeFocusedBeforeActivation)),I?.()})};return B&&P?(P(p(s.nodeFocusedBeforeActivation)).then(R,R),this):(R(),this)},pause:function(m){if(s.paused||!s.active)return this;var g=l(m,"onPause"),E=l(m,"onPostPause");return s.paused=!0,g?.(),H(),_(),E?.(),this},unpause:function(m){if(!s.paused||!s.active)return this;var g=l(m,"onUnpause"),E=l(m,"onPostUnpause");return s.paused=!1,g?.(),d(),F(),_(),E?.(),this},updateContainerElements:function(m){var g=[].concat(m).filter(Boolean);return s.containers=g.map(function(E){return typeof E=="string"?n.querySelector(E):E}),s.active&&d(),_(),this}},a.updateContainerElements(t),a},Su=$t("dialog").parts("trigger","backdrop","container","content","title","description","closeTrigger"),Ht=Su.build(),V=Me({getContainerId:t=>{var e;return((e=t.ids)==null?void 0:e.container)??`dialog:${t.id}:container`},getBackdropId:t=>{var e;return((e=t.ids)==null?void 0:e.backdrop)??`dialog:${t.id}:backdrop`},getContentId:t=>{var e;return((e=t.ids)==null?void 0:e.content)??`dialog:${t.id}:content`},getTriggerId:t=>{var e;return((e=t.ids)==null?void 0:e.trigger)??`dialog:${t.id}:trigger`},getTitleId:t=>{var e;return((e=t.ids)==null?void 0:e.title)??`dialog:${t.id}:title`},getDescriptionId:t=>{var e;return((e=t.ids)==null?void 0:e.description)??`dialog:${t.id}:description`},getCloseTriggerId:t=>{var e;return((e=t.ids)==null?void 0:e.closeTrigger)??`dialog:${t.id}:close`},getContentEl:t=>V.getById(t,V.getContentId(t)),getTriggerEl:t=>V.getById(t,V.getTriggerId(t)),getContainerEl:t=>V.getById(t,V.getContainerId(t)),getTitleEl:t=>V.getById(t,V.getTitleId(t)),getDescriptionEl:t=>V.getById(t,V.getDescriptionId(t))});function Au(t,e,n){const i=t.context["aria-label"],r=t.matches("open"),s=t.context.renderedElements;return{isOpen:r,open(){e("OPEN")},close(){e("CLOSE")},triggerProps:n.button({...Ht.trigger.attrs,id:V.getTriggerId(t.context),"aria-haspopup":"dialog",type:"button","aria-expanded":r,"data-state":r?"open":"closed","aria-controls":V.getContentId(t.context),onClick(){e("TOGGLE")}}),backdropProps:n.element({...Ht.backdrop.attrs,hidden:!r,id:V.getBackdropId(t.context),"data-state":r?"open":"closed"}),containerProps:n.element({...Ht.container.attrs,hidden:!r,id:V.getContainerId(t.context),"data-state":r?"open":"closed",style:{pointerEvents:r?void 0:"none"}}),contentProps:n.element({...Ht.content.attrs,role:t.context.role,hidden:!r,id:V.getContentId(t.context),tabIndex:-1,"data-state":r?"open":"closed","aria-modal":!0,"aria-label":i||void 0,"aria-labelledby":i||!s.title?void 0:V.getTitleId(t.context),"aria-describedby":s.description?V.getDescriptionId(t.context):void 0}),titleProps:n.element({...Ht.title.attrs,id:V.getTitleId(t.context)}),descriptionProps:n.element({...Ht.description.attrs,id:V.getDescriptionId(t.context)}),closeTriggerProps:n.button({...Ht.closeTrigger.attrs,id:V.getCloseTriggerId(t.context),type:"button",onClick(a){a.stopPropagation(),e("CLOSE")}})}}function Fu(t){const e=cs(t);return Mo({id:"dialog",initial:e.open?"open":"closed",context:{role:"dialog",renderedElements:{title:!0,description:!0},modal:!0,trapFocus:!0,preventScroll:!0,closeOnOutsideClick:!0,closeOnEsc:!0,restoreFocus:!0,...e},watch:{open:["toggleVisibility"]},states:{open:{entry:["checkRenderedElements"],activities:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{CLOSE:{target:"closed",actions:["invokeOnClose","restoreFocus"]},TOGGLE:{target:"closed",actions:["invokeOnClose","restoreFocus"]}}},closed:{on:{OPEN:{target:"open",actions:["invokeOnOpen"]},TOGGLE:{target:"open",actions:["invokeOnOpen"]}}}}},{activities:{trackDismissableElement(n,i,{send:r}){return Kl(()=>V.getContentEl(n),{defer:!0,pointerBlocking:n.modal,exclude:[V.getTriggerEl(n)],onDismiss(){r({type:"CLOSE",src:"interact-outside"})},onEscapeKeyDown(s){var a;n.closeOnEsc?r({type:"CLOSE",src:"escape-key"}):s.preventDefault(),(a=n.onEsc)==null||a.call(n)},onPointerDownOutside(s){var a;n.closeOnOutsideClick||s.preventDefault(),(a=n.onOutsideClick)==null||a.call(n)}})},preventScroll(n){if(n.preventScroll)return Jl(V.getDoc(n))},trapFocus(n){if(!n.trapFocus)return;let i;return fo(()=>{const r=V.getContentEl(n);if(r){i=Cu(r,{document:V.getDoc(n),escapeDeactivates:!1,preventScroll:!0,returnFocusOnDeactivate:!1,fallbackFocus:r,allowOutsideClick:!0,initialFocus:or(n.initialFocusEl)});try{i.activate()}catch{}}}),()=>i?.deactivate()},hideContentBelow(n){return n.modal?Rl(()=>[V.getContainerEl(n)],{defer:!0}):void 0}},actions:{checkRenderedElements(n){Oe(()=>{n.renderedElements.title=!!V.getTitleEl(n),n.renderedElements.description=!!V.getDescriptionEl(n)})},invokeOnClose(n){var i;(i=n.onClose)==null||i.call(n)},invokeOnOpen(n){var i;(i=n.onOpen)==null||i.call(n)},toggleVisibility(n,i,{send:r}){r({type:n.open?"OPEN":"CLOSE",src:"controlled"})},restoreFocus(n){n.restoreFocus&&Oe(()=>{const i=or(n.finalFocusEl)??V.getTriggerEl(n);i?.focus({preventScroll:!0})})}}})}const Tu=["data-id"],Du=["data-id"],Iu=["data-id"],Ou={class:"k-dialog__card-header"},Mu=yt({__name:"Dialog",props:{title:{},description:{},closeOnOutsideClick:{type:Boolean,default:!0},role:{default:"dialog"},alignment:{default:"top"},triggerLabel:{},showCloseTrigger:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},dialogId:{}},emits:["open","close","clickoutside"],setup(t,{expose:e,emit:n}){const i=t,[r,s]=Uo(Fu({id:Go({prefix:"dialog"}),closeOnOutsideClick:i.closeOnOutsideClick,closeOnEsc:i.closeOnEsc,modal:!0,role:i.role,onClose(){i.closeOnEsc&&n("close")},onOpen(){n("open")},onOutsideClick(){n("clickoutside")}}),{context:lt(()=>i)}),a=lt(()=>Au(r.value,s,zo)),l=o=>i.dialogId?`${i.dialogId}-${o}`:"";return e({open:a.value.open,close:a.value.close}),(o,c)=>(z(),rt("div",{class:"k-dialog","data-id":o.dialogId},[Z(o.$slots,"trigger",{triggerProps:a.value.triggerProps},()=>[o.triggerLabel?(z(),pt(Ie,At({key:0,class:"k-dialog__trigger",variant:"secondary"},a.value.triggerProps),{default:_t(()=>[yi(Vt(o.triggerLabel),1)]),_:1},16)):et("",!0)]),(z(),pt(zs,{to:"body"},[a.value.isOpen?(z(),rt(Vs,{key:0},[Wt("div",At({class:"k-dialog__backdrop"},a.value.backdropProps,{"data-id":l("backdrop")}),null,16,Du),Wt("div",At({class:`k-dialog__container k-dialog--align-${o.alignment}`},a.value.containerProps,{"data-id":l("container")}),[ce(al,At({class:"k-dialog__card",variant:"shadow"},a.value.contentProps,{"data-id":l("dialog")}),$s({default:_t(()=>[Z(o.$slots,"header",{titleProps:a.value.titleProps,descriptionProps:a.value.descriptionProps,closeTriggerProps:a.value.closeTriggerProps},()=>[Wt("div",Ou,[Z(o.$slots,"title",{titleProps:a.value.titleProps},()=>[Wt("h2",At({class:"k-dialog__title"},a.value.titleProps),Vt(o.title),17)]),Z(o.$slots,"description",{descriptionProps:a.value.descriptionProps},()=>[o.description?(z(),rt("span",At({key:0,class:"k-dialog__description"},a.value.descriptionProps),Vt(o.description),17)):et("",!0)]),o.showCloseTrigger?(z(),pt(Ie,At({key:0,class:"k-dialog__close-trigger",variant:"tertiary",icon:"fa-pro-light:times",size:"small"},a.value.closeTriggerProps),null,16)):et("",!0)])]),Z(o.$slots,"default",{descriptionProps:a.value.descriptionProps})]),_:2},[o.$slots.footer?{name:"footer",fn:_t(()=>[Z(o.$slots,"footer",{close:a.value.close})]),key:"0"}:void 0]),1040,["data-id"])],16,Iu)],64)):et("",!0)]))],8,Tu))}});Bi({title:{},description:{},confirmLabel:{default:"Confirm"},cancelLabel:{default:"Cancel"},type:{default:"info"}},{open:{type:Boolean,default:!1}}),Bi(["cancel","confirm"],["update:open"]);function Fn(){this._types=Object.create(null),this._extensions=Object.create(null);for(let t=0;t<arguments.length;t++)this.define(arguments[t]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}Fn.prototype.define=function(t,e){for(let n in t){let i=t[n].map(function(r){return r.toLowerCase()});n=n.toLowerCase();for(let r=0;r<i.length;r++){const s=i[r];if(s[0]!=="*"){if(!e&&s in this._types)throw new Error('Attempt to change mapping for "'+s+'" extension from "'+this._types[s]+'" to "'+n+'". Pass `force=true` to allow this, otherwise remove "'+s+'" from the list of extensions for "'+n+'".');this._types[s]=n}}if(e||!this._extensions[n]){const r=i[0];this._extensions[n]=r[0]!=="*"?r:r.substr(1)}}};Fn.prototype.getType=function(t){t=String(t);let e=t.replace(/^.*[/\\]/,"").toLowerCase(),n=e.replace(/^.*\./,"").toLowerCase(),i=e.length<t.length;return(n.length<e.length-1||!i)&&this._types[n]||null};Fn.prototype.getExtension=function(t){return t=/^\s*([^;\s]*)/.test(t)&&RegExp.$1,t&&this._extensions[t.toLowerCase()]||null};var Pu=Fn,Bu={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};let Ru=Pu;new Ru(Bu);const ju=yt({__name:"CreateTrigger",props:{label:{}},setup(t){return(e,n)=>(z(),pt(Ie,{type:"button",class:"k-media-image-create-trigger",label:e.label,iconRight:"fa6-solid:image"},null,8,["label"]))}}),Nu=yt({__name:"Thumbnail",props:{value:{}},setup(t){const e=t,n=lt(()=>({backgroundImage:`url(${e.value.url})`}));return(i,r)=>(z(),rt("div",{class:"k-media-image__thumbnail",style:_n(n.value),onClick:r[0]||(r[0]=s=>i.$emit("click"))},null,4))}}),Lu=yt({__name:"Preview",props:{value:{},size:{}},setup(t){const e=t,n=lt(()=>({padding:e.size==="cover"?"0":"1rem",backgroundSize:e.size,backgroundImage:`url(${e.value.url})`}));return(i,r)=>(z(),rt("div",{class:"k-media-image-preview",style:_n(n.value)},null,4))}});On(ju),On(Nu),On(Lu);/**!
|
|
8
|
+
* Sortable 1.14.0
|
|
9
|
+
* @author RubaXa <trash@rubaxa.org>
|
|
10
|
+
* @author owenm <owen23355@gmail.com>
|
|
11
|
+
* @license MIT
|
|
12
|
+
*/function _r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function St(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_r(Object(n),!0).forEach(function(i){Vu(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_r(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Ze(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ze=function(e){return typeof e}:Ze=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ze(t)}function Vu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ot(){return Ot=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Ot.apply(this,arguments)}function $u(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,s;for(s=0;s<i.length;s++)r=i[s],!(e.indexOf(r)>=0)&&(n[r]=t[r]);return n}function zu(t,e){if(t==null)return{};var n=$u(t,e),i,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)i=s[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}var Hu="1.14.0";function It(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var Mt=It(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Be=It(/Edge/i),Cr=It(/firefox/i),_e=It(/safari/i)&&!It(/chrome/i)&&!It(/android/i),Ss=It(/iP(ad|od|hone)/i),Uu=It(/chrome/i)&&It(/android/i),As={capture:!1,passive:!1};function L(t,e,n){t.addEventListener(e,n,!Mt&&As)}function j(t,e,n){t.removeEventListener(e,n,!Mt&&As)}function vn(t,e){if(e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function Gu(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function wt(t,e,n,i){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&vn(t,e):vn(t,e))||i&&t===n)return t;if(t===n)break}while(t=Gu(t))}return null}var Sr=/\s+/g;function ut(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var i=(" "+t.className+" ").replace(Sr," ").replace(" "+e+" "," ");t.className=(i+(n?" "+e:"")).replace(Sr," ")}}function C(t,e,n){var i=t&&t.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in i)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),i[e]=n+(typeof n=="string"?"":"px")}}function de(t,e){var n="";if(typeof t=="string")n=t;else do{var i=C(t,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function Fs(t,e,n){if(t){var i=t.getElementsByTagName(e),r=0,s=i.length;if(n)for(;r<s;r++)n(i[r],r);return i}return[]}function Ct(){var t=document.scrollingElement;return t||document.documentElement}function K(t,e,n,i,r){if(!(!t.getBoundingClientRect&&t!==window)){var s,a,l,o,c,u,d;if(t!==window&&t.parentNode&&t!==Ct()?(s=t.getBoundingClientRect(),a=s.top,l=s.left,o=s.bottom,c=s.right,u=s.height,d=s.width):(a=0,l=0,o=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(e||n)&&t!==window&&(r=r||t.parentNode,!Mt))do if(r&&r.getBoundingClientRect&&(C(r,"transform")!=="none"||n&&C(r,"position")!=="static")){var h=r.getBoundingClientRect();a-=h.top+parseInt(C(r,"border-top-width")),l-=h.left+parseInt(C(r,"border-left-width")),o=a+s.height,c=l+s.width;break}while(r=r.parentNode);if(i&&t!==window){var p=de(r||t),v=p&&p.a,f=p&&p.d;p&&(a/=f,l/=v,d/=v,u/=f,o=a+u,c=l+d)}return{top:a,left:l,bottom:o,right:c,width:d,height:u}}}function Ar(t,e,n){for(var i=Lt(t,!0),r=K(t)[e];i;){var s=K(i)[n],a=void 0;if(n==="top"||n==="left"?a=r>=s:a=r<=s,!a)return i;if(i===Ct())break;i=Lt(i,!1)}return!1}function pe(t,e,n,i){for(var r=0,s=0,a=t.children;s<a.length;){if(a[s].style.display!=="none"&&a[s]!==S.ghost&&(i||a[s]!==S.dragged)&&wt(a[s],n.draggable,t,!1)){if(r===e)return a[s];r++}s++}return null}function Ii(t,e){for(var n=t.lastElementChild;n&&(n===S.ghost||C(n,"display")==="none"||e&&!vn(n,e));)n=n.previousElementSibling;return n||null}function vt(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==S.clone&&(!e||vn(t,e))&&n++;return n}function Fr(t){var e=0,n=0,i=Ct();if(t)do{var r=de(t),s=r.a,a=r.d;e+=t.scrollLeft*s,n+=t.scrollTop*a}while(t!==i&&(t=t.parentNode));return[e,n]}function Yu(t,e){for(var n in t)if(t.hasOwnProperty(n)){for(var i in e)if(e.hasOwnProperty(i)&&e[i]===t[n][i])return Number(n)}return-1}function Lt(t,e){if(!t||!t.getBoundingClientRect)return Ct();var n=t,i=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=C(n);if(n.clientWidth<n.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return Ct();if(i||e)return n;i=!0}}while(n=n.parentNode);return Ct()}function qu(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function Un(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}var Ce;function Ts(t,e){return function(){if(!Ce){var n=arguments,i=this;n.length===1?t.call(i,n[0]):t.apply(i,n),Ce=setTimeout(function(){Ce=void 0},e)}}}function Xu(){clearTimeout(Ce),Ce=void 0}function Ds(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function Is(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}var ht="Sortable"+new Date().getTime();function Wu(){var t=[],e;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(i){if(!(C(i,"display")==="none"||i===S.ghost)){t.push({target:i,rect:K(i)});var r=St({},t[t.length-1].rect);if(i.thisAnimationDuration){var s=de(i,!0);s&&(r.top-=s.f,r.left-=s.e)}i.fromRect=r}})}},addAnimationState:function(n){t.push(n)},removeAnimationState:function(n){t.splice(Yu(t,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var r=!1,s=0;t.forEach(function(a){var l=0,o=a.target,c=o.fromRect,u=K(o),d=o.prevFromRect,h=o.prevToRect,p=a.rect,v=de(o,!0);v&&(u.top-=v.f,u.left-=v.e),o.toRect=u,o.thisAnimationDuration&&Un(d,u)&&!Un(c,u)&&(p.top-u.top)/(p.left-u.left)===(c.top-u.top)/(c.left-u.left)&&(l=Zu(p,d,h,i.options)),Un(u,c)||(o.prevFromRect=c,o.prevToRect=u,l||(l=i.options.animation),i.animate(o,p,u,l)),l&&(r=!0,s=Math.max(s,l),clearTimeout(o.animationResetTimer),o.animationResetTimer=setTimeout(function(){o.animationTime=0,o.prevFromRect=null,o.fromRect=null,o.prevToRect=null,o.thisAnimationDuration=null},l),o.thisAnimationDuration=l)}),clearTimeout(e),r?e=setTimeout(function(){typeof n=="function"&&n()},s):typeof n=="function"&&n(),t=[]},animate:function(n,i,r,s){if(s){C(n,"transition",""),C(n,"transform","");var a=de(this.el),l=a&&a.a,o=a&&a.d,c=(i.left-r.left)/(l||1),u=(i.top-r.top)/(o||1);n.animatingX=!!c,n.animatingY=!!u,C(n,"transform","translate3d("+c+"px,"+u+"px,0)"),this.forRepaintDummy=Ku(n),C(n,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),C(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){C(n,"transition",""),C(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},s)}}}}function Ku(t){return t.offsetWidth}function Zu(t,e,n,i){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*i.animation}var re=[],Gn={initializeByDefault:!0},Re={mount:function(t){for(var e in Gn)Gn.hasOwnProperty(e)&&!(e in t)&&(t[e]=Gn[e]);re.forEach(function(n){if(n.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),re.push(t)},pluginEvent:function(t,e,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var r=t+"Global";re.forEach(function(s){e[s.pluginName]&&(e[s.pluginName][r]&&e[s.pluginName][r](St({sortable:e},n)),e.options[s.pluginName]&&e[s.pluginName][t]&&e[s.pluginName][t](St({sortable:e},n)))})},initializePlugins:function(t,e,n,i){re.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var o=new a(t,e,t.options);o.sortable=t,o.options=t.options,t[l]=o,Ot(n,o.defaults)}});for(var r in t.options)if(t.options.hasOwnProperty(r)){var s=this.modifyOption(t,r,t.options[r]);typeof s<"u"&&(t.options[r]=s)}},getEventProperties:function(t,e){var n={};return re.forEach(function(i){typeof i.eventProperties=="function"&&Ot(n,i.eventProperties.call(e[i.pluginName],t))}),n},modifyOption:function(t,e,n){var i;return re.forEach(function(r){t[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[e]=="function"&&(i=r.optionListeners[e].call(t[r.pluginName],n))}),i}};function Qu(t){var e=t.sortable,n=t.rootEl,i=t.name,r=t.targetEl,s=t.cloneEl,a=t.toEl,l=t.fromEl,o=t.oldIndex,c=t.newIndex,u=t.oldDraggableIndex,d=t.newDraggableIndex,h=t.originalEvent,p=t.putSortable,v=t.extraEventProperties;if(e=e||n&&n[ht],!!e){var f,b=e.options,k="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!Mt&&!Be?f=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(f=document.createEvent("Event"),f.initEvent(i,!0,!0)),f.to=a||n,f.from=l||n,f.item=r||n,f.clone=s,f.oldIndex=o,f.newIndex=c,f.oldDraggableIndex=u,f.newDraggableIndex=d,f.originalEvent=h,f.pullMode=p?p.lastPutMode:void 0;var M=St(St({},v),Re.getEventProperties(i,e));for(var O in M)f[O]=M[O];n&&n.dispatchEvent(f),b[k]&&b[k].call(e,f)}}var Ju=["evt"],ot=function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,r=zu(n,Ju);Re.pluginEvent.bind(S)(t,e,St({dragEl:y,parentEl:q,ghostEl:T,rootEl:Y,nextEl:Yt,lastDownEl:Qe,cloneEl:X,cloneHidden:Nt,dragStarted:ve,putSortable:Q,activeSortable:S.active,originalEvent:i,oldIndex:ue,oldDraggableIndex:Se,newIndex:ct,newDraggableIndex:jt,hideGhostForTarget:Bs,unhideGhostForTarget:Rs,cloneNowHidden:function(){Nt=!0},cloneNowShown:function(){Nt=!1},dispatchSortableEvent:function(s){nt({sortable:e,name:s,originalEvent:i})}},r))};function nt(t){Qu(St({putSortable:Q,cloneEl:X,targetEl:y,rootEl:Y,oldIndex:ue,oldDraggableIndex:Se,newIndex:ct,newDraggableIndex:jt},t))}var y,q,T,Y,Yt,Qe,X,Nt,ue,ct,Se,jt,He,Q,oe=!1,bn=!1,yn=[],Ut,xt,Yn,qn,Tr,Dr,ve,se,Ae,Fe=!1,Ue=!1,Je,tt,Xn=[],fi=!1,kn=[],Tn=typeof document<"u",Ge=Ss,Ir=Be||Mt?"cssFloat":"float",tc=Tn&&!Uu&&!Ss&&"draggable"in document.createElement("div"),Os=function(){if(Tn){if(Mt)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),Ms=function(t,e){var n=C(t),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=pe(t,0,e),s=pe(t,1,e),a=r&&C(r),l=s&&C(s),o=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+K(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+K(s).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&a.float!=="none"){var u=a.float==="left"?"left":"right";return s&&(l.clear==="both"||l.clear===u)?"vertical":"horizontal"}return r&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||o>=i&&n[Ir]==="none"||s&&n[Ir]==="none"&&o+c>i)?"vertical":"horizontal"},ec=function(t,e,n){var i=n?t.left:t.top,r=n?t.right:t.bottom,s=n?t.width:t.height,a=n?e.left:e.top,l=n?e.right:e.bottom,o=n?e.width:e.height;return i===a||r===l||i+s/2===a+o/2},nc=function(t,e){var n;return yn.some(function(i){var r=i[ht].options.emptyInsertThreshold;if(!(!r||Ii(i))){var s=K(i),a=t>=s.left-r&&t<=s.right+r,l=e>=s.top-r&&e<=s.bottom+r;if(a&&l)return n=i}}),n},Ps=function(t){function e(r,s){return function(a,l,o,c){var u=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(r==null&&(s||u))return!0;if(r==null||r===!1)return!1;if(s&&r==="clone")return r;if(typeof r=="function")return e(r(a,l,o,c),s)(a,l,o,c);var d=(s?a:l).options.group.name;return r===!0||typeof r=="string"&&r===d||r.join&&r.indexOf(d)>-1}}var n={},i=t.group;(!i||Ze(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=e(i.pull,!0),n.checkPut=e(i.put),n.revertClone=i.revertClone,t.group=n},Bs=function(){!Os&&T&&C(T,"display","none")},Rs=function(){!Os&&T&&C(T,"display","")};Tn&&document.addEventListener("click",function(t){if(bn)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),bn=!1,!1},!0);var Gt=function(t){if(y){t=t.touches?t.touches[0]:t;var e=nc(t.clientX,t.clientY);if(e){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[ht]._onDragOver(n)}}},ic=function(t){y&&y.parentNode[ht]._isOutsideThisEl(t.target)};function S(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=Ot({},e),t[ht]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ms(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,a){s.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:S.supportPointer!==!1&&"PointerEvent"in window&&!_e,emptyInsertThreshold:5};Re.initializePlugins(this,t,n);for(var i in n)!(i in e)&&(e[i]=n[i]);Ps(e);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=e.forceFallback?!1:tc,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?L(t,"pointerdown",this._onTapStart):(L(t,"mousedown",this._onTapStart),L(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(L(t,"dragover",this),L(t,"dragenter",this)),yn.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Ot(this,Wu())}S.prototype={constructor:S,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(se=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,y):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,i=this.options,r=i.preventOnFilter,s=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,o=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=i.filter;if(dc(n),!y&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||i.disabled)&&!o.isContentEditable&&!(!this.nativeDraggable&&_e&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=wt(l,i.draggable,n,!1),!(l&&l.animated)&&Qe!==l)){if(ue=vt(l),Se=vt(l,i.draggable),typeof c=="function"){if(c.call(this,t,l,this)){nt({sortable:e,rootEl:o,name:"filter",targetEl:l,toEl:n,fromEl:n}),ot("filter",e,{evt:t}),r&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=wt(o,u.trim(),n,!1),u)return nt({sortable:e,rootEl:u,name:"filter",targetEl:l,fromEl:n,toEl:n}),ot("filter",e,{evt:t}),!0}),c)){r&&t.cancelable&&t.preventDefault();return}i.handle&&!wt(o,i.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var i=this,r=i.el,s=i.options,a=r.ownerDocument,l;if(n&&!y&&n.parentNode===r){var o=K(n);if(Y=r,y=n,q=y.parentNode,Yt=y.nextSibling,Qe=n,He=s.group,S.dragged=y,Ut={target:y,clientX:(e||t).clientX,clientY:(e||t).clientY},Tr=Ut.clientX-o.left,Dr=Ut.clientY-o.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,y.style["will-change"]="all",l=function(){if(ot("delayEnded",i,{evt:t}),S.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Cr&&i.nativeDraggable&&(y.draggable=!0),i._triggerDragStart(t,e),nt({sortable:i,name:"choose",originalEvent:t}),ut(y,s.chosenClass,!0)},s.ignore.split(",").forEach(function(c){Fs(y,c.trim(),Wn)}),L(a,"dragover",Gt),L(a,"mousemove",Gt),L(a,"touchmove",Gt),L(a,"mouseup",i._onDrop),L(a,"touchend",i._onDrop),L(a,"touchcancel",i._onDrop),Cr&&this.nativeDraggable&&(this.options.touchStartThreshold=4,y.draggable=!0),ot("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(Be||Mt))){if(S.eventCanceled){this._onDrop();return}L(a,"mouseup",i._disableDelayedDrag),L(a,"touchend",i._disableDelayedDrag),L(a,"touchcancel",i._disableDelayedDrag),L(a,"mousemove",i._delayedDragTouchMoveHandler),L(a,"touchmove",i._delayedDragTouchMoveHandler),s.supportPointer&&L(a,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(l,s.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){y&&Wn(y),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;j(t,"mouseup",this._disableDelayedDrag),j(t,"touchend",this._disableDelayedDrag),j(t,"touchcancel",this._disableDelayedDrag),j(t,"mousemove",this._delayedDragTouchMoveHandler),j(t,"touchmove",this._delayedDragTouchMoveHandler),j(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?L(document,"pointermove",this._onTouchMove):e?L(document,"touchmove",this._onTouchMove):L(document,"mousemove",this._onTouchMove):(L(y,"dragend",this),L(Y,"dragstart",this._onDragStart));try{document.selection?tn(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(oe=!1,Y&&y){ot("dragStarted",this,{evt:e}),this.nativeDraggable&&L(document,"dragover",ic);var n=this.options;!t&&ut(y,n.dragClass,!1),ut(y,n.ghostClass,!0),S.active=this,t&&this._appendGhost(),nt({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(xt){this._lastX=xt.clientX,this._lastY=xt.clientY,Bs();for(var t=document.elementFromPoint(xt.clientX,xt.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(xt.clientX,xt.clientY),t!==e);)e=t;if(y.parentNode[ht]._isOutsideThisEl(t),e)do{if(e[ht]){var n=void 0;if(n=e[ht]._onDragOver({clientX:xt.clientX,clientY:xt.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Rs()}},_onTouchMove:function(t){if(Ut){var e=this.options,n=e.fallbackTolerance,i=e.fallbackOffset,r=t.touches?t.touches[0]:t,s=T&&de(T,!0),a=T&&s&&s.a,l=T&&s&&s.d,o=Ge&&tt&&Fr(tt),c=(r.clientX-Ut.clientX+i.x)/(a||1)+(o?o[0]-Xn[0]:0)/(a||1),u=(r.clientY-Ut.clientY+i.y)/(l||1)+(o?o[1]-Xn[1]:0)/(l||1);if(!S.active&&!oe){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(T){s?(s.e+=c-(Yn||0),s.f+=u-(qn||0)):s={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");C(T,"webkitTransform",d),C(T,"mozTransform",d),C(T,"msTransform",d),C(T,"transform",d),Yn=c,qn=u,xt=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!T){var t=this.options.fallbackOnBody?document.body:Y,e=K(y,!0,Ge,!0,t),n=this.options;if(Ge){for(tt=t;C(tt,"position")==="static"&&C(tt,"transform")==="none"&&tt!==document;)tt=tt.parentNode;tt!==document.body&&tt!==document.documentElement?(tt===document&&(tt=Ct()),e.top+=tt.scrollTop,e.left+=tt.scrollLeft):tt=Ct(),Xn=Fr(tt)}T=y.cloneNode(!0),ut(T,n.ghostClass,!1),ut(T,n.fallbackClass,!0),ut(T,n.dragClass,!0),C(T,"transition",""),C(T,"transform",""),C(T,"box-sizing","border-box"),C(T,"margin",0),C(T,"top",e.top),C(T,"left",e.left),C(T,"width",e.width),C(T,"height",e.height),C(T,"opacity","0.8"),C(T,"position",Ge?"absolute":"fixed"),C(T,"zIndex","100000"),C(T,"pointerEvents","none"),S.ghost=T,t.appendChild(T),C(T,"transform-origin",Tr/parseInt(T.style.width)*100+"% "+Dr/parseInt(T.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,i=t.dataTransfer,r=n.options;if(ot("dragStart",this,{evt:t}),S.eventCanceled){this._onDrop();return}ot("setupClone",this),S.eventCanceled||(X=Is(y),X.draggable=!1,X.style["will-change"]="",this._hideClone(),ut(X,this.options.chosenClass,!1),S.clone=X),n.cloneId=tn(function(){ot("clone",n),!S.eventCanceled&&(n.options.removeCloneOnHide||Y.insertBefore(X,y),n._hideClone(),nt({sortable:n,name:"clone"}))}),!e&&ut(y,r.dragClass,!0),e?(bn=!0,n._loopId=setInterval(n._emulateDragOver,50)):(j(document,"mouseup",n._onDrop),j(document,"touchend",n._onDrop),j(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",r.setData&&r.setData.call(n,i,y)),L(document,"drop",n),C(y,"transform","translateZ(0)")),oe=!0,n._dragStartId=tn(n._dragStarted.bind(n,e,t)),L(document,"selectstart",n),ve=!0,_e&&C(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,n=t.target,i,r,s,a=this.options,l=a.group,o=S.active,c=He===l,u=a.sort,d=Q||o,h,p=this,v=!1;if(fi)return;function f(U,Pt){ot(U,p,St({evt:t,isOwner:c,axis:h?"vertical":"horizontal",revert:s,dragRect:i,targetRect:r,canSort:u,fromSortable:d,target:n,completed:k,onMove:function(Bt,kt){return Ye(Y,e,y,i,Bt,K(Bt),t,kt)},changed:M},Pt))}function b(){f("dragOverAnimationCapture"),p.captureAnimationState(),p!==d&&d.captureAnimationState()}function k(U){return f("dragOverCompleted",{insertion:U}),U&&(c?o._hideClone():o._showClone(p),p!==d&&(ut(y,Q?Q.options.ghostClass:o.options.ghostClass,!1),ut(y,a.ghostClass,!0)),Q!==p&&p!==S.active?Q=p:p===S.active&&Q&&(Q=null),d===p&&(p._ignoreWhileAnimating=n),p.animateAll(function(){f("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(n===y&&!y.animated||n===e&&!n.animated)&&(se=null),!a.dragoverBubble&&!t.rootEl&&n!==document&&(y.parentNode[ht]._isOutsideThisEl(t.target),!U&&Gt(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),v=!0}function M(){ct=vt(y),jt=vt(y,a.draggable),nt({sortable:p,name:"change",toEl:e,newIndex:ct,newDraggableIndex:jt,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),n=wt(n,a.draggable,e,!0),f("dragOver"),S.eventCanceled)return v;if(y.contains(t.target)||n.animated&&n.animatingX&&n.animatingY||p._ignoreWhileAnimating===n)return k(!1);if(bn=!1,o&&!a.disabled&&(c?u||(s=q!==Y):Q===this||(this.lastPutMode=He.checkPull(this,o,y,t))&&l.checkPut(this,o,y,t))){if(h=this._getDirection(t,n)==="vertical",i=K(y),f("dragOverValid"),S.eventCanceled)return v;if(s)return q=Y,b(),this._hideClone(),f("revert"),S.eventCanceled||(Yt?Y.insertBefore(y,Yt):Y.appendChild(y)),k(!0);var O=Ii(e,a.draggable);if(!O||oc(t,h,this)&&!O.animated){if(O===y)return k(!1);if(O&&e===t.target&&(n=O),n&&(r=K(n)),Ye(Y,e,y,i,n,r,t,!!n)!==!1)return b(),e.appendChild(y),q=e,M(),k(!0)}else if(O&&ac(t,h,this)){var F=pe(e,0,a,!0);if(F===y)return k(!1);if(n=F,r=K(n),Ye(Y,e,y,i,n,r,t,!1)!==!1)return b(),e.insertBefore(y,F),q=e,M(),k(!0)}else if(n.parentNode===e){r=K(n);var H=0,A,G=y.parentNode!==e,_=!ec(y.animated&&y.toRect||i,n.animated&&n.toRect||r,h),m=h?"top":"left",g=Ar(n,"top","top")||Ar(y,"top","top"),E=g?g.scrollTop:void 0;se!==n&&(A=r[m],Fe=!1,Ue=!_&&a.invertSwap||G),H=lc(t,n,r,h,_?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,Ue,se===n);var I;if(H!==0){var P=vt(y);do P-=H,I=q.children[P];while(I&&(C(I,"display")==="none"||I===T))}if(H===0||I===n)return k(!1);se=n,Ae=H;var B=n.nextElementSibling,R=!1;R=H===1;var N=Ye(Y,e,y,i,n,r,t,R);if(N!==!1)return(N===1||N===-1)&&(R=N===1),fi=!0,setTimeout(sc,30),b(),R&&!B?e.appendChild(y):n.parentNode.insertBefore(y,R?B:n),g&&Ds(g,0,E-g.scrollTop),q=y.parentNode,A!==void 0&&!Ue&&(Je=Math.abs(A-K(n)[m])),M(),k(!0)}if(e.contains(y))return k(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){j(document,"mousemove",this._onTouchMove),j(document,"touchmove",this._onTouchMove),j(document,"pointermove",this._onTouchMove),j(document,"dragover",Gt),j(document,"mousemove",Gt),j(document,"touchmove",Gt)},_offUpEvents:function(){var t=this.el.ownerDocument;j(t,"mouseup",this._onDrop),j(t,"touchend",this._onDrop),j(t,"pointerup",this._onDrop),j(t,"touchcancel",this._onDrop),j(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;if(ct=vt(y),jt=vt(y,n.draggable),ot("drop",this,{evt:t}),q=y&&y.parentNode,ct=vt(y),jt=vt(y,n.draggable),S.eventCanceled){this._nulling();return}oe=!1,Ue=!1,Fe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),gi(this.cloneId),gi(this._dragStartId),this.nativeDraggable&&(j(document,"drop",this),j(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),_e&&C(document.body,"user-select",""),C(y,"transform",""),t&&(ve&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),T&&T.parentNode&&T.parentNode.removeChild(T),(Y===q||Q&&Q.lastPutMode!=="clone")&&X&&X.parentNode&&X.parentNode.removeChild(X),y&&(this.nativeDraggable&&j(y,"dragend",this),Wn(y),y.style["will-change"]="",ve&&!oe&&ut(y,Q?Q.options.ghostClass:this.options.ghostClass,!1),ut(y,this.options.chosenClass,!1),nt({sortable:this,name:"unchoose",toEl:q,newIndex:null,newDraggableIndex:null,originalEvent:t}),Y!==q?(ct>=0&&(nt({rootEl:q,name:"add",toEl:q,fromEl:Y,originalEvent:t}),nt({sortable:this,name:"remove",toEl:q,originalEvent:t}),nt({rootEl:q,name:"sort",toEl:q,fromEl:Y,originalEvent:t}),nt({sortable:this,name:"sort",toEl:q,originalEvent:t})),Q&&Q.save()):ct!==ue&&ct>=0&&(nt({sortable:this,name:"update",toEl:q,originalEvent:t}),nt({sortable:this,name:"sort",toEl:q,originalEvent:t})),S.active&&((ct==null||ct===-1)&&(ct=ue,jt=Se),nt({sortable:this,name:"end",toEl:q,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){ot("nulling",this),Y=y=q=T=Yt=X=Qe=Nt=Ut=xt=ve=ct=jt=ue=Se=se=Ae=Q=He=S.dragged=S.ghost=S.clone=S.active=null,kn.forEach(function(t){t.checked=!0}),kn.length=Yn=qn=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":y&&(this._onDragOver(t),rc(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,n=this.el.children,i=0,r=n.length,s=this.options;i<r;i++)e=n[i],wt(e,s.draggable,this.el,!1)&&t.push(e.getAttribute(s.dataIdAttr)||cc(e));return t},sort:function(t,e){var n={},i=this.el;this.toArray().forEach(function(r,s){var a=i.children[s];wt(a,this.options.draggable,i,!1)&&(n[r]=a)},this),e&&this.captureAnimationState(),t.forEach(function(r){n[r]&&(i.removeChild(n[r]),i.appendChild(n[r]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return wt(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(e===void 0)return n[t];var i=Re.modifyOption(this,t,e);typeof i<"u"?n[t]=i:n[t]=e,t==="group"&&Ps(n)},destroy:function(){ot("destroy",this);var t=this.el;t[ht]=null,j(t,"mousedown",this._onTapStart),j(t,"touchstart",this._onTapStart),j(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(j(t,"dragover",this),j(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),yn.splice(yn.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Nt){if(ot("hideClone",this),S.eventCanceled)return;C(X,"display","none"),this.options.removeCloneOnHide&&X.parentNode&&X.parentNode.removeChild(X),Nt=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(Nt){if(ot("showClone",this),S.eventCanceled)return;y.parentNode==Y&&!this.options.group.revertClone?Y.insertBefore(X,y):Yt?Y.insertBefore(X,Yt):Y.appendChild(X),this.options.group.revertClone&&this.animate(y,X),C(X,"display",""),Nt=!1}}};function rc(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function Ye(t,e,n,i,r,s,a,l){var o,c=t[ht],u=c.options.onMove,d;return window.CustomEvent&&!Mt&&!Be?o=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(o=document.createEvent("Event"),o.initEvent("move",!0,!0)),o.to=e,o.from=t,o.dragged=n,o.draggedRect=i,o.related=r||e,o.relatedRect=s||K(e),o.willInsertAfter=l,o.originalEvent=a,t.dispatchEvent(o),u&&(d=u.call(c,o,a)),d}function Wn(t){t.draggable=!1}function sc(){fi=!1}function ac(t,e,n){var i=K(pe(n.el,0,n.options,!0)),r=10;return e?t.clientX<i.left-r||t.clientY<i.top&&t.clientX<i.right:t.clientY<i.top-r||t.clientY<i.bottom&&t.clientX<i.left}function oc(t,e,n){var i=K(Ii(n.el,n.options.draggable)),r=10;return e?t.clientX>i.right+r||t.clientX<=i.right&&t.clientY>i.bottom&&t.clientX>=i.left:t.clientX>i.right&&t.clientY>i.top||t.clientX<=i.right&&t.clientY>i.bottom+r}function lc(t,e,n,i,r,s,a,l){var o=i?t.clientY:t.clientX,c=i?n.height:n.width,u=i?n.top:n.left,d=i?n.bottom:n.right,h=!1;if(!a){if(l&&Je<c*r){if(!Fe&&(Ae===1?o>u+c*s/2:o<d-c*s/2)&&(Fe=!0),Fe)h=!0;else if(Ae===1?o<u+Je:o>d-Je)return-Ae}else if(o>u+c*(1-r)/2&&o<d-c*(1-r)/2)return uc(e)}return h=h||a,h&&(o<u+c*s/2||o>d-c*s/2)?o>u+c/2?1:-1:0}function uc(t){return vt(y)<vt(t)?1:-1}function cc(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,i=0;n--;)i+=e.charCodeAt(n);return i.toString(36)}function dc(t){kn.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var i=e[n];i.checked&&kn.push(i)}}function tn(t){return setTimeout(t,0)}function gi(t){return clearTimeout(t)}Tn&&L(document,"touchmove",function(t){(S.active||oe)&&t.cancelable&&t.preventDefault()});S.utils={on:L,off:j,css:C,find:Fs,is:function(t,e){return!!wt(t,e,t,!1)},extend:qu,throttle:Ts,closest:wt,toggleClass:ut,clone:Is,index:vt,nextTick:tn,cancelNextTick:gi,detectDirection:Ms,getChild:pe};S.get=function(t){return t[ht]};S.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(S.utils=St(St({},S.utils),i.utils)),Re.mount(i)})};S.create=function(t,e){return new S(t,e)};S.version=Hu;var W=[],be,mi,vi=!1,Kn,Zn,xn,ye;function hc(){function t(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return t.prototype={dragStarted:function(e){var n=e.originalEvent;this.sortable.nativeDraggable?L(document,"dragover",this._handleAutoScroll):this.options.supportPointer?L(document,"pointermove",this._handleFallbackAutoScroll):n.touches?L(document,"touchmove",this._handleFallbackAutoScroll):L(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var n=e.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?j(document,"dragover",this._handleAutoScroll):(j(document,"pointermove",this._handleFallbackAutoScroll),j(document,"touchmove",this._handleFallbackAutoScroll),j(document,"mousemove",this._handleFallbackAutoScroll)),Or(),en(),Xu()},nulling:function(){xn=mi=be=vi=ye=Kn=Zn=null,W.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,n){var i=this,r=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(r,s);if(xn=e,n||this.options.forceAutoScrollFallback||Be||Mt||_e){Qn(e,this.options,a,n);var l=Lt(a,!0);vi&&(!ye||r!==Kn||s!==Zn)&&(ye&&Or(),ye=setInterval(function(){var o=Lt(document.elementFromPoint(r,s),!0);o!==l&&(l=o,en()),Qn(e,i.options,o,n)},10),Kn=r,Zn=s)}else{if(!this.options.bubbleScroll||Lt(a,!0)===Ct()){en();return}Qn(e,this.options,Lt(a,!1),!1)}}},Ot(t,{pluginName:"scroll",initializeByDefault:!0})}function en(){W.forEach(function(t){clearInterval(t.pid)}),W=[]}function Or(){clearInterval(ye)}var Qn=Ts(function(t,e,n,i){if(e.scroll){var r=(t.touches?t.touches[0]:t).clientX,s=(t.touches?t.touches[0]:t).clientY,a=e.scrollSensitivity,l=e.scrollSpeed,o=Ct(),c=!1,u;mi!==n&&(mi=n,en(),be=e.scroll,u=e.scrollFn,be===!0&&(be=Lt(n,!0)));var d=0,h=be;do{var p=h,v=K(p),f=v.top,b=v.bottom,k=v.left,M=v.right,O=v.width,F=v.height,H=void 0,A=void 0,G=p.scrollWidth,_=p.scrollHeight,m=C(p),g=p.scrollLeft,E=p.scrollTop;p===o?(H=O<G&&(m.overflowX==="auto"||m.overflowX==="scroll"||m.overflowX==="visible"),A=F<_&&(m.overflowY==="auto"||m.overflowY==="scroll"||m.overflowY==="visible")):(H=O<G&&(m.overflowX==="auto"||m.overflowX==="scroll"),A=F<_&&(m.overflowY==="auto"||m.overflowY==="scroll"));var I=H&&(Math.abs(M-r)<=a&&g+O<G)-(Math.abs(k-r)<=a&&!!g),P=A&&(Math.abs(b-s)<=a&&E+F<_)-(Math.abs(f-s)<=a&&!!E);if(!W[d])for(var B=0;B<=d;B++)W[B]||(W[B]={});(W[d].vx!=I||W[d].vy!=P||W[d].el!==p)&&(W[d].el=p,W[d].vx=I,W[d].vy=P,clearInterval(W[d].pid),(I!=0||P!=0)&&(c=!0,W[d].pid=setInterval(function(){i&&this.layer===0&&S.active._onTouchMove(xn);var R=W[this.layer].vy?W[this.layer].vy*l:0,N=W[this.layer].vx?W[this.layer].vx*l:0;typeof u=="function"&&u.call(S.dragged.parentNode[ht],N,R,t,xn,W[this.layer].el)!=="continue"||Ds(W[this.layer].el,N,R)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&h!==o&&(h=Lt(h,!1)));vi=c}},30),js=function(t){var e=t.originalEvent,n=t.putSortable,i=t.dragEl,r=t.activeSortable,s=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var o=n||r;a();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);l(),o&&!o.el.contains(u)&&(s("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function Oi(){}Oi.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=pe(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(e,i):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:js};Ot(Oi,{pluginName:"revertOnSpill"});function Mi(){}Mi.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable,i=n||this.sortable;i.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),i.animateAll()},drop:js};Ot(Mi,{pluginName:"removeOnSpill"});S.mount(new hc);S.mount(Mi,Oi);const pc=["Start","Add","Remove","Update","End"],fc=["Choose","Unchoose","Sort","Filter","Clone"],gc=["Move"],Mr={manage:gc,manageAndEmit:pc,emit:fc};[...[...Mr.manageAndEmit,...Mr.emit].map(t=>t.toLowerCase())];var nn=(t,e=[])=>({parts:(...n)=>{if(mc(e))return nn(t,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>nn(t,[...e,...n]),rename:n=>nn(n,e),keys:()=>e,build:()=>[...new Set(e)].reduce((n,i)=>Object.assign(n,{[i]:{selector:[`&[data-scope="${ae(t)}"][data-part="${ae(i)}"]`,`& [data-scope="${ae(t)}"][data-part="${ae(i)}"]`].join(", "),attrs:{"data-scope":ae(t),"data-part":ae(i)}}}),{})}),ae=t=>t.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),mc=t=>t.length===0,vc=t=>t.nodeType===Node.DOCUMENT_NODE?t:t.ownerDocument??document;function bc(t){const e={getRootNode:n=>{var i;return((i=n.getRootNode)==null?void 0:i.call(n))??document},getDoc:n=>vc(e.getRootNode(n)),getWin:n=>e.getDoc(n).defaultView??window,getActiveElement:n=>e.getDoc(n).activeElement,isActiveElement:(n,i)=>i===e.getActiveElement(n),focus(n,i){i!=null&&(e.isActiveElement(n,i)||i.focus({preventScroll:!0}))},getById:(n,i)=>e.getRootNode(n).getElementById(i),setValue:(n,i)=>{if(n==null||i==null)return;const r=i.toString();n.value!==r&&(n.value=i.toString())}};return{...e,...t}}var yc=nn("switch").parts("root","label","control","thumb");yc.build();var Pr=bc({getRootId:t=>{var e;return((e=t.ids)==null?void 0:e.root)??`switch:${t.id}`},getLabelId:t=>{var e;return((e=t.ids)==null?void 0:e.label)??`switch:${t.id}:label`},getThumbId:t=>{var e;return((e=t.ids)==null?void 0:e.thumb)??`switch:${t.id}:thumb`},getControlId:t=>{var e;return((e=t.ids)==null?void 0:e.control)??`switch:${t.id}:control`},getHiddenInputId:t=>{var e;return((e=t.ids)==null?void 0:e.input)??`switch:${t.id}:input`},getHiddenInputEl:t=>Pr.getById(t,Pr.getHiddenInputId(t))});const xc=yt({__name:"LazyLoad",props:{wrapperTag:{default:"div"},threshold:{default:0},observerRoot:{default:null}},emits:["intersect"],setup(t,{emit:e}){const n=t,i=dt(!1);function r(o){const c=o[0];c.isIntersecting&&(i.value=!0,qs(()=>{e("intersect",c),l()}))}const s=dt(),a=dt();wn(()=>{s.value=new IntersectionObserver(r,{root:n.observerRoot,threshold:n.threshold}),s.value.observe(a.value)}),ki(()=>{l()});function l(){s.value&&s.value.disconnect()}return(o,c)=>(z(),pt(En(o.wrapperTag),{ref_key:"rootRef",ref:a,class:"k-lazyload"},{default:_t(()=>[i.value?Z(o.$slots,"default",{key:0}):Z(o.$slots,"placeholder",{key:1})]),_:3},512))}});export{xc as k};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a(e,t,n={}){let{group:i=1}=n,r=e.match(t);if(r)return r[i]}function o(e){return new Promise((t,n)=>{setTimeout(t,e)})}async function u(e,t={}){let{interval:n=200,limit:i=50}=t,r=0,c;for(;r<i&&(r++,!(c=e()));)await o(n);if(r>=i)throw new Error("Could not resolve");return c}function l(e){if(document.querySelector(`script[src="${e}"]`))return;let t=document.createElement("script");t.type="text/javascript",t.src=e,document.body.appendChild(t)}export{a as E,l as L,u as W};
|