@sfxcode/formkit-primevue 1.2.3 → 1.2.4

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.
@@ -470,14 +470,17 @@ function It(e, i) {
470
470
  };
471
471
  }
472
472
  function Lt(e, i, t, n = !1) {
473
- for (const l in i) {
474
- const s = i[l].condition;
475
- n || t.ledger.count(l, s);
476
- const r = t.ledger.value(l) * (n ? -1 : 1);
477
- if (e)
473
+ const l = e;
474
+ for (const s in i) {
475
+ const r = i[s].condition;
476
+ n || t.ledger.count(s, r);
477
+ const o = t.ledger.value(s) * (n ? -1 : 1);
478
+ if (e) {
478
479
  do
479
- e.ledger.count(l, s, r), e = e.parent;
480
+ e.ledger.count(s, r, o), e = e.parent;
480
481
  while (e);
482
+ e = l;
483
+ }
481
484
  }
482
485
  }
483
486
  const vt = /* @__PURE__ */ new Map(), Te = /* @__PURE__ */ new Map(), ht = Nt(), ei = [];
@@ -1243,7 +1246,7 @@ function J(e) {
1243
1246
  provide: h
1244
1247
  });
1245
1248
  }
1246
- const At = "0.18.1";
1249
+ const At = "0.18.3";
1247
1250
  function Gi(e) {
1248
1251
  let i = 1;
1249
1252
  return Array.isArray(e) ? e.map((t) => typeof t == "string" || typeof t == "number" ? {
@@ -1 +1 @@
1
- (function(P,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(P=typeof globalThis<"u"?globalThis:P||self,r(P["formkit-primevue"]={},P.Vue))})(this,function(P,r){"use strict";const ft=["__key","__init","__shim","__original","__index","__prevKey"];function we(){return Math.random().toString(36).substring(2,15)}function wn(e,i){const t=e instanceof Set?e:new Set(e);return i&&i.forEach(n=>t.add(n)),[...t]}function O(e,i){return Object.prototype.hasOwnProperty.call(e,i)}function G(e,i,t=!0,n=["__key"]){if(e===i)return!0;if(typeof i=="object"&&typeof e=="object"){if(e instanceof Map||e instanceof Set)return!1;if(e instanceof Date&&i instanceof Date)return e.getTime()===i.getTime();if(e instanceof RegExp&&i instanceof RegExp)return Vn(e,i);if(e===null||i===null||Object.keys(e).length!==Object.keys(i).length)return!1;for(const l of n)if((l in e||l in i)&&e[l]!==i[l])return!1;for(const l in e)if(!(l in i)||e[l]!==i[l]&&!t||t&&!G(e[l],i[l],t,n))return!1;return!0}return!1}function Vn(e,i){return e.source===i.source&&e.flags.split("").sort().join("")===i.flags.split("").sort().join("")}function Te(e){const i=typeof e;if(i==="number")return!1;if(e===void 0)return!0;if(i==="string")return e==="";if(i==="object"){if(e===null)return!0;for(const t in e)return!1;return!(e instanceof RegExp||e instanceof Date)}return!1}function Ne(e){return Object.prototype.toString.call(e)==="[object Object]"}function me(e){return Ne(e)||Array.isArray(e)}function re(e){if(Ne(e)===!1||e.__FKNode__||e.__POJO__===!1)return!1;const i=e.constructor;if(i===void 0)return!0;const t=i.prototype;return!(Ne(t)===!1||t.hasOwnProperty("isPrototypeOf")===!1)}function Ve(e,i,t=!1,n=!1){if(i===null)return null;const l={};if(typeof i=="string")return i;for(const a in e)if(O(i,a)&&(i[a]!==void 0||!n)){if(t&&Array.isArray(e[a])&&Array.isArray(i[a])){l[a]=e[a].concat(i[a]);continue}if(i[a]===void 0)continue;re(e[a])&&re(i[a])?l[a]=Ve(e[a],i[a],t,n):l[a]=i[a]}else l[a]=e[a];for(const a in i)!O(l,a)&&i[a]!==void 0&&(l[a]=i[a]);return l}function Sn(e){if(e[0]!=='"'&&e[0]!=="'"||e[0]!==e[e.length-1])return!1;const i=e[0];for(let t=1;t<e.length;t++)if(e[t]===i&&(t===1||e[t-1]!=="\\")&&t!==e.length-1)return!1;return!0}function In(e){if(!e.length)return"";let i="",t="";for(let n=0;n<e.length;n++){const l=e.charAt(n);(l!=="\\"||t==="\\")&&(i+=l),t=l}return i}function le(...e){return e.reduce((i,t)=>{const{value:n,name:l,modelValue:a,config:s,plugins:o,...f}=t;return Object.assign(i,f)},{})}function En(e){const i=[];let t="",n=0,l="",a="";for(let s=0;s<e.length;s++){const o=e.charAt(s);o===l&&a!=="\\"?l="":(o==="'"||o==='"')&&!l&&a!=="\\"?l=o:o==="("&&!l?n++:o===")"&&!l&&n--,o===","&&!l&&n===0?(i.push(t),t=""):(o!==" "||l)&&(t+=o),a=o}return t&&i.push(t),i}function ut(e,i){const t={},n=i.filter(a=>a instanceof RegExp),l=new Set(i);for(const a in e)!l.has(a)&&!n.some(s=>s.test(a))&&(t[a]=e[a]);return t}function ct(e,i){const t={},n=i.filter(l=>l instanceof RegExp);return i.forEach(l=>{l instanceof RegExp||(t[l]=e[l])}),Object.keys(e).forEach(l=>{n.some(a=>a.test(l))&&(t[l]=e[l])}),t}function Se(e){return e.replace(/-([a-z0-9])/gi,(i,t)=>t.toUpperCase())}function pt(e){return e.replace(/([a-z0-9])([A-Z])/g,(i,t,n)=>t+"-"+n.toLowerCase()).replace(" ","-").toLowerCase()}function Ln(e,i=ft){if(e!==null&&typeof e=="object"){let t;if(Array.isArray(e)?t=[...e]:re(e)&&(t={...e}),t)return Bn(e,t,i),t}return e}function be(e,i=ft){if(e===null||e instanceof RegExp||e instanceof Date||e instanceof Map||e instanceof Set||typeof File=="function"&&e instanceof File)return e;let t;Array.isArray(e)?t=e.map(n=>typeof n=="object"?be(n,i):n):t=Object.keys(e).reduce((n,l)=>(n[l]=typeof e[l]=="object"?be(e[l],i):e[l],n),{});for(const n of i)n in e&&Object.defineProperty(t,n,{enumerable:!1,value:e[n]});return t}function ie(e){return typeof e=="object"?be(e):e}function Pn(e,i){if(!e||typeof e!="object")return null;const t=i.split(".");let n=e;for(const l in t){const a=t[l];if(O(n,a)&&(n=n[a]),+l===t.length-1)return n;if(!n||typeof n!="object")return null}return null}function z(e){return e!==void 0&&e!=="false"&&e!==!1?!0:void 0}function ae(e){return Object.isFrozen(e)?e:Object.defineProperty(e,"__init",{enumerable:!1,value:!0})}function ze(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]/g," ").trim().replace(/\s+/g,"-")}function Bn(e,i,t){for(const n of t)n in e&&Object.defineProperty(i,n,{enumerable:!1,value:e[n]});return i}function vn(e){let i=!1;return(...t)=>{if(!i)return i=!0,queueMicrotask(()=>i=!1),e(...t)}}function Ue(){const e=[];let i=0;const t=l=>e.push(l),n=l=>{const a=e[i];return typeof a=="function"?a(l,s=>(i++,n(s===void 0?l:s))):(i=0,l)};return t.dispatch=n,t.unshift=l=>e.unshift(l),t.remove=l=>{const a=e.indexOf(l);a>-1&&e.splice(a,1)},t}function dt(){const e=new Map,i=new Map;let t;const n=(l,a)=>{if(t){t.set(a.name,[l,a]);return}e.has(a.name)&&e.get(a.name).forEach(s=>{(a.origin===l||s.modifiers.includes("deep"))&&s.listener(a)}),a.bubble&&l.bubble(a)};return n.flush=()=>{e.clear(),i.clear(),t==null||t.clear()},n.on=(l,a)=>{const[s,...o]=l.split("."),f=a.receipt||we(),p={modifiers:o,event:s,listener:a,receipt:f};return e.has(s)?e.get(s).push(p):e.set(s,[p]),i.has(f)?i.get(f).push(s):i.set(f,[s]),f},n.off=l=>{var a;i.has(l)&&((a=i.get(l))===null||a===void 0||a.forEach(s=>{const o=e.get(s);Array.isArray(o)&&e.set(s,o.filter(f=>f.receipt!==l))}),i.delete(l))},n.pause=l=>{t||(t=new Map),l&&l.walk(a=>a._e.pause())},n.play=l=>{if(!t)return;const a=t;t=void 0,a.forEach(([s,o])=>n(s,o)),l&&l.walk(s=>s._e.play())},n}function An(e,i,t,n,l=!0,a){return i._e(e,{payload:n,name:t,bubble:l,origin:e,meta:a}),e}function On(e,i,t){return Ee(e.parent)&&e.parent._e(e.parent,t),e}function Mn(e,i,t,n){return i._e.on(t,n)}function Dn(e,i,t){return i._e.off(t),e}const Ke=Ue();Ke((e,i)=>(e.message||(e.message=`E${e.code}`),i(e)));const We=Ue();We((e,i)=>{e.message||(e.message=`W${e.code}`);const t=i(e);return console&&typeof console.warn=="function"&&console.warn(t.message),t});function ye(e,i={}){We.dispatch({code:e,data:i})}function T(e,i={}){throw Error(Ke.dispatch({code:e,data:i}).message)}function ee(e,i){const t={blocking:!1,key:we(),meta:{},type:"state",visible:!0,...e};return i&&t.value&&t.meta.localize!==!1&&(t.value=i.t(t),t.meta.locale=i.config.locale),t}const mt={apply:Nn,set:jn,remove:bt,filter:Fn,reduce:Tn,release:Kn,touch:xn};function Rn(e=!1){const i={};let t,n=e,l=[];const a=new Map;let s;const o=new Proxy(i,{get(...f){const[p,g]=f;return g==="buffer"?n:g==="_b"?l:g==="_m"?a:g==="_r"?s:O(mt,g)?mt[g].bind(null,i,o,t):Reflect.get(...f)},set(f,p,g){return p==="_n"?(t=g,s==="__n"&&yt(t,o),!0):p==="_b"?(l=g,!0):p==="buffer"?(n=g,!0):p==="_r"?(s=g,!0):(T(101,t),!1)}});return o}function jn(e,i,t,n){if(i.buffer)return i._b.push([[n]]),i;if(e[n.key]!==n){if(typeof n.value=="string"&&n.meta.localize!==!1){const a=n.value;n.value=t.t(n),n.value!==a&&(n.meta.locale=t.props.locale)}const l=`message-${O(e,n.key)?"updated":"added"}`;e[n.key]=Object.freeze(t.hook.message.dispatch(n)),t.emit(l,n)}return i}function xn(e,i){for(const t in e){const n={...e[t]};i.set(n)}}function bt(e,i,t,n){if(O(e,n)){const l=e[n];delete e[n],t.emit("message-removed",l)}return i.buffer===!0&&(i._b=i._b.filter(l=>(l[0]=l[0].filter(a=>a.key!==n),l[1]||l[0].length))),i}function Fn(e,i,t,n,l){for(const a in e){const s=e[a];(!l||s.type===l)&&!n(s)&&bt(e,i,t,a)}}function Tn(e,i,t,n,l){for(const a in e){const s=e[a];l=n(l,s)}return l}function Nn(e,i,t,n,l){if(Array.isArray(n)){if(i.buffer){i._b.push([n,l]);return}const a=new Set(n.map(s=>(i.set(s),s.key)));typeof l=="string"?i.filter(s=>s.type!==l||a.has(s.key)):typeof l=="function"&&i.filter(s=>!l(s)||a.has(s.key))}else for(const a in n){const s=t.at(a);s?s.store.apply(n[a],l):Un(t,i,a,n[a],l)}}function zn(e,...i){const t=`${e.name}-set`,n=l=>ee({key:ze(l),type:"error",value:l,meta:{source:t,autoClear:!0}});return i.filter(l=>!!l).map(l=>{if(typeof l=="string"&&(l=[l]),Array.isArray(l))return l.map(a=>n(a));{const a={};for(const s in l)Array.isArray(l[s])?a[s]=l[s].map(o=>n(o)):a[s]=[n(l[s])];return a}})}function Un(e,i,t,n,l){var a;const s=i._m;s.has(t)||s.set(t,[]),i._r||(i._r=yt(e,i)),(a=s.get(t))===null||a===void 0||a.push([n,l])}function yt(e,i){return e.on("child.deep",({payload:t})=>{i._m.forEach((n,l)=>{e.at(l)===t&&(n.forEach(([a,s])=>{t.store.apply(a,s)}),i._m.delete(l))}),i._m.size===0&&i._r&&(e.off(i._r),i._r=void 0)})}function Kn(e,i){i.buffer=!1,i._b.forEach(([t,n])=>i.apply(t,n)),i._b=[]}function Wn(){const e={};let i;return{count:(...t)=>Hn(i,e,...t),init(t){i=t,t.on("message-added.deep",_t(e,1)),t.on("message-removed.deep",_t(e,-1))},merge:t=>gt(i,e,t),settled(t){return O(e,t)?e[t].promise:Promise.resolve()},unmerge:t=>gt(i,e,t,!0),value(t){return O(e,t)?e[t].count:0}}}function Hn(e,i,t,n,l=0){if(n=qn(n||t),!O(i,t)){const a={condition:n,count:0,name:t,node:e,promise:Promise.resolve(),resolve:()=>{}};i[t]=a,l=e.store.reduce((s,o)=>s+a.condition(o)*1,l),e.each(s=>{s.ledger.count(a.name,a.condition),l+=s.ledger.value(a.name)})}return ht(i[t],l).promise}function qn(e){return typeof e=="function"?e:i=>i.type===e}function ht(e,i){const t=e.count,n=e.count+i;return e.count=n,t===0&&n!==0?(e.node.emit(`unsettled:${e.name}`,e.count,!1),e.promise=new Promise(l=>e.resolve=l)):t!==0&&n===0&&(e.node.emit(`settled:${e.name}`,e.count,!1),e.resolve()),e.node.emit(`count:${e.name}`,e.count,!1),e}function _t(e,i){return t=>{for(const n in e){const l=e[n];l.condition(t.payload)&&ht(l,i)}}}function gt(e,i,t,n=!1){for(const l in i){const a=i[l].condition;n||t.ledger.count(l,a);const s=t.ledger.value(l)*(n?-1:1);if(e)do e.ledger.count(l,a,s),e=e.parent;while(e)}}const He=new Map,Ie=new Map,qe=dt(),Zn=[];function Jn(e){e.props.id&&(He.set(e.props.id,e),Ie.set(e,e.props.id),qe(e,{payload:e,name:e.props.id,bubble:!1,origin:e}))}function Yn(e){if(Ie.has(e)){const i=Ie.get(e);Ie.delete(e),He.delete(i),qe(e,{payload:null,name:i,bubble:!1,origin:e})}}function $t(e){return He.get(e)}function Qn(e,i){Zn.push(qe.on(e,i))}function kt(e,i,t){let n=!0;return i in e.config._t?n=!1:e.emit(`config:${i}`,t,!1),i in e.props||(e.emit("prop",{prop:i,value:t}),e.emit(`prop:${i}`,t)),n}function Xn(e){const i=document.getElementById(e);if(i instanceof HTMLFormElement){const t=new Event("submit",{cancelable:!0,bubbles:!0});i.dispatchEvent(t);return}ye(151,e)}function Gn(e){const i=t=>{for(const n in t.store){const l=t.store[n];l.type==="error"||l.type==="ui"&&n==="incomplete"?t.store.remove(n):l.type==="state"&&t.store.set({...l,value:!1})}};i(e),e.walk(i)}function ei(e,i){const t=typeof e=="string"?$t(e):e;if(t){const n=s=>ie(s.props.initial)||(s.type==="group"?{}:s.type==="list"?[]:void 0);t._e.pause(t);const l=ie(i);return i&&!Te(i)&&(t.props.initial=me(l)?ae(l):l,t.props._init=t.props.initial),t.input(n(t),!1),t.walk(s=>{s.type==="list"&&s.sync||s.input(n(s),!1)}),t.input(Te(l)&&l?l:n(t),!1),t.type!=="input"&&i&&!Te(i)&&me(i)&&t.walk(s=>{s.props.initial=me(s.value)?ae(s.value):s.value,s.props._init=t.props.initial}),t._e.play(t),Gn(t),t.emit("reset",t),t}ye(152,e)}const ti={delimiter:".",delay:0,locale:"en",rootClasses:e=>({[`formkit-${pt(e)}`]:!0})},Ct=Symbol("index"),Ze=Symbol("removed"),Je=Symbol("moved"),wt=Symbol("inserted");function ni(e){return e.type==="list"&&Array.isArray(e._value)}function Ee(e){return e&&typeof e=="object"&&e.__FKNode__===!0}const Le=(e,i,t)=>{T(102,[e,t])},ii={_c:I(Vi,Le,!1),add:I(yi),addProps:I(bi),address:I(Ii,Le,!1),at:I(Ei),bubble:I(On),clearErrors:I(Di),calm:I(pi),config:I(!1),define:I(mi),disturb:I(ci),destroy:I(di),extend:I(xi),hydrate:I(fi),index:I(wi,Ci,!1),input:I(It),each:I(gi),emit:I(An),find:I(Pi),on:I(Mn),off:I(Dn),parent:I(!1,hi),plugins:I(!1),remove:I(_i),root:I(vi,Le,!1),reset:I(Mi),resetConfig:I(ki),setErrors:I(Pt),submit:I(Oi),t:I(Ai),use:I(Ye),name:I(Si,!1,!1),walk:I($i)};function ri(){return new Map(Object.entries(ii))}function I(e,i,t=!0){return{get:e?(n,l)=>t?(...a)=>e(n,l,...a):e(n,l):!1,set:i!==void 0?i:Le.bind(null)}}function li(){const e=new Map;return new Proxy(e,{get(i,t){return e.has(t)||e.set(t,Ue()),e.get(t)}})}let Vt=0,ai=0;function si(e){var i,t;return((i=e.parent)===null||i===void 0?void 0:i.type)==="list"?Ct:e.name||`${((t=e.props)===null||t===void 0?void 0:t.type)||"input"}_${++Vt}`}function St(e){return e.type==="group"?ae(e.value&&typeof e.value=="object"&&!Array.isArray(e.value)?e.value:{}):e.type==="list"?ae(Array.isArray(e.value)?e.value:[]):e.value}function It(e,i,t,n=!0){return i._value=oi(e,e.hook.input.dispatch(t)),e.emit("input",i._value),e.isCreated&&e.type==="input"&&G(i._value,i.value)?(e.emit("commitRaw",i.value),i.settled):(i.isSettled&&e.disturb(),n?(i._tmo&&clearTimeout(i._tmo),i._tmo=setTimeout(Pe,e.props.delay,e,i)):Pe(e,i),i.settled)}function oi(e,i){switch(e.type){case"input":break;case"group":(!i||typeof i!="object")&&T(107,[e,i]);break;case"list":Array.isArray(i)||T(108,[e,i]);break}return i}function Pe(e,i,t=!0,n=!0){i._value=i.value=e.hook.commit.dispatch(i._value),e.type!=="input"&&n&&e.hydrate(),e.emit("commitRaw",i.value),e.emit("commit",i.value),t&&e.calm()}function Et(e,{name:i,value:t,from:n}){if(!Object.isFrozen(e._value)){if(ni(e)){const l=t===Ze?[]:t===Je&&typeof n=="number"?e._value.splice(n,1):[t];e._value.splice(i,t===Je||n===wt?0:1,...l);return}t!==Ze?e._value[i]=t:delete e._value[i]}}function fi(e,i){const t=i._value;return e.type==="list"&&e.sync&&ui(e,i),i.children.forEach(n=>{if(typeof t=="object")if(n.name in t){const l=n.type!=="input"||t[n.name]&&typeof t[n.name]=="object"?ae(t[n.name]):t[n.name];if(!n.isSettled||!me(l)&&G(l,n._value))return;n.input(l,!1)}else(e.type!=="list"||typeof n.name=="number")&&Et(i,{name:n.name,value:n.value}),t.__init||(n.type==="group"?n.input({},!1):n.type==="list"?n.input([],!1):n.input(void 0,!1))}),e}function ui(e,i){const t=e._value;if(!Array.isArray(t))return;const n=[],l=new Set(i.children),a=new Map;t.forEach((o,f)=>{if(i.children[f]&&i.children[f]._value===o)n.push(i.children[f]),l.delete(i.children[f]);else{n.push(null);const p=a.get(o)||[];p.push(f),a.set(o,p)}}),l.size&&a.size&&l.forEach(o=>{if(a.has(o._value)){const f=a.get(o._value),p=f.shift();n[p]=o,l.delete(o),f.length||a.delete(o._value)}});const s=[];for(a.forEach(o=>{s.push(...o)});l.size&&s.length;){const o=l.values().next().value,f=s.shift();if(f===void 0)break;n[f]=o,l.delete(o)}s.forEach((o,f)=>{n[o]=zi({value:f})}),l.size&&l.forEach(o=>{if(!("__FKP"in o)){const f=o._c.parent;if(!f||Ui(f))return;f.ledger.unmerge(o),o._c.parent=null,o.destroy()}}),i.children=n}function ci(e,i){var t;return i._d<=0&&(i.isSettled=!1,e.emit("settled",!1,!1),i.settled=new Promise(n=>{i._resolve=n}),e.parent&&((t=e.parent)===null||t===void 0||t.disturb())),i._d++,e}function pi(e,i,t){var n;if(t!==void 0&&e.type!=="input")return Et(i,t),Pe(e,i,!0,!1);i._d>0&&i._d--,i._d===0&&(i.isSettled=!0,e.emit("settled",!0,!1),e.parent&&((n=e.parent)===null||n===void 0||n.calm({name:e.name,value:i.value})),i._resolve&&i._resolve(i.value))}function di(e,i){e.emit("destroying",e),e.store.filter(()=>!1),e.parent&&(e.parent.emit("childRemoved",e),e.parent.remove(e)),Yn(e),e.emit("destroyed",e),i._e.flush(),i._value=i.value=void 0;for(const t in i.context)delete i.context[t];i.plugins.clear(),i.context=null}function mi(e,i,t){i.type=t.type,i.props.definition=be(t),i.value=i._value=St({type:e.type,value:i.value}),t.forceTypeProp&&(e.props.type&&(e.props.originalType=e.props.type),i.props.type=t.forceTypeProp),t.family&&(i.props.family=t.family),t.features&&t.features.forEach(n=>n(e)),t.props&&e.addProps(t.props),e.emit("defined",t)}function bi(e,i,t){var n;if(e.props.attrs){const l={...e.props.attrs};e.props._emit=!1;for(const s in l){const o=Se(s);t.includes(o)&&(e.props[o]=l[s],delete l[s])}const a=ie(i._value);e.props.initial=e.type!=="input"?ae(a):a,e.props._emit=!0,e.props.attrs=l,e.props.definition&&(e.props.definition.props=[...((n=e.props.definition)===null||n===void 0?void 0:n.props)||[],...t])}return e.emit("added-props",t),e}function yi(e,i,t,n){if(e.type==="input"&&T(100,e),t.parent&&t.parent!==e&&t.parent.remove(t),!i.children.includes(t)){if(n!==void 0&&e.type==="list"){const l=i.children[n];l&&"__FKP"in l?(t._c.uid=l.uid,i.children.splice(n,1,t)):i.children.splice(n,0,t),Array.isArray(e.value)&&e.value.length<i.children.length&&e.disturb().calm({name:n,value:t.value,from:wt})}else i.children.push(t);t.isSettled||e.disturb()}if(t.parent!==e){if(t.parent=e,t.parent!==e)return e.remove(t),t.parent.add(t),e}else t.use(e.plugins);return Pe(e,i,!1),e.ledger.merge(t),e.emit("child",t),e}function hi(e,i,t,n){return Ee(n)?(e.parent&&e.parent!==n&&e.parent.remove(e),i.parent=n,e.resetConfig(),n.children.includes(e)?e.use(n.plugins):n.add(e),!0):n===null?(i.parent=null,!0):!1}function _i(e,i,t){const n=i.children.indexOf(t);if(n!==-1){t.isSettled&&e.disturb(),i.children.splice(n,1);let l=z(t.props.preserve),a=t.parent;for(;l===void 0&&a;)l=z(a.props.preserve),a=a.parent;l?e.calm():e.calm({name:e.type==="list"?n:t.name,value:Ze}),t.parent=null,t.config._rmn=t}return e.ledger.unmerge(t),e}function gi(e,i,t){i.children.forEach(n=>!("__FKP"in n)&&t(n))}function $i(e,i,t,n=!1,l=!1){i.children.some(a=>{if("__FKP"in a)return!1;const s=t(a);return n&&s===!1?!0:l&&s===!1?!1:a.walk(t,n,l)})}function ki(e,i){const t=e.parent||void 0;i.config=Lt(e.config._t,t),e.walk(n=>n.resetConfig())}function Ye(e,i,t,n=!0,l=!0){return Array.isArray(t)||t instanceof Set?(t.forEach(a=>Ye(e,i,a)),e):(i.plugins.has(t)||(l&&typeof t.library=="function"&&t.library(e),n&&t(e)!==!1&&(i.plugins.add(t),e.children.forEach(a=>a.use(t)))),e)}function Ci(e,i,t,n){if(Ee(e.parent)){const l=e.parent.children,a=n>=l.length?l.length-1:n<0?0:n,s=l.indexOf(e);return s===-1?!1:(l.splice(s,1),l.splice(a,0,e),e.parent.children=l,e.parent.type==="list"&&e.parent.disturb().calm({name:a,value:Je,from:s}),!0)}return!1}function wi(e){if(e.parent){const i=[...e.parent.children].indexOf(e);return i===-1?e.parent.children.length:i}return-1}function Vi(e,i){return i}function Si(e,i){var t;return((t=e.parent)===null||t===void 0?void 0:t.type)==="list"?e.index:i.name!==Ct?i.name:e.index}function Ii(e,i){return i.parent?i.parent.address.concat([e.name]):[e.name]}function Ei(e,i,t){const n=typeof t=="string"?t.split(e.config.delimiter):t;if(!n.length)return;const l=n[0];let a=e.parent;for(a||(String(n[0])===String(e.name)&&n.shift(),a=e),l==="$parent"&&n.shift();a&&n.length;){const s=n.shift();switch(s){case"$root":a=e.root;break;case"$parent":a=a.parent;break;case"$self":a=e;break;default:a=a.children.find(o=>!("__FKP"in o)&&String(o.name)===String(s))||Li(a,s)}}return a||void 0}function Li(e,i){const t=String(i).match(/^(find)\((.*)\)$/);if(t){const[,n,l]=t,a=l.split(",").map(s=>s.trim());switch(n){case"find":return e.find(a[0],a[1]);default:return}}}function Pi(e,i,t,n){return Bi(e,t,n)}function Bi(e,i,t="name"){const n=typeof t=="string"?a=>a[t]==i:t,l=[e];for(;l.length;){const a=l.shift();if(!("__FKP"in a)){if(n(a,i))return a;l.push(...a.children)}}}function vi(e){let i=e;for(;i.parent;)i=i.parent;return i}function Lt(e={},i){let t;return new Proxy(e,{get(...n){const l=n[1];if(l==="_t")return e;const a=Reflect.get(...n);if(a!==void 0)return a;if(i){const s=i.config[l];if(s!==void 0)return s}if(e.rootConfig&&typeof l=="string"){const s=e.rootConfig[l];if(s!==void 0)return s}return l==="delay"&&(t==null?void 0:t.type)==="input"?20:ti[l]},set(...n){const l=n[1],a=n[2];if(l==="_n")return t=a,e.rootConfig&&e.rootConfig._add(t),!0;if(l==="_rmn")return e.rootConfig&&e.rootConfig._rm(t),t=void 0,!0;if(!G(e[l],a,!1)){const s=Reflect.set(...n);return t&&(t.emit(`config:${l}`,a,!1),kt(t,l,a),t.walk(o=>kt(o,l,a),!1,!0)),s}return!0}})}function Ai(e,i,t,n="ui"){const l=typeof t=="string"?{key:t,value:t,type:n}:t,a=e.hook.text.dispatch(l);return e.emit("text",a,!1),a.value}function Oi(e){const i=e.name;do{if(e.props.isForm===!0)break;e.parent||T(106,i),e=e.parent}while(e);e.props.id&&Xn(e.props.id)}function Mi(e,i,t){return ei(e,t)}function Pt(e,i,t,n){const l=`${e.name}-set`,a=e.hook.setErrors.dispatch({localErrors:t,childErrors:n});return zn(e,a.localErrors,a.childErrors).forEach(s=>{e.store.apply(s,o=>o.meta.source===l)}),e}function Di(e,i,t=!0,n){return Pt(e,i,[]),t&&(n=n||`${e.name}-set`,e.walk(l=>{l.store.filter(a=>!(a.type==="error"&&a.meta&&a.meta.source===n))})),e}function Ri(e){return O(e.props,"id")||(e.props.id=`input_${ai++}`),e}function ji(e){const i={initial:typeof e=="object"?ie(e):e};let t,n=!0;return new Proxy(i,{get(...l){const[a,s]=l;if(O(i,s))return Reflect.get(...l);if(t&&typeof s=="string"&&t.config[s]!==void 0)return t.config[s]},set(l,a,s,o){if(a==="_n")return t=s,!0;if(a==="_emit")return n=s,!0;const{prop:f,value:p}=t.hook.prop.dispatch({prop:a,value:s});if(!G(i[f],p,!1)||typeof p=="object"){const g=Reflect.set(l,f,p,o);return n&&(t.emit("prop",{prop:f,value:p}),typeof f=="string"&&t.emit(`prop:${f}`,p)),g}return!0}})}function xi(e,i,t,n){return i.traps.set(t,n),e}function Fi(e,i){if(e.props.definition)return e.define(e.props.definition);for(const t of i){if(e.props.definition)return;typeof t.library=="function"&&t.library(e)}}function Ti(e){const i=St(e),t=Lt(e.config||{},e.parent);return{_d:0,_e:dt(),uid:Symbol(),_resolve:!1,_tmo:!1,_value:i,children:wn(e.children||[]),config:t,hook:li(),isCreated:!1,isSettled:!0,ledger:Wn(),name:si(e),parent:e.parent||null,plugins:new Set,props:ji(i),settled:Promise.resolve(i),store:Rn(!0),sync:e.sync||!1,traps:ri(),type:e.type||"input",value:i}}function Ni(e,i){var t;if(e.ledger.init(e.store._n=e.props._n=e.config._n=e),e.props._emit=!1,i.props&&Object.assign(e.props,i.props),e.props._emit=!0,Fi(e,new Set([...i.plugins||[],...e.parent?e.parent.plugins:[]])),i.plugins)for(const n of i.plugins)Ye(e,e._c,n,!0,!1);return Ri(e),e.each(n=>e.add(n)),e.parent&&e.parent.add(e,i.index),e.type==="input"&&e.children.length&&T(100,e),It(e,e._c,e._value,!1),e.store.release(),!((t=i.props)===null||t===void 0)&&t.id&&Jn(e),e.emit("created",e),e.isCreated=!0,e}function zi(e){var i,t,n,l;return{__FKP:!0,uid:Symbol(),name:(i=e==null?void 0:e.name)!==null&&i!==void 0?i:`p_${Vt++}`,value:(t=e==null?void 0:e.value)!==null&&t!==void 0?t:null,_value:(n=e==null?void 0:e.value)!==null&&n!==void 0?n:null,type:(l=e==null?void 0:e.type)!==null&&l!==void 0?l:"input",use:()=>{},input(a){return this._value=a,this.value=a,Promise.resolve()},isSettled:!0}}function Ui(e){return"__FKP"in e}function Ki(e){const i=e||{},t=Ti(i),n=new Proxy(t,{get(...l){const[,a]=l;if(a==="__FKNode__")return!0;const s=t.traps.get(a);return s&&s.get?s.get(n,t):Reflect.get(...l)},set(...l){const[,a,s]=l,o=t.traps.get(a);return o&&o.set?o.set(n,t,a,s):Reflect.set(...l)}});return Ni(n,i)}function Qe(e){return typeof e!="string"&&O(e,"$el")}function Xe(e){return typeof e!="string"&&O(e,"$cmp")}function se(e){return!e||typeof e=="string"?!1:O(e,"if")&&O(e,"then")}function Wi(e){return typeof e!="string"&&"$formkit"in e}function Hi(e){if(typeof e=="string")return{$el:"text",children:e};if(Wi(e)){const{$formkit:i,for:t,if:n,children:l,bind:a,...s}=e;return Object.assign({$cmp:"FormKit",props:{...s,type:i}},n?{if:n}:{},t?{for:t}:{},l?{children:l}:{},a?{bind:a}:{})}return e}function U(e){let i;const t=new Set,n=function(d,m){return typeof d=="function"?d(m):d},l=[{"&&":(c,d,m)=>n(c,m)&&n(d,m),"||":(c,d,m)=>n(c,m)||n(d,m)},{"===":(c,d,m)=>n(c,m)===n(d,m),"!==":(c,d,m)=>n(c,m)!==n(d,m),"==":(c,d,m)=>n(c,m)==n(d,m),"!=":(c,d,m)=>n(c,m)!=n(d,m),">=":(c,d,m)=>n(c,m)>=n(d,m),"<=":(c,d,m)=>n(c,m)<=n(d,m),">":(c,d,m)=>n(c,m)>n(d,m),"<":(c,d,m)=>n(c,m)<n(d,m)},{"+":(c,d,m)=>n(c,m)+n(d,m),"-":(c,d,m)=>n(c,m)-n(d,m)},{"*":(c,d,m)=>n(c,m)*n(d,m),"/":(c,d,m)=>n(c,m)/n(d,m),"%":(c,d,m)=>n(c,m)%n(d,m)}],a=l.reduce((c,d)=>c.concat(Object.keys(d)),[]),s=new Set(a.map(c=>c.charAt(0)));function o(c,d,m,y){const $=c.filter(h=>h.startsWith(d));return $.length?$.find(h=>y.length>=m+h.length&&y.substring(m,m+h.length)===h?h:!1):!1}function f(c,d,m=1){let y=m?d.substring(c+1).trim():d.substring(0,c).trim();if(!y.length)return-1;if(!m){const h=y.split("").reverse(),C=h.findIndex(u=>s.has(u));y=h.slice(C).join("")}const $=y[0];return l.findIndex(h=>{const C=Object.keys(h);return!!o(C,$,0,y)})}function p(c,d){let m="";const y=d.length;let $=0;for(let h=c;h<y;h++){const C=d.charAt(h);if(C==="(")$++;else if(C===")")$--;else if($===0&&C===" ")continue;if($===0&&o(a,C,h,d))return[m,h-1];m+=C}return[m,d.length-1]}function g(c,d=0){const m=l[d],y=c.length,$=Object.keys(m);let h=0,C=!1,u=null,b="",w=null,E,D="",S="",A="",B="",x=0;const N=(v,F)=>{v?A+=F:b+=F};for(let v=0;v<y;v++)if(D=S,S=c.charAt(v),(S==="'"||S==='"')&&D!=="\\"&&(h===0&&!C||h&&!B)){h?B=S:C=S,N(h,S);continue}else if(C&&(S!==C||D==="\\")||B&&(S!==B||D==="\\")){N(h,S);continue}else if(C===S){C=!1,N(h,S);continue}else if(B===S){B=!1,N(h,S);continue}else{if(S===" ")continue;if(S==="(")h===0?x=v:A+=S,h++;else if(S===")")if(h--,h===0){const F=typeof b=="string"&&b.startsWith("$")?b:void 0,ke=F&&c.charAt(v+1)===".";let ne="";ke&&([ne,v]=p(v+2,c));const Fe=u?d:f(x,c,0),Ce=f(v,c);Fe===-1&&Ce===-1?(b=L(A,-1,F,ne),typeof b=="string"&&(b=A)):u&&(Fe>=Ce||Ce===-1)&&d===Fe?(w=u.bind(null,L(A,-1,F,ne)),u=null,b=""):Ce>Fe&&d===Ce?b=L(A,-1,F,ne):b+=`(${A})${ke?`.${ne}`:""}`,A=""}else A+=S;else if(h===0&&(E=o($,S,v,c))){v===0&&T(103,[E,c]),v+=E.length-1,v===c.length-1&&T(104,[E,c]),u?b&&(w=u.bind(null,L(b,d)),u=m[E].bind(null,w),b=""):w?(u=m[E].bind(null,L(w,d)),w=null):(u=m[E].bind(null,L(b,d)),b="");continue}else N(h,S)}return b&&u&&(u=u.bind(null,L(b,d))),u=!u&&w?w:u,!u&&b&&(u=(v,F)=>typeof v=="function"?v(F):v,u=u.bind(null,L(b,d))),!u&&!b&&T(105,c),u}function L(c,d,m,y){if(m){const $=L(m,l.length);let h,C=y?U(`$${y}`):!1;if(typeof $=="function"){const u=En(String(c)).map(b=>L(b,-1));return b=>{const w=$(b);return typeof w!="function"?(ye(150,m),w):(h=w(...u.map(E=>typeof E=="function"?E(b):E)),C&&(C=C.provide(E=>{const D=i(E);return E.reduce((A,B)=>{if(B===y||(y==null?void 0:y.startsWith(`${B}(`))){const N=Pn(h,B);A[B]=()=>N}else A[B]=D[B];return A},{})})),C?C():h)}}}else if(typeof c=="string"){if(c==="true")return!0;if(c==="false")return!1;if(c==="undefined")return;if(Sn(c))return In(c.substring(1,c.length-1));if(!isNaN(+c))return Number(c);if(d<l.length-1)return g(c,d+1);if(c.startsWith("$")){const $=c.substring(1);return t.add($),function(C){return $ in C?C[$]():void 0}}return c}return c}const K=g(e.startsWith("$:")?e.substring(2):e),k=Array.from(t);function _(c){return i=c,Object.assign(K.bind(null,c(k)),{provide:_})}return Object.assign(K,{provide:_})}const Bt="0.18.1";function qi(e){let i=1;return Array.isArray(e)?e.map(t=>typeof t=="string"||typeof t=="number"?{label:String(t),value:String(t)}:(typeof t=="object"&&"value"in t&&typeof t.value!="string"&&Object.assign(t,{value:`__mask_${i++}`,__original:t.value}),t)):Object.keys(e).map(t=>({label:e[t],value:t}))}function oe(e,i){if(Array.isArray(e)){for(const t of e)if(i==t.value)return"__original"in t?t.__original:t.value}return i}function fe(e,i){return e===null&&i===void 0||e===void 0&&i===null?!1:e==i?!0:re(e)&&re(i)?G(e,i):!1}function Ge(e){e.hook.prop((i,t)=>(i.prop==="options"&&(typeof i.value=="function"?(e.props.optionsLoader=i.value,i.value=[]):i.value=qi(i.value)),t(i)))}function V(e,i,t=!1){return(...n)=>{const l=a=>{const s=!i||typeof i=="string"?{$el:i}:i();return(Qe(s)||Xe(s))&&(s.meta||(s.meta={section:e}),n.length&&!s.children&&(s.children=[...n.map(o=>typeof o=="string"?o:o(a))]),Qe(s)&&(s.attrs={class:`$classes.${e}`,...s.attrs||{}})),{if:`$slots.${e}`,then:`$slots.${e}`,else:e in a?he(s,a[e]):s}};return l._s=e,t?Zi(l):l}}function Zi(e){return i=>[e(i)]}function Be(e){return typeof e=="object"&&("$el"in e||"$cmp"in e||"$formkit"in e)}function he(e,i={}){return typeof e=="string"?Be(i)||typeof i=="string"?i:e:Array.isArray(e)?Be(i)?i:e:Ve(e,i)}const te=V("outer",()=>({$el:"div",attrs:{key:"$id","data-family":"$family || undefined","data-type":"$type","data-multiple":'$attrs.multiple || ($type != "select" && $options != undefined) || undefined',"data-disabled":'$: ($disabled !== "false" && $disabled) || undefined',"data-empty":"$state.empty || undefined","data-complete":"$state.complete || undefined","data-invalid":"$state.valid === false && $state.validationVisible || undefined","data-errors":"$state.errors || undefined","data-submitted":"$state.submitted || undefined","data-prefix-icon":"$_rawPrefixIcon !== undefined || undefined","data-suffix-icon":"$_rawSuffixIcon !== undefined || undefined","data-prefix-icon-click":"$onPrefixIconClick !== undefined || undefined","data-suffix-icon-click":"$onSuffixIconClick !== undefined || undefined"}})),Z=V("inner","div"),ue=V("wrapper","div"),_e=V("label",()=>({$el:"label",if:"$label",attrs:{for:"$id"}})),J=V("messages",()=>({$el:"ul",if:"$defaultMessagePlacement && $fns.length($messages)"})),Y=V("message",()=>({$el:"li",for:["message","$messages"],attrs:{key:"$message.key",id:"$id + '-' + $message.key","data-message-type":"$message.type"}})),W=V("prefix",null),H=V("suffix",null),q=V("help",()=>({$el:"div",if:"$help",attrs:{id:'$: "help-" + $id'}})),vt=V("fieldset",()=>({$el:"fieldset",attrs:{id:"$id","aria-describedby":{if:"$help",then:'$: "help-" + $id',else:void 0}}})),ve=V("decorator",()=>({$el:"span",attrs:{"aria-hidden":"true"}})),Ae=V("input",()=>({$el:"input",bind:"$attrs",attrs:{type:"$type",name:"$node.props.altName || $node.name",disabled:"$option.attrs.disabled || $disabled",onInput:"$handlers.toggleChecked",checked:"$fns.eq($_value, $onValue)",onBlur:"$handlers.blur",value:"$: true",id:"$id","aria-describedby":{if:"$options.length",then:{if:"$option.help",then:'$: "help-" + $option.attrs.id',else:void 0},else:{if:"$help",then:'$: "help-" + $id',else:void 0}}}})),At=V("legend",()=>({$el:"legend",if:"$label"})),Ot=V("option",()=>({$el:"li",for:["option","$options"],attrs:{"data-disabled":"$option.attrs.disabled || $disabled"}})),Mt=V("options","ul"),Oe=V("wrapper",()=>({$el:"label",attrs:{"data-disabled":{if:"$options.length",then:void 0,else:"$disabled || undefined"},"data-checked":{if:"$options == undefined",then:"$fns.eq($_value, $onValue) || undefined",else:"$fns.isChecked($option.value) || undefined"}}})),Dt=V("optionHelp",()=>({$el:"div",if:"$option.help",attrs:{id:'$: "help-" + $option.attrs.id'}})),Me=V("label","span"),Ji=V("input",()=>({$el:"button",bind:"$attrs",attrs:{type:"$type",disabled:"$disabled",name:"$node.name",id:"$id"}})),Yi=V("default",null),Qi=V("input",()=>({$el:"input",bind:"$attrs",attrs:{type:"file",disabled:"$disabled",name:"$node.name",onChange:"$handlers.files",onBlur:"$handlers.blur",id:"$id","aria-describedby":"$describedBy"}})),Xi=V("fileItem",()=>({$el:"li",for:["file","$value"]})),Gi=V("fileList",()=>({$el:"ul",if:"$value.length",attrs:{"data-has-multiple":{if:"$value.length > 1",then:"true"}}})),er=V("fileName",()=>({$el:"span",attrs:{class:"$classes.fileName"}})),Rt=V("fileRemove",()=>({$el:"button",attrs:{onClick:"$handlers.resetFiles"}})),tr=V("noFiles",()=>({$el:"span",if:"$value.length == 0"})),nr=V("form",()=>({$el:"form",bind:"$attrs",attrs:{id:"$id",name:"$node.name",onSubmit:"$handlers.submit","data-loading":"$state.loading || undefined"}})),ir=V("actions",()=>({$el:"div",if:"$actions"})),rr=V("submit",()=>({$cmp:"FormKit",bind:"$submitAttrs",props:{type:"submit",disabled:"$disabled",label:"$submitLabel"}})),jt=V("input",()=>({$el:"input",bind:"$attrs",attrs:{type:"$type",disabled:"$disabled",name:"$node.name",onInput:"$handlers.DOMInput",onBlur:"$handlers.blur",value:"$_value",id:"$id","aria-describedby":"$describedBy"}})),xt=V("wrapper",null,!0),lr=V("input",()=>({$el:"select",bind:"$attrs",attrs:{id:"$id","data-placeholder":"$fns.showPlaceholder($_value, $placeholder)",disabled:"$disabled",class:"$classes.input",name:"$node.name",onChange:"$handlers.onChange",onInput:"$handlers.selectInput",onBlur:"$handlers.blur","aria-describedby":"$describedBy"}})),ar=V("option",()=>({$el:"option",for:["option","$options"],bind:"$option.attrs",attrs:{class:"$classes.option",value:"$option.value",selected:"$fns.isSelected($option)"}})),sr=()=>({$el:null,if:"$options.length",for:["option","$options"],children:"$slots.option"}),or=V("input",()=>({$el:"textarea",bind:"$attrs",attrs:{disabled:"$disabled",name:"$node.name",onInput:"$handlers.DOMInput",onBlur:"$handlers.blur",value:"$_value",id:"$id","aria-describedby":"$describedBy"},children:"$initialValue"})),R=(e,i)=>V(`${e}Icon`,()=>{const t=`_raw${e.charAt(0).toUpperCase()}${e.slice(1)}Icon`;return{if:`$${e}Icon && $${t}`,$el:`${i||"span"}`,attrs:{class:`$classes.${e}Icon + " " + $classes.icon`,innerHTML:`$${t}`,onClick:`$handlers.iconClick(${e})`,for:{if:`${i==="label"}`,then:"$id"}}}})();function Ft(e){return function(i,t){return i.prop==="options"&&Array.isArray(i.value)&&(i.value=i.value.map(n=>{var l;return!((l=n.attrs)===null||l===void 0)&&l.id?n:Ve(n,{attrs:{id:`${e.name}-option-${ze(String(n.value))}`}})}),e.props.type==="checkbox"&&!Array.isArray(e.value)&&(e.isCreated?e.input([],!1):e.on("created",()=>{Array.isArray(e.value)||e.input([],!1)}))),t(i)}}function fr(e,i){const t=i.target;if(t instanceof HTMLInputElement){const n=Array.isArray(e.props.options)?oe(e.props.options,t.value):t.value;Array.isArray(e.props.options)&&e.props.options.length?Array.isArray(e._value)?e._value.some(l=>fe(n,l))?e.input(e._value.filter(l=>!fe(n,l))):e.input([...e._value,n]):e.input([n]):t.checked?e.input(e.props.onValue):e.input(e.props.offValue)}}function ur(e,i){var t,n;return(t=e.context)===null||t===void 0||t.value,(n=e.context)===null||n===void 0||n._value,Array.isArray(e._value)?e._value.some(l=>fe(oe(e.props.options,i),l)):!1}function cr(e){e.on("created",()=>{var i,t;!((i=e.context)===null||i===void 0)&&i.handlers&&(e.context.handlers.toggleChecked=fr.bind(null,e)),!((t=e.context)===null||t===void 0)&&t.fns&&(e.context.fns.isChecked=ur.bind(null,e)),O(e.props,"onValue")||(e.props.onValue=!0),O(e.props,"offValue")||(e.props.offValue=!1)}),e.hook.prop(Ft(e))}function et(e){e.on("created",()=>{"disabled"in e.props&&(e.props.disabled=z(e.props.disabled),e.config.disabled=z(e.props.disabled))}),e.hook.prop(({prop:i,value:t},n)=>(t=i==="disabled"?z(t):t,n({prop:i,value:t}))),e.on("prop:disabled",({payload:i})=>{e.config.disabled=z(i)})}function De(e,i){return t=>{t.store.set(ee({key:e,type:"ui",value:i||e,meta:{localize:!0,i18nArgs:[t]}}))}}const tt=typeof window<"u";function Tt(e){e.target instanceof HTMLElement&&e.target.hasAttribute("data-file-hover")&&e.target.removeAttribute("data-file-hover")}function Nt(e,i){i.target instanceof HTMLInputElement?e==="dragover"&&i.target.setAttribute("data-file-hover","true"):i.preventDefault(),e==="drop"&&Tt(i)}function pr(e){De("noFiles","Select file")(e),De("removeAll","Remove all")(e),De("remove")(e),tt&&(window._FormKit_File_Drop||(window.addEventListener("dragover",Nt.bind(null,"dragover")),window.addEventListener("drop",Nt.bind(null,"drop")),window.addEventListener("dragleave",Tt),window._FormKit_File_Drop=!0)),e.hook.input((i,t)=>t(Array.isArray(i)?i:[])),e.on("reset",()=>{if(e.props.id&&tt){const i=document.getElementById(e.props.id);i&&(i.value="")}}),e.on("created",()=>{Array.isArray(e.value)||e.input([],!1),e.context&&(e.context.handlers.resetFiles=i=>{if(i.preventDefault(),e.input([]),e.props.id&&tt){const t=document.getElementById(e.props.id);t&&(t.value="")}},e.context.handlers.files=i=>{var t,n;const l=[];if(i.target instanceof HTMLInputElement&&i.target.files){for(let a=0;a<i.target.files.length;a++){let s;(s=i.target.files.item(a))&&l.push({name:s.name,file:s})}e.input(l)}e.context&&(e.context.files=l),typeof((t=e.props.attrs)===null||t===void 0?void 0:t.onChange)=="function"&&((n=e.props.attrs)===null||n===void 0||n.onChange(i))})})}const zt=ee({key:"loading",value:!0,visible:!1});async function dr(e,i){const t=Math.random();if(e.props._submitNonce=t,i.preventDefault(),await e.settled,e.ledger.value("validating")&&(e.store.set(zt),await e.ledger.settled("validating"),e.store.remove("loading"),e.props._submitNonce!==t))return;const n=l=>l.store.set(ee({key:"submitted",value:!0,visible:!1}));if(e.walk(n),n(e),typeof e.props.onSubmitRaw=="function"&&e.props.onSubmitRaw(i,e),e.ledger.value("blocking"))typeof e.props.onSubmitInvalid=="function"&&e.props.onSubmitInvalid(e),e.props.incompleteMessage!==!1&&e.store.set(ee({blocking:!1,key:"incomplete",meta:{localize:e.props.incompleteMessage===void 0,i18nArgs:[{node:e}],showAsMessage:!0},type:"ui",value:e.props.incompleteMessage||"Form incomplete."}));else if(typeof e.props.onSubmit=="function"){const l=e.props.onSubmit(e.hook.submit.dispatch(be(e.value)),e);if(l instanceof Promise){const a=e.props.disabled===void 0&&e.props.submitBehavior!=="live";a&&(e.props.disabled=!0),e.store.set(zt),await l,a&&(e.props.disabled=!1),e.store.remove("loading")}}else i.target instanceof HTMLFormElement&&i.target.submit()}function mr(e){e.props.isForm=!0,e.ledger.count("validating",i=>i.key==="validating"),e.on("created",()=>{var i;!((i=e.context)===null||i===void 0)&&i.handlers&&(e.context.handlers.submit=dr.bind(null,e)),O(e.props,"actions")||(e.props.actions=!0)}),e.on("settled:blocking",()=>e.store.remove("incomplete"))}function br(e){e.props.ignore===void 0&&(e.props.ignore=!0,e.parent=null)}function yr(e){e.on("created",()=>{e.context&&(e.context.initialValue=e.value||"")})}function hr(e,i){i.target instanceof HTMLInputElement&&e.input(oe(e.props.options,i.target.value))}function _r(e,i){var t,n;return(t=e.context)===null||t===void 0||t.value,(n=e.context)===null||n===void 0||n._value,fe(oe(e.props.options,i),e._value)}function gr(e){e.on("created",()=>{var i,t;Array.isArray(e.props.options)||ye(350,{node:e,inputType:"radio"}),!((i=e.context)===null||i===void 0)&&i.handlers&&(e.context.handlers.toggleChecked=hr.bind(null,e)),!((t=e.context)===null||t===void 0)&&t.fns&&(e.context.fns.isChecked=_r.bind(null,e))}),e.hook.prop(Ft(e))}function $r(e,i){e.context&&e.context.value;const t="__original"in i?i.__original:i.value;function n(){return!e.props.options.some(l=>("__original"in l?l.__original:l.value)===null)}return Array.isArray(e._value)?e._value.some(l=>fe(l,t)):(e._value===void 0||e._value===null&&n())&&i.attrs&&i.attrs["data-is-placeholder"]?!0:fe(t,e._value)}async function kr(e,i){var t;typeof((t=e.props.attrs)===null||t===void 0?void 0:t.onChange)=="function"&&(await new Promise(n=>setTimeout(n,0)),await e.settled,e.props.attrs.onChange(i))}function Cr(e,i){const t=i.target,n=t.hasAttribute("multiple")?Array.from(t.selectedOptions).map(l=>oe(e.props.options,l.value)):oe(e.props.options,t.value);e.input(n)}function Ut(e,i){return e.some(t=>t.attrs&&t.attrs["data-is-placeholder"])?e:[{label:i,value:"",attrs:{hidden:!0,disabled:!0,"data-is-placeholder":"true"}},...e]}function wr(e){e.on("created",()=>{var i,t,n;const l=z((i=e.props.attrs)===null||i===void 0?void 0:i.multiple);!l&&e.props.placeholder&&Array.isArray(e.props.options)&&(e.hook.prop(({prop:a,value:s},o)=>(a==="options"&&(s=Ut(s,e.props.placeholder)),o({prop:a,value:s}))),e.props.options=Ut(e.props.options,e.props.placeholder)),l?e.value===void 0&&e.input([],!1):e.context&&!e.context.options&&(e.props.attrs=Object.assign({},e.props.attrs,{value:e._value}),e.on("input",({payload:a})=>{e.props.attrs=Object.assign({},e.props.attrs,{value:a})})),!((t=e.context)===null||t===void 0)&&t.handlers&&(e.context.handlers.selectInput=Cr.bind(null,e),e.context.handlers.onChange=kr.bind(null,e)),!((n=e.context)===null||n===void 0)&&n.fns&&(e.context.fns.isSelected=$r.bind(null,e),e.context.fns.showPlaceholder=(a,s)=>{if(!Array.isArray(e.props.options))return!1;const o=e.props.options.some(f=>{if(f.attrs&&"data-is-placeholder"in f.attrs)return!1;const p="__original"in f?f.__original:f.value;return G(a,p)});return s&&!o?!0:void 0})}),e.hook.input((i,t)=>{var n,l,a;return!e.props.placeholder&&i===void 0&&Array.isArray((n=e.props)===null||n===void 0?void 0:n.options)&&e.props.options.length&&!z((a=(l=e.props)===null||l===void 0?void 0:l.attrs)===null||a===void 0?void 0:a.multiple)&&(i="__original"in e.props.options[0]?e.props.options[0].__original:e.props.options[0].value),t(i)})}function ce(e,i){return t=>{t.props[`${e}Icon`]===void 0&&(t.props[`${e}Icon`]=i.startsWith("<svg")?i:`default:${i}`)}}function nt(e){return!!(se(e)&&e.if&&e.if.startsWith("$slots.")&&typeof e.then=="string"&&e.then.startsWith("$slots.")&&"else"in e)}function Vr(e){return te(ue(_e("$label"),Z(W(),e(),H())),q("$help"),J(Y("$message.value")))}function Q(e,i,t){const n=l=>{const a=i(l);if(t||Be(a)&&"if"in a||nt(a)){const s={if:e,then:a};return t&&(s.else=t(l)),s}else nt(a)?Object.assign(a.else,{if:e}):Be(a)&&Object.assign(a,{if:e});return a};return n._s=we(),n}function pe(e,i){const t=n=>{const l=e({});return nt(l)?(Array.isArray(l.else)||(l.else=he(he(l.else,i),e._s?n[e._s]:{})),l):he(he(l,i),e._s?n[e._s]:{})};return t._s=e._s,t}const Sr=["classes","config","delay","errors","id","index","inputErrors","modelValue","onUpdate:modelValue","name","parent","plugins","sectionsSchema","type","validation","validationLabel","validationMessages","validationRules","onInput","onInputRaw","onUpdate:modelValue","onNode","onSubmit","onSubmitInvalid","onSubmitRaw"];te(J(Y("$message.value")),ue(Ji(R("prefix"),W(),Yi("$label || $ui.submit.value"),H(),R("suffix"))),q("$help")),De("submit"),te(Q("$options == undefined",Oe(Z(W(),Ae(),ve(R("decorator")),H()),pe(Me("$label"),{if:"$label"})),vt(At("$label"),q("$help"),Mt(Ot(Oe(Z(W(),pe(Ae(),{bind:"$option.attrs",attrs:{id:"$option.attrs.id",value:"$option.value",checked:"$fns.isChecked($option.value)"}}),ve(R("decorator")),H()),pe(Me("$option.label"),{if:"$option.label"})),Dt("$option.help"))))),Q("$options == undefined && $help",q("$help")),J(Y("$message.value"))),ce("decorator","checkboxDecorator"),te(ue(_e("$label"),Z(R("prefix","label"),W(),Qi(),Gi(Xi(R("fileItem"),er("$file.name"),Q("$value.length === 1",Rt(R("fileRemove"),"$ui.remove.value")))),Q("$value.length > 1",Rt("$ui.removeAll.value")),tr(R("noFiles"),"$ui.noFiles.value"),H(),R("suffix"))),q("$help"),J(Y("$message.value"))),ce("fileItem","fileItem"),ce("fileRemove","fileRemove"),ce("noFiles","noFiles"),nr("$slots.default",J(Y("$message.value")),ir(rr())),xt("$slots.default"),jt(),xt("$slots.default"),te(Q("$options == undefined",Oe(Z(W(),Ae(),ve(R("decorator")),H()),pe(Me("$label"),{if:"$label"})),vt(At("$label"),q("$help"),Mt(Ot(Oe(Z(W(),pe(Ae(),{bind:"$option.attrs",attrs:{id:"$option.attrs.id",value:"$option.value",checked:"$fns.isChecked($option.value)"}}),ve(R("decorator")),H()),pe(Me("$option.label"),{if:"$option.label"})),Dt("$option.help"))))),Q("$options == undefined && $help",q("$help")),J(Y("$message.value"))),ce("decorator","radioDecorator"),te(ue(_e("$label"),Z(R("prefix"),W(),lr(Q("$slots.default",()=>"$slots.default",Q("$slots.option",sr,ar("$option.label")))),Q("$attrs.multiple !== undefined",()=>"",R("select")),H(),R("suffix"))),q("$help"),J(Y("$message.value"))),ce("select","select"),te(ue(_e("$label"),Z(R("prefix","label"),W(),or(),H(),R("suffix"))),q("$help"),J(Y("$message.value"))),te(ue(_e("$label"),Z(R("prefix","label"),W(),jt(),H(),R("suffix"))),q("$help"),J(Y("$message.value"))),ee({type:"state",blocking:!0,visible:!1,value:!0,key:"validating"});let Re;const Ir=new Promise(e=>{}),je=typeof window<"u"&&typeof fetch<"u";Re=je?getComputedStyle(document.documentElement):void 0;const ge={},it={};function rt(e,i){return t=>{if(typeof t!="string")return;if(t.startsWith("<svg"))return t;const n=t.startsWith("default:");t=n?t.split(":")[1]:t;const l=t in ge;let a;if(l)return ge[t];if(!it[t]){if(a=Er(t),a=je&&typeof a>"u"?Promise.resolve(a):a,a instanceof Promise)it[t]=a.then(s=>!s&&typeof t=="string"&&!n?a=typeof e=="function"?e(t):Pr(t,i):s).then(s=>(typeof t=="string"&&(ge[n?`default:${t}`:t]=s),s));else if(typeof a=="string")return ge[n?`default:${t}`:t]=a,a}return it[t]}}function Er(e){if(je)return Ir.then(()=>Lr(e))}function Lr(e){const i=Re==null?void 0:Re.getPropertyValue(`--fk-icon-${e}`);if(i){const t=atob(i);if(t.startsWith("<svg"))return ge[e]=t,t}}function Pr(e,i){const t=Bt.startsWith("__")?"latest":Bt,n=typeof i=="function"?i(e):`https://cdn.jsdelivr.net/npm/@formkit/icons@${t}/dist/icons/${e}.svg`;if(je)return fetch(`${n}`).then(async l=>{const a=await l.text();if(a.startsWith("<svg"))return a}).catch(l=>{console.error(l)})}let lt=!1;const Kt={100:({data:e})=>`Only groups, lists, and forms can have children (${e.name}).`,101:({data:e})=>`You cannot directly modify the store (${e.name}). See: https://formkit.com/advanced/core#message-store`,102:({data:[e,i]})=>`You cannot directly assign node.${i} (${e.name})`,103:({data:[e]})=>`Schema expressions cannot start with an operator (${e})`,104:({data:[e,i]})=>`Schema expressions cannot end with an operator (${e} in "${i}")`,105:({data:e})=>`Invalid schema expression: ${e}`,106:({data:e})=>`Cannot submit because (${e}) is not in a form.`,107:({data:[e,i]})=>`Cannot set ${e.name} to non object value: ${i}`,108:({data:[e,i]})=>`Cannot set ${e.name} to non array value: ${i}`,300:({data:[e]})=>`Cannot set behavior prop to overscroll (on ${e.name} input) when options prop is a function.`,600:({data:e})=>`Unknown input type${typeof e.props.type=="string"?' "'+e.props.type+'"':""} ("${e.name}")`,601:({data:e})=>`Input definition${typeof e.props.type=="string"?' "'+e.props.type+'"':""} is missing a schema or component property (${e.name}).`},Wt={150:({data:e})=>`Schema function "${e}()" is not a valid function.`,151:({data:e})=>`No form element with id: ${e}`,152:({data:e})=>`No input element with id: ${e}`,350:({data:{node:e,inputType:i}})=>`Invalid options prop for ${e.name} input (${i}). See https://formkit.com/inputs/${i}`,650:'Schema "$get()" must use the id of an input to access.',651:({data:e})=>`Cannot setErrors() on "${e}" because no such id exists.`,652:({data:e})=>`Cannot clearErrors() on "${e}" because no such id exists.`,800:({data:e})=>`${e} is deprecated.`};lt||Ke((e,i)=>{if(e.code in Kt){const t=Kt[e.code];e.message=typeof t=="function"?t(e):t}return i(e)}),lt||We((e,i)=>{if(e.code in Wt){const t=Wt[e.code];e.message=typeof t=="function"?t(e):t}return i(e)}),lt=!0;const Br=typeof window>"u",at=new Map;function vr(e,i){var t;!Br||!e||(at.has(e)||at.set(e,new Set),(t=at.get(e))===null||t===void 0||t.add(i))}const Ht=typeof window>"u",$e={},de={};let j;const X=new WeakMap,Ar="__raw__",Or=/[a-zA-Z0-9\-][cC]lass$/;function Mr(e,i){const t=r.ref(null);if(e==="get"){const l={};return t.value=Dr.bind(null,l),t}const n=e.split(".");return r.watchEffect(()=>{t.value=st(r.isRef(i)?i.value:i,n)}),t}function st(e,i){if(Array.isArray(e)){for(const l of e){const a=l!==!1&&st(l,i);if(a!==void 0)return a}return}let t,n=e;for(const l in i){const a=i[l];if(typeof n!="object"||n===null){t=void 0;break}const s=n[a];if(Number(l)===i.length-1&&s!==void 0){t=typeof s=="function"?s.bind(n):s;break}n=s}return t}function Dr(e,i){if(typeof i!="string")return ye(650);if(i in e||(e[i]=r.ref(void 0)),e[i].value===void 0){e[i].value=null;const t=$t(i);t&&(e[i].value=t.context),Qn(i,({payload:n})=>{e[i].value=Ee(n)?n.context:n})}return e[i].value}function qt(e,i,t){function n(k,_){const c=L(U(_.if),{if:!0}),d=p(k,_.then),m=_.else?p(k,_.else):null;return[c,d,m]}function l(k,_){var c,d;const m=L(U(k.if));let y=()=>_,$=()=>_;return typeof k.then=="object"?$=a(k.then,void 0):typeof k.then=="string"&&(!((c=k.then)===null||c===void 0)&&c.startsWith("$"))?$=L(U(k.then)):$=()=>k.then,O(k,"else")&&(typeof k.else=="object"?y=a(k.else):typeof k.else=="string"&&(!((d=k.else)===null||d===void 0)&&d.startsWith("$"))?y=L(U(k.else)):y=()=>k.else),()=>m()?$():y()}function a(k,_,c={}){const d=new Set(Object.keys(k||{})),m=_?L(U(_)):()=>({}),y=[$=>{const h=m();for(const C in h)d.has(C)||($[C]=h[C])}];if(k){if(se(k))return l(k,c);for(let $ in k){const h=k[$];let C;const u=typeof h=="string";$.startsWith(Ar)?($=$.substring(7),C=()=>h):u&&h.startsWith("$")&&h.length>1&&!(h.startsWith("$reset")&&Or.test($))?C=L(U(h)):typeof h=="object"&&se(h)?C=l(h,void 0):typeof h=="object"&&re(h)?C=a(h):C=()=>h,y.push(b=>{b[$]=C()})}}return()=>{const $=Array.isArray(k)?[]:{};return y.forEach(h=>h($)),$}}function s(k,_){let c=null,d=()=>null,m=!1,y=null,$=null,h=null,C=!1;const u=Hi(_);if(Qe(u)?(c=u.$el,d=u.$el!=="text"?a(u.attrs,u.bind):()=>null):Xe(u)?(typeof u.$cmp=="string"?O(k,u.$cmp)?c=k[u.$cmp]:(c=u.$cmp,C=!0):c=u.$cmp,d=a(u.props,u.bind)):se(u)&&([m,y,$]=n(k,u)),!se(u)&&"if"in u?m=L(U(u.if)):!se(u)&&c===null&&(m=()=>!0),"children"in u&&u.children)if(typeof u.children=="string")if(u.children.startsWith("$slots."))c=c==="text"?"slot":c,y=L(U(u.children));else if(u.children.startsWith("$")&&u.children.length>1){const b=L(U(u.children));y=()=>String(b())}else y=()=>String(u.children);else if(Array.isArray(u.children))y=p(k,u.children);else{const[b,w,E]=n(k,u.children);y=D=>b&&b()?w&&w(D):E&&E(D)}if(Xe(u))if(y){const b=y;y=w=>({default(E,D){var S,A,B,x;const N=j;D&&(j=D),E&&((S=X.get(j))===null||S===void 0||S.unshift(E)),w&&((A=X.get(j))===null||A===void 0||A.unshift(w));const v=b(w);return E&&((B=X.get(j))===null||B===void 0||B.shift()),w&&((x=X.get(j))===null||x===void 0||x.shift()),j=N,v}}),y.slot=!0}else y=()=>({});if("for"in u&&u.for){const b=u.for.length===3?u.for[2]:u.for[1];h=[typeof b=="string"&&b.startsWith("$")?L(U(b)):()=>b,u.for[0],u.for.length===3?String(u.for[1]):null]}return[m,c,d,y,$,h,C]}function o(k,_){const c=k(_),d=j;return Object.keys(c).reduce((m,y)=>{const $=c&&c[y];return m[y]=h=>$&&$(h,d)||null,m},{})}function f(k,_){const[c,d,m,y,$,h,C]=s(k,_);let u=b=>{if(c&&d===null&&y)return c()?y(b):$&&$(b);if(d&&(!c||c())){if(d==="text"&&y)return r.createTextVNode(String(y()));if(d==="slot"&&y)return y(b);const w=C?r.resolveComponent(d):d,E=y!=null&&y.slot?o(y,b):null;return r.h(w,m(),E||(y?y(b):[]))}return typeof $=="function"?$(b):$};if(h){const b=u,[w,E,D]=h;u=()=>{const S=w(),A=Number.isFinite(S)?Array(Number(S)).fill(0).map((v,F)=>F):S,B=[];if(typeof A!="object")return null;const x=X.get(j)||[],N=Array.isArray(A);for(const v in A){if(N&&v in Array.prototype)continue;const F=Object.defineProperty({...x.reduce((ke,ne)=>ke.__idata?{...ke,...ne}:ne,{}),[E]:A[v],...D!==null?{[D]:N?Number(v):v}:{}},"__idata",{enumerable:!1,value:!0});x.unshift(F),B.push(b.bind(null,F)()),x.shift()}return B}}return u}function p(k,_){if(Array.isArray(_)){const d=_.map(f.bind(null,k));return m=>d.map(y=>y(m))}const c=f(k,_);return d=>c(d)}const g=[];function L(k,_={}){const c=new WeakMap;return g.push((d,m)=>{c.set(m,k.provide(y=>d(y,_)))}),()=>c.get(j)()}function K(k,_){var c;t??(t=JSON.stringify(i));const[d,m]=O($e,t)?$e[t]:[p(e,i),g];return Ht||((c=de[t])!==null&&c!==void 0||(de[t]=0),de[t]++,$e[t]=[d,m]),m.forEach(y=>{y(k,_)}),()=>(j=_,d())}return K}function Zt(e,i){const t=X.get(j)||[];let n;return t.length&&(n=st(t,e.split("."))),n===void 0?i:n}function Rr(e,i){return new Proxy(e,{get(...t){let n;const l=t[1];if(typeof l=="string"){const a=j;j=i,n=Zt(l,void 0),j=a}return n!==void 0?n:Reflect.get(...t)}})}function Jt(e,i,t){return e((n,l={})=>n.reduce((a,s)=>{if(s.startsWith("slots.")){const o=s.substring(6),f=()=>i.slots&&O(i.slots,o)&&typeof i.slots[o]=="function";if(l.if)a[s]=f;else if(i.slots){const p=Rr(i,t);a[s]=()=>f()?i.slots[o](p):null}}else{const o=Mr(s,i);a[s]=()=>Zt(s,o.value)}return a},{}),t)}function Yt(e,i,t){if(i??(i=JSON.stringify(e)),de[i]--,de[i]===0){delete de[i];const[,n]=$e[i];delete $e[i],n.length=0}X.delete(t)}const Qt=r.defineComponent({name:"FormKitSchema",props:{schema:{type:[Array,Object],required:!0},data:{type:Object,default:()=>({})},library:{type:Object,default:()=>({})},memoKey:{type:String,required:!1}},setup(e,i){var t;const n=r.getCurrentInstance();let l={};X.set(l,[]);let a=qt(e.library,e.schema,e.memoKey),s,o;Ht||r.watch(()=>e.schema,(p,g)=>{var L;const K=l;l={},X.set(l,[]),a=qt(e.library,e.schema,e.memoKey),s=Jt(a,o,l),p===g&&((L=n==null?void 0:n.proxy)===null||L===void 0?void 0:L.$forceUpdate)(),Yt(e.schema,e.memoKey,K)},{deep:!0}),r.watchEffect(()=>{var p;o=Object.assign(r.reactive((p=e.data)!==null&&p!==void 0?p:{}),{slots:i.slots}),i.slots,s=Jt(a,o,l)});function f(){Yt(e.schema,e.memoKey,l),o.node&&o.node.destroy(),o.slots=null,o=null,s=null}return r.onUnmounted(f),vr((t=r.getCurrentInstance())===null||t===void 0?void 0:t.appContext.app,f),()=>s?s():null}}),jr=typeof window>"u",xe=Symbol("FormKitParent");function xr(e,i){const t=Nr(e,i);if(t.props.definition||T(600,t),t.props.definition.component)return()=>{var o;return r.h((o=t.props.definition)===null||o===void 0?void 0:o.component,{context:t.context},{...i.slots})};const n=r.ref([]);let l=t.props.definition.schemaMemoKey;const a=()=>{var o,f;const p=(f=(o=t.props)===null||o===void 0?void 0:o.definition)===null||f===void 0?void 0:f.schema;p||T(601,t),typeof p=="function"?(n.value=p({...e.sectionsSchema}),(l&&e.sectionsSchema||"memoKey"in p&&typeof p.memoKey=="string")&&(l=(l??(p==null?void 0:p.memoKey))+JSON.stringify(e.sectionsSchema))):n.value=p};a(),jr||t.on("schema",()=>{l+="♻️",a()}),i.emit("node",t);const s=t.props.definition.library;return i.expose({node:t}),()=>r.h(Qt,{schema:n.value,data:t.context,library:s,memoKey:l},{...i.slots})}r.defineComponent(xr,{props:Sr,inheritAttrs:!1});const Xt=Symbol();r.defineComponent((e,i)=>{const t=r.ref(null),n=r.ref(!1),l=r.ref(void 0),a=r.watch(t,o=>{let f=o,p=null;for(;f=f==null?void 0:f.parentNode;)if(p=f,p instanceof ShadowRoot||p instanceof Document){s(p);break}a(),n.value=!0});r.provide(Xt,l);function s(o){l.value=o}return()=>n.value&&i.slots.default?i.slots.default():r.h("template",{ref:t})});const Gt=Symbol.for("FormKitOptions"),Fr=typeof window<"u",ot=["help","label","ignore","disabled","preserve",/^preserve(-e|E)rrors/,/^[a-z]+(?:-visibility|Visibility|-behavior|Behavior)$/,/^[a-zA-Z-]+(?:-class|Class)$/,"prefixIcon","suffixIcon",/^[a-zA-Z-]+(?:-icon|Icon)$/];function en(e,i){i.classes&&Object.keys(i.classes).forEach(t=>{typeof t=="string"&&(e.props[`_${t}Class`]=i.classes[t],me(i.classes[t])&&t==="inner"&&Object.values(i.classes[t]))})}function Tr(e){return e?["Submit","SubmitRaw","SubmitInvalid"].reduce((t,n)=>{const l=`on${n}`;return l in e&&typeof e[l]=="function"&&(t[l]=e[l]),t},{}):{}}function Nr(e,i,t={}){var n;const l=Object.assign({},r.inject(Gt)||{},t),a=r.inject(Xt,r.ref(Fr?document:void 0)),s=r.getCurrentInstance(),o=Tr(s==null?void 0:s.vnode.props),f=["modelValue","model-value"].some(u=>{var b;return u in((b=s==null?void 0:s.vnode.props)!==null&&b!==void 0?b:{})});let p=!1;r.onMounted(()=>{p=!0});const g=e.modelValue!==void 0?e.modelValue:ie(i.attrs.value);function L(){var u;const b={...le(e),...o,type:(u=e.type)!==null&&u!==void 0?u:"text",__root:a.value,__slots:i.slots},w=ut(le(i.attrs),ot);w.key||(w.key=we()),b.attrs=w;const E=ct(le(i.attrs),ot);for(const S in E)b[Se(S)]=E[S];const D={props:{}};return en(D,e),Object.assign(b,D.props),typeof b.type!="string"&&(b.definition=b.type,delete b.type),b}const K=L(),k=K.ignore?null:e.parent||r.inject(xe,null),_=Ki(Ve(l||{},{name:e.name||void 0,value:g,parent:k,plugins:(l.plugins||[]).concat((n=e.plugins)!==null&&n!==void 0?n:[]),config:e.config||{},props:K,index:e.index,sync:!!z(i.attrs.sync||i.attrs.dynamic)},!1,!0));_.props.definition||T(600,_);const c=r.ref(new Set(_.props.definition.props||[]));_.on("added-props",({payload:u})=>{Array.isArray(u)&&u.forEach(b=>c.value.add(b))});const d=r.computed(()=>ot.concat([...c.value]).reduce((u,b)=>(typeof b=="string"?(u.push(Se(b)),u.push(pt(b))):u.push(b),u),[]));r.watchEffect(()=>en(_,e));const m=le(e);for(const u in m)r.watch(()=>e[u],()=>{e[u]!==void 0&&(_.props[u]=e[u])});r.watchEffect(()=>{_.props.__root=a.value});const y=new Set,$=le(i.attrs);r.watchEffect(()=>{h(ct($,d.value))});function h(u){y.forEach(b=>{b(),y.delete(b)});for(const b in u){const w=Se(b);y.add(r.watch(()=>i.attrs[b],()=>{_.props[w]=i.attrs[b]}))}}if(r.watchEffect(()=>{const u=ut(le(i.attrs),d.value);"multiple"in u&&(u.multiple=z(u.multiple)),typeof u.onBlur=="function"&&(u.onBlur=vn(u.onBlur)),_.props.attrs=Object.assign({},_.props.attrs||{},u)}),r.watchEffect(()=>{var u;const b=((u=e.errors)!==null&&u!==void 0?u:[]).map(w=>ee({key:ze(w),type:"error",value:w,meta:{source:"prop"}}));_.store.apply(b,w=>w.type==="error"&&w.meta.source==="prop")}),_.type!=="input"){const u=`${_.name}-prop`;r.watchEffect(()=>{var b;const w=(b=e.inputErrors)!==null&&b!==void 0?b:{},E=Object.keys(w);E.length||_.clearErrors(!0,u);const D=E.reduce((S,A)=>{let B=w[A];return typeof B=="string"&&(B=[B]),Array.isArray(B)&&(S[A]=B.map(x=>ee({key:x,type:"error",value:x,meta:{source:u}}))),S},{});_.store.apply(D,S=>S.type==="error"&&S.meta.source===u)})}r.watchEffect(()=>Object.assign(_.config,e.config)),_.type!=="input"&&r.provide(xe,_);let C;return _.on("modelUpdated",()=>{var u,b;i.emit("inputRaw",(u=_.context)===null||u===void 0?void 0:u.value,_),p&&i.emit("input",(b=_.context)===null||b===void 0?void 0:b.value,_),f&&_.context&&(C=ie(_.value),i.emit("update:modelValue",Ln(_.value)))}),f&&(r.watch(r.toRef(e,"modelValue"),u=>{G(C,u)||_.input(u,!1)},{deep:!0}),_.value!==g&&_.emit("modelUpdated")),r.onBeforeUnmount(()=>_.destroy()),_}let zr=1;function Ur(e){return typeof e=="function"&&e.length===2||typeof e=="object"&&!Array.isArray(e)&&!("$el"in e)&&!("$cmp"in e)&&!("if"in e)}function M(e,i={}){const t={type:"input",...i};let n;if(Ur(e)){const l=`SchemaComponent${zr++}`;n=V("input",()=>({$cmp:l,props:{context:"$node.context"}})),t.library={[l]:r.markRaw(e)}}else typeof e=="function"?n=e:n=V("input",()=>ie(e));return t.schema=Vr(n||"Schema undefined"),t.schemaMemoKey||(t.schemaMemoKey=`${Math.random()}`),t}const Kr=V("messages",()=>({$el:"ul",if:"$fns.length($messages)"})),Wr=V("message",()=>({$el:"li",for:["message","$messages"],attrs:{key:"$message.key",id:"$id + '-' + $message.key","data-message-type":"$message.type"}})),Hr=Kr(Wr("$message.value"));r.defineComponent({props:{node:{type:Object,required:!1},sectionsSchema:{type:Object,default:{}},defaultPosition:{type:[String,Boolean],default:!1}},setup(e,i){const t=r.computed(()=>e.node||r.inject(xe,void 0));r.watch(t,()=>{var a;!((a=t.value)===null||a===void 0)&&a.context&&!z(e.defaultPosition)&&(t.value.context.defaultMessagePlacement=!1)},{immediate:!0});const n=Hr(e.sectionsSchema||{}),l=r.computed(()=>{var a,s,o,f,p,g;return{messages:((s=(a=t.value)===null||a===void 0?void 0:a.context)===null||s===void 0?void 0:s.messages)||{},fns:((f=(o=t.value)===null||o===void 0?void 0:o.context)===null||f===void 0?void 0:f.fns)||{},classes:((g=(p=t.value)===null||p===void 0?void 0:p.context)===null||g===void 0?void 0:g.classes)||{}}});return()=>{var a;return!((a=t.value)===null||a===void 0)&&a.context?r.h(Qt,{schema:n,data:l.value},{...i.slots}):null}}}),r.defineComponent({name:"FormKitIcon",props:{icon:{type:String,default:""},iconLoader:{type:Function,default:null},iconLoaderUrl:{type:Function,default:null}},setup(e){var i,t;const n=r.ref(void 0),l=r.inject(Gt,{}),a=r.inject(xe,null);let s;function o(){if(!s||typeof s!="function")return;const f=s(e.icon);f instanceof Promise?f.then(p=>{n.value=p}):n.value=f}if(e.iconLoader&&typeof e.iconLoader=="function")s=rt(e.iconLoader);else if(a&&(!((i=a.props)===null||i===void 0)&&i.iconLoader))s=rt(a.props.iconLoader);else if(e.iconLoaderUrl&&typeof e.iconLoaderUrl=="function")s=rt(s,e.iconLoaderUrl);else{const f=(t=l==null?void 0:l.plugins)===null||t===void 0?void 0:t.find(p=>typeof p.iconHandler=="function");f&&(s=f.iconHandler)}return r.watch(()=>e.icon,()=>{o()},{immediate:!0}),()=>e.icon&&n.value?r.h("span",{class:"formkit-icon",innerHTML:n.value}):null}});const qr=r.defineComponent({__name:"PrimeCalendar",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(o){t==null||t.node.input(t==null?void 0:t._value)}function a(o){t==null||t.node.input(o)}const s=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(o,f)=>{const p=r.resolveComponent("Calendar");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(p,{modelValue:r.unref(t)._value,"onUpdate:modelValue":f[0]||(f[0]=g=>r.unref(t)._value=g),"input-id":i.context.id,disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"input-style":r.unref(n).style,"input-class":r.unref(s),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,"date-format":r.unref(n).dateFormat,"selection-mode":r.unref(n).selectionMode??"single",inline:r.unref(n).inline??!1,"show-other-months":r.unref(n).showOtherMonths??!0,"select-other-months":r.unref(n).selectOtherMonths??!1,icon:r.unref(n).icon,"show-icon":r.unref(t).showIcon,"previous-icon":r.unref(n).previousIcon??"pi pi-chevron-left","next-icon":r.unref(n).nextIcon??"pi pi-chevron-right","increment-icon":r.unref(n).incrementIcon??"pi pi-chevron-up","decrement-icon":r.unref(n).decrementIcon??"pi pi-chevron-down","number-of-months":r.unref(n).numberOfMonths??1,"responsive-options":r.unref(n).responsiveOptions,view:r.unref(n).view??"date","touch-u-i":r.unref(n).touchUI??!1,"min-date":r.unref(n).minDate,"max-date":r.unref(n).maxDate,"disabled-dates":r.unref(n).disabledDates,"disabled-days":r.unref(n).disabledDays,"max-date-count":r.unref(n).maxDateCount,"show-on-focus":r.unref(n).showOnFocus??!0,"auto-z-index":r.unref(n).autoZIndex??!0,"base-z-index":r.unref(n).baseZIndex??0,"show-button-bar":r.unref(n).showButtonBar??!1,"show-time":r.unref(n).showTime??!1,"time-only":r.unref(n).timeOnly??!1,"short-year-cutoff":r.unref(n).shortYearCutoff??"+10","hour-format":r.unref(n).hourFormat??"24","step-hour":r.unref(n).stepHour??1,"step-minute":r.unref(n).stepMinute??1,"step-second":r.unref(n).stepSecond??1,"show-seconds":r.unref(n).showSeconds??!1,"hide-on-date-time-select":r.unref(n).hideOnDateTimeSelect??!1,"hide-on-range-selection":r.unref(n).hideOnRangeSelection??!1,"time-separator":r.unref(n).timeSeparator??":","show-week":r.unref(n).showWeek??!1,"manual-input":r.unref(n).manualInput??!0,"append-to":r.unref(n).appendTo??"body","panel-style":r.unref(n).panelStyle,"panel-class":r.unref(n).panelClass,pt:r.unref(n).pt,onDateSelect:a,onInput:l},null,8,["modelValue","input-id","disabled","readonly","input-style","input-class","tabindex","aria-label","aria-labelledby","date-format","selection-mode","inline","show-other-months","select-other-months","icon","show-icon","previous-icon","next-icon","increment-icon","decrement-icon","number-of-months","responsive-options","view","touch-u-i","min-date","max-date","disabled-dates","disabled-days","max-date-count","show-on-focus","auto-z-index","base-z-index","show-button-bar","show-time","time-only","short-year-cutoff","hour-format","step-hour","step-minute","step-second","show-seconds","hide-on-date-time-select","hide-on-range-selection","time-separator","show-week","manual-input","append-to","panel-style","panel-class","pt"])])}}}),Zr={key:0,class:"formkit-prime-left"},Jr={key:1,class:"formkit-prime-right"},Yr=r.defineComponent({__name:"PrimeCheckbox",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o;t==null||t.node.input((o=i.context)==null?void 0:o._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("Checkbox");return r.openBlock(),r.createElementBlock("div",null,[r.unref(t).attrs.labelLeft?(r.openBlock(),r.createElementBlock("span",Zr,r.toDisplayString(r.unref(t).attrs.labelLeft),1)):r.createCommentVNode("",!0),r.createVNode(f,{modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),"input-id":r.unref(t).id,disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"input-style":r.unref(n).style,"input-class":r.unref(a),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,binary:r.unref(n).binary??!0,"true-value":r.unref(n).trueValue??void 0,"false-value":r.unref(n).falseValue??void 0,pt:r.unref(n).pt,onInput:l},null,8,["modelValue","input-id","disabled","readonly","input-style","input-class","tabindex","aria-label","aria-labelledby","binary","true-value","false-value","pt"]),r.unref(t).attrs.labelRight?(r.openBlock(),r.createElementBlock("span",Jr,r.toDisplayString(r.unref(t).attrs.labelRight),1)):r.createCommentVNode("",!0)])}}}),Qr=r.defineComponent({__name:"PrimeChips",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o;t==null||t.node.input((o=i.context)==null?void 0:o._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("Chips");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(f,{modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),"input-id":r.unref(t).id,disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"input-style":r.unref(n).style,"input-class":r.unref(a),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,"allow-duplicate":r.unref(n).allowDuplicate??!0,"add-on-blur":r.unref(n).addOnBlur??!1,max:r.unref(n).max??void 0,placeholder:r.unref(n).placeholder,separator:r.unref(n).separator,pt:r.unref(n).pt,onAdd:l,onRemove:l},null,8,["modelValue","input-id","disabled","readonly","input-style","input-class","tabindex","aria-label","aria-labelledby","allow-duplicate","add-on-blur","max","placeholder","separator","pt"])])}}}),Xr=r.defineComponent({__name:"PrimeColorPicker",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(a){var s;t==null||t.node.input((s=i.context)==null?void 0:s._value)}return(a,s)=>{const o=r.resolveComponent("ColorPicker");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(o,{modelValue:r.unref(t)._value,"onUpdate:modelValue":s[0]||(s[0]=f=>r.unref(t)._value=f),disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,style:r.normalizeStyle(r.unref(n).style),"panel-class":r.unref(n).class,tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,"default-color":r.unref(n).defaultColor??"ff0000",inline:r.unref(n).inline??!1,format:r.unref(n).format,pt:r.unref(n).pt,onChange:l},null,8,["modelValue","disabled","readonly","style","panel-class","tabindex","aria-label","aria-labelledby","default-color","inline","format","pt"])])}}}),Gr=r.defineComponent({__name:"PrimeDropdown",props:{context:Object},setup(e){const t=e.context,n=t==null?void 0:t.attrs;function l(o){t==null||t.handlers.blur(o.value)}function a(o){t==null||t.node.input(o.value)}const s=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(o,f)=>{const p=r.resolveComponent("Dropdown");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(p,{modelValue:r.unref(t)._value,"onUpdate:modelValue":f[0]||(f[0]=g=>r.unref(t)._value=g),"input-id":r.unref(t).id,disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"input-style":r.unref(s),"input-class":r.unref(n).class,tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,options:r.unref(n).options,"option-label":r.unref(n).optionLabel??"label","option-value":r.unref(n).optionValue??"value",placeholder:r.unref(n).placeholder,filter:r.unref(n).filter??!1,"show-clear":r.unref(n).showClear??!1,pt:r.unref(n).pt,onChange:a,onBlur:l},null,8,["modelValue","input-id","disabled","readonly","input-style","input-class","tabindex","aria-label","aria-labelledby","options","option-label","option-value","placeholder","filter","show-clear","pt"])])}}}),el=r.defineComponent({__name:"PrimeEditor",props:{context:Object},setup(e){const t=e.context,n=t==null?void 0:t.attrs;function l(o){t==null||t.node.input(o.htmlValue)}function a(o){o.range===null&&(t==null||t.handlers.blur(o.htmlValue))}const s=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(o,f)=>{const p=r.resolveComponent("Editor");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(p,{id:r.unref(t).id,modelValue:r.unref(t)._value,"onUpdate:modelValue":f[0]||(f[0]=g=>r.unref(t)._value=g),disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"editor-style":r.unref(n).style,class:r.normalizeClass(r.unref(s)),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,placeholder:r.unref(n).placeholder,formats:r.unref(n).formats,modules:r.unref(n).modules,pt:r.unref(n).pt,onTextChange:l,onSelectionChange:a},null,8,["id","modelValue","disabled","readonly","editor-style","class","tabindex","aria-label","aria-labelledby","placeholder","formats","modules","pt"])])}}}),tl=r.defineComponent({__name:"PrimeInputMask",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o,f;t==null||t.node.input((o=i.context)==null?void 0:o._value),t==null||t.handlers.blur((f=i.context)==null?void 0:f._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("InputMask");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(f,{id:r.unref(t).id,modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"editor-style":r.unref(n).style,class:r.normalizeClass(r.unref(a)),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,placeholder:r.unref(n).placeholder,mask:r.unref(n).mask??void 0,"slot-char":r.unref(n).slotChar??"_","auto-clear":r.unref(n).autoClear??!0,unmask:r.unref(n).unmask??!1,pt:r.unref(n).pt,onBlur:l},null,8,["id","modelValue","disabled","readonly","editor-style","class","tabindex","aria-label","aria-labelledby","placeholder","mask","slot-char","auto-clear","unmask","pt"])])}}}),nl=r.defineComponent({__name:"PrimeInputNumber",props:{context:Object},setup(e){const t=e.context,n=t==null?void 0:t.attrs;function l(o){t==null||t.handlers.blur(o.value)}function a(o){t==null||t.node.input(o.value)}const s=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(o,f)=>{const p=r.resolveComponent("InputNumber");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(p,{modelValue:r.unref(t)._value,"onUpdate:modelValue":f[0]||(f[0]=g=>r.unref(t)._value=g),"input-id":r.unref(t).id,disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"input-style":r.unref(n).style,"input-class":r.unref(s),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,placeholder:r.unref(n).placeholder,"use-grouping":r.unref(n).useGrouping??!0,"min-fraction-digits":r.unref(n).minFractionDigits??void 0,"max-fraction-digits":r.unref(n).maxFractionDigits??void 0,locale:r.unref(n).locale??void 0,mode:r.unref(n).mode??void 0,currency:r.unref(n).currency??void 0,prefix:r.unref(n).prefix??void 0,suffix:r.unref(n).suffix??void 0,"show-buttons":r.unref(n).showButtons??void 0,"button-layout":r.unref(n).buttonLayout??"stacked",step:r.unref(n).step??void 0,pt:r.unref(n).pt,onInput:a,onBlur:l},null,8,["modelValue","input-id","disabled","readonly","input-style","input-class","tabindex","aria-label","aria-labelledby","placeholder","use-grouping","min-fraction-digits","max-fraction-digits","locale","mode","currency","prefix","suffix","show-buttons","button-layout","step","pt"])])}}}),il={key:0,class:"formkit-prime-left"},rl={key:1,class:"formkit-prime-right"},ll=r.defineComponent({__name:"PrimeInputSwitch",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o;t==null||t.node.input((o=i.context)==null?void 0:o._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("InputSwitch");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(n).option_class)},[r.unref(t).attrs.labelLeft?(r.openBlock(),r.createElementBlock("span",il,r.toDisplayString(r.unref(t).attrs.labelLeft),1)):r.createCommentVNode("",!0),r.createVNode(f,{modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),"input-id":r.unref(t).id,disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"input-style":r.unref(n).style,"input-class":r.unref(a),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,"true-value":r.unref(n).trueValue??void 0,"false-value":r.unref(n).falseValue??void 0,pt:r.unref(n).pt,onInput:l},null,8,["modelValue","input-id","disabled","readonly","input-style","input-class","tabindex","aria-label","aria-labelledby","true-value","false-value","pt"]),r.unref(t).attrs.labelRight?(r.openBlock(),r.createElementBlock("span",rl,r.toDisplayString(r.unref(t).attrs.labelRight),1)):r.createCommentVNode("",!0)],2)}}}),al=r.defineComponent({__name:"PrimeInputText",props:{context:Object},setup(e){const t=e.context,n=t==null?void 0:t.attrs;function l(){return(t==null?void 0:t.iconLeft)&&(t==null?void 0:t.iconLeft.length)>0}function a(){return(t==null?void 0:t.iconRight)&&(t==null?void 0:t.iconRight.length)>0}function s(){let g="";return l()&&(g=`${g}p-input-icon-left `),a()&&(g=`${g}p-input-icon-right `),g}function o(g){t==null||t.handlers.blur(g.target.value)}function f(g){t==null||t.node.input(g.target.value)}const p=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(g,L)=>{const K=r.resolveComponent("InputText");return r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("span",{class:r.normalizeClass(s())},[l()?(r.openBlock(),r.createElementBlock("i",{key:0,class:r.normalizeClass(r.unref(t).iconLeft)},null,2)):r.createCommentVNode("",!0),r.createVNode(K,{id:r.unref(t).id,modelValue:r.unref(t)._value,"onUpdate:modelValue":L[0]||(L[0]=k=>r.unref(t)._value=k),disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,style:r.normalizeStyle(r.unref(n).style),class:r.normalizeClass(r.unref(p)),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,placeholder:r.unref(n).placeholder,pt:r.unref(n).pt,onInput:f,onBlur:o},null,8,["id","modelValue","disabled","readonly","style","class","tabindex","aria-label","aria-labelledby","placeholder","pt"]),a?(r.openBlock(),r.createElementBlock("i",{key:1,class:r.normalizeClass(r.unref(t).iconRight)},null,2)):r.createCommentVNode("",!0)],2)])}}}),sl=r.defineComponent({__name:"PrimeTextarea",props:{context:Object},setup(e){const t=e.context,n=t==null?void 0:t.attrs;function l(o){t==null||t.handlers.blur(o.target.value)}function a(o){t==null||t.node.input(o.target.value)}const s=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(o,f)=>{const p=r.resolveComponent("Textarea");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(p,{id:r.unref(t).id,modelValue:r.unref(t)._value,"onUpdate:modelValue":f[0]||(f[0]=g=>r.unref(t)._value=g),disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,style:r.normalizeStyle(r.unref(n).style),class:r.normalizeClass(r.unref(s)),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,placeholder:r.unref(n).placeholder,rows:r.unref(t).rows??3,pt:r.unref(n).pt,onInput:a,onBlur:l},null,8,["id","modelValue","disabled","readonly","style","class","tabindex","aria-label","aria-labelledby","placeholder","rows","pt"])])}}}),ol=r.defineComponent({__name:"PrimeKnob",props:{context:Object},setup(e){const t=e.context,n=t==null?void 0:t.attrs;function l(s){t==null||t.node.input(s),t==null||t.handlers.blur(s)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("Knob");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(f,{id:r.unref(t).id,modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,style:r.normalizeStyle(r.unref(n).style),class:r.normalizeClass(r.unref(a)),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,min:r.unref(n).min??0,max:r.unref(n).max??100,step:r.unref(n).step??void 0,size:r.unref(n).size??100,"stroke-width":r.unref(n).strokeWidth??14,"show-value":r.unref(n).showValue??!0,"value-color":r.unref(n).valueColor??void 0,"range-color":r.unref(n).rangeColor??void 0,"text-color":r.unref(n).textColor??void 0,"value-template":r.unref(n).valueTemplate??void 0,pt:r.unref(n).pt,onChange:l},null,8,["id","modelValue","disabled","readonly","style","class","tabindex","aria-label","aria-labelledby","min","max","step","size","stroke-width","show-value","value-color","range-color","text-color","value-template","pt"])])}}}),fl=r.defineComponent({__name:"PrimeMultiSelect",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o;t==null||t.node.input((o=i.context)==null?void 0:o._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("MultiSelect");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(f,{modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),"input-id":r.unref(t).id,disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"list-style":r.unref(n).style,class:r.normalizeClass(r.unref(a)),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,options:r.unref(n).options,"option-label":r.unref(n).optionLabel??"label","option-value":r.unref(n).optionValue??"value",filter:r.unref(n).filter??!1,pt:r.unref(n).pt,onChange:l},null,8,["modelValue","input-id","disabled","readonly","list-style","class","tabindex","aria-label","aria-labelledby","options","option-label","option-value","filter","pt"])])}}}),ul=r.defineComponent({__name:"PrimeListbox",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o;t==null||t.node.input((o=i.context)==null?void 0:o._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{var p;const f=r.resolveComponent("Listbox");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(f,{id:r.unref(t).id,modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=g=>r.unref(t)._value=g),disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"list-style":r.unref(n).style,class:r.normalizeClass(r.unref(a)),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,options:(p=r.unref(n))==null?void 0:p.options,"option-label":r.unref(n).optionLabel??"label","option-value":r.unref(n).optionValue??"value",multiple:r.unref(n).multiple??!1,filter:r.unref(n).filter??!1,"filter-icon":r.unref(n).filterIcon,"filter-placeholder":r.unref(n).filterPlaceholder,"filter-locale":r.unref(n).filterLocale,"filter-match-mode":r.unref(n).filterMatchMode,"auto-option-focus":r.unref(n).autoOptionFocus??!0,"select-on-focus":r.unref(n).selectOnFocus??!1,pt:r.unref(n).pt,onChange:l},null,8,["id","modelValue","disabled","readonly","list-style","class","tabindex","aria-label","aria-labelledby","options","option-label","option-value","multiple","filter","filter-icon","filter-placeholder","filter-locale","filter-match-mode","auto-option-focus","select-on-focus","pt"])])}}}),cl=r.defineComponent({__name:"PrimePassword",props:{context:Object},setup(e){const t=e.context,n=t==null?void 0:t.attrs;function l(o){t==null||t.handlers.blur(o.target.value)}function a(o){t==null||t.node.input(o.target.value)}const s=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(o,f)=>{const p=r.resolveComponent("Password");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(p,{modelValue:r.unref(t)._value,"onUpdate:modelValue":f[0]||(f[0]=g=>r.unref(t)._value=g),"input-id":r.unref(t).id,disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"input-style":r.unref(n).style,"input-class":r.unref(s),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,placeholder:r.unref(n).placeholder,"medium-regex":r.unref(n).mediumRegex??"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})","strong-regex":r.unref(n).strongRegex??"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})","prompt-label":r.unref(n).promptLabel,"weak-label":r.unref(n).weakLabel,"medium-label":r.unref(n).mediumLabel,"strong-label":r.unref(n).strongLabel,"hide-icon":r.unref(n).hideIcon??"pi pi-eye-slash","show-icon":r.unref(n).showIcon??"pi pi-eye",feedback:r.unref(t).feedback??!1,"toggle-mask":r.unref(t).toggleMask??!1,pt:r.unref(n).pt,onInput:a,onBlur:l},null,8,["modelValue","input-id","disabled","readonly","input-style","input-class","tabindex","aria-label","aria-labelledby","placeholder","medium-regex","strong-regex","prompt-label","weak-label","medium-label","strong-label","hide-icon","show-icon","feedback","toggle-mask","pt"])])}}}),pl=["for"],dl=r.defineComponent({__name:"PrimeRadioButton",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o;t==null||t.node.input((o=i.context)==null?void 0:o._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("RadioButton");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(n).options_class)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(n).options,p=>(r.openBlock(),r.createElementBlock("div",{key:p.value,class:r.normalizeClass(r.unref(n).option_class)},[r.createVNode(f,{modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=g=>r.unref(t)._value=g),name:r.unref(n).name,value:p.value,"input-style":r.unref(n).style,"input-class":r.unref(a),pt:r.unref(n).pt,onClick:l,onChange:l},null,8,["modelValue","name","value","input-style","input-class","pt"]),r.createElementVNode("label",{for:p.value},r.toDisplayString(p.label),9,pl)],2))),128))],2)}}}),ml=r.defineComponent({__name:"PrimeRating",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o;t==null||t.node.input((o=i.context)==null?void 0:o._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("Rating");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(f,{id:r.unref(t).id,modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,style:r.normalizeStyle(r.unref(n).style),class:r.normalizeClass(r.unref(a)),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,stars:r.unref(n).stars??5,cancel:r.unref(n).cancel??!1,"on-icon":r.unref(n).onIcon??"pi pi-star-fill","off-icon":r.unref(n).offIcon??"pi pi-star","cancel-icon":r.unref(n).cancelIcon??"pi pi-ban",pt:r.unref(n).pt,onChange:l},null,8,["id","modelValue","disabled","readonly","style","class","tabindex","aria-label","aria-labelledby","stars","cancel","on-icon","off-icon","cancel-icon","pt"])])}}}),bl=r.defineComponent({__name:"PrimeSlider",props:{context:Object},setup(e){const t=e.context,n=t==null?void 0:t.attrs;function l(s){t==null||t.node.input(s),t==null||t.handlers.blur(s)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("Slider");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(f,{id:r.unref(t).id,modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,style:r.normalizeStyle(r.unref(n).style),class:r.normalizeClass(r.unref(a)),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,min:r.unref(n).min??0,max:r.unref(n).max??100,step:r.unref(n).step??void 0,range:r.unref(n).range??!1,orientation:r.unref(n).orientation??"horizontal",pt:r.unref(n).pt,onChange:l},null,8,["id","modelValue","disabled","readonly","style","class","tabindex","aria-label","aria-labelledby","min","max","step","range","orientation","pt"])])}}}),yl=r.defineComponent({__name:"PrimeToggleButton",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o;t==null||t.node.input((o=i.context)==null?void 0:o._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("ToggleButton");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(f,{modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),"input-id":r.unref(t).id,disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"input-style":r.unref(n).style,"input-class":r.unref(a),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,"on-label":r.unref(n).onLabel??"Yes","off-label":r.unref(n).offLabel??"No","on-icon":r.unref(n).onIcon??"pi pi-check","off-icon":r.unref(n).offIcon??"pi pi-times","icon-pos":r.unref(n).iconPos??"left",pt:r.unref(n).pt,onChange:l},null,8,["modelValue","input-id","disabled","readonly","input-style","input-class","tabindex","aria-label","aria-labelledby","on-label","off-label","on-icon","off-icon","icon-pos","pt"])])}}}),hl=r.defineComponent({__name:"PrimeSelectButton",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o;t==null||t.node.input((o=i.context)==null?void 0:o._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("SelectButton");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(f,{id:r.unref(t).id,modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,style:r.normalizeStyle(r.unref(n).style),class:r.normalizeClass(r.unref(a)),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,options:r.unref(n).options,"option-label":r.unref(n).optionLabel??"label","option-value":r.unref(n).optionValue??"value","option-disabled":r.unref(n).optionDisabled,multiple:r.unref(n).multiple??!1,unselectable:r.unref(n).unselectable??!0,"data-key":r.unref(n).dataKey,pt:r.unref(n).pt,onChange:l},null,8,["id","modelValue","disabled","readonly","style","class","tabindex","aria-label","aria-labelledby","options","option-label","option-value","option-disabled","multiple","unselectable","data-key","pt"])])}}}),_l={key:0,class:"formkit-prime-left"},gl={key:1,class:"formkit-prime-right"},$l=r.defineComponent({__name:"PrimeTriStateCheckbox",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o;t==null||t.node.input((o=i.context)==null?void 0:o._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("TriStateCheckbox");return r.openBlock(),r.createElementBlock("div",null,[r.unref(t).attrs.labelLeft?(r.openBlock(),r.createElementBlock("span",_l,r.toDisplayString(r.unref(t).attrs.labelLeft),1)):r.createCommentVNode("",!0),r.createVNode(f,{modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),"input-id":r.unref(t).id,disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"input-style":r.unref(n).style,"input-class":r.unref(a),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,pt:r.unref(n).pt,onClick:l},null,8,["modelValue","input-id","disabled","readonly","input-style","input-class","tabindex","aria-label","aria-labelledby","pt"]),r.unref(t).attrs.labelRight?(r.openBlock(),r.createElementBlock("span",gl,r.toDisplayString(r.unref(t).attrs.labelRight),1)):r.createCommentVNode("",!0)])}}}),tn=M(al,{props:["iconRight","iconLeft"]}),nn=M(nl,{props:["iconRight","iconLeft"]}),rn=M(tl,{props:[]}),ln=M(cl,{props:["feedback","toggleMask"]}),an=M(sl,{props:["rows"]}),sn=M(Yr,{props:[]}),on=M(ll,{props:[]}),fn=M(el,{props:[]}),un=M(Gr,{props:[]}),cn=M(fl,{props:[]}),pn=M(ul,{props:[]}),dn=M(qr,{props:[]}),mn=M(bl,{props:[]}),bn=M(ml,{props:[]}),yn=M(dl,{props:[]}),hn=M(Qr,{props:[]}),_n=M(ol,{props:[]}),gn=M(Xr,{props:[]}),$n=M(yl,{props:[]}),kn=M(hl,{props:[]}),Cn=M($l,{props:[]}),kl={primeInputText:tn,primeInputNumber:nn,primeInputMask:rn,primePassword:ln,primeCheckbox:sn,primeInputSwitch:on,primeTextarea:an,primeEditor:fn,primeDropdown:un,primeMultiSelect:cn,primeCalendar:dn,primeSlider:mn,primeChips:hn,primeKnob:_n,primeRating:bn,primeRadioButton:yn,primeColorPicker:gn,primeToggleButton:$n,primeListbox:pn,primeSelectButton:kn,primeTriStateCheckbox:Cn};P.primeCalendarDefinition=dn,P.primeCheckboxDefinition=sn,P.primeChipsDefinition=hn,P.primeColorPickerDefinition=gn,P.primeDropdownDefinition=un,P.primeEditorDefinition=fn,P.primeInputMaskDefinition=rn,P.primeInputNumberDefinition=nn,P.primeInputSwitchDefinition=on,P.primeInputTextDefinition=tn,P.primeInputs=kl,P.primeKnobDefinition=_n,P.primeListboxDefinition=pn,P.primeMultiSelectDefinition=cn,P.primePasswordDefinition=ln,P.primeRadioButtonDefinition=yn,P.primeRatingDefinition=bn,P.primeSelectButtonDefinition=kn,P.primeSliderDefinition=mn,P.primeTextareaDefinition=an,P.primeToggleButtonDefinition=$n,P.primeTriStateCheckboxDefinition=Cn,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})});
1
+ (function(P,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(P=typeof globalThis<"u"?globalThis:P||self,r(P["formkit-primevue"]={},P.Vue))})(this,function(P,r){"use strict";const ft=["__key","__init","__shim","__original","__index","__prevKey"];function we(){return Math.random().toString(36).substring(2,15)}function wn(e,i){const t=e instanceof Set?e:new Set(e);return i&&i.forEach(n=>t.add(n)),[...t]}function O(e,i){return Object.prototype.hasOwnProperty.call(e,i)}function G(e,i,t=!0,n=["__key"]){if(e===i)return!0;if(typeof i=="object"&&typeof e=="object"){if(e instanceof Map||e instanceof Set)return!1;if(e instanceof Date&&i instanceof Date)return e.getTime()===i.getTime();if(e instanceof RegExp&&i instanceof RegExp)return Vn(e,i);if(e===null||i===null||Object.keys(e).length!==Object.keys(i).length)return!1;for(const l of n)if((l in e||l in i)&&e[l]!==i[l])return!1;for(const l in e)if(!(l in i)||e[l]!==i[l]&&!t||t&&!G(e[l],i[l],t,n))return!1;return!0}return!1}function Vn(e,i){return e.source===i.source&&e.flags.split("").sort().join("")===i.flags.split("").sort().join("")}function Te(e){const i=typeof e;if(i==="number")return!1;if(e===void 0)return!0;if(i==="string")return e==="";if(i==="object"){if(e===null)return!0;for(const t in e)return!1;return!(e instanceof RegExp||e instanceof Date)}return!1}function Ne(e){return Object.prototype.toString.call(e)==="[object Object]"}function me(e){return Ne(e)||Array.isArray(e)}function re(e){if(Ne(e)===!1||e.__FKNode__||e.__POJO__===!1)return!1;const i=e.constructor;if(i===void 0)return!0;const t=i.prototype;return!(Ne(t)===!1||t.hasOwnProperty("isPrototypeOf")===!1)}function Ve(e,i,t=!1,n=!1){if(i===null)return null;const l={};if(typeof i=="string")return i;for(const a in e)if(O(i,a)&&(i[a]!==void 0||!n)){if(t&&Array.isArray(e[a])&&Array.isArray(i[a])){l[a]=e[a].concat(i[a]);continue}if(i[a]===void 0)continue;re(e[a])&&re(i[a])?l[a]=Ve(e[a],i[a],t,n):l[a]=i[a]}else l[a]=e[a];for(const a in i)!O(l,a)&&i[a]!==void 0&&(l[a]=i[a]);return l}function Sn(e){if(e[0]!=='"'&&e[0]!=="'"||e[0]!==e[e.length-1])return!1;const i=e[0];for(let t=1;t<e.length;t++)if(e[t]===i&&(t===1||e[t-1]!=="\\")&&t!==e.length-1)return!1;return!0}function In(e){if(!e.length)return"";let i="",t="";for(let n=0;n<e.length;n++){const l=e.charAt(n);(l!=="\\"||t==="\\")&&(i+=l),t=l}return i}function le(...e){return e.reduce((i,t)=>{const{value:n,name:l,modelValue:a,config:s,plugins:o,...f}=t;return Object.assign(i,f)},{})}function En(e){const i=[];let t="",n=0,l="",a="";for(let s=0;s<e.length;s++){const o=e.charAt(s);o===l&&a!=="\\"?l="":(o==="'"||o==='"')&&!l&&a!=="\\"?l=o:o==="("&&!l?n++:o===")"&&!l&&n--,o===","&&!l&&n===0?(i.push(t),t=""):(o!==" "||l)&&(t+=o),a=o}return t&&i.push(t),i}function ut(e,i){const t={},n=i.filter(a=>a instanceof RegExp),l=new Set(i);for(const a in e)!l.has(a)&&!n.some(s=>s.test(a))&&(t[a]=e[a]);return t}function ct(e,i){const t={},n=i.filter(l=>l instanceof RegExp);return i.forEach(l=>{l instanceof RegExp||(t[l]=e[l])}),Object.keys(e).forEach(l=>{n.some(a=>a.test(l))&&(t[l]=e[l])}),t}function Se(e){return e.replace(/-([a-z0-9])/gi,(i,t)=>t.toUpperCase())}function pt(e){return e.replace(/([a-z0-9])([A-Z])/g,(i,t,n)=>t+"-"+n.toLowerCase()).replace(" ","-").toLowerCase()}function Ln(e,i=ft){if(e!==null&&typeof e=="object"){let t;if(Array.isArray(e)?t=[...e]:re(e)&&(t={...e}),t)return Bn(e,t,i),t}return e}function be(e,i=ft){if(e===null||e instanceof RegExp||e instanceof Date||e instanceof Map||e instanceof Set||typeof File=="function"&&e instanceof File)return e;let t;Array.isArray(e)?t=e.map(n=>typeof n=="object"?be(n,i):n):t=Object.keys(e).reduce((n,l)=>(n[l]=typeof e[l]=="object"?be(e[l],i):e[l],n),{});for(const n of i)n in e&&Object.defineProperty(t,n,{enumerable:!1,value:e[n]});return t}function ie(e){return typeof e=="object"?be(e):e}function Pn(e,i){if(!e||typeof e!="object")return null;const t=i.split(".");let n=e;for(const l in t){const a=t[l];if(O(n,a)&&(n=n[a]),+l===t.length-1)return n;if(!n||typeof n!="object")return null}return null}function z(e){return e!==void 0&&e!=="false"&&e!==!1?!0:void 0}function ae(e){return Object.isFrozen(e)?e:Object.defineProperty(e,"__init",{enumerable:!1,value:!0})}function ze(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]/g," ").trim().replace(/\s+/g,"-")}function Bn(e,i,t){for(const n of t)n in e&&Object.defineProperty(i,n,{enumerable:!1,value:e[n]});return i}function vn(e){let i=!1;return(...t)=>{if(!i)return i=!0,queueMicrotask(()=>i=!1),e(...t)}}function Ue(){const e=[];let i=0;const t=l=>e.push(l),n=l=>{const a=e[i];return typeof a=="function"?a(l,s=>(i++,n(s===void 0?l:s))):(i=0,l)};return t.dispatch=n,t.unshift=l=>e.unshift(l),t.remove=l=>{const a=e.indexOf(l);a>-1&&e.splice(a,1)},t}function dt(){const e=new Map,i=new Map;let t;const n=(l,a)=>{if(t){t.set(a.name,[l,a]);return}e.has(a.name)&&e.get(a.name).forEach(s=>{(a.origin===l||s.modifiers.includes("deep"))&&s.listener(a)}),a.bubble&&l.bubble(a)};return n.flush=()=>{e.clear(),i.clear(),t==null||t.clear()},n.on=(l,a)=>{const[s,...o]=l.split("."),f=a.receipt||we(),p={modifiers:o,event:s,listener:a,receipt:f};return e.has(s)?e.get(s).push(p):e.set(s,[p]),i.has(f)?i.get(f).push(s):i.set(f,[s]),f},n.off=l=>{var a;i.has(l)&&((a=i.get(l))===null||a===void 0||a.forEach(s=>{const o=e.get(s);Array.isArray(o)&&e.set(s,o.filter(f=>f.receipt!==l))}),i.delete(l))},n.pause=l=>{t||(t=new Map),l&&l.walk(a=>a._e.pause())},n.play=l=>{if(!t)return;const a=t;t=void 0,a.forEach(([s,o])=>n(s,o)),l&&l.walk(s=>s._e.play())},n}function An(e,i,t,n,l=!0,a){return i._e(e,{payload:n,name:t,bubble:l,origin:e,meta:a}),e}function On(e,i,t){return Ee(e.parent)&&e.parent._e(e.parent,t),e}function Mn(e,i,t,n){return i._e.on(t,n)}function Dn(e,i,t){return i._e.off(t),e}const Ke=Ue();Ke((e,i)=>(e.message||(e.message=`E${e.code}`),i(e)));const We=Ue();We((e,i)=>{e.message||(e.message=`W${e.code}`);const t=i(e);return console&&typeof console.warn=="function"&&console.warn(t.message),t});function ye(e,i={}){We.dispatch({code:e,data:i})}function T(e,i={}){throw Error(Ke.dispatch({code:e,data:i}).message)}function ee(e,i){const t={blocking:!1,key:we(),meta:{},type:"state",visible:!0,...e};return i&&t.value&&t.meta.localize!==!1&&(t.value=i.t(t),t.meta.locale=i.config.locale),t}const mt={apply:Nn,set:jn,remove:bt,filter:Fn,reduce:Tn,release:Kn,touch:xn};function Rn(e=!1){const i={};let t,n=e,l=[];const a=new Map;let s;const o=new Proxy(i,{get(...f){const[p,g]=f;return g==="buffer"?n:g==="_b"?l:g==="_m"?a:g==="_r"?s:O(mt,g)?mt[g].bind(null,i,o,t):Reflect.get(...f)},set(f,p,g){return p==="_n"?(t=g,s==="__n"&&yt(t,o),!0):p==="_b"?(l=g,!0):p==="buffer"?(n=g,!0):p==="_r"?(s=g,!0):(T(101,t),!1)}});return o}function jn(e,i,t,n){if(i.buffer)return i._b.push([[n]]),i;if(e[n.key]!==n){if(typeof n.value=="string"&&n.meta.localize!==!1){const a=n.value;n.value=t.t(n),n.value!==a&&(n.meta.locale=t.props.locale)}const l=`message-${O(e,n.key)?"updated":"added"}`;e[n.key]=Object.freeze(t.hook.message.dispatch(n)),t.emit(l,n)}return i}function xn(e,i){for(const t in e){const n={...e[t]};i.set(n)}}function bt(e,i,t,n){if(O(e,n)){const l=e[n];delete e[n],t.emit("message-removed",l)}return i.buffer===!0&&(i._b=i._b.filter(l=>(l[0]=l[0].filter(a=>a.key!==n),l[1]||l[0].length))),i}function Fn(e,i,t,n,l){for(const a in e){const s=e[a];(!l||s.type===l)&&!n(s)&&bt(e,i,t,a)}}function Tn(e,i,t,n,l){for(const a in e){const s=e[a];l=n(l,s)}return l}function Nn(e,i,t,n,l){if(Array.isArray(n)){if(i.buffer){i._b.push([n,l]);return}const a=new Set(n.map(s=>(i.set(s),s.key)));typeof l=="string"?i.filter(s=>s.type!==l||a.has(s.key)):typeof l=="function"&&i.filter(s=>!l(s)||a.has(s.key))}else for(const a in n){const s=t.at(a);s?s.store.apply(n[a],l):Un(t,i,a,n[a],l)}}function zn(e,...i){const t=`${e.name}-set`,n=l=>ee({key:ze(l),type:"error",value:l,meta:{source:t,autoClear:!0}});return i.filter(l=>!!l).map(l=>{if(typeof l=="string"&&(l=[l]),Array.isArray(l))return l.map(a=>n(a));{const a={};for(const s in l)Array.isArray(l[s])?a[s]=l[s].map(o=>n(o)):a[s]=[n(l[s])];return a}})}function Un(e,i,t,n,l){var a;const s=i._m;s.has(t)||s.set(t,[]),i._r||(i._r=yt(e,i)),(a=s.get(t))===null||a===void 0||a.push([n,l])}function yt(e,i){return e.on("child.deep",({payload:t})=>{i._m.forEach((n,l)=>{e.at(l)===t&&(n.forEach(([a,s])=>{t.store.apply(a,s)}),i._m.delete(l))}),i._m.size===0&&i._r&&(e.off(i._r),i._r=void 0)})}function Kn(e,i){i.buffer=!1,i._b.forEach(([t,n])=>i.apply(t,n)),i._b=[]}function Wn(){const e={};let i;return{count:(...t)=>Hn(i,e,...t),init(t){i=t,t.on("message-added.deep",_t(e,1)),t.on("message-removed.deep",_t(e,-1))},merge:t=>gt(i,e,t),settled(t){return O(e,t)?e[t].promise:Promise.resolve()},unmerge:t=>gt(i,e,t,!0),value(t){return O(e,t)?e[t].count:0}}}function Hn(e,i,t,n,l=0){if(n=qn(n||t),!O(i,t)){const a={condition:n,count:0,name:t,node:e,promise:Promise.resolve(),resolve:()=>{}};i[t]=a,l=e.store.reduce((s,o)=>s+a.condition(o)*1,l),e.each(s=>{s.ledger.count(a.name,a.condition),l+=s.ledger.value(a.name)})}return ht(i[t],l).promise}function qn(e){return typeof e=="function"?e:i=>i.type===e}function ht(e,i){const t=e.count,n=e.count+i;return e.count=n,t===0&&n!==0?(e.node.emit(`unsettled:${e.name}`,e.count,!1),e.promise=new Promise(l=>e.resolve=l)):t!==0&&n===0&&(e.node.emit(`settled:${e.name}`,e.count,!1),e.resolve()),e.node.emit(`count:${e.name}`,e.count,!1),e}function _t(e,i){return t=>{for(const n in e){const l=e[n];l.condition(t.payload)&&ht(l,i)}}}function gt(e,i,t,n=!1){const l=e;for(const a in i){const s=i[a].condition;n||t.ledger.count(a,s);const o=t.ledger.value(a)*(n?-1:1);if(e){do e.ledger.count(a,s,o),e=e.parent;while(e);e=l}}}const He=new Map,Ie=new Map,qe=dt(),Zn=[];function Jn(e){e.props.id&&(He.set(e.props.id,e),Ie.set(e,e.props.id),qe(e,{payload:e,name:e.props.id,bubble:!1,origin:e}))}function Yn(e){if(Ie.has(e)){const i=Ie.get(e);Ie.delete(e),He.delete(i),qe(e,{payload:null,name:i,bubble:!1,origin:e})}}function $t(e){return He.get(e)}function Qn(e,i){Zn.push(qe.on(e,i))}function kt(e,i,t){let n=!0;return i in e.config._t?n=!1:e.emit(`config:${i}`,t,!1),i in e.props||(e.emit("prop",{prop:i,value:t}),e.emit(`prop:${i}`,t)),n}function Xn(e){const i=document.getElementById(e);if(i instanceof HTMLFormElement){const t=new Event("submit",{cancelable:!0,bubbles:!0});i.dispatchEvent(t);return}ye(151,e)}function Gn(e){const i=t=>{for(const n in t.store){const l=t.store[n];l.type==="error"||l.type==="ui"&&n==="incomplete"?t.store.remove(n):l.type==="state"&&t.store.set({...l,value:!1})}};i(e),e.walk(i)}function ei(e,i){const t=typeof e=="string"?$t(e):e;if(t){const n=s=>ie(s.props.initial)||(s.type==="group"?{}:s.type==="list"?[]:void 0);t._e.pause(t);const l=ie(i);return i&&!Te(i)&&(t.props.initial=me(l)?ae(l):l,t.props._init=t.props.initial),t.input(n(t),!1),t.walk(s=>{s.type==="list"&&s.sync||s.input(n(s),!1)}),t.input(Te(l)&&l?l:n(t),!1),t.type!=="input"&&i&&!Te(i)&&me(i)&&t.walk(s=>{s.props.initial=me(s.value)?ae(s.value):s.value,s.props._init=t.props.initial}),t._e.play(t),Gn(t),t.emit("reset",t),t}ye(152,e)}const ti={delimiter:".",delay:0,locale:"en",rootClasses:e=>({[`formkit-${pt(e)}`]:!0})},Ct=Symbol("index"),Ze=Symbol("removed"),Je=Symbol("moved"),wt=Symbol("inserted");function ni(e){return e.type==="list"&&Array.isArray(e._value)}function Ee(e){return e&&typeof e=="object"&&e.__FKNode__===!0}const Le=(e,i,t)=>{T(102,[e,t])},ii={_c:I(Vi,Le,!1),add:I(yi),addProps:I(bi),address:I(Ii,Le,!1),at:I(Ei),bubble:I(On),clearErrors:I(Di),calm:I(pi),config:I(!1),define:I(mi),disturb:I(ci),destroy:I(di),extend:I(xi),hydrate:I(fi),index:I(wi,Ci,!1),input:I(It),each:I(gi),emit:I(An),find:I(Pi),on:I(Mn),off:I(Dn),parent:I(!1,hi),plugins:I(!1),remove:I(_i),root:I(vi,Le,!1),reset:I(Mi),resetConfig:I(ki),setErrors:I(Pt),submit:I(Oi),t:I(Ai),use:I(Ye),name:I(Si,!1,!1),walk:I($i)};function ri(){return new Map(Object.entries(ii))}function I(e,i,t=!0){return{get:e?(n,l)=>t?(...a)=>e(n,l,...a):e(n,l):!1,set:i!==void 0?i:Le.bind(null)}}function li(){const e=new Map;return new Proxy(e,{get(i,t){return e.has(t)||e.set(t,Ue()),e.get(t)}})}let Vt=0,ai=0;function si(e){var i,t;return((i=e.parent)===null||i===void 0?void 0:i.type)==="list"?Ct:e.name||`${((t=e.props)===null||t===void 0?void 0:t.type)||"input"}_${++Vt}`}function St(e){return e.type==="group"?ae(e.value&&typeof e.value=="object"&&!Array.isArray(e.value)?e.value:{}):e.type==="list"?ae(Array.isArray(e.value)?e.value:[]):e.value}function It(e,i,t,n=!0){return i._value=oi(e,e.hook.input.dispatch(t)),e.emit("input",i._value),e.isCreated&&e.type==="input"&&G(i._value,i.value)?(e.emit("commitRaw",i.value),i.settled):(i.isSettled&&e.disturb(),n?(i._tmo&&clearTimeout(i._tmo),i._tmo=setTimeout(Pe,e.props.delay,e,i)):Pe(e,i),i.settled)}function oi(e,i){switch(e.type){case"input":break;case"group":(!i||typeof i!="object")&&T(107,[e,i]);break;case"list":Array.isArray(i)||T(108,[e,i]);break}return i}function Pe(e,i,t=!0,n=!0){i._value=i.value=e.hook.commit.dispatch(i._value),e.type!=="input"&&n&&e.hydrate(),e.emit("commitRaw",i.value),e.emit("commit",i.value),t&&e.calm()}function Et(e,{name:i,value:t,from:n}){if(!Object.isFrozen(e._value)){if(ni(e)){const l=t===Ze?[]:t===Je&&typeof n=="number"?e._value.splice(n,1):[t];e._value.splice(i,t===Je||n===wt?0:1,...l);return}t!==Ze?e._value[i]=t:delete e._value[i]}}function fi(e,i){const t=i._value;return e.type==="list"&&e.sync&&ui(e,i),i.children.forEach(n=>{if(typeof t=="object")if(n.name in t){const l=n.type!=="input"||t[n.name]&&typeof t[n.name]=="object"?ae(t[n.name]):t[n.name];if(!n.isSettled||!me(l)&&G(l,n._value))return;n.input(l,!1)}else(e.type!=="list"||typeof n.name=="number")&&Et(i,{name:n.name,value:n.value}),t.__init||(n.type==="group"?n.input({},!1):n.type==="list"?n.input([],!1):n.input(void 0,!1))}),e}function ui(e,i){const t=e._value;if(!Array.isArray(t))return;const n=[],l=new Set(i.children),a=new Map;t.forEach((o,f)=>{if(i.children[f]&&i.children[f]._value===o)n.push(i.children[f]),l.delete(i.children[f]);else{n.push(null);const p=a.get(o)||[];p.push(f),a.set(o,p)}}),l.size&&a.size&&l.forEach(o=>{if(a.has(o._value)){const f=a.get(o._value),p=f.shift();n[p]=o,l.delete(o),f.length||a.delete(o._value)}});const s=[];for(a.forEach(o=>{s.push(...o)});l.size&&s.length;){const o=l.values().next().value,f=s.shift();if(f===void 0)break;n[f]=o,l.delete(o)}s.forEach((o,f)=>{n[o]=zi({value:f})}),l.size&&l.forEach(o=>{if(!("__FKP"in o)){const f=o._c.parent;if(!f||Ui(f))return;f.ledger.unmerge(o),o._c.parent=null,o.destroy()}}),i.children=n}function ci(e,i){var t;return i._d<=0&&(i.isSettled=!1,e.emit("settled",!1,!1),i.settled=new Promise(n=>{i._resolve=n}),e.parent&&((t=e.parent)===null||t===void 0||t.disturb())),i._d++,e}function pi(e,i,t){var n;if(t!==void 0&&e.type!=="input")return Et(i,t),Pe(e,i,!0,!1);i._d>0&&i._d--,i._d===0&&(i.isSettled=!0,e.emit("settled",!0,!1),e.parent&&((n=e.parent)===null||n===void 0||n.calm({name:e.name,value:i.value})),i._resolve&&i._resolve(i.value))}function di(e,i){e.emit("destroying",e),e.store.filter(()=>!1),e.parent&&(e.parent.emit("childRemoved",e),e.parent.remove(e)),Yn(e),e.emit("destroyed",e),i._e.flush(),i._value=i.value=void 0;for(const t in i.context)delete i.context[t];i.plugins.clear(),i.context=null}function mi(e,i,t){i.type=t.type,i.props.definition=be(t),i.value=i._value=St({type:e.type,value:i.value}),t.forceTypeProp&&(e.props.type&&(e.props.originalType=e.props.type),i.props.type=t.forceTypeProp),t.family&&(i.props.family=t.family),t.features&&t.features.forEach(n=>n(e)),t.props&&e.addProps(t.props),e.emit("defined",t)}function bi(e,i,t){var n;if(e.props.attrs){const l={...e.props.attrs};e.props._emit=!1;for(const s in l){const o=Se(s);t.includes(o)&&(e.props[o]=l[s],delete l[s])}const a=ie(i._value);e.props.initial=e.type!=="input"?ae(a):a,e.props._emit=!0,e.props.attrs=l,e.props.definition&&(e.props.definition.props=[...((n=e.props.definition)===null||n===void 0?void 0:n.props)||[],...t])}return e.emit("added-props",t),e}function yi(e,i,t,n){if(e.type==="input"&&T(100,e),t.parent&&t.parent!==e&&t.parent.remove(t),!i.children.includes(t)){if(n!==void 0&&e.type==="list"){const l=i.children[n];l&&"__FKP"in l?(t._c.uid=l.uid,i.children.splice(n,1,t)):i.children.splice(n,0,t),Array.isArray(e.value)&&e.value.length<i.children.length&&e.disturb().calm({name:n,value:t.value,from:wt})}else i.children.push(t);t.isSettled||e.disturb()}if(t.parent!==e){if(t.parent=e,t.parent!==e)return e.remove(t),t.parent.add(t),e}else t.use(e.plugins);return Pe(e,i,!1),e.ledger.merge(t),e.emit("child",t),e}function hi(e,i,t,n){return Ee(n)?(e.parent&&e.parent!==n&&e.parent.remove(e),i.parent=n,e.resetConfig(),n.children.includes(e)?e.use(n.plugins):n.add(e),!0):n===null?(i.parent=null,!0):!1}function _i(e,i,t){const n=i.children.indexOf(t);if(n!==-1){t.isSettled&&e.disturb(),i.children.splice(n,1);let l=z(t.props.preserve),a=t.parent;for(;l===void 0&&a;)l=z(a.props.preserve),a=a.parent;l?e.calm():e.calm({name:e.type==="list"?n:t.name,value:Ze}),t.parent=null,t.config._rmn=t}return e.ledger.unmerge(t),e}function gi(e,i,t){i.children.forEach(n=>!("__FKP"in n)&&t(n))}function $i(e,i,t,n=!1,l=!1){i.children.some(a=>{if("__FKP"in a)return!1;const s=t(a);return n&&s===!1?!0:l&&s===!1?!1:a.walk(t,n,l)})}function ki(e,i){const t=e.parent||void 0;i.config=Lt(e.config._t,t),e.walk(n=>n.resetConfig())}function Ye(e,i,t,n=!0,l=!0){return Array.isArray(t)||t instanceof Set?(t.forEach(a=>Ye(e,i,a)),e):(i.plugins.has(t)||(l&&typeof t.library=="function"&&t.library(e),n&&t(e)!==!1&&(i.plugins.add(t),e.children.forEach(a=>a.use(t)))),e)}function Ci(e,i,t,n){if(Ee(e.parent)){const l=e.parent.children,a=n>=l.length?l.length-1:n<0?0:n,s=l.indexOf(e);return s===-1?!1:(l.splice(s,1),l.splice(a,0,e),e.parent.children=l,e.parent.type==="list"&&e.parent.disturb().calm({name:a,value:Je,from:s}),!0)}return!1}function wi(e){if(e.parent){const i=[...e.parent.children].indexOf(e);return i===-1?e.parent.children.length:i}return-1}function Vi(e,i){return i}function Si(e,i){var t;return((t=e.parent)===null||t===void 0?void 0:t.type)==="list"?e.index:i.name!==Ct?i.name:e.index}function Ii(e,i){return i.parent?i.parent.address.concat([e.name]):[e.name]}function Ei(e,i,t){const n=typeof t=="string"?t.split(e.config.delimiter):t;if(!n.length)return;const l=n[0];let a=e.parent;for(a||(String(n[0])===String(e.name)&&n.shift(),a=e),l==="$parent"&&n.shift();a&&n.length;){const s=n.shift();switch(s){case"$root":a=e.root;break;case"$parent":a=a.parent;break;case"$self":a=e;break;default:a=a.children.find(o=>!("__FKP"in o)&&String(o.name)===String(s))||Li(a,s)}}return a||void 0}function Li(e,i){const t=String(i).match(/^(find)\((.*)\)$/);if(t){const[,n,l]=t,a=l.split(",").map(s=>s.trim());switch(n){case"find":return e.find(a[0],a[1]);default:return}}}function Pi(e,i,t,n){return Bi(e,t,n)}function Bi(e,i,t="name"){const n=typeof t=="string"?a=>a[t]==i:t,l=[e];for(;l.length;){const a=l.shift();if(!("__FKP"in a)){if(n(a,i))return a;l.push(...a.children)}}}function vi(e){let i=e;for(;i.parent;)i=i.parent;return i}function Lt(e={},i){let t;return new Proxy(e,{get(...n){const l=n[1];if(l==="_t")return e;const a=Reflect.get(...n);if(a!==void 0)return a;if(i){const s=i.config[l];if(s!==void 0)return s}if(e.rootConfig&&typeof l=="string"){const s=e.rootConfig[l];if(s!==void 0)return s}return l==="delay"&&(t==null?void 0:t.type)==="input"?20:ti[l]},set(...n){const l=n[1],a=n[2];if(l==="_n")return t=a,e.rootConfig&&e.rootConfig._add(t),!0;if(l==="_rmn")return e.rootConfig&&e.rootConfig._rm(t),t=void 0,!0;if(!G(e[l],a,!1)){const s=Reflect.set(...n);return t&&(t.emit(`config:${l}`,a,!1),kt(t,l,a),t.walk(o=>kt(o,l,a),!1,!0)),s}return!0}})}function Ai(e,i,t,n="ui"){const l=typeof t=="string"?{key:t,value:t,type:n}:t,a=e.hook.text.dispatch(l);return e.emit("text",a,!1),a.value}function Oi(e){const i=e.name;do{if(e.props.isForm===!0)break;e.parent||T(106,i),e=e.parent}while(e);e.props.id&&Xn(e.props.id)}function Mi(e,i,t){return ei(e,t)}function Pt(e,i,t,n){const l=`${e.name}-set`,a=e.hook.setErrors.dispatch({localErrors:t,childErrors:n});return zn(e,a.localErrors,a.childErrors).forEach(s=>{e.store.apply(s,o=>o.meta.source===l)}),e}function Di(e,i,t=!0,n){return Pt(e,i,[]),t&&(n=n||`${e.name}-set`,e.walk(l=>{l.store.filter(a=>!(a.type==="error"&&a.meta&&a.meta.source===n))})),e}function Ri(e){return O(e.props,"id")||(e.props.id=`input_${ai++}`),e}function ji(e){const i={initial:typeof e=="object"?ie(e):e};let t,n=!0;return new Proxy(i,{get(...l){const[a,s]=l;if(O(i,s))return Reflect.get(...l);if(t&&typeof s=="string"&&t.config[s]!==void 0)return t.config[s]},set(l,a,s,o){if(a==="_n")return t=s,!0;if(a==="_emit")return n=s,!0;const{prop:f,value:p}=t.hook.prop.dispatch({prop:a,value:s});if(!G(i[f],p,!1)||typeof p=="object"){const g=Reflect.set(l,f,p,o);return n&&(t.emit("prop",{prop:f,value:p}),typeof f=="string"&&t.emit(`prop:${f}`,p)),g}return!0}})}function xi(e,i,t,n){return i.traps.set(t,n),e}function Fi(e,i){if(e.props.definition)return e.define(e.props.definition);for(const t of i){if(e.props.definition)return;typeof t.library=="function"&&t.library(e)}}function Ti(e){const i=St(e),t=Lt(e.config||{},e.parent);return{_d:0,_e:dt(),uid:Symbol(),_resolve:!1,_tmo:!1,_value:i,children:wn(e.children||[]),config:t,hook:li(),isCreated:!1,isSettled:!0,ledger:Wn(),name:si(e),parent:e.parent||null,plugins:new Set,props:ji(i),settled:Promise.resolve(i),store:Rn(!0),sync:e.sync||!1,traps:ri(),type:e.type||"input",value:i}}function Ni(e,i){var t;if(e.ledger.init(e.store._n=e.props._n=e.config._n=e),e.props._emit=!1,i.props&&Object.assign(e.props,i.props),e.props._emit=!0,Fi(e,new Set([...i.plugins||[],...e.parent?e.parent.plugins:[]])),i.plugins)for(const n of i.plugins)Ye(e,e._c,n,!0,!1);return Ri(e),e.each(n=>e.add(n)),e.parent&&e.parent.add(e,i.index),e.type==="input"&&e.children.length&&T(100,e),It(e,e._c,e._value,!1),e.store.release(),!((t=i.props)===null||t===void 0)&&t.id&&Jn(e),e.emit("created",e),e.isCreated=!0,e}function zi(e){var i,t,n,l;return{__FKP:!0,uid:Symbol(),name:(i=e==null?void 0:e.name)!==null&&i!==void 0?i:`p_${Vt++}`,value:(t=e==null?void 0:e.value)!==null&&t!==void 0?t:null,_value:(n=e==null?void 0:e.value)!==null&&n!==void 0?n:null,type:(l=e==null?void 0:e.type)!==null&&l!==void 0?l:"input",use:()=>{},input(a){return this._value=a,this.value=a,Promise.resolve()},isSettled:!0}}function Ui(e){return"__FKP"in e}function Ki(e){const i=e||{},t=Ti(i),n=new Proxy(t,{get(...l){const[,a]=l;if(a==="__FKNode__")return!0;const s=t.traps.get(a);return s&&s.get?s.get(n,t):Reflect.get(...l)},set(...l){const[,a,s]=l,o=t.traps.get(a);return o&&o.set?o.set(n,t,a,s):Reflect.set(...l)}});return Ni(n,i)}function Qe(e){return typeof e!="string"&&O(e,"$el")}function Xe(e){return typeof e!="string"&&O(e,"$cmp")}function se(e){return!e||typeof e=="string"?!1:O(e,"if")&&O(e,"then")}function Wi(e){return typeof e!="string"&&"$formkit"in e}function Hi(e){if(typeof e=="string")return{$el:"text",children:e};if(Wi(e)){const{$formkit:i,for:t,if:n,children:l,bind:a,...s}=e;return Object.assign({$cmp:"FormKit",props:{...s,type:i}},n?{if:n}:{},t?{for:t}:{},l?{children:l}:{},a?{bind:a}:{})}return e}function U(e){let i;const t=new Set,n=function(d,m){return typeof d=="function"?d(m):d},l=[{"&&":(c,d,m)=>n(c,m)&&n(d,m),"||":(c,d,m)=>n(c,m)||n(d,m)},{"===":(c,d,m)=>n(c,m)===n(d,m),"!==":(c,d,m)=>n(c,m)!==n(d,m),"==":(c,d,m)=>n(c,m)==n(d,m),"!=":(c,d,m)=>n(c,m)!=n(d,m),">=":(c,d,m)=>n(c,m)>=n(d,m),"<=":(c,d,m)=>n(c,m)<=n(d,m),">":(c,d,m)=>n(c,m)>n(d,m),"<":(c,d,m)=>n(c,m)<n(d,m)},{"+":(c,d,m)=>n(c,m)+n(d,m),"-":(c,d,m)=>n(c,m)-n(d,m)},{"*":(c,d,m)=>n(c,m)*n(d,m),"/":(c,d,m)=>n(c,m)/n(d,m),"%":(c,d,m)=>n(c,m)%n(d,m)}],a=l.reduce((c,d)=>c.concat(Object.keys(d)),[]),s=new Set(a.map(c=>c.charAt(0)));function o(c,d,m,y){const $=c.filter(h=>h.startsWith(d));return $.length?$.find(h=>y.length>=m+h.length&&y.substring(m,m+h.length)===h?h:!1):!1}function f(c,d,m=1){let y=m?d.substring(c+1).trim():d.substring(0,c).trim();if(!y.length)return-1;if(!m){const h=y.split("").reverse(),C=h.findIndex(u=>s.has(u));y=h.slice(C).join("")}const $=y[0];return l.findIndex(h=>{const C=Object.keys(h);return!!o(C,$,0,y)})}function p(c,d){let m="";const y=d.length;let $=0;for(let h=c;h<y;h++){const C=d.charAt(h);if(C==="(")$++;else if(C===")")$--;else if($===0&&C===" ")continue;if($===0&&o(a,C,h,d))return[m,h-1];m+=C}return[m,d.length-1]}function g(c,d=0){const m=l[d],y=c.length,$=Object.keys(m);let h=0,C=!1,u=null,b="",w=null,E,D="",S="",A="",B="",x=0;const N=(v,F)=>{v?A+=F:b+=F};for(let v=0;v<y;v++)if(D=S,S=c.charAt(v),(S==="'"||S==='"')&&D!=="\\"&&(h===0&&!C||h&&!B)){h?B=S:C=S,N(h,S);continue}else if(C&&(S!==C||D==="\\")||B&&(S!==B||D==="\\")){N(h,S);continue}else if(C===S){C=!1,N(h,S);continue}else if(B===S){B=!1,N(h,S);continue}else{if(S===" ")continue;if(S==="(")h===0?x=v:A+=S,h++;else if(S===")")if(h--,h===0){const F=typeof b=="string"&&b.startsWith("$")?b:void 0,ke=F&&c.charAt(v+1)===".";let ne="";ke&&([ne,v]=p(v+2,c));const Fe=u?d:f(x,c,0),Ce=f(v,c);Fe===-1&&Ce===-1?(b=L(A,-1,F,ne),typeof b=="string"&&(b=A)):u&&(Fe>=Ce||Ce===-1)&&d===Fe?(w=u.bind(null,L(A,-1,F,ne)),u=null,b=""):Ce>Fe&&d===Ce?b=L(A,-1,F,ne):b+=`(${A})${ke?`.${ne}`:""}`,A=""}else A+=S;else if(h===0&&(E=o($,S,v,c))){v===0&&T(103,[E,c]),v+=E.length-1,v===c.length-1&&T(104,[E,c]),u?b&&(w=u.bind(null,L(b,d)),u=m[E].bind(null,w),b=""):w?(u=m[E].bind(null,L(w,d)),w=null):(u=m[E].bind(null,L(b,d)),b="");continue}else N(h,S)}return b&&u&&(u=u.bind(null,L(b,d))),u=!u&&w?w:u,!u&&b&&(u=(v,F)=>typeof v=="function"?v(F):v,u=u.bind(null,L(b,d))),!u&&!b&&T(105,c),u}function L(c,d,m,y){if(m){const $=L(m,l.length);let h,C=y?U(`$${y}`):!1;if(typeof $=="function"){const u=En(String(c)).map(b=>L(b,-1));return b=>{const w=$(b);return typeof w!="function"?(ye(150,m),w):(h=w(...u.map(E=>typeof E=="function"?E(b):E)),C&&(C=C.provide(E=>{const D=i(E);return E.reduce((A,B)=>{if(B===y||(y==null?void 0:y.startsWith(`${B}(`))){const N=Pn(h,B);A[B]=()=>N}else A[B]=D[B];return A},{})})),C?C():h)}}}else if(typeof c=="string"){if(c==="true")return!0;if(c==="false")return!1;if(c==="undefined")return;if(Sn(c))return In(c.substring(1,c.length-1));if(!isNaN(+c))return Number(c);if(d<l.length-1)return g(c,d+1);if(c.startsWith("$")){const $=c.substring(1);return t.add($),function(C){return $ in C?C[$]():void 0}}return c}return c}const K=g(e.startsWith("$:")?e.substring(2):e),k=Array.from(t);function _(c){return i=c,Object.assign(K.bind(null,c(k)),{provide:_})}return Object.assign(K,{provide:_})}const Bt="0.18.3";function qi(e){let i=1;return Array.isArray(e)?e.map(t=>typeof t=="string"||typeof t=="number"?{label:String(t),value:String(t)}:(typeof t=="object"&&"value"in t&&typeof t.value!="string"&&Object.assign(t,{value:`__mask_${i++}`,__original:t.value}),t)):Object.keys(e).map(t=>({label:e[t],value:t}))}function oe(e,i){if(Array.isArray(e)){for(const t of e)if(i==t.value)return"__original"in t?t.__original:t.value}return i}function fe(e,i){return e===null&&i===void 0||e===void 0&&i===null?!1:e==i?!0:re(e)&&re(i)?G(e,i):!1}function Ge(e){e.hook.prop((i,t)=>(i.prop==="options"&&(typeof i.value=="function"?(e.props.optionsLoader=i.value,i.value=[]):i.value=qi(i.value)),t(i)))}function V(e,i,t=!1){return(...n)=>{const l=a=>{const s=!i||typeof i=="string"?{$el:i}:i();return(Qe(s)||Xe(s))&&(s.meta||(s.meta={section:e}),n.length&&!s.children&&(s.children=[...n.map(o=>typeof o=="string"?o:o(a))]),Qe(s)&&(s.attrs={class:`$classes.${e}`,...s.attrs||{}})),{if:`$slots.${e}`,then:`$slots.${e}`,else:e in a?he(s,a[e]):s}};return l._s=e,t?Zi(l):l}}function Zi(e){return i=>[e(i)]}function Be(e){return typeof e=="object"&&("$el"in e||"$cmp"in e||"$formkit"in e)}function he(e,i={}){return typeof e=="string"?Be(i)||typeof i=="string"?i:e:Array.isArray(e)?Be(i)?i:e:Ve(e,i)}const te=V("outer",()=>({$el:"div",attrs:{key:"$id","data-family":"$family || undefined","data-type":"$type","data-multiple":'$attrs.multiple || ($type != "select" && $options != undefined) || undefined',"data-disabled":'$: ($disabled !== "false" && $disabled) || undefined',"data-empty":"$state.empty || undefined","data-complete":"$state.complete || undefined","data-invalid":"$state.valid === false && $state.validationVisible || undefined","data-errors":"$state.errors || undefined","data-submitted":"$state.submitted || undefined","data-prefix-icon":"$_rawPrefixIcon !== undefined || undefined","data-suffix-icon":"$_rawSuffixIcon !== undefined || undefined","data-prefix-icon-click":"$onPrefixIconClick !== undefined || undefined","data-suffix-icon-click":"$onSuffixIconClick !== undefined || undefined"}})),Z=V("inner","div"),ue=V("wrapper","div"),_e=V("label",()=>({$el:"label",if:"$label",attrs:{for:"$id"}})),J=V("messages",()=>({$el:"ul",if:"$defaultMessagePlacement && $fns.length($messages)"})),Y=V("message",()=>({$el:"li",for:["message","$messages"],attrs:{key:"$message.key",id:"$id + '-' + $message.key","data-message-type":"$message.type"}})),W=V("prefix",null),H=V("suffix",null),q=V("help",()=>({$el:"div",if:"$help",attrs:{id:'$: "help-" + $id'}})),vt=V("fieldset",()=>({$el:"fieldset",attrs:{id:"$id","aria-describedby":{if:"$help",then:'$: "help-" + $id',else:void 0}}})),ve=V("decorator",()=>({$el:"span",attrs:{"aria-hidden":"true"}})),Ae=V("input",()=>({$el:"input",bind:"$attrs",attrs:{type:"$type",name:"$node.props.altName || $node.name",disabled:"$option.attrs.disabled || $disabled",onInput:"$handlers.toggleChecked",checked:"$fns.eq($_value, $onValue)",onBlur:"$handlers.blur",value:"$: true",id:"$id","aria-describedby":{if:"$options.length",then:{if:"$option.help",then:'$: "help-" + $option.attrs.id',else:void 0},else:{if:"$help",then:'$: "help-" + $id',else:void 0}}}})),At=V("legend",()=>({$el:"legend",if:"$label"})),Ot=V("option",()=>({$el:"li",for:["option","$options"],attrs:{"data-disabled":"$option.attrs.disabled || $disabled"}})),Mt=V("options","ul"),Oe=V("wrapper",()=>({$el:"label",attrs:{"data-disabled":{if:"$options.length",then:void 0,else:"$disabled || undefined"},"data-checked":{if:"$options == undefined",then:"$fns.eq($_value, $onValue) || undefined",else:"$fns.isChecked($option.value) || undefined"}}})),Dt=V("optionHelp",()=>({$el:"div",if:"$option.help",attrs:{id:'$: "help-" + $option.attrs.id'}})),Me=V("label","span"),Ji=V("input",()=>({$el:"button",bind:"$attrs",attrs:{type:"$type",disabled:"$disabled",name:"$node.name",id:"$id"}})),Yi=V("default",null),Qi=V("input",()=>({$el:"input",bind:"$attrs",attrs:{type:"file",disabled:"$disabled",name:"$node.name",onChange:"$handlers.files",onBlur:"$handlers.blur",id:"$id","aria-describedby":"$describedBy"}})),Xi=V("fileItem",()=>({$el:"li",for:["file","$value"]})),Gi=V("fileList",()=>({$el:"ul",if:"$value.length",attrs:{"data-has-multiple":{if:"$value.length > 1",then:"true"}}})),er=V("fileName",()=>({$el:"span",attrs:{class:"$classes.fileName"}})),Rt=V("fileRemove",()=>({$el:"button",attrs:{onClick:"$handlers.resetFiles"}})),tr=V("noFiles",()=>({$el:"span",if:"$value.length == 0"})),nr=V("form",()=>({$el:"form",bind:"$attrs",attrs:{id:"$id",name:"$node.name",onSubmit:"$handlers.submit","data-loading":"$state.loading || undefined"}})),ir=V("actions",()=>({$el:"div",if:"$actions"})),rr=V("submit",()=>({$cmp:"FormKit",bind:"$submitAttrs",props:{type:"submit",disabled:"$disabled",label:"$submitLabel"}})),jt=V("input",()=>({$el:"input",bind:"$attrs",attrs:{type:"$type",disabled:"$disabled",name:"$node.name",onInput:"$handlers.DOMInput",onBlur:"$handlers.blur",value:"$_value",id:"$id","aria-describedby":"$describedBy"}})),xt=V("wrapper",null,!0),lr=V("input",()=>({$el:"select",bind:"$attrs",attrs:{id:"$id","data-placeholder":"$fns.showPlaceholder($_value, $placeholder)",disabled:"$disabled",class:"$classes.input",name:"$node.name",onChange:"$handlers.onChange",onInput:"$handlers.selectInput",onBlur:"$handlers.blur","aria-describedby":"$describedBy"}})),ar=V("option",()=>({$el:"option",for:["option","$options"],bind:"$option.attrs",attrs:{class:"$classes.option",value:"$option.value",selected:"$fns.isSelected($option)"}})),sr=()=>({$el:null,if:"$options.length",for:["option","$options"],children:"$slots.option"}),or=V("input",()=>({$el:"textarea",bind:"$attrs",attrs:{disabled:"$disabled",name:"$node.name",onInput:"$handlers.DOMInput",onBlur:"$handlers.blur",value:"$_value",id:"$id","aria-describedby":"$describedBy"},children:"$initialValue"})),R=(e,i)=>V(`${e}Icon`,()=>{const t=`_raw${e.charAt(0).toUpperCase()}${e.slice(1)}Icon`;return{if:`$${e}Icon && $${t}`,$el:`${i||"span"}`,attrs:{class:`$classes.${e}Icon + " " + $classes.icon`,innerHTML:`$${t}`,onClick:`$handlers.iconClick(${e})`,for:{if:`${i==="label"}`,then:"$id"}}}})();function Ft(e){return function(i,t){return i.prop==="options"&&Array.isArray(i.value)&&(i.value=i.value.map(n=>{var l;return!((l=n.attrs)===null||l===void 0)&&l.id?n:Ve(n,{attrs:{id:`${e.name}-option-${ze(String(n.value))}`}})}),e.props.type==="checkbox"&&!Array.isArray(e.value)&&(e.isCreated?e.input([],!1):e.on("created",()=>{Array.isArray(e.value)||e.input([],!1)}))),t(i)}}function fr(e,i){const t=i.target;if(t instanceof HTMLInputElement){const n=Array.isArray(e.props.options)?oe(e.props.options,t.value):t.value;Array.isArray(e.props.options)&&e.props.options.length?Array.isArray(e._value)?e._value.some(l=>fe(n,l))?e.input(e._value.filter(l=>!fe(n,l))):e.input([...e._value,n]):e.input([n]):t.checked?e.input(e.props.onValue):e.input(e.props.offValue)}}function ur(e,i){var t,n;return(t=e.context)===null||t===void 0||t.value,(n=e.context)===null||n===void 0||n._value,Array.isArray(e._value)?e._value.some(l=>fe(oe(e.props.options,i),l)):!1}function cr(e){e.on("created",()=>{var i,t;!((i=e.context)===null||i===void 0)&&i.handlers&&(e.context.handlers.toggleChecked=fr.bind(null,e)),!((t=e.context)===null||t===void 0)&&t.fns&&(e.context.fns.isChecked=ur.bind(null,e)),O(e.props,"onValue")||(e.props.onValue=!0),O(e.props,"offValue")||(e.props.offValue=!1)}),e.hook.prop(Ft(e))}function et(e){e.on("created",()=>{"disabled"in e.props&&(e.props.disabled=z(e.props.disabled),e.config.disabled=z(e.props.disabled))}),e.hook.prop(({prop:i,value:t},n)=>(t=i==="disabled"?z(t):t,n({prop:i,value:t}))),e.on("prop:disabled",({payload:i})=>{e.config.disabled=z(i)})}function De(e,i){return t=>{t.store.set(ee({key:e,type:"ui",value:i||e,meta:{localize:!0,i18nArgs:[t]}}))}}const tt=typeof window<"u";function Tt(e){e.target instanceof HTMLElement&&e.target.hasAttribute("data-file-hover")&&e.target.removeAttribute("data-file-hover")}function Nt(e,i){i.target instanceof HTMLInputElement?e==="dragover"&&i.target.setAttribute("data-file-hover","true"):i.preventDefault(),e==="drop"&&Tt(i)}function pr(e){De("noFiles","Select file")(e),De("removeAll","Remove all")(e),De("remove")(e),tt&&(window._FormKit_File_Drop||(window.addEventListener("dragover",Nt.bind(null,"dragover")),window.addEventListener("drop",Nt.bind(null,"drop")),window.addEventListener("dragleave",Tt),window._FormKit_File_Drop=!0)),e.hook.input((i,t)=>t(Array.isArray(i)?i:[])),e.on("reset",()=>{if(e.props.id&&tt){const i=document.getElementById(e.props.id);i&&(i.value="")}}),e.on("created",()=>{Array.isArray(e.value)||e.input([],!1),e.context&&(e.context.handlers.resetFiles=i=>{if(i.preventDefault(),e.input([]),e.props.id&&tt){const t=document.getElementById(e.props.id);t&&(t.value="")}},e.context.handlers.files=i=>{var t,n;const l=[];if(i.target instanceof HTMLInputElement&&i.target.files){for(let a=0;a<i.target.files.length;a++){let s;(s=i.target.files.item(a))&&l.push({name:s.name,file:s})}e.input(l)}e.context&&(e.context.files=l),typeof((t=e.props.attrs)===null||t===void 0?void 0:t.onChange)=="function"&&((n=e.props.attrs)===null||n===void 0||n.onChange(i))})})}const zt=ee({key:"loading",value:!0,visible:!1});async function dr(e,i){const t=Math.random();if(e.props._submitNonce=t,i.preventDefault(),await e.settled,e.ledger.value("validating")&&(e.store.set(zt),await e.ledger.settled("validating"),e.store.remove("loading"),e.props._submitNonce!==t))return;const n=l=>l.store.set(ee({key:"submitted",value:!0,visible:!1}));if(e.walk(n),n(e),typeof e.props.onSubmitRaw=="function"&&e.props.onSubmitRaw(i,e),e.ledger.value("blocking"))typeof e.props.onSubmitInvalid=="function"&&e.props.onSubmitInvalid(e),e.props.incompleteMessage!==!1&&e.store.set(ee({blocking:!1,key:"incomplete",meta:{localize:e.props.incompleteMessage===void 0,i18nArgs:[{node:e}],showAsMessage:!0},type:"ui",value:e.props.incompleteMessage||"Form incomplete."}));else if(typeof e.props.onSubmit=="function"){const l=e.props.onSubmit(e.hook.submit.dispatch(be(e.value)),e);if(l instanceof Promise){const a=e.props.disabled===void 0&&e.props.submitBehavior!=="live";a&&(e.props.disabled=!0),e.store.set(zt),await l,a&&(e.props.disabled=!1),e.store.remove("loading")}}else i.target instanceof HTMLFormElement&&i.target.submit()}function mr(e){e.props.isForm=!0,e.ledger.count("validating",i=>i.key==="validating"),e.on("created",()=>{var i;!((i=e.context)===null||i===void 0)&&i.handlers&&(e.context.handlers.submit=dr.bind(null,e)),O(e.props,"actions")||(e.props.actions=!0)}),e.on("settled:blocking",()=>e.store.remove("incomplete"))}function br(e){e.props.ignore===void 0&&(e.props.ignore=!0,e.parent=null)}function yr(e){e.on("created",()=>{e.context&&(e.context.initialValue=e.value||"")})}function hr(e,i){i.target instanceof HTMLInputElement&&e.input(oe(e.props.options,i.target.value))}function _r(e,i){var t,n;return(t=e.context)===null||t===void 0||t.value,(n=e.context)===null||n===void 0||n._value,fe(oe(e.props.options,i),e._value)}function gr(e){e.on("created",()=>{var i,t;Array.isArray(e.props.options)||ye(350,{node:e,inputType:"radio"}),!((i=e.context)===null||i===void 0)&&i.handlers&&(e.context.handlers.toggleChecked=hr.bind(null,e)),!((t=e.context)===null||t===void 0)&&t.fns&&(e.context.fns.isChecked=_r.bind(null,e))}),e.hook.prop(Ft(e))}function $r(e,i){e.context&&e.context.value;const t="__original"in i?i.__original:i.value;function n(){return!e.props.options.some(l=>("__original"in l?l.__original:l.value)===null)}return Array.isArray(e._value)?e._value.some(l=>fe(l,t)):(e._value===void 0||e._value===null&&n())&&i.attrs&&i.attrs["data-is-placeholder"]?!0:fe(t,e._value)}async function kr(e,i){var t;typeof((t=e.props.attrs)===null||t===void 0?void 0:t.onChange)=="function"&&(await new Promise(n=>setTimeout(n,0)),await e.settled,e.props.attrs.onChange(i))}function Cr(e,i){const t=i.target,n=t.hasAttribute("multiple")?Array.from(t.selectedOptions).map(l=>oe(e.props.options,l.value)):oe(e.props.options,t.value);e.input(n)}function Ut(e,i){return e.some(t=>t.attrs&&t.attrs["data-is-placeholder"])?e:[{label:i,value:"",attrs:{hidden:!0,disabled:!0,"data-is-placeholder":"true"}},...e]}function wr(e){e.on("created",()=>{var i,t,n;const l=z((i=e.props.attrs)===null||i===void 0?void 0:i.multiple);!l&&e.props.placeholder&&Array.isArray(e.props.options)&&(e.hook.prop(({prop:a,value:s},o)=>(a==="options"&&(s=Ut(s,e.props.placeholder)),o({prop:a,value:s}))),e.props.options=Ut(e.props.options,e.props.placeholder)),l?e.value===void 0&&e.input([],!1):e.context&&!e.context.options&&(e.props.attrs=Object.assign({},e.props.attrs,{value:e._value}),e.on("input",({payload:a})=>{e.props.attrs=Object.assign({},e.props.attrs,{value:a})})),!((t=e.context)===null||t===void 0)&&t.handlers&&(e.context.handlers.selectInput=Cr.bind(null,e),e.context.handlers.onChange=kr.bind(null,e)),!((n=e.context)===null||n===void 0)&&n.fns&&(e.context.fns.isSelected=$r.bind(null,e),e.context.fns.showPlaceholder=(a,s)=>{if(!Array.isArray(e.props.options))return!1;const o=e.props.options.some(f=>{if(f.attrs&&"data-is-placeholder"in f.attrs)return!1;const p="__original"in f?f.__original:f.value;return G(a,p)});return s&&!o?!0:void 0})}),e.hook.input((i,t)=>{var n,l,a;return!e.props.placeholder&&i===void 0&&Array.isArray((n=e.props)===null||n===void 0?void 0:n.options)&&e.props.options.length&&!z((a=(l=e.props)===null||l===void 0?void 0:l.attrs)===null||a===void 0?void 0:a.multiple)&&(i="__original"in e.props.options[0]?e.props.options[0].__original:e.props.options[0].value),t(i)})}function ce(e,i){return t=>{t.props[`${e}Icon`]===void 0&&(t.props[`${e}Icon`]=i.startsWith("<svg")?i:`default:${i}`)}}function nt(e){return!!(se(e)&&e.if&&e.if.startsWith("$slots.")&&typeof e.then=="string"&&e.then.startsWith("$slots.")&&"else"in e)}function Vr(e){return te(ue(_e("$label"),Z(W(),e(),H())),q("$help"),J(Y("$message.value")))}function Q(e,i,t){const n=l=>{const a=i(l);if(t||Be(a)&&"if"in a||nt(a)){const s={if:e,then:a};return t&&(s.else=t(l)),s}else nt(a)?Object.assign(a.else,{if:e}):Be(a)&&Object.assign(a,{if:e});return a};return n._s=we(),n}function pe(e,i){const t=n=>{const l=e({});return nt(l)?(Array.isArray(l.else)||(l.else=he(he(l.else,i),e._s?n[e._s]:{})),l):he(he(l,i),e._s?n[e._s]:{})};return t._s=e._s,t}const Sr=["classes","config","delay","errors","id","index","inputErrors","modelValue","onUpdate:modelValue","name","parent","plugins","sectionsSchema","type","validation","validationLabel","validationMessages","validationRules","onInput","onInputRaw","onUpdate:modelValue","onNode","onSubmit","onSubmitInvalid","onSubmitRaw"];te(J(Y("$message.value")),ue(Ji(R("prefix"),W(),Yi("$label || $ui.submit.value"),H(),R("suffix"))),q("$help")),De("submit"),te(Q("$options == undefined",Oe(Z(W(),Ae(),ve(R("decorator")),H()),pe(Me("$label"),{if:"$label"})),vt(At("$label"),q("$help"),Mt(Ot(Oe(Z(W(),pe(Ae(),{bind:"$option.attrs",attrs:{id:"$option.attrs.id",value:"$option.value",checked:"$fns.isChecked($option.value)"}}),ve(R("decorator")),H()),pe(Me("$option.label"),{if:"$option.label"})),Dt("$option.help"))))),Q("$options == undefined && $help",q("$help")),J(Y("$message.value"))),ce("decorator","checkboxDecorator"),te(ue(_e("$label"),Z(R("prefix","label"),W(),Qi(),Gi(Xi(R("fileItem"),er("$file.name"),Q("$value.length === 1",Rt(R("fileRemove"),"$ui.remove.value")))),Q("$value.length > 1",Rt("$ui.removeAll.value")),tr(R("noFiles"),"$ui.noFiles.value"),H(),R("suffix"))),q("$help"),J(Y("$message.value"))),ce("fileItem","fileItem"),ce("fileRemove","fileRemove"),ce("noFiles","noFiles"),nr("$slots.default",J(Y("$message.value")),ir(rr())),xt("$slots.default"),jt(),xt("$slots.default"),te(Q("$options == undefined",Oe(Z(W(),Ae(),ve(R("decorator")),H()),pe(Me("$label"),{if:"$label"})),vt(At("$label"),q("$help"),Mt(Ot(Oe(Z(W(),pe(Ae(),{bind:"$option.attrs",attrs:{id:"$option.attrs.id",value:"$option.value",checked:"$fns.isChecked($option.value)"}}),ve(R("decorator")),H()),pe(Me("$option.label"),{if:"$option.label"})),Dt("$option.help"))))),Q("$options == undefined && $help",q("$help")),J(Y("$message.value"))),ce("decorator","radioDecorator"),te(ue(_e("$label"),Z(R("prefix"),W(),lr(Q("$slots.default",()=>"$slots.default",Q("$slots.option",sr,ar("$option.label")))),Q("$attrs.multiple !== undefined",()=>"",R("select")),H(),R("suffix"))),q("$help"),J(Y("$message.value"))),ce("select","select"),te(ue(_e("$label"),Z(R("prefix","label"),W(),or(),H(),R("suffix"))),q("$help"),J(Y("$message.value"))),te(ue(_e("$label"),Z(R("prefix","label"),W(),jt(),H(),R("suffix"))),q("$help"),J(Y("$message.value"))),ee({type:"state",blocking:!0,visible:!1,value:!0,key:"validating"});let Re;const Ir=new Promise(e=>{}),je=typeof window<"u"&&typeof fetch<"u";Re=je?getComputedStyle(document.documentElement):void 0;const ge={},it={};function rt(e,i){return t=>{if(typeof t!="string")return;if(t.startsWith("<svg"))return t;const n=t.startsWith("default:");t=n?t.split(":")[1]:t;const l=t in ge;let a;if(l)return ge[t];if(!it[t]){if(a=Er(t),a=je&&typeof a>"u"?Promise.resolve(a):a,a instanceof Promise)it[t]=a.then(s=>!s&&typeof t=="string"&&!n?a=typeof e=="function"?e(t):Pr(t,i):s).then(s=>(typeof t=="string"&&(ge[n?`default:${t}`:t]=s),s));else if(typeof a=="string")return ge[n?`default:${t}`:t]=a,a}return it[t]}}function Er(e){if(je)return Ir.then(()=>Lr(e))}function Lr(e){const i=Re==null?void 0:Re.getPropertyValue(`--fk-icon-${e}`);if(i){const t=atob(i);if(t.startsWith("<svg"))return ge[e]=t,t}}function Pr(e,i){const t=Bt.startsWith("__")?"latest":Bt,n=typeof i=="function"?i(e):`https://cdn.jsdelivr.net/npm/@formkit/icons@${t}/dist/icons/${e}.svg`;if(je)return fetch(`${n}`).then(async l=>{const a=await l.text();if(a.startsWith("<svg"))return a}).catch(l=>{console.error(l)})}let lt=!1;const Kt={100:({data:e})=>`Only groups, lists, and forms can have children (${e.name}).`,101:({data:e})=>`You cannot directly modify the store (${e.name}). See: https://formkit.com/advanced/core#message-store`,102:({data:[e,i]})=>`You cannot directly assign node.${i} (${e.name})`,103:({data:[e]})=>`Schema expressions cannot start with an operator (${e})`,104:({data:[e,i]})=>`Schema expressions cannot end with an operator (${e} in "${i}")`,105:({data:e})=>`Invalid schema expression: ${e}`,106:({data:e})=>`Cannot submit because (${e}) is not in a form.`,107:({data:[e,i]})=>`Cannot set ${e.name} to non object value: ${i}`,108:({data:[e,i]})=>`Cannot set ${e.name} to non array value: ${i}`,300:({data:[e]})=>`Cannot set behavior prop to overscroll (on ${e.name} input) when options prop is a function.`,600:({data:e})=>`Unknown input type${typeof e.props.type=="string"?' "'+e.props.type+'"':""} ("${e.name}")`,601:({data:e})=>`Input definition${typeof e.props.type=="string"?' "'+e.props.type+'"':""} is missing a schema or component property (${e.name}).`},Wt={150:({data:e})=>`Schema function "${e}()" is not a valid function.`,151:({data:e})=>`No form element with id: ${e}`,152:({data:e})=>`No input element with id: ${e}`,350:({data:{node:e,inputType:i}})=>`Invalid options prop for ${e.name} input (${i}). See https://formkit.com/inputs/${i}`,650:'Schema "$get()" must use the id of an input to access.',651:({data:e})=>`Cannot setErrors() on "${e}" because no such id exists.`,652:({data:e})=>`Cannot clearErrors() on "${e}" because no such id exists.`,800:({data:e})=>`${e} is deprecated.`};lt||Ke((e,i)=>{if(e.code in Kt){const t=Kt[e.code];e.message=typeof t=="function"?t(e):t}return i(e)}),lt||We((e,i)=>{if(e.code in Wt){const t=Wt[e.code];e.message=typeof t=="function"?t(e):t}return i(e)}),lt=!0;const Br=typeof window>"u",at=new Map;function vr(e,i){var t;!Br||!e||(at.has(e)||at.set(e,new Set),(t=at.get(e))===null||t===void 0||t.add(i))}const Ht=typeof window>"u",$e={},de={};let j;const X=new WeakMap,Ar="__raw__",Or=/[a-zA-Z0-9\-][cC]lass$/;function Mr(e,i){const t=r.ref(null);if(e==="get"){const l={};return t.value=Dr.bind(null,l),t}const n=e.split(".");return r.watchEffect(()=>{t.value=st(r.isRef(i)?i.value:i,n)}),t}function st(e,i){if(Array.isArray(e)){for(const l of e){const a=l!==!1&&st(l,i);if(a!==void 0)return a}return}let t,n=e;for(const l in i){const a=i[l];if(typeof n!="object"||n===null){t=void 0;break}const s=n[a];if(Number(l)===i.length-1&&s!==void 0){t=typeof s=="function"?s.bind(n):s;break}n=s}return t}function Dr(e,i){if(typeof i!="string")return ye(650);if(i in e||(e[i]=r.ref(void 0)),e[i].value===void 0){e[i].value=null;const t=$t(i);t&&(e[i].value=t.context),Qn(i,({payload:n})=>{e[i].value=Ee(n)?n.context:n})}return e[i].value}function qt(e,i,t){function n(k,_){const c=L(U(_.if),{if:!0}),d=p(k,_.then),m=_.else?p(k,_.else):null;return[c,d,m]}function l(k,_){var c,d;const m=L(U(k.if));let y=()=>_,$=()=>_;return typeof k.then=="object"?$=a(k.then,void 0):typeof k.then=="string"&&(!((c=k.then)===null||c===void 0)&&c.startsWith("$"))?$=L(U(k.then)):$=()=>k.then,O(k,"else")&&(typeof k.else=="object"?y=a(k.else):typeof k.else=="string"&&(!((d=k.else)===null||d===void 0)&&d.startsWith("$"))?y=L(U(k.else)):y=()=>k.else),()=>m()?$():y()}function a(k,_,c={}){const d=new Set(Object.keys(k||{})),m=_?L(U(_)):()=>({}),y=[$=>{const h=m();for(const C in h)d.has(C)||($[C]=h[C])}];if(k){if(se(k))return l(k,c);for(let $ in k){const h=k[$];let C;const u=typeof h=="string";$.startsWith(Ar)?($=$.substring(7),C=()=>h):u&&h.startsWith("$")&&h.length>1&&!(h.startsWith("$reset")&&Or.test($))?C=L(U(h)):typeof h=="object"&&se(h)?C=l(h,void 0):typeof h=="object"&&re(h)?C=a(h):C=()=>h,y.push(b=>{b[$]=C()})}}return()=>{const $=Array.isArray(k)?[]:{};return y.forEach(h=>h($)),$}}function s(k,_){let c=null,d=()=>null,m=!1,y=null,$=null,h=null,C=!1;const u=Hi(_);if(Qe(u)?(c=u.$el,d=u.$el!=="text"?a(u.attrs,u.bind):()=>null):Xe(u)?(typeof u.$cmp=="string"?O(k,u.$cmp)?c=k[u.$cmp]:(c=u.$cmp,C=!0):c=u.$cmp,d=a(u.props,u.bind)):se(u)&&([m,y,$]=n(k,u)),!se(u)&&"if"in u?m=L(U(u.if)):!se(u)&&c===null&&(m=()=>!0),"children"in u&&u.children)if(typeof u.children=="string")if(u.children.startsWith("$slots."))c=c==="text"?"slot":c,y=L(U(u.children));else if(u.children.startsWith("$")&&u.children.length>1){const b=L(U(u.children));y=()=>String(b())}else y=()=>String(u.children);else if(Array.isArray(u.children))y=p(k,u.children);else{const[b,w,E]=n(k,u.children);y=D=>b&&b()?w&&w(D):E&&E(D)}if(Xe(u))if(y){const b=y;y=w=>({default(E,D){var S,A,B,x;const N=j;D&&(j=D),E&&((S=X.get(j))===null||S===void 0||S.unshift(E)),w&&((A=X.get(j))===null||A===void 0||A.unshift(w));const v=b(w);return E&&((B=X.get(j))===null||B===void 0||B.shift()),w&&((x=X.get(j))===null||x===void 0||x.shift()),j=N,v}}),y.slot=!0}else y=()=>({});if("for"in u&&u.for){const b=u.for.length===3?u.for[2]:u.for[1];h=[typeof b=="string"&&b.startsWith("$")?L(U(b)):()=>b,u.for[0],u.for.length===3?String(u.for[1]):null]}return[m,c,d,y,$,h,C]}function o(k,_){const c=k(_),d=j;return Object.keys(c).reduce((m,y)=>{const $=c&&c[y];return m[y]=h=>$&&$(h,d)||null,m},{})}function f(k,_){const[c,d,m,y,$,h,C]=s(k,_);let u=b=>{if(c&&d===null&&y)return c()?y(b):$&&$(b);if(d&&(!c||c())){if(d==="text"&&y)return r.createTextVNode(String(y()));if(d==="slot"&&y)return y(b);const w=C?r.resolveComponent(d):d,E=y!=null&&y.slot?o(y,b):null;return r.h(w,m(),E||(y?y(b):[]))}return typeof $=="function"?$(b):$};if(h){const b=u,[w,E,D]=h;u=()=>{const S=w(),A=Number.isFinite(S)?Array(Number(S)).fill(0).map((v,F)=>F):S,B=[];if(typeof A!="object")return null;const x=X.get(j)||[],N=Array.isArray(A);for(const v in A){if(N&&v in Array.prototype)continue;const F=Object.defineProperty({...x.reduce((ke,ne)=>ke.__idata?{...ke,...ne}:ne,{}),[E]:A[v],...D!==null?{[D]:N?Number(v):v}:{}},"__idata",{enumerable:!1,value:!0});x.unshift(F),B.push(b.bind(null,F)()),x.shift()}return B}}return u}function p(k,_){if(Array.isArray(_)){const d=_.map(f.bind(null,k));return m=>d.map(y=>y(m))}const c=f(k,_);return d=>c(d)}const g=[];function L(k,_={}){const c=new WeakMap;return g.push((d,m)=>{c.set(m,k.provide(y=>d(y,_)))}),()=>c.get(j)()}function K(k,_){var c;t??(t=JSON.stringify(i));const[d,m]=O($e,t)?$e[t]:[p(e,i),g];return Ht||((c=de[t])!==null&&c!==void 0||(de[t]=0),de[t]++,$e[t]=[d,m]),m.forEach(y=>{y(k,_)}),()=>(j=_,d())}return K}function Zt(e,i){const t=X.get(j)||[];let n;return t.length&&(n=st(t,e.split("."))),n===void 0?i:n}function Rr(e,i){return new Proxy(e,{get(...t){let n;const l=t[1];if(typeof l=="string"){const a=j;j=i,n=Zt(l,void 0),j=a}return n!==void 0?n:Reflect.get(...t)}})}function Jt(e,i,t){return e((n,l={})=>n.reduce((a,s)=>{if(s.startsWith("slots.")){const o=s.substring(6),f=()=>i.slots&&O(i.slots,o)&&typeof i.slots[o]=="function";if(l.if)a[s]=f;else if(i.slots){const p=Rr(i,t);a[s]=()=>f()?i.slots[o](p):null}}else{const o=Mr(s,i);a[s]=()=>Zt(s,o.value)}return a},{}),t)}function Yt(e,i,t){if(i??(i=JSON.stringify(e)),de[i]--,de[i]===0){delete de[i];const[,n]=$e[i];delete $e[i],n.length=0}X.delete(t)}const Qt=r.defineComponent({name:"FormKitSchema",props:{schema:{type:[Array,Object],required:!0},data:{type:Object,default:()=>({})},library:{type:Object,default:()=>({})},memoKey:{type:String,required:!1}},setup(e,i){var t;const n=r.getCurrentInstance();let l={};X.set(l,[]);let a=qt(e.library,e.schema,e.memoKey),s,o;Ht||r.watch(()=>e.schema,(p,g)=>{var L;const K=l;l={},X.set(l,[]),a=qt(e.library,e.schema,e.memoKey),s=Jt(a,o,l),p===g&&((L=n==null?void 0:n.proxy)===null||L===void 0?void 0:L.$forceUpdate)(),Yt(e.schema,e.memoKey,K)},{deep:!0}),r.watchEffect(()=>{var p;o=Object.assign(r.reactive((p=e.data)!==null&&p!==void 0?p:{}),{slots:i.slots}),i.slots,s=Jt(a,o,l)});function f(){Yt(e.schema,e.memoKey,l),o.node&&o.node.destroy(),o.slots=null,o=null,s=null}return r.onUnmounted(f),vr((t=r.getCurrentInstance())===null||t===void 0?void 0:t.appContext.app,f),()=>s?s():null}}),jr=typeof window>"u",xe=Symbol("FormKitParent");function xr(e,i){const t=Nr(e,i);if(t.props.definition||T(600,t),t.props.definition.component)return()=>{var o;return r.h((o=t.props.definition)===null||o===void 0?void 0:o.component,{context:t.context},{...i.slots})};const n=r.ref([]);let l=t.props.definition.schemaMemoKey;const a=()=>{var o,f;const p=(f=(o=t.props)===null||o===void 0?void 0:o.definition)===null||f===void 0?void 0:f.schema;p||T(601,t),typeof p=="function"?(n.value=p({...e.sectionsSchema}),(l&&e.sectionsSchema||"memoKey"in p&&typeof p.memoKey=="string")&&(l=(l??(p==null?void 0:p.memoKey))+JSON.stringify(e.sectionsSchema))):n.value=p};a(),jr||t.on("schema",()=>{l+="♻️",a()}),i.emit("node",t);const s=t.props.definition.library;return i.expose({node:t}),()=>r.h(Qt,{schema:n.value,data:t.context,library:s,memoKey:l},{...i.slots})}r.defineComponent(xr,{props:Sr,inheritAttrs:!1});const Xt=Symbol();r.defineComponent((e,i)=>{const t=r.ref(null),n=r.ref(!1),l=r.ref(void 0),a=r.watch(t,o=>{let f=o,p=null;for(;f=f==null?void 0:f.parentNode;)if(p=f,p instanceof ShadowRoot||p instanceof Document){s(p);break}a(),n.value=!0});r.provide(Xt,l);function s(o){l.value=o}return()=>n.value&&i.slots.default?i.slots.default():r.h("template",{ref:t})});const Gt=Symbol.for("FormKitOptions"),Fr=typeof window<"u",ot=["help","label","ignore","disabled","preserve",/^preserve(-e|E)rrors/,/^[a-z]+(?:-visibility|Visibility|-behavior|Behavior)$/,/^[a-zA-Z-]+(?:-class|Class)$/,"prefixIcon","suffixIcon",/^[a-zA-Z-]+(?:-icon|Icon)$/];function en(e,i){i.classes&&Object.keys(i.classes).forEach(t=>{typeof t=="string"&&(e.props[`_${t}Class`]=i.classes[t],me(i.classes[t])&&t==="inner"&&Object.values(i.classes[t]))})}function Tr(e){return e?["Submit","SubmitRaw","SubmitInvalid"].reduce((t,n)=>{const l=`on${n}`;return l in e&&typeof e[l]=="function"&&(t[l]=e[l]),t},{}):{}}function Nr(e,i,t={}){var n;const l=Object.assign({},r.inject(Gt)||{},t),a=r.inject(Xt,r.ref(Fr?document:void 0)),s=r.getCurrentInstance(),o=Tr(s==null?void 0:s.vnode.props),f=["modelValue","model-value"].some(u=>{var b;return u in((b=s==null?void 0:s.vnode.props)!==null&&b!==void 0?b:{})});let p=!1;r.onMounted(()=>{p=!0});const g=e.modelValue!==void 0?e.modelValue:ie(i.attrs.value);function L(){var u;const b={...le(e),...o,type:(u=e.type)!==null&&u!==void 0?u:"text",__root:a.value,__slots:i.slots},w=ut(le(i.attrs),ot);w.key||(w.key=we()),b.attrs=w;const E=ct(le(i.attrs),ot);for(const S in E)b[Se(S)]=E[S];const D={props:{}};return en(D,e),Object.assign(b,D.props),typeof b.type!="string"&&(b.definition=b.type,delete b.type),b}const K=L(),k=K.ignore?null:e.parent||r.inject(xe,null),_=Ki(Ve(l||{},{name:e.name||void 0,value:g,parent:k,plugins:(l.plugins||[]).concat((n=e.plugins)!==null&&n!==void 0?n:[]),config:e.config||{},props:K,index:e.index,sync:!!z(i.attrs.sync||i.attrs.dynamic)},!1,!0));_.props.definition||T(600,_);const c=r.ref(new Set(_.props.definition.props||[]));_.on("added-props",({payload:u})=>{Array.isArray(u)&&u.forEach(b=>c.value.add(b))});const d=r.computed(()=>ot.concat([...c.value]).reduce((u,b)=>(typeof b=="string"?(u.push(Se(b)),u.push(pt(b))):u.push(b),u),[]));r.watchEffect(()=>en(_,e));const m=le(e);for(const u in m)r.watch(()=>e[u],()=>{e[u]!==void 0&&(_.props[u]=e[u])});r.watchEffect(()=>{_.props.__root=a.value});const y=new Set,$=le(i.attrs);r.watchEffect(()=>{h(ct($,d.value))});function h(u){y.forEach(b=>{b(),y.delete(b)});for(const b in u){const w=Se(b);y.add(r.watch(()=>i.attrs[b],()=>{_.props[w]=i.attrs[b]}))}}if(r.watchEffect(()=>{const u=ut(le(i.attrs),d.value);"multiple"in u&&(u.multiple=z(u.multiple)),typeof u.onBlur=="function"&&(u.onBlur=vn(u.onBlur)),_.props.attrs=Object.assign({},_.props.attrs||{},u)}),r.watchEffect(()=>{var u;const b=((u=e.errors)!==null&&u!==void 0?u:[]).map(w=>ee({key:ze(w),type:"error",value:w,meta:{source:"prop"}}));_.store.apply(b,w=>w.type==="error"&&w.meta.source==="prop")}),_.type!=="input"){const u=`${_.name}-prop`;r.watchEffect(()=>{var b;const w=(b=e.inputErrors)!==null&&b!==void 0?b:{},E=Object.keys(w);E.length||_.clearErrors(!0,u);const D=E.reduce((S,A)=>{let B=w[A];return typeof B=="string"&&(B=[B]),Array.isArray(B)&&(S[A]=B.map(x=>ee({key:x,type:"error",value:x,meta:{source:u}}))),S},{});_.store.apply(D,S=>S.type==="error"&&S.meta.source===u)})}r.watchEffect(()=>Object.assign(_.config,e.config)),_.type!=="input"&&r.provide(xe,_);let C;return _.on("modelUpdated",()=>{var u,b;i.emit("inputRaw",(u=_.context)===null||u===void 0?void 0:u.value,_),p&&i.emit("input",(b=_.context)===null||b===void 0?void 0:b.value,_),f&&_.context&&(C=ie(_.value),i.emit("update:modelValue",Ln(_.value)))}),f&&(r.watch(r.toRef(e,"modelValue"),u=>{G(C,u)||_.input(u,!1)},{deep:!0}),_.value!==g&&_.emit("modelUpdated")),r.onBeforeUnmount(()=>_.destroy()),_}let zr=1;function Ur(e){return typeof e=="function"&&e.length===2||typeof e=="object"&&!Array.isArray(e)&&!("$el"in e)&&!("$cmp"in e)&&!("if"in e)}function M(e,i={}){const t={type:"input",...i};let n;if(Ur(e)){const l=`SchemaComponent${zr++}`;n=V("input",()=>({$cmp:l,props:{context:"$node.context"}})),t.library={[l]:r.markRaw(e)}}else typeof e=="function"?n=e:n=V("input",()=>ie(e));return t.schema=Vr(n||"Schema undefined"),t.schemaMemoKey||(t.schemaMemoKey=`${Math.random()}`),t}const Kr=V("messages",()=>({$el:"ul",if:"$fns.length($messages)"})),Wr=V("message",()=>({$el:"li",for:["message","$messages"],attrs:{key:"$message.key",id:"$id + '-' + $message.key","data-message-type":"$message.type"}})),Hr=Kr(Wr("$message.value"));r.defineComponent({props:{node:{type:Object,required:!1},sectionsSchema:{type:Object,default:{}},defaultPosition:{type:[String,Boolean],default:!1}},setup(e,i){const t=r.computed(()=>e.node||r.inject(xe,void 0));r.watch(t,()=>{var a;!((a=t.value)===null||a===void 0)&&a.context&&!z(e.defaultPosition)&&(t.value.context.defaultMessagePlacement=!1)},{immediate:!0});const n=Hr(e.sectionsSchema||{}),l=r.computed(()=>{var a,s,o,f,p,g;return{messages:((s=(a=t.value)===null||a===void 0?void 0:a.context)===null||s===void 0?void 0:s.messages)||{},fns:((f=(o=t.value)===null||o===void 0?void 0:o.context)===null||f===void 0?void 0:f.fns)||{},classes:((g=(p=t.value)===null||p===void 0?void 0:p.context)===null||g===void 0?void 0:g.classes)||{}}});return()=>{var a;return!((a=t.value)===null||a===void 0)&&a.context?r.h(Qt,{schema:n,data:l.value},{...i.slots}):null}}}),r.defineComponent({name:"FormKitIcon",props:{icon:{type:String,default:""},iconLoader:{type:Function,default:null},iconLoaderUrl:{type:Function,default:null}},setup(e){var i,t;const n=r.ref(void 0),l=r.inject(Gt,{}),a=r.inject(xe,null);let s;function o(){if(!s||typeof s!="function")return;const f=s(e.icon);f instanceof Promise?f.then(p=>{n.value=p}):n.value=f}if(e.iconLoader&&typeof e.iconLoader=="function")s=rt(e.iconLoader);else if(a&&(!((i=a.props)===null||i===void 0)&&i.iconLoader))s=rt(a.props.iconLoader);else if(e.iconLoaderUrl&&typeof e.iconLoaderUrl=="function")s=rt(s,e.iconLoaderUrl);else{const f=(t=l==null?void 0:l.plugins)===null||t===void 0?void 0:t.find(p=>typeof p.iconHandler=="function");f&&(s=f.iconHandler)}return r.watch(()=>e.icon,()=>{o()},{immediate:!0}),()=>e.icon&&n.value?r.h("span",{class:"formkit-icon",innerHTML:n.value}):null}});const qr=r.defineComponent({__name:"PrimeCalendar",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(o){t==null||t.node.input(t==null?void 0:t._value)}function a(o){t==null||t.node.input(o)}const s=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(o,f)=>{const p=r.resolveComponent("Calendar");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(p,{modelValue:r.unref(t)._value,"onUpdate:modelValue":f[0]||(f[0]=g=>r.unref(t)._value=g),"input-id":i.context.id,disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"input-style":r.unref(n).style,"input-class":r.unref(s),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,"date-format":r.unref(n).dateFormat,"selection-mode":r.unref(n).selectionMode??"single",inline:r.unref(n).inline??!1,"show-other-months":r.unref(n).showOtherMonths??!0,"select-other-months":r.unref(n).selectOtherMonths??!1,icon:r.unref(n).icon,"show-icon":r.unref(t).showIcon,"previous-icon":r.unref(n).previousIcon??"pi pi-chevron-left","next-icon":r.unref(n).nextIcon??"pi pi-chevron-right","increment-icon":r.unref(n).incrementIcon??"pi pi-chevron-up","decrement-icon":r.unref(n).decrementIcon??"pi pi-chevron-down","number-of-months":r.unref(n).numberOfMonths??1,"responsive-options":r.unref(n).responsiveOptions,view:r.unref(n).view??"date","touch-u-i":r.unref(n).touchUI??!1,"min-date":r.unref(n).minDate,"max-date":r.unref(n).maxDate,"disabled-dates":r.unref(n).disabledDates,"disabled-days":r.unref(n).disabledDays,"max-date-count":r.unref(n).maxDateCount,"show-on-focus":r.unref(n).showOnFocus??!0,"auto-z-index":r.unref(n).autoZIndex??!0,"base-z-index":r.unref(n).baseZIndex??0,"show-button-bar":r.unref(n).showButtonBar??!1,"show-time":r.unref(n).showTime??!1,"time-only":r.unref(n).timeOnly??!1,"short-year-cutoff":r.unref(n).shortYearCutoff??"+10","hour-format":r.unref(n).hourFormat??"24","step-hour":r.unref(n).stepHour??1,"step-minute":r.unref(n).stepMinute??1,"step-second":r.unref(n).stepSecond??1,"show-seconds":r.unref(n).showSeconds??!1,"hide-on-date-time-select":r.unref(n).hideOnDateTimeSelect??!1,"hide-on-range-selection":r.unref(n).hideOnRangeSelection??!1,"time-separator":r.unref(n).timeSeparator??":","show-week":r.unref(n).showWeek??!1,"manual-input":r.unref(n).manualInput??!0,"append-to":r.unref(n).appendTo??"body","panel-style":r.unref(n).panelStyle,"panel-class":r.unref(n).panelClass,pt:r.unref(n).pt,onDateSelect:a,onInput:l},null,8,["modelValue","input-id","disabled","readonly","input-style","input-class","tabindex","aria-label","aria-labelledby","date-format","selection-mode","inline","show-other-months","select-other-months","icon","show-icon","previous-icon","next-icon","increment-icon","decrement-icon","number-of-months","responsive-options","view","touch-u-i","min-date","max-date","disabled-dates","disabled-days","max-date-count","show-on-focus","auto-z-index","base-z-index","show-button-bar","show-time","time-only","short-year-cutoff","hour-format","step-hour","step-minute","step-second","show-seconds","hide-on-date-time-select","hide-on-range-selection","time-separator","show-week","manual-input","append-to","panel-style","panel-class","pt"])])}}}),Zr={key:0,class:"formkit-prime-left"},Jr={key:1,class:"formkit-prime-right"},Yr=r.defineComponent({__name:"PrimeCheckbox",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o;t==null||t.node.input((o=i.context)==null?void 0:o._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("Checkbox");return r.openBlock(),r.createElementBlock("div",null,[r.unref(t).attrs.labelLeft?(r.openBlock(),r.createElementBlock("span",Zr,r.toDisplayString(r.unref(t).attrs.labelLeft),1)):r.createCommentVNode("",!0),r.createVNode(f,{modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),"input-id":r.unref(t).id,disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"input-style":r.unref(n).style,"input-class":r.unref(a),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,binary:r.unref(n).binary??!0,"true-value":r.unref(n).trueValue??void 0,"false-value":r.unref(n).falseValue??void 0,pt:r.unref(n).pt,onInput:l},null,8,["modelValue","input-id","disabled","readonly","input-style","input-class","tabindex","aria-label","aria-labelledby","binary","true-value","false-value","pt"]),r.unref(t).attrs.labelRight?(r.openBlock(),r.createElementBlock("span",Jr,r.toDisplayString(r.unref(t).attrs.labelRight),1)):r.createCommentVNode("",!0)])}}}),Qr=r.defineComponent({__name:"PrimeChips",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o;t==null||t.node.input((o=i.context)==null?void 0:o._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("Chips");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(f,{modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),"input-id":r.unref(t).id,disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"input-style":r.unref(n).style,"input-class":r.unref(a),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,"allow-duplicate":r.unref(n).allowDuplicate??!0,"add-on-blur":r.unref(n).addOnBlur??!1,max:r.unref(n).max??void 0,placeholder:r.unref(n).placeholder,separator:r.unref(n).separator,pt:r.unref(n).pt,onAdd:l,onRemove:l},null,8,["modelValue","input-id","disabled","readonly","input-style","input-class","tabindex","aria-label","aria-labelledby","allow-duplicate","add-on-blur","max","placeholder","separator","pt"])])}}}),Xr=r.defineComponent({__name:"PrimeColorPicker",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(a){var s;t==null||t.node.input((s=i.context)==null?void 0:s._value)}return(a,s)=>{const o=r.resolveComponent("ColorPicker");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(o,{modelValue:r.unref(t)._value,"onUpdate:modelValue":s[0]||(s[0]=f=>r.unref(t)._value=f),disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,style:r.normalizeStyle(r.unref(n).style),"panel-class":r.unref(n).class,tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,"default-color":r.unref(n).defaultColor??"ff0000",inline:r.unref(n).inline??!1,format:r.unref(n).format,pt:r.unref(n).pt,onChange:l},null,8,["modelValue","disabled","readonly","style","panel-class","tabindex","aria-label","aria-labelledby","default-color","inline","format","pt"])])}}}),Gr=r.defineComponent({__name:"PrimeDropdown",props:{context:Object},setup(e){const t=e.context,n=t==null?void 0:t.attrs;function l(o){t==null||t.handlers.blur(o.value)}function a(o){t==null||t.node.input(o.value)}const s=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(o,f)=>{const p=r.resolveComponent("Dropdown");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(p,{modelValue:r.unref(t)._value,"onUpdate:modelValue":f[0]||(f[0]=g=>r.unref(t)._value=g),"input-id":r.unref(t).id,disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"input-style":r.unref(s),"input-class":r.unref(n).class,tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,options:r.unref(n).options,"option-label":r.unref(n).optionLabel??"label","option-value":r.unref(n).optionValue??"value",placeholder:r.unref(n).placeholder,filter:r.unref(n).filter??!1,"show-clear":r.unref(n).showClear??!1,pt:r.unref(n).pt,onChange:a,onBlur:l},null,8,["modelValue","input-id","disabled","readonly","input-style","input-class","tabindex","aria-label","aria-labelledby","options","option-label","option-value","placeholder","filter","show-clear","pt"])])}}}),el=r.defineComponent({__name:"PrimeEditor",props:{context:Object},setup(e){const t=e.context,n=t==null?void 0:t.attrs;function l(o){t==null||t.node.input(o.htmlValue)}function a(o){o.range===null&&(t==null||t.handlers.blur(o.htmlValue))}const s=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(o,f)=>{const p=r.resolveComponent("Editor");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(p,{id:r.unref(t).id,modelValue:r.unref(t)._value,"onUpdate:modelValue":f[0]||(f[0]=g=>r.unref(t)._value=g),disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"editor-style":r.unref(n).style,class:r.normalizeClass(r.unref(s)),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,placeholder:r.unref(n).placeholder,formats:r.unref(n).formats,modules:r.unref(n).modules,pt:r.unref(n).pt,onTextChange:l,onSelectionChange:a},null,8,["id","modelValue","disabled","readonly","editor-style","class","tabindex","aria-label","aria-labelledby","placeholder","formats","modules","pt"])])}}}),tl=r.defineComponent({__name:"PrimeInputMask",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o,f;t==null||t.node.input((o=i.context)==null?void 0:o._value),t==null||t.handlers.blur((f=i.context)==null?void 0:f._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("InputMask");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(f,{id:r.unref(t).id,modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"editor-style":r.unref(n).style,class:r.normalizeClass(r.unref(a)),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,placeholder:r.unref(n).placeholder,mask:r.unref(n).mask??void 0,"slot-char":r.unref(n).slotChar??"_","auto-clear":r.unref(n).autoClear??!0,unmask:r.unref(n).unmask??!1,pt:r.unref(n).pt,onBlur:l},null,8,["id","modelValue","disabled","readonly","editor-style","class","tabindex","aria-label","aria-labelledby","placeholder","mask","slot-char","auto-clear","unmask","pt"])])}}}),nl=r.defineComponent({__name:"PrimeInputNumber",props:{context:Object},setup(e){const t=e.context,n=t==null?void 0:t.attrs;function l(o){t==null||t.handlers.blur(o.value)}function a(o){t==null||t.node.input(o.value)}const s=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(o,f)=>{const p=r.resolveComponent("InputNumber");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(p,{modelValue:r.unref(t)._value,"onUpdate:modelValue":f[0]||(f[0]=g=>r.unref(t)._value=g),"input-id":r.unref(t).id,disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"input-style":r.unref(n).style,"input-class":r.unref(s),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,placeholder:r.unref(n).placeholder,"use-grouping":r.unref(n).useGrouping??!0,"min-fraction-digits":r.unref(n).minFractionDigits??void 0,"max-fraction-digits":r.unref(n).maxFractionDigits??void 0,locale:r.unref(n).locale??void 0,mode:r.unref(n).mode??void 0,currency:r.unref(n).currency??void 0,prefix:r.unref(n).prefix??void 0,suffix:r.unref(n).suffix??void 0,"show-buttons":r.unref(n).showButtons??void 0,"button-layout":r.unref(n).buttonLayout??"stacked",step:r.unref(n).step??void 0,pt:r.unref(n).pt,onInput:a,onBlur:l},null,8,["modelValue","input-id","disabled","readonly","input-style","input-class","tabindex","aria-label","aria-labelledby","placeholder","use-grouping","min-fraction-digits","max-fraction-digits","locale","mode","currency","prefix","suffix","show-buttons","button-layout","step","pt"])])}}}),il={key:0,class:"formkit-prime-left"},rl={key:1,class:"formkit-prime-right"},ll=r.defineComponent({__name:"PrimeInputSwitch",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o;t==null||t.node.input((o=i.context)==null?void 0:o._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("InputSwitch");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(n).option_class)},[r.unref(t).attrs.labelLeft?(r.openBlock(),r.createElementBlock("span",il,r.toDisplayString(r.unref(t).attrs.labelLeft),1)):r.createCommentVNode("",!0),r.createVNode(f,{modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),"input-id":r.unref(t).id,disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"input-style":r.unref(n).style,"input-class":r.unref(a),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,"true-value":r.unref(n).trueValue??void 0,"false-value":r.unref(n).falseValue??void 0,pt:r.unref(n).pt,onInput:l},null,8,["modelValue","input-id","disabled","readonly","input-style","input-class","tabindex","aria-label","aria-labelledby","true-value","false-value","pt"]),r.unref(t).attrs.labelRight?(r.openBlock(),r.createElementBlock("span",rl,r.toDisplayString(r.unref(t).attrs.labelRight),1)):r.createCommentVNode("",!0)],2)}}}),al=r.defineComponent({__name:"PrimeInputText",props:{context:Object},setup(e){const t=e.context,n=t==null?void 0:t.attrs;function l(){return(t==null?void 0:t.iconLeft)&&(t==null?void 0:t.iconLeft.length)>0}function a(){return(t==null?void 0:t.iconRight)&&(t==null?void 0:t.iconRight.length)>0}function s(){let g="";return l()&&(g=`${g}p-input-icon-left `),a()&&(g=`${g}p-input-icon-right `),g}function o(g){t==null||t.handlers.blur(g.target.value)}function f(g){t==null||t.node.input(g.target.value)}const p=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(g,L)=>{const K=r.resolveComponent("InputText");return r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("span",{class:r.normalizeClass(s())},[l()?(r.openBlock(),r.createElementBlock("i",{key:0,class:r.normalizeClass(r.unref(t).iconLeft)},null,2)):r.createCommentVNode("",!0),r.createVNode(K,{id:r.unref(t).id,modelValue:r.unref(t)._value,"onUpdate:modelValue":L[0]||(L[0]=k=>r.unref(t)._value=k),disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,style:r.normalizeStyle(r.unref(n).style),class:r.normalizeClass(r.unref(p)),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,placeholder:r.unref(n).placeholder,pt:r.unref(n).pt,onInput:f,onBlur:o},null,8,["id","modelValue","disabled","readonly","style","class","tabindex","aria-label","aria-labelledby","placeholder","pt"]),a?(r.openBlock(),r.createElementBlock("i",{key:1,class:r.normalizeClass(r.unref(t).iconRight)},null,2)):r.createCommentVNode("",!0)],2)])}}}),sl=r.defineComponent({__name:"PrimeTextarea",props:{context:Object},setup(e){const t=e.context,n=t==null?void 0:t.attrs;function l(o){t==null||t.handlers.blur(o.target.value)}function a(o){t==null||t.node.input(o.target.value)}const s=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(o,f)=>{const p=r.resolveComponent("Textarea");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(p,{id:r.unref(t).id,modelValue:r.unref(t)._value,"onUpdate:modelValue":f[0]||(f[0]=g=>r.unref(t)._value=g),disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,style:r.normalizeStyle(r.unref(n).style),class:r.normalizeClass(r.unref(s)),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,placeholder:r.unref(n).placeholder,rows:r.unref(t).rows??3,pt:r.unref(n).pt,onInput:a,onBlur:l},null,8,["id","modelValue","disabled","readonly","style","class","tabindex","aria-label","aria-labelledby","placeholder","rows","pt"])])}}}),ol=r.defineComponent({__name:"PrimeKnob",props:{context:Object},setup(e){const t=e.context,n=t==null?void 0:t.attrs;function l(s){t==null||t.node.input(s),t==null||t.handlers.blur(s)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("Knob");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(f,{id:r.unref(t).id,modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,style:r.normalizeStyle(r.unref(n).style),class:r.normalizeClass(r.unref(a)),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,min:r.unref(n).min??0,max:r.unref(n).max??100,step:r.unref(n).step??void 0,size:r.unref(n).size??100,"stroke-width":r.unref(n).strokeWidth??14,"show-value":r.unref(n).showValue??!0,"value-color":r.unref(n).valueColor??void 0,"range-color":r.unref(n).rangeColor??void 0,"text-color":r.unref(n).textColor??void 0,"value-template":r.unref(n).valueTemplate??void 0,pt:r.unref(n).pt,onChange:l},null,8,["id","modelValue","disabled","readonly","style","class","tabindex","aria-label","aria-labelledby","min","max","step","size","stroke-width","show-value","value-color","range-color","text-color","value-template","pt"])])}}}),fl=r.defineComponent({__name:"PrimeMultiSelect",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o;t==null||t.node.input((o=i.context)==null?void 0:o._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("MultiSelect");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(f,{modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),"input-id":r.unref(t).id,disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"list-style":r.unref(n).style,class:r.normalizeClass(r.unref(a)),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,options:r.unref(n).options,"option-label":r.unref(n).optionLabel??"label","option-value":r.unref(n).optionValue??"value",filter:r.unref(n).filter??!1,pt:r.unref(n).pt,onChange:l},null,8,["modelValue","input-id","disabled","readonly","list-style","class","tabindex","aria-label","aria-labelledby","options","option-label","option-value","filter","pt"])])}}}),ul=r.defineComponent({__name:"PrimeListbox",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o;t==null||t.node.input((o=i.context)==null?void 0:o._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{var p;const f=r.resolveComponent("Listbox");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(f,{id:r.unref(t).id,modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=g=>r.unref(t)._value=g),disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"list-style":r.unref(n).style,class:r.normalizeClass(r.unref(a)),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,options:(p=r.unref(n))==null?void 0:p.options,"option-label":r.unref(n).optionLabel??"label","option-value":r.unref(n).optionValue??"value",multiple:r.unref(n).multiple??!1,filter:r.unref(n).filter??!1,"filter-icon":r.unref(n).filterIcon,"filter-placeholder":r.unref(n).filterPlaceholder,"filter-locale":r.unref(n).filterLocale,"filter-match-mode":r.unref(n).filterMatchMode,"auto-option-focus":r.unref(n).autoOptionFocus??!0,"select-on-focus":r.unref(n).selectOnFocus??!1,pt:r.unref(n).pt,onChange:l},null,8,["id","modelValue","disabled","readonly","list-style","class","tabindex","aria-label","aria-labelledby","options","option-label","option-value","multiple","filter","filter-icon","filter-placeholder","filter-locale","filter-match-mode","auto-option-focus","select-on-focus","pt"])])}}}),cl=r.defineComponent({__name:"PrimePassword",props:{context:Object},setup(e){const t=e.context,n=t==null?void 0:t.attrs;function l(o){t==null||t.handlers.blur(o.target.value)}function a(o){t==null||t.node.input(o.target.value)}const s=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(o,f)=>{const p=r.resolveComponent("Password");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(p,{modelValue:r.unref(t)._value,"onUpdate:modelValue":f[0]||(f[0]=g=>r.unref(t)._value=g),"input-id":r.unref(t).id,disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"input-style":r.unref(n).style,"input-class":r.unref(s),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,placeholder:r.unref(n).placeholder,"medium-regex":r.unref(n).mediumRegex??"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})","strong-regex":r.unref(n).strongRegex??"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})","prompt-label":r.unref(n).promptLabel,"weak-label":r.unref(n).weakLabel,"medium-label":r.unref(n).mediumLabel,"strong-label":r.unref(n).strongLabel,"hide-icon":r.unref(n).hideIcon??"pi pi-eye-slash","show-icon":r.unref(n).showIcon??"pi pi-eye",feedback:r.unref(t).feedback??!1,"toggle-mask":r.unref(t).toggleMask??!1,pt:r.unref(n).pt,onInput:a,onBlur:l},null,8,["modelValue","input-id","disabled","readonly","input-style","input-class","tabindex","aria-label","aria-labelledby","placeholder","medium-regex","strong-regex","prompt-label","weak-label","medium-label","strong-label","hide-icon","show-icon","feedback","toggle-mask","pt"])])}}}),pl=["for"],dl=r.defineComponent({__name:"PrimeRadioButton",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o;t==null||t.node.input((o=i.context)==null?void 0:o._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("RadioButton");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(n).options_class)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(n).options,p=>(r.openBlock(),r.createElementBlock("div",{key:p.value,class:r.normalizeClass(r.unref(n).option_class)},[r.createVNode(f,{modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=g=>r.unref(t)._value=g),name:r.unref(n).name,value:p.value,"input-style":r.unref(n).style,"input-class":r.unref(a),pt:r.unref(n).pt,onClick:l,onChange:l},null,8,["modelValue","name","value","input-style","input-class","pt"]),r.createElementVNode("label",{for:p.value},r.toDisplayString(p.label),9,pl)],2))),128))],2)}}}),ml=r.defineComponent({__name:"PrimeRating",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o;t==null||t.node.input((o=i.context)==null?void 0:o._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("Rating");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(f,{id:r.unref(t).id,modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,style:r.normalizeStyle(r.unref(n).style),class:r.normalizeClass(r.unref(a)),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,stars:r.unref(n).stars??5,cancel:r.unref(n).cancel??!1,"on-icon":r.unref(n).onIcon??"pi pi-star-fill","off-icon":r.unref(n).offIcon??"pi pi-star","cancel-icon":r.unref(n).cancelIcon??"pi pi-ban",pt:r.unref(n).pt,onChange:l},null,8,["id","modelValue","disabled","readonly","style","class","tabindex","aria-label","aria-labelledby","stars","cancel","on-icon","off-icon","cancel-icon","pt"])])}}}),bl=r.defineComponent({__name:"PrimeSlider",props:{context:Object},setup(e){const t=e.context,n=t==null?void 0:t.attrs;function l(s){t==null||t.node.input(s),t==null||t.handlers.blur(s)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("Slider");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(f,{id:r.unref(t).id,modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,style:r.normalizeStyle(r.unref(n).style),class:r.normalizeClass(r.unref(a)),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,min:r.unref(n).min??0,max:r.unref(n).max??100,step:r.unref(n).step??void 0,range:r.unref(n).range??!1,orientation:r.unref(n).orientation??"horizontal",pt:r.unref(n).pt,onChange:l},null,8,["id","modelValue","disabled","readonly","style","class","tabindex","aria-label","aria-labelledby","min","max","step","range","orientation","pt"])])}}}),yl=r.defineComponent({__name:"PrimeToggleButton",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o;t==null||t.node.input((o=i.context)==null?void 0:o._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("ToggleButton");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(f,{modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),"input-id":r.unref(t).id,disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"input-style":r.unref(n).style,"input-class":r.unref(a),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,"on-label":r.unref(n).onLabel??"Yes","off-label":r.unref(n).offLabel??"No","on-icon":r.unref(n).onIcon??"pi pi-check","off-icon":r.unref(n).offIcon??"pi pi-times","icon-pos":r.unref(n).iconPos??"left",pt:r.unref(n).pt,onChange:l},null,8,["modelValue","input-id","disabled","readonly","input-style","input-class","tabindex","aria-label","aria-labelledby","on-label","off-label","on-icon","off-icon","icon-pos","pt"])])}}}),hl=r.defineComponent({__name:"PrimeSelectButton",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o;t==null||t.node.input((o=i.context)==null?void 0:o._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("SelectButton");return r.openBlock(),r.createElementBlock("div",null,[r.createVNode(f,{id:r.unref(t).id,modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,style:r.normalizeStyle(r.unref(n).style),class:r.normalizeClass(r.unref(a)),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,options:r.unref(n).options,"option-label":r.unref(n).optionLabel??"label","option-value":r.unref(n).optionValue??"value","option-disabled":r.unref(n).optionDisabled,multiple:r.unref(n).multiple??!1,unselectable:r.unref(n).unselectable??!0,"data-key":r.unref(n).dataKey,pt:r.unref(n).pt,onChange:l},null,8,["id","modelValue","disabled","readonly","style","class","tabindex","aria-label","aria-labelledby","options","option-label","option-value","option-disabled","multiple","unselectable","data-key","pt"])])}}}),_l={key:0,class:"formkit-prime-left"},gl={key:1,class:"formkit-prime-right"},$l=r.defineComponent({__name:"PrimeTriStateCheckbox",props:{context:Object},setup(e){const i=e,t=i.context,n=t==null?void 0:t.attrs;function l(s){var o;t==null||t.node.input((o=i.context)==null?void 0:o._value)}const a=r.computed(()=>t!=null&&t.state.validationVisible&&!(t!=null&&t.state.valid)?`${n==null?void 0:n.class} p-invalid`:n==null?void 0:n.class);return(s,o)=>{const f=r.resolveComponent("TriStateCheckbox");return r.openBlock(),r.createElementBlock("div",null,[r.unref(t).attrs.labelLeft?(r.openBlock(),r.createElementBlock("span",_l,r.toDisplayString(r.unref(t).attrs.labelLeft),1)):r.createCommentVNode("",!0),r.createVNode(f,{modelValue:r.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>r.unref(t)._value=p),"input-id":r.unref(t).id,disabled:r.unref(n)._disabled??!1,readonly:r.unref(n)._readonly??!1,"input-style":r.unref(n).style,"input-class":r.unref(a),tabindex:r.unref(n).tabindex,"aria-label":r.unref(n).ariaLabel,"aria-labelledby":r.unref(n).ariaLabelledby,pt:r.unref(n).pt,onClick:l},null,8,["modelValue","input-id","disabled","readonly","input-style","input-class","tabindex","aria-label","aria-labelledby","pt"]),r.unref(t).attrs.labelRight?(r.openBlock(),r.createElementBlock("span",gl,r.toDisplayString(r.unref(t).attrs.labelRight),1)):r.createCommentVNode("",!0)])}}}),tn=M(al,{props:["iconRight","iconLeft"]}),nn=M(nl,{props:["iconRight","iconLeft"]}),rn=M(tl,{props:[]}),ln=M(cl,{props:["feedback","toggleMask"]}),an=M(sl,{props:["rows"]}),sn=M(Yr,{props:[]}),on=M(ll,{props:[]}),fn=M(el,{props:[]}),un=M(Gr,{props:[]}),cn=M(fl,{props:[]}),pn=M(ul,{props:[]}),dn=M(qr,{props:[]}),mn=M(bl,{props:[]}),bn=M(ml,{props:[]}),yn=M(dl,{props:[]}),hn=M(Qr,{props:[]}),_n=M(ol,{props:[]}),gn=M(Xr,{props:[]}),$n=M(yl,{props:[]}),kn=M(hl,{props:[]}),Cn=M($l,{props:[]}),kl={primeInputText:tn,primeInputNumber:nn,primeInputMask:rn,primePassword:ln,primeCheckbox:sn,primeInputSwitch:on,primeTextarea:an,primeEditor:fn,primeDropdown:un,primeMultiSelect:cn,primeCalendar:dn,primeSlider:mn,primeChips:hn,primeKnob:_n,primeRating:bn,primeRadioButton:yn,primeColorPicker:gn,primeToggleButton:$n,primeListbox:pn,primeSelectButton:kn,primeTriStateCheckbox:Cn};P.primeCalendarDefinition=dn,P.primeCheckboxDefinition=sn,P.primeChipsDefinition=hn,P.primeColorPickerDefinition=gn,P.primeDropdownDefinition=un,P.primeEditorDefinition=fn,P.primeInputMaskDefinition=rn,P.primeInputNumberDefinition=nn,P.primeInputSwitchDefinition=on,P.primeInputTextDefinition=tn,P.primeInputs=kl,P.primeKnobDefinition=_n,P.primeListboxDefinition=pn,P.primeMultiSelectDefinition=cn,P.primePasswordDefinition=ln,P.primeRadioButtonDefinition=yn,P.primeRatingDefinition=bn,P.primeSelectButtonDefinition=kn,P.primeSliderDefinition=mn,P.primeTextareaDefinition=an,P.primeToggleButtonDefinition=$n,P.primeTriStateCheckboxDefinition=Cn,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sfxcode/formkit-primevue",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/sfxcode/formkit-primevue",
@@ -35,17 +35,17 @@
35
35
  },
36
36
  "types": "./dist/index.d.ts",
37
37
  "dependencies": {
38
- "@formkit/i18n": "^0.18.1",
39
- "@formkit/vue": "^0.18.1",
38
+ "@formkit/i18n": "^0.18.3",
39
+ "@formkit/vue": "^0.18.3",
40
40
  "primeicons": "^6.0.1",
41
- "primevue": "^3.32.0"
41
+ "primevue": "^3.32.1"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@antfu/eslint-config": "^0.40.2",
45
- "@types/node": "^20.5.0",
45
+ "@types/node": "^20.5.1",
46
46
  "@unocss/preset-icons": "^0.55.1",
47
47
  "@unocss/preset-uno": "0.55.1",
48
- "@vitejs/plugin-vue": "^4.2.3",
48
+ "@vitejs/plugin-vue": "^4.3.1",
49
49
  "@vue/babel-preset-app": "^5.0.8",
50
50
  "@vue/compiler-sfc": "^3.3.4",
51
51
  "@vue/server-renderer": "^3.3.4",
@@ -60,13 +60,13 @@
60
60
  "eslint": "^8.47.0",
61
61
  "json-editor-vue": "^0.10.6",
62
62
  "quill": "^1.3.7",
63
- "sass": "^1.65.1",
64
- "tslib": "^2.6.1",
63
+ "sass": "^1.66.0",
64
+ "tslib": "^2.6.2",
65
65
  "typescript": "^5.1.6",
66
66
  "unocss": "^0.55.1",
67
67
  "unplugin-auto-import": "^0.16.6",
68
68
  "unplugin-vue-components": "^0.25.1",
69
- "vanilla-jsoneditor": "^0.17.9",
69
+ "vanilla-jsoneditor": "^0.17.10",
70
70
  "vite": "^4.4.9",
71
71
  "vite-plugin-dts": "^3.5.2",
72
72
  "vite-plugin-eslint": "^1.8.1",