@bagelink/vue 1.15.521 → 1.15.523
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormFlow.vue.d.ts","sourceRoot":"","sources":["../../src/form-flow/FormFlow.vue"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"FormFlow.vue.d.ts","sourceRoot":"","sources":["../../src/form-flow/FormFlow.vue"],"names":[],"mappings":"AAAA,OAwrBO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAkCjE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,YAAY,GAAG,SAAS,GAAG,OAAO,CAAA;AAEnE,MAAM,WAAW,KAAK,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IACzE,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAA;IAC3B,UAAU,CAAC,EAAE,CAAC,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,uEAAuE;IACvE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;CAC5C;yBAEgB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7C,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WAgzBO,mBAAmB,CAAC;;oKAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB;wBApXvB,OAAO;yBA8CK,KAAK,KAAG,OAAO,CAAC,OAAO,CAAC;;MAsUS,GAAG,IAAI;WACpE,GAAG;;;oBA/yBD,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,OAAO,CAAC,OAAO,CAAC;sBACjC,MAAM,OAAO;;oBAEf,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;uBACnB,SAAS;cACf,GAAG;;;cACyB,GAAG;;;cACL,GAAG;iBAC1B,CAAC,CAAC,EAAE;YACZ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;YAC9B,UAAU,EAAE,MAAM,CAAA;YAClB,aAAa,EAAE;gBAAE,GAAG,EAAE,MAAM,CAAC;gBAAC,KAAK,EAAE,YAAY,CAAA;aAAE,EAAE,CAAA;SACrD,KAAK,GAAG;;eAEF,GAAG;eACH,YAAY;;eAEZ,MAAM;kBACH,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI;UACvB,GAAG;;oBAnBC,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,OAAO,CAAC,OAAO,CAAC;sBACjC,MAAM,OAAO;;oBAEf,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;uBACnB,SAAS;cACf,GAAG;;;cACyB,GAAG;;;cACL,GAAG;iBAC1B,CAAC,CAAC,EAAE;YACZ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;YAC9B,UAAU,EAAE,MAAM,CAAA;YAClB,aAAa,EAAE;gBAAE,GAAG,EAAE,MAAM,CAAC;gBAAC,KAAK,EAAE,YAAY,CAAA;aAAE,EAAE,CAAA;SACrD,KAAK,GAAG;;eAEF,GAAG;eACH,YAAY;;eAEZ,MAAM;kBACH,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI;UACvB,GAAG;;EAgyBL,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA3zBzE,wBA2zB4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -485,7 +485,7 @@ ${l.preList[n]}
|
|
|
485
485
|
|
|
486
486
|
`}return n});q.subParser("makeMarkdown.paragraph",(e,l)=>{let a="";if(e.hasChildNodes()){let n=e.childNodes,d=n.length;for(let c=0;c<d;++c)a+=q.subParser("makeMarkdown.node")(n[c],l)}return a=a.trim(),a});q.subParser("makeMarkdown.pre",(e,l)=>{let a=e.getAttribute("prenum");return`<pre>${l.preList[a]}</pre>`});q.subParser("makeMarkdown.strikethrough",(e,l)=>{let a="";if(e.hasChildNodes()){a+="~~";let n=e.childNodes,d=n.length;for(let c=0;c<d;++c)a+=q.subParser("makeMarkdown.node")(n[c],l);a+="~~"}return a});q.subParser("makeMarkdown.strong",(e,l)=>{let a="";if(e.hasChildNodes()){a+="**";let n=e.childNodes,d=n.length;for(let c=0;c<d;++c)a+=q.subParser("makeMarkdown.node")(n[c],l);a+="**"}return a});q.subParser("makeMarkdown.table",(e,l)=>{let a="",n=[[],[]],d=e.querySelectorAll("thead>tr>th"),c=e.querySelectorAll("tbody>tr");for(let s=0;s<d.length;++s){let o=q.subParser("makeMarkdown.tableCell")(d[s],l),m="---";if(d[s].hasAttribute("style"))switch(d[s].getAttribute("style").toLowerCase().replace(/\s/g,"")){case"text-align:left;":m=":---";break;case"text-align:right;":m="---:";break;case"text-align:center;":m=":---:";break}n[0][s]=o.trim(),n[1][s]=m}for(let s=0;s<c.length;++s){let o=n.push([])-1,m=c[s].getElementsByTagName("td");for(let u=0;u<d.length;++u){let Z=" ";typeof m[u]<"u"&&(Z=q.subParser("makeMarkdown.tableCell")(m[u],l)),n[o].push(Z)}}let i=3;for(let s=0;s<n.length;++s)for(let o=0;o<n[s].length;++o){let m=n[s][o].length;m>i&&(i=m)}for(let s=0;s<n.length;++s){for(let o=0;o<n[s].length;++o)s===1?n[s][o].slice(-1)===":"?n[s][o]=`${q.helper.padEnd(n[s][o].slice(-1),i-1,"-")}:`:n[s][o]=q.helper.padEnd(n[s][o],i,"-"):n[s][o]=q.helper.padEnd(n[s][o],i);a+=`| ${n[s].join(" | ")} |
|
|
487
487
|
`}return a.trim()});q.subParser("makeMarkdown.tableCell",(e,l)=>{let a="";if(!e.hasChildNodes())return"";let n=e.childNodes,d=n.length;for(let c=0;c<d;++c)a+=q.subParser("makeMarkdown.node")(n[c],l,!0);return a.trim()});q.subParser("makeMarkdown.txt",e=>{let l=e.nodeValue;return l=l.replace(/ +/g," "),l=l.replace(/¨NBSP;/g," "),l=q.helper.unescapeHTMLEntities(l),l=l.replace(/([*_~|`])/g,"\\$1"),l=l.replace(/^(\s*)>/g,"\\$1>"),l=l.replace(/^#/gm,"\\#"),l=l.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),l=l.replace(/^( {0,3}\d+)\./gm,"$1\\."),l=l.replace(/^( {0,3})([+-])/gm,"$1\\$2"),l=l.replace(/\](\s*)\(/g,"\\]$1\\("),l=l.replace(/^ {0,3}\[([\S \t]*?)\]:/gm,"\\[$1]:"),l});function yd(e,l){if(!l)return{matches:!0,score:0};const a=e.toLowerCase(),n=l.toLowerCase();if(a.includes(n))return{matches:!0,score:1e3};const d=n.split(/\s+/).filter(Z=>Z.length>0),c=a.split(/\s+/);let i=0;for(const Z of d)c.some(r=>r.includes(Z))&&i++;if(i===d.length)return{matches:!0,score:100+i*10};let s=0,o=0,m=0,u=0;for(let Z=0;Z<a.length&&s<n.length;Z++)a[Z]===n[s]?(s++,o++,u++,m=Math.max(m,o)):o=0;return s===n.length?{matches:!0,score:m*5+u}:{matches:!1,score:0}}function WB(...e){return e.filter(Boolean).join(", ")}function GB(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const l=Math.random()*16|0;return(e==="x"?l:l&3|8).toString(16)})}function NB(e){const l=e;return l.label??l.name??l.title??String(l.id??"")}function YB(e){const l=e;return l.value??l.key??l.id??""}function LB(e){if(Array.isArray(e))return e.map(a=>({...a,label:NB(a),value:YB(a)}));const l=e;return a=>a.map(n=>({...n,label:typeof l.label=="function"?l.label(n):String(n[l.label]??""),value:n[l.value]}))}function XB(e){return Array.isArray(e)?e:"data"in e?e.data:"items"in e?e.items:[]}function yB(e,l,a){const n=a?.timeout??1e4,d=e.length>0;let c=null;async function i(o){const m=d?e(o??""):e();return l(XB(await Promise.race([m,new Promise((u,Z)=>setTimeout(()=>{Z(new Error("Request timeout"))},n))])))}const s=async o=>{try{return d?await i(o):(c||(c=await i()),o?c.filter(m=>{const{label:u}=m;return typeof u!="string"?!0:yd(u,o).matches}).sort((m,u)=>{const Z=m.label??"";return yd(u.label??"",o).score-yd(Z,o).score}):c)}catch{return[]}};return s.clearCache=()=>{c=null},s}function Km(e,l){return l==="titleCase"?e.split("_").map(a=>a[0].toUpperCase()+a.slice(1).toLocaleLowerCase()).join(" "):l==="pascal"?e.split("_").map(a=>a[0].toUpperCase()+a.slice(1).toLocaleLowerCase()).join(""):l==="camel"?e.split("_").map((a,n)=>n===0?a:a[0].toUpperCase()+a.slice(1)).join(""):l==="snake"?[...e].map(a=>a===a.toUpperCase()?`_${a.toLowerCase()}`:a).join(""):e}var go=new Map;function MB(e,l=500){clearTimeout(go.get(e));const a=setTimeout(()=>{e(),go.delete(e)},l);go.set(e,a)}function VB(e){return e.toLowerCase().replace(/[^a-z0-9-\s]/g,"").split(/[\s-]+/).join("-")}function qn(e){return e===void 0?e:e.split("_").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(" ")||e}var _r=new Map;function Dd(e){if(!e.includes("<")&&!e.includes("&"))return e.trim();const l=_r.get(e);if(l!==void 0)return l;if(typeof DOMParser>"u")return e.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();const a=new DOMParser().parseFromString(e,"text/html");a.body.querySelectorAll("p, div, li, br, h1, h2, h3, h4, h5, h6").forEach(d=>d.after(" "));const n=(a.body.textContent||"").replace(/\u00a0/g," ").replace(/\s+/g," ").trim();return _r.set(e,n),n}function Y5(e){return/<\/?[a-z][\s\S]*>/i.test(e)}async function L5(e,l){await navigator.clipboard.writeText(e),l&&l("Copied to clipboard")}function X5(...e){return e=e.flatMap(l=>l.split(/\s/)),e.map(l=>l.charAt(0)).join("")}function y5(e,l={}){if(!e||typeof document>"u")return e;const a=document.createElement("template");a.innerHTML=e;const n=d=>{for(const c of Array.from(d.children)){const i=c.tagName.toLowerCase();if(["script","iframe","object","embed","link","meta","base","form"].includes(i)){c.remove();continue}for(const s of Array.from(c.attributes)){const o=s.name.toLowerCase(),m=s.value.trim().toLowerCase();(o.startsWith("on")||(o==="href"||o==="src"||o==="xlink:href")&&(m.startsWith("javascript:")||m.startsWith("data:"))||l.resetFormatting&&["style","class","width","height","align","bgcolor","color","face","size"].includes(o))&&c.removeAttribute(s.name)}n(c)}};return n(a.content),a.innerHTML}function TB(e,l){e.key==="Escape"&&l()}function M5(e,l,...a){return a.map(n=>typeof n=="function"?n(e,l):n).join(" ")}function Hm(e,l,a){if(!e)return{};const n=["class","onClick","$el"],d=Object.entries(e).filter(([i])=>!n.includes(i)).map(([i,s])=>[i,typeof s=="function"?s(l,a):s]),c=Object.fromEntries(d);for(const i of n.slice(1))e[i]&&(c[i]=e[i]);return c}function IB(e,l){return e["v-if"]===void 0?!0:typeof e["v-if"]=="boolean"?e["v-if"]:typeof e["v-if"]=="string"?!0:typeof e["v-if"]=="function"?e["v-if"]?.(l?.[e.id],l):!0}function xB(e,l){if(l)return e?e[l]:void 0}const Pm=e=>!Number.isNaN(Date.parse(e));function V5(e,l){const a=Array.from(new Set((e??[]).flatMap(Object.keys))).map(n=>({id:n,label:n==="created_at"?"Created Date":n==="updated_at"?"Last Update":qn(n),transform:d=>["created_at","updated_at"].includes(n)?d&&ol(d,"DD.MM.YY HH:mm"):d}));return l?a.filter(n=>l.includes(n.id)||!n.id):a}function u2(e=100){return new Promise(l=>setTimeout(l,e))}var id=new Map;async function rc(e,l){const a=l?.id||e;if(await u2(1),id.has(a)){const d=id.get(a);if(d)return d}if(l?.id&&document.getElementById(l.id)||document.querySelector(`script[src="${e}"]`))return Promise.resolve();const n=new Promise((d,c)=>{const i=document.createElement("script");i.src=e,l?.id&&(i.id=l.id),i.onload=()=>{d(),id.delete(a)},i.onerror=s=>{c(new Error(String(s))),id.delete(a)},document.head.append(i)});return id.set(a,n),n}async function Ud(e,{timeout:l=1e4,interval:a=50}={}){const n=Date.now();for(;window[e]===void 0;){if(Date.now()-n>l)throw new Error(`awaitGlobal: window.${e} not available after ${l}ms`);await u2(a)}return window[e]}function Qm(e){return new Promise((l,a)=>{if(document.querySelector(`link[href="${e}"]`)){l();return}const n=document.createElement("link");n.href=e,n.rel="stylesheet",n.onload=()=>{l()},n.onerror=a,document.head.append(n)})}function Z2(e){return e.startsWith("https://")?e:(e=e.replace(/http:\/\//,""),`https://${e}`)}function bt(e,l="px"){return typeof e=="number"?`${e}${l}`:e}var zB=/^https?:\/\/|^\/\/|^blob:|^data:/,T5="https://files.bagel.design";function gB(e){T5=e.replace(/\/$/,"")}function Al(e){if(!(e==null||e==="")){if(typeof e!="string"){const l=e,a=l.imageURL??l.url??l.path_key??l.pathKey??l.src;return typeof a=="string"?Al(a):void 0}return zB.test(e)||e.startsWith("/")?e:e.startsWith("static/")||e.startsWith("images/")?`/${e}`:`${T5}/${e}`}}function Md(e,l,a=void 0){if(!l)return e;const n=l.split(/[.[]/);let d=e;for(const c of n){if(!d||typeof d!="object"||!(c in d))return a;d=d[c]}return d??a}var wB=e=>e.replace(/http:\/\//,"//");function I5(e,l){try{return e()}catch(a){l&&l(a)}}function r2(e,l){if(typeof document>"u")return;const a=document.createElement("a");a.target="_blank",a.rel="noopener noreferrer";const n=l!==void 0&&l!=="";if(typeof e=="string"){a.href=wB(e);const d=e.split("/").pop();a.download=n?l:d!==void 0&&d!==""?d:"download"}else{const d=URL.createObjectURL(e);a.href=d,a.download=n?l:"download",setTimeout(()=>I5(()=>{URL.revokeObjectURL(d)}),0)}document.body.appendChild(a),a.click(),document.body.removeChild(a)}function RB(e,l){let a=null;const n=(async d=>{try{if(!a){const c=await e(d);a=(Array.isArray(c)?c:c.data||c.items||[]).map(i=>l?l(i):{label:i.name||i.title||`${i.id}`,value:i.id,...i})}return d&&a?a.map(c=>({item:c,match:yd(c.label,d)})).filter(({match:c})=>c.matches).sort((c,i)=>i.match.score-c.match.score).map(({item:c})=>c):a||[]}catch{return[]}});return n.clearCache=()=>{a=null},n}var SB=e=>Object.keys(e),$r=e=>e?.split(" ").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(" ");function qr(e,l){return l?e.map(a=>{const n={};return l.forEach(d=>{const{id:c,transform:i,label:s}=d;if(c){const o=Md(a,c),m=s||c;n[m]=i?.(o,a)||o||""}}),n}):e}function vB(e){const l=new Set;return e.forEach(a=>{Object.keys(a).forEach(n=>l.add(n))}),Array.from(l).map(a=>({id:a,label:a}))}function fB(){const e=(0,t.ref)(!1);async function l(){return e.value||(await rc("https://cdn.jsdelivr.net/npm/xlsx/dist/xlsx.full.min.js"),e.value=!0),window.XLSX}async function a(Z,r="data",b){const h=(0,t.toValue)(b)||vB(Z),p=await l(),N=qr(Z,h),W=h.length>0?h.map(L=>{const{id:X,label:I}=L;return{v:I||X,t:"s"}}):[],G=p.utils.json_to_sheet(N);W.length>0&&p.utils.sheet_add_aoa(G,[W.map(L=>L.v)],{origin:"A1"});const Y=p.utils.book_new();p.utils.book_append_sheet(Y,G,"Sheet1"),r=r.endsWith(".xlsx")?r:`${r}.xlsx`,p.writeFile(Y,r)}async function n(Z,r="data",b){const h=b?b.map(G=>G.id).filter(Boolean):[...new Set(Z.flatMap(SB))],p=b?b.map(G=>{const{label:Y,id:L}=G;return Y||$r(L)}):h.map($r),N=qr(Z,b),W=[p.join(","),...N.map(G=>h.map(Y=>{const L=G[Y]!==void 0?G[Y]:"";return`"${String(L).replace(/"/g,'""')}"`}).join(","))].join(`
|
|
488
|
-
`);r=r.endsWith(".csv")?r:`${r}.csv`,r2(new Blob([W],{type:"text/csv;charset=utf-8"}),r)}async function d(Z){const r=await l(),b=await Z.arrayBuffer();return r.read(b)}async function c(Z){return(await d(Z)).SheetNames}async function i(Z,r,b=!0){const h=await l(),p=(await d(Z)).Sheets[r],N=h.utils.sheet_to_json(p,{header:1});if(N.length===0)return{headers:[],data:[]};let W=[],G=0;b?(W=N[0].map(L=>String(L||"").trim()),G=1):W=N[0].map((L,X)=>String.fromCharCode(65+X));const Y=[];for(let L=G;L<N.length;L++){const X=N[L],I={};for(let V=0;V<W.length;V++)V<X.length?I[W[V]]=X[V]:I[W[V]]="";Y.push(I)}return{headers:W,data:Y}}async function s(Z){const r=await l();return new Promise((b,h)=>{const p=new FileReader;p.onload=N=>{try{const W=new Uint8Array(N.target?.result),G=r.read(W,{type:"array"}),Y=G.SheetNames[0],L=G.Sheets[Y];b(r.utils.sheet_to_json(L))}catch(W){h(W)}},p.onerror=()=>{h(new Error("Failed to read file"))},p.readAsArrayBuffer(Z)})}function o(Z){return typeof Z=="number"&&Number.isInteger(Z)&&Z>=2e4&&Z<=5e4}function m(Z){const r=new Date(Date.UTC(1899,11,30));return new Date(r.getTime()+Z*(1440*60*1e3))}function u(Z,r=!1){if(!(Z instanceof Date)||Number.isNaN(Z.getTime()))return"";const b=Z.getFullYear(),h=String(Z.getMonth()+1).padStart(2,"0"),p=String(Z.getDate()).padStart(2,"0");return r?`${b}-${h}-${p}T${String(Z.getHours()).padStart(2,"0")}:${String(Z.getMinutes()).padStart(2,"0")}:${String(Z.getSeconds()).padStart(2,"0")}`:`${b}-${h}-${p}`}return{downloadExcel:a,downloadCSV:n,readExcelFile:s,ensureXLSXLoaded:l,getSheetNames:c,readSheetData:i,getWorkbook:d,isExcelSerialDate:o,excelSerialDateToJSDate:m,formatDate:u}}var eb={"to-t":"to top","to-b":"to bottom","to-l":"to left","to-r":"to right","to-tl":"to top left","to-tr":"to top right","to-bl":"to bottom left","to-br":"to bottom right"};function FB(e){if(e==null||e==="")return;if(typeof e=="string"&&e in eb)return eb[e];const l=Number(e);return Number.isFinite(l)?`${l}deg`:void 0}function kB(e){return typeof e!="string"?[]:e.trim().split(/\s+/).filter(Boolean)}function wo(e){const l=e.trim();return l.startsWith("var(")||l.startsWith("#")||/^(rgb|hsl|color-mix|linear-gradient)\(/.test(l)?l:l.startsWith("--")?`var(${l})`:`var(--bgl-${l})`}function Vs({gradient:e,gradientDir:l,color:a}){const n=(0,t.computed)(()=>{const c=(0,t.toValue)(e);return c===!0||typeof c=="string"&&c.trim()!==""}),d=(0,t.computed)(()=>[(0,t.toValue)(a),...kB((0,t.toValue)(e))].filter(Boolean));return{isGradient:n,gradientStyle:(0,t.computed)(()=>{if(!n.value)return{};const c={},i=FB((0,t.toValue)(l));i&&(c["--bgl-grad-angle"]=i);const s=d.value;if(s.length<2)return c;c["--bgl-grad-from"]=wo(s[0]),c["--bgl-grad-to"]=wo(s[s.length-1]);const o=s.slice(1,-1);return o.length&&(c["--bgl-grad-via"]=`${o.map(wo).join(", ")}, `),c}),stops:d}}async function jB(e){if("caches"in window)try{const l=await(await window.caches.open("img-cache")).match(e);if(l)return URL.createObjectURL(await l.blob())}catch{}}async function JB(e,l){if("caches"in window)try{await(await window.caches.open("img-cache")).put(e,new Response(l))}catch{}}async function CB(e){await rc("https://cdnjs.cloudflare.com/ajax/libs/heic2any/0.0.1/index.min.js");const l=await(await Ud("heic2any"))({blob:await(await fetch(Z2(e))).blob()});return await JB(e,l),URL.createObjectURL(l)}function b2(e){const l=(0,t.ref)(void 0),a=(0,t.ref)(!1);async function n(){a.value=!1;const d=Al((0,t.toValue)(e));if(d===void 0||d===""){l.value=void 0;return}try{if(d.split(".").pop()?.toLowerCase().split("?")[0]==="heic"){const c=await jB(d);if(c!==void 0&&c!==""){l.value=c;return}l.value=await CB(d)}else l.value=d}catch{a.value=!0,l.value=void 0}}return(0,t.watch)(()=>(0,t.toValue)(e),n,{immediate:!0}),{imageSrc:l,loadingError:a}}var In={},lb=!1,Am=typeof window<"u";function DB(){!Am||lb||(lb=!0,window.addEventListener("storage",e=>{e.key!==null&&e.key in In&&(In[e.key].value=e.newValue!==null?JSON.parse(e.newValue):null)}))}function UB(e,l=null){if(!(e in In)){const a=Am?localStorage.getItem(e):null;In[e]=(0,t.ref)(a!==null?JSON.parse(a):l),(0,t.watch)(In[e],n=>{Am&&localStorage.setItem(e,JSON.stringify(n))})}return In[e]}function x5(e){return DB(),new Proxy({},{get(l,a){return UB(a,e?.[a]??null)}})}var z5=1e3,OB=60*z5;function EB(e,l={}){const{interval:a=30*z5,inactivityThreshold:n=5*OB,pauseInBackground:d=!0}=l,{idle:c}=fT(n),i=(0,t.ref)(!0),s=(0,t.ref)(null),o=()=>!d||document.visibilityState==="visible",m=()=>{i.value=!1,s.value!==null&&(clearTimeout(s.value),s.value=null)},u=()=>{s.value!==null&&(clearTimeout(s.value),s.value=null)},Z=()=>{s.value!==null&&(clearTimeout(s.value),s.value=null);const h=async()=>{if(i.value&&o()&&!c.value)try{await e()}catch{}i.value&&(s.value=window.setTimeout(h,a))};h()},r=()=>{i.value&&Z()};function b(){document.visibilityState==="visible"?i.value&&Z():d&&u()}return(0,t.onMounted)(()=>{document.addEventListener("visibilitychange",b),Z()}),(0,t.onUnmounted)(()=>{document.removeEventListener("visibilitychange",b),m()}),{isPolling:i,pausePolling:u,resumePolling:r,startPolling:Z,stopPolling:m}}function BB(){const e=(0,t.ref)(!1);let l;function a(n){e.value=n.matches}return(0,t.onMounted)(()=>{typeof window>"u"||!window.matchMedia||(l=window.matchMedia("(prefers-reduced-motion: reduce)"),e.value=l.matches,l.addEventListener("change",a))}),(0,t.onUnmounted)(()=>{l?.removeEventListener("change",a)}),e}function KB(e,l,a){const n={...e};return a===void 0?delete n[l]:n[l]=a,n}function HB(e){const l=(0,Ta.useRoute)(),a=(0,Ta.useRouter)(),n={};return new Proxy({},{get(d,c){if(!(c in n)){const i=e?.[c];n[c]=(0,t.computed)({get:()=>l.query[c]??i,set:s=>a.replace({query:KB(l.query,c,s)})})}return n[c]}})}var Xt=(0,t.ref)([{value:"dark",class:"bgl-dark-mode",icon:"cloudy_night",label:"Dark Mode",isDark:!0},{value:"light",class:"bgl-light-mode",icon:"brightness_7",label:"Light Mode",isDark:!1},{value:"system",class:"system",icon:"settings_input_component",label:"System Default"}]),tb="color-mode",Nt=(0,t.ref)("system"),_m=(0,t.ref)(!1),h2=(0,t.ref)(!1),Fi=(0,t.ref)(!1),p2=typeof window<"u";function PB(){return h2.value&&p2&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}function ab(e){return Xt.value.find(l=>l.value===e)}function di(e){if(!p2)return;const l=document.documentElement;if(Xt.value.forEach(a=>{a.class!=="system"&&l.classList.remove(a.class)}),e==="system"){const a=PB();_m.value=a;const n=Xt.value.find(i=>i.value==="dark"),d=Xt.value.find(i=>i.value==="light"),c=a?n:d;c&&l.classList.add(c.class)}else{const a=ab(e),n=a&&a.isDark&&!h2.value?ab("light"):a;n&&(l.classList.add(n.class),_m.value=n.isDark??!1)}}function QB(){const e=Xt.value.filter(l=>l.value!=="system");e.length!==0&&(Nt.value=e[(e.findIndex(l=>l.value===Nt.value)+1)%e.length].value)}function AB(e={}){e.allowDark!==void 0&&(h2.value=e.allowDark),e.manualSelection!==void 0&&(Fi.value=e.manualSelection),g5(),Fi.value||(Nt.value="system"),di(Nt.value)}function _B(e){if(!Xt.value.some(l=>l.value===e.value)){const l=Xt.value.findIndex(a=>a.value==="system");l>-1?Xt.value.splice(l,0,e):Xt.value.push(e)}}var nb=!1;function g5(){if(!(nb||!p2)){if(nb=!0,Fi.value){const e=window.localStorage.getItem(tb);Xt.value.some(l=>l.value===e)&&(Nt.value=e)}else Nt.value="system";di(Nt.value),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Nt.value==="system"&&di("system")}),(0,t.watch)(Nt,e=>{Fi.value&&localStorage.setItem(tb,e),di(e)})}}function $B(){return g5(),{isDark:_m,theme:(0,t.computed)(()=>Nt.value),themeOptions:Xt,toggleTheme:QB,addTheme:_B,setTheme:e=>{Nt.value=e}}}function w5(e,l,a,n){xT(e,(d,c)=>{if(l?.()?.setCustomValidity(""),!a||d===c||!d)return;const i=a(d,n?.());typeof i=="string"&&l?.()?.setCustomValidity(i)},{debounce:500})}function R5({schema:e,columns:l,data:a}={}){const n=(0,t.computed)(()=>(0,t.toValue)(e)),d=(0,t.computed)(()=>(0,t.toValue)(l));return n.value?d.value&&d.value.length>0?n.value.filter(c=>d.value?.includes(c.id)):n.value:V5(a,d.value)}const qB={s:"400px",m:"540px",l:"720px",xl:"960px",full:"100%"};var eK={key:0,class:"dialog-grip","aria-hidden":"true"},lK={key:2,class:"flex-grow-1"},tK=(0,t.defineComponent)({__name:"Dialog",props:{open:{type:Boolean},title:{},width:{default:"m"},position:{default:"center"},dismissable:{type:Boolean,default:!0},flat:{type:Boolean,default:!0},thin:{type:Boolean,default:!1},centerTitle:{type:Boolean,default:!1},ellipsisTitle:{type:Boolean,default:!1},closePlacement:{default:"header-end"},grip:{type:Boolean,default:void 0}},emits:["update:open","close"],setup(e,{expose:l,emit:a}){const n=e,d=(0,t.computed)(()=>n.grip??n.position==="bottom"),c=a,i=(0,t.ref)(null),s=(0,t.ref)(!1),o=(0,t.ref)(!0),m=(0,t.computed)(()=>qB[n.width]),u=(0,t.computed)(()=>n.position==="left"?"dialog-left ms-1 me-auto mt-1 mb-1 height-100-2 m_m-0 m_h-100vh m_max-h-100vh m_radius-0":n.position==="right"?"dialog-right me-1 ms-auto mt-1 mb-1 height-100-2 m_m-0 m_h-100vh m_max-h-100vh m_radius-0":n.position==="top"?"dialog-top mx-auto mt-1 mb-auto":n.position==="bottom"?"dialog-bottom mx-auto mb-1 mt-auto":"dialog-center mx-auto");(0,t.watch)(()=>n.open,N=>{N?(i.value?.showModal(),s.value=!1,o.value=!1,setTimeout(()=>{o.value=!0},250)):Z()}),(0,t.onMounted)(()=>{n.open&&i.value?.showModal()});function Z(){s.value||(s.value=!0)}function r(){s.value&&(i.value?.close(),s.value=!1,c("close"))}function b(N){N.target===i.value&&n.dismissable&&c("update:open",!1)}function h(N){if(!n.dismissable){N.preventDefault();return}c("update:open",!1)}function p(){o.value=!1,c("update:open",!1)}return l({close:p}),(N,W)=>((0,t.openBlock)(),(0,t.createElementBlock)("dialog",{ref_key:"dialogRef",ref:i,class:(0,t.normalizeClass)([[u.value,{"is-closing":s.value}],"border-none shadow-30 p-0 testMe1 dialog-no-focus-outline"]),style:(0,t.normalizeStyle)({"--dialog-width":m.value}),onClick:b,onCancel:h,onAnimationend:r},[(0,t.createElementVNode)("div",{class:"grid grid-dialog max-height-100-2",tabindex:"-1",autofocus:"",onClick:W[0]||(W[0]=(0,t.withModifiers)(()=>{},["stop"]))},[d.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",eK)):(0,t.createCommentVNode)("",!0),e.title||N.$slots.header||e.dismissable?((0,t.openBlock)(),(0,t.createElementBlock)("header",{key:1,class:(0,t.normalizeClass)(["flex space-between flex-shrink-0 align-items-start gap-05",{"border-bottom":!e.flat,"border-none":!e.title&&!N.$slots.header,"m_ps-1":e.title||N.$slots.header,"p-05 m_p-05":!e.title&&!N.$slots.header,"ps-1-5 pe-1 py-1 ":!e.thin&&(e.title||N.$slots.header),"ps-1 pe-05 py-05":e.thin&&(e.title||N.$slots.header)}])},[e.dismissable&&e.closePlacement==="header-start"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:0,flat:"",icon:"close","aria-label":"Close",class:"dialog-close relative z-2",thin:"",onClick:p})):(0,t.createCommentVNode)("",!0),e.title||N.$slots.header?((0,t.openBlock)(),(0,t.createElementBlock)("h3",{key:1,class:(0,t.normalizeClass)(["dialog-title m-0 txt20 semi w-100p",{"txt-center balance":e.centerTitle,"word-break-all":!e.centerTitle,"ellipsis-1":e.ellipsisTitle}])},[(0,t.renderSlot)(N.$slots,"header",{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.title),1)],!0)],2)):(0,t.createCommentVNode)("",!0),!e.title&&!N.$slots.header?((0,t.openBlock)(),(0,t.createElementBlock)("div",lK)):(0,t.createCommentVNode)("",!0),e.dismissable&&e.closePlacement==="header-end"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:3,flat:"",icon:"close","aria-label":"Close",class:"dialog-close relative z-2",thin:"",onClick:p})):(0,t.createCommentVNode)("",!0)],2)):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["overflow-y flex-grow-1 m_p-1",{"px-1 py-05":e.thin,"px-1-5 py-1":!e.thin}])},[(0,t.renderSlot)(N.$slots,"default",{},void 0,!0)],2),N.$slots.footer?((0,t.openBlock)(),(0,t.createElementBlock)("footer",{key:2,class:(0,t.normalizeClass)(["flex flex-shrink-0 gap-05 m_px-05 m_py-05 justify-content-end",{"border-top":!e.flat,"px-05 py-05":e.thin,"px-1-5 py-1":!e.thin}])},[(0,t.renderSlot)(N.$slots,"footer",{},void 0,!0)],2)):(0,t.createCommentVNode)("",!0)]),e.dismissable&&e.closePlacement==="overlay-start"&&o.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:0,icon:"close","aria-label":"Close",class:"fixed top-1 start-1 z-999 overlay-btn",onClick:p})):(0,t.createCommentVNode)("",!0),e.dismissable&&e.closePlacement==="overlay-end"&&o.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:1,icon:"close","aria-label":"Close",class:"fixed top-1 end-1 z-999 overlay-btn",onClick:p})):(0,t.createCommentVNode)("",!0)],38))}}),_t=Le(tK,[["__scopeId","data-v-42595465"]]),aK=(0,t.defineComponent)({__name:"DialogConfirm",props:{open:{type:Boolean},title:{},message:{},width:{default:"s"},position:{default:"center"},dismissable:{type:Boolean,default:!0},confirmText:{},cancelText:{},confirmColor:{default:"primary"}},emits:["update:open","resolve"],setup(e,{emit:l}){const a=e,n=l,{$t:d}=tl(),c=(0,t.computed)(()=>a.title||d("modalConfirm.title")),i=(0,t.computed)(()=>a.confirmText||d("modalConfirm.confirm")),s=(0,t.computed)(()=>a.cancelText||d("modalConfirm.cancel"));function o(){n("resolve",!0),n("update:open",!1)}function m(){n("resolve",!1),n("update:open",!1)}function u(){n("resolve",!1)}return(Z,r)=>((0,t.openBlock)(),(0,t.createBlock)(_t,{open:e.open,title:c.value,width:e.width,position:e.position,dismissable:e.dismissable,"onUpdate:open":r[0]||(r[0]=b=>Z.$emit("update:open",b)),onClose:u},{footer:(0,t.withCtx)(()=>[(0,t.createVNode)(oe,{flat:"",onClick:m},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(s.value),1)]),_:1}),(0,t.createVNode)(oe,{color:e.confirmColor,onClick:o},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(i.value),1)]),_:1},8,["color"])]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("p",null,(0,t.toDisplayString)(e.message),1)]),_:1},8,["open","title","width","position","dismissable"]))}}),S5=aK,xn=new Map,$m=new Set,v5=/^[a-z0-9][a-z0-9._-]*:[a-z0-9][a-z0-9._-]*$/i;function nK(e){if(!v5.test(e.type))throw new Error(`Custom form field type "${e.type}" must be a namespaced ID such as "acme:rating"`);if(xn.has(e.type))throw new Error(`Custom form field type "${e.type}" is already registered`);return xn.set(e.type,e),$m.delete(e.type),()=>{xn.get(e.type)===e&&xn.delete(e.type)}}function Yt(e){return xn.get(e)}function dK(){return[...xn.values()]}function Ts(e){return v5.test(e)}function Is(e){!Ts(e)||$m.has(e)||$m.add(e)}function cK(e,l,a={},n=""){return Yt(e)?.display?.(l,{key:n,config:a})}function W2(e,l){const a={...l};for(const[n,d]of Object.entries(e)){const c=Yt(d._type)?.toSubmission;if(!c)continue;const i=c(a[n],{key:n,config:d._config,formData:l});i===void 0?delete a[n]:a[n]=i}return a}const iK=12,sK=12,oK=1;var f5=/^col-(\d{1,2})\/12$/,F5=/^start-col-(\d{1,2})$/,k5=/^m_col-(\d{1,2})\/12$/,j5=/^start-row-(\d+)$/,J5=/^(?:grid-)?span-row-(\d+)$/,C5=/^m_start-col-(\d{1,2})$/,D5=/^m_start-row-(\d+)$/,U5=/^m_(?:grid-)?span-row-(\d+)$/,ki={"col-1/12":1,"col-1/6":2,"col-2/12":2,"col-1/4":3,"col-3/12":3,"col-1/3":4,"col-4/12":4,"col-5/12":5,"col-1/2":6,"col-6/12":6,"col-7/12":7,"col-2/3":8,"col-8/12":8,"col-3/4":9,"col-9/12":9,"col-5/6":10,"col-10/12":10,"col-11/12":11,"col-full":12,"col-12/12":12},qm=Object.fromEntries(Object.entries(ki).map(([e,l])=>[`m_${e}`,l]));function Sa(e){return Math.max(1,Math.min(12,Math.round(e)))}function xs(e){return Math.max(1,Math.round(e))}function O5(e){return`col-${Sa(e)}/12`}function E5(e){return`start-col-${Sa(e)}`}function B5(e){return`m_col-${Sa(e)}/12`}function K5(e){return`span-row-${xs(e)}`}function mK(e){return`start-row-${Math.max(1,Math.round(e))}`}function H5(e){return`m_start-col-${Sa(e)}`}function P5(e){return`m_start-row-${Math.max(1,Math.round(e))}`}function Q5(e){return`m_span-row-${xs(e)}`}function G2(e){if(e)for(const l of e.split(/\s+/)){if(l.startsWith("m_"))continue;const a=l.match(f5);if(a)return Sa(Number(a[1]));if(l in ki)return ki[l]}}function N2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(F5);if(a)return Sa(Number(a[1]))}}function Y2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(k5);if(a)return Sa(Number(a[1]));if(l in qm)return qm[l]}}function L2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(C5);if(a)return Sa(Number(a[1]))}}function X2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(J5);if(a)return xs(Number(a[1]))}}function y2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(j5);if(a)return Math.max(1,Number(a[1]))}}function M2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(D5);if(a)return Math.max(1,Number(a[1]))}}function V2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(U5);if(a)return xs(Number(a[1]))}}function T2(e){return e?e.split(/\s+/).filter(Boolean).filter(l=>!f5.test(l)&&!F5.test(l)&&!k5.test(l)&&!j5.test(l)&&!J5.test(l)&&!C5.test(l)&&!D5.test(l)&&!U5.test(l)&&!(l in ki)&&!(l in qm)).join(" "):""}function A5(e,l){const a=T2(e),n=a?[a]:[];return l.colSpan!==void 0&&l.colSpan!==12&&n.push(O5(l.colSpan)),l.colStart!==void 0&&n.push(E5(l.colStart)),l.rowStart!==void 0&&n.push(mK(l.rowStart)),l.rowSpan!==void 0&&l.rowSpan!==1&&n.push(K5(l.rowSpan)),l.mColSpan!==void 0&&l.mColSpan!==12&&n.push(B5(l.mColSpan)),l.mColStart!==void 0&&n.push(H5(l.mColStart)),l.mRowStart!==void 0&&n.push(P5(l.mRowStart)),l.mRowSpan!==void 0&&l.mRowSpan!==1&&n.push(Q5(l.mRowSpan)),n.join(" ")}function _5(e){return{colSpan:G2(e),colStart:N2(e),rowStart:y2(e),rowSpan:X2(e),mColSpan:Y2(e),mColStart:L2(e),mRowStart:M2(e),mRowSpan:V2(e)}}var uK=(0,t.defineComponent)({__name:"FormFlow",props:{schema:{},modelValue:{},components:{},errors:{},onSubmit:{type:Function}},emits:["update:modelValue"],setup(e,{expose:l,emit:a}){const n=e,d=a,{$t:c}=tl();function i(v,B){const O=B.split(".");let w=v;for(const y of O)w=w?.[y];return w}function s(v,B,O){const w=B.split(".");let y=v;for(let R=0;R<w.length-1;R++){const g=w[R];(y[g]==null||typeof y[g]!="object")&&(y[g]={}),y=y[g]}y[w[w.length-1]]=O}function o(v){if(v==null||typeof v!="object")return v;try{return structuredClone(v)}catch{return JSON.parse(JSON.stringify(v))}}function m(v,B,O,w){const y=Yt(v._type);if(y?.coerce)return y.coerce(B,{key:O,config:v._config,formData:w});if(typeof B!="string")return B;const R=B.trim();switch(v._type){case"checkbox":case"toggle":return R.toLowerCase()==="true"?!0:R.toLowerCase()==="false"?!1:B;case"number":case"range":{if(!R)return B;const g=Number(R);return Number.isNaN(g)?B:g}default:return B}}function u(v){const B={...v??{}};for(const[O,w]of Object.entries(n.schema._fields)){const y=i(B,O);if(y!==void 0){s(B,O,m(w,y,O,B));continue}const R=w._config.default;R!==void 0&&s(B,O,m(w,o(R),O,B))}return B}function Z(v){const B=v._config.schema;if(B&&typeof B.getDefaults=="function"){const w=o(B.getDefaults());if(w&&Object.keys(w).length>0)return w}const O=v._config.default;return Array.isArray(O)&&O.length>0&&O[0]!=null&&typeof O[0]=="object"?o(r(O[0])):{}}function r(v){try{return JSON.parse(JSON.stringify(v))}catch{return{...v}}}const b=(0,t.ref)(u(n.modelValue)),h=(0,t.ref)({}),p=(0,t.ref)(!1),N=(0,t.ref)("idle"),W=(0,t.ref)();let G=!1;(0,t.watch)(()=>n.modelValue,v=>{G||(b.value=u(v))},{deep:!0}),(0,t.watch)(b,v=>{G=!0,d("update:modelValue",o(v)),(0,t.nextTick)(()=>{G=!1})},{deep:!0});function Y(v){return v._hidden?!1:v._condition==null?!0:fu(v._condition,b.value)}function L(v,B){if(B._condition==null)return v;const O=B._condition.trim().split(/\s+/)[0];if(!O)return v;const w=i(b.value,O);return w==null?v:`${v}:${String(w)}`}const X=(0,t.computed)(()=>{const v=[];for(const[B,O]of Object.entries(n.schema._fields))Y(O)&&v.push({key:B,field:O});return v});function I(v){if(!n.schema._class?.split(/\s+/).includes("free-grid"))return;const{rowStart:B,rowSpan:O,mRowStart:w,mRowSpan:y}=_5(v._class);if(!(!B&&!w&&!O&&!y))return{...B?{"--bgl-grid-row-start":String(B)}:{},...w?{"--bgl-mobile-grid-row-start":String(w)}:{},...O?{"--bgl-grid-row-span":String(O)}:{},...y?{"--bgl-mobile-grid-row-span":String(y)}:{}}}function V(v,B,O){s(b.value,v,B),(N.value==="success"||N.value==="error")&&(N.value="idle"),p.value&&z(v,O)}function M(v,B,O){const w=Yt(B._type);return w?.isEmpty?w.isEmpty(v,{key:O,config:B._config,formData:b.value}):v==null||v===""||v===!1&&B._type==="checkbox"||Array.isArray(v)&&v.length===0||B._type==="tel"&&typeof v=="string"&&/^\+\d+$/.test(v)}function z(v,B){const O=T(v);if(B._config.required===!0&&M(O,B,v))return h.value={...h.value,[v]:B._config.requiredMessage??c("form.required")},!1;if(B._type==="email"&&O&&!Da.test(O))return h.value={...h.value,[v]:c("form.invalidEmail")},!1;const w=Yt(B._type)?.validate?.(O,{key:v,config:B._config,formData:b.value});if(w!==void 0&&w!==!0)return h.value={...h.value,[v]:w},!1;if(B._validations!=null)for(const y of B._validations){const R=y(O);if(R!==!0)return h.value={...h.value,[v]:R},!1}return h.value=Object.fromEntries(Object.entries(h.value).filter(([y])=>y!==v)),!0}function T(v){return i(b.value,v)}function F(v,B){return B._config.label!=null?B._config.label:v.split(/[._-]/).map(O=>O.charAt(0).toUpperCase()+O.slice(1)).join(" ")}function f(v){if(typeof v!="string"&&(v._type==="select"||v._type==="multiselect")&&v._config.display==="btn")return n.components?.selectBtn??Cu;const B=typeof v=="string"?v:v._type;if(B&&n.components?.[B]!=null)return n.components[B];const O=B?Yt(B)?.component:void 0;return O||(B&&Ts(B)&&Is(B),{text:ke,email:ku,password:Rh,number:pt,tel:l2,url:ke,date:Ha,time:ke,datetime:Ha,textarea:ke,richtext:Xi,json:Fu,checkbox:zl,toggle:Ys,radio:vh,select:Dl,multiselect:Dl,array:Yn,heading:jm,divider:jm,upload:Fd,color:vt,icon:Xh,range:Ju}[B]??ke)}const k=(0,t.computed)(()=>{const v={...h.value,...n.errors||{}},B={};for(const[O,w]of Object.entries(v))B[O]=Ve(w)??w;return B});function D(v,B){const O=F(B,v),{helpText:w,...y}=v._config,R=n.schema._class?.split(/\s+/).includes("free-grid")??!1,g={label:O,modelValue:T(B),"onUpdate:modelValue":le=>{V(B,le,v)},error:k.value[B],...y,formData:b.value,...w!=null?{helptext:w}:{},name:v._config.name??B};if(v._type==="textarea"&&(g.multiline=!0),v._type==="multiselect"&&(g.multiselect=!0),R&&v._type==="richtext"&&(g.fullHeight=!0),R&&(v._type==="upload"||v._type==="file")&&(g.height=v._config.hideLabel?"100%":"calc(100% - 1.75rem)"),(v._type==="select"||v._type==="multiselect")&&typeof g.options=="function"){const le=g.options;g.options=J=>le(J,b.value)}if(v._type==="json"&&(g.language=g.language??"json"),v._type==="array"){delete g.default,delete g.schema,delete g.itemType;const{helpText:le,...J}=Object.fromEntries(Object.entries(v._config).filter(([ie])=>ie!=="schema"&&ie!=="itemType"&&ie!=="default"));Object.assign(g,J),le!=null&&(g.helptext=le),delete g.helpText,g.modelValue=T(B),g["onUpdate:modelValue"]=ie=>{V(B,ie,v)},g.allowAdd=g.allowAdd??!0,g.allowDelete=g.allowDelete??!0}return g}function Q(v,B){return{...v._component?.props??{},...D(v,B)}}function K(v){return typeof v=="string"&&n.components?.[v]!=null?n.components[v]:v}function E(v){return v._component!=null}function te(){let v=!0;const B={};for(const{key:O,field:w}of X.value){const y=T(O);if(w._config.required===!0&&M(y,w,O)){B[O]=w._config.requiredMessage??c("form.required"),v=!1;continue}if(w._type==="email"&&y&&!Da.test(y)){B[O]=c("form.invalidEmail"),v=!1;continue}const R=Yt(w._type)?.validate?.(y,{key:O,config:w._config,formData:b.value});if(R!==void 0&&R!==!0){B[O]=R,v=!1;continue}if(w._validations!=null)for(const g of w._validations){const le=g(y);if(le!==!0){B[O]=le,v=!1;break}}}return h.value=B,v}async function ee(v){v&&v.preventDefault(),p.value=!0;const B=te();if(B){if(n.onSubmit){N.value="submitting";try{await n.onSubmit(W2(n.schema._fields,b.value)),N.value="success"}catch{N.value="error"}}}else{v?.stopPropagation(),W.value?.reportValidity();const O=X.value.find(({key:w})=>h.value[w])?.key;if(O!=null&&W.value){const w=W.value.querySelector(`[name="${O}"]`)||W.value.querySelector(`[id="${O}"]`)||W.value.querySelector(`[data-field="${O}"]`)||W.value.querySelector("input, select, textarea");w&&(w.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(()=>{w instanceof HTMLElement&&w.focus()},300))}}return B}return l({validate:te,submit:ee,formState:N}),(v,B)=>{const O=(0,t.resolveComponent)("FormFlow",!0);return(0,t.openBlock)(),(0,t.createElementBlock)("form",{ref_key:"formElement",ref:W,class:(0,t.normalizeClass)(["grid-form",e.schema._class]),onSubmit:ee},[N.value==="success"?(0,t.renderSlot)(v.$slots,"success",{key:0,formData:b.value}):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(X.value,({key:w,field:y})=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:L(w,y),class:(0,t.normalizeClass)([y._class,y._config.class]),style:(0,t.normalizeStyle)(I(y))},[(0,t.renderSlot)(v.$slots,`field:${w}`,{value:T(w),field:y,formData:b.value,error:h.value[w],onChange:R=>{V(w,R,y)}},()=>[y._type==="array"&&y._config.schema?._isSchema?((0,t.openBlock)(),(0,t.createBlock)(Yn,(0,t.mergeProps)({key:0,ref_for:!0},D(y,w),{"create-item":()=>Z(y)}),{default:(0,t.withCtx)(({item:R})=>[(0,t.createVNode)(O,{"model-value":R.value,schema:y._config.schema,components:e.components,"onUpdate:modelValue":g=>{R.value=g}},null,8,["model-value","schema","components","onUpdate:modelValue"])]),_:2},1040,["create-item"])):y._type==="array"&&typeof y._config.schema=="string"?((0,t.openBlock)(),(0,t.createBlock)(Yn,(0,t.mergeProps)({key:1,ref_for:!0},D(y,w),{"create-item":()=>""}),{default:(0,t.withCtx)(({item:R})=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(f(y._config.schema)),{"model-value":R.value,"onUpdate:modelValue":g=>{R.value=g}},null,8,["model-value","onUpdate:modelValue"]))]),_:2},1040)):y._type==="array"&&y._config.schema?((0,t.openBlock)(),(0,t.createBlock)(Yn,(0,t.mergeProps)({key:2,ref_for:!0},D(y,w),{"create-item":()=>Z(y)}),{default:(0,t.withCtx)(({item:R})=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(K(y._config.schema)),{modelValue:R.value,"onUpdate:modelValue":g=>R.value=g},null,8,["modelValue","onUpdate:modelValue"]))]),_:2},1040,["create-item"])):y._type==="array"&&y._config.itemType?((0,t.openBlock)(),(0,t.createBlock)(Yn,(0,t.mergeProps)({key:3,ref_for:!0},D(y,w),{"create-item":()=>""}),{default:(0,t.withCtx)(({item:R})=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(f(y._config.itemType)),{"model-value":R.value,"onUpdate:modelValue":g=>{R.value=g}},null,8,["model-value","onUpdate:modelValue"]))]),_:2},1040)):E(y)?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(K(y._component.component)),(0,t.mergeProps)({key:4,ref_for:!0},Q(y,w)),null,16)):((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(f(y)),(0,t.mergeProps)({key:5,ref_for:!0},D(y,w)),null,16))])],6))),128)),(0,t.renderSlot)(v.$slots,"errors",{errors:k.value,errorCount:Object.keys(k.value).filter(w=>k.value[w]).length,visibleFields:X.value}),N.value==="error"?(0,t.renderSlot)(v.$slots,"error",{key:0,formData:b.value}):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(v.$slots,"submit",{submit:ee,validate:te,formData:b.value,errors:k.value,formState:N.value})],64))],34)}}}),zs=uK,ZK={key:0,class:"dialog-form-error bg-red-30 color-red radius-1 mb-1 txt14 px-1 py-075"},rK={key:1,class:"mb-1 mt-0"},bK=(0,t.defineComponent)({__name:"DialogForm",props:{open:{type:Boolean},title:{},width:{default:"m"},position:{default:"center"},dismissable:{type:Boolean,default:!0},schema:{},modelValue:{},message:{},onSubmit:{},onDelete:{},submitText:{},cancelText:{},deleteText:{}},emits:["update:open","resolve"],setup(e,{emit:l}){const a=e,n=l,{$t:d}=tl(),c=(0,t.ref)({...a.modelValue||{}}),i=(0,t.ref)(!1),s=(0,t.ref)(!1),o=(0,t.ref)(null),m=(0,t.ref)(),u=(0,t.computed)(()=>typeof a.onDelete=="function");async function Z(){if(!i.value){if(!m.value?.validate()){o.value=d("dialogForm.validationError");return}o.value=null,i.value=!0;try{a.onSubmit&&await a.onSubmit(c.value),n("resolve",{action:"submit",data:c.value}),n("update:open",!1)}catch(p){o.value=p instanceof Error?p.message:d("dialogForm.errorOccurred")}finally{i.value=!1}}}async function r(){if(!(s.value||!a.onDelete)){o.value=null,s.value=!0;try{await a.onDelete(c.value),n("resolve",{action:"delete",data:c.value}),n("update:open",!1)}catch(p){o.value=p instanceof Error?p.message:d("dialogForm.errorOccurred")}finally{s.value=!1}}}function b(){n("resolve",{action:"cancel",data:c.value}),n("update:open",!1)}function h(){n("resolve",{action:"cancel",data:c.value})}return(p,N)=>((0,t.openBlock)(),(0,t.createBlock)(_t,{open:e.open,title:e.title,width:e.width,position:e.position,dismissable:e.dismissable,"onUpdate:open":N[1]||(N[1]=W=>p.$emit("update:open",W)),onClose:h},{footer:(0,t.withCtx)(()=>[u.value?((0,t.openBlock)(),(0,t.createBlock)(oe,{key:0,color:"red",flat:"",loading:s.value,disabled:i.value,class:"me-auto",thin:"",onClick:r},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.deleteText||(0,t.unref)(d)("dialogForm.delete")),1)]),_:1},8,["loading","disabled"])):(0,t.createCommentVNode)("",!0),N[2]||(N[2]=(0,t.createElementVNode)("div",{class:"flex-grow-1"},null,-1)),(0,t.createVNode)(oe,{flat:"",disabled:i.value||s.value,onClick:b,thin:""},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.cancelText||(0,t.unref)(d)("dialogForm.cancel")),1)]),_:1},8,["disabled"]),(0,t.createVNode)(oe,{color:"primary",loading:i.value,disabled:s.value,onClick:Z},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.submitText||(0,t.unref)(d)("dialogForm.save")),1)]),_:1},8,["loading","disabled"])]),default:(0,t.withCtx)(()=>[o.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",ZK,(0,t.toDisplayString)(o.value),1)):(0,t.createCommentVNode)("",!0),e.message?((0,t.openBlock)(),(0,t.createElementBlock)("p",rK,(0,t.toDisplayString)(e.message),1)):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(zs,{ref_key:"formFlowRef",ref:m,modelValue:c.value,"onUpdate:modelValue":N[0]||(N[0]=W=>c.value=W),schema:e.schema,onSubmit:Z},null,8,["modelValue","schema"])]),_:1},8,["open","title","width","position","dismissable"]))}}),$5=bK;const I2=Symbol("dialog");var ji=null;function q5(){let e=null;try{e=(0,t.inject)(I2,null)}catch{e=null}if(!e){if(ji)return ji;throw new Error("Dialog API not provided. Make sure DialogPlugin is installed via app.use(DialogPlugin)")}return e}const eW={install:e=>{let l=0;const a=(0,t.reactive)([]),n={form:c=>new Promise(i=>{const s=++l;a.push({id:s,type:"form",options:c,resolve:i,open:!0})}),confirm:c=>new Promise(i=>{const s=++l,o=typeof c=="string"?{message:c}:c;a.push({id:s,type:"confirm",options:o,resolve:i,open:!0})}),open:c=>{const i=++l,s={id:i,type:"open",options:c,resolve:()=>{},open:!0};return a.push(s),{close:()=>{const o=a.findIndex(m=>m.id===i);o!==-1&&(a[o].open=!1,setTimeout(()=>{const m=a.findIndex(u=>u.id===i);m!==-1&&a.splice(m,1)},200))}}}};ji||(ji=n),e.provide(I2,n);const d=(0,t.defineComponent)({name:"DialogContainer",setup(){function c(o,m){o.resolve(m),o.open=!1,setTimeout(()=>{const u=a.findIndex(Z=>Z.id===o.id);u!==-1&&a.splice(u,1)},200)}function i(o,m){o.resolve(m),o.open=!1,setTimeout(()=>{const u=a.findIndex(Z=>Z.id===o.id);u!==-1&&a.splice(u,1)},200)}function s(o,m){m||(o.open=!1,setTimeout(()=>{const u=a.findIndex(Z=>Z.id===o.id);u!==-1&&a.splice(u,1)},200))}return{dialogStack:a,handleFormResolve:c,handleConfirmResolve:i,handleOpenUpdate:s}},render(){return this.dialogStack.map(c=>{if(c.type==="form")return(0,t.h)($5,{key:c.id,open:c.open,...c.options,"onUpdate:open":i=>{i||this.handleFormResolve(c,{action:"cancel",data:c.options.modelValue||{}})},onResolve:i=>{this.handleFormResolve(c,i)}});if(c.type==="confirm")return(0,t.h)(S5,{key:c.id,open:c.open,...c.options,"onUpdate:open":i=>{i||this.handleConfirmResolve(c,!1)},onResolve:i=>{this.handleConfirmResolve(c,i)}});if(c.type==="open"){const i=c.options;return(0,t.h)(_t,{key:c.id,open:c.open,title:i.title,width:i.width,position:i.position,dismissable:i.dismissable,class:i.class,"onUpdate:open":s=>{this.handleOpenUpdate(c,s)}},{default:()=>(0,t.h)((typeof i.component=="string",i.component),i.props||{})})}return null})}});if(e.component("DialogContainer",d),typeof document<"u"&&typeof window<"u"){const c=()=>{if(!document.getElementById("bagelink-dialog-root")){const i=document.createElement("div");i.id="bagelink-dialog-root",document.body.appendChild(i);const s=(0,t.createApp)(d);Object.assign(s._context,e._context),s.mount(i)}};document.body&&c(),e.mixin({mounted(){this.$root===this&&c()}})}}};var x2={pint:{pattern:/\d/},int:{pattern:/[\d-]/},pnum:{pattern:/[\d.]/},tel:{pattern:/[\d.\-()\s+]/},money:{pattern:/[\d.\s,]/},number:{pattern:/[\d\-.]/},num:{pattern:/[\d\-.]/},hex:{pattern:/[0-9a-f]/i},email:{pattern:/[\w.\-@]/},alpha:{pattern:/[a-z_]/i},alphanum:{pattern:/\w/},lower:{pattern:/[a-z]/i,transform:e=>e.toLowerCase()},upper:{pattern:/[A-Z]/i,transform:e=>e.toUpperCase()},slug:{pattern:/[a-z0-9-]/i,transform:e=>e.toLowerCase().replace(/\s/g,"-")},snake:{pattern:/[a-z_]/,transform:e=>e.toLowerCase().replace(/\s/g,"_")}},Fc=new WeakMap;function Ro(e){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return e;const l=e.querySelector("input, textarea");return l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement?l:null}function db(e){const l=Object.keys(e.modifiers);return l.length>0?l[l.length-1]:""}function lW(e){return e.pattern!=null?e.pattern:e.modifier!=null&&e.modifier!==""?x2[e.modifier]?.pattern??/./:/./}function cb(e,l,a){a.keydownEvent=(n=>{pK(n,l,a)}),a.inputEvent=(n=>{tW(n,l,a)}),a.compositionStartEvent=(()=>{WK(a)}),a.compositionEndEvent=(n=>{GK(n,l,a)}),l.addEventListener("keydown",a.keydownEvent),l.addEventListener("input",a.inputEvent,{capture:!0}),l.addEventListener("compositionstart",a.compositionStartEvent),l.addEventListener("compositionend",a.compositionEndEvent)}function ib(e,l){l.keydownEvent&&e.removeEventListener("keydown",l.keydownEvent),l.inputEvent&&e.removeEventListener("input",l.inputEvent,{capture:!0}),l.compositionStartEvent&&e.removeEventListener("compositionstart",l.compositionStartEvent),l.compositionEndEvent&&e.removeEventListener("compositionend",l.compositionEndEvent),l.keydownEvent=void 0,l.inputEvent=void 0,l.compositionStartEvent=void 0,l.compositionEndEvent=void 0}function hK(e){const l=["Tab","Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"];return e.ctrlKey||e.altKey||e.metaKey?!0:l.includes(e.key)}function pK(e,l,a){if(a.composing===!0||hK(e)||a.modifier!=null&&a.modifier!==""&&typeof x2[a.modifier]?.transform=="function")return;const n=lW(a),d=e.key;n.test(d)||e.preventDefault()}function WK(e){e.composing=!0}function GK(e,l,a){a.composing=!1,tW(e,l,a)}function sb(e,l){const a=lW(l);let n;if(l.modifier!=null&&l.modifier!==""){const c=x2[l.modifier]?.transform;n=c?c(e):e}else n=e;let d="";for(let c=0;c<n.length;c++){const i=n[c];a.test(i)&&(d+=i)}return d}function tW(e,l,a){if(a.reformatting===!0||a.composing===!0)return;const n=l.value,d=l.selectionEnd??n.length,c=n.slice(0,d),i=sb(n,a);if(i===n)return;const s=sb(c,a).length;a.reformatting=!0,l.value=i,l.setSelectionRange(s,s),a.reformatting=!1}var NK={beforeMount(e,l){const a=Ro(e);if(a===null)return;const n={modifier:db(l)};typeof l.value=="object"&&l.value!==null&&(n.pattern=l.value.pattern??/./,n.validateOnly=l.value.validateOnly===!0),Fc.set(e,n),cb(e,a,n)},updated(e,l){const a=Ro(e);if(a===null)return;const n=Fc.get(e);n!==void 0&&(ib(a,n),n.modifier=db(l),typeof l.value=="object"&&l.value!==null&&(n.pattern=l.value.pattern??/./,n.validateOnly=l.value.validateOnly===!0),cb(e,a,n))},unmounted(e){const l=Ro(e),a=Fc.get(e);l!==null&&a!==void 0&&ib(l,a),Fc.delete(e)},getSSRProps(){return{}}},aW=NK,YK=()=>typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;function LK(e){const l={y:"up",delay:0,once:!0,threshold:.12};return e?typeof e=="string"?{...l,y:e}:{...l,...e}:l}var So=new WeakMap,XK={mounted(e,l){const a=LK(l.value);if(YK())return;e.classList.add("bgl-reveal"),a.y!=="none"&&(e.dataset.revealDir=a.y),a.delay&&e.style.setProperty("--bgl-reveal-delay",`${a.delay}ms`);const n=new IntersectionObserver(d=>{for(const c of d)c.isIntersecting?(e.classList.add("bgl-reveal-in"),a.once&&n.unobserve(e)):a.once||e.classList.remove("bgl-reveal-in")},{threshold:a.threshold,rootMargin:"0px 0px -8% 0px"});n.observe(e),So.set(e,n)},unmounted(e){So.get(e)?.disconnect(),So.delete(e)},getSSRProps(){return{}}},nW=XK;function yK(e){let l=e.__rippleContainer;return(!l||!l.isConnected)&&(l=document.createElement("span"),Object.assign(l.style,{position:"absolute",inset:"0",overflow:"hidden",borderRadius:"inherit",pointerEvents:"none"}),e.appendChild(l),e.__rippleContainer=l),l}var MK={mounted(e,l){const a=n=>{const d=e.getBoundingClientRect(),c=Math.max(d.width,d.height),i=document.createElement("span");i.className="ripple",Object.assign(i.style,{width:`${c}px`,height:`${c}px`,left:`${n.clientX-d.left-c/2}px`,top:`${n.clientY-d.top-c/2}px`,position:"absolute",borderRadius:"50%",transform:"scale(0)",background:"rgba(0, 0, 0, 0.3)",pointerEvents:"none",animation:"rippleEffect 0.6s ease-out"}),yK(e).appendChild(i),setTimeout(()=>{i.remove()},600)};e.__rippleClickHandler=a,l.value!==!1&&(getComputedStyle(e).position==="static"&&(e.style.position="relative"),e.addEventListener("mousedown",a))},updated(e,l){const a=e.__rippleClickHandler;l.value===!1?e.removeEventListener("mousedown",a):(getComputedStyle(e).position==="static"&&(e.style.position="relative"),e.addEventListener("mousedown",a))},unmounted(e){const l=e.__rippleClickHandler;l&&(e.removeEventListener("mousedown",l),delete e.__rippleClickHandler)},getSSRProps(){return{}}},dW=MK,Ji=new WeakMap;function ob(e,l){const a=l.value||{},n=a2();let d=a.handle?e.querySelector(a.handle):e;const c=!d;d||(d=e.ownerDocument.createElement("div"),d.className=a.handle.replace(".","")+(a.handleClass?` ${a.handleClass}`:""),d.style.cssText="position:absolute;bottom:0;left:0;right:0;height:6px;background:rgba(0,0,0,0.1);",e.appendChild(d));const i=d,s={cursor:i.style.cursor,userSelect:i.style.userSelect,touchAction:i.style.touchAction},o=["role","tabindex","aria-orientation","aria-label","aria-valuenow","aria-valuemin","aria-valuemax"].map(r=>[r,i.getAttribute(r)]);i.style.cursor="ns-resize",i.style.userSelect="none",i.style.touchAction="none",i.setAttribute("role","separator"),i.setAttribute("tabindex","0"),i.setAttribute("aria-orientation","horizontal"),i.hasAttribute("aria-label")||i.setAttribute("aria-label","Resize height"),i.setAttribute("aria-valuemin",String(a.minHeight??0)),a.maxHeight!==void 0&&i.setAttribute("aria-valuemax",String(a.maxHeight)),i.setAttribute("aria-valuenow",String(e.offsetHeight));function m(r,b,h){const p={clientY:r,deltaY:r-b,initialHeight:h},N=h+p.deltaY,W=a.gridSize&&a.gridSize>0?Math.round(N/a.gridSize)*a.gridSize:N,G=Math.min(a.maxHeight??1/0,Math.max(a.minHeight??0,W));return e.style.height=`${G}px`,i.setAttribute("aria-valuenow",String(G)),a.onResize?.(p),p}function u(r){if(r.button!==0||r.isPrimary===!1)return;n.cancel();const b=r.clientY,h=e.offsetHeight,p=e.style.height,N=i.getAttribute("aria-valuenow");a.onStart?.(r),n.start(r,{cursor:"ns-resize",onMove:W=>m(W.clientY,b,h),onEnd(W){const G=m(W.clientY,b,h);a.onEnd?.(G)},onCancel(){e.style.height=p,N!==null&&i.setAttribute("aria-valuenow",N),a.onCancel?.()}})}function Z(r){if(!["ArrowUp","ArrowDown","Home","End"].includes(r.key)||r.key==="End"&&a.maxHeight===void 0)return;r.preventDefault(),n.cancel();const b=e.offsetHeight,h=(a.gridSize||10)*(r.shiftKey?5:1),p=r.key==="Home"?a.minHeight??0:r.key==="End"?a.maxHeight:b+(r.key==="ArrowUp"?-h:h);a.onStart?.(r);const N=m(p-b,0,b);a.onEnd?.(N)}i.addEventListener("pointerdown",u),i.addEventListener("keydown",Z),Ji.set(e,()=>{n.cancel(),i.removeEventListener("pointerdown",u),i.removeEventListener("keydown",Z),Object.assign(i.style,s);for(const[r,b]of o)b===null?i.removeAttribute(r):i.setAttribute(r,b);c&&i.remove(),Ji.delete(e)})}const VK={mounted:ob,unmounted(e){Ji.get(e)?.()},updated(e,l){l.value!==l.oldValue&&(Ji.get(e)?.(),ob(e,l))},getSSRProps(){return{}}};function Ci(e){return e==="richtext"?3:e==="textarea"||e==="json"||e==="radio"||e==="file"||e==="signature"?2:1}function z2(e){if(e.format)switch(e.format){case"email":return"email";case"tel":return"phone";case"uri":case"url":return"url";case"date":case"date-time":return"date"}if(e.enum)return"select";switch(e.type){case"number":case"integer":return"number";case"boolean":return"checkbox"}return"text"}function cW(e){if(!e?.properties)return[];const l=new Set(e.required??[]),a=[],n=Object.keys(e.properties),d=Array.isArray(e["x-property-order"])?e["x-property-order"].filter(i=>typeof i=="string"&&i in e.properties):[],c=[...new Set([...d,...n])];for(const i of c){const s=e.properties[i],o=s["x-field-type"]??z2(s),m={};s.minLength!==void 0&&(m.minLength=s.minLength),s.maxLength!==void 0&&(m.maxLength=s.maxLength),s.minimum!==void 0&&(m.min=s.minimum),s.maximum!==void 0&&(m.max=s.maximum),s.multipleOf!==void 0&&(m.step=s.multipleOf),s.pattern!==void 0&&(m.pattern=s.pattern),s["x-options"]?m.options=s["x-options"]:s.enum&&(m.options=s.enum.map(r=>({label:String(r),value:String(r)})));const u=s["x-ui"]?.class,Z={id:crypto.randomUUID(),key:i,type:o,label:s.title??i,placeholder:s["x-placeholder"],description:s.description,required:l.has(i)||void 0,colSpan:G2(u)??12,colStart:N2(u),rowStart:y2(u),rowSpan:X2(u)??Ci(o),mColSpan:Y2(u)??12,mColStart:L2(u),mRowStart:M2(u),mRowSpan:V2(u),class:T2(u)||void 0,hideLabel:s["x-hide-label"]??!1,condition:s["x-ui"]?.condition||void 0,hidden:s["x-ui"]?.hidden||o==="hidden"||void 0,richTextVariant:s["x-rich-text-variant"],richTextHeight:s["x-rich-text-height"],markdownShowFormatting:s["x-markdown-show-formatting"],textareaRows:s["x-textarea-rows"],textareaAutoHeight:s["x-textarea-autoheight"],numberLayout:s["x-number-layout"],numberSpinner:s["x-number-spinner"]??!0,phoneOnlyCountries:Array.isArray(s["x-phone-only-countries"])?s["x-phone-only-countries"].join(", "):s["x-phone-only-countries"],selectMultiselect:s["x-select-multiselect"],selectSearchable:s["x-select-searchable"],fileMultiple:s["x-file-multiple"],fileHeight:s["x-file-height"],fileAccept:s["x-file-accept"],fileTheme:s["x-file-theme"],fileShowIcon:s["x-file-show-icon"]===!1?!1:void 0,fileIcon:s["x-file-icon"],dateEnableTime:s["x-date-enable-time"],dateMin:s["x-date-min"],dateMax:s["x-date-max"],rangeMulti:s["x-range-multi"],radioThin:s["x-radio-thin"],radioHideRadio:s["x-radio-hide-radio"],radioHideLabelWhenImage:s["x-radio-hide-label-when-image"],radioAlign:s["x-ui"]?.radioAlign??s["x-radio-align"],radioInline:s["x-radio-inline"],radioSize:s["x-radio-size"],radioTextAlign:s["x-ui"]?.radioTextAlign??s["x-radio-text-align"]??"center",textIcon:s["x-text-icon"],textIconStart:s["x-text-icon-start"],validation:Object.keys(m).length>0?m:void 0,defaultValue:s.default,content:s["x-field-type"]==="heading"?s.title:void 0};a.push(Z)}return a}function TK(e,l={}){const a={},n=[];for(const c of e){const i={};if(c.type==="heading"||c.type==="divider")i.type="string",i.title=c.content||c.label,i["x-field-type"]=c.type;else{switch(c.type){case"text":case"textarea":case"richtext":case"markdown":case"email":case"phone":case"url":case"date":case"signature":case"color":case"hidden":i.type="string";break;case"file":c.fileMultiple===!0?(i.type="array",i.items={type:"string"}):i.type="string";break;case"number":case"range":i.type="number";break;case"checkbox":case"toggle":i.type="boolean";break;case"json":i.type="object";break;case"select":case"radio":i.type="string",c.validation?.options&&(i.enum=c.validation.options.map(m=>m.value));break}c.type==="email"&&(i.format="email"),c.type==="phone"&&(i.format="tel"),c.type==="url"&&(i.format="uri"),c.type==="date"&&(i.format=c.dateEnableTime?"date-time":"date"),c.type==="color"&&(i.format="color"),i.title=c.label,c.description&&(i.description=c.description),c.defaultValue!==void 0&&(i.default=c.defaultValue),c.type!=="text"&&(i["x-field-type"]=c.type),c.validation?.minLength!==void 0&&(i.minLength=c.validation.minLength),c.validation?.maxLength!==void 0&&(i.maxLength=c.validation.maxLength),c.validation?.min!==void 0&&(i.minimum=c.validation.min),c.validation?.max!==void 0&&(i.maximum=c.validation.max),c.validation?.step!==void 0&&(i.multipleOf=c.validation.step),c.validation?.pattern!==void 0&&(i.pattern=c.validation.pattern),c.required&&(n.push(c.key),c.type==="checkbox"&&(i.const=!0))}c.placeholder&&(i["x-placeholder"]=c.placeholder),c.validation?.options&&(i["x-options"]=c.validation.options);const s=c.rowSpan??Ci(c.type),o=A5(c.class,{colSpan:c.colSpan,colStart:c.colStart,rowStart:c.rowStart,rowSpan:l.freeGrid?s>1?s:void 0:s===Ci(c.type)?void 0:s,mColSpan:c.mColSpan,mColStart:c.mColStart,mRowStart:c.mRowStart,mRowSpan:c.mRowSpan});o&&(i["x-ui"]={...i["x-ui"],class:o}),c.condition&&(i["x-ui"]={...i["x-ui"],condition:c.condition}),c.hidden===!0&&(i["x-ui"]={...i["x-ui"],hidden:!0}),c.hideLabel===!0&&(i["x-hide-label"]=!0),c.richTextVariant&&(i["x-rich-text-variant"]=c.richTextVariant),c.richTextHeight!==void 0&&(i["x-rich-text-height"]=c.richTextHeight),c.markdownShowFormatting===!0&&(i["x-markdown-show-formatting"]=!0),c.textareaRows!==void 0&&(i["x-textarea-rows"]=c.textareaRows),c.textareaAutoHeight===!0&&(i["x-textarea-autoheight"]=!0),c.numberLayout&&c.numberLayout!=="default"&&(i["x-number-layout"]=c.numberLayout),c.numberSpinner===!1&&(i["x-number-spinner"]=!1),c.phoneOnlyCountries&&(i["x-phone-only-countries"]=c.phoneOnlyCountries),c.selectMultiselect===!0&&(i["x-select-multiselect"]=!0),c.selectSearchable===!0&&(i["x-select-searchable"]=!0),c.fileMultiple===!0&&(i["x-file-multiple"]=!0),c.fileHeight!==void 0&&(i["x-file-height"]=c.fileHeight),c.fileAccept&&(i["x-file-accept"]=c.fileAccept),c.fileTheme&&(i["x-file-theme"]=c.fileTheme),c.fileShowIcon===!1&&(i["x-file-show-icon"]=!1),c.fileIcon&&(i["x-file-icon"]=c.fileIcon),c.dateEnableTime===!0&&(i["x-date-enable-time"]=!0),c.dateMin&&(i["x-date-min"]=c.dateMin),c.dateMax&&(i["x-date-max"]=c.dateMax),c.rangeMulti===!0&&(i["x-range-multi"]=!0),c.radioThin===!0&&(i["x-radio-thin"]=!0),c.radioHideRadio===!0&&(i["x-radio-hide-radio"]=!0),c.radioHideLabelWhenImage===!0&&(i["x-radio-hide-label-when-image"]=!0),c.radioAlign&&(i["x-ui"]={...i["x-ui"],radioAlign:c.radioAlign}),c.radioInline===!0&&(i["x-radio-inline"]=!0),c.radioSize&&(i["x-radio-size"]=c.radioSize),c.radioTextAlign&&(i["x-ui"]={...i["x-ui"],radioTextAlign:c.radioTextAlign}),c.textIcon&&(i["x-text-icon"]=c.textIcon),c.textIconStart&&(i["x-text-icon-start"]=c.textIconStart),a[c.key]=i}const d={$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:a};return n.length>0&&(d.required=n),d}function eu(e,l){if(typeof l!="string")return l;const a=l.trim();switch(e.type){case"checkbox":case"toggle":return a.toLowerCase()==="true"?!0:a.toLowerCase()==="false"?!1:l;case"number":case"range":{if(!a)return l;const n=Number(a);return Number.isNaN(n)?l:n}default:return l}}function IK(e,l){const a={};for(const n of e)if(!(n.type==="heading"||n.type==="divider")){if(l&&n.key in l){a[n.key]=eu(n,l[n.key]);continue}if(n.defaultValue!==void 0){a[n.key]=eu(n,n.defaultValue);continue}switch(n.type){case"checkbox":case"toggle":a[n.key]=!1;break;case"number":case"range":a[n.key]=n.validation?.min??0;break;default:a[n.key]=""}}return a}function xK(e,l){const a={};for(const n of e){if(n.type==="heading"||n.type==="divider"||n.type==="hidden"||n.hidden===!0)continue;const d=l[n.key];if(n.required&&(d==null||d==="")){a[n.key]=`${n.label} is required`;continue}if(d==null||d==="")continue;const c=n.validation;if(typeof d=="string"){if(c?.minLength!==void 0&&d.length<c.minLength){a[n.key]=`${n.label} must be at least ${c.minLength} characters`;continue}if(c?.maxLength!==void 0&&d.length>c.maxLength){a[n.key]=`${n.label} must be at most ${c.maxLength} characters`;continue}if(c?.pattern&&!new RegExp(c.pattern).test(d)){a[n.key]=`${n.label} format is invalid`;continue}}if(typeof d=="number"){if(c?.min!==void 0&&d<c.min){a[n.key]=`${n.label} must be at least ${c.min}`;continue}if(c?.max!==void 0&&d>c.max){a[n.key]=`${n.label} must be at most ${c.max}`;continue}}}return a}function zK(e){return{fields:(0,t.computed)(()=>cW(e.value))}}const gK=!0;var Ee=class{_type;_config;_condition;_hidden;_validations;_onUpdate;_class;_slots;_component;constructor(e,l={}){this._type=e,this._config=l}if(e){return this._condition=e,this}hidden(e=!0){return this._hidden=e,this}validate(e){return this._validations||(this._validations=[]),this._validations.push(e),this}onUpdate(e){return this._onUpdate=e,this}class(e){return this._class=this._class?`${this._class} ${e}`:e,this}required(e){return this._config.required=!0,e&&(this._config.requiredMessage=e),this}slot(e,l,a){return this._slots||(this._slots=[]),typeof e!="string"||l!==void 0&&typeof l!="string"?this._slots.push({component:e,props:l}):this._slots.push({name:e,component:l,props:a}),this}};function al(e,l){return typeof e=="string"?{...l,label:e}:e??{}}const nl={text(e,l){return new Ee("text",al(e,l))},email(e,l){return new Ee("email",al(e,l))},password(e,l){return new Ee("password",al(e,l))},number(e,l){return new Ee("number",al(e,l))},tel(e,l){return new Ee("tel",al(e,l))},url(e,l){return new Ee("url",al(e,l))},date(e,l){return new Ee("date",al(e,l))},time(e,l){return new Ee("time",al(e,l))},datetime(e,l){return new Ee("datetime",al(e,l))},textarea(e,l){return new Ee("textarea",al(e,l))},richtext(e,l){return new Ee("richtext",al(e,l))},json(e,l){const a=al(e,l);return a.language||(a.language="json"),new Ee("json",a)},checkbox(e,l){return new Ee("checkbox",al(e,l))},toggle(e,l){return new Ee("toggle",al(e,l))},radio(e,l,a){if(typeof e=="string"){const n=e,d=l;return new Ee("radio",{...a,label:n,options:d})}return new Ee("radio",{...al(l,a),options:e})},select(e,l,a){if(typeof e=="string"){const n=e,d=l;return new Ee("select",{...a,label:n,options:d})}return new Ee("select",{...al(l,a),options:e})},multiselect(e,l,a){if(typeof e=="string"){const n=e,d=l;return new Ee("multiselect",{...a,label:n,options:d,multiple:!0})}return new Ee("multiselect",{...al(l,a),options:e})},color(e,l){return new Ee("color",al(e,l))},icon(e,l){return new Ee("icon",al(e,l))},range(e,l){return new Ee("range",al(e,l))},custom(e,l,a){return Yt(e)||Is(e),new Ee(e,al(l,a))},upload(e,l){return new Ee("upload",al(e,l))},array(e,l,a){if(typeof e=="string"){const d=e,c=l;return new Ee("array",{...a??{},label:d,schema:c})}const n=e;return new Ee("array",{...al(l,a),schema:n})},component(e,l={}){const a=new Ee("component",l);return a._component={component:e,props:l},a},display(e,l={}){const a=new Ee("display",l);return a._component={component:e,props:l},a}};var lu=class iW{_isSchema=!0;_label;_fields;_condition;_class;constructor(l,a){this._fields=l,this._label=a}if(l){return this._condition=l,this}class(l){return this._class=this._class?`${this._class} ${l}`:l,this}defaults(l){for(const[a,n]of Object.entries(l))this._fields[a]&&this._fields[a]._config.default===void 0&&(this._fields[a]._config.default=n);return this}getDefaults(){const l={};for(const[a,n]of Object.entries(this._fields))n._config.default!==void 0&&(l[a]=n._config.default);return l}toJSONSchema(){const l={},a=[];for(const[c,i]of Object.entries(this._fields)){const s=i._config,o=Yt(i._type),m=o?.jsonSchema?.type??iW.getJSONSchemaType(i._type),u={type:m};if(s.label&&(u.title=s.label),s.helpText&&(u.description=s.helpText),s.default!==void 0&&(u.default=s.default),s.options){const b=s.options,h=b.map(p=>Ya(p)??p);i._type==="multiselect"?u.items={type:"string",enum:h}:u.enum=h,(i._type==="select"||i._type==="multiselect"||i._type==="radio")&&b.every(p=>p&&typeof p=="object"&&"label"in p&&"value"in p)&&(u["x-options"]=b)}s.min!==void 0&&(u[m==="string"?"minLength":"minimum"]=s.min),s.max!==void 0&&(u[m==="string"?"maxLength":"maximum"]=s.max),i._type==="email"&&(u.format="email"),i._type==="url"&&(u.format="uri"),i._type==="date"&&(u.format="date"),i._type==="time"&&(u.format="time"),i._type==="datetime"&&(u.format="date-time");const Z={};if(i._type!=="text"&&(Z.fieldType=i._type),o){u["x-field-type"]=i._type;const b=o.translatableSettings?.map(h=>h.key);b?.length&&(u["x-translatable-settings"]=b)}s.placeholder&&(Z.placeholder=s.placeholder),s.disabled&&(Z.disabled=s.disabled),s.readonly&&(Z.readonly=s.readonly),s.autoheight&&(Z.autoheight=s.autoheight),s.rows&&(Z.rows=s.rows),s.cols&&(Z.cols=s.cols),(i._type==="select"||i._type==="multiselect")&&s.searchable!==void 0&&(u["x-select-searchable"]=s.searchable),i._class&&(Z.class=i._class),i._condition&&(Z.condition=i._condition),i._hidden&&(Z.hidden=!0),i._type==="array"&&(s.allowAdd!==void 0&&(Z.allowAdd=s.allowAdd),s.allowDelete!==void 0&&(Z.allowDelete=s.allowDelete),s.schema&&typeof s.schema.toJSONSchema=="function"&&(u.items=s.schema.toJSONSchema())),i._component&&(Z.component=typeof i._component.component=="string"?i._component.component:i._component.component.name||"CustomComponent",i._component.props&&(Z.componentProps=i._component.props)),Object.keys(Z).length>0&&(u["x-ui"]=Z);const r=o?.jsonSchema?.serialize?.(s,{key:c,required:s.required===!0});r&&Object.assign(u,r),l[c]=u,s.required===!0&&a.push(c)}const n={type:"object",properties:l};a.length>0&&(n.required=a),this._label&&(n.title=this._label);const d={};return this._condition&&(d.condition=this._condition),this._class&&(d.class=this._class),Object.keys(d).length>0&&(n["x-ui"]=d),n}static getJSONSchemaType(l){return{text:"string",email:"string",password:"string",number:"number",tel:"string",url:"string",date:"string",time:"string",datetime:"string",textarea:"string",richtext:"string",json:"object",checkbox:"boolean",toggle:"boolean",radio:"string",select:"string",multiselect:"array",array:"array"}[l]||"string"}};function wK(e,l){if(typeof e=="string"){if(!l)throw new Error("Fields are required when providing a label");return new lu(l,e)}return new lu(e)}function RK(e){return e}function SK(e){return async(l,a)=>{if(!l.endpoint.startsWith("/")||l.endpoint.startsWith("//"))throw new Error("Form option endpoints must be same-origin paths");const n={};return l.searchParam&&a&&(n[l.searchParam]=a),l.limitParam&&l.limit!=null&&(n[l.limitParam]=l.limit),(await e.get(l.endpoint,{params:n})).data}}function kc(e,l){return l?l.split(".").reduce((a,n)=>{if(!(a==null||typeof a!="object"))return a[n]},e):e}function mb(e,l){const a=kc(e,l.itemsPath);return Array.isArray(a)?a.flatMap(n=>{const d=kc(n,l.valuePath??"id"),c=kc(n,l.labelPath??"name");if(d==null||c==null)return[];const i=l.subtitlePath?kc(n,l.subtitlePath):void 0;return[{label:String(c),value:String(d),...i==null?{}:{subtitle:String(i)}}]}):[]}function Di(e,l){const a={},n=new Set(e.required||[]);if(e.properties){const c=Object.keys(e.properties),i=Array.isArray(e["x-property-order"])?e["x-property-order"].filter(s=>typeof s=="string"&&s in e.properties):[];for(const s of new Set([...i,...c])){const o=e.properties[s];a[s]=FK(s,o,n.has(s),e,l?.loadOptionsSource)}}const d=new lu(a,e.title);return e["x-ui"]?.condition&&d.if(e["x-ui"].condition),e["x-ui"]?.class&&d.class(e["x-ui"].class),d}function vK(e,l){const a=e.match(/^#\/(\$defs|definitions)\/(.+)$/);if(!a)return;const[,n,d]=a,c=n==="$defs"?l.$defs:l.definitions;return d?c?.[d]:void 0}function fK(e,l){const a=e.anyOf||e.oneOf;if(!a||a.length===0)return e;const n=a.filter(i=>i.type!=="null");if(n.length===1){const i=n[0];return{...i,...e,type:e.type??i.type,title:e.title||i.title,description:e.description||i.description,default:e.default!==void 0?e.default:i.default,"x-ui":{...i["x-ui"],...e["x-ui"]}}}const d=["object","array","string","number","integer","boolean"],c=n.sort((i,s)=>d.indexOf(i.type||"string")-d.indexOf(s.type||"string"))[0];return{...c,...e,type:e.type??c.type,title:e.title||c.title,description:e.description||c.description,default:e.default!==void 0?e.default:c.default,"x-ui":{...c["x-ui"],...e["x-ui"]}}}function FK(e,l,a,n,d){let c=l;if(l.$ref){const b=vK(l.$ref,n);b&&(c={...b,type:l.type??b.type,enum:l.enum??b.enum,title:l.title??b.title,description:l.description??b.description,default:l.default!==void 0?l.default:b.default,"x-ui":{...b["x-ui"],...l["x-ui"]}})}(c.anyOf||c.oneOf)&&(c=fK(c,n));const i=c["x-ui"]||{};let s=i.fieldType||c["x-field-type"]||ub(c);s==="select"&&c["x-select-multiselect"]&&(s="multiselect");const o=c["x-options"],m={},u=Yt(s);c.title&&(m.label=c.title),c.description&&(m.helpText=c.description),c.default!==void 0&&(m.default=c.default),(a||i.required===!0)&&(m.required=!0),i.placeholder&&(m.placeholder=i.placeholder),c["x-placeholder"]&&(m.placeholder=c["x-placeholder"]),kK(m,c),u?.settingsDefaults&&Object.assign(m,u.settingsDefaults);const Z=u?.jsonSchema?.parse?.(c,{key:e,required:a||i.required===!0});if(Z&&Object.assign(m,Z),c["x-options-source"]){if(!d)throw new Error(`Field "${e}" requires an x-options-source loader`);const b=c["x-options-source"];let h;m.options=async p=>{const N=b.searchParam?mb(await d(b,p),b):h??=mb(await d(b,b.searchParam?p:""),b);if(b.searchParam||!p.trim())return N;const W=p.trim().toLocaleLowerCase();return N.filter(G=>[G.label,G.subtitle,G.value].some(Y=>Y?.toLocaleLowerCase().includes(W)))},c["x-select-searchable"]===void 0&&(m.searchable=!0)}i.radioAlign!==void 0&&(m.align=i.radioAlign),i.radioTextAlign!==void 0&&(m.textAlign=i.radioTextAlign),i.disabled&&(m.disabled=i.disabled),i.readonly&&(m.readonly=i.readonly),i.autoheight&&(m.autoheight=i.autoheight),i.rows&&(m.rows=i.rows),i.cols&&(m.cols=i.cols),c.minimum!==void 0&&(m.min=c.minimum),c.maximum!==void 0&&(m.max=c.maximum),c.minLength!==void 0&&(m.min=c.minLength),c.maxLength!==void 0&&(m.max=c.maxLength),c.pattern!==void 0&&(m.pattern=c.pattern);let r;switch(s){case"heading":r=new Ee("heading",m);break;case"divider":r=new Ee("divider",m);break;case"email":r=nl.email(m);break;case"password":r=nl.password(m);break;case"number":r=nl.number(m);break;case"tel":case"phone":r=nl.tel(m);break;case"url":r=nl.url(m);break;case"date":r=nl.date(m);break;case"time":r=nl.time(m);break;case"datetime":r=nl.datetime(m);break;case"textarea":r=nl.textarea(m);break;case"richtext":r=nl.richtext(m);break;case"json":r=nl.json(m);break;case"checkbox":r=nl.checkbox(m);break;case"toggle":r=nl.toggle(m);break;case"radio":r=nl.radio(o??c.enum??[],m);break;case"select":r=nl.select(m.options??o??c.enum??[],m);break;case"multiselect":r=nl.multiselect(m.options??o??c.enum??[],m);break;case"icon":r=nl.icon(m);break;case"file":case"upload":r=nl.upload(m);break;case"array":{const b={...m};i.allowAdd!==void 0&&(b.allowAdd=i.allowAdd),i.allowDelete!==void 0&&(b.allowDelete=i.allowDelete);const h=c.items?.type==="object"?Di(c.items,{loadOptionsSource:d}):void 0;c.items?.type&&(b.itemType=ub(c.items)),r=nl.array(c.title||e,h,b);break}case"display":r=nl.display(i.component||"div",i.componentProps||{});break;case"component":r=nl.component(i.component||"div",i.componentProps||{});break;default:u?r=new Ee(s,m):Ts(s)?(Is(s),m.missingCustomRegistration=!0,r=new Ee(s,m)):r=nl.text(m);break}if(i.component&&s!=="component"&&s!=="display"&&(r._component={component:i.component,props:i.componentProps||{}}),c.const!==void 0&&r.validate(b=>b===c.const?!0:m.requiredMessage||"form.required"),c.pattern){const b=new RegExp(c.pattern);r.validate(h=>h==null||h===""||b.test(String(h))?!0:"form.pattern")}return i.class&&r.class(i.class),i.condition&&r.if(i.condition),i.hidden&&r.hidden(),r}function kK(e,l){const a=l,n=(i,s)=>{a[s]!==void 0&&(e[i]=a[s])};a["x-radio-inline"]&&(e.inline=!0),a["x-radio-thin"]&&(e.thin=!0),a["x-radio-hide-radio"]&&(e.hideRadio=!0),a["x-radio-hide-label-when-image"]&&(e.hideLabelWhenImage=!0),n("align","x-radio-align"),n("textAlign","x-radio-text-align"),a["x-select-multiselect"]&&(e.multiple=!0),n("searchable","x-select-searchable"),n("rows","x-textarea-rows"),n("autoheight","x-textarea-autoheight"),n("layout","x-number-layout"),a["x-number-spinner"]===!1&&(e.spinner=!1),typeof a["x-phone-only-countries"]=="string"?e.onlyCountries=a["x-phone-only-countries"].split(",").map(i=>i.trim()).filter(Boolean):Array.isArray(a["x-phone-only-countries"])&&(e.onlyCountries=a["x-phone-only-countries"]),n("defaultCountry","x-phone-default-country"),a["x-range-multi"]&&(e.multiRange=!0),a["x-file-multiple"]&&(e.multiple=!0);const d=a["x-file-height"];d!==void 0&&(e.height=typeof d=="number"?`${d}px`:d),n("accept","x-file-accept"),n("theme","x-file-theme"),a["x-file-show-icon"]===!1&&(e.showIcon=!1),n("icon","x-file-icon"),a["x-date-enable-time"]&&(e.enableTime=!0),n("min","x-date-min"),n("max","x-date-max"),n("icon","x-text-icon"),n("iconStart","x-text-icon-start");const c=a["x-rich-text-variant"];c==="basic"?e.basic=!0:c==="simple"&&(e.simple=!0),n("height","x-rich-text-height"),a["x-markdown-show-formatting"]&&(e.showFormatting=!0),a["x-hide-label"]===!0&&(e.hideLabel=!0)}function ub(e){if(e.format)switch(e.format){case"email":return"email";case"uri":return"url";case"date":return"date";case"time":return"time";case"date-time":return"datetime"}if(e.enum)return"select";switch(e.type){case"boolean":return"checkbox";case"number":case"integer":return"number";case"array":return"array";case"object":return"json";default:return"text"}}var jK={class:"multi-step-form"},JK={class:"step-progress"},CK=["onClick"],DK={class:"step-number"},UK={class:"step-label"},OK={key:0},EK={key:0,class:"step-title"},BK={key:1,class:"validation-errors"},KK={class:"step-navigation"},HK=["disabled"],PK={class:"step-counter"},QK=(0,t.defineComponent)({__name:"MultiStepForm",props:{schema:{},modelValue:{},currentStep:{},components:{},validateOnNext:{type:Boolean,default:!0}},emits:["update:modelValue","update:currentStep","stepChange","complete","validationError"],setup(e,{expose:l,emit:a}){const n=e,d=a,{$t:c}=tl(),i=(0,t.useSlots)(),s=(0,t.computed)(()=>Object.keys(i)),o=(0,t.ref)({...n.modelValue||{}}),m=(0,t.ref)(n.currentStep!=null&&n.currentStep!==""?n.currentStep:Object.keys(n.schema)[0]);let u=!1;(0,t.watch)(()=>n.modelValue,f=>{u||(o.value={...f||{}})},{deep:!0}),(0,t.watch)(o,f=>{u=!0,d("update:modelValue",f),setTimeout(()=>{u=!1},0)},{deep:!0}),(0,t.watch)(()=>n.currentStep,f=>{f!=null&&(m.value=f)}),(0,t.watch)(m,f=>{d("update:currentStep",f),d("stepChange",f)});function Z(f,k){const D=k.split(".");let Q=f;for(const K of D)Q=Q?.[K];return Q}function r(f,k){if(!f)return!0;try{const D=fd(f);if(D.length===0)return!0;let Q=!0,K=null;for(let E=0;E<D.length;E++){const te=D[E],ee=Z(k,te.field),{op:v,value:B,connector:O}=te;let w=!1;switch(v){case"eq":w=ee===B;break;case"ne":w=ee!==B;break;case"gt":w=B!=null&&ee>B;break;case"ge":w=B!=null&&ee>=B;break;case"lt":w=B!=null&&ee<B;break;case"le":w=B!=null&&ee<=B;break;case"co":w=B!=null&&String(ee).includes(String(B));break;case"sw":w=B!=null&&String(ee).startsWith(String(B));break;case"ew":w=B!=null&&String(ee).endsWith(String(B));break;case"pr":w=ee!=null;break;default:w=!1}E===0?(Q=w,K=w):(O==="or"?Q=(K??!1)||w:O==="and"&&(Q=(K??!1)&&w),K=Q)}return Q}catch{return!0}}function b(f){return f._condition==null?!0:r(f._condition,o.value)}const h=(0,t.computed)(()=>Object.entries(n.schema).filter(([,f])=>b(f)).map(([f,k])=>({key:f,schema:k}))),p=(0,t.computed)(()=>h.value.findIndex(f=>f.key===m.value)),N=(0,t.computed)(()=>p.value===0),W=(0,t.computed)(()=>p.value===h.value.length-1),G=(0,t.computed)(()=>h.value[p.value]?.schema),Y=(0,t.ref)({});function L(f){return f._hidden?!1:f._condition==null?!0:r(f._condition,o.value)}function X(f){const k=f.replace(/\[(\d+)\]/g,".$1");return Z(o.value,k)}function I(f){return!!(f==null||typeof f=="string"&&f.trim()===""||Array.isArray(f)&&f.length===0)}function V(){if(!n.validateOnNext||G.value==null)return!0;const f={},k=G.value._fields;for(const[D,Q]of Object.entries(k)){if(Q._type==="display"||!L(Q))continue;const K=X(D),E=Q._config;if(E.required===!0&&I(K)){f[D]=`${typeof E.label=="string"?E.label:D} is required`;continue}if(Q._validations&&!I(K))for(const te of Q._validations){const ee=te(K);if(ee!==!0){f[D]=ee;break}}}return Y.value=f,Object.keys(f).length>0?(d("validationError",f),!1):!0}function M(f,k){return k._label!=null?k._label:f.split(/[._-]/).map(D=>D.charAt(0).toUpperCase()+D.slice(1)).join(" ")}function z(f){const k=h.value.findIndex(D=>D.key===f);if(k!==-1){if(k<p.value){m.value=f,Y.value={};return}k>p.value&&!V()||(m.value=f)}}function T(){if(V())if(W.value)d("complete");else{const f=p.value+1;m.value=h.value[f].key,Y.value={}}}function F(){if(!N.value){const f=p.value-1;m.value=h.value[f].key,Y.value={}}}return l({validateCurrentStep:V,stepErrors:Y,nextStep:T,prevStep:F,goToStep:z,visibleSteps:h,activeStep:m,currentStepIndex:p,isFirstStep:N,isLastStep:W}),(f,k)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",jK,[(0,t.createElementVNode)("div",JK,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(h.value,(D,Q)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:D.key,class:(0,t.normalizeClass)(["step-indicator",{active:D.key===m.value,completed:Q<p.value}]),onClick:K=>z(D.key)},[(0,t.createElementVNode)("div",DK,(0,t.toDisplayString)(Q+1),1),(0,t.createElementVNode)("div",UK,(0,t.toDisplayString)(M(D.key,D.schema)),1)],10,CK))),128))]),G.value!=null?((0,t.openBlock)(),(0,t.createElementBlock)("div",OK,[G.value._label?((0,t.openBlock)(),(0,t.createElementBlock)("h2",EK,(0,t.toDisplayString)(G.value._label),1)):(0,t.createCommentVNode)("",!0),Object.keys(Y.value).length>0?((0,t.openBlock)(),(0,t.createElementBlock)("div",BK,[(0,t.createElementVNode)("ul",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(Y.value,(D,Q)=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:Q},(0,t.toDisplayString)(D),1))),128))])])):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(f.$slots,`step:${m.value}`,{schema:G.value,formData:o.value,stepKey:m.value,errors:Y.value},()=>[(0,t.createVNode)(zs,{modelValue:o.value,"onUpdate:modelValue":k[0]||(k[0]=D=>o.value=D),schema:G.value,components:e.components,errors:Y.value},(0,t.createSlots)({_:2},[(0,t.renderList)(s.value,D=>({name:D,fn:(0,t.withCtx)(Q=>[(0,t.renderSlot)(f.$slots,D,(0,t.normalizeProps)((0,t.guardReactiveProps)(Q)),void 0,!0)])}))]),1032,["modelValue","schema","components","errors"])],!0)])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",KK,[(0,t.createElementVNode)("button",{type:"button",class:"btn-secondary",disabled:N.value,onClick:F},(0,t.toDisplayString)((0,t.unref)(c)("multiStep.previous")),9,HK),(0,t.createElementVNode)("div",PK,(0,t.toDisplayString)((0,t.unref)(c)("multiStep.step",{current:p.value+1,total:h.value.length})),1),(0,t.createElementVNode)("button",{type:"button",class:"btn-primary",onClick:T},(0,t.toDisplayString)(W.value?(0,t.unref)(c)("multiStep.complete"):(0,t.unref)(c)("multiStep.next")),1)])]))}}),AK=Le(QK,[["__scopeId","data-v-7a55f4bb"]]);function _K(){return{steps:[],transitions:[]}}function $K(e){return!!e&&e.steps.length>1}function Ga(e,l){if(l!=null)return e.steps.find(a=>a.key===l)}function sW(e,l){return e.transitions.filter(a=>a.from===l)}function qK(e){const l=e.schema?.properties;return l&&typeof l=="object"?Object.entries(l):[]}function oW(e){return e?.autoAdvance===!0}function mW(e){if(!e)return null;const l=qK(e);return l.length===1?l[0][0]:null}function Ui(e){return e.startId&&Ga(e,e.startId)?e.startId:e.steps[0]?.key}function Od(e,l,a){for(const n of sW(e,l))if(!n.condition||n.condition.trim()===""||fu(n.condition,a))return n.to;return null}function eH(e,l,a){return Od(e,l,a)===null}function tu(e,l,a){const n=Ui(e);if(!n||!l)return 0;const d=new Set;let c=n,i=0,s=0,o=!1;for(;c&&!d.has(c);)d.add(c),s++,o||(c===l?o=!0:i++),c=Od(e,c,a);return s<=1?o?100:0:Math.round(i/(s-1)*100)}function lH(e){const l={},a=[];for(const d of e.steps){const c=d.schema?.properties;c&&typeof c=="object"&&Object.assign(l,c);const i=d.schema?.required;if(Array.isArray(i))for(const s of i)a.includes(s)||a.push(s)}const n={type:"object",properties:l};return a.length&&(n.required=a),n}var tH={key:0,class:"ffp-stages","aria-label":"Form stages"},aH={class:"ffp-stage-list p-0 m-0"},nH={class:"ffp-stage-progress"},dH={class:"ffp-stage"},cH={key:0,class:"ffp-title"},iH={key:1,class:"ffp-empty"},sH={class:"ffp-nav flex flex-center gap-1"},oH={key:0,class:"ffp-counter flex-center round bg-primary-10 color-primary px-075 txt13 medium tabular-nums"},mH=(0,t.defineComponent)({__name:"FormFlowPlayer",props:{structure:{},modelValue:{},components:{},initialStepKey:{},formName:{default:""},animated:{type:Boolean,default:!0},autoAdvance:{type:Boolean,default:!0},autoAdvanceDelay:{default:200},redirect:{type:Boolean,default:!0},hideTitle:{type:Boolean,default:!1},hideCounter:{type:Boolean,default:!1},showStages:{type:Boolean,default:!1},onComplete:{},beforePrimary:{},loadOptionsSource:{}},emits:["update:modelValue","stepChange","progress","stepEnter","stepComplete","formComplete","redirect","complete"],setup(e,{expose:l,emit:a}){const n=e,d=a,{$t:c}=tl(),i=(0,t.useSlots)(),s=(0,t.computed)(()=>Object.keys(i).filter(y=>y!=="nav"&&y!=="primary-label"&&y!=="step"&&y!=="empty")),o=(0,t.ref)("next"),m=(0,t.computed)(()=>n.animated?o.value==="prev"?"ffp-slide-prev":"ffp-slide-next":""),u=(0,t.ref)({...n.modelValue||{}});(0,t.watch)(u,y=>d("update:modelValue",y),{deep:!0}),(0,t.watch)(()=>n.modelValue,y=>{y&&y!==u.value&&(u.value={...y})},{deep:!0});function Z(){const y=n.initialStepKey;return y&&Ga(n.structure,y)?y:Ui(n.structure)}const r=(0,t.ref)(Z()),b=(0,t.ref)([]),h=(0,t.ref)(new Set);(0,t.watch)(()=>n.structure,()=>{r.value=Z(),b.value=[],h.value=new Set},{deep:!0}),(0,t.watch)(()=>n.initialStepKey,y=>{!y||y===r.value||!Ga(n.structure,y)||(r.value=y,b.value=[],h.value=new Set)}),(0,t.watch)(r,y=>{y&&d("stepChange",y)},{immediate:!0});const p=(0,t.computed)(()=>Ga(n.structure,r.value??null));function N(y){const R=Ga(n.structure,y),g=tu(n.structure,y,u.value),le=b.value.length+1,J=g>0?Math.round(le/g*100):null;return{formName:n.formName,stepKey:y,stepTitle:R?.title??"",stepIndex:le,totalSteps:J,skipSubmit:R?.skipSubmit??!1,formData:{...u.value}}}(0,t.watch)(r,(y,R)=>{y&&y!==R&&d("stepEnter",N(y))},{immediate:!0});const W=(0,t.computed)(()=>{const y=p.value;return y?Di(y.schema,{loadOptionsSource:n.loadOptionsSource}):null}),G=(0,t.computed)(()=>Object.assign({},...n.structure.steps.map(y=>Di(y.schema,{loadOptionsSource:n.loadOptionsSource})._fields))),Y=(0,t.computed)(()=>r.value?Od(n.structure,r.value,u.value):null),L=(0,t.computed)(()=>Y.value===null),X=(0,t.computed)(()=>b.value.length>0),I=(0,t.computed)(()=>tu(n.structure,r.value,u.value));(0,t.watch)(I,y=>d("progress",y),{immediate:!0});const V=(0,t.computed)(()=>{const y=[],R=new Set;let g=Ui(n.structure);for(;g&&!R.has(g);){R.add(g);const le=Ga(n.structure,g);if(!le)break;y.push(le),g=Od(n.structure,g,u.value)??void 0}return y}),M=(0,t.computed)(()=>V.value.findIndex(y=>y.key===r.value));(0,t.watch)([V,M],([y,R])=>{R<=0||(b.value.length===0&&(b.value=y.slice(0,R).map(g=>g.key)),h.value=new Set([...h.value,...y.slice(0,R).map(g=>g.key)]))},{immediate:!0});const z=(0,t.ref)(null),T=(0,t.ref)(!1);function F(y){z.value=y}function f(){return z.value?.validate()??!0}async function k(){if(T.value||!f())return;const y=p.value;T.value=!0;let R=!1;try{if(await n.beforePrimary?.({data:{...u.value},currentStep:y,isTerminal:L.value})===!1)return;if(L.value){const le=W2(G.value,u.value);y?.skipSubmit||await n.onComplete?.(le),r.value&&d("formComplete",N(r.value));const J=y?.redirectUrl?.trim();J&&(R=!0,d("redirect",J),n.redirect&&typeof window<"u"&&window.location.assign(J)),d("complete",{...u.value});return}const g=Y.value;if(g&&r.value){h.value=new Set([...h.value,r.value]);const le=Ga(n.structure,g);d("stepComplete",{...N(r.value),destinationStepKey:g,destinationStepTitle:le?.title??""}),o.value="next",b.value.push(r.value),r.value=g}}finally{R||(T.value=!1)}}const D=(0,t.computed)(()=>n.autoAdvance&&oW(p.value)),Q=(0,t.computed)(()=>mW(p.value));let K=null;const E=(0,t.ref)(null);function te(){K&&(clearTimeout(K),K=null)}const ee=(0,t.ref)(Q.value?u.value[Q.value]:void 0);(0,t.watch)(r,()=>{te(),E.value=null,ee.value=Q.value?u.value[Q.value]:void 0},{flush:"sync"}),(0,t.watch)(()=>Q.value?u.value[Q.value]:void 0,y=>{D.value&&E.value!==r.value&&(!(y!=null&&y!=="")||y===ee.value||(te(),K=setTimeout(()=>{D.value&&(E.value=r.value??null,k())},n.autoAdvanceDelay)))});function v(){const y=b.value.pop();y&&(o.value="prev",r.value=y)}function B(y){return y===r.value||h.value.has(y)?!0:y===Y.value}async function O(y){if(y===r.value||!B(y))return;const R=V.value.findIndex(le=>le.key===y),g=M.value;if(!(R<0||g<0)){if(y===Y.value){await k();return}o.value=R<g?"prev":"next",b.value=V.value.slice(0,R).map(le=>le.key),r.value=y}}const w=(0,t.computed)(()=>b.value.length+1);return l({formData:u,currentKey:r,nextKey:Y,isTerminal:L,progress:I,completedKeys:h,validateStep:f}),(y,R)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["form-flow-player",{"form-flow-player--stages":e.showStages}])},[e.showStages?((0,t.openBlock)(),(0,t.createElementBlock)("nav",tH,[(0,t.createElementVNode)("ol",aH,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(V.value,(g,le)=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:g.key},[(0,t.createVNode)(Gt,{rounded:"",color:"purple",title:g.title,active:r.value===g.key,disabled:!B(g.key),"aria-current":r.value===g.key?"step":void 0,onClick:J=>O(g.key)},{media:(0,t.withCtx)(()=>[(0,t.createElementVNode)("span",{class:(0,t.normalizeClass)(["ffp-stage-number flex-center round border",r.value===g.key?"bg-primary color-white border-transparent":h.value.has(g.key)?"bg-green color-white border-green":"color-gray"])},[h.value.has(g.key)&&r.value!==g.key?((0,t.openBlock)(),(0,t.createBlock)(Ne,{key:0,icon:"check",size:.9})):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createTextVNode)((0,t.toDisplayString)(le+1),1)],64))],2)]),_:2},1032,["title","active","disabled","aria-current","onClick"])]))),128))]),(0,t.createElementVNode)("div",nH,[(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(p.value?.title),1),(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(M.value+1)+" / "+(0,t.toDisplayString)(V.value.length),1),(0,t.createVNode)(Pp,{class:"w-100p mt-05",value:I.value,size:8},null,8,["value"])])])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",dH,[(0,t.createVNode)(t.Transition,{name:m.value,mode:"out-in"},{default:(0,t.withCtx)(()=>[p.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:r.value,class:"ffp-step"},[!e.hideTitle&&p.value.title?((0,t.openBlock)(),(0,t.createElementBlock)("h2",cH,(0,t.toDisplayString)(p.value.title),1)):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(y.$slots,"step",{step:p.value,formData:u.value,stepKey:r.value,schema:W.value,setFormRef:F},()=>[W.value?((0,t.openBlock)(),(0,t.createBlock)(zs,{key:0,ref_key:"formRef",ref:z,modelValue:u.value,"onUpdate:modelValue":R[0]||(R[0]=g=>u.value=g),schema:W.value,components:e.components},(0,t.createSlots)({_:2},[(0,t.renderList)(s.value,g=>({name:g,fn:(0,t.withCtx)(le=>[(0,t.renderSlot)(y.$slots,g,(0,t.normalizeProps)((0,t.guardReactiveProps)(le)),void 0,!0)])}))]),1032,["modelValue","schema","components"])):(0,t.createCommentVNode)("",!0)],!0)])):((0,t.openBlock)(),(0,t.createElementBlock)("div",iH,[(0,t.renderSlot)(y.$slots,"empty",{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(c)?.("multiStep.empty")??"No steps to display."),1)],!0)]))]),_:3},8,["name"])]),(0,t.renderSlot)(y.$slots,"nav",{canGoBack:X.value,isTerminal:L.value,submitting:T.value,goBack:v,goPrimary:k,stepPosition:w.value,progress:I.value,currentKey:r.value,primaryLabel:p.value?.primaryLabel,autoAdvances:D.value},()=>[(0,t.createElementVNode)("div",sH,[(0,t.createVNode)(oe,{class:"ffp-nav-btn",flat:"",icon:"arrow_back",value:(0,t.unref)(c)?.("multiStep.previous")??"Back",disabled:!X.value,onClick:v},null,8,["value","disabled"]),e.hideCounter?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createElementBlock)("span",oH,(0,t.toDisplayString)(w.value),1)),L.value?((0,t.openBlock)(),(0,t.createBlock)(oe,{key:1,class:"ffp-nav-btn",value:p.value?.primaryLabel||(0,t.unref)(c)?.("multiStep.complete")||"Submit",loading:T.value,onClick:k},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(y.$slots,"primary-label",{isTerminal:!0},()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(c)?.("multiStep.complete")??"Submit"),1)],!0)]),_:3},8,["value","loading"])):((0,t.openBlock)(),(0,t.createBlock)(oe,{key:2,class:"ffp-nav-btn","icon-end":"arrow_forward",value:(0,t.unref)(c)?.("multiStep.next")??"Next",disabled:T.value,onClick:k},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(y.$slots,"primary-label",{isTerminal:!1},()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(c)?.("multiStep.next")??"Next"),1)],!0)]),_:3},8,["value","disabled"]))])],!0)],2))}}),uH=Le(mH,[["__scopeId","data-v-1546cba9"]]);function ot(e){var l;return((l=e.ownerDocument)==null?void 0:l.defaultView)||window}function Ct(e){return ot(e).getComputedStyle(e)}var Zb=Math.min,Vd=Math.max,Oi=Math.round;function uW(e){const l=Ct(e);let a=parseFloat(l.width),n=parseFloat(l.height);const d=e.offsetWidth,c=e.offsetHeight,i=Oi(a)!==d||Oi(n)!==c;return i&&(a=d,n=c),{width:a,height:n,fallback:i}}function za(e){return rW(e)?(e.nodeName||"").toLowerCase():""}var jc;function ZW(){if(jc)return jc;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(jc=e.brands.map((l=>l.brand+"/"+l.version)).join(" "),jc):navigator.userAgent}function Dt(e){return e instanceof ot(e).HTMLElement}function Ma(e){return e instanceof ot(e).Element}function rW(e){return e instanceof ot(e).Node}function rb(e){return typeof ShadowRoot>"u"?!1:e instanceof ot(e).ShadowRoot||e instanceof ShadowRoot}function gs(e){const{overflow:l,overflowX:a,overflowY:n,display:d}=Ct(e);return/auto|scroll|overlay|hidden|clip/.test(l+n+a)&&!["inline","contents"].includes(d)}function ZH(e){return["table","td","th"].includes(za(e))}function au(e){const l=/firefox/i.test(ZW()),a=Ct(e),n=a.backdropFilter||a.WebkitBackdropFilter;return a.transform!=="none"||a.perspective!=="none"||!!n&&n!=="none"||l&&a.willChange==="filter"||l&&!!a.filter&&a.filter!=="none"||["transform","perspective"].some((d=>a.willChange.includes(d)))||["paint","layout","strict","content"].some((d=>{const c=a.contain;return c!=null&&c.includes(d)}))}function bW(){return!/^((?!chrome|android).)*safari/i.test(ZW())}function g2(e){return["html","body","#document"].includes(za(e))}function hW(e){return Ma(e)?e:e.contextElement}var pW={x:1,y:1};function fn(e){const l=hW(e);if(!Dt(l))return pW;const a=l.getBoundingClientRect(),{width:n,height:d,fallback:c}=uW(l);let i=(c?Oi(a.width):a.width)/n,s=(c?Oi(a.height):a.height)/d;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}function Ed(e,l,a,n){var d,c;l===void 0&&(l=!1),a===void 0&&(a=!1);const i=e.getBoundingClientRect(),s=hW(e);let o=pW;l&&(n?Ma(n)&&(o=fn(n)):o=fn(e));const m=s?ot(s):window,u=!bW()&&a;let Z=(i.left+(u&&((d=m.visualViewport)==null?void 0:d.offsetLeft)||0))/o.x,r=(i.top+(u&&((c=m.visualViewport)==null?void 0:c.offsetTop)||0))/o.y,b=i.width/o.x,h=i.height/o.y;if(s){const p=ot(s),N=n&&Ma(n)?ot(n):n;let W=p.frameElement;for(;W&&n&&N!==p;){const G=fn(W),Y=W.getBoundingClientRect(),L=getComputedStyle(W);Y.x+=(W.clientLeft+parseFloat(L.paddingLeft))*G.x,Y.y+=(W.clientTop+parseFloat(L.paddingTop))*G.y,Z*=G.x,r*=G.y,b*=G.x,h*=G.y,Z+=Y.x,r+=Y.y,W=ot(W).frameElement}}return{width:b,height:h,top:r,right:Z+b,bottom:r+h,left:Z,x:Z,y:r}}function Va(e){return((rW(e)?e.ownerDocument:e.document)||window.document).documentElement}function ws(e){return Ma(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function WW(e){return Ed(Va(e)).left+ws(e).scrollLeft}function Bd(e){if(za(e)==="html")return e;const l=e.assignedSlot||e.parentNode||rb(e)&&e.host||Va(e);return rb(l)?l.host:l}function GW(e){const l=Bd(e);return g2(l)?l.ownerDocument.body:Dt(l)&&gs(l)?l:GW(l)}function Ei(e,l){var a;l===void 0&&(l=[]);const n=GW(e),d=n===((a=e.ownerDocument)==null?void 0:a.body),c=ot(n);return d?l.concat(c,c.visualViewport||[],gs(n)?n:[]):l.concat(n,Ei(n))}function bb(e,l,a){return l==="viewport"?Ka((function(n,d){const c=ot(n),i=Va(n),s=c.visualViewport;let o=i.clientWidth,m=i.clientHeight,u=0,Z=0;if(s){o=s.width,m=s.height;const r=bW();(r||!r&&d==="fixed")&&(u=s.offsetLeft,Z=s.offsetTop)}return{width:o,height:m,x:u,y:Z}})(e,a)):Ma(l)?Ka((function(n,d){const c=Ed(n,!0,d==="fixed"),i=c.top+n.clientTop,s=c.left+n.clientLeft,o=Dt(n)?fn(n):{x:1,y:1};return{width:n.clientWidth*o.x,height:n.clientHeight*o.y,x:s*o.x,y:i*o.y}})(l,a)):Ka((function(n){const d=Va(n),c=ws(n),i=n.ownerDocument.body,s=Vd(d.scrollWidth,d.clientWidth,i.scrollWidth,i.clientWidth),o=Vd(d.scrollHeight,d.clientHeight,i.scrollHeight,i.clientHeight);let m=-c.scrollLeft+WW(n);const u=-c.scrollTop;return Ct(i).direction==="rtl"&&(m+=Vd(d.clientWidth,i.clientWidth)-s),{width:s,height:o,x:m,y:u}})(Va(e)))}function hb(e){return Dt(e)&&Ct(e).position!=="fixed"?e.offsetParent:null}function pb(e){const l=ot(e);let a=hb(e);for(;a&&ZH(a)&&Ct(a).position==="static";)a=hb(a);return a&&(za(a)==="html"||za(a)==="body"&&Ct(a).position==="static"&&!au(a))?l:a||(function(n){let d=Bd(n);for(;Dt(d)&&!g2(d);){if(au(d))return d;d=Bd(d)}return null})(e)||l}function rH(e,l,a){const n=Dt(l),d=Va(l),c=Ed(e,!0,a==="fixed",l);let i={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(n||!n&&a!=="fixed")if((za(l)!=="body"||gs(d))&&(i=ws(l)),Dt(l)){const o=Ed(l,!0);s.x=o.x+l.clientLeft,s.y=o.y+l.clientTop}else d&&(s.x=WW(d));return{x:c.left+i.scrollLeft-s.x,y:c.top+i.scrollTop-s.y,width:c.width,height:c.height}}var bH={getClippingRect:function(e){let{element:l,boundary:a,rootBoundary:n,strategy:d}=e;const c=[...a==="clippingAncestors"?(function(o,m){const u=m.get(o);if(u)return u;let Z=Ei(o).filter((p=>Ma(p)&&za(p)!=="body")),r=null;const b=Ct(o).position==="fixed";let h=b?Bd(o):o;for(;Ma(h)&&!g2(h);){const p=Ct(h),N=au(h);(b?N||r:N||p.position!=="static"||!r||!["absolute","fixed"].includes(r.position))?r=p:Z=Z.filter((W=>W!==h)),h=Bd(h)}return m.set(o,Z),Z})(l,this._c):[].concat(a),n],i=c[0],s=c.reduce(((o,m)=>{const u=bb(l,m,d);return o.top=Vd(u.top,o.top),o.right=Zb(u.right,o.right),o.bottom=Zb(u.bottom,o.bottom),o.left=Vd(u.left,o.left),o}),bb(l,i,d));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:l,offsetParent:a,strategy:n}=e;const d=Dt(a),c=Va(a);if(a===c)return l;let i={scrollLeft:0,scrollTop:0},s={x:1,y:1};const o={x:0,y:0};if((d||!d&&n!=="fixed")&&((za(a)!=="body"||gs(c))&&(i=ws(a)),Dt(a))){const m=Ed(a);s=fn(a),o.x=m.x+a.clientLeft,o.y=m.y+a.clientTop}return{width:l.width*s.x,height:l.height*s.y,x:l.x*s.x-i.scrollLeft*s.x+o.x,y:l.y*s.y-i.scrollTop*s.y+o.y}},isElement:Ma,getDimensions:function(e){return Dt(e)?uW(e):e.getBoundingClientRect()},getOffsetParent:pb,getDocumentElement:Va,getScale:fn,async getElementRects(e){let{reference:l,floating:a,strategy:n}=e;const d=this.getOffsetParent||pb,c=this.getDimensions;return{reference:rH(l,await d(a),n),floating:{x:0,y:0,...await c(a)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Ct(e).direction==="rtl"},hH=(e,l,a)=>{const n=new Map,d={platform:bH,...a},c={...d.platform,_c:n};return lh(e,l,{...d,platform:c})};function NW(e,l){for(const a in l)Object.prototype.hasOwnProperty.call(l,a)&&(typeof l[a]=="object"&&e[a]?NW(e[a],l[a]):e[a]=l[a])}var Vt={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:e=>[...e,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function Kd(e,l){let a=Vt.themes[e]||{},n;do n=a[l],typeof n>"u"?a.$extend?a=Vt.themes[a.$extend]||{}:(a=null,n=Vt[l]):a=null;while(a);return n}function pH(e){const l=[e];let a=Vt.themes[e]||{};do a.$extend&&!a.$resetCss?(l.push(a.$extend),a=Vt.themes[a.$extend]||{}):a=null;while(a);return l.map(n=>`v-popper--theme-${n}`)}function Wb(e){const l=[e];let a=Vt.themes[e]||{};do a.$extend?(l.push(a.$extend),a=Vt.themes[a.$extend]||{}):a=null;while(a);return l}var On=!1;if(typeof window<"u"){On=!1;try{const e=Object.defineProperty({},"passive",{get(){On=!0}});window.addEventListener("test",null,e)}catch{}}var YW=!1;typeof window<"u"&&typeof navigator<"u"&&(YW=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);var LW=["auto","top","bottom","left","right"].reduce((e,l)=>e.concat([l,`${l}-start`,`${l}-end`]),[]),Gb={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},Nb={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function Yb(e,l){const a=e.indexOf(l);a!==-1&&e.splice(a,1)}function vo(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}var Lt=[],ka=null,Lb={};function Xb(e){let l=Lb[e];return l||(l=Lb[e]=[]),l}var nu=function(){};typeof window<"u"&&(nu=window.Element);function Oe(e){return function(l){return Kd(l.theme,e)}}var fo="__floating-vue__popper",XW=()=>(0,t.defineComponent)({name:"VPopper",provide(){return{[fo]:{parentPopper:this}}},inject:{[fo]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:Oe("disabled")},positioningDisabled:{type:Boolean,default:Oe("positioningDisabled")},placement:{type:String,default:Oe("placement"),validator:e=>LW.includes(e)},delay:{type:[String,Number,Object],default:Oe("delay")},distance:{type:[Number,String],default:Oe("distance")},skidding:{type:[Number,String],default:Oe("skidding")},triggers:{type:Array,default:Oe("triggers")},showTriggers:{type:[Array,Function],default:Oe("showTriggers")},hideTriggers:{type:[Array,Function],default:Oe("hideTriggers")},popperTriggers:{type:Array,default:Oe("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:Oe("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:Oe("popperHideTriggers")},container:{type:[String,Object,nu,Boolean],default:Oe("container")},boundary:{type:[String,nu],default:Oe("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:Oe("strategy")},autoHide:{type:[Boolean,Function],default:Oe("autoHide")},handleResize:{type:Boolean,default:Oe("handleResize")},instantMove:{type:Boolean,default:Oe("instantMove")},eagerMount:{type:Boolean,default:Oe("eagerMount")},popperClass:{type:[String,Array,Object],default:Oe("popperClass")},computeTransformOrigin:{type:Boolean,default:Oe("computeTransformOrigin")},autoMinSize:{type:Boolean,default:Oe("autoMinSize")},autoSize:{type:[Boolean,String],default:Oe("autoSize")},autoMaxSize:{type:Boolean,default:Oe("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:Oe("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:Oe("preventOverflow")},overflowPadding:{type:[Number,String],default:Oe("overflowPadding")},arrowPadding:{type:[Number,String],default:Oe("arrowPadding")},arrowOverflow:{type:Boolean,default:Oe("arrowOverflow")},flip:{type:Boolean,default:Oe("flip")},shift:{type:Boolean,default:Oe("shift")},shiftCrossAxis:{type:Boolean,default:Oe("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:Oe("noAutoFocus")},disposeTimeout:{type:Number,default:Oe("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[fo])==null?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,l;return((e=this.popperTriggers)==null?void 0:e.includes("hover"))||((l=this.popperShowTriggers)==null?void 0:l.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,l)=>(e[l]="$_computePosition",e),{})},created(){this.autoMinSize,this.autoMaxSize},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:l=!1,force:a=!1}={}){var n,d;(n=this.parentPopper)!=null&&n.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(a||!this.disabled)&&(((d=this.parentPopper)==null?void 0:d.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,l),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:l=!1}={}){var a;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:l}),this.parentPopper.lockedChild=null)},1e3));return}((a=this.parentPopper)==null?void 0:a.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,l),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((e=this.referenceNode)==null?void 0:e.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(l=>l.nodeType===l.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(nh({mainAxis:this.distance,crossAxis:this.skidding}));const l=this.placement.startsWith("auto");if(l?e.middleware.push(th({alignment:this.placement.split("-")[1]??""})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(dh({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!l&&this.flip&&e.middleware.push(ah({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(Rx({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:"arrowOverflow",fn:({placement:n,rects:d,middlewareData:c})=>{let i;const{centerOffset:s}=c.arrow;return n.startsWith("top")||n.startsWith("bottom")?i=Math.abs(s)>d.reference.width/2:i=Math.abs(s)>d.reference.height/2,{data:{overflow:i}}}}),this.autoMinSize||this.autoSize){const n=this.autoSize?this.autoSize:this.autoMinSize?"min":null;e.middleware.push({name:"autoSize",fn:({rects:d,placement:c,middlewareData:i})=>{var s;if((s=i.autoSize)!=null&&s.skip)return{};let o,m;return c.startsWith("top")||c.startsWith("bottom")?o=d.reference.width:m=d.reference.height,this.$_innerNode.style[n==="min"?"minWidth":n==="max"?"maxWidth":"width"]=o!=null?`${o}px`:null,this.$_innerNode.style[n==="min"?"minHeight":n==="max"?"maxHeight":"height"]=m!=null?`${m}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(Fx({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:n,availableHeight:d})=>{this.$_innerNode.style.maxWidth=n!=null?`${n}px`:null,this.$_innerNode.style.maxHeight=d!=null?`${d}px`:null}})));const a=await hH(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:a.x,y:a.y,placement:a.placement,strategy:a.strategy,arrow:{...a.middlewareData.arrow,...a.middlewareData.arrowOverflow}})},$_scheduleShow(e,l=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),ka&&this.instantMove&&ka.instantMove&&ka!==this.parentPopper){ka.$_applyHide(!0),this.$_applyShow(!0);return}l?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e,l=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(ka=this),l?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const l=this.delay;return parseInt(l&&l[e]||l||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await vo(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Ei(this.$_referenceNode),...Ei(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const l=this.$_referenceNode.getBoundingClientRect(),a=this.$_popperNode.querySelector(".v-popper__wrapper"),n=a.parentNode.getBoundingClientRect(),d=l.x+l.width/2-(n.left+a.offsetLeft),c=l.y+l.height/2-(n.top+a.offsetTop);this.result.transformOrigin=`${d}px ${c}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let l;for(let a=0;a<Lt.length;a++)l=Lt[a],l.showGroup!==e&&(l.hide(),l.$emit("close-group"))}Lt.push(this),document.body.classList.add("v-popper--some-open");for(const l of Wb(this.theme))Xb(l).push(this),document.body.classList.add(`v-popper--some-open--${l}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await vo(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(e=!1){if(this.shownChildren.size>0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,Yb(Lt,this),Lt.length===0&&document.body.classList.remove("v-popper--some-open");for(const a of Wb(this.theme)){const n=Xb(a);Yb(n,this),n.length===0&&document.body.classList.remove(`v-popper--some-open--${a}`)}ka===this&&(ka=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const l=this.disposeTimeout;l!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},l)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await vo(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error("No container for popover: "+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=a=>{this.isShown&&!this.$_hideInProgress||(a.usedByTooltip=!0,!this.$_preventShow&&this.show({event:a}))};this.$_registerTriggerListeners(this.$_targetNodes,Gb,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],Gb,this.popperTriggers,this.popperShowTriggers,e);const l=a=>{a.usedByTooltip||this.hide({event:a})};this.$_registerTriggerListeners(this.$_targetNodes,Nb,this.triggers,this.hideTriggers,l),this.$_registerTriggerListeners([this.$_popperNode],Nb,this.popperTriggers,this.popperHideTriggers,l)},$_registerEventListeners(e,l,a){this.$_events.push({targetNodes:e,eventType:l,handler:a}),e.forEach(n=>n.addEventListener(l,a,On?{passive:!0}:void 0))},$_registerTriggerListeners(e,l,a,n,d){let c=a;n!=null&&(c=typeof n=="function"?n(c):n),c.forEach(i=>{const s=l[i];s&&this.$_registerEventListeners(e,s,d)})},$_removeEventListeners(e){const l=[];this.$_events.forEach(a=>{const{targetNodes:n,eventType:d,handler:c}=a;!e||e===d?n.forEach(i=>i.removeEventListener(d,c)):l.push(a)}),this.$_events=l},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,l=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),l&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,l){for(const a of this.$_targetNodes){const n=a.getAttribute(e);n&&(a.removeAttribute(e),a.setAttribute(l,n))}},$_applyAttrsToTarget(e){for(const l of this.$_targetNodes)for(const a in e){const n=e[a];n==null?l.removeAttribute(a):l.setAttribute(a,n)}},$_updateParentShownChildren(e){let l=this.parentPopper;for(;l;)e?l.shownChildren.add(this.randomId):(l.shownChildren.delete(this.randomId),l.pendingHide&&l.hide()),l=l.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(Td>=e.left&&Td<=e.right&&Id>=e.top&&Id<=e.bottom){const l=this.$_popperNode.getBoundingClientRect(),a=Td-ba,n=Id-ha,d=l.left+l.width/2-ba+(l.top+l.height/2)-ha+l.width+l.height,c=ba+a*d,i=ha+n*d;return Jc(ba,ha,c,i,l.left,l.top,l.left,l.bottom)||Jc(ba,ha,c,i,l.left,l.top,l.right,l.top)||Jc(ba,ha,c,i,l.right,l.top,l.right,l.bottom)||Jc(ba,ha,c,i,l.left,l.bottom,l.right,l.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(YW){const e=On?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",l=>yb(l,!0),e),document.addEventListener("touchend",l=>Mb(l,!0),e)}else window.addEventListener("mousedown",e=>yb(e,!1),!0),window.addEventListener("click",e=>Mb(e,!1),!0);window.addEventListener("resize",GH)}function yb(e,l){if(Vt.autoHideOnMousedown)yW(e,l);else for(let a=0;a<Lt.length;a++){const n=Lt[a];try{n.mouseDownContains=n.popperNode().contains(e.target)}catch{}}}function Mb(e,l){Vt.autoHideOnMousedown||yW(e,l)}function yW(e,l){const a={};for(let n=Lt.length-1;n>=0;n--){const d=Lt[n];try{const c=d.containsGlobalTarget=d.mouseDownContains||d.popperNode().contains(e.target);d.pendingHide=!1,requestAnimationFrame(()=>{if(d.pendingHide=!1,!a[d.randomId]&&Vb(d,c,e)){if(d.$_handleGlobalClose(e,l),!e.closeAllPopover&&e.closePopover&&c){let s=d.parentPopper;for(;s;)a[s.randomId]=!0,s=s.parentPopper;return}let i=d.parentPopper;for(;i&&Vb(i,i.containsGlobalTarget,e);)i.$_handleGlobalClose(e,l),i=i.parentPopper}})}catch{}}}function Vb(e,l,a){return a.closeAllPopover||a.closePopover&&l||WH(e,a)&&!l}function WH(e,l){if(typeof e.autoHide=="function"){const a=e.autoHide(l);return e.lastAutoHide=a,a}return e.autoHide}function GH(){for(let e=0;e<Lt.length;e++)Lt[e].$_computePosition()}var ba=0,ha=0,Td=0,Id=0;typeof window<"u"&&window.addEventListener("mousemove",e=>{ba=Td,ha=Id,Td=e.clientX,Id=e.clientY},On?{passive:!0}:void 0);function Jc(e,l,a,n,d,c,i,s){const o=((i-d)*(l-c)-(s-c)*(e-d))/((s-c)*(a-e)-(i-d)*(n-l)),m=((a-e)*(l-c)-(n-l)*(e-d))/((s-c)*(a-e)-(i-d)*(n-l));return o>=0&&o<=1&&m>=0&&m<=1}var NH={extends:XW()},Rs=(e,l)=>{const a=e.__vccOpts||e;for(const[n,d]of l)a[n]=d;return a};function YH(e,l,a,n,d,c){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{ref:"reference",class:(0,t.normalizeClass)(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[(0,t.renderSlot)(e.$slots,"default",(0,t.normalizeProps)((0,t.guardReactiveProps)(e.slotData)))],2)}var LH=Rs(NH,[["render",YH]]);function XH(){var e=window.navigator.userAgent,l=e.indexOf("MSIE ");if(l>0)return parseInt(e.substring(l+5,e.indexOf(".",l)),10);if(e.indexOf("Trident/")>0){var a=e.indexOf("rv:");return parseInt(e.substring(a+3,e.indexOf(".",a)),10)}var n=e.indexOf("Edge/");return n>0?parseInt(e.substring(n+5,e.indexOf(".",n)),10):-1}var ci;function du(){du.init||(du.init=!0,ci=XH()!==-1)}var Ss={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){du(),(0,t.nextTick)(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",ci&&this.$el.appendChild(e),e.data="about:blank",ci||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!ci&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}},yH=(0,t.withScopeId)("data-v-b329ee4c");(0,t.pushScopeId)("data-v-b329ee4c");var MH={class:"resize-observer",tabindex:"-1"};(0,t.popScopeId)();Ss.render=yH((e,l,a,n,d,c)=>((0,t.openBlock)(),(0,t.createBlock)("div",MH)));Ss.__scopeId="data-v-b329ee4c";Ss.__file="src/components/ResizeObserver.vue";var MW=(e="theme")=>({computed:{themeClass(){return pH(this[e])}}}),VH=(0,t.defineComponent)({name:"VPopperContent",components:{ResizeObserver:Ss},mixins:[MW()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),TH=["id","aria-hidden","tabindex","data-popper-placement"],IH={ref:"inner",class:"v-popper__inner"},xH=[(0,t.createElementVNode)("div",{class:"v-popper__arrow-outer"},null,-1),(0,t.createElementVNode)("div",{class:"v-popper__arrow-inner"},null,-1)];function zH(e,l,a,n,d,c){const i=(0,t.resolveComponent)("ResizeObserver");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{id:e.popperId,ref:"popover",class:(0,t.normalizeClass)(["v-popper__popper",[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:(0,t.normalizeStyle)(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?"false":"true",tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:l[2]||(l[2]=(0,t.withKeys)(s=>e.autoHide&&e.$emit("hide"),["esc"]))},[(0,t.createElementVNode)("div",{class:"v-popper__backdrop",onClick:l[0]||(l[0]=s=>e.autoHide&&e.$emit("hide"))}),(0,t.createElementVNode)("div",{class:"v-popper__wrapper",style:(0,t.normalizeStyle)(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[(0,t.createElementVNode)("div",IH,[e.mounted?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createElementVNode)("div",null,[(0,t.renderSlot)(e.$slots,"default")]),e.handleResize?((0,t.openBlock)(),(0,t.createBlock)(i,{key:0,onNotify:l[1]||(l[1]=s=>e.$emit("resize",s))})):(0,t.createCommentVNode)("",!0)],64)):(0,t.createCommentVNode)("",!0)],512),(0,t.createElementVNode)("div",{ref:"arrow",class:"v-popper__arrow-container",style:(0,t.normalizeStyle)(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},xH,4)],4)],46,TH)}var VW=Rs(VH,[["render",zH]]),TW={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}},cu=function(){};typeof window<"u"&&(cu=window.Element);var gH=(0,t.defineComponent)({name:"VPopperWrapper",components:{Popper:LH,PopperContent:VW},mixins:[TW,MW("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,cu,Boolean],default:void 0},boundary:{type:[String,cu],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function wH(e,l,a,n,d,c){const i=(0,t.resolveComponent)("PopperContent"),s=(0,t.resolveComponent)("Popper");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({ref:"popper"},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:l[0]||(l[0]=()=>e.$emit("show")),onHide:l[1]||(l[1]=()=>e.$emit("hide")),"onUpdate:shown":l[2]||(l[2]=o=>e.$emit("update:shown",o)),onApplyShow:l[3]||(l[3]=()=>e.$emit("apply-show")),onApplyHide:l[4]||(l[4]=()=>e.$emit("apply-hide")),onCloseGroup:l[5]||(l[5]=()=>e.$emit("close-group")),onCloseDirective:l[6]||(l[6]=()=>e.$emit("close-directive")),onAutoHide:l[7]||(l[7]=()=>e.$emit("auto-hide")),onResize:l[8]||(l[8]=()=>e.$emit("resize"))}),{default:(0,t.withCtx)(({popperId:o,isShown:m,shouldMountContent:u,skipTransition:Z,autoHide:r,show:b,hide:h,handleResize:p,onResize:N,classes:W,result:G})=>[(0,t.renderSlot)(e.$slots,"default",{shown:m,show:b,hide:h}),(0,t.createVNode)(i,{ref:"popperContent","popper-id":o,theme:e.finalTheme,shown:m,mounted:u,"skip-transition":Z,"auto-hide":r,"handle-resize":p,classes:W,result:G,onHide:h,onResize:N},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"popper",{shown:m,hide:h})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},16,["theme","target-nodes","popper-node","class"])}var w2=Rs(gH,[["render",wH]]),RH={...w2,name:"VDropdown",vPopperTheme:"dropdown"},SH={...w2,name:"VMenu",vPopperTheme:"menu"},vH={...w2,name:"VTooltip",vPopperTheme:"tooltip"},fH=(0,t.defineComponent)({name:"VTooltipDirective",components:{Popper:XW(),PopperContent:VW},mixins:[TW],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>Kd(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>Kd(e.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const l=++this.$_fetchId,a=this.content(this);a.then?a.then(n=>this.onResult(l,n)):this.onResult(l,a)}},onResult(e,l){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=l)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),FH=["innerHTML"],kH=["textContent"];function jH(e,l,a,n,d,c){const i=(0,t.resolveComponent)("PopperContent"),s=(0,t.resolveComponent)("Popper");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({ref:"popper"},e.$attrs,{theme:e.theme,"target-nodes":e.targetNodes,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:(0,t.withCtx)(({popperId:o,isShown:m,shouldMountContent:u,skipTransition:Z,autoHide:r,hide:b,handleResize:h,onResize:p,classes:N,result:W})=>[(0,t.createVNode)(i,{ref:"popperContent",class:(0,t.normalizeClass)({"v-popper--tooltip-loading":e.loading}),"popper-id":o,theme:e.theme,shown:m,mounted:u,"skip-transition":Z,"auto-hide":r,"handle-resize":h,classes:N,result:W,onHide:b,onResize:p},{default:(0,t.withCtx)(()=>[e.html?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:0,innerHTML:e.finalContent},null,8,FH)):((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:1,textContent:(0,t.toDisplayString)(e.finalContent)},null,8,kH))]),_:2},1032,["class","popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:1},16,["theme","target-nodes","popper-node","onApplyShow","onApplyHide"])}var JH=Rs(fH,[["render",jH]]),IW="v-popper--has-tooltip";function CH(e,l){let a=e.placement;if(!a&&l)for(const n of LW)l[n]&&(a=n);return a||(a=Kd(e.theme||"tooltip","placement")),a}function xW(e,l,a){let n;const d=typeof l;return d==="string"?n={content:l}:l&&d==="object"?n=l:n={content:!1},n.placement=CH(n,a),n.targetNodes=()=>[e],n.referenceNode=()=>e,n}var Fo,Hd,DH=0;function UH(){if(Fo)return;Hd=(0,t.ref)([]),Fo=(0,t.createApp)({name:"VTooltipDirectiveApp",setup(){return{directives:Hd}},render(){return this.directives.map(l=>(0,t.h)(JH,{...l.options,shown:l.shown||l.options.shown,key:l.id}))},devtools:{hide:!0}});const e=document.createElement("div");document.body.appendChild(e),Fo.mount(e)}function OH(e,l,a){UH();const n=(0,t.ref)(xW(e,l,a)),d=(0,t.ref)(!1),c={id:DH++,options:n,shown:d};return Hd.value.push(c),e.classList&&e.classList.add(IW),e.$_popper={options:n,item:c,show(){d.value=!0},hide(){d.value=!1}}}function zW(e){if(e.$_popper){const l=Hd.value.indexOf(e.$_popper.item);l!==-1&&Hd.value.splice(l,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(IW)}function Tb(e,{value:l,modifiers:a}){const n=xW(e,l,a);if(!n.content||Kd(n.theme||"tooltip","disabled"))zW(e);else{let d;e.$_popper?(d=e.$_popper,d.options.value=n):d=OH(e,l,a),typeof l.shown<"u"&&l.shown!==e.$_popperOldShown&&(e.$_popperOldShown=l.shown,l.shown?d.show():d.hide())}}var EH={beforeMount:Tb,updated:Tb,beforeUnmount(e){zW(e)}};function Ib(e){e.addEventListener("mousedown",Bi),e.addEventListener("click",Bi),e.addEventListener("touchstart",gW,On?{passive:!0}:!1)}function xb(e){e.removeEventListener("mousedown",Bi),e.removeEventListener("click",Bi),e.removeEventListener("touchstart",gW),e.removeEventListener("touchend",wW),e.removeEventListener("touchcancel",RW)}function Bi(e){const l=e.currentTarget;e.closePopover=!l.$_vclosepopover_touch,e.closeAllPopover=l.$_closePopoverModifiers&&!!l.$_closePopoverModifiers.all}function gW(e){if(e.changedTouches.length===1){const l=e.currentTarget;l.$_vclosepopover_touch=!0,l.$_vclosepopover_touchPoint=e.changedTouches[0],l.addEventListener("touchend",wW),l.addEventListener("touchcancel",RW)}}function wW(e){const l=e.currentTarget;if(l.$_vclosepopover_touch=!1,e.changedTouches.length===1){const a=e.changedTouches[0],n=l.$_vclosepopover_touchPoint;e.closePopover=Math.abs(a.screenY-n.screenY)<20&&Math.abs(a.screenX-n.screenX)<20,e.closeAllPopover=l.$_closePopoverModifiers&&!!l.$_closePopoverModifiers.all}}function RW(e){const l=e.currentTarget;l.$_vclosepopover_touch=!1}var BH={beforeMount(e,{value:l,modifiers:a}){e.$_closePopoverModifiers=a,(typeof l>"u"||l)&&Ib(e)},updated(e,{value:l,oldValue:a,modifiers:n}){e.$_closePopoverModifiers=n,l!==a&&(typeof l>"u"||l?Ib(e):xb(e))},beforeUnmount(e){xb(e)}};function KH(e,l={}){e.$_vTooltipInstalled||(e.$_vTooltipInstalled=!0,NW(Vt,l),e.directive("tooltip",EH),e.directive("close-popper",BH),e.component("VTooltip",vH),e.component("VDropdown",RH),e.component("VMenu",SH))}var HH={version:"5.2.2",install:KH,options:Vt},PH=["src"],QH=(0,t.defineComponent)({__name:"LightboxImage",props:{src:{}},setup(e){const l=e,{imageSrc:a}=b2(()=>l.src);return(n,d)=>((0,t.openBlock)(),(0,t.createElementBlock)("img",{draggable:!1,src:(0,t.unref)(a),alt:"Preview",class:"lightbox-image"},null,8,PH))}}),AH=QH,_H={key:0,class:"center"},$H={key:3},qH={class:"bgl-lightbox-item"},eP={key:2,class:"lightbox-pdf"},lP=["src","title"],tP={key:3,class:"lightbox-file"},aP={class:"file-info txt-white flex m_block align-items-start gap-025"},nP={class:"txt-start"},dP={class:"mx-0 light"},cP={class:"semi word-break-all"},iP={class:"mx-0"},sP={class:"semi"},oP=(0,t.defineComponent)({__name:"Lightbox",setup(e,{expose:l}){const a=(0,t.ref)(!1),n=(0,t.ref)(null),d=(0,t.ref)([]),c=(0,t.ref)(0),i=(0,t.computed)(()=>d.value[c.value]),s=(0,t.ref)(1),o=(0,t.computed)(()=>s.value===1),m=(0,t.computed)(()=>({allowTouchMove:s.value===1,touchRatio:s.value===1?1:0,simulateTouch:s.value===1}));function u(b,h){a.value=!0,d.value=h||[b],c.value=d.value.findIndex(p=>{const N=b.src!==void 0&&b.src!==null&&b.src!==""&&p.src===b.src,W=b.pathKey!==void 0&&b.pathKey!==null&&b.pathKey!==""&&p.pathKey===b.pathKey;return N||W}),c.value===-1&&(c.value=0),s.value=1}function Z(){a.value=!1}Xs(Z,a);function r(b){c.value=b,s.value=1}return(0,t.watch)(()=>a.value,async b=>{b?(document.body.style.overflow="hidden",await(0,t.nextTick)(),n.value?.open||n.value?.showModal()):(document.body.style.overflow="",n.value?.open&&n.value.close())}),(0,t.watch)(()=>c.value,()=>{s.value=1}),l({open:u,close:Z}),(b,h)=>((0,t.openBlock)(),(0,t.createBlock)(t.Transition,{name:"fade"},{default:(0,t.withCtx)(()=>[a.value?((0,t.openBlock)(),(0,t.createElementBlock)("dialog",{key:0,ref_key:"dialogRef",ref:n,class:"bgl-lightbox-overlay",onCancel:(0,t.withModifiers)(Z,["prevent"])},[(0,t.createElementVNode)("div",{class:"flex start w-100 space-between p-025 z-9",onClick:Z},[(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"close",onClick:Z}),i.value?.enableZoom&&i.value?.type==="image"?((0,t.openBlock)(),(0,t.createElementBlock)("div",_H,[(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"remove",disabled:s.value===1,onClick:h[0]||(h[0]=p=>s.value--)},null,8,["disabled"]),(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"zoom_in",disabled:s.value===1,onClick:h[1]||(h[1]=p=>s.value=1)},null,8,["disabled"]),(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"add",disabled:s.value===3,onClick:h[2]||(h[2]=p=>s.value++)},null,8,["disabled"])])):(0,t.createCommentVNode)("",!0),i.value?.openFile&&i.value?.src?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:1,class:"color-white",round:"",thin:"",flat:"",iconEnd:"arrow_outward",value:"$t:lightbox.openFile",href:i.value?.src,target:"_blank"},null,8,["href"])):(0,t.createCommentVNode)("",!0),i.value?.download&&i.value?.src?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:2,class:"color-white",round:"",thin:"",flat:"",icon:"download",value:"Download File",onClick:h[3]||(h[3]=p=>(0,t.unref)(r2)(i.value?.src))})):(0,t.createCommentVNode)("",!0),!i.value?.openFile&&!i.value?.download?((0,t.openBlock)(),(0,t.createElementBlock)("div",$H)):(0,t.createCommentVNode)("",!0)]),d.value&&d.value.length>0?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(u5),{key:0,index:c.value,"onUpdate:index":h[6]||(h[6]=p=>c.value=p),items:d.value,"initial-slide":c.value,class:(0,t.normalizeClass)(["bgl-lightbox-swiper",{zoomed:s.value>1}]),navigation:d.value.length>1,"grab-cursor":o.value,keyboard:!0,loop:!1,speed:400,"slides-per-view":1,"space-between":0,effect:"slide","advanced-options":m.value,onClick:h[7]||(h[7]=(0,t.withModifiers)(()=>{},["stop"]))},{default:(0,t.withCtx)(({item:p})=>[(0,t.createElementVNode)("div",qH,[p.type==="image"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Z5),{key:0,zoom:s.value,"onUpdate:zoom":h[4]||(h[4]=N=>s.value=N),disabled:!p?.enableZoom,"mouse-wheel-to-zoom":!1,"double-click-to-zoom":!0,"max-scale":5,"min-scale":1,"aspect-ratio":0,"limit-translation":!0,onClick:h[5]||(h[5]=(0,t.withModifiers)(()=>{},["stop"]))},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(AH,{src:p?.src},null,8,["src"])]),_:2},1032,["zoom","disabled"])):p?.type==="video"&&p?.src?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(zu),{key:1,src:p?.src,autoplay:"",controls:"",class:"lightbox-video"},null,8,["src"])):p?.type==="pdf"&&p?.src?((0,t.openBlock)(),(0,t.createElementBlock)("div",eP,[(0,t.createElementVNode)("embed",{src:(0,t.unref)(Z2)(p?.src),type:"application/pdf",title:p?.name},null,8,lP)])):((0,t.openBlock)(),(0,t.createElementBlock)("div",tP,[(0,t.createElementVNode)("div",aP,[(0,t.createVNode)((0,t.unref)(Ne),{class:"m-0 m_none",icon:"draft",size:10,weight:"12"}),(0,t.createVNode)((0,t.unref)(Ne),{class:"m-0 none m_block m_-mb-1",icon:"draft",size:4,weight:"2"}),(0,t.createElementVNode)("div",nP,[(0,t.createElementVNode)("p",dP,[h[9]||(h[9]=(0,t.createTextVNode)(" File: ",-1)),(0,t.createElementVNode)("span",cP,(0,t.toDisplayString)(p?.name),1)]),(0,t.createElementVNode)("p",iP,[h[10]||(h[10]=(0,t.createTextVNode)(" Type: ",-1)),(0,t.createElementVNode)("span",sP,(0,t.toDisplayString)(p?.type),1)]),(0,t.createVNode)((0,t.unref)(oe),{href:p?.src,target:"_blank",round:"",thin:"",class:"mt-1",value:"Open file"},null,8,["href"])])])]))])]),"prev-button":(0,t.withCtx)(({prev:p})=>[(0,t.createVNode)((0,t.unref)(oe),{icon:"arrow_back",color:"black",onClick:p},null,8,["onClick"])]),"next-button":(0,t.withCtx)(({next:p})=>[(0,t.createVNode)((0,t.unref)(oe),{icon:"arrow_forward",color:"black",onClick:p},null,8,["onClick"])]),_:1},8,["index","items","initial-slide","class","navigation","grab-cursor","advanced-options"])):(0,t.createCommentVNode)("",!0),d.value&&d.value.length>1?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:1,class:"lightbox-thumbnails",onClick:h[8]||(h[8]=(0,t.withModifiers)(()=>{},["stop"]))},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(d.value,(p,N)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:N},[p.type==="image"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Sd),{key:0,class:(0,t.normalizeClass)(["thumbnail",{active:c.value===N}]),src:p.src,alt:"",onClick:(0,t.withModifiers)(W=>r(N),["stop"])},null,8,["src","class","onClick"])):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ne),{key:1,class:(0,t.normalizeClass)(["thumbnail thumbnail-icon",{active:c.value===N}]),icon:"description",onClick:(0,t.withModifiers)(W=>r(N),["stop"])},null,8,["class","onClick"]))],64))),128))])):(0,t.createCommentVNode)("",!0)],544)):(0,t.createCommentVNode)("",!0)]),_:1}))}}),mP=oP,bd={},pn=e=>{},uP={mounted(e,l){zb(iu(l,e)),pn=a=>{gb(a,e,l)},e.addEventListener("click",pn)},updated(e,l){zb(iu(l,e)),e.removeEventListener("click",pn),pn=a=>{gb(a,e,l)},e.addEventListener("click",pn)},unmounted(e){e.removeEventListener("click",pn)},getSSRProps(){return{}}};function zb(e){e.group&&(bd[e.group]||(bd[e.group]=[]),bd[e.group].findIndex(l=>l.src===e.src)===-1&&bd[e.group].push(e))}function gb(e,l,a){e.stopPropagation();const n=iu(a,l),d=pP();if(!d||!d.open)return;const c=d.open;c(n,n&&n.group?bd[n.group]:void 0)}function iu(e,l){let{group:a,src:n,type:d,name:c,thumbnail:i,enableZoom:s,openFile:o,download:m,pathKey:u}=e.value||{};return n=Al(n||u)||e.value||l.getAttribute("src")||"",d=d||hP(n),c=c||bP(n)||l.getAttribute("alt")||"",{src:n,type:d,name:c,thumbnail:i,group:a,enableZoom:s,openFile:o,download:m}}var ZP=/youtube\.com|youtu\.be/,rP=/vimeo\.com/;function bP(e){return!e||typeof e!="string"?"":(e.split("/").pop()||"").replace(/\.[^/.]+$/,"")}function hP(e){if(typeof e!="string"||!e)return"unknown";if(e.startsWith("blob:")||/^data:image\//i.test(e))return"image";if(/^data:video\//i.test(e))return"video";const l=(e.split(".").pop()||"").toLowerCase(),a=e.split("?")[0].split(".").pop()?.toLowerCase()||"";return Gi.test(l)||Gi.test(a)?"image":Lh.test(l)||ZP.test(e)||rP.test(e)?"video":["pdf"].includes(l)?"pdf":l??"unknown"}var ko;function pP(){if(!(typeof document>"u")){if(!ko){const e=document.createElement("div");document.body.prepend(e),ko=(0,t.createApp)(mP).mount(e)}return ko}}var WP={install(e){e.directive("lightbox",uP)}},GP=WP,NP={beforeMount(e,l){e.clickOutsideEvent=a=>{e===a.target||e.contains(a.target)||l.value(a)},document.addEventListener("click",e.clickOutsideEvent)},unmounted(e){document.removeEventListener("click",e.clickOutsideEvent)}},SW=qd.__export({EventBus:()=>Fs,POSITION:()=>Qd,TYPE:()=>Ul,createToastInterface:()=>Ad,default:()=>AW,globalEventBus:()=>R2,provideToast:()=>c8,toastInjectionKey:()=>ks,useToast:()=>QW},1),YP=Object.defineProperty,wb=Object.getOwnPropertySymbols,LP=Object.prototype.hasOwnProperty,XP=Object.prototype.propertyIsEnumerable,Rb=(e,l,a)=>l in e?YP(e,l,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[l]=a,vW=(e,l)=>{for(var a in l||(l={}))LP.call(l,a)&&Rb(e,a,l[a]);if(wb)for(var a of wb(l))XP.call(l,a)&&Rb(e,a,l[a]);return e},vs=e=>typeof e=="function",fs=e=>typeof e=="string",fW=e=>fs(e)&&e.trim().length>0,yP=e=>typeof e=="number",Ba=e=>typeof e>"u",Pd=e=>typeof e=="object"&&e!==null,MP=e=>Ut(e,"tag")&&fW(e.tag),FW=e=>window.TouchEvent&&e instanceof TouchEvent,kW=e=>Ut(e,"component")&&jW(e.component),VP=e=>vs(e)||Pd(e),jW=e=>!Ba(e)&&(fs(e)||VP(e)||kW(e)),Sb=e=>Pd(e)&&["height","width","right","left","top","bottom"].every(l=>yP(e[l])),Ut=(e,l)=>(Pd(e)||vs(e))&&l in e,TP=(e=>()=>e++)(0);function jo(e){return FW(e)?e.targetTouches[0].clientX:e.clientX}function vb(e){return FW(e)?e.targetTouches[0].clientY:e.clientY}var IP=e=>{Ba(e.remove)?e.parentNode&&e.parentNode.removeChild(e):e.remove()},bc=e=>kW(e)?bc(e.component):MP(e)?(0,t.defineComponent)({render(){return e}}):typeof e=="string"?e:(0,t.toRaw)((0,t.unref)(e)),xP=e=>{if(typeof e=="string")return e;const l=Ut(e,"props")&&Pd(e.props)?e.props:{},a=Ut(e,"listeners")&&Pd(e.listeners)?e.listeners:{};return{component:bc(e),props:l,listeners:a}},zP=()=>typeof window<"u",Fs=class{constructor(){this.allHandlers={}}getHandlers(e){return this.allHandlers[e]||[]}on(e,l){const a=this.getHandlers(e);a.push(l),this.allHandlers[e]=a}off(e,l){const a=this.getHandlers(e);a.splice(a.indexOf(l)>>>0,1)}emit(e,l){this.getHandlers(e).forEach(a=>a(l))}},gP=e=>["on","off","emit"].every(l=>Ut(e,l)&&vs(e[l])),Ul;(function(e){e.SUCCESS="success",e.ERROR="error",e.WARNING="warning",e.INFO="info",e.DEFAULT="default"})(Ul||(Ul={}));var Qd;(function(e){e.TOP_LEFT="top-left",e.TOP_CENTER="top-center",e.TOP_RIGHT="top-right",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_CENTER="bottom-center",e.BOTTOM_RIGHT="bottom-right"})(Qd||(Qd={}));var ql;(function(e){e.ADD="add",e.DISMISS="dismiss",e.UPDATE="update",e.CLEAR="clear",e.UPDATE_DEFAULTS="update_defaults"})(ql||(ql={}));var la="Vue-Toastification",ht={type:{type:String,default:Ul.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},fb={type:ht.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},Cc={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:ht.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},Jo={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},Fb={transition:{type:[Object,String],default:`${la}__bounce`}},da={CORE_TOAST:{position:{type:String,default:Qd.TOP_RIGHT},draggable:ht.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:ht.trueBoolean,pauseOnHover:ht.trueBoolean,closeOnClick:ht.trueBoolean,timeout:Jo.timeout,hideProgressBar:Jo.hideProgressBar,toastClassName:ht.classNames,bodyClassName:ht.classNames,icon:fb.customIcon,closeButton:Cc.component,closeButtonClassName:Cc.classNames,showCloseButtonOnHover:Cc.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new Fs}},TOAST:{id:{type:[String,Number],required:!0,default:0},type:ht.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},CONTAINER:{container:{type:[Object,Function],default:()=>document.body},newestOnTop:ht.trueBoolean,maxToasts:{type:Number,default:20},transition:Fb.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:e=>e},filterToasts:{type:Function,default:e=>e},containerClassName:ht.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},PROGRESS_BAR:Jo,ICON:fb,TRANSITION:Fb,CLOSE_BUTTON:Cc},JW=(0,t.defineComponent)({name:"VtProgressBar",props:da.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${la}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function wP(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{style:(0,t.normalizeStyle)(e.style),class:(0,t.normalizeClass)(e.cpClass)},null,6)}JW.render=wP;var RP=JW,CW=(0,t.defineComponent)({name:"VtCloseButton",props:da.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?bc(this.component):"button"},classes(){const e=[`${la}__close-button`];return this.showOnHover&&e.push("show-on-hover"),e.concat(this.classNames)}}}),SP=(0,t.createTextVNode)(" × ");function vP(e,l){return(0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.buttonComponent),(0,t.mergeProps)({"aria-label":e.ariaLabel,class:e.classes},e.$attrs),{default:(0,t.withCtx)(()=>[SP]),_:1},16,["aria-label","class"])}CW.render=vP;var fP=CW,DW={},FP={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},kP=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1)];function jP(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",FP,kP)}DW.render=jP;var JP=DW,UW={},CP={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},DP=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1)];function UP(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",CP,DP)}UW.render=UP;var kb=UW,OW={},OP={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},EP=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)];function BP(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",OP,EP)}OW.render=BP;var KP=OW,EW={},HP={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},PP=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)];function QP(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",HP,PP)}EW.render=QP;var AP=EW,BW=(0,t.defineComponent)({name:"VtIcon",props:da.ICON,computed:{customIconChildren(){return Ut(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return fs(this.customIcon)?this.trimValue(this.customIcon):Ut(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return Ut(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:jW(this.customIcon)?bc(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[Ul.DEFAULT]:kb,[Ul.INFO]:kb,[Ul.SUCCESS]:JP,[Ul.ERROR]:AP,[Ul.WARNING]:KP}[this.type]},iconClasses(){const e=[`${la}__icon`];return this.hasCustomIcon?e.concat(this.customIconClass):e}},methods:{trimValue(e,l=""){return fW(e)?e.trim():l}}});function _P(e,l){return(0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.component),{class:(0,t.normalizeClass)(e.iconClasses)},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.customIconChildren),1)]),_:1},8,["class"])}BW.render=_P;var KW=(0,t.defineComponent)({name:"VtToast",components:{ProgressBar:RP,CloseButton:fP,Icon:BW},inheritAttrs:!1,props:Object.assign({},da.CORE_TOAST,da.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const e=[`${la}__toast`,`${la}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&e.push("disable-transition"),this.rtl&&e.push(`${la}__toast--rtl`),e},bodyClasses(){return[`${la}__toast-${fs(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return Sb(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:Ut,getVueComponentFromObj:bc,closeToast(){this.eventBus.emit(ql.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const e=this.$el;e.addEventListener("touchstart",this.onDragStart,{passive:!0}),e.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const e=this.$el;e.removeEventListener("touchstart",this.onDragStart),e.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(e){this.beingDragged=!0,this.dragPos={x:jo(e),y:vb(e)},this.dragStart=jo(e),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(e){this.beingDragged&&(e.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:jo(e),y:vb(e)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,Sb(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),$P=["role"];function qP(e,l){const a=(0,t.resolveComponent)("Icon"),n=(0,t.resolveComponent)("CloseButton"),d=(0,t.resolveComponent)("ProgressBar");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(e.classes),style:(0,t.normalizeStyle)(e.draggableStyle),onClick:l[0]||(l[0]=(...c)=>e.clickHandler&&e.clickHandler(...c)),onMouseenter:l[1]||(l[1]=(...c)=>e.hoverPause&&e.hoverPause(...c)),onMouseleave:l[2]||(l[2]=(...c)=>e.hoverPlay&&e.hoverPlay(...c))},[e.icon?((0,t.openBlock)(),(0,t.createBlock)(a,{key:0,"custom-icon":e.icon,type:e.type},null,8,["custom-icon","type"])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("div",{role:e.accessibility.toastRole||"alert",class:(0,t.normalizeClass)(e.bodyClasses)},[typeof e.content=="string"?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createTextVNode)((0,t.toDisplayString)(e.content),1)],2112)):((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.getVueComponentFromObj(e.content)),(0,t.mergeProps)({key:1,"toast-id":e.id},e.hasProp(e.content,"props")?e.content.props:{},(0,t.toHandlers)(e.hasProp(e.content,"listeners")?e.content.listeners:{}),{onCloseToast:e.closeToast}),null,16,["toast-id","onCloseToast"]))],10,$P),e.closeButton?((0,t.openBlock)(),(0,t.createBlock)(n,{key:1,component:e.closeButton,"class-names":e.closeButtonClassName,"show-on-hover":e.showCloseButtonOnHover,"aria-label":e.accessibility.closeButtonLabel,onClick:(0,t.withModifiers)(e.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):(0,t.createCommentVNode)("v-if",!0),e.timeout?((0,t.openBlock)(),(0,t.createBlock)(d,{key:2,"is-running":e.isRunning,"hide-progress-bar":e.hideProgressBar,timeout:e.timeout,onCloseToast:e.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):(0,t.createCommentVNode)("v-if",!0)],38)}KW.render=qP;var e8=KW,HW=(0,t.defineComponent)({name:"VtTransition",props:da.TRANSITION,emits:["leave"],methods:{hasProp:Ut,leave(e){e instanceof HTMLElement&&(e.style.left=e.offsetLeft+"px",e.style.top=e.offsetTop+"px",e.style.width=getComputedStyle(e).width,e.style.position="absolute")}}});function l8(e,l){return(0,t.openBlock)(),(0,t.createBlock)(t.TransitionGroup,{tag:"div","enter-active-class":e.transition.enter?e.transition.enter:`${e.transition}-enter-active`,"move-class":e.transition.move?e.transition.move:`${e.transition}-move`,"leave-active-class":e.transition.leave?e.transition.leave:`${e.transition}-leave-active`,onLeave:e.leave},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}HW.render=l8;var PW=(0,t.defineComponent)({name:"VueToastification",devtools:{hide:!0},components:{Toast:e8,VtTransition:HW},props:Object.assign({},da.CORE_TOAST,da.CONTAINER,da.TRANSITION),data(){return{count:0,positions:Object.values(Qd),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const e=this.eventBus;e.on(ql.ADD,this.addToast),e.on(ql.CLEAR,this.clearToasts),e.on(ql.DISMISS,this.dismissToast),e.on(ql.UPDATE,this.updateToast),e.on(ql.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(e){vs(e)&&(e=await e()),IP(this.$el),e.appendChild(this.$el)},setToast(e){Ba(e.id)||(this.toasts[e.id]=e)},addToast(e){e.content=xP(e.content);const l=Object.assign({},this.defaults,e.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[e.type],e),a=this.defaults.filterBeforeCreate(l,this.toastArray);a&&this.setToast(a)},dismissToast(e){const l=this.toasts[e];!Ba(l)&&!Ba(l.onClose)&&l.onClose(),delete this.toasts[e]},clearToasts(){Object.keys(this.toasts).forEach(e=>{this.dismissToast(e)})},getPositionToasts(e){const l=this.filteredToasts.filter(a=>a.position===e).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?l.reverse():l},updateDefaults(e){Ba(e.container)||this.setup(e.container),this.defaults=Object.assign({},this.defaults,e)},updateToast({id:e,options:l,create:a}){this.toasts[e]?(l.timeout&&l.timeout===this.toasts[e].timeout&&l.timeout++,this.setToast(Object.assign({},this.toasts[e],l))):a&&this.addToast(Object.assign({},{id:e},l))},getClasses(e){return[`${la}__container`,e].concat(this.defaults.containerClassName)}}});function t8(e,l){const a=(0,t.resolveComponent)("Toast"),n=(0,t.resolveComponent)("VtTransition");return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.positions,d=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:d},[(0,t.createVNode)(n,{transition:e.defaults.transition,class:(0,t.normalizeClass)(e.getClasses(d))},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.getPositionToasts(d),c=>((0,t.openBlock)(),(0,t.createBlock)(a,(0,t.mergeProps)({key:c.id},c),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}PW.render=t8;var a8=PW,jb=(e={},l=!0)=>{const a=e.eventBus=e.eventBus||new Fs;l&&(0,t.nextTick)(()=>{const c=(0,t.createApp)(a8,vW({},e)),i=c.mount(document.createElement("div")),s=e.onMounted;if(Ba(s)||s(i,c),e.shareAppContext){const o=e.shareAppContext;o===!0||(c._context.components=o._context.components,c._context.directives=o._context.directives,c._context.mixins=o._context.mixins,c._context.provides=o._context.provides,c.config.globalProperties=o.config.globalProperties)}});const n=(c,i)=>{const s=Object.assign({},{id:TP(),type:Ul.DEFAULT},i,{content:c});return a.emit(ql.ADD,s),s.id};n.clear=()=>a.emit(ql.CLEAR,void 0),n.updateDefaults=c=>{a.emit(ql.UPDATE_DEFAULTS,c)},n.dismiss=c=>{a.emit(ql.DISMISS,c)};function d(c,{content:i,options:s},o=!1){const m=Object.assign({},s,{content:i});a.emit(ql.UPDATE,{id:c,options:m,create:o})}return n.update=d,n.success=(c,i)=>n(c,Object.assign({},i,{type:Ul.SUCCESS})),n.info=(c,i)=>n(c,Object.assign({},i,{type:Ul.INFO})),n.error=(c,i)=>n(c,Object.assign({},i,{type:Ul.ERROR})),n.warning=(c,i)=>n(c,Object.assign({},i,{type:Ul.WARNING})),n},n8=()=>{const e=()=>{};return new Proxy(e,{get(){return e}})};function Ad(e){return zP()?gP(e)?jb({eventBus:e},!1):jb(e,!0):n8()}var ks=Symbol("VueToastification"),R2=new Fs,d8=(e,l)=>{l?.shareAppContext===!0&&(l.shareAppContext=e);const a=Ad(vW({eventBus:R2},l));e.provide(ks,a)},c8=e=>{const l=Ad(e);(0,t.getCurrentInstance)()&&(0,t.provide)(ks,l)},QW=e=>{if(e)return Ad(e);const l=(0,t.getCurrentInstance)()?(0,t.inject)(ks,void 0):void 0;return l||Ad(R2)},AW=d8,i8={key:0,class:"custom-toast__icon"},s8={class:"custom-toast__content"},o8=(0,t.defineComponent)({name:"BglToast",__name:"Toast",props:{message:{},type:{},info:{type:Boolean},success:{type:Boolean},warning:{type:Boolean},error:{type:Boolean},showIcon:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},closeToast:{}},setup(e){const l=e,a=(0,t.computed)(()=>l.type?l.type:l.error?"error":l.warning?"warning":l.success?"success":"info");return(n,d)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["custom-toast",`custom-toast--${a.value}`])},[e.showIcon?((0,t.openBlock)(),(0,t.createElementBlock)("div",i8,[a.value==="success"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ne),{key:0,icon:"check_circle"})):(0,t.createCommentVNode)("",!0),a.value==="error"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ne),{key:1,icon:"dangerous"})):(0,t.createCommentVNode)("",!0),a.value==="warning"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ne),{key:2,icon:"report"})):(0,t.createCommentVNode)("",!0),a.value==="info"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ne),{key:3,icon:"info"})):(0,t.createCommentVNode)("",!0)])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",s8,(0,t.toDisplayString)(e.message),1),e.showCloseButton?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:1,class:"custom-toast__close",onClick:d[0]||(d[0]=(...c)=>e.closeToast&&e.closeToast(...c))},[(0,t.createVNode)((0,t.unref)(Ne),{icon:"close"})])):(0,t.createCommentVNode)("",!0)],2))}}),sd=o8,m8=AW||SW,{POSITION:u8}=SW,Wn=QW;const _W=Symbol("toast");var Ki=null;function Z8(){const e=(0,t.inject)(_W,null);if(!e){if(Ki)return Ki;throw new Error("Toast API not provided. Make sure ToastPlugin is installed via app.use(ToastPlugin)")}return e}function r8(){if(typeof document>"u")return;let e=document.getElementById("bgl-toast-container");e||(e=document.createElement("div"),e.setAttribute("popover","manual"),e.setAttribute("id","bgl-toast-container"),document.body.appendChild(e));try{e.hidePopover()}catch{}try{e.showPopover()}catch{}return e}const $W={install:(e,l={})=>{const a=r8(),n={position:u8.TOP_RIGHT,timeout:5e3,closeOnClick:!0,pauseOnFocusLoss:!0,pauseOnHover:!0,draggable:!0,draggablePercent:.6,showCloseButtonOnHover:!1,hideProgressBar:!0,closeButton:!1,icon:!1,rtl:!1,transition:"Vue-Toastification__fade",maxToasts:5,newestOnTop:!0,toastClassName:"custom-toast-wrapper",bodyClassName:"custom-toast-body",...a?{container:a}:{},...l};e.use(m8,n);function d(){const i=typeof document<"u"?document.getElementById("bgl-toast-container"):null;if(i){try{i.hidePopover()}catch{}try{i.showPopover()}catch{}}}const c={success:(i,s)=>(d(),Wn()({component:sd,props:{message:i,type:"success"}},s)),error:(i,s)=>(d(),Wn()({component:sd,props:{message:i,type:"error"}},s)),info:(i,s)=>(d(),Wn()({component:sd,props:{message:i,type:"info"}},s)),warning:(i,s)=>(d(),Wn()({component:sd,props:{message:i,type:"warning"}},s)),show:(i,s)=>(d(),Wn()({component:sd,props:{message:i,type:"info"}},s)),clear:()=>{Wn().clear()}};Ki||(Ki=c),e.provide(_W,c)}};var js=class extends Event{oldState;newState;constructor(e,{oldState:l="",newState:a="",...n}={}){super(e,n),this.oldState=String(l||""),this.newState=String(a||"")}},Jb=new WeakMap;function qW(e,l,a){Jb.set(e,setTimeout(()=>{Jb.has(e)&&e.dispatchEvent(new js("toggle",{cancelable:!1,oldState:l,newState:a}))},0))}var S2=globalThis.ShadowRoot||function(){},b8=globalThis.HTMLDialogElement||function(){},ii=new WeakMap,ta=new WeakMap,it=new WeakMap,En=new WeakMap;function Hi(e){return En.get(e)||"hidden"}var Pi=new WeakMap;function _d(e){return[...e].pop()}function h8(e){const l=e.popoverTargetElement;if(!(l instanceof HTMLElement))return;const a=Hi(l);e.popoverTargetAction==="show"&&a==="showing"||e.popoverTargetAction==="hide"&&a==="hidden"||(a==="showing"?Kn(l,!0,!0):Qa(l,!1)&&(Pi.set(l,e),su(l)))}function Qa(e,l){return!(e.popover!=="auto"&&e.popover!=="manual"&&e.popover!=="hint"||!e.isConnected||l&&Hi(e)!=="showing"||!l&&Hi(e)!=="hidden"||e instanceof b8&&e.hasAttribute("open")||document.fullscreenElement===e)}function Cb(e){if(!e)return 0;const l=ta.get(document)||new Set,a=it.get(document)||new Set;return a.has(e)?[...a].indexOf(e)+l.size+1:l.has(e)?[...l].indexOf(e)+1:0}function p8(e){const l=eG(e),a=W8(e);return Cb(l)>Cb(a)?l:a}function $d(e){let l;const a=it.get(e)||new Set,n=ta.get(e)||new Set,d=a.size>0?a:n.size>0?n:null;return d?(l=_d(d),l.isConnected?l:(d.delete(l),$d(e))):null}function Db(e){for(const l of e||[])if(!l.isConnected)e.delete(l);else return l;return null}function Bn(e){return typeof e.getRootNode=="function"?e.getRootNode():e.parentNode?Bn(e.parentNode):e}function eG(e){for(;e;){if(e instanceof HTMLElement&&e.popover==="auto"&&En.get(e)==="showing")return e;if(e=e instanceof Element&&e.assignedSlot||e.parentElement||Bn(e),e instanceof S2&&(e=e.host),e instanceof Document)return}}function W8(e){for(;e;){const l=e.popoverTargetElement;if(l instanceof HTMLElement)return l;if(e=e.parentElement||Bn(e),e instanceof S2&&(e=e.host),e instanceof Document)return}}function Ub(e,l){const a=new Map;let n=0;for(const i of l||[])a.set(i,n),n+=1;a.set(e,n),n+=1;let d=null;function c(i){if(!i)return;let s=!1,o=null,m=null;for(;!s;){if(o=eG(i)||null,o===null||!a.has(o))return;(e.popover==="hint"||o.popover==="auto")&&(s=!0),s||(i=o.parentElement)}m=a.get(o),(d===null||a.get(d)<m)&&(d=o)}return c(e.parentElement||Bn(e)),d}function G8(e){return e.hidden||e instanceof S2||(e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLOptGroupElement||e instanceof HTMLOptionElement||e instanceof HTMLFieldSetElement)&&e.disabled||e instanceof HTMLInputElement&&e.type==="hidden"||e instanceof HTMLAnchorElement&&e.href===""?!1:typeof e.tabIndex=="number"&&e.tabIndex!==-1}function N8(e){if(e.shadowRoot&&e.shadowRoot.delegatesFocus!==!0)return null;let l=e;l.shadowRoot&&(l=l.shadowRoot);let a=l.querySelector("[autofocus]");if(a)return a;{const c=l.querySelectorAll("slot");for(const i of c){const s=i.assignedElements({flatten:!0});for(const o of s){if(o.hasAttribute("autofocus"))return o;if(a=o.querySelector("[autofocus]"),a)return a}}}const n=e.ownerDocument.createTreeWalker(l,NodeFilter.SHOW_ELEMENT);let d=n.currentNode;for(;d;){if(G8(d))return d;d=n.nextNode()}}function Y8(e){var l;(l=N8(e))==null||l.focus()}var Qi=new WeakMap;function su(e){if(!Qa(e,!1))return;const l=e.ownerDocument;if(!e.dispatchEvent(new js("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"}))||!Qa(e,!1))return;let a=!1;const n=e.popover;let d=null;const c=Ub(e,ta.get(l)||new Set),i=Ub(e,it.get(l)||new Set);if(n==="auto"&&(ou(it.get(l)||new Set,a,!0),Aa(c||l,a,!0),d="auto"),n==="hint"&&(i?(Aa(i,a,!0),d="hint"):(ou(it.get(l)||new Set,a,!0),c?(Aa(c,a,!0),d="auto"):d="hint")),n==="auto"||n==="hint"){if(n!==e.popover||!Qa(e,!1))return;$d(l)||(a=!0),d==="auto"?(ta.has(l)||ta.set(l,new Set),ta.get(l).add(e)):d==="hint"&&(it.has(l)||it.set(l,new Set),it.get(l).add(e))}Qi.delete(e);const s=l.activeElement;e.classList.add(":popover-open"),En.set(e,"showing"),ii.has(l)||ii.set(l,new Set),ii.get(l).add(e),lG(Pi.get(e),!0),Y8(e),a&&s&&e.popover==="auto"&&Qi.set(e,s),qW(e,"closed","open")}function Kn(e,l=!1,a=!1){var n,d;if(!Qa(e,!0))return;const c=e.ownerDocument;if(["auto","hint"].includes(e.popover)&&(Aa(e,l,a),!Qa(e,!0)))return;const i=ta.get(c)||new Set,s=i.has(e)&&_d(i)===e;if(lG(Pi.get(e),!1),Pi.delete(e),a&&(e.dispatchEvent(new js("beforetoggle",{oldState:"open",newState:"closed"})),s&&_d(i)!==e&&Aa(e,l,a),!Qa(e,!0)))return;(n=ii.get(c))==null||n.delete(e),i.delete(e),(d=it.get(c))==null||d.delete(e),e.classList.remove(":popover-open"),En.set(e,"hidden"),a&&qW(e,"open","closed");const o=Qi.get(e);o&&(Qi.delete(e),l&&o.focus())}function L8(e,l=!1,a=!1){let n=$d(e);for(;n;)Kn(n,l,a),n=$d(e)}function ou(e,l=!1,a=!1){let n=Db(e);for(;n;)Kn(n,l,a),n=Db(e)}function Ob(e,l,a,n){let d=!1,c=!1;for(;d||!c;){c=!0;let i=null,s=!1;for(const o of l)if(o===e)s=!0;else if(s){i=o;break}if(!i)return;for(;Hi(i)==="showing"&&l.size;)Kn(_d(l),a,n);l.has(e)&&_d(l)!==e&&(d=!0),d&&(n=!1)}}function Aa(e,l,a){var n,d;const c=e.ownerDocument||e;if(e instanceof Document)return L8(c,l,a);if((n=it.get(c))!=null&&n.has(e)){Ob(e,it.get(c),l,a);return}ou(it.get(c)||new Set,l,a),(d=ta.get(c))!=null&&d.has(e)&&Ob(e,ta.get(c),l,a)}var Co=new WeakMap;function Eb(e){if(!e.isTrusted)return;const l=e.composedPath()[0];if(!l)return;const a=l.ownerDocument;if(!$d(a))return;const n=p8(l);if(n&&e.type==="pointerdown")Co.set(a,n);else if(e.type==="pointerup"){const d=Co.get(a)===n;Co.delete(a),d&&Aa(n||a,!1,!0)}}var Do=new WeakMap;function lG(e,l=!1){if(!e)return;Do.has(e)||Do.set(e,e.getAttribute("aria-expanded"));const a=e.popoverTargetElement;if(a instanceof HTMLElement&&a.popover==="auto")e.setAttribute("aria-expanded",String(l));else{const n=Do.get(e);n?e.setAttribute("aria-expanded",n):e.removeAttribute("aria-expanded")}}var Bb=globalThis.ShadowRoot||function(){};function X8(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype=="object"&&"popover"in HTMLElement.prototype}function ja(e,l,a){const n=e[l];Object.defineProperty(e,l,{value(d){return n.call(this,a(d))}})}var y8=/(^|[^\\]):popover-open\b/g;function M8(){return typeof globalThis.CSSLayerBlockRule=="function"}function V8(){const e=M8();return`
|
|
488
|
+
`);r=r.endsWith(".csv")?r:`${r}.csv`,r2(new Blob([W],{type:"text/csv;charset=utf-8"}),r)}async function d(Z){const r=await l(),b=await Z.arrayBuffer();return r.read(b)}async function c(Z){return(await d(Z)).SheetNames}async function i(Z,r,b=!0){const h=await l(),p=(await d(Z)).Sheets[r],N=h.utils.sheet_to_json(p,{header:1});if(N.length===0)return{headers:[],data:[]};let W=[],G=0;b?(W=N[0].map(L=>String(L||"").trim()),G=1):W=N[0].map((L,X)=>String.fromCharCode(65+X));const Y=[];for(let L=G;L<N.length;L++){const X=N[L],I={};for(let V=0;V<W.length;V++)V<X.length?I[W[V]]=X[V]:I[W[V]]="";Y.push(I)}return{headers:W,data:Y}}async function s(Z){const r=await l();return new Promise((b,h)=>{const p=new FileReader;p.onload=N=>{try{const W=new Uint8Array(N.target?.result),G=r.read(W,{type:"array"}),Y=G.SheetNames[0],L=G.Sheets[Y];b(r.utils.sheet_to_json(L))}catch(W){h(W)}},p.onerror=()=>{h(new Error("Failed to read file"))},p.readAsArrayBuffer(Z)})}function o(Z){return typeof Z=="number"&&Number.isInteger(Z)&&Z>=2e4&&Z<=5e4}function m(Z){const r=new Date(Date.UTC(1899,11,30));return new Date(r.getTime()+Z*(1440*60*1e3))}function u(Z,r=!1){if(!(Z instanceof Date)||Number.isNaN(Z.getTime()))return"";const b=Z.getFullYear(),h=String(Z.getMonth()+1).padStart(2,"0"),p=String(Z.getDate()).padStart(2,"0");return r?`${b}-${h}-${p}T${String(Z.getHours()).padStart(2,"0")}:${String(Z.getMinutes()).padStart(2,"0")}:${String(Z.getSeconds()).padStart(2,"0")}`:`${b}-${h}-${p}`}return{downloadExcel:a,downloadCSV:n,readExcelFile:s,ensureXLSXLoaded:l,getSheetNames:c,readSheetData:i,getWorkbook:d,isExcelSerialDate:o,excelSerialDateToJSDate:m,formatDate:u}}var eb={"to-t":"to top","to-b":"to bottom","to-l":"to left","to-r":"to right","to-tl":"to top left","to-tr":"to top right","to-bl":"to bottom left","to-br":"to bottom right"};function FB(e){if(e==null||e==="")return;if(typeof e=="string"&&e in eb)return eb[e];const l=Number(e);return Number.isFinite(l)?`${l}deg`:void 0}function kB(e){return typeof e!="string"?[]:e.trim().split(/\s+/).filter(Boolean)}function wo(e){const l=e.trim();return l.startsWith("var(")||l.startsWith("#")||/^(rgb|hsl|color-mix|linear-gradient)\(/.test(l)?l:l.startsWith("--")?`var(${l})`:`var(--bgl-${l})`}function Vs({gradient:e,gradientDir:l,color:a}){const n=(0,t.computed)(()=>{const c=(0,t.toValue)(e);return c===!0||typeof c=="string"&&c.trim()!==""}),d=(0,t.computed)(()=>[(0,t.toValue)(a),...kB((0,t.toValue)(e))].filter(Boolean));return{isGradient:n,gradientStyle:(0,t.computed)(()=>{if(!n.value)return{};const c={},i=FB((0,t.toValue)(l));i&&(c["--bgl-grad-angle"]=i);const s=d.value;if(s.length<2)return c;c["--bgl-grad-from"]=wo(s[0]),c["--bgl-grad-to"]=wo(s[s.length-1]);const o=s.slice(1,-1);return o.length&&(c["--bgl-grad-via"]=`${o.map(wo).join(", ")}, `),c}),stops:d}}async function jB(e){if("caches"in window)try{const l=await(await window.caches.open("img-cache")).match(e);if(l)return URL.createObjectURL(await l.blob())}catch{}}async function JB(e,l){if("caches"in window)try{await(await window.caches.open("img-cache")).put(e,new Response(l))}catch{}}async function CB(e){await rc("https://cdnjs.cloudflare.com/ajax/libs/heic2any/0.0.1/index.min.js");const l=await(await Ud("heic2any"))({blob:await(await fetch(Z2(e))).blob()});return await JB(e,l),URL.createObjectURL(l)}function b2(e){const l=(0,t.ref)(void 0),a=(0,t.ref)(!1);async function n(){a.value=!1;const d=Al((0,t.toValue)(e));if(d===void 0||d===""){l.value=void 0;return}try{if(d.split(".").pop()?.toLowerCase().split("?")[0]==="heic"){const c=await jB(d);if(c!==void 0&&c!==""){l.value=c;return}l.value=await CB(d)}else l.value=d}catch{a.value=!0,l.value=void 0}}return(0,t.watch)(()=>(0,t.toValue)(e),n,{immediate:!0}),{imageSrc:l,loadingError:a}}var In={},lb=!1,Am=typeof window<"u";function DB(){!Am||lb||(lb=!0,window.addEventListener("storage",e=>{e.key!==null&&e.key in In&&(In[e.key].value=e.newValue!==null?JSON.parse(e.newValue):null)}))}function UB(e,l=null){if(!(e in In)){const a=Am?localStorage.getItem(e):null;In[e]=(0,t.ref)(a!==null?JSON.parse(a):l),(0,t.watch)(In[e],n=>{Am&&localStorage.setItem(e,JSON.stringify(n))})}return In[e]}function x5(e){return DB(),new Proxy({},{get(l,a){return UB(a,e?.[a]??null)}})}var z5=1e3,OB=60*z5;function EB(e,l={}){const{interval:a=30*z5,inactivityThreshold:n=5*OB,pauseInBackground:d=!0}=l,{idle:c}=fT(n),i=(0,t.ref)(!0),s=(0,t.ref)(null),o=()=>!d||document.visibilityState==="visible",m=()=>{i.value=!1,s.value!==null&&(clearTimeout(s.value),s.value=null)},u=()=>{s.value!==null&&(clearTimeout(s.value),s.value=null)},Z=()=>{s.value!==null&&(clearTimeout(s.value),s.value=null);const h=async()=>{if(i.value&&o()&&!c.value)try{await e()}catch{}i.value&&(s.value=window.setTimeout(h,a))};h()},r=()=>{i.value&&Z()};function b(){document.visibilityState==="visible"?i.value&&Z():d&&u()}return(0,t.onMounted)(()=>{document.addEventListener("visibilitychange",b),Z()}),(0,t.onUnmounted)(()=>{document.removeEventListener("visibilitychange",b),m()}),{isPolling:i,pausePolling:u,resumePolling:r,startPolling:Z,stopPolling:m}}function BB(){const e=(0,t.ref)(!1);let l;function a(n){e.value=n.matches}return(0,t.onMounted)(()=>{typeof window>"u"||!window.matchMedia||(l=window.matchMedia("(prefers-reduced-motion: reduce)"),e.value=l.matches,l.addEventListener("change",a))}),(0,t.onUnmounted)(()=>{l?.removeEventListener("change",a)}),e}function KB(e,l,a){const n={...e};return a===void 0?delete n[l]:n[l]=a,n}function HB(e){const l=(0,Ta.useRoute)(),a=(0,Ta.useRouter)(),n={};return new Proxy({},{get(d,c){if(!(c in n)){const i=e?.[c];n[c]=(0,t.computed)({get:()=>l.query[c]??i,set:s=>a.replace({query:KB(l.query,c,s)})})}return n[c]}})}var Xt=(0,t.ref)([{value:"dark",class:"bgl-dark-mode",icon:"cloudy_night",label:"Dark Mode",isDark:!0},{value:"light",class:"bgl-light-mode",icon:"brightness_7",label:"Light Mode",isDark:!1},{value:"system",class:"system",icon:"settings_input_component",label:"System Default"}]),tb="color-mode",Nt=(0,t.ref)("system"),_m=(0,t.ref)(!1),h2=(0,t.ref)(!1),Fi=(0,t.ref)(!1),p2=typeof window<"u";function PB(){return h2.value&&p2&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}function ab(e){return Xt.value.find(l=>l.value===e)}function di(e){if(!p2)return;const l=document.documentElement;if(Xt.value.forEach(a=>{a.class!=="system"&&l.classList.remove(a.class)}),e==="system"){const a=PB();_m.value=a;const n=Xt.value.find(i=>i.value==="dark"),d=Xt.value.find(i=>i.value==="light"),c=a?n:d;c&&l.classList.add(c.class)}else{const a=ab(e),n=a&&a.isDark&&!h2.value?ab("light"):a;n&&(l.classList.add(n.class),_m.value=n.isDark??!1)}}function QB(){const e=Xt.value.filter(l=>l.value!=="system");e.length!==0&&(Nt.value=e[(e.findIndex(l=>l.value===Nt.value)+1)%e.length].value)}function AB(e={}){e.allowDark!==void 0&&(h2.value=e.allowDark),e.manualSelection!==void 0&&(Fi.value=e.manualSelection),g5(),Fi.value||(Nt.value="system"),di(Nt.value)}function _B(e){if(!Xt.value.some(l=>l.value===e.value)){const l=Xt.value.findIndex(a=>a.value==="system");l>-1?Xt.value.splice(l,0,e):Xt.value.push(e)}}var nb=!1;function g5(){if(!(nb||!p2)){if(nb=!0,Fi.value){const e=window.localStorage.getItem(tb);Xt.value.some(l=>l.value===e)&&(Nt.value=e)}else Nt.value="system";di(Nt.value),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Nt.value==="system"&&di("system")}),(0,t.watch)(Nt,e=>{Fi.value&&localStorage.setItem(tb,e),di(e)})}}function $B(){return g5(),{isDark:_m,theme:(0,t.computed)(()=>Nt.value),themeOptions:Xt,toggleTheme:QB,addTheme:_B,setTheme:e=>{Nt.value=e}}}function w5(e,l,a,n){xT(e,(d,c)=>{if(l?.()?.setCustomValidity(""),!a||d===c||!d)return;const i=a(d,n?.());typeof i=="string"&&l?.()?.setCustomValidity(i)},{debounce:500})}function R5({schema:e,columns:l,data:a}={}){const n=(0,t.computed)(()=>(0,t.toValue)(e)),d=(0,t.computed)(()=>(0,t.toValue)(l));return n.value?d.value&&d.value.length>0?n.value.filter(c=>d.value?.includes(c.id)):n.value:V5(a,d.value)}const qB={s:"400px",m:"540px",l:"720px",xl:"960px",full:"100%"};var eK={key:0,class:"dialog-grip","aria-hidden":"true"},lK={key:2,class:"flex-grow-1"},tK=(0,t.defineComponent)({__name:"Dialog",props:{open:{type:Boolean},title:{},width:{default:"m"},position:{default:"center"},dismissable:{type:Boolean,default:!0},flat:{type:Boolean,default:!0},thin:{type:Boolean,default:!1},centerTitle:{type:Boolean,default:!1},ellipsisTitle:{type:Boolean,default:!1},closePlacement:{default:"header-end"},grip:{type:Boolean,default:void 0}},emits:["update:open","close"],setup(e,{expose:l,emit:a}){const n=e,d=(0,t.computed)(()=>n.grip??n.position==="bottom"),c=a,i=(0,t.ref)(null),s=(0,t.ref)(!1),o=(0,t.ref)(!0),m=(0,t.computed)(()=>qB[n.width]),u=(0,t.computed)(()=>n.position==="left"?"dialog-left ms-1 me-auto mt-1 mb-1 height-100-2 m_m-0 m_h-100vh m_max-h-100vh m_radius-0":n.position==="right"?"dialog-right me-1 ms-auto mt-1 mb-1 height-100-2 m_m-0 m_h-100vh m_max-h-100vh m_radius-0":n.position==="top"?"dialog-top mx-auto mt-1 mb-auto":n.position==="bottom"?"dialog-bottom mx-auto mb-1 mt-auto":"dialog-center mx-auto");(0,t.watch)(()=>n.open,N=>{N?(i.value?.showModal(),s.value=!1,o.value=!1,setTimeout(()=>{o.value=!0},250)):Z()}),(0,t.onMounted)(()=>{n.open&&i.value?.showModal()});function Z(){s.value||(s.value=!0)}function r(){s.value&&(i.value?.close(),s.value=!1,c("close"))}function b(N){N.target===i.value&&n.dismissable&&c("update:open",!1)}function h(N){if(!n.dismissable){N.preventDefault();return}c("update:open",!1)}function p(){o.value=!1,c("update:open",!1)}return l({close:p}),(N,W)=>((0,t.openBlock)(),(0,t.createElementBlock)("dialog",{ref_key:"dialogRef",ref:i,class:(0,t.normalizeClass)([[u.value,{"is-closing":s.value}],"border-none shadow-30 p-0 testMe1 dialog-no-focus-outline"]),style:(0,t.normalizeStyle)({"--dialog-width":m.value}),onClick:b,onCancel:h,onAnimationend:r},[(0,t.createElementVNode)("div",{class:"grid grid-dialog max-height-100-2",tabindex:"-1",autofocus:"",onClick:W[0]||(W[0]=(0,t.withModifiers)(()=>{},["stop"]))},[d.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",eK)):(0,t.createCommentVNode)("",!0),e.title||N.$slots.header||e.dismissable?((0,t.openBlock)(),(0,t.createElementBlock)("header",{key:1,class:(0,t.normalizeClass)(["flex space-between flex-shrink-0 align-items-start gap-05",{"border-bottom":!e.flat,"border-none":!e.title&&!N.$slots.header,"m_ps-1":e.title||N.$slots.header,"p-05 m_p-05":!e.title&&!N.$slots.header,"ps-1-5 pe-1 py-1 ":!e.thin&&(e.title||N.$slots.header),"ps-1 pe-05 py-05":e.thin&&(e.title||N.$slots.header)}])},[e.dismissable&&e.closePlacement==="header-start"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:0,flat:"",icon:"close","aria-label":"Close",class:"dialog-close relative z-2",thin:"",onClick:p})):(0,t.createCommentVNode)("",!0),e.title||N.$slots.header?((0,t.openBlock)(),(0,t.createElementBlock)("h3",{key:1,class:(0,t.normalizeClass)(["dialog-title m-0 txt20 semi w-100p",{"txt-center balance":e.centerTitle,"word-break-all":!e.centerTitle,"ellipsis-1":e.ellipsisTitle}])},[(0,t.renderSlot)(N.$slots,"header",{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.title),1)],!0)],2)):(0,t.createCommentVNode)("",!0),!e.title&&!N.$slots.header?((0,t.openBlock)(),(0,t.createElementBlock)("div",lK)):(0,t.createCommentVNode)("",!0),e.dismissable&&e.closePlacement==="header-end"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:3,flat:"",icon:"close","aria-label":"Close",class:"dialog-close relative z-2",thin:"",onClick:p})):(0,t.createCommentVNode)("",!0)],2)):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["overflow-y flex-grow-1 m_p-1",{"px-1 py-05":e.thin,"px-1-5 py-1":!e.thin}])},[(0,t.renderSlot)(N.$slots,"default",{},void 0,!0)],2),N.$slots.footer?((0,t.openBlock)(),(0,t.createElementBlock)("footer",{key:2,class:(0,t.normalizeClass)(["flex flex-shrink-0 gap-05 m_px-05 m_py-05 justify-content-end",{"border-top":!e.flat,"px-05 py-05":e.thin,"px-1-5 py-1":!e.thin}])},[(0,t.renderSlot)(N.$slots,"footer",{},void 0,!0)],2)):(0,t.createCommentVNode)("",!0)]),e.dismissable&&e.closePlacement==="overlay-start"&&o.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:0,icon:"close","aria-label":"Close",class:"fixed top-1 start-1 z-999 overlay-btn",onClick:p})):(0,t.createCommentVNode)("",!0),e.dismissable&&e.closePlacement==="overlay-end"&&o.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:1,icon:"close","aria-label":"Close",class:"fixed top-1 end-1 z-999 overlay-btn",onClick:p})):(0,t.createCommentVNode)("",!0)],38))}}),_t=Le(tK,[["__scopeId","data-v-42595465"]]),aK=(0,t.defineComponent)({__name:"DialogConfirm",props:{open:{type:Boolean},title:{},message:{},width:{default:"s"},position:{default:"center"},dismissable:{type:Boolean,default:!0},confirmText:{},cancelText:{},confirmColor:{default:"primary"}},emits:["update:open","resolve"],setup(e,{emit:l}){const a=e,n=l,{$t:d}=tl(),c=(0,t.computed)(()=>a.title||d("modalConfirm.title")),i=(0,t.computed)(()=>a.confirmText||d("modalConfirm.confirm")),s=(0,t.computed)(()=>a.cancelText||d("modalConfirm.cancel"));function o(){n("resolve",!0),n("update:open",!1)}function m(){n("resolve",!1),n("update:open",!1)}function u(){n("resolve",!1)}return(Z,r)=>((0,t.openBlock)(),(0,t.createBlock)(_t,{open:e.open,title:c.value,width:e.width,position:e.position,dismissable:e.dismissable,"onUpdate:open":r[0]||(r[0]=b=>Z.$emit("update:open",b)),onClose:u},{footer:(0,t.withCtx)(()=>[(0,t.createVNode)(oe,{flat:"",onClick:m},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(s.value),1)]),_:1}),(0,t.createVNode)(oe,{color:e.confirmColor,onClick:o},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(i.value),1)]),_:1},8,["color"])]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("p",null,(0,t.toDisplayString)(e.message),1)]),_:1},8,["open","title","width","position","dismissable"]))}}),S5=aK,xn=new Map,$m=new Set,v5=/^[a-z0-9][a-z0-9._-]*:[a-z0-9][a-z0-9._-]*$/i;function nK(e){if(!v5.test(e.type))throw new Error(`Custom form field type "${e.type}" must be a namespaced ID such as "acme:rating"`);if(xn.has(e.type))throw new Error(`Custom form field type "${e.type}" is already registered`);return xn.set(e.type,e),$m.delete(e.type),()=>{xn.get(e.type)===e&&xn.delete(e.type)}}function Yt(e){return xn.get(e)}function dK(){return[...xn.values()]}function Ts(e){return v5.test(e)}function Is(e){!Ts(e)||$m.has(e)||$m.add(e)}function cK(e,l,a={},n=""){return Yt(e)?.display?.(l,{key:n,config:a})}function W2(e,l){const a={...l};for(const[n,d]of Object.entries(e)){const c=Yt(d._type)?.toSubmission;if(!c)continue;const i=c(a[n],{key:n,config:d._config,formData:l});i===void 0?delete a[n]:a[n]=i}return a}const iK=12,sK=12,oK=1;var f5=/^col-(\d{1,2})\/12$/,F5=/^start-col-(\d{1,2})$/,k5=/^m_col-(\d{1,2})\/12$/,j5=/^start-row-(\d+)$/,J5=/^(?:grid-)?span-row-(\d+)$/,C5=/^m_start-col-(\d{1,2})$/,D5=/^m_start-row-(\d+)$/,U5=/^m_(?:grid-)?span-row-(\d+)$/,ki={"col-1/12":1,"col-1/6":2,"col-2/12":2,"col-1/4":3,"col-3/12":3,"col-1/3":4,"col-4/12":4,"col-5/12":5,"col-1/2":6,"col-6/12":6,"col-7/12":7,"col-2/3":8,"col-8/12":8,"col-3/4":9,"col-9/12":9,"col-5/6":10,"col-10/12":10,"col-11/12":11,"col-full":12,"col-12/12":12},qm=Object.fromEntries(Object.entries(ki).map(([e,l])=>[`m_${e}`,l]));function Sa(e){return Math.max(1,Math.min(12,Math.round(e)))}function xs(e){return Math.max(1,Math.round(e))}function O5(e){return`col-${Sa(e)}/12`}function E5(e){return`start-col-${Sa(e)}`}function B5(e){return`m_col-${Sa(e)}/12`}function K5(e){return`span-row-${xs(e)}`}function mK(e){return`start-row-${Math.max(1,Math.round(e))}`}function H5(e){return`m_start-col-${Sa(e)}`}function P5(e){return`m_start-row-${Math.max(1,Math.round(e))}`}function Q5(e){return`m_span-row-${xs(e)}`}function G2(e){if(e)for(const l of e.split(/\s+/)){if(l.startsWith("m_"))continue;const a=l.match(f5);if(a)return Sa(Number(a[1]));if(l in ki)return ki[l]}}function N2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(F5);if(a)return Sa(Number(a[1]))}}function Y2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(k5);if(a)return Sa(Number(a[1]));if(l in qm)return qm[l]}}function L2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(C5);if(a)return Sa(Number(a[1]))}}function X2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(J5);if(a)return xs(Number(a[1]))}}function y2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(j5);if(a)return Math.max(1,Number(a[1]))}}function M2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(D5);if(a)return Math.max(1,Number(a[1]))}}function V2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(U5);if(a)return xs(Number(a[1]))}}function T2(e){return e?e.split(/\s+/).filter(Boolean).filter(l=>!f5.test(l)&&!F5.test(l)&&!k5.test(l)&&!j5.test(l)&&!J5.test(l)&&!C5.test(l)&&!D5.test(l)&&!U5.test(l)&&!(l in ki)&&!(l in qm)).join(" "):""}function A5(e,l){const a=T2(e),n=a?[a]:[];return l.colSpan!==void 0&&l.colSpan!==12&&n.push(O5(l.colSpan)),l.colStart!==void 0&&n.push(E5(l.colStart)),l.rowStart!==void 0&&n.push(mK(l.rowStart)),l.rowSpan!==void 0&&l.rowSpan!==1&&n.push(K5(l.rowSpan)),l.mColSpan!==void 0&&l.mColSpan!==12&&n.push(B5(l.mColSpan)),l.mColStart!==void 0&&n.push(H5(l.mColStart)),l.mRowStart!==void 0&&n.push(P5(l.mRowStart)),l.mRowSpan!==void 0&&l.mRowSpan!==1&&n.push(Q5(l.mRowSpan)),n.join(" ")}function _5(e){return{colSpan:G2(e),colStart:N2(e),rowStart:y2(e),rowSpan:X2(e),mColSpan:Y2(e),mColStart:L2(e),mRowStart:M2(e),mRowSpan:V2(e)}}var uK=(0,t.defineComponent)({__name:"FormFlow",props:{schema:{},modelValue:{},components:{},errors:{},onSubmit:{type:Function}},emits:["update:modelValue"],setup(e,{expose:l,emit:a}){const n=e,d=a,{$t:c}=tl();function i(v,B){const O=B.split(".");let w=v;for(const y of O)w=w?.[y];return w}function s(v,B,O){const w=B.split(".");let y=v;for(let R=0;R<w.length-1;R++){const g=w[R];(y[g]==null||typeof y[g]!="object")&&(y[g]={}),y=y[g]}y[w[w.length-1]]=O}function o(v){if(v==null||typeof v!="object")return v;try{return structuredClone(v)}catch{return JSON.parse(JSON.stringify(v))}}function m(v,B,O,w){const y=Yt(v._type);if(y?.coerce)return y.coerce(B,{key:O,config:v._config,formData:w});if(typeof B!="string")return B;const R=B.trim();switch(v._type){case"checkbox":case"toggle":return R.toLowerCase()==="true"?!0:R.toLowerCase()==="false"?!1:B;case"number":case"range":{if(!R)return B;const g=Number(R);return Number.isNaN(g)?B:g}default:return B}}function u(v){const B={...v??{}};for(const[O,w]of Object.entries(n.schema._fields)){const y=i(B,O);if(y!==void 0){s(B,O,m(w,y,O,B));continue}const R=w._config.default;R!==void 0&&s(B,O,m(w,o(R),O,B))}return B}function Z(v){const B=v._config.schema;if(B&&typeof B.getDefaults=="function"){const w=o(B.getDefaults());if(w&&Object.keys(w).length>0)return w}const O=v._config.default;return Array.isArray(O)&&O.length>0&&O[0]!=null&&typeof O[0]=="object"?o(r(O[0])):{}}function r(v){try{return JSON.parse(JSON.stringify(v))}catch{return{...v}}}const b=(0,t.ref)(u(n.modelValue)),h=(0,t.ref)({}),p=(0,t.ref)(!1),N=(0,t.ref)("idle"),W=(0,t.ref)();let G=!1;(0,t.watch)(()=>n.modelValue,v=>{G||(b.value=u(v))},{deep:!0}),(0,t.watch)(b,v=>{G=!0,d("update:modelValue",o(v)),(0,t.nextTick)(()=>{G=!1})},{deep:!0});function Y(v){return v._hidden?!1:v._condition==null?!0:fu(v._condition,b.value)}function L(v,B){if(B._condition==null)return v;const O=B._condition.trim().split(/\s+/)[0];if(!O)return v;const w=i(b.value,O);return w==null?v:`${v}:${String(w)}`}const X=(0,t.computed)(()=>{const v=[];for(const[B,O]of Object.entries(n.schema._fields))Y(O)&&v.push({key:B,field:O});return v});function I(v){if(!n.schema._class?.split(/\s+/).includes("free-grid"))return;const{rowStart:B,rowSpan:O,mRowStart:w,mRowSpan:y}=_5(v._class);if(!(!B&&!w&&!O&&!y))return{...B?{"--bgl-grid-row-start":String(B)}:{},...w?{"--bgl-mobile-grid-row-start":String(w)}:{},...O?{"--bgl-grid-row-span":String(O)}:{},...y?{"--bgl-mobile-grid-row-span":String(y)}:{}}}function V(v,B,O){s(b.value,v,B),(N.value==="success"||N.value==="error")&&(N.value="idle"),p.value&&z(v,O)}function M(v,B,O){const w=Yt(B._type);return w?.isEmpty?w.isEmpty(v,{key:O,config:B._config,formData:b.value}):v==null||v===""||v===!1&&B._type==="checkbox"||Array.isArray(v)&&v.length===0||B._type==="tel"&&typeof v=="string"&&/^\+\d{1,3}$/.test(v)}function z(v,B){const O=T(v);if(B._config.required===!0&&M(O,B,v))return h.value={...h.value,[v]:B._config.requiredMessage??c("form.required")},!1;if(B._type==="email"&&O&&!Da.test(O))return h.value={...h.value,[v]:c("form.invalidEmail")},!1;const w=Yt(B._type)?.validate?.(O,{key:v,config:B._config,formData:b.value});if(w!==void 0&&w!==!0)return h.value={...h.value,[v]:w},!1;if(B._validations!=null)for(const y of B._validations){const R=y(O);if(R!==!0)return h.value={...h.value,[v]:R},!1}return h.value=Object.fromEntries(Object.entries(h.value).filter(([y])=>y!==v)),!0}function T(v){return i(b.value,v)}function F(v,B){return B._config.label!=null?B._config.label:v.split(/[._-]/).map(O=>O.charAt(0).toUpperCase()+O.slice(1)).join(" ")}function f(v){if(typeof v!="string"&&(v._type==="select"||v._type==="multiselect")&&v._config.display==="btn")return n.components?.selectBtn??Cu;const B=typeof v=="string"?v:v._type;if(B&&n.components?.[B]!=null)return n.components[B];const O=B?Yt(B)?.component:void 0;return O||(B&&Ts(B)&&Is(B),{text:ke,email:ku,password:Rh,number:pt,tel:l2,url:ke,date:Ha,time:ke,datetime:Ha,textarea:ke,richtext:Xi,json:Fu,checkbox:zl,toggle:Ys,radio:vh,select:Dl,multiselect:Dl,array:Yn,heading:jm,divider:jm,upload:Fd,color:vt,icon:Xh,range:Ju}[B]??ke)}const k=(0,t.computed)(()=>{const v={...h.value,...n.errors||{}},B={};for(const[O,w]of Object.entries(v))B[O]=Ve(w)??w;return B});function D(v,B){const O=F(B,v),{helpText:w,...y}=v._config,R=n.schema._class?.split(/\s+/).includes("free-grid")??!1,g={label:O,modelValue:T(B),"onUpdate:modelValue":le=>{V(B,le,v)},error:k.value[B],...y,formData:b.value,...w!=null?{helptext:w}:{},name:v._config.name??B};if(v._type==="textarea"&&(g.multiline=!0),v._type==="multiselect"&&(g.multiselect=!0),R&&v._type==="richtext"&&(g.fullHeight=!0),R&&(v._type==="upload"||v._type==="file")&&(g.height=v._config.hideLabel?"100%":"calc(100% - 1.75rem)"),(v._type==="select"||v._type==="multiselect")&&typeof g.options=="function"){const le=g.options;g.options=J=>le(J,b.value)}if(v._type==="json"&&(g.language=g.language??"json"),v._type==="array"){delete g.default,delete g.schema,delete g.itemType;const{helpText:le,...J}=Object.fromEntries(Object.entries(v._config).filter(([ie])=>ie!=="schema"&&ie!=="itemType"&&ie!=="default"));Object.assign(g,J),le!=null&&(g.helptext=le),delete g.helpText,g.modelValue=T(B),g["onUpdate:modelValue"]=ie=>{V(B,ie,v)},g.allowAdd=g.allowAdd??!0,g.allowDelete=g.allowDelete??!0}return g}function Q(v,B){return{...v._component?.props??{},...D(v,B)}}function K(v){return typeof v=="string"&&n.components?.[v]!=null?n.components[v]:v}function E(v){return v._component!=null}function te(){let v=!0;const B={};for(const{key:O,field:w}of X.value){const y=T(O);if(w._config.required===!0&&M(y,w,O)){B[O]=w._config.requiredMessage??c("form.required"),v=!1;continue}if(w._type==="email"&&y&&!Da.test(y)){B[O]=c("form.invalidEmail"),v=!1;continue}const R=Yt(w._type)?.validate?.(y,{key:O,config:w._config,formData:b.value});if(R!==void 0&&R!==!0){B[O]=R,v=!1;continue}if(w._validations!=null)for(const g of w._validations){const le=g(y);if(le!==!0){B[O]=le,v=!1;break}}}return h.value=B,v}async function ee(v){v&&v.preventDefault(),p.value=!0;const B=te();if(B){if(n.onSubmit){N.value="submitting";try{await n.onSubmit(W2(n.schema._fields,b.value)),N.value="success"}catch{N.value="error"}}}else{v?.stopPropagation(),W.value?.reportValidity();const O=X.value.find(({key:w})=>h.value[w])?.key;if(O!=null&&W.value){const w=W.value.querySelector(`[name="${O}"]`)||W.value.querySelector(`[id="${O}"]`)||W.value.querySelector(`[data-field="${O}"]`)||W.value.querySelector("input, select, textarea");w&&(w.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(()=>{w instanceof HTMLElement&&w.focus()},300))}}return B}return l({validate:te,submit:ee,formState:N}),(v,B)=>{const O=(0,t.resolveComponent)("FormFlow",!0);return(0,t.openBlock)(),(0,t.createElementBlock)("form",{ref_key:"formElement",ref:W,class:(0,t.normalizeClass)(["grid-form",e.schema._class]),onSubmit:ee},[N.value==="success"?(0,t.renderSlot)(v.$slots,"success",{key:0,formData:b.value}):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(X.value,({key:w,field:y})=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:L(w,y),class:(0,t.normalizeClass)([y._class,y._config.class]),style:(0,t.normalizeStyle)(I(y))},[(0,t.renderSlot)(v.$slots,`field:${w}`,{value:T(w),field:y,formData:b.value,error:h.value[w],onChange:R=>{V(w,R,y)}},()=>[y._type==="array"&&y._config.schema?._isSchema?((0,t.openBlock)(),(0,t.createBlock)(Yn,(0,t.mergeProps)({key:0,ref_for:!0},D(y,w),{"create-item":()=>Z(y)}),{default:(0,t.withCtx)(({item:R})=>[(0,t.createVNode)(O,{"model-value":R.value,schema:y._config.schema,components:e.components,"onUpdate:modelValue":g=>{R.value=g}},null,8,["model-value","schema","components","onUpdate:modelValue"])]),_:2},1040,["create-item"])):y._type==="array"&&typeof y._config.schema=="string"?((0,t.openBlock)(),(0,t.createBlock)(Yn,(0,t.mergeProps)({key:1,ref_for:!0},D(y,w),{"create-item":()=>""}),{default:(0,t.withCtx)(({item:R})=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(f(y._config.schema)),{"model-value":R.value,"onUpdate:modelValue":g=>{R.value=g}},null,8,["model-value","onUpdate:modelValue"]))]),_:2},1040)):y._type==="array"&&y._config.schema?((0,t.openBlock)(),(0,t.createBlock)(Yn,(0,t.mergeProps)({key:2,ref_for:!0},D(y,w),{"create-item":()=>Z(y)}),{default:(0,t.withCtx)(({item:R})=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(K(y._config.schema)),{modelValue:R.value,"onUpdate:modelValue":g=>R.value=g},null,8,["modelValue","onUpdate:modelValue"]))]),_:2},1040,["create-item"])):y._type==="array"&&y._config.itemType?((0,t.openBlock)(),(0,t.createBlock)(Yn,(0,t.mergeProps)({key:3,ref_for:!0},D(y,w),{"create-item":()=>""}),{default:(0,t.withCtx)(({item:R})=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(f(y._config.itemType)),{"model-value":R.value,"onUpdate:modelValue":g=>{R.value=g}},null,8,["model-value","onUpdate:modelValue"]))]),_:2},1040)):E(y)?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(K(y._component.component)),(0,t.mergeProps)({key:4,ref_for:!0},Q(y,w)),null,16)):((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(f(y)),(0,t.mergeProps)({key:5,ref_for:!0},D(y,w)),null,16))])],6))),128)),(0,t.renderSlot)(v.$slots,"errors",{errors:k.value,errorCount:Object.keys(k.value).filter(w=>k.value[w]).length,visibleFields:X.value}),N.value==="error"?(0,t.renderSlot)(v.$slots,"error",{key:0,formData:b.value}):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(v.$slots,"submit",{submit:ee,validate:te,formData:b.value,errors:k.value,formState:N.value})],64))],34)}}}),zs=uK,ZK={key:0,class:"dialog-form-error bg-red-30 color-red radius-1 mb-1 txt14 px-1 py-075"},rK={key:1,class:"mb-1 mt-0"},bK=(0,t.defineComponent)({__name:"DialogForm",props:{open:{type:Boolean},title:{},width:{default:"m"},position:{default:"center"},dismissable:{type:Boolean,default:!0},schema:{},modelValue:{},message:{},onSubmit:{},onDelete:{},submitText:{},cancelText:{},deleteText:{}},emits:["update:open","resolve"],setup(e,{emit:l}){const a=e,n=l,{$t:d}=tl(),c=(0,t.ref)({...a.modelValue||{}}),i=(0,t.ref)(!1),s=(0,t.ref)(!1),o=(0,t.ref)(null),m=(0,t.ref)(),u=(0,t.computed)(()=>typeof a.onDelete=="function");async function Z(){if(!i.value){if(!m.value?.validate()){o.value=d("dialogForm.validationError");return}o.value=null,i.value=!0;try{a.onSubmit&&await a.onSubmit(c.value),n("resolve",{action:"submit",data:c.value}),n("update:open",!1)}catch(p){o.value=p instanceof Error?p.message:d("dialogForm.errorOccurred")}finally{i.value=!1}}}async function r(){if(!(s.value||!a.onDelete)){o.value=null,s.value=!0;try{await a.onDelete(c.value),n("resolve",{action:"delete",data:c.value}),n("update:open",!1)}catch(p){o.value=p instanceof Error?p.message:d("dialogForm.errorOccurred")}finally{s.value=!1}}}function b(){n("resolve",{action:"cancel",data:c.value}),n("update:open",!1)}function h(){n("resolve",{action:"cancel",data:c.value})}return(p,N)=>((0,t.openBlock)(),(0,t.createBlock)(_t,{open:e.open,title:e.title,width:e.width,position:e.position,dismissable:e.dismissable,"onUpdate:open":N[1]||(N[1]=W=>p.$emit("update:open",W)),onClose:h},{footer:(0,t.withCtx)(()=>[u.value?((0,t.openBlock)(),(0,t.createBlock)(oe,{key:0,color:"red",flat:"",loading:s.value,disabled:i.value,class:"me-auto",thin:"",onClick:r},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.deleteText||(0,t.unref)(d)("dialogForm.delete")),1)]),_:1},8,["loading","disabled"])):(0,t.createCommentVNode)("",!0),N[2]||(N[2]=(0,t.createElementVNode)("div",{class:"flex-grow-1"},null,-1)),(0,t.createVNode)(oe,{flat:"",disabled:i.value||s.value,onClick:b,thin:""},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.cancelText||(0,t.unref)(d)("dialogForm.cancel")),1)]),_:1},8,["disabled"]),(0,t.createVNode)(oe,{color:"primary",loading:i.value,disabled:s.value,onClick:Z},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.submitText||(0,t.unref)(d)("dialogForm.save")),1)]),_:1},8,["loading","disabled"])]),default:(0,t.withCtx)(()=>[o.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",ZK,(0,t.toDisplayString)(o.value),1)):(0,t.createCommentVNode)("",!0),e.message?((0,t.openBlock)(),(0,t.createElementBlock)("p",rK,(0,t.toDisplayString)(e.message),1)):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(zs,{ref_key:"formFlowRef",ref:m,modelValue:c.value,"onUpdate:modelValue":N[0]||(N[0]=W=>c.value=W),schema:e.schema,onSubmit:Z},null,8,["modelValue","schema"])]),_:1},8,["open","title","width","position","dismissable"]))}}),$5=bK;const I2=Symbol("dialog");var ji=null;function q5(){let e=null;try{e=(0,t.inject)(I2,null)}catch{e=null}if(!e){if(ji)return ji;throw new Error("Dialog API not provided. Make sure DialogPlugin is installed via app.use(DialogPlugin)")}return e}const eW={install:e=>{let l=0;const a=(0,t.reactive)([]),n={form:c=>new Promise(i=>{const s=++l;a.push({id:s,type:"form",options:c,resolve:i,open:!0})}),confirm:c=>new Promise(i=>{const s=++l,o=typeof c=="string"?{message:c}:c;a.push({id:s,type:"confirm",options:o,resolve:i,open:!0})}),open:c=>{const i=++l,s={id:i,type:"open",options:c,resolve:()=>{},open:!0};return a.push(s),{close:()=>{const o=a.findIndex(m=>m.id===i);o!==-1&&(a[o].open=!1,setTimeout(()=>{const m=a.findIndex(u=>u.id===i);m!==-1&&a.splice(m,1)},200))}}}};ji||(ji=n),e.provide(I2,n);const d=(0,t.defineComponent)({name:"DialogContainer",setup(){function c(o,m){o.resolve(m),o.open=!1,setTimeout(()=>{const u=a.findIndex(Z=>Z.id===o.id);u!==-1&&a.splice(u,1)},200)}function i(o,m){o.resolve(m),o.open=!1,setTimeout(()=>{const u=a.findIndex(Z=>Z.id===o.id);u!==-1&&a.splice(u,1)},200)}function s(o,m){m||(o.open=!1,setTimeout(()=>{const u=a.findIndex(Z=>Z.id===o.id);u!==-1&&a.splice(u,1)},200))}return{dialogStack:a,handleFormResolve:c,handleConfirmResolve:i,handleOpenUpdate:s}},render(){return this.dialogStack.map(c=>{if(c.type==="form")return(0,t.h)($5,{key:c.id,open:c.open,...c.options,"onUpdate:open":i=>{i||this.handleFormResolve(c,{action:"cancel",data:c.options.modelValue||{}})},onResolve:i=>{this.handleFormResolve(c,i)}});if(c.type==="confirm")return(0,t.h)(S5,{key:c.id,open:c.open,...c.options,"onUpdate:open":i=>{i||this.handleConfirmResolve(c,!1)},onResolve:i=>{this.handleConfirmResolve(c,i)}});if(c.type==="open"){const i=c.options;return(0,t.h)(_t,{key:c.id,open:c.open,title:i.title,width:i.width,position:i.position,dismissable:i.dismissable,class:i.class,"onUpdate:open":s=>{this.handleOpenUpdate(c,s)}},{default:()=>(0,t.h)((typeof i.component=="string",i.component),i.props||{})})}return null})}});if(e.component("DialogContainer",d),typeof document<"u"&&typeof window<"u"){const c=()=>{if(!document.getElementById("bagelink-dialog-root")){const i=document.createElement("div");i.id="bagelink-dialog-root",document.body.appendChild(i);const s=(0,t.createApp)(d);Object.assign(s._context,e._context),s.mount(i)}};document.body&&c(),e.mixin({mounted(){this.$root===this&&c()}})}}};var x2={pint:{pattern:/\d/},int:{pattern:/[\d-]/},pnum:{pattern:/[\d.]/},tel:{pattern:/[\d.\-()\s+]/},money:{pattern:/[\d.\s,]/},number:{pattern:/[\d\-.]/},num:{pattern:/[\d\-.]/},hex:{pattern:/[0-9a-f]/i},email:{pattern:/[\w.\-@]/},alpha:{pattern:/[a-z_]/i},alphanum:{pattern:/\w/},lower:{pattern:/[a-z]/i,transform:e=>e.toLowerCase()},upper:{pattern:/[A-Z]/i,transform:e=>e.toUpperCase()},slug:{pattern:/[a-z0-9-]/i,transform:e=>e.toLowerCase().replace(/\s/g,"-")},snake:{pattern:/[a-z_]/,transform:e=>e.toLowerCase().replace(/\s/g,"_")}},Fc=new WeakMap;function Ro(e){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return e;const l=e.querySelector("input, textarea");return l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement?l:null}function db(e){const l=Object.keys(e.modifiers);return l.length>0?l[l.length-1]:""}function lW(e){return e.pattern!=null?e.pattern:e.modifier!=null&&e.modifier!==""?x2[e.modifier]?.pattern??/./:/./}function cb(e,l,a){a.keydownEvent=(n=>{pK(n,l,a)}),a.inputEvent=(n=>{tW(n,l,a)}),a.compositionStartEvent=(()=>{WK(a)}),a.compositionEndEvent=(n=>{GK(n,l,a)}),l.addEventListener("keydown",a.keydownEvent),l.addEventListener("input",a.inputEvent,{capture:!0}),l.addEventListener("compositionstart",a.compositionStartEvent),l.addEventListener("compositionend",a.compositionEndEvent)}function ib(e,l){l.keydownEvent&&e.removeEventListener("keydown",l.keydownEvent),l.inputEvent&&e.removeEventListener("input",l.inputEvent,{capture:!0}),l.compositionStartEvent&&e.removeEventListener("compositionstart",l.compositionStartEvent),l.compositionEndEvent&&e.removeEventListener("compositionend",l.compositionEndEvent),l.keydownEvent=void 0,l.inputEvent=void 0,l.compositionStartEvent=void 0,l.compositionEndEvent=void 0}function hK(e){const l=["Tab","Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"];return e.ctrlKey||e.altKey||e.metaKey?!0:l.includes(e.key)}function pK(e,l,a){if(a.composing===!0||hK(e)||a.modifier!=null&&a.modifier!==""&&typeof x2[a.modifier]?.transform=="function")return;const n=lW(a),d=e.key;n.test(d)||e.preventDefault()}function WK(e){e.composing=!0}function GK(e,l,a){a.composing=!1,tW(e,l,a)}function sb(e,l){const a=lW(l);let n;if(l.modifier!=null&&l.modifier!==""){const c=x2[l.modifier]?.transform;n=c?c(e):e}else n=e;let d="";for(let c=0;c<n.length;c++){const i=n[c];a.test(i)&&(d+=i)}return d}function tW(e,l,a){if(a.reformatting===!0||a.composing===!0)return;const n=l.value,d=l.selectionEnd??n.length,c=n.slice(0,d),i=sb(n,a);if(i===n)return;const s=sb(c,a).length;a.reformatting=!0,l.value=i,l.setSelectionRange(s,s),a.reformatting=!1}var NK={beforeMount(e,l){const a=Ro(e);if(a===null)return;const n={modifier:db(l)};typeof l.value=="object"&&l.value!==null&&(n.pattern=l.value.pattern??/./,n.validateOnly=l.value.validateOnly===!0),Fc.set(e,n),cb(e,a,n)},updated(e,l){const a=Ro(e);if(a===null)return;const n=Fc.get(e);n!==void 0&&(ib(a,n),n.modifier=db(l),typeof l.value=="object"&&l.value!==null&&(n.pattern=l.value.pattern??/./,n.validateOnly=l.value.validateOnly===!0),cb(e,a,n))},unmounted(e){const l=Ro(e),a=Fc.get(e);l!==null&&a!==void 0&&ib(l,a),Fc.delete(e)},getSSRProps(){return{}}},aW=NK,YK=()=>typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;function LK(e){const l={y:"up",delay:0,once:!0,threshold:.12};return e?typeof e=="string"?{...l,y:e}:{...l,...e}:l}var So=new WeakMap,XK={mounted(e,l){const a=LK(l.value);if(YK())return;e.classList.add("bgl-reveal"),a.y!=="none"&&(e.dataset.revealDir=a.y),a.delay&&e.style.setProperty("--bgl-reveal-delay",`${a.delay}ms`);const n=new IntersectionObserver(d=>{for(const c of d)c.isIntersecting?(e.classList.add("bgl-reveal-in"),a.once&&n.unobserve(e)):a.once||e.classList.remove("bgl-reveal-in")},{threshold:a.threshold,rootMargin:"0px 0px -8% 0px"});n.observe(e),So.set(e,n)},unmounted(e){So.get(e)?.disconnect(),So.delete(e)},getSSRProps(){return{}}},nW=XK;function yK(e){let l=e.__rippleContainer;return(!l||!l.isConnected)&&(l=document.createElement("span"),Object.assign(l.style,{position:"absolute",inset:"0",overflow:"hidden",borderRadius:"inherit",pointerEvents:"none"}),e.appendChild(l),e.__rippleContainer=l),l}var MK={mounted(e,l){const a=n=>{const d=e.getBoundingClientRect(),c=Math.max(d.width,d.height),i=document.createElement("span");i.className="ripple",Object.assign(i.style,{width:`${c}px`,height:`${c}px`,left:`${n.clientX-d.left-c/2}px`,top:`${n.clientY-d.top-c/2}px`,position:"absolute",borderRadius:"50%",transform:"scale(0)",background:"rgba(0, 0, 0, 0.3)",pointerEvents:"none",animation:"rippleEffect 0.6s ease-out"}),yK(e).appendChild(i),setTimeout(()=>{i.remove()},600)};e.__rippleClickHandler=a,l.value!==!1&&(getComputedStyle(e).position==="static"&&(e.style.position="relative"),e.addEventListener("mousedown",a))},updated(e,l){const a=e.__rippleClickHandler;l.value===!1?e.removeEventListener("mousedown",a):(getComputedStyle(e).position==="static"&&(e.style.position="relative"),e.addEventListener("mousedown",a))},unmounted(e){const l=e.__rippleClickHandler;l&&(e.removeEventListener("mousedown",l),delete e.__rippleClickHandler)},getSSRProps(){return{}}},dW=MK,Ji=new WeakMap;function ob(e,l){const a=l.value||{},n=a2();let d=a.handle?e.querySelector(a.handle):e;const c=!d;d||(d=e.ownerDocument.createElement("div"),d.className=a.handle.replace(".","")+(a.handleClass?` ${a.handleClass}`:""),d.style.cssText="position:absolute;bottom:0;left:0;right:0;height:6px;background:rgba(0,0,0,0.1);",e.appendChild(d));const i=d,s={cursor:i.style.cursor,userSelect:i.style.userSelect,touchAction:i.style.touchAction},o=["role","tabindex","aria-orientation","aria-label","aria-valuenow","aria-valuemin","aria-valuemax"].map(r=>[r,i.getAttribute(r)]);i.style.cursor="ns-resize",i.style.userSelect="none",i.style.touchAction="none",i.setAttribute("role","separator"),i.setAttribute("tabindex","0"),i.setAttribute("aria-orientation","horizontal"),i.hasAttribute("aria-label")||i.setAttribute("aria-label","Resize height"),i.setAttribute("aria-valuemin",String(a.minHeight??0)),a.maxHeight!==void 0&&i.setAttribute("aria-valuemax",String(a.maxHeight)),i.setAttribute("aria-valuenow",String(e.offsetHeight));function m(r,b,h){const p={clientY:r,deltaY:r-b,initialHeight:h},N=h+p.deltaY,W=a.gridSize&&a.gridSize>0?Math.round(N/a.gridSize)*a.gridSize:N,G=Math.min(a.maxHeight??1/0,Math.max(a.minHeight??0,W));return e.style.height=`${G}px`,i.setAttribute("aria-valuenow",String(G)),a.onResize?.(p),p}function u(r){if(r.button!==0||r.isPrimary===!1)return;n.cancel();const b=r.clientY,h=e.offsetHeight,p=e.style.height,N=i.getAttribute("aria-valuenow");a.onStart?.(r),n.start(r,{cursor:"ns-resize",onMove:W=>m(W.clientY,b,h),onEnd(W){const G=m(W.clientY,b,h);a.onEnd?.(G)},onCancel(){e.style.height=p,N!==null&&i.setAttribute("aria-valuenow",N),a.onCancel?.()}})}function Z(r){if(!["ArrowUp","ArrowDown","Home","End"].includes(r.key)||r.key==="End"&&a.maxHeight===void 0)return;r.preventDefault(),n.cancel();const b=e.offsetHeight,h=(a.gridSize||10)*(r.shiftKey?5:1),p=r.key==="Home"?a.minHeight??0:r.key==="End"?a.maxHeight:b+(r.key==="ArrowUp"?-h:h);a.onStart?.(r);const N=m(p-b,0,b);a.onEnd?.(N)}i.addEventListener("pointerdown",u),i.addEventListener("keydown",Z),Ji.set(e,()=>{n.cancel(),i.removeEventListener("pointerdown",u),i.removeEventListener("keydown",Z),Object.assign(i.style,s);for(const[r,b]of o)b===null?i.removeAttribute(r):i.setAttribute(r,b);c&&i.remove(),Ji.delete(e)})}const VK={mounted:ob,unmounted(e){Ji.get(e)?.()},updated(e,l){l.value!==l.oldValue&&(Ji.get(e)?.(),ob(e,l))},getSSRProps(){return{}}};function Ci(e){return e==="richtext"?3:e==="textarea"||e==="json"||e==="radio"||e==="file"||e==="signature"?2:1}function z2(e){if(e.format)switch(e.format){case"email":return"email";case"tel":return"phone";case"uri":case"url":return"url";case"date":case"date-time":return"date"}if(e.enum)return"select";switch(e.type){case"number":case"integer":return"number";case"boolean":return"checkbox"}return"text"}function cW(e){if(!e?.properties)return[];const l=new Set(e.required??[]),a=[],n=Object.keys(e.properties),d=Array.isArray(e["x-property-order"])?e["x-property-order"].filter(i=>typeof i=="string"&&i in e.properties):[],c=[...new Set([...d,...n])];for(const i of c){const s=e.properties[i],o=s["x-field-type"]??z2(s),m={};s.minLength!==void 0&&(m.minLength=s.minLength),s.maxLength!==void 0&&(m.maxLength=s.maxLength),s.minimum!==void 0&&(m.min=s.minimum),s.maximum!==void 0&&(m.max=s.maximum),s.multipleOf!==void 0&&(m.step=s.multipleOf),s.pattern!==void 0&&(m.pattern=s.pattern),s["x-options"]?m.options=s["x-options"]:s.enum&&(m.options=s.enum.map(r=>({label:String(r),value:String(r)})));const u=s["x-ui"]?.class,Z={id:crypto.randomUUID(),key:i,type:o,label:s.title??i,placeholder:s["x-placeholder"],description:s.description,required:l.has(i)||void 0,colSpan:G2(u)??12,colStart:N2(u),rowStart:y2(u),rowSpan:X2(u)??Ci(o),mColSpan:Y2(u)??12,mColStart:L2(u),mRowStart:M2(u),mRowSpan:V2(u),class:T2(u)||void 0,hideLabel:s["x-hide-label"]??!1,condition:s["x-ui"]?.condition||void 0,hidden:s["x-ui"]?.hidden||o==="hidden"||void 0,richTextVariant:s["x-rich-text-variant"],richTextHeight:s["x-rich-text-height"],markdownShowFormatting:s["x-markdown-show-formatting"],textareaRows:s["x-textarea-rows"],textareaAutoHeight:s["x-textarea-autoheight"],numberLayout:s["x-number-layout"],numberSpinner:s["x-number-spinner"]??!0,phoneOnlyCountries:Array.isArray(s["x-phone-only-countries"])?s["x-phone-only-countries"].join(", "):s["x-phone-only-countries"],selectMultiselect:s["x-select-multiselect"],selectSearchable:s["x-select-searchable"],fileMultiple:s["x-file-multiple"],fileHeight:s["x-file-height"],fileAccept:s["x-file-accept"],fileTheme:s["x-file-theme"],fileShowIcon:s["x-file-show-icon"]===!1?!1:void 0,fileIcon:s["x-file-icon"],dateEnableTime:s["x-date-enable-time"],dateMin:s["x-date-min"],dateMax:s["x-date-max"],rangeMulti:s["x-range-multi"],radioThin:s["x-radio-thin"],radioHideRadio:s["x-radio-hide-radio"],radioHideLabelWhenImage:s["x-radio-hide-label-when-image"],radioAlign:s["x-ui"]?.radioAlign??s["x-radio-align"],radioInline:s["x-radio-inline"],radioSize:s["x-radio-size"],radioTextAlign:s["x-ui"]?.radioTextAlign??s["x-radio-text-align"]??"center",textIcon:s["x-text-icon"],textIconStart:s["x-text-icon-start"],validation:Object.keys(m).length>0?m:void 0,defaultValue:s.default,content:s["x-field-type"]==="heading"?s.title:void 0};a.push(Z)}return a}function TK(e,l={}){const a={},n=[];for(const c of e){const i={};if(c.type==="heading"||c.type==="divider")i.type="string",i.title=c.content||c.label,i["x-field-type"]=c.type;else{switch(c.type){case"text":case"textarea":case"richtext":case"markdown":case"email":case"phone":case"url":case"date":case"signature":case"color":case"hidden":i.type="string";break;case"file":c.fileMultiple===!0?(i.type="array",i.items={type:"string"}):i.type="string";break;case"number":case"range":i.type="number";break;case"checkbox":case"toggle":i.type="boolean";break;case"json":i.type="object";break;case"select":case"radio":i.type="string",c.validation?.options&&(i.enum=c.validation.options.map(m=>m.value));break}c.type==="email"&&(i.format="email"),c.type==="phone"&&(i.format="tel"),c.type==="url"&&(i.format="uri"),c.type==="date"&&(i.format=c.dateEnableTime?"date-time":"date"),c.type==="color"&&(i.format="color"),i.title=c.label,c.description&&(i.description=c.description),c.defaultValue!==void 0&&(i.default=c.defaultValue),c.type!=="text"&&(i["x-field-type"]=c.type),c.validation?.minLength!==void 0&&(i.minLength=c.validation.minLength),c.validation?.maxLength!==void 0&&(i.maxLength=c.validation.maxLength),c.validation?.min!==void 0&&(i.minimum=c.validation.min),c.validation?.max!==void 0&&(i.maximum=c.validation.max),c.validation?.step!==void 0&&(i.multipleOf=c.validation.step),c.validation?.pattern!==void 0&&(i.pattern=c.validation.pattern),c.required&&(n.push(c.key),c.type==="checkbox"&&(i.const=!0))}c.placeholder&&(i["x-placeholder"]=c.placeholder),c.validation?.options&&(i["x-options"]=c.validation.options);const s=c.rowSpan??Ci(c.type),o=A5(c.class,{colSpan:c.colSpan,colStart:c.colStart,rowStart:c.rowStart,rowSpan:l.freeGrid?s>1?s:void 0:s===Ci(c.type)?void 0:s,mColSpan:c.mColSpan,mColStart:c.mColStart,mRowStart:c.mRowStart,mRowSpan:c.mRowSpan});o&&(i["x-ui"]={...i["x-ui"],class:o}),c.condition&&(i["x-ui"]={...i["x-ui"],condition:c.condition}),c.hidden===!0&&(i["x-ui"]={...i["x-ui"],hidden:!0}),c.hideLabel===!0&&(i["x-hide-label"]=!0),c.richTextVariant&&(i["x-rich-text-variant"]=c.richTextVariant),c.richTextHeight!==void 0&&(i["x-rich-text-height"]=c.richTextHeight),c.markdownShowFormatting===!0&&(i["x-markdown-show-formatting"]=!0),c.textareaRows!==void 0&&(i["x-textarea-rows"]=c.textareaRows),c.textareaAutoHeight===!0&&(i["x-textarea-autoheight"]=!0),c.numberLayout&&c.numberLayout!=="default"&&(i["x-number-layout"]=c.numberLayout),c.numberSpinner===!1&&(i["x-number-spinner"]=!1),c.phoneOnlyCountries&&(i["x-phone-only-countries"]=c.phoneOnlyCountries),c.selectMultiselect===!0&&(i["x-select-multiselect"]=!0),c.selectSearchable===!0&&(i["x-select-searchable"]=!0),c.fileMultiple===!0&&(i["x-file-multiple"]=!0),c.fileHeight!==void 0&&(i["x-file-height"]=c.fileHeight),c.fileAccept&&(i["x-file-accept"]=c.fileAccept),c.fileTheme&&(i["x-file-theme"]=c.fileTheme),c.fileShowIcon===!1&&(i["x-file-show-icon"]=!1),c.fileIcon&&(i["x-file-icon"]=c.fileIcon),c.dateEnableTime===!0&&(i["x-date-enable-time"]=!0),c.dateMin&&(i["x-date-min"]=c.dateMin),c.dateMax&&(i["x-date-max"]=c.dateMax),c.rangeMulti===!0&&(i["x-range-multi"]=!0),c.radioThin===!0&&(i["x-radio-thin"]=!0),c.radioHideRadio===!0&&(i["x-radio-hide-radio"]=!0),c.radioHideLabelWhenImage===!0&&(i["x-radio-hide-label-when-image"]=!0),c.radioAlign&&(i["x-ui"]={...i["x-ui"],radioAlign:c.radioAlign}),c.radioInline===!0&&(i["x-radio-inline"]=!0),c.radioSize&&(i["x-radio-size"]=c.radioSize),c.radioTextAlign&&(i["x-ui"]={...i["x-ui"],radioTextAlign:c.radioTextAlign}),c.textIcon&&(i["x-text-icon"]=c.textIcon),c.textIconStart&&(i["x-text-icon-start"]=c.textIconStart),a[c.key]=i}const d={$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:a};return n.length>0&&(d.required=n),d}function eu(e,l){if(typeof l!="string")return l;const a=l.trim();switch(e.type){case"checkbox":case"toggle":return a.toLowerCase()==="true"?!0:a.toLowerCase()==="false"?!1:l;case"number":case"range":{if(!a)return l;const n=Number(a);return Number.isNaN(n)?l:n}default:return l}}function IK(e,l){const a={};for(const n of e)if(!(n.type==="heading"||n.type==="divider")){if(l&&n.key in l){a[n.key]=eu(n,l[n.key]);continue}if(n.defaultValue!==void 0){a[n.key]=eu(n,n.defaultValue);continue}switch(n.type){case"checkbox":case"toggle":a[n.key]=!1;break;case"number":case"range":a[n.key]=n.validation?.min??0;break;default:a[n.key]=""}}return a}function xK(e,l){const a={};for(const n of e){if(n.type==="heading"||n.type==="divider"||n.type==="hidden"||n.hidden===!0)continue;const d=l[n.key];if(n.required&&(d==null||d==="")){a[n.key]=`${n.label} is required`;continue}if(d==null||d==="")continue;const c=n.validation;if(typeof d=="string"){if(c?.minLength!==void 0&&d.length<c.minLength){a[n.key]=`${n.label} must be at least ${c.minLength} characters`;continue}if(c?.maxLength!==void 0&&d.length>c.maxLength){a[n.key]=`${n.label} must be at most ${c.maxLength} characters`;continue}if(c?.pattern&&!new RegExp(c.pattern).test(d)){a[n.key]=`${n.label} format is invalid`;continue}}if(typeof d=="number"){if(c?.min!==void 0&&d<c.min){a[n.key]=`${n.label} must be at least ${c.min}`;continue}if(c?.max!==void 0&&d>c.max){a[n.key]=`${n.label} must be at most ${c.max}`;continue}}}return a}function zK(e){return{fields:(0,t.computed)(()=>cW(e.value))}}const gK=!0;var Ee=class{_type;_config;_condition;_hidden;_validations;_onUpdate;_class;_slots;_component;constructor(e,l={}){this._type=e,this._config=l}if(e){return this._condition=e,this}hidden(e=!0){return this._hidden=e,this}validate(e){return this._validations||(this._validations=[]),this._validations.push(e),this}onUpdate(e){return this._onUpdate=e,this}class(e){return this._class=this._class?`${this._class} ${e}`:e,this}required(e){return this._config.required=!0,e&&(this._config.requiredMessage=e),this}slot(e,l,a){return this._slots||(this._slots=[]),typeof e!="string"||l!==void 0&&typeof l!="string"?this._slots.push({component:e,props:l}):this._slots.push({name:e,component:l,props:a}),this}};function al(e,l){return typeof e=="string"?{...l,label:e}:e??{}}const nl={text(e,l){return new Ee("text",al(e,l))},email(e,l){return new Ee("email",al(e,l))},password(e,l){return new Ee("password",al(e,l))},number(e,l){return new Ee("number",al(e,l))},tel(e,l){return new Ee("tel",al(e,l))},url(e,l){return new Ee("url",al(e,l))},date(e,l){return new Ee("date",al(e,l))},time(e,l){return new Ee("time",al(e,l))},datetime(e,l){return new Ee("datetime",al(e,l))},textarea(e,l){return new Ee("textarea",al(e,l))},richtext(e,l){return new Ee("richtext",al(e,l))},json(e,l){const a=al(e,l);return a.language||(a.language="json"),new Ee("json",a)},checkbox(e,l){return new Ee("checkbox",al(e,l))},toggle(e,l){return new Ee("toggle",al(e,l))},radio(e,l,a){if(typeof e=="string"){const n=e,d=l;return new Ee("radio",{...a,label:n,options:d})}return new Ee("radio",{...al(l,a),options:e})},select(e,l,a){if(typeof e=="string"){const n=e,d=l;return new Ee("select",{...a,label:n,options:d})}return new Ee("select",{...al(l,a),options:e})},multiselect(e,l,a){if(typeof e=="string"){const n=e,d=l;return new Ee("multiselect",{...a,label:n,options:d,multiple:!0})}return new Ee("multiselect",{...al(l,a),options:e})},color(e,l){return new Ee("color",al(e,l))},icon(e,l){return new Ee("icon",al(e,l))},range(e,l){return new Ee("range",al(e,l))},custom(e,l,a){return Yt(e)||Is(e),new Ee(e,al(l,a))},upload(e,l){return new Ee("upload",al(e,l))},array(e,l,a){if(typeof e=="string"){const d=e,c=l;return new Ee("array",{...a??{},label:d,schema:c})}const n=e;return new Ee("array",{...al(l,a),schema:n})},component(e,l={}){const a=new Ee("component",l);return a._component={component:e,props:l},a},display(e,l={}){const a=new Ee("display",l);return a._component={component:e,props:l},a}};var lu=class iW{_isSchema=!0;_label;_fields;_condition;_class;constructor(l,a){this._fields=l,this._label=a}if(l){return this._condition=l,this}class(l){return this._class=this._class?`${this._class} ${l}`:l,this}defaults(l){for(const[a,n]of Object.entries(l))this._fields[a]&&this._fields[a]._config.default===void 0&&(this._fields[a]._config.default=n);return this}getDefaults(){const l={};for(const[a,n]of Object.entries(this._fields))n._config.default!==void 0&&(l[a]=n._config.default);return l}toJSONSchema(){const l={},a=[];for(const[c,i]of Object.entries(this._fields)){const s=i._config,o=Yt(i._type),m=o?.jsonSchema?.type??iW.getJSONSchemaType(i._type),u={type:m};if(s.label&&(u.title=s.label),s.helpText&&(u.description=s.helpText),s.default!==void 0&&(u.default=s.default),s.options){const b=s.options,h=b.map(p=>Ya(p)??p);i._type==="multiselect"?u.items={type:"string",enum:h}:u.enum=h,(i._type==="select"||i._type==="multiselect"||i._type==="radio")&&b.every(p=>p&&typeof p=="object"&&"label"in p&&"value"in p)&&(u["x-options"]=b)}s.min!==void 0&&(u[m==="string"?"minLength":"minimum"]=s.min),s.max!==void 0&&(u[m==="string"?"maxLength":"maximum"]=s.max),i._type==="email"&&(u.format="email"),i._type==="url"&&(u.format="uri"),i._type==="date"&&(u.format="date"),i._type==="time"&&(u.format="time"),i._type==="datetime"&&(u.format="date-time");const Z={};if(i._type!=="text"&&(Z.fieldType=i._type),o){u["x-field-type"]=i._type;const b=o.translatableSettings?.map(h=>h.key);b?.length&&(u["x-translatable-settings"]=b)}s.placeholder&&(Z.placeholder=s.placeholder),s.disabled&&(Z.disabled=s.disabled),s.readonly&&(Z.readonly=s.readonly),s.autoheight&&(Z.autoheight=s.autoheight),s.rows&&(Z.rows=s.rows),s.cols&&(Z.cols=s.cols),(i._type==="select"||i._type==="multiselect")&&s.searchable!==void 0&&(u["x-select-searchable"]=s.searchable),i._class&&(Z.class=i._class),i._condition&&(Z.condition=i._condition),i._hidden&&(Z.hidden=!0),i._type==="array"&&(s.allowAdd!==void 0&&(Z.allowAdd=s.allowAdd),s.allowDelete!==void 0&&(Z.allowDelete=s.allowDelete),s.schema&&typeof s.schema.toJSONSchema=="function"&&(u.items=s.schema.toJSONSchema())),i._component&&(Z.component=typeof i._component.component=="string"?i._component.component:i._component.component.name||"CustomComponent",i._component.props&&(Z.componentProps=i._component.props)),Object.keys(Z).length>0&&(u["x-ui"]=Z);const r=o?.jsonSchema?.serialize?.(s,{key:c,required:s.required===!0});r&&Object.assign(u,r),l[c]=u,s.required===!0&&a.push(c)}const n={type:"object",properties:l};a.length>0&&(n.required=a),this._label&&(n.title=this._label);const d={};return this._condition&&(d.condition=this._condition),this._class&&(d.class=this._class),Object.keys(d).length>0&&(n["x-ui"]=d),n}static getJSONSchemaType(l){return{text:"string",email:"string",password:"string",number:"number",tel:"string",url:"string",date:"string",time:"string",datetime:"string",textarea:"string",richtext:"string",json:"object",checkbox:"boolean",toggle:"boolean",radio:"string",select:"string",multiselect:"array",array:"array"}[l]||"string"}};function wK(e,l){if(typeof e=="string"){if(!l)throw new Error("Fields are required when providing a label");return new lu(l,e)}return new lu(e)}function RK(e){return e}function SK(e){return async(l,a)=>{if(!l.endpoint.startsWith("/")||l.endpoint.startsWith("//"))throw new Error("Form option endpoints must be same-origin paths");const n={};return l.searchParam&&a&&(n[l.searchParam]=a),l.limitParam&&l.limit!=null&&(n[l.limitParam]=l.limit),(await e.get(l.endpoint,{params:n})).data}}function kc(e,l){return l?l.split(".").reduce((a,n)=>{if(!(a==null||typeof a!="object"))return a[n]},e):e}function mb(e,l){const a=kc(e,l.itemsPath);return Array.isArray(a)?a.flatMap(n=>{const d=kc(n,l.valuePath??"id"),c=kc(n,l.labelPath??"name");if(d==null||c==null)return[];const i=l.subtitlePath?kc(n,l.subtitlePath):void 0;return[{label:String(c),value:String(d),...i==null?{}:{subtitle:String(i)}}]}):[]}function Di(e,l){const a={},n=new Set(e.required||[]);if(e.properties){const c=Object.keys(e.properties),i=Array.isArray(e["x-property-order"])?e["x-property-order"].filter(s=>typeof s=="string"&&s in e.properties):[];for(const s of new Set([...i,...c])){const o=e.properties[s];a[s]=FK(s,o,n.has(s),e,l?.loadOptionsSource)}}const d=new lu(a,e.title);return e["x-ui"]?.condition&&d.if(e["x-ui"].condition),e["x-ui"]?.class&&d.class(e["x-ui"].class),d}function vK(e,l){const a=e.match(/^#\/(\$defs|definitions)\/(.+)$/);if(!a)return;const[,n,d]=a,c=n==="$defs"?l.$defs:l.definitions;return d?c?.[d]:void 0}function fK(e,l){const a=e.anyOf||e.oneOf;if(!a||a.length===0)return e;const n=a.filter(i=>i.type!=="null");if(n.length===1){const i=n[0];return{...i,...e,type:e.type??i.type,title:e.title||i.title,description:e.description||i.description,default:e.default!==void 0?e.default:i.default,"x-ui":{...i["x-ui"],...e["x-ui"]}}}const d=["object","array","string","number","integer","boolean"],c=n.sort((i,s)=>d.indexOf(i.type||"string")-d.indexOf(s.type||"string"))[0];return{...c,...e,type:e.type??c.type,title:e.title||c.title,description:e.description||c.description,default:e.default!==void 0?e.default:c.default,"x-ui":{...c["x-ui"],...e["x-ui"]}}}function FK(e,l,a,n,d){let c=l;if(l.$ref){const b=vK(l.$ref,n);b&&(c={...b,type:l.type??b.type,enum:l.enum??b.enum,title:l.title??b.title,description:l.description??b.description,default:l.default!==void 0?l.default:b.default,"x-ui":{...b["x-ui"],...l["x-ui"]}})}(c.anyOf||c.oneOf)&&(c=fK(c,n));const i=c["x-ui"]||{};let s=i.fieldType||c["x-field-type"]||ub(c);s==="select"&&c["x-select-multiselect"]&&(s="multiselect");const o=c["x-options"],m={},u=Yt(s);c.title&&(m.label=c.title),c.description&&(m.helpText=c.description),c.default!==void 0&&(m.default=c.default),(a||i.required===!0)&&(m.required=!0),i.placeholder&&(m.placeholder=i.placeholder),c["x-placeholder"]&&(m.placeholder=c["x-placeholder"]),kK(m,c),u?.settingsDefaults&&Object.assign(m,u.settingsDefaults);const Z=u?.jsonSchema?.parse?.(c,{key:e,required:a||i.required===!0});if(Z&&Object.assign(m,Z),c["x-options-source"]){if(!d)throw new Error(`Field "${e}" requires an x-options-source loader`);const b=c["x-options-source"];let h;m.options=async p=>{const N=b.searchParam?mb(await d(b,p),b):h??=mb(await d(b,b.searchParam?p:""),b);if(b.searchParam||!p.trim())return N;const W=p.trim().toLocaleLowerCase();return N.filter(G=>[G.label,G.subtitle,G.value].some(Y=>Y?.toLocaleLowerCase().includes(W)))},c["x-select-searchable"]===void 0&&(m.searchable=!0)}i.radioAlign!==void 0&&(m.align=i.radioAlign),i.radioTextAlign!==void 0&&(m.textAlign=i.radioTextAlign),i.disabled&&(m.disabled=i.disabled),i.readonly&&(m.readonly=i.readonly),i.autoheight&&(m.autoheight=i.autoheight),i.rows&&(m.rows=i.rows),i.cols&&(m.cols=i.cols),c.minimum!==void 0&&(m.min=c.minimum),c.maximum!==void 0&&(m.max=c.maximum),c.minLength!==void 0&&(m.min=c.minLength),c.maxLength!==void 0&&(m.max=c.maxLength),c.pattern!==void 0&&(m.pattern=c.pattern);let r;switch(s){case"heading":r=new Ee("heading",m);break;case"divider":r=new Ee("divider",m);break;case"email":r=nl.email(m);break;case"password":r=nl.password(m);break;case"number":r=nl.number(m);break;case"tel":case"phone":r=nl.tel(m);break;case"url":r=nl.url(m);break;case"date":r=nl.date(m);break;case"time":r=nl.time(m);break;case"datetime":r=nl.datetime(m);break;case"textarea":r=nl.textarea(m);break;case"richtext":r=nl.richtext(m);break;case"json":r=nl.json(m);break;case"checkbox":r=nl.checkbox(m);break;case"toggle":r=nl.toggle(m);break;case"radio":r=nl.radio(o??c.enum??[],m);break;case"select":r=nl.select(m.options??o??c.enum??[],m);break;case"multiselect":r=nl.multiselect(m.options??o??c.enum??[],m);break;case"icon":r=nl.icon(m);break;case"file":case"upload":r=nl.upload(m);break;case"array":{const b={...m};i.allowAdd!==void 0&&(b.allowAdd=i.allowAdd),i.allowDelete!==void 0&&(b.allowDelete=i.allowDelete);const h=c.items?.type==="object"?Di(c.items,{loadOptionsSource:d}):void 0;c.items?.type&&(b.itemType=ub(c.items)),r=nl.array(c.title||e,h,b);break}case"display":r=nl.display(i.component||"div",i.componentProps||{});break;case"component":r=nl.component(i.component||"div",i.componentProps||{});break;default:u?r=new Ee(s,m):Ts(s)?(Is(s),m.missingCustomRegistration=!0,r=new Ee(s,m)):r=nl.text(m);break}if(i.component&&s!=="component"&&s!=="display"&&(r._component={component:i.component,props:i.componentProps||{}}),c.const!==void 0&&r.validate(b=>b===c.const?!0:m.requiredMessage||"form.required"),c.pattern){const b=new RegExp(c.pattern);r.validate(h=>h==null||h===""||b.test(String(h))?!0:"form.pattern")}return i.class&&r.class(i.class),i.condition&&r.if(i.condition),i.hidden&&r.hidden(),r}function kK(e,l){const a=l,n=(i,s)=>{a[s]!==void 0&&(e[i]=a[s])};a["x-radio-inline"]&&(e.inline=!0),a["x-radio-thin"]&&(e.thin=!0),a["x-radio-hide-radio"]&&(e.hideRadio=!0),a["x-radio-hide-label-when-image"]&&(e.hideLabelWhenImage=!0),n("align","x-radio-align"),n("textAlign","x-radio-text-align"),a["x-select-multiselect"]&&(e.multiple=!0),n("searchable","x-select-searchable"),n("rows","x-textarea-rows"),n("autoheight","x-textarea-autoheight"),n("layout","x-number-layout"),a["x-number-spinner"]===!1&&(e.spinner=!1),typeof a["x-phone-only-countries"]=="string"?e.onlyCountries=a["x-phone-only-countries"].split(",").map(i=>i.trim()).filter(Boolean):Array.isArray(a["x-phone-only-countries"])&&(e.onlyCountries=a["x-phone-only-countries"]),n("defaultCountry","x-phone-default-country"),a["x-range-multi"]&&(e.multiRange=!0),a["x-file-multiple"]&&(e.multiple=!0);const d=a["x-file-height"];d!==void 0&&(e.height=typeof d=="number"?`${d}px`:d),n("accept","x-file-accept"),n("theme","x-file-theme"),a["x-file-show-icon"]===!1&&(e.showIcon=!1),n("icon","x-file-icon"),a["x-date-enable-time"]&&(e.enableTime=!0),n("min","x-date-min"),n("max","x-date-max"),n("icon","x-text-icon"),n("iconStart","x-text-icon-start");const c=a["x-rich-text-variant"];c==="basic"?e.basic=!0:c==="simple"&&(e.simple=!0),n("height","x-rich-text-height"),a["x-markdown-show-formatting"]&&(e.showFormatting=!0),a["x-hide-label"]===!0&&(e.hideLabel=!0)}function ub(e){if(e.format)switch(e.format){case"email":return"email";case"uri":return"url";case"date":return"date";case"time":return"time";case"date-time":return"datetime"}if(e.enum)return"select";switch(e.type){case"boolean":return"checkbox";case"number":case"integer":return"number";case"array":return"array";case"object":return"json";default:return"text"}}var jK={class:"multi-step-form"},JK={class:"step-progress"},CK=["onClick"],DK={class:"step-number"},UK={class:"step-label"},OK={key:0},EK={key:0,class:"step-title"},BK={key:1,class:"validation-errors"},KK={class:"step-navigation"},HK=["disabled"],PK={class:"step-counter"},QK=(0,t.defineComponent)({__name:"MultiStepForm",props:{schema:{},modelValue:{},currentStep:{},components:{},validateOnNext:{type:Boolean,default:!0}},emits:["update:modelValue","update:currentStep","stepChange","complete","validationError"],setup(e,{expose:l,emit:a}){const n=e,d=a,{$t:c}=tl(),i=(0,t.useSlots)(),s=(0,t.computed)(()=>Object.keys(i)),o=(0,t.ref)({...n.modelValue||{}}),m=(0,t.ref)(n.currentStep!=null&&n.currentStep!==""?n.currentStep:Object.keys(n.schema)[0]);let u=!1;(0,t.watch)(()=>n.modelValue,f=>{u||(o.value={...f||{}})},{deep:!0}),(0,t.watch)(o,f=>{u=!0,d("update:modelValue",f),setTimeout(()=>{u=!1},0)},{deep:!0}),(0,t.watch)(()=>n.currentStep,f=>{f!=null&&(m.value=f)}),(0,t.watch)(m,f=>{d("update:currentStep",f),d("stepChange",f)});function Z(f,k){const D=k.split(".");let Q=f;for(const K of D)Q=Q?.[K];return Q}function r(f,k){if(!f)return!0;try{const D=fd(f);if(D.length===0)return!0;let Q=!0,K=null;for(let E=0;E<D.length;E++){const te=D[E],ee=Z(k,te.field),{op:v,value:B,connector:O}=te;let w=!1;switch(v){case"eq":w=ee===B;break;case"ne":w=ee!==B;break;case"gt":w=B!=null&&ee>B;break;case"ge":w=B!=null&&ee>=B;break;case"lt":w=B!=null&&ee<B;break;case"le":w=B!=null&&ee<=B;break;case"co":w=B!=null&&String(ee).includes(String(B));break;case"sw":w=B!=null&&String(ee).startsWith(String(B));break;case"ew":w=B!=null&&String(ee).endsWith(String(B));break;case"pr":w=ee!=null;break;default:w=!1}E===0?(Q=w,K=w):(O==="or"?Q=(K??!1)||w:O==="and"&&(Q=(K??!1)&&w),K=Q)}return Q}catch{return!0}}function b(f){return f._condition==null?!0:r(f._condition,o.value)}const h=(0,t.computed)(()=>Object.entries(n.schema).filter(([,f])=>b(f)).map(([f,k])=>({key:f,schema:k}))),p=(0,t.computed)(()=>h.value.findIndex(f=>f.key===m.value)),N=(0,t.computed)(()=>p.value===0),W=(0,t.computed)(()=>p.value===h.value.length-1),G=(0,t.computed)(()=>h.value[p.value]?.schema),Y=(0,t.ref)({});function L(f){return f._hidden?!1:f._condition==null?!0:r(f._condition,o.value)}function X(f){const k=f.replace(/\[(\d+)\]/g,".$1");return Z(o.value,k)}function I(f){return!!(f==null||typeof f=="string"&&f.trim()===""||Array.isArray(f)&&f.length===0)}function V(){if(!n.validateOnNext||G.value==null)return!0;const f={},k=G.value._fields;for(const[D,Q]of Object.entries(k)){if(Q._type==="display"||!L(Q))continue;const K=X(D),E=Q._config;if(E.required===!0&&I(K)){f[D]=`${typeof E.label=="string"?E.label:D} is required`;continue}if(Q._validations&&!I(K))for(const te of Q._validations){const ee=te(K);if(ee!==!0){f[D]=ee;break}}}return Y.value=f,Object.keys(f).length>0?(d("validationError",f),!1):!0}function M(f,k){return k._label!=null?k._label:f.split(/[._-]/).map(D=>D.charAt(0).toUpperCase()+D.slice(1)).join(" ")}function z(f){const k=h.value.findIndex(D=>D.key===f);if(k!==-1){if(k<p.value){m.value=f,Y.value={};return}k>p.value&&!V()||(m.value=f)}}function T(){if(V())if(W.value)d("complete");else{const f=p.value+1;m.value=h.value[f].key,Y.value={}}}function F(){if(!N.value){const f=p.value-1;m.value=h.value[f].key,Y.value={}}}return l({validateCurrentStep:V,stepErrors:Y,nextStep:T,prevStep:F,goToStep:z,visibleSteps:h,activeStep:m,currentStepIndex:p,isFirstStep:N,isLastStep:W}),(f,k)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",jK,[(0,t.createElementVNode)("div",JK,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(h.value,(D,Q)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:D.key,class:(0,t.normalizeClass)(["step-indicator",{active:D.key===m.value,completed:Q<p.value}]),onClick:K=>z(D.key)},[(0,t.createElementVNode)("div",DK,(0,t.toDisplayString)(Q+1),1),(0,t.createElementVNode)("div",UK,(0,t.toDisplayString)(M(D.key,D.schema)),1)],10,CK))),128))]),G.value!=null?((0,t.openBlock)(),(0,t.createElementBlock)("div",OK,[G.value._label?((0,t.openBlock)(),(0,t.createElementBlock)("h2",EK,(0,t.toDisplayString)(G.value._label),1)):(0,t.createCommentVNode)("",!0),Object.keys(Y.value).length>0?((0,t.openBlock)(),(0,t.createElementBlock)("div",BK,[(0,t.createElementVNode)("ul",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(Y.value,(D,Q)=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:Q},(0,t.toDisplayString)(D),1))),128))])])):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(f.$slots,`step:${m.value}`,{schema:G.value,formData:o.value,stepKey:m.value,errors:Y.value},()=>[(0,t.createVNode)(zs,{modelValue:o.value,"onUpdate:modelValue":k[0]||(k[0]=D=>o.value=D),schema:G.value,components:e.components,errors:Y.value},(0,t.createSlots)({_:2},[(0,t.renderList)(s.value,D=>({name:D,fn:(0,t.withCtx)(Q=>[(0,t.renderSlot)(f.$slots,D,(0,t.normalizeProps)((0,t.guardReactiveProps)(Q)),void 0,!0)])}))]),1032,["modelValue","schema","components","errors"])],!0)])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",KK,[(0,t.createElementVNode)("button",{type:"button",class:"btn-secondary",disabled:N.value,onClick:F},(0,t.toDisplayString)((0,t.unref)(c)("multiStep.previous")),9,HK),(0,t.createElementVNode)("div",PK,(0,t.toDisplayString)((0,t.unref)(c)("multiStep.step",{current:p.value+1,total:h.value.length})),1),(0,t.createElementVNode)("button",{type:"button",class:"btn-primary",onClick:T},(0,t.toDisplayString)(W.value?(0,t.unref)(c)("multiStep.complete"):(0,t.unref)(c)("multiStep.next")),1)])]))}}),AK=Le(QK,[["__scopeId","data-v-7a55f4bb"]]);function _K(){return{steps:[],transitions:[]}}function $K(e){return!!e&&e.steps.length>1}function Ga(e,l){if(l!=null)return e.steps.find(a=>a.key===l)}function sW(e,l){return e.transitions.filter(a=>a.from===l)}function qK(e){const l=e.schema?.properties;return l&&typeof l=="object"?Object.entries(l):[]}function oW(e){return e?.autoAdvance===!0}function mW(e){if(!e)return null;const l=qK(e);return l.length===1?l[0][0]:null}function Ui(e){return e.startId&&Ga(e,e.startId)?e.startId:e.steps[0]?.key}function Od(e,l,a){for(const n of sW(e,l))if(!n.condition||n.condition.trim()===""||fu(n.condition,a))return n.to;return null}function eH(e,l,a){return Od(e,l,a)===null}function tu(e,l,a){const n=Ui(e);if(!n||!l)return 0;const d=new Set;let c=n,i=0,s=0,o=!1;for(;c&&!d.has(c);)d.add(c),s++,o||(c===l?o=!0:i++),c=Od(e,c,a);return s<=1?o?100:0:Math.round(i/(s-1)*100)}function lH(e){const l={},a=[];for(const d of e.steps){const c=d.schema?.properties;c&&typeof c=="object"&&Object.assign(l,c);const i=d.schema?.required;if(Array.isArray(i))for(const s of i)a.includes(s)||a.push(s)}const n={type:"object",properties:l};return a.length&&(n.required=a),n}var tH={key:0,class:"ffp-stages","aria-label":"Form stages"},aH={class:"ffp-stage-list p-0 m-0"},nH={class:"ffp-stage-progress"},dH={class:"ffp-stage"},cH={key:0,class:"ffp-title"},iH={key:1,class:"ffp-empty"},sH={class:"ffp-nav flex flex-center gap-1"},oH={key:0,class:"ffp-counter flex-center round bg-primary-10 color-primary px-075 txt13 medium tabular-nums"},mH=(0,t.defineComponent)({__name:"FormFlowPlayer",props:{structure:{},modelValue:{},components:{},initialStepKey:{},formName:{default:""},animated:{type:Boolean,default:!0},autoAdvance:{type:Boolean,default:!0},autoAdvanceDelay:{default:200},redirect:{type:Boolean,default:!0},hideTitle:{type:Boolean,default:!1},hideCounter:{type:Boolean,default:!1},showStages:{type:Boolean,default:!1},onComplete:{},beforePrimary:{},loadOptionsSource:{}},emits:["update:modelValue","stepChange","progress","stepEnter","stepComplete","formComplete","redirect","complete"],setup(e,{expose:l,emit:a}){const n=e,d=a,{$t:c}=tl(),i=(0,t.useSlots)(),s=(0,t.computed)(()=>Object.keys(i).filter(y=>y!=="nav"&&y!=="primary-label"&&y!=="step"&&y!=="empty")),o=(0,t.ref)("next"),m=(0,t.computed)(()=>n.animated?o.value==="prev"?"ffp-slide-prev":"ffp-slide-next":""),u=(0,t.ref)({...n.modelValue||{}});(0,t.watch)(u,y=>d("update:modelValue",y),{deep:!0}),(0,t.watch)(()=>n.modelValue,y=>{y&&y!==u.value&&(u.value={...y})},{deep:!0});function Z(){const y=n.initialStepKey;return y&&Ga(n.structure,y)?y:Ui(n.structure)}const r=(0,t.ref)(Z()),b=(0,t.ref)([]),h=(0,t.ref)(new Set);(0,t.watch)(()=>n.structure,()=>{r.value=Z(),b.value=[],h.value=new Set},{deep:!0}),(0,t.watch)(()=>n.initialStepKey,y=>{!y||y===r.value||!Ga(n.structure,y)||(r.value=y,b.value=[],h.value=new Set)}),(0,t.watch)(r,y=>{y&&d("stepChange",y)},{immediate:!0});const p=(0,t.computed)(()=>Ga(n.structure,r.value??null));function N(y){const R=Ga(n.structure,y),g=tu(n.structure,y,u.value),le=b.value.length+1,J=g>0?Math.round(le/g*100):null;return{formName:n.formName,stepKey:y,stepTitle:R?.title??"",stepIndex:le,totalSteps:J,skipSubmit:R?.skipSubmit??!1,formData:{...u.value}}}(0,t.watch)(r,(y,R)=>{y&&y!==R&&d("stepEnter",N(y))},{immediate:!0});const W=(0,t.computed)(()=>{const y=p.value;return y?Di(y.schema,{loadOptionsSource:n.loadOptionsSource}):null}),G=(0,t.computed)(()=>Object.assign({},...n.structure.steps.map(y=>Di(y.schema,{loadOptionsSource:n.loadOptionsSource})._fields))),Y=(0,t.computed)(()=>r.value?Od(n.structure,r.value,u.value):null),L=(0,t.computed)(()=>Y.value===null),X=(0,t.computed)(()=>b.value.length>0),I=(0,t.computed)(()=>tu(n.structure,r.value,u.value));(0,t.watch)(I,y=>d("progress",y),{immediate:!0});const V=(0,t.computed)(()=>{const y=[],R=new Set;let g=Ui(n.structure);for(;g&&!R.has(g);){R.add(g);const le=Ga(n.structure,g);if(!le)break;y.push(le),g=Od(n.structure,g,u.value)??void 0}return y}),M=(0,t.computed)(()=>V.value.findIndex(y=>y.key===r.value));(0,t.watch)([V,M],([y,R])=>{R<=0||(b.value.length===0&&(b.value=y.slice(0,R).map(g=>g.key)),h.value=new Set([...h.value,...y.slice(0,R).map(g=>g.key)]))},{immediate:!0});const z=(0,t.ref)(null),T=(0,t.ref)(!1);function F(y){z.value=y}function f(){return z.value?.validate()??!0}async function k(){if(T.value||!f())return;const y=p.value;T.value=!0;let R=!1;try{if(await n.beforePrimary?.({data:{...u.value},currentStep:y,isTerminal:L.value})===!1)return;if(L.value){const le=W2(G.value,u.value);y?.skipSubmit||await n.onComplete?.(le),r.value&&d("formComplete",N(r.value));const J=y?.redirectUrl?.trim();J&&(R=!0,d("redirect",J),n.redirect&&typeof window<"u"&&window.location.assign(J)),d("complete",{...u.value});return}const g=Y.value;if(g&&r.value){h.value=new Set([...h.value,r.value]);const le=Ga(n.structure,g);d("stepComplete",{...N(r.value),destinationStepKey:g,destinationStepTitle:le?.title??""}),o.value="next",b.value.push(r.value),r.value=g}}finally{R||(T.value=!1)}}const D=(0,t.computed)(()=>n.autoAdvance&&oW(p.value)),Q=(0,t.computed)(()=>mW(p.value));let K=null;const E=(0,t.ref)(null);function te(){K&&(clearTimeout(K),K=null)}const ee=(0,t.ref)(Q.value?u.value[Q.value]:void 0);(0,t.watch)(r,()=>{te(),E.value=null,ee.value=Q.value?u.value[Q.value]:void 0},{flush:"sync"}),(0,t.watch)(()=>Q.value?u.value[Q.value]:void 0,y=>{D.value&&E.value!==r.value&&(!(y!=null&&y!=="")||y===ee.value||(te(),K=setTimeout(()=>{D.value&&(E.value=r.value??null,k())},n.autoAdvanceDelay)))});function v(){const y=b.value.pop();y&&(o.value="prev",r.value=y)}function B(y){return y===r.value||h.value.has(y)?!0:y===Y.value}async function O(y){if(y===r.value||!B(y))return;const R=V.value.findIndex(le=>le.key===y),g=M.value;if(!(R<0||g<0)){if(y===Y.value){await k();return}o.value=R<g?"prev":"next",b.value=V.value.slice(0,R).map(le=>le.key),r.value=y}}const w=(0,t.computed)(()=>b.value.length+1);return l({formData:u,currentKey:r,nextKey:Y,isTerminal:L,progress:I,completedKeys:h,validateStep:f}),(y,R)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["form-flow-player",{"form-flow-player--stages":e.showStages}])},[e.showStages?((0,t.openBlock)(),(0,t.createElementBlock)("nav",tH,[(0,t.createElementVNode)("ol",aH,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(V.value,(g,le)=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:g.key},[(0,t.createVNode)(Gt,{rounded:"",color:"purple",title:g.title,active:r.value===g.key,disabled:!B(g.key),"aria-current":r.value===g.key?"step":void 0,onClick:J=>O(g.key)},{media:(0,t.withCtx)(()=>[(0,t.createElementVNode)("span",{class:(0,t.normalizeClass)(["ffp-stage-number flex-center round border",r.value===g.key?"bg-primary color-white border-transparent":h.value.has(g.key)?"bg-green color-white border-green":"color-gray"])},[h.value.has(g.key)&&r.value!==g.key?((0,t.openBlock)(),(0,t.createBlock)(Ne,{key:0,icon:"check",size:.9})):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createTextVNode)((0,t.toDisplayString)(le+1),1)],64))],2)]),_:2},1032,["title","active","disabled","aria-current","onClick"])]))),128))]),(0,t.createElementVNode)("div",nH,[(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(p.value?.title),1),(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(M.value+1)+" / "+(0,t.toDisplayString)(V.value.length),1),(0,t.createVNode)(Pp,{class:"w-100p mt-05",value:I.value,size:8},null,8,["value"])])])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",dH,[(0,t.createVNode)(t.Transition,{name:m.value,mode:"out-in"},{default:(0,t.withCtx)(()=>[p.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:r.value,class:"ffp-step"},[!e.hideTitle&&p.value.title?((0,t.openBlock)(),(0,t.createElementBlock)("h2",cH,(0,t.toDisplayString)(p.value.title),1)):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(y.$slots,"step",{step:p.value,formData:u.value,stepKey:r.value,schema:W.value,setFormRef:F},()=>[W.value?((0,t.openBlock)(),(0,t.createBlock)(zs,{key:0,ref_key:"formRef",ref:z,modelValue:u.value,"onUpdate:modelValue":R[0]||(R[0]=g=>u.value=g),schema:W.value,components:e.components},(0,t.createSlots)({_:2},[(0,t.renderList)(s.value,g=>({name:g,fn:(0,t.withCtx)(le=>[(0,t.renderSlot)(y.$slots,g,(0,t.normalizeProps)((0,t.guardReactiveProps)(le)),void 0,!0)])}))]),1032,["modelValue","schema","components"])):(0,t.createCommentVNode)("",!0)],!0)])):((0,t.openBlock)(),(0,t.createElementBlock)("div",iH,[(0,t.renderSlot)(y.$slots,"empty",{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(c)?.("multiStep.empty")??"No steps to display."),1)],!0)]))]),_:3},8,["name"])]),(0,t.renderSlot)(y.$slots,"nav",{canGoBack:X.value,isTerminal:L.value,submitting:T.value,goBack:v,goPrimary:k,stepPosition:w.value,progress:I.value,currentKey:r.value,primaryLabel:p.value?.primaryLabel,autoAdvances:D.value},()=>[(0,t.createElementVNode)("div",sH,[(0,t.createVNode)(oe,{class:"ffp-nav-btn",flat:"",icon:"arrow_back",value:(0,t.unref)(c)?.("multiStep.previous")??"Back",disabled:!X.value,onClick:v},null,8,["value","disabled"]),e.hideCounter?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createElementBlock)("span",oH,(0,t.toDisplayString)(w.value),1)),L.value?((0,t.openBlock)(),(0,t.createBlock)(oe,{key:1,class:"ffp-nav-btn",value:p.value?.primaryLabel||(0,t.unref)(c)?.("multiStep.complete")||"Submit",loading:T.value,onClick:k},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(y.$slots,"primary-label",{isTerminal:!0},()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(c)?.("multiStep.complete")??"Submit"),1)],!0)]),_:3},8,["value","loading"])):((0,t.openBlock)(),(0,t.createBlock)(oe,{key:2,class:"ffp-nav-btn","icon-end":"arrow_forward",value:(0,t.unref)(c)?.("multiStep.next")??"Next",disabled:T.value,onClick:k},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(y.$slots,"primary-label",{isTerminal:!1},()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(c)?.("multiStep.next")??"Next"),1)],!0)]),_:3},8,["value","disabled"]))])],!0)],2))}}),uH=Le(mH,[["__scopeId","data-v-1546cba9"]]);function ot(e){var l;return((l=e.ownerDocument)==null?void 0:l.defaultView)||window}function Ct(e){return ot(e).getComputedStyle(e)}var Zb=Math.min,Vd=Math.max,Oi=Math.round;function uW(e){const l=Ct(e);let a=parseFloat(l.width),n=parseFloat(l.height);const d=e.offsetWidth,c=e.offsetHeight,i=Oi(a)!==d||Oi(n)!==c;return i&&(a=d,n=c),{width:a,height:n,fallback:i}}function za(e){return rW(e)?(e.nodeName||"").toLowerCase():""}var jc;function ZW(){if(jc)return jc;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(jc=e.brands.map((l=>l.brand+"/"+l.version)).join(" "),jc):navigator.userAgent}function Dt(e){return e instanceof ot(e).HTMLElement}function Ma(e){return e instanceof ot(e).Element}function rW(e){return e instanceof ot(e).Node}function rb(e){return typeof ShadowRoot>"u"?!1:e instanceof ot(e).ShadowRoot||e instanceof ShadowRoot}function gs(e){const{overflow:l,overflowX:a,overflowY:n,display:d}=Ct(e);return/auto|scroll|overlay|hidden|clip/.test(l+n+a)&&!["inline","contents"].includes(d)}function ZH(e){return["table","td","th"].includes(za(e))}function au(e){const l=/firefox/i.test(ZW()),a=Ct(e),n=a.backdropFilter||a.WebkitBackdropFilter;return a.transform!=="none"||a.perspective!=="none"||!!n&&n!=="none"||l&&a.willChange==="filter"||l&&!!a.filter&&a.filter!=="none"||["transform","perspective"].some((d=>a.willChange.includes(d)))||["paint","layout","strict","content"].some((d=>{const c=a.contain;return c!=null&&c.includes(d)}))}function bW(){return!/^((?!chrome|android).)*safari/i.test(ZW())}function g2(e){return["html","body","#document"].includes(za(e))}function hW(e){return Ma(e)?e:e.contextElement}var pW={x:1,y:1};function fn(e){const l=hW(e);if(!Dt(l))return pW;const a=l.getBoundingClientRect(),{width:n,height:d,fallback:c}=uW(l);let i=(c?Oi(a.width):a.width)/n,s=(c?Oi(a.height):a.height)/d;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}function Ed(e,l,a,n){var d,c;l===void 0&&(l=!1),a===void 0&&(a=!1);const i=e.getBoundingClientRect(),s=hW(e);let o=pW;l&&(n?Ma(n)&&(o=fn(n)):o=fn(e));const m=s?ot(s):window,u=!bW()&&a;let Z=(i.left+(u&&((d=m.visualViewport)==null?void 0:d.offsetLeft)||0))/o.x,r=(i.top+(u&&((c=m.visualViewport)==null?void 0:c.offsetTop)||0))/o.y,b=i.width/o.x,h=i.height/o.y;if(s){const p=ot(s),N=n&&Ma(n)?ot(n):n;let W=p.frameElement;for(;W&&n&&N!==p;){const G=fn(W),Y=W.getBoundingClientRect(),L=getComputedStyle(W);Y.x+=(W.clientLeft+parseFloat(L.paddingLeft))*G.x,Y.y+=(W.clientTop+parseFloat(L.paddingTop))*G.y,Z*=G.x,r*=G.y,b*=G.x,h*=G.y,Z+=Y.x,r+=Y.y,W=ot(W).frameElement}}return{width:b,height:h,top:r,right:Z+b,bottom:r+h,left:Z,x:Z,y:r}}function Va(e){return((rW(e)?e.ownerDocument:e.document)||window.document).documentElement}function ws(e){return Ma(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function WW(e){return Ed(Va(e)).left+ws(e).scrollLeft}function Bd(e){if(za(e)==="html")return e;const l=e.assignedSlot||e.parentNode||rb(e)&&e.host||Va(e);return rb(l)?l.host:l}function GW(e){const l=Bd(e);return g2(l)?l.ownerDocument.body:Dt(l)&&gs(l)?l:GW(l)}function Ei(e,l){var a;l===void 0&&(l=[]);const n=GW(e),d=n===((a=e.ownerDocument)==null?void 0:a.body),c=ot(n);return d?l.concat(c,c.visualViewport||[],gs(n)?n:[]):l.concat(n,Ei(n))}function bb(e,l,a){return l==="viewport"?Ka((function(n,d){const c=ot(n),i=Va(n),s=c.visualViewport;let o=i.clientWidth,m=i.clientHeight,u=0,Z=0;if(s){o=s.width,m=s.height;const r=bW();(r||!r&&d==="fixed")&&(u=s.offsetLeft,Z=s.offsetTop)}return{width:o,height:m,x:u,y:Z}})(e,a)):Ma(l)?Ka((function(n,d){const c=Ed(n,!0,d==="fixed"),i=c.top+n.clientTop,s=c.left+n.clientLeft,o=Dt(n)?fn(n):{x:1,y:1};return{width:n.clientWidth*o.x,height:n.clientHeight*o.y,x:s*o.x,y:i*o.y}})(l,a)):Ka((function(n){const d=Va(n),c=ws(n),i=n.ownerDocument.body,s=Vd(d.scrollWidth,d.clientWidth,i.scrollWidth,i.clientWidth),o=Vd(d.scrollHeight,d.clientHeight,i.scrollHeight,i.clientHeight);let m=-c.scrollLeft+WW(n);const u=-c.scrollTop;return Ct(i).direction==="rtl"&&(m+=Vd(d.clientWidth,i.clientWidth)-s),{width:s,height:o,x:m,y:u}})(Va(e)))}function hb(e){return Dt(e)&&Ct(e).position!=="fixed"?e.offsetParent:null}function pb(e){const l=ot(e);let a=hb(e);for(;a&&ZH(a)&&Ct(a).position==="static";)a=hb(a);return a&&(za(a)==="html"||za(a)==="body"&&Ct(a).position==="static"&&!au(a))?l:a||(function(n){let d=Bd(n);for(;Dt(d)&&!g2(d);){if(au(d))return d;d=Bd(d)}return null})(e)||l}function rH(e,l,a){const n=Dt(l),d=Va(l),c=Ed(e,!0,a==="fixed",l);let i={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(n||!n&&a!=="fixed")if((za(l)!=="body"||gs(d))&&(i=ws(l)),Dt(l)){const o=Ed(l,!0);s.x=o.x+l.clientLeft,s.y=o.y+l.clientTop}else d&&(s.x=WW(d));return{x:c.left+i.scrollLeft-s.x,y:c.top+i.scrollTop-s.y,width:c.width,height:c.height}}var bH={getClippingRect:function(e){let{element:l,boundary:a,rootBoundary:n,strategy:d}=e;const c=[...a==="clippingAncestors"?(function(o,m){const u=m.get(o);if(u)return u;let Z=Ei(o).filter((p=>Ma(p)&&za(p)!=="body")),r=null;const b=Ct(o).position==="fixed";let h=b?Bd(o):o;for(;Ma(h)&&!g2(h);){const p=Ct(h),N=au(h);(b?N||r:N||p.position!=="static"||!r||!["absolute","fixed"].includes(r.position))?r=p:Z=Z.filter((W=>W!==h)),h=Bd(h)}return m.set(o,Z),Z})(l,this._c):[].concat(a),n],i=c[0],s=c.reduce(((o,m)=>{const u=bb(l,m,d);return o.top=Vd(u.top,o.top),o.right=Zb(u.right,o.right),o.bottom=Zb(u.bottom,o.bottom),o.left=Vd(u.left,o.left),o}),bb(l,i,d));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:l,offsetParent:a,strategy:n}=e;const d=Dt(a),c=Va(a);if(a===c)return l;let i={scrollLeft:0,scrollTop:0},s={x:1,y:1};const o={x:0,y:0};if((d||!d&&n!=="fixed")&&((za(a)!=="body"||gs(c))&&(i=ws(a)),Dt(a))){const m=Ed(a);s=fn(a),o.x=m.x+a.clientLeft,o.y=m.y+a.clientTop}return{width:l.width*s.x,height:l.height*s.y,x:l.x*s.x-i.scrollLeft*s.x+o.x,y:l.y*s.y-i.scrollTop*s.y+o.y}},isElement:Ma,getDimensions:function(e){return Dt(e)?uW(e):e.getBoundingClientRect()},getOffsetParent:pb,getDocumentElement:Va,getScale:fn,async getElementRects(e){let{reference:l,floating:a,strategy:n}=e;const d=this.getOffsetParent||pb,c=this.getDimensions;return{reference:rH(l,await d(a),n),floating:{x:0,y:0,...await c(a)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Ct(e).direction==="rtl"},hH=(e,l,a)=>{const n=new Map,d={platform:bH,...a},c={...d.platform,_c:n};return lh(e,l,{...d,platform:c})};function NW(e,l){for(const a in l)Object.prototype.hasOwnProperty.call(l,a)&&(typeof l[a]=="object"&&e[a]?NW(e[a],l[a]):e[a]=l[a])}var Vt={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:e=>[...e,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function Kd(e,l){let a=Vt.themes[e]||{},n;do n=a[l],typeof n>"u"?a.$extend?a=Vt.themes[a.$extend]||{}:(a=null,n=Vt[l]):a=null;while(a);return n}function pH(e){const l=[e];let a=Vt.themes[e]||{};do a.$extend&&!a.$resetCss?(l.push(a.$extend),a=Vt.themes[a.$extend]||{}):a=null;while(a);return l.map(n=>`v-popper--theme-${n}`)}function Wb(e){const l=[e];let a=Vt.themes[e]||{};do a.$extend?(l.push(a.$extend),a=Vt.themes[a.$extend]||{}):a=null;while(a);return l}var On=!1;if(typeof window<"u"){On=!1;try{const e=Object.defineProperty({},"passive",{get(){On=!0}});window.addEventListener("test",null,e)}catch{}}var YW=!1;typeof window<"u"&&typeof navigator<"u"&&(YW=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);var LW=["auto","top","bottom","left","right"].reduce((e,l)=>e.concat([l,`${l}-start`,`${l}-end`]),[]),Gb={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},Nb={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function Yb(e,l){const a=e.indexOf(l);a!==-1&&e.splice(a,1)}function vo(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}var Lt=[],ka=null,Lb={};function Xb(e){let l=Lb[e];return l||(l=Lb[e]=[]),l}var nu=function(){};typeof window<"u"&&(nu=window.Element);function Oe(e){return function(l){return Kd(l.theme,e)}}var fo="__floating-vue__popper",XW=()=>(0,t.defineComponent)({name:"VPopper",provide(){return{[fo]:{parentPopper:this}}},inject:{[fo]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:Oe("disabled")},positioningDisabled:{type:Boolean,default:Oe("positioningDisabled")},placement:{type:String,default:Oe("placement"),validator:e=>LW.includes(e)},delay:{type:[String,Number,Object],default:Oe("delay")},distance:{type:[Number,String],default:Oe("distance")},skidding:{type:[Number,String],default:Oe("skidding")},triggers:{type:Array,default:Oe("triggers")},showTriggers:{type:[Array,Function],default:Oe("showTriggers")},hideTriggers:{type:[Array,Function],default:Oe("hideTriggers")},popperTriggers:{type:Array,default:Oe("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:Oe("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:Oe("popperHideTriggers")},container:{type:[String,Object,nu,Boolean],default:Oe("container")},boundary:{type:[String,nu],default:Oe("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:Oe("strategy")},autoHide:{type:[Boolean,Function],default:Oe("autoHide")},handleResize:{type:Boolean,default:Oe("handleResize")},instantMove:{type:Boolean,default:Oe("instantMove")},eagerMount:{type:Boolean,default:Oe("eagerMount")},popperClass:{type:[String,Array,Object],default:Oe("popperClass")},computeTransformOrigin:{type:Boolean,default:Oe("computeTransformOrigin")},autoMinSize:{type:Boolean,default:Oe("autoMinSize")},autoSize:{type:[Boolean,String],default:Oe("autoSize")},autoMaxSize:{type:Boolean,default:Oe("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:Oe("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:Oe("preventOverflow")},overflowPadding:{type:[Number,String],default:Oe("overflowPadding")},arrowPadding:{type:[Number,String],default:Oe("arrowPadding")},arrowOverflow:{type:Boolean,default:Oe("arrowOverflow")},flip:{type:Boolean,default:Oe("flip")},shift:{type:Boolean,default:Oe("shift")},shiftCrossAxis:{type:Boolean,default:Oe("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:Oe("noAutoFocus")},disposeTimeout:{type:Number,default:Oe("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[fo])==null?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,l;return((e=this.popperTriggers)==null?void 0:e.includes("hover"))||((l=this.popperShowTriggers)==null?void 0:l.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,l)=>(e[l]="$_computePosition",e),{})},created(){this.autoMinSize,this.autoMaxSize},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:l=!1,force:a=!1}={}){var n,d;(n=this.parentPopper)!=null&&n.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(a||!this.disabled)&&(((d=this.parentPopper)==null?void 0:d.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,l),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:l=!1}={}){var a;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:l}),this.parentPopper.lockedChild=null)},1e3));return}((a=this.parentPopper)==null?void 0:a.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,l),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((e=this.referenceNode)==null?void 0:e.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(l=>l.nodeType===l.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(nh({mainAxis:this.distance,crossAxis:this.skidding}));const l=this.placement.startsWith("auto");if(l?e.middleware.push(th({alignment:this.placement.split("-")[1]??""})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(dh({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!l&&this.flip&&e.middleware.push(ah({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(Rx({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:"arrowOverflow",fn:({placement:n,rects:d,middlewareData:c})=>{let i;const{centerOffset:s}=c.arrow;return n.startsWith("top")||n.startsWith("bottom")?i=Math.abs(s)>d.reference.width/2:i=Math.abs(s)>d.reference.height/2,{data:{overflow:i}}}}),this.autoMinSize||this.autoSize){const n=this.autoSize?this.autoSize:this.autoMinSize?"min":null;e.middleware.push({name:"autoSize",fn:({rects:d,placement:c,middlewareData:i})=>{var s;if((s=i.autoSize)!=null&&s.skip)return{};let o,m;return c.startsWith("top")||c.startsWith("bottom")?o=d.reference.width:m=d.reference.height,this.$_innerNode.style[n==="min"?"minWidth":n==="max"?"maxWidth":"width"]=o!=null?`${o}px`:null,this.$_innerNode.style[n==="min"?"minHeight":n==="max"?"maxHeight":"height"]=m!=null?`${m}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(Fx({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:n,availableHeight:d})=>{this.$_innerNode.style.maxWidth=n!=null?`${n}px`:null,this.$_innerNode.style.maxHeight=d!=null?`${d}px`:null}})));const a=await hH(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:a.x,y:a.y,placement:a.placement,strategy:a.strategy,arrow:{...a.middlewareData.arrow,...a.middlewareData.arrowOverflow}})},$_scheduleShow(e,l=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),ka&&this.instantMove&&ka.instantMove&&ka!==this.parentPopper){ka.$_applyHide(!0),this.$_applyShow(!0);return}l?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e,l=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(ka=this),l?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const l=this.delay;return parseInt(l&&l[e]||l||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await vo(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Ei(this.$_referenceNode),...Ei(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const l=this.$_referenceNode.getBoundingClientRect(),a=this.$_popperNode.querySelector(".v-popper__wrapper"),n=a.parentNode.getBoundingClientRect(),d=l.x+l.width/2-(n.left+a.offsetLeft),c=l.y+l.height/2-(n.top+a.offsetTop);this.result.transformOrigin=`${d}px ${c}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let l;for(let a=0;a<Lt.length;a++)l=Lt[a],l.showGroup!==e&&(l.hide(),l.$emit("close-group"))}Lt.push(this),document.body.classList.add("v-popper--some-open");for(const l of Wb(this.theme))Xb(l).push(this),document.body.classList.add(`v-popper--some-open--${l}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await vo(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(e=!1){if(this.shownChildren.size>0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,Yb(Lt,this),Lt.length===0&&document.body.classList.remove("v-popper--some-open");for(const a of Wb(this.theme)){const n=Xb(a);Yb(n,this),n.length===0&&document.body.classList.remove(`v-popper--some-open--${a}`)}ka===this&&(ka=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const l=this.disposeTimeout;l!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},l)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await vo(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error("No container for popover: "+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=a=>{this.isShown&&!this.$_hideInProgress||(a.usedByTooltip=!0,!this.$_preventShow&&this.show({event:a}))};this.$_registerTriggerListeners(this.$_targetNodes,Gb,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],Gb,this.popperTriggers,this.popperShowTriggers,e);const l=a=>{a.usedByTooltip||this.hide({event:a})};this.$_registerTriggerListeners(this.$_targetNodes,Nb,this.triggers,this.hideTriggers,l),this.$_registerTriggerListeners([this.$_popperNode],Nb,this.popperTriggers,this.popperHideTriggers,l)},$_registerEventListeners(e,l,a){this.$_events.push({targetNodes:e,eventType:l,handler:a}),e.forEach(n=>n.addEventListener(l,a,On?{passive:!0}:void 0))},$_registerTriggerListeners(e,l,a,n,d){let c=a;n!=null&&(c=typeof n=="function"?n(c):n),c.forEach(i=>{const s=l[i];s&&this.$_registerEventListeners(e,s,d)})},$_removeEventListeners(e){const l=[];this.$_events.forEach(a=>{const{targetNodes:n,eventType:d,handler:c}=a;!e||e===d?n.forEach(i=>i.removeEventListener(d,c)):l.push(a)}),this.$_events=l},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,l=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),l&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,l){for(const a of this.$_targetNodes){const n=a.getAttribute(e);n&&(a.removeAttribute(e),a.setAttribute(l,n))}},$_applyAttrsToTarget(e){for(const l of this.$_targetNodes)for(const a in e){const n=e[a];n==null?l.removeAttribute(a):l.setAttribute(a,n)}},$_updateParentShownChildren(e){let l=this.parentPopper;for(;l;)e?l.shownChildren.add(this.randomId):(l.shownChildren.delete(this.randomId),l.pendingHide&&l.hide()),l=l.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(Td>=e.left&&Td<=e.right&&Id>=e.top&&Id<=e.bottom){const l=this.$_popperNode.getBoundingClientRect(),a=Td-ba,n=Id-ha,d=l.left+l.width/2-ba+(l.top+l.height/2)-ha+l.width+l.height,c=ba+a*d,i=ha+n*d;return Jc(ba,ha,c,i,l.left,l.top,l.left,l.bottom)||Jc(ba,ha,c,i,l.left,l.top,l.right,l.top)||Jc(ba,ha,c,i,l.right,l.top,l.right,l.bottom)||Jc(ba,ha,c,i,l.left,l.bottom,l.right,l.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(YW){const e=On?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",l=>yb(l,!0),e),document.addEventListener("touchend",l=>Mb(l,!0),e)}else window.addEventListener("mousedown",e=>yb(e,!1),!0),window.addEventListener("click",e=>Mb(e,!1),!0);window.addEventListener("resize",GH)}function yb(e,l){if(Vt.autoHideOnMousedown)yW(e,l);else for(let a=0;a<Lt.length;a++){const n=Lt[a];try{n.mouseDownContains=n.popperNode().contains(e.target)}catch{}}}function Mb(e,l){Vt.autoHideOnMousedown||yW(e,l)}function yW(e,l){const a={};for(let n=Lt.length-1;n>=0;n--){const d=Lt[n];try{const c=d.containsGlobalTarget=d.mouseDownContains||d.popperNode().contains(e.target);d.pendingHide=!1,requestAnimationFrame(()=>{if(d.pendingHide=!1,!a[d.randomId]&&Vb(d,c,e)){if(d.$_handleGlobalClose(e,l),!e.closeAllPopover&&e.closePopover&&c){let s=d.parentPopper;for(;s;)a[s.randomId]=!0,s=s.parentPopper;return}let i=d.parentPopper;for(;i&&Vb(i,i.containsGlobalTarget,e);)i.$_handleGlobalClose(e,l),i=i.parentPopper}})}catch{}}}function Vb(e,l,a){return a.closeAllPopover||a.closePopover&&l||WH(e,a)&&!l}function WH(e,l){if(typeof e.autoHide=="function"){const a=e.autoHide(l);return e.lastAutoHide=a,a}return e.autoHide}function GH(){for(let e=0;e<Lt.length;e++)Lt[e].$_computePosition()}var ba=0,ha=0,Td=0,Id=0;typeof window<"u"&&window.addEventListener("mousemove",e=>{ba=Td,ha=Id,Td=e.clientX,Id=e.clientY},On?{passive:!0}:void 0);function Jc(e,l,a,n,d,c,i,s){const o=((i-d)*(l-c)-(s-c)*(e-d))/((s-c)*(a-e)-(i-d)*(n-l)),m=((a-e)*(l-c)-(n-l)*(e-d))/((s-c)*(a-e)-(i-d)*(n-l));return o>=0&&o<=1&&m>=0&&m<=1}var NH={extends:XW()},Rs=(e,l)=>{const a=e.__vccOpts||e;for(const[n,d]of l)a[n]=d;return a};function YH(e,l,a,n,d,c){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{ref:"reference",class:(0,t.normalizeClass)(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[(0,t.renderSlot)(e.$slots,"default",(0,t.normalizeProps)((0,t.guardReactiveProps)(e.slotData)))],2)}var LH=Rs(NH,[["render",YH]]);function XH(){var e=window.navigator.userAgent,l=e.indexOf("MSIE ");if(l>0)return parseInt(e.substring(l+5,e.indexOf(".",l)),10);if(e.indexOf("Trident/")>0){var a=e.indexOf("rv:");return parseInt(e.substring(a+3,e.indexOf(".",a)),10)}var n=e.indexOf("Edge/");return n>0?parseInt(e.substring(n+5,e.indexOf(".",n)),10):-1}var ci;function du(){du.init||(du.init=!0,ci=XH()!==-1)}var Ss={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){du(),(0,t.nextTick)(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",ci&&this.$el.appendChild(e),e.data="about:blank",ci||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!ci&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}},yH=(0,t.withScopeId)("data-v-b329ee4c");(0,t.pushScopeId)("data-v-b329ee4c");var MH={class:"resize-observer",tabindex:"-1"};(0,t.popScopeId)();Ss.render=yH((e,l,a,n,d,c)=>((0,t.openBlock)(),(0,t.createBlock)("div",MH)));Ss.__scopeId="data-v-b329ee4c";Ss.__file="src/components/ResizeObserver.vue";var MW=(e="theme")=>({computed:{themeClass(){return pH(this[e])}}}),VH=(0,t.defineComponent)({name:"VPopperContent",components:{ResizeObserver:Ss},mixins:[MW()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),TH=["id","aria-hidden","tabindex","data-popper-placement"],IH={ref:"inner",class:"v-popper__inner"},xH=[(0,t.createElementVNode)("div",{class:"v-popper__arrow-outer"},null,-1),(0,t.createElementVNode)("div",{class:"v-popper__arrow-inner"},null,-1)];function zH(e,l,a,n,d,c){const i=(0,t.resolveComponent)("ResizeObserver");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{id:e.popperId,ref:"popover",class:(0,t.normalizeClass)(["v-popper__popper",[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:(0,t.normalizeStyle)(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?"false":"true",tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:l[2]||(l[2]=(0,t.withKeys)(s=>e.autoHide&&e.$emit("hide"),["esc"]))},[(0,t.createElementVNode)("div",{class:"v-popper__backdrop",onClick:l[0]||(l[0]=s=>e.autoHide&&e.$emit("hide"))}),(0,t.createElementVNode)("div",{class:"v-popper__wrapper",style:(0,t.normalizeStyle)(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[(0,t.createElementVNode)("div",IH,[e.mounted?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createElementVNode)("div",null,[(0,t.renderSlot)(e.$slots,"default")]),e.handleResize?((0,t.openBlock)(),(0,t.createBlock)(i,{key:0,onNotify:l[1]||(l[1]=s=>e.$emit("resize",s))})):(0,t.createCommentVNode)("",!0)],64)):(0,t.createCommentVNode)("",!0)],512),(0,t.createElementVNode)("div",{ref:"arrow",class:"v-popper__arrow-container",style:(0,t.normalizeStyle)(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},xH,4)],4)],46,TH)}var VW=Rs(VH,[["render",zH]]),TW={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}},cu=function(){};typeof window<"u"&&(cu=window.Element);var gH=(0,t.defineComponent)({name:"VPopperWrapper",components:{Popper:LH,PopperContent:VW},mixins:[TW,MW("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,cu,Boolean],default:void 0},boundary:{type:[String,cu],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function wH(e,l,a,n,d,c){const i=(0,t.resolveComponent)("PopperContent"),s=(0,t.resolveComponent)("Popper");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({ref:"popper"},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:l[0]||(l[0]=()=>e.$emit("show")),onHide:l[1]||(l[1]=()=>e.$emit("hide")),"onUpdate:shown":l[2]||(l[2]=o=>e.$emit("update:shown",o)),onApplyShow:l[3]||(l[3]=()=>e.$emit("apply-show")),onApplyHide:l[4]||(l[4]=()=>e.$emit("apply-hide")),onCloseGroup:l[5]||(l[5]=()=>e.$emit("close-group")),onCloseDirective:l[6]||(l[6]=()=>e.$emit("close-directive")),onAutoHide:l[7]||(l[7]=()=>e.$emit("auto-hide")),onResize:l[8]||(l[8]=()=>e.$emit("resize"))}),{default:(0,t.withCtx)(({popperId:o,isShown:m,shouldMountContent:u,skipTransition:Z,autoHide:r,show:b,hide:h,handleResize:p,onResize:N,classes:W,result:G})=>[(0,t.renderSlot)(e.$slots,"default",{shown:m,show:b,hide:h}),(0,t.createVNode)(i,{ref:"popperContent","popper-id":o,theme:e.finalTheme,shown:m,mounted:u,"skip-transition":Z,"auto-hide":r,"handle-resize":p,classes:W,result:G,onHide:h,onResize:N},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"popper",{shown:m,hide:h})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},16,["theme","target-nodes","popper-node","class"])}var w2=Rs(gH,[["render",wH]]),RH={...w2,name:"VDropdown",vPopperTheme:"dropdown"},SH={...w2,name:"VMenu",vPopperTheme:"menu"},vH={...w2,name:"VTooltip",vPopperTheme:"tooltip"},fH=(0,t.defineComponent)({name:"VTooltipDirective",components:{Popper:XW(),PopperContent:VW},mixins:[TW],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>Kd(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>Kd(e.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const l=++this.$_fetchId,a=this.content(this);a.then?a.then(n=>this.onResult(l,n)):this.onResult(l,a)}},onResult(e,l){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=l)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),FH=["innerHTML"],kH=["textContent"];function jH(e,l,a,n,d,c){const i=(0,t.resolveComponent)("PopperContent"),s=(0,t.resolveComponent)("Popper");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({ref:"popper"},e.$attrs,{theme:e.theme,"target-nodes":e.targetNodes,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:(0,t.withCtx)(({popperId:o,isShown:m,shouldMountContent:u,skipTransition:Z,autoHide:r,hide:b,handleResize:h,onResize:p,classes:N,result:W})=>[(0,t.createVNode)(i,{ref:"popperContent",class:(0,t.normalizeClass)({"v-popper--tooltip-loading":e.loading}),"popper-id":o,theme:e.theme,shown:m,mounted:u,"skip-transition":Z,"auto-hide":r,"handle-resize":h,classes:N,result:W,onHide:b,onResize:p},{default:(0,t.withCtx)(()=>[e.html?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:0,innerHTML:e.finalContent},null,8,FH)):((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:1,textContent:(0,t.toDisplayString)(e.finalContent)},null,8,kH))]),_:2},1032,["class","popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:1},16,["theme","target-nodes","popper-node","onApplyShow","onApplyHide"])}var JH=Rs(fH,[["render",jH]]),IW="v-popper--has-tooltip";function CH(e,l){let a=e.placement;if(!a&&l)for(const n of LW)l[n]&&(a=n);return a||(a=Kd(e.theme||"tooltip","placement")),a}function xW(e,l,a){let n;const d=typeof l;return d==="string"?n={content:l}:l&&d==="object"?n=l:n={content:!1},n.placement=CH(n,a),n.targetNodes=()=>[e],n.referenceNode=()=>e,n}var Fo,Hd,DH=0;function UH(){if(Fo)return;Hd=(0,t.ref)([]),Fo=(0,t.createApp)({name:"VTooltipDirectiveApp",setup(){return{directives:Hd}},render(){return this.directives.map(l=>(0,t.h)(JH,{...l.options,shown:l.shown||l.options.shown,key:l.id}))},devtools:{hide:!0}});const e=document.createElement("div");document.body.appendChild(e),Fo.mount(e)}function OH(e,l,a){UH();const n=(0,t.ref)(xW(e,l,a)),d=(0,t.ref)(!1),c={id:DH++,options:n,shown:d};return Hd.value.push(c),e.classList&&e.classList.add(IW),e.$_popper={options:n,item:c,show(){d.value=!0},hide(){d.value=!1}}}function zW(e){if(e.$_popper){const l=Hd.value.indexOf(e.$_popper.item);l!==-1&&Hd.value.splice(l,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(IW)}function Tb(e,{value:l,modifiers:a}){const n=xW(e,l,a);if(!n.content||Kd(n.theme||"tooltip","disabled"))zW(e);else{let d;e.$_popper?(d=e.$_popper,d.options.value=n):d=OH(e,l,a),typeof l.shown<"u"&&l.shown!==e.$_popperOldShown&&(e.$_popperOldShown=l.shown,l.shown?d.show():d.hide())}}var EH={beforeMount:Tb,updated:Tb,beforeUnmount(e){zW(e)}};function Ib(e){e.addEventListener("mousedown",Bi),e.addEventListener("click",Bi),e.addEventListener("touchstart",gW,On?{passive:!0}:!1)}function xb(e){e.removeEventListener("mousedown",Bi),e.removeEventListener("click",Bi),e.removeEventListener("touchstart",gW),e.removeEventListener("touchend",wW),e.removeEventListener("touchcancel",RW)}function Bi(e){const l=e.currentTarget;e.closePopover=!l.$_vclosepopover_touch,e.closeAllPopover=l.$_closePopoverModifiers&&!!l.$_closePopoverModifiers.all}function gW(e){if(e.changedTouches.length===1){const l=e.currentTarget;l.$_vclosepopover_touch=!0,l.$_vclosepopover_touchPoint=e.changedTouches[0],l.addEventListener("touchend",wW),l.addEventListener("touchcancel",RW)}}function wW(e){const l=e.currentTarget;if(l.$_vclosepopover_touch=!1,e.changedTouches.length===1){const a=e.changedTouches[0],n=l.$_vclosepopover_touchPoint;e.closePopover=Math.abs(a.screenY-n.screenY)<20&&Math.abs(a.screenX-n.screenX)<20,e.closeAllPopover=l.$_closePopoverModifiers&&!!l.$_closePopoverModifiers.all}}function RW(e){const l=e.currentTarget;l.$_vclosepopover_touch=!1}var BH={beforeMount(e,{value:l,modifiers:a}){e.$_closePopoverModifiers=a,(typeof l>"u"||l)&&Ib(e)},updated(e,{value:l,oldValue:a,modifiers:n}){e.$_closePopoverModifiers=n,l!==a&&(typeof l>"u"||l?Ib(e):xb(e))},beforeUnmount(e){xb(e)}};function KH(e,l={}){e.$_vTooltipInstalled||(e.$_vTooltipInstalled=!0,NW(Vt,l),e.directive("tooltip",EH),e.directive("close-popper",BH),e.component("VTooltip",vH),e.component("VDropdown",RH),e.component("VMenu",SH))}var HH={version:"5.2.2",install:KH,options:Vt},PH=["src"],QH=(0,t.defineComponent)({__name:"LightboxImage",props:{src:{}},setup(e){const l=e,{imageSrc:a}=b2(()=>l.src);return(n,d)=>((0,t.openBlock)(),(0,t.createElementBlock)("img",{draggable:!1,src:(0,t.unref)(a),alt:"Preview",class:"lightbox-image"},null,8,PH))}}),AH=QH,_H={key:0,class:"center"},$H={key:3},qH={class:"bgl-lightbox-item"},eP={key:2,class:"lightbox-pdf"},lP=["src","title"],tP={key:3,class:"lightbox-file"},aP={class:"file-info txt-white flex m_block align-items-start gap-025"},nP={class:"txt-start"},dP={class:"mx-0 light"},cP={class:"semi word-break-all"},iP={class:"mx-0"},sP={class:"semi"},oP=(0,t.defineComponent)({__name:"Lightbox",setup(e,{expose:l}){const a=(0,t.ref)(!1),n=(0,t.ref)(null),d=(0,t.ref)([]),c=(0,t.ref)(0),i=(0,t.computed)(()=>d.value[c.value]),s=(0,t.ref)(1),o=(0,t.computed)(()=>s.value===1),m=(0,t.computed)(()=>({allowTouchMove:s.value===1,touchRatio:s.value===1?1:0,simulateTouch:s.value===1}));function u(b,h){a.value=!0,d.value=h||[b],c.value=d.value.findIndex(p=>{const N=b.src!==void 0&&b.src!==null&&b.src!==""&&p.src===b.src,W=b.pathKey!==void 0&&b.pathKey!==null&&b.pathKey!==""&&p.pathKey===b.pathKey;return N||W}),c.value===-1&&(c.value=0),s.value=1}function Z(){a.value=!1}Xs(Z,a);function r(b){c.value=b,s.value=1}return(0,t.watch)(()=>a.value,async b=>{b?(document.body.style.overflow="hidden",await(0,t.nextTick)(),n.value?.open||n.value?.showModal()):(document.body.style.overflow="",n.value?.open&&n.value.close())}),(0,t.watch)(()=>c.value,()=>{s.value=1}),l({open:u,close:Z}),(b,h)=>((0,t.openBlock)(),(0,t.createBlock)(t.Transition,{name:"fade"},{default:(0,t.withCtx)(()=>[a.value?((0,t.openBlock)(),(0,t.createElementBlock)("dialog",{key:0,ref_key:"dialogRef",ref:n,class:"bgl-lightbox-overlay",onCancel:(0,t.withModifiers)(Z,["prevent"])},[(0,t.createElementVNode)("div",{class:"flex start w-100 space-between p-025 z-9",onClick:Z},[(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"close",onClick:Z}),i.value?.enableZoom&&i.value?.type==="image"?((0,t.openBlock)(),(0,t.createElementBlock)("div",_H,[(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"remove",disabled:s.value===1,onClick:h[0]||(h[0]=p=>s.value--)},null,8,["disabled"]),(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"zoom_in",disabled:s.value===1,onClick:h[1]||(h[1]=p=>s.value=1)},null,8,["disabled"]),(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"add",disabled:s.value===3,onClick:h[2]||(h[2]=p=>s.value++)},null,8,["disabled"])])):(0,t.createCommentVNode)("",!0),i.value?.openFile&&i.value?.src?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:1,class:"color-white",round:"",thin:"",flat:"",iconEnd:"arrow_outward",value:"$t:lightbox.openFile",href:i.value?.src,target:"_blank"},null,8,["href"])):(0,t.createCommentVNode)("",!0),i.value?.download&&i.value?.src?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:2,class:"color-white",round:"",thin:"",flat:"",icon:"download",value:"Download File",onClick:h[3]||(h[3]=p=>(0,t.unref)(r2)(i.value?.src))})):(0,t.createCommentVNode)("",!0),!i.value?.openFile&&!i.value?.download?((0,t.openBlock)(),(0,t.createElementBlock)("div",$H)):(0,t.createCommentVNode)("",!0)]),d.value&&d.value.length>0?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(u5),{key:0,index:c.value,"onUpdate:index":h[6]||(h[6]=p=>c.value=p),items:d.value,"initial-slide":c.value,class:(0,t.normalizeClass)(["bgl-lightbox-swiper",{zoomed:s.value>1}]),navigation:d.value.length>1,"grab-cursor":o.value,keyboard:!0,loop:!1,speed:400,"slides-per-view":1,"space-between":0,effect:"slide","advanced-options":m.value,onClick:h[7]||(h[7]=(0,t.withModifiers)(()=>{},["stop"]))},{default:(0,t.withCtx)(({item:p})=>[(0,t.createElementVNode)("div",qH,[p.type==="image"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Z5),{key:0,zoom:s.value,"onUpdate:zoom":h[4]||(h[4]=N=>s.value=N),disabled:!p?.enableZoom,"mouse-wheel-to-zoom":!1,"double-click-to-zoom":!0,"max-scale":5,"min-scale":1,"aspect-ratio":0,"limit-translation":!0,onClick:h[5]||(h[5]=(0,t.withModifiers)(()=>{},["stop"]))},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(AH,{src:p?.src},null,8,["src"])]),_:2},1032,["zoom","disabled"])):p?.type==="video"&&p?.src?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(zu),{key:1,src:p?.src,autoplay:"",controls:"",class:"lightbox-video"},null,8,["src"])):p?.type==="pdf"&&p?.src?((0,t.openBlock)(),(0,t.createElementBlock)("div",eP,[(0,t.createElementVNode)("embed",{src:(0,t.unref)(Z2)(p?.src),type:"application/pdf",title:p?.name},null,8,lP)])):((0,t.openBlock)(),(0,t.createElementBlock)("div",tP,[(0,t.createElementVNode)("div",aP,[(0,t.createVNode)((0,t.unref)(Ne),{class:"m-0 m_none",icon:"draft",size:10,weight:"12"}),(0,t.createVNode)((0,t.unref)(Ne),{class:"m-0 none m_block m_-mb-1",icon:"draft",size:4,weight:"2"}),(0,t.createElementVNode)("div",nP,[(0,t.createElementVNode)("p",dP,[h[9]||(h[9]=(0,t.createTextVNode)(" File: ",-1)),(0,t.createElementVNode)("span",cP,(0,t.toDisplayString)(p?.name),1)]),(0,t.createElementVNode)("p",iP,[h[10]||(h[10]=(0,t.createTextVNode)(" Type: ",-1)),(0,t.createElementVNode)("span",sP,(0,t.toDisplayString)(p?.type),1)]),(0,t.createVNode)((0,t.unref)(oe),{href:p?.src,target:"_blank",round:"",thin:"",class:"mt-1",value:"Open file"},null,8,["href"])])])]))])]),"prev-button":(0,t.withCtx)(({prev:p})=>[(0,t.createVNode)((0,t.unref)(oe),{icon:"arrow_back",color:"black",onClick:p},null,8,["onClick"])]),"next-button":(0,t.withCtx)(({next:p})=>[(0,t.createVNode)((0,t.unref)(oe),{icon:"arrow_forward",color:"black",onClick:p},null,8,["onClick"])]),_:1},8,["index","items","initial-slide","class","navigation","grab-cursor","advanced-options"])):(0,t.createCommentVNode)("",!0),d.value&&d.value.length>1?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:1,class:"lightbox-thumbnails",onClick:h[8]||(h[8]=(0,t.withModifiers)(()=>{},["stop"]))},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(d.value,(p,N)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:N},[p.type==="image"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Sd),{key:0,class:(0,t.normalizeClass)(["thumbnail",{active:c.value===N}]),src:p.src,alt:"",onClick:(0,t.withModifiers)(W=>r(N),["stop"])},null,8,["src","class","onClick"])):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ne),{key:1,class:(0,t.normalizeClass)(["thumbnail thumbnail-icon",{active:c.value===N}]),icon:"description",onClick:(0,t.withModifiers)(W=>r(N),["stop"])},null,8,["class","onClick"]))],64))),128))])):(0,t.createCommentVNode)("",!0)],544)):(0,t.createCommentVNode)("",!0)]),_:1}))}}),mP=oP,bd={},pn=e=>{},uP={mounted(e,l){zb(iu(l,e)),pn=a=>{gb(a,e,l)},e.addEventListener("click",pn)},updated(e,l){zb(iu(l,e)),e.removeEventListener("click",pn),pn=a=>{gb(a,e,l)},e.addEventListener("click",pn)},unmounted(e){e.removeEventListener("click",pn)},getSSRProps(){return{}}};function zb(e){e.group&&(bd[e.group]||(bd[e.group]=[]),bd[e.group].findIndex(l=>l.src===e.src)===-1&&bd[e.group].push(e))}function gb(e,l,a){e.stopPropagation();const n=iu(a,l),d=pP();if(!d||!d.open)return;const c=d.open;c(n,n&&n.group?bd[n.group]:void 0)}function iu(e,l){let{group:a,src:n,type:d,name:c,thumbnail:i,enableZoom:s,openFile:o,download:m,pathKey:u}=e.value||{};return n=Al(n||u)||e.value||l.getAttribute("src")||"",d=d||hP(n),c=c||bP(n)||l.getAttribute("alt")||"",{src:n,type:d,name:c,thumbnail:i,group:a,enableZoom:s,openFile:o,download:m}}var ZP=/youtube\.com|youtu\.be/,rP=/vimeo\.com/;function bP(e){return!e||typeof e!="string"?"":(e.split("/").pop()||"").replace(/\.[^/.]+$/,"")}function hP(e){if(typeof e!="string"||!e)return"unknown";if(e.startsWith("blob:")||/^data:image\//i.test(e))return"image";if(/^data:video\//i.test(e))return"video";const l=(e.split(".").pop()||"").toLowerCase(),a=e.split("?")[0].split(".").pop()?.toLowerCase()||"";return Gi.test(l)||Gi.test(a)?"image":Lh.test(l)||ZP.test(e)||rP.test(e)?"video":["pdf"].includes(l)?"pdf":l??"unknown"}var ko;function pP(){if(!(typeof document>"u")){if(!ko){const e=document.createElement("div");document.body.prepend(e),ko=(0,t.createApp)(mP).mount(e)}return ko}}var WP={install(e){e.directive("lightbox",uP)}},GP=WP,NP={beforeMount(e,l){e.clickOutsideEvent=a=>{e===a.target||e.contains(a.target)||l.value(a)},document.addEventListener("click",e.clickOutsideEvent)},unmounted(e){document.removeEventListener("click",e.clickOutsideEvent)}},SW=qd.__export({EventBus:()=>Fs,POSITION:()=>Qd,TYPE:()=>Ul,createToastInterface:()=>Ad,default:()=>AW,globalEventBus:()=>R2,provideToast:()=>c8,toastInjectionKey:()=>ks,useToast:()=>QW},1),YP=Object.defineProperty,wb=Object.getOwnPropertySymbols,LP=Object.prototype.hasOwnProperty,XP=Object.prototype.propertyIsEnumerable,Rb=(e,l,a)=>l in e?YP(e,l,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[l]=a,vW=(e,l)=>{for(var a in l||(l={}))LP.call(l,a)&&Rb(e,a,l[a]);if(wb)for(var a of wb(l))XP.call(l,a)&&Rb(e,a,l[a]);return e},vs=e=>typeof e=="function",fs=e=>typeof e=="string",fW=e=>fs(e)&&e.trim().length>0,yP=e=>typeof e=="number",Ba=e=>typeof e>"u",Pd=e=>typeof e=="object"&&e!==null,MP=e=>Ut(e,"tag")&&fW(e.tag),FW=e=>window.TouchEvent&&e instanceof TouchEvent,kW=e=>Ut(e,"component")&&jW(e.component),VP=e=>vs(e)||Pd(e),jW=e=>!Ba(e)&&(fs(e)||VP(e)||kW(e)),Sb=e=>Pd(e)&&["height","width","right","left","top","bottom"].every(l=>yP(e[l])),Ut=(e,l)=>(Pd(e)||vs(e))&&l in e,TP=(e=>()=>e++)(0);function jo(e){return FW(e)?e.targetTouches[0].clientX:e.clientX}function vb(e){return FW(e)?e.targetTouches[0].clientY:e.clientY}var IP=e=>{Ba(e.remove)?e.parentNode&&e.parentNode.removeChild(e):e.remove()},bc=e=>kW(e)?bc(e.component):MP(e)?(0,t.defineComponent)({render(){return e}}):typeof e=="string"?e:(0,t.toRaw)((0,t.unref)(e)),xP=e=>{if(typeof e=="string")return e;const l=Ut(e,"props")&&Pd(e.props)?e.props:{},a=Ut(e,"listeners")&&Pd(e.listeners)?e.listeners:{};return{component:bc(e),props:l,listeners:a}},zP=()=>typeof window<"u",Fs=class{constructor(){this.allHandlers={}}getHandlers(e){return this.allHandlers[e]||[]}on(e,l){const a=this.getHandlers(e);a.push(l),this.allHandlers[e]=a}off(e,l){const a=this.getHandlers(e);a.splice(a.indexOf(l)>>>0,1)}emit(e,l){this.getHandlers(e).forEach(a=>a(l))}},gP=e=>["on","off","emit"].every(l=>Ut(e,l)&&vs(e[l])),Ul;(function(e){e.SUCCESS="success",e.ERROR="error",e.WARNING="warning",e.INFO="info",e.DEFAULT="default"})(Ul||(Ul={}));var Qd;(function(e){e.TOP_LEFT="top-left",e.TOP_CENTER="top-center",e.TOP_RIGHT="top-right",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_CENTER="bottom-center",e.BOTTOM_RIGHT="bottom-right"})(Qd||(Qd={}));var ql;(function(e){e.ADD="add",e.DISMISS="dismiss",e.UPDATE="update",e.CLEAR="clear",e.UPDATE_DEFAULTS="update_defaults"})(ql||(ql={}));var la="Vue-Toastification",ht={type:{type:String,default:Ul.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},fb={type:ht.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},Cc={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:ht.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},Jo={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},Fb={transition:{type:[Object,String],default:`${la}__bounce`}},da={CORE_TOAST:{position:{type:String,default:Qd.TOP_RIGHT},draggable:ht.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:ht.trueBoolean,pauseOnHover:ht.trueBoolean,closeOnClick:ht.trueBoolean,timeout:Jo.timeout,hideProgressBar:Jo.hideProgressBar,toastClassName:ht.classNames,bodyClassName:ht.classNames,icon:fb.customIcon,closeButton:Cc.component,closeButtonClassName:Cc.classNames,showCloseButtonOnHover:Cc.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new Fs}},TOAST:{id:{type:[String,Number],required:!0,default:0},type:ht.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},CONTAINER:{container:{type:[Object,Function],default:()=>document.body},newestOnTop:ht.trueBoolean,maxToasts:{type:Number,default:20},transition:Fb.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:e=>e},filterToasts:{type:Function,default:e=>e},containerClassName:ht.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},PROGRESS_BAR:Jo,ICON:fb,TRANSITION:Fb,CLOSE_BUTTON:Cc},JW=(0,t.defineComponent)({name:"VtProgressBar",props:da.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${la}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function wP(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{style:(0,t.normalizeStyle)(e.style),class:(0,t.normalizeClass)(e.cpClass)},null,6)}JW.render=wP;var RP=JW,CW=(0,t.defineComponent)({name:"VtCloseButton",props:da.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?bc(this.component):"button"},classes(){const e=[`${la}__close-button`];return this.showOnHover&&e.push("show-on-hover"),e.concat(this.classNames)}}}),SP=(0,t.createTextVNode)(" × ");function vP(e,l){return(0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.buttonComponent),(0,t.mergeProps)({"aria-label":e.ariaLabel,class:e.classes},e.$attrs),{default:(0,t.withCtx)(()=>[SP]),_:1},16,["aria-label","class"])}CW.render=vP;var fP=CW,DW={},FP={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},kP=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1)];function jP(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",FP,kP)}DW.render=jP;var JP=DW,UW={},CP={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},DP=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1)];function UP(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",CP,DP)}UW.render=UP;var kb=UW,OW={},OP={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},EP=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)];function BP(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",OP,EP)}OW.render=BP;var KP=OW,EW={},HP={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},PP=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)];function QP(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",HP,PP)}EW.render=QP;var AP=EW,BW=(0,t.defineComponent)({name:"VtIcon",props:da.ICON,computed:{customIconChildren(){return Ut(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return fs(this.customIcon)?this.trimValue(this.customIcon):Ut(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return Ut(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:jW(this.customIcon)?bc(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[Ul.DEFAULT]:kb,[Ul.INFO]:kb,[Ul.SUCCESS]:JP,[Ul.ERROR]:AP,[Ul.WARNING]:KP}[this.type]},iconClasses(){const e=[`${la}__icon`];return this.hasCustomIcon?e.concat(this.customIconClass):e}},methods:{trimValue(e,l=""){return fW(e)?e.trim():l}}});function _P(e,l){return(0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.component),{class:(0,t.normalizeClass)(e.iconClasses)},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.customIconChildren),1)]),_:1},8,["class"])}BW.render=_P;var KW=(0,t.defineComponent)({name:"VtToast",components:{ProgressBar:RP,CloseButton:fP,Icon:BW},inheritAttrs:!1,props:Object.assign({},da.CORE_TOAST,da.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const e=[`${la}__toast`,`${la}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&e.push("disable-transition"),this.rtl&&e.push(`${la}__toast--rtl`),e},bodyClasses(){return[`${la}__toast-${fs(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return Sb(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:Ut,getVueComponentFromObj:bc,closeToast(){this.eventBus.emit(ql.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const e=this.$el;e.addEventListener("touchstart",this.onDragStart,{passive:!0}),e.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const e=this.$el;e.removeEventListener("touchstart",this.onDragStart),e.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(e){this.beingDragged=!0,this.dragPos={x:jo(e),y:vb(e)},this.dragStart=jo(e),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(e){this.beingDragged&&(e.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:jo(e),y:vb(e)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,Sb(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),$P=["role"];function qP(e,l){const a=(0,t.resolveComponent)("Icon"),n=(0,t.resolveComponent)("CloseButton"),d=(0,t.resolveComponent)("ProgressBar");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(e.classes),style:(0,t.normalizeStyle)(e.draggableStyle),onClick:l[0]||(l[0]=(...c)=>e.clickHandler&&e.clickHandler(...c)),onMouseenter:l[1]||(l[1]=(...c)=>e.hoverPause&&e.hoverPause(...c)),onMouseleave:l[2]||(l[2]=(...c)=>e.hoverPlay&&e.hoverPlay(...c))},[e.icon?((0,t.openBlock)(),(0,t.createBlock)(a,{key:0,"custom-icon":e.icon,type:e.type},null,8,["custom-icon","type"])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("div",{role:e.accessibility.toastRole||"alert",class:(0,t.normalizeClass)(e.bodyClasses)},[typeof e.content=="string"?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createTextVNode)((0,t.toDisplayString)(e.content),1)],2112)):((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.getVueComponentFromObj(e.content)),(0,t.mergeProps)({key:1,"toast-id":e.id},e.hasProp(e.content,"props")?e.content.props:{},(0,t.toHandlers)(e.hasProp(e.content,"listeners")?e.content.listeners:{}),{onCloseToast:e.closeToast}),null,16,["toast-id","onCloseToast"]))],10,$P),e.closeButton?((0,t.openBlock)(),(0,t.createBlock)(n,{key:1,component:e.closeButton,"class-names":e.closeButtonClassName,"show-on-hover":e.showCloseButtonOnHover,"aria-label":e.accessibility.closeButtonLabel,onClick:(0,t.withModifiers)(e.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):(0,t.createCommentVNode)("v-if",!0),e.timeout?((0,t.openBlock)(),(0,t.createBlock)(d,{key:2,"is-running":e.isRunning,"hide-progress-bar":e.hideProgressBar,timeout:e.timeout,onCloseToast:e.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):(0,t.createCommentVNode)("v-if",!0)],38)}KW.render=qP;var e8=KW,HW=(0,t.defineComponent)({name:"VtTransition",props:da.TRANSITION,emits:["leave"],methods:{hasProp:Ut,leave(e){e instanceof HTMLElement&&(e.style.left=e.offsetLeft+"px",e.style.top=e.offsetTop+"px",e.style.width=getComputedStyle(e).width,e.style.position="absolute")}}});function l8(e,l){return(0,t.openBlock)(),(0,t.createBlock)(t.TransitionGroup,{tag:"div","enter-active-class":e.transition.enter?e.transition.enter:`${e.transition}-enter-active`,"move-class":e.transition.move?e.transition.move:`${e.transition}-move`,"leave-active-class":e.transition.leave?e.transition.leave:`${e.transition}-leave-active`,onLeave:e.leave},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}HW.render=l8;var PW=(0,t.defineComponent)({name:"VueToastification",devtools:{hide:!0},components:{Toast:e8,VtTransition:HW},props:Object.assign({},da.CORE_TOAST,da.CONTAINER,da.TRANSITION),data(){return{count:0,positions:Object.values(Qd),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const e=this.eventBus;e.on(ql.ADD,this.addToast),e.on(ql.CLEAR,this.clearToasts),e.on(ql.DISMISS,this.dismissToast),e.on(ql.UPDATE,this.updateToast),e.on(ql.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(e){vs(e)&&(e=await e()),IP(this.$el),e.appendChild(this.$el)},setToast(e){Ba(e.id)||(this.toasts[e.id]=e)},addToast(e){e.content=xP(e.content);const l=Object.assign({},this.defaults,e.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[e.type],e),a=this.defaults.filterBeforeCreate(l,this.toastArray);a&&this.setToast(a)},dismissToast(e){const l=this.toasts[e];!Ba(l)&&!Ba(l.onClose)&&l.onClose(),delete this.toasts[e]},clearToasts(){Object.keys(this.toasts).forEach(e=>{this.dismissToast(e)})},getPositionToasts(e){const l=this.filteredToasts.filter(a=>a.position===e).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?l.reverse():l},updateDefaults(e){Ba(e.container)||this.setup(e.container),this.defaults=Object.assign({},this.defaults,e)},updateToast({id:e,options:l,create:a}){this.toasts[e]?(l.timeout&&l.timeout===this.toasts[e].timeout&&l.timeout++,this.setToast(Object.assign({},this.toasts[e],l))):a&&this.addToast(Object.assign({},{id:e},l))},getClasses(e){return[`${la}__container`,e].concat(this.defaults.containerClassName)}}});function t8(e,l){const a=(0,t.resolveComponent)("Toast"),n=(0,t.resolveComponent)("VtTransition");return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.positions,d=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:d},[(0,t.createVNode)(n,{transition:e.defaults.transition,class:(0,t.normalizeClass)(e.getClasses(d))},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.getPositionToasts(d),c=>((0,t.openBlock)(),(0,t.createBlock)(a,(0,t.mergeProps)({key:c.id},c),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}PW.render=t8;var a8=PW,jb=(e={},l=!0)=>{const a=e.eventBus=e.eventBus||new Fs;l&&(0,t.nextTick)(()=>{const c=(0,t.createApp)(a8,vW({},e)),i=c.mount(document.createElement("div")),s=e.onMounted;if(Ba(s)||s(i,c),e.shareAppContext){const o=e.shareAppContext;o===!0||(c._context.components=o._context.components,c._context.directives=o._context.directives,c._context.mixins=o._context.mixins,c._context.provides=o._context.provides,c.config.globalProperties=o.config.globalProperties)}});const n=(c,i)=>{const s=Object.assign({},{id:TP(),type:Ul.DEFAULT},i,{content:c});return a.emit(ql.ADD,s),s.id};n.clear=()=>a.emit(ql.CLEAR,void 0),n.updateDefaults=c=>{a.emit(ql.UPDATE_DEFAULTS,c)},n.dismiss=c=>{a.emit(ql.DISMISS,c)};function d(c,{content:i,options:s},o=!1){const m=Object.assign({},s,{content:i});a.emit(ql.UPDATE,{id:c,options:m,create:o})}return n.update=d,n.success=(c,i)=>n(c,Object.assign({},i,{type:Ul.SUCCESS})),n.info=(c,i)=>n(c,Object.assign({},i,{type:Ul.INFO})),n.error=(c,i)=>n(c,Object.assign({},i,{type:Ul.ERROR})),n.warning=(c,i)=>n(c,Object.assign({},i,{type:Ul.WARNING})),n},n8=()=>{const e=()=>{};return new Proxy(e,{get(){return e}})};function Ad(e){return zP()?gP(e)?jb({eventBus:e},!1):jb(e,!0):n8()}var ks=Symbol("VueToastification"),R2=new Fs,d8=(e,l)=>{l?.shareAppContext===!0&&(l.shareAppContext=e);const a=Ad(vW({eventBus:R2},l));e.provide(ks,a)},c8=e=>{const l=Ad(e);(0,t.getCurrentInstance)()&&(0,t.provide)(ks,l)},QW=e=>{if(e)return Ad(e);const l=(0,t.getCurrentInstance)()?(0,t.inject)(ks,void 0):void 0;return l||Ad(R2)},AW=d8,i8={key:0,class:"custom-toast__icon"},s8={class:"custom-toast__content"},o8=(0,t.defineComponent)({name:"BglToast",__name:"Toast",props:{message:{},type:{},info:{type:Boolean},success:{type:Boolean},warning:{type:Boolean},error:{type:Boolean},showIcon:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},closeToast:{}},setup(e){const l=e,a=(0,t.computed)(()=>l.type?l.type:l.error?"error":l.warning?"warning":l.success?"success":"info");return(n,d)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["custom-toast",`custom-toast--${a.value}`])},[e.showIcon?((0,t.openBlock)(),(0,t.createElementBlock)("div",i8,[a.value==="success"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ne),{key:0,icon:"check_circle"})):(0,t.createCommentVNode)("",!0),a.value==="error"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ne),{key:1,icon:"dangerous"})):(0,t.createCommentVNode)("",!0),a.value==="warning"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ne),{key:2,icon:"report"})):(0,t.createCommentVNode)("",!0),a.value==="info"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ne),{key:3,icon:"info"})):(0,t.createCommentVNode)("",!0)])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",s8,(0,t.toDisplayString)(e.message),1),e.showCloseButton?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:1,class:"custom-toast__close",onClick:d[0]||(d[0]=(...c)=>e.closeToast&&e.closeToast(...c))},[(0,t.createVNode)((0,t.unref)(Ne),{icon:"close"})])):(0,t.createCommentVNode)("",!0)],2))}}),sd=o8,m8=AW||SW,{POSITION:u8}=SW,Wn=QW;const _W=Symbol("toast");var Ki=null;function Z8(){const e=(0,t.inject)(_W,null);if(!e){if(Ki)return Ki;throw new Error("Toast API not provided. Make sure ToastPlugin is installed via app.use(ToastPlugin)")}return e}function r8(){if(typeof document>"u")return;let e=document.getElementById("bgl-toast-container");e||(e=document.createElement("div"),e.setAttribute("popover","manual"),e.setAttribute("id","bgl-toast-container"),document.body.appendChild(e));try{e.hidePopover()}catch{}try{e.showPopover()}catch{}return e}const $W={install:(e,l={})=>{const a=r8(),n={position:u8.TOP_RIGHT,timeout:5e3,closeOnClick:!0,pauseOnFocusLoss:!0,pauseOnHover:!0,draggable:!0,draggablePercent:.6,showCloseButtonOnHover:!1,hideProgressBar:!0,closeButton:!1,icon:!1,rtl:!1,transition:"Vue-Toastification__fade",maxToasts:5,newestOnTop:!0,toastClassName:"custom-toast-wrapper",bodyClassName:"custom-toast-body",...a?{container:a}:{},...l};e.use(m8,n);function d(){const i=typeof document<"u"?document.getElementById("bgl-toast-container"):null;if(i){try{i.hidePopover()}catch{}try{i.showPopover()}catch{}}}const c={success:(i,s)=>(d(),Wn()({component:sd,props:{message:i,type:"success"}},s)),error:(i,s)=>(d(),Wn()({component:sd,props:{message:i,type:"error"}},s)),info:(i,s)=>(d(),Wn()({component:sd,props:{message:i,type:"info"}},s)),warning:(i,s)=>(d(),Wn()({component:sd,props:{message:i,type:"warning"}},s)),show:(i,s)=>(d(),Wn()({component:sd,props:{message:i,type:"info"}},s)),clear:()=>{Wn().clear()}};Ki||(Ki=c),e.provide(_W,c)}};var js=class extends Event{oldState;newState;constructor(e,{oldState:l="",newState:a="",...n}={}){super(e,n),this.oldState=String(l||""),this.newState=String(a||"")}},Jb=new WeakMap;function qW(e,l,a){Jb.set(e,setTimeout(()=>{Jb.has(e)&&e.dispatchEvent(new js("toggle",{cancelable:!1,oldState:l,newState:a}))},0))}var S2=globalThis.ShadowRoot||function(){},b8=globalThis.HTMLDialogElement||function(){},ii=new WeakMap,ta=new WeakMap,it=new WeakMap,En=new WeakMap;function Hi(e){return En.get(e)||"hidden"}var Pi=new WeakMap;function _d(e){return[...e].pop()}function h8(e){const l=e.popoverTargetElement;if(!(l instanceof HTMLElement))return;const a=Hi(l);e.popoverTargetAction==="show"&&a==="showing"||e.popoverTargetAction==="hide"&&a==="hidden"||(a==="showing"?Kn(l,!0,!0):Qa(l,!1)&&(Pi.set(l,e),su(l)))}function Qa(e,l){return!(e.popover!=="auto"&&e.popover!=="manual"&&e.popover!=="hint"||!e.isConnected||l&&Hi(e)!=="showing"||!l&&Hi(e)!=="hidden"||e instanceof b8&&e.hasAttribute("open")||document.fullscreenElement===e)}function Cb(e){if(!e)return 0;const l=ta.get(document)||new Set,a=it.get(document)||new Set;return a.has(e)?[...a].indexOf(e)+l.size+1:l.has(e)?[...l].indexOf(e)+1:0}function p8(e){const l=eG(e),a=W8(e);return Cb(l)>Cb(a)?l:a}function $d(e){let l;const a=it.get(e)||new Set,n=ta.get(e)||new Set,d=a.size>0?a:n.size>0?n:null;return d?(l=_d(d),l.isConnected?l:(d.delete(l),$d(e))):null}function Db(e){for(const l of e||[])if(!l.isConnected)e.delete(l);else return l;return null}function Bn(e){return typeof e.getRootNode=="function"?e.getRootNode():e.parentNode?Bn(e.parentNode):e}function eG(e){for(;e;){if(e instanceof HTMLElement&&e.popover==="auto"&&En.get(e)==="showing")return e;if(e=e instanceof Element&&e.assignedSlot||e.parentElement||Bn(e),e instanceof S2&&(e=e.host),e instanceof Document)return}}function W8(e){for(;e;){const l=e.popoverTargetElement;if(l instanceof HTMLElement)return l;if(e=e.parentElement||Bn(e),e instanceof S2&&(e=e.host),e instanceof Document)return}}function Ub(e,l){const a=new Map;let n=0;for(const i of l||[])a.set(i,n),n+=1;a.set(e,n),n+=1;let d=null;function c(i){if(!i)return;let s=!1,o=null,m=null;for(;!s;){if(o=eG(i)||null,o===null||!a.has(o))return;(e.popover==="hint"||o.popover==="auto")&&(s=!0),s||(i=o.parentElement)}m=a.get(o),(d===null||a.get(d)<m)&&(d=o)}return c(e.parentElement||Bn(e)),d}function G8(e){return e.hidden||e instanceof S2||(e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLOptGroupElement||e instanceof HTMLOptionElement||e instanceof HTMLFieldSetElement)&&e.disabled||e instanceof HTMLInputElement&&e.type==="hidden"||e instanceof HTMLAnchorElement&&e.href===""?!1:typeof e.tabIndex=="number"&&e.tabIndex!==-1}function N8(e){if(e.shadowRoot&&e.shadowRoot.delegatesFocus!==!0)return null;let l=e;l.shadowRoot&&(l=l.shadowRoot);let a=l.querySelector("[autofocus]");if(a)return a;{const c=l.querySelectorAll("slot");for(const i of c){const s=i.assignedElements({flatten:!0});for(const o of s){if(o.hasAttribute("autofocus"))return o;if(a=o.querySelector("[autofocus]"),a)return a}}}const n=e.ownerDocument.createTreeWalker(l,NodeFilter.SHOW_ELEMENT);let d=n.currentNode;for(;d;){if(G8(d))return d;d=n.nextNode()}}function Y8(e){var l;(l=N8(e))==null||l.focus()}var Qi=new WeakMap;function su(e){if(!Qa(e,!1))return;const l=e.ownerDocument;if(!e.dispatchEvent(new js("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"}))||!Qa(e,!1))return;let a=!1;const n=e.popover;let d=null;const c=Ub(e,ta.get(l)||new Set),i=Ub(e,it.get(l)||new Set);if(n==="auto"&&(ou(it.get(l)||new Set,a,!0),Aa(c||l,a,!0),d="auto"),n==="hint"&&(i?(Aa(i,a,!0),d="hint"):(ou(it.get(l)||new Set,a,!0),c?(Aa(c,a,!0),d="auto"):d="hint")),n==="auto"||n==="hint"){if(n!==e.popover||!Qa(e,!1))return;$d(l)||(a=!0),d==="auto"?(ta.has(l)||ta.set(l,new Set),ta.get(l).add(e)):d==="hint"&&(it.has(l)||it.set(l,new Set),it.get(l).add(e))}Qi.delete(e);const s=l.activeElement;e.classList.add(":popover-open"),En.set(e,"showing"),ii.has(l)||ii.set(l,new Set),ii.get(l).add(e),lG(Pi.get(e),!0),Y8(e),a&&s&&e.popover==="auto"&&Qi.set(e,s),qW(e,"closed","open")}function Kn(e,l=!1,a=!1){var n,d;if(!Qa(e,!0))return;const c=e.ownerDocument;if(["auto","hint"].includes(e.popover)&&(Aa(e,l,a),!Qa(e,!0)))return;const i=ta.get(c)||new Set,s=i.has(e)&&_d(i)===e;if(lG(Pi.get(e),!1),Pi.delete(e),a&&(e.dispatchEvent(new js("beforetoggle",{oldState:"open",newState:"closed"})),s&&_d(i)!==e&&Aa(e,l,a),!Qa(e,!0)))return;(n=ii.get(c))==null||n.delete(e),i.delete(e),(d=it.get(c))==null||d.delete(e),e.classList.remove(":popover-open"),En.set(e,"hidden"),a&&qW(e,"open","closed");const o=Qi.get(e);o&&(Qi.delete(e),l&&o.focus())}function L8(e,l=!1,a=!1){let n=$d(e);for(;n;)Kn(n,l,a),n=$d(e)}function ou(e,l=!1,a=!1){let n=Db(e);for(;n;)Kn(n,l,a),n=Db(e)}function Ob(e,l,a,n){let d=!1,c=!1;for(;d||!c;){c=!0;let i=null,s=!1;for(const o of l)if(o===e)s=!0;else if(s){i=o;break}if(!i)return;for(;Hi(i)==="showing"&&l.size;)Kn(_d(l),a,n);l.has(e)&&_d(l)!==e&&(d=!0),d&&(n=!1)}}function Aa(e,l,a){var n,d;const c=e.ownerDocument||e;if(e instanceof Document)return L8(c,l,a);if((n=it.get(c))!=null&&n.has(e)){Ob(e,it.get(c),l,a);return}ou(it.get(c)||new Set,l,a),(d=ta.get(c))!=null&&d.has(e)&&Ob(e,ta.get(c),l,a)}var Co=new WeakMap;function Eb(e){if(!e.isTrusted)return;const l=e.composedPath()[0];if(!l)return;const a=l.ownerDocument;if(!$d(a))return;const n=p8(l);if(n&&e.type==="pointerdown")Co.set(a,n);else if(e.type==="pointerup"){const d=Co.get(a)===n;Co.delete(a),d&&Aa(n||a,!1,!0)}}var Do=new WeakMap;function lG(e,l=!1){if(!e)return;Do.has(e)||Do.set(e,e.getAttribute("aria-expanded"));const a=e.popoverTargetElement;if(a instanceof HTMLElement&&a.popover==="auto")e.setAttribute("aria-expanded",String(l));else{const n=Do.get(e);n?e.setAttribute("aria-expanded",n):e.removeAttribute("aria-expanded")}}var Bb=globalThis.ShadowRoot||function(){};function X8(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype=="object"&&"popover"in HTMLElement.prototype}function ja(e,l,a){const n=e[l];Object.defineProperty(e,l,{value(d){return n.call(this,a(d))}})}var y8=/(^|[^\\]):popover-open\b/g;function M8(){return typeof globalThis.CSSLayerBlockRule=="function"}function V8(){const e=M8();return`
|
|
489
489
|
${e?"@layer popover-polyfill {":""}
|
|
490
490
|
:where([popover]) {
|
|
491
491
|
position: fixed;
|
package/dist/index.mjs
CHANGED
|
@@ -53479,7 +53479,7 @@ var MK = /* @__PURE__ */ Il({
|
|
|
53479
53479
|
key: Q,
|
|
53480
53480
|
config: _._config,
|
|
53481
53481
|
formData: b.value
|
|
53482
|
-
}) : C == null || C === "" || C === !1 && _._type === "checkbox" || Array.isArray(C) && C.length === 0 || _._type === "tel" && typeof C == "string" && /^\+\d
|
|
53482
|
+
}) : C == null || C === "" || C === !1 && _._type === "checkbox" || Array.isArray(C) && C.length === 0 || _._type === "tel" && typeof C == "string" && /^\+\d{1,3}$/.test(C);
|
|
53483
53483
|
}
|
|
53484
53484
|
function S(C, _) {
|
|
53485
53485
|
const Q = x(C);
|
package/package.json
CHANGED
|
@@ -278,7 +278,8 @@ function isFieldEmpty(value: any, field: FieldBuilder, key: string): boolean {
|
|
|
278
278
|
// empty state.
|
|
279
279
|
return value == null || value === '' || (value === false && field._type === 'checkbox')
|
|
280
280
|
|| (Array.isArray(value) && value.length === 0)
|
|
281
|
-
|
|
281
|
+
// Dial-code only (ITU country codes are 1–3 digits). Full E.164 must not match.
|
|
282
|
+
|| (field._type === 'tel' && typeof value === 'string' && /^\+\d{1,3}$/.test(value))
|
|
282
283
|
}
|
|
283
284
|
|
|
284
285
|
function validateField(key: string, field: FieldBuilder): boolean {
|