@romainbx/wpic-components 0.0.3 → 0.0.5

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.
@@ -2,7 +2,7 @@
2
2
  * vee-validate v4.12.8
3
3
  * (c) 2024 Abdelrahman Awad
4
4
  * @license MIT
5
- */function Ae(t){return typeof t=="function"}function wc(t){return t==null}const _n=t=>t!==null&&!!t&&typeof t=="object"&&!Array.isArray(t);function Uo(t){return Number(t)>=0}function um(t){const e=parseFloat(t);return isNaN(e)?t:e}function fm(t){return typeof t=="object"&&t!==null}function hm(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}function xc(t){if(!fm(t)||hm(t)!=="[object Object]")return!1;if(Object.getPrototypeOf(t)===null)return!0;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function bi(t,e){return Object.keys(e).forEach(n=>{if(xc(e[n])&&xc(t[n])){t[n]||(t[n]={}),bi(t[n],e[n]);return}t[n]=e[n]}),t}function vi(t){const e=t.split(".");if(!e.length)return"";let n=String(e[0]);for(let r=1;r<e.length;r++){if(Uo(e[r])){n+=`[${e[r]}]`;continue}n+=`.${e[r]}`}return n}const Sc={};function Dt(t,e){mm(t,e),Sc[t]=e}function pm(t){return Sc[t]}function mm(t,e){if(!Ae(e))throw new Error(`Extension Error: The validator '${t}' must be a function.`)}function Mc(t,e,n){typeof n.value=="object"&&(n.value=pe(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||e==="__proto__"?Object.defineProperty(t,e,n):t[e]=n.value}function pe(t){if(typeof t!="object")return t;var e=0,n,r,i,s=Object.prototype.toString.call(t);if(s==="[object Object]"?i=Object.create(t.__proto__||null):s==="[object Array]"?i=Array(t.length):s==="[object Set]"?(i=new Set,t.forEach(function(o){i.add(pe(o))})):s==="[object Map]"?(i=new Map,t.forEach(function(o,a){i.set(pe(a),pe(o))})):s==="[object Date]"?i=new Date(+t):s==="[object RegExp]"?i=new RegExp(t.source,t.flags):s==="[object DataView]"?i=new t.constructor(pe(t.buffer)):s==="[object ArrayBuffer]"?i=t.slice(0):s.slice(-6)==="Array]"&&(i=new t.constructor(t)),i){for(r=Object.getOwnPropertySymbols(t);e<r.length;e++)Mc(i,r[e],Object.getOwnPropertyDescriptor(t,r[e]));for(e=0,r=Object.getOwnPropertyNames(t);e<r.length;e++)Object.hasOwnProperty.call(i,n=r[e])&&i[n]===t[n]||Mc(i,n,Object.getOwnPropertyDescriptor(t,n))}return i||t}const ki=Symbol("vee-validate-form"),Oc=Symbol("vee-validate-field-instance"),gs=Symbol("Default empty value"),gm=typeof window<"u";function qo(t){return Ae(t)&&!!t.__locatorRef}function At(t){return!!t&&Ae(t.parse)&&t.__type==="VVTypedSchema"}function ys(t){return!!t&&Ae(t.validate)}function wi(t){return t==="checkbox"||t==="radio"}function ym(t){return _n(t)||Array.isArray(t)}function bm(t){return Array.isArray(t)?t.length===0:_n(t)&&Object.keys(t).length===0}function bs(t){return/^\[.+\]$/i.test(t)}function vm(t){return Cc(t)&&t.multiple}function Cc(t){return t.tagName==="SELECT"}function km(t,e){const n=![!1,null,void 0,0].includes(e.multiple)&&!Number.isNaN(e.multiple);return t==="select"&&"multiple"in e&&n}function wm(t,e){return!km(t,e)&&e.type!=="file"&&!wi(e.type)}function Tc(t){return Ko(t)&&t.target&&"submit"in t.target}function Ko(t){return t?!!(typeof Event<"u"&&Ae(Event)&&t instanceof Event||t&&t.srcElement):!1}function Ec(t,e){return e in t&&t[e]!==gs}function qe(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,i;if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!qe(t[r],e[r]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;for(r of t.entries())if(!qe(r[1],e.get(r[0])))return!1;return!0}if(_c(t)&&_c(e))return!(t.size!==e.size||t.name!==e.name||t.lastModified!==e.lastModified||t.type!==e.type);if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(t[r]!==e[r])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();for(i=Object.keys(t),n=i.length,r=n;r--!==0;){var s=i[r];if(!qe(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function _c(t){return gm?t instanceof File:!1}function Jo(t){return bs(t)?t.replace(/\[|\]/gi,""):t}function nt(t,e,n){return t?bs(e)?t[Jo(e)]:(e||"").split(/\.|\[(\d+)\]/).filter(Boolean).reduce((i,s)=>ym(i)&&s in i?i[s]:n,t):n}function dn(t,e,n){if(bs(e)){t[Jo(e)]=n;return}const r=e.split(/\.|\[(\d+)\]/).filter(Boolean);let i=t;for(let s=0;s<r.length;s++){if(s===r.length-1){i[r[s]]=n;return}(!(r[s]in i)||wc(i[r[s]]))&&(i[r[s]]=Uo(r[s+1])?[]:{}),i=i[r[s]]}}function Go(t,e){if(Array.isArray(t)&&Uo(e)){t.splice(Number(e),1);return}_n(t)&&delete t[e]}function Nc(t,e){if(bs(e)){delete t[Jo(e)];return}const n=e.split(/\.|\[(\d+)\]/).filter(Boolean);let r=t;for(let s=0;s<n.length;s++){if(s===n.length-1){Go(r,n[s]);break}if(!(n[s]in r)||wc(r[n[s]]))break;r=r[n[s]]}const i=n.map((s,o)=>nt(t,n.slice(0,o).join(".")));for(let s=i.length-1;s>=0;s--)if(bm(i[s])){if(s===0){Go(t,n[0]);continue}Go(i[s-1],n[s-1])}}function rt(t){return Object.keys(t)}function Zo(t,e=void 0){const n=d.getCurrentInstance();return(n==null?void 0:n.provides[t])||d.inject(t,e)}function Dc(t,e,n){if(Array.isArray(t)){const r=[...t],i=r.findIndex(s=>qe(s,e));return i>=0?r.splice(i,1):r.push(e),r}return qe(t,e)?n:e}function xm(t,e){let n,r;return function(...i){const s=this;return n||(n=!0,setTimeout(()=>n=!1,e),r=t.apply(s,i)),r}}function Ac(t,e=0){let n=null,r=[];return function(...i){return n&&clearTimeout(n),n=setTimeout(()=>{const s=t(...i);r.forEach(o=>o(s)),r=[]},e),new Promise(s=>r.push(s))}}function Sm(t,e){return _n(e)&&e.number?um(t):t}function Xo(t,e){let n;return async function(...i){const s=t(...i);n=s;const o=await s;return s!==n?o:(n=void 0,e(o,i))}}function Qo(t){return Array.isArray(t)?t:t?[t]:[]}function vs(t,e){const n={};for(const r in t)e.includes(r)||(n[r]=t[r]);return n}function Mm(t){let e=null,n=[];return function(...r){const i=d.nextTick(()=>{if(e!==i)return;const s=t(...r);n.forEach(o=>o(s)),n=[],e=null});return e=i,new Promise(s=>n.push(s))}}function ea(t,e,n){return e.slots.default?typeof t=="string"||!t?e.slots.default(n()):{default:()=>{var r,i;return(i=(r=e.slots).default)===null||i===void 0?void 0:i.call(r,n())}}:e.slots.default}function ta(t){if(Vc(t))return t._value}function Vc(t){return"_value"in t}function Om(t){return t.type==="number"||t.type==="range"?Number.isNaN(t.valueAsNumber)?t.value:t.valueAsNumber:t.value}function ks(t){if(!Ko(t))return t;const e=t.target;if(wi(e.type)&&Vc(e))return ta(e);if(e.type==="file"&&e.files){const n=Array.from(e.files);return e.multiple?n:n[0]}if(vm(e))return Array.from(e.options).filter(n=>n.selected&&!n.disabled).map(ta);if(Cc(e)){const n=Array.from(e.options).find(r=>r.selected);return n?ta(n):e.value}return Om(e)}function Bc(t){const e={};return Object.defineProperty(e,"_$$isNormalized",{value:!0,writable:!1,enumerable:!1,configurable:!1}),t?_n(t)&&t._$$isNormalized?t:_n(t)?Object.keys(t).reduce((n,r)=>{const i=Cm(t[r]);return t[r]!==!1&&(n[r]=Pc(i)),n},e):typeof t!="string"?e:t.split("|").reduce((n,r)=>{const i=Tm(r);return i.name&&(n[i.name]=Pc(i.params)),n},e):e}function Cm(t){return t===!0?[]:Array.isArray(t)||_n(t)?t:[t]}function Pc(t){const e=n=>typeof n=="string"&&n[0]==="@"?Em(n.slice(1)):n;return Array.isArray(t)?t.map(e):t instanceof RegExp?[t]:Object.keys(t).reduce((n,r)=>(n[r]=e(t[r]),n),{})}const Tm=t=>{let e=[];const n=t.split(":")[0];return t.includes(":")&&(e=t.split(":").slice(1).join(":").split(",")),{name:n,params:e}};function Em(t){const e=n=>nt(n,t)||n[t];return e.__locatorRef=t,e}function _m(t){return Array.isArray(t)?t.filter(qo):rt(t).filter(e=>qo(t[e])).map(e=>t[e])}let Nm=Object.assign({},{generateMessage:({field:t})=>`${t} is not valid.`,bails:!0,validateOnBlur:!0,validateOnChange:!0,validateOnInput:!1,validateOnModelUpdate:!0});const tr=()=>Nm;async function Ic(t,e,n={}){const r=n==null?void 0:n.bails,i={name:(n==null?void 0:n.name)||"{field}",rules:e,label:n==null?void 0:n.label,bails:r??!0,formData:(n==null?void 0:n.values)||{}},o=(await Dm(i,t)).errors;return{errors:o,valid:!o.length}}async function Dm(t,e){if(At(t.rules)||ys(t.rules))return Vm(e,t.rules);if(Ae(t.rules)||Array.isArray(t.rules)){const o={field:t.label||t.name,name:t.name,label:t.label,form:t.formData,value:e},a=Array.isArray(t.rules)?t.rules:[t.rules],l=a.length,c=[];for(let u=0;u<l;u++){const f=a[u],h=await f(e,o);if(!(typeof h!="string"&&!Array.isArray(h)&&h)){if(Array.isArray(h))c.push(...h);else{const m=typeof h=="string"?h:$c(o);c.push(m)}if(t.bails)return{errors:c}}}return{errors:c}}const n=Object.assign(Object.assign({},t),{rules:Bc(t.rules)}),r=[],i=Object.keys(n.rules),s=i.length;for(let o=0;o<s;o++){const a=i[o],l=await Bm(n,e,{name:a,params:n.rules[a]});if(l.error&&(r.push(l.error),t.bails))return{errors:r}}return{errors:r}}function Am(t){return!!t&&t.name==="ValidationError"}function Rc(t){return{__type:"VVTypedSchema",async parse(n){var r;try{return{output:await t.validate(n,{abortEarly:!1}),errors:[]}}catch(i){if(!Am(i))throw i;if(!(!((r=i.inner)===null||r===void 0)&&r.length)&&i.errors.length)return{errors:[{path:i.path,errors:i.errors}]};const s=i.inner.reduce((o,a)=>{const l=a.path||"";return o[l]||(o[l]={errors:[],path:l}),o[l].errors.push(...a.errors),o},{});return{errors:Object.values(s)}}}}}async function Vm(t,e){const r=await(At(e)?e:Rc(e)).parse(t),i=[];for(const s of r.errors)s.errors.length&&i.push(...s.errors);return{errors:i}}async function Bm(t,e,n){const r=pm(n.name);if(!r)throw new Error(`No such validator '${n.name}' exists.`);const i=Pm(n.params,t.formData),s={field:t.label||t.name,name:t.name,label:t.label,value:e,form:t.formData,rule:Object.assign(Object.assign({},n),{params:i})},o=await r(e,i,s);return typeof o=="string"?{error:o}:{error:o?void 0:$c(s)}}function $c(t){const e=tr().generateMessage;return e?e(t):"Field is invalid"}function Pm(t,e){const n=r=>qo(r)?r(e):r;return Array.isArray(t)?t.map(n):Object.keys(t).reduce((r,i)=>(r[i]=n(t[i]),r),{})}async function Im(t,e){const r=await(At(t)?t:Rc(t)).parse(pe(e)),i={},s={};for(const o of r.errors){const a=o.errors,l=(o.path||"").replace(/\["(\d+)"\]/g,(c,u)=>`[${u}]`);i[l]={valid:!a.length,errors:a},a.length&&(s[l]=a[0])}return{valid:!r.errors.length,results:i,errors:s,values:r.value}}async function Rm(t,e,n){const i=rt(t).map(async c=>{var u,f,h;const p=(u=n==null?void 0:n.names)===null||u===void 0?void 0:u[c],m=await Ic(nt(e,c),t[c],{name:(p==null?void 0:p.name)||c,label:p==null?void 0:p.label,values:e,bails:(h=(f=n==null?void 0:n.bailsMap)===null||f===void 0?void 0:f[c])!==null&&h!==void 0?h:!0});return Object.assign(Object.assign({},m),{path:c})});let s=!0;const o=await Promise.all(i),a={},l={};for(const c of o)a[c.path]={valid:c.valid,errors:c.errors},c.valid||(s=!1,l[c.path]=c.errors[0]);return{valid:s,results:a,errors:l}}let Lc=0;function $m(t,e){const{value:n,initialValue:r,setInitialValue:i}=Lm(t,e.modelValue,e.form);if(!e.form){let h=function(p){var m;"value"in p&&(n.value=p.value),"errors"in p&&c(p.errors),"touched"in p&&(f.touched=(m=p.touched)!==null&&m!==void 0?m:f.touched),"initialValue"in p&&i(p.initialValue)};const{errors:l,setErrors:c}=jm(),u=Lc>=Number.MAX_SAFE_INTEGER?0:++Lc,f=zm(n,r,l,e.schema);return{id:u,path:t,value:n,initialValue:r,meta:f,flags:{pendingUnmount:{[u]:!1},pendingReset:!1},errors:l,setState:h}}const s=e.form.createPathState(t,{bails:e.bails,label:e.label,type:e.type,validate:e.validate,schema:e.schema}),o=d.computed(()=>s.errors);function a(l){var c,u,f;"value"in l&&(n.value=l.value),"errors"in l&&((c=e.form)===null||c===void 0||c.setFieldError(d.unref(t),l.errors)),"touched"in l&&((u=e.form)===null||u===void 0||u.setFieldTouched(d.unref(t),(f=l.touched)!==null&&f!==void 0?f:!1)),"initialValue"in l&&i(l.initialValue)}return{id:Array.isArray(s.id)?s.id[s.id.length-1]:s.id,path:t,value:n,errors:o,meta:s,initialValue:r,flags:s.__flags,setState:a}}function Lm(t,e,n){const r=d.ref(d.unref(e));function i(){return n?nt(n.initialValues.value,d.unref(t),d.unref(r)):d.unref(r)}function s(c){if(!n){r.value=c;return}n.setFieldInitialValue(d.unref(t),c,!0)}const o=d.computed(i);if(!n)return{value:d.ref(i()),initialValue:o,setInitialValue:s};const a=Fm(e,n,o,t);return n.stageInitialValue(d.unref(t),a,!0),{value:d.computed({get(){return nt(n.values,d.unref(t))},set(c){n.setFieldValue(d.unref(t),c,!1)}}),initialValue:o,setInitialValue:s}}function Fm(t,e,n,r){return d.isRef(t)?d.unref(t):t!==void 0?t:nt(e.values,d.unref(r),d.unref(n))}function zm(t,e,n,r){const i=d.computed(()=>{var o,a,l;return(l=(a=(o=d.toValue(r))===null||o===void 0?void 0:o.describe)===null||a===void 0?void 0:a.call(o).required)!==null&&l!==void 0?l:!1}),s=d.reactive({touched:!1,pending:!1,valid:!0,required:i,validated:!!d.unref(n).length,initialValue:d.computed(()=>d.unref(e)),dirty:d.computed(()=>!qe(d.unref(t),d.unref(e)))});return d.watch(n,o=>{s.valid=!o.length},{immediate:!0,flush:"sync"}),s}function jm(){const t=d.ref([]);return{errors:t,setErrors:e=>{t.value=Qo(e)}}}function Fc(t){process.env.NODE_ENV!=="production"&&dm({id:"vee-validate-devtools-plugin",label:"VeeValidate Plugin",packageName:"vee-validate",homepage:"https://vee-validate.logaretm.com/v4",app:t,logo:"https://vee-validate.logaretm.com/v4/logo.png"},Ym)}const xi={},Si={};let un;const Tr=xm(()=>{setTimeout(async()=>{await d.nextTick(),un==null||un.sendInspectorState(Er),un==null||un.sendInspectorTree(Er)},100)},100);function Wm(t){const e=d.getCurrentInstance();if(!un){const n=e==null?void 0:e.appContext.app;if(!n)return;Fc(n)}xi[t.formId]=Object.assign({},t),xi[t.formId]._vm=e,d.onUnmounted(()=>{delete xi[t.formId],Tr()}),Tr()}function Hm(t){const e=d.getCurrentInstance();if(!un){const n=e==null?void 0:e.appContext.app;if(!n)return;Fc(n)}Si[t.id]=Object.assign({},t),Si[t.id]._vm=e,d.onUnmounted(()=>{delete Si[t.id],Tr()}),Tr()}const Er="vee-validate-inspector",it={error:12405579,success:448379,unknown:5522283,white:16777215,black:0,blue:218007,purple:12157168,orange:16099682,gray:12304330};let Ce=null;function Ym(t){un=t,t.addInspector({id:Er,icon:"rule",label:"vee-validate",noSelectionText:"Select a vee-validate node to inspect",actions:[{icon:"done_outline",tooltip:"Validate selected item",action:async()=>{if(!Ce){console.error("There is not a valid selected vee-validate node or component");return}if(Ce.type==="field"){await Ce.field.validate();return}if(Ce.type==="form"){await Ce.form.validate();return}Ce.type==="pathState"&&await Ce.form.validateField(Ce.state.path)}},{icon:"delete_sweep",tooltip:"Clear validation state of the selected item",action:()=>{if(!Ce){console.error("There is not a valid selected vee-validate node or component");return}if(Ce.type==="field"){Ce.field.resetField();return}Ce.type==="form"&&Ce.form.resetForm(),Ce.type==="pathState"&&Ce.form.resetField(Ce.state.path)}}]}),t.on.getInspectorTree(e=>{if(e.inspectorId!==Er)return;const n=Object.values(xi),r=Object.values(Si);e.rootNodes=[...n.map(Um),...r.map(i=>Km(i))]}),t.on.getInspectorState((e,n)=>{if(e.inspectorId!==Er||n.currentTab!==`custom-inspector:${Er}`)return;const{form:r,field:i,state:s,type:o}=Jm(e.nodeId);if(r&&o==="form"){e.state=Gm(r),Ce={type:"form",form:r};return}if(s&&o==="pathState"&&r){e.state=jc(s),Ce={type:"pathState",state:s,form:r};return}if(i&&o==="field"){e.state=jc({errors:i.errors.value,dirty:i.meta.dirty,valid:i.meta.valid,touched:i.meta.touched,value:i.value.value,initialValue:i.meta.initialValue}),Ce={field:i,type:"field"};return}Ce=null})}function Um(t){const{textColor:e,bgColor:n}=Wc(t.meta.value.valid),r={};Object.values(t.getAllPathStates()).forEach(o=>{dn(r,d.unref(o.path),qm(o,t))});function i(o,a=[]){const l=[...a].pop();return"id"in o?Object.assign(Object.assign({},o),{label:l||o.label}):_n(o)?{id:`${a.join(".")}`,label:l||"",children:Object.keys(o).map(c=>i(o[c],[...a,c]))}:Array.isArray(o)?{id:`${a.join(".")}`,label:`${l}[]`,children:o.map((c,u)=>i(c,[...a,String(u)]))}:{id:"",label:"",children:[]}}const{children:s}=i(r);return{id:na(t),label:"Form",children:s,tags:[{label:"Form",textColor:e,backgroundColor:n},{label:`${t.getAllPathStates().length} fields`,textColor:it.white,backgroundColor:it.unknown}]}}function qm(t,e){return{id:na(e,t),label:d.unref(t.path),tags:zc(t.multiple,t.fieldsCount,t.type,t.valid,e)}}function Km(t,e){return{id:na(e,t),label:d.unref(t.name),tags:zc(!1,1,t.type,t.meta.valid,e)}}function zc(t,e,n,r,i){const{textColor:s,bgColor:o}=Wc(r);return[t?void 0:{label:"Field",textColor:s,backgroundColor:o},i?void 0:{label:"Standalone",textColor:it.black,backgroundColor:it.gray},n==="checkbox"?{label:"Checkbox",textColor:it.white,backgroundColor:it.blue}:void 0,n==="radio"?{label:"Radio",textColor:it.white,backgroundColor:it.purple}:void 0,t?{label:"Multiple",textColor:it.black,backgroundColor:it.orange}:void 0].filter(Boolean)}function na(t,e){const n=e?"path"in e?"pathState":"field":"form",r=e?"path"in e?e==null?void 0:e.path:d.unref(e==null?void 0:e.name):"",i={f:t==null?void 0:t.formId,ff:r,type:n};return btoa(encodeURIComponent(JSON.stringify(i)))}function Jm(t){try{const e=JSON.parse(decodeURIComponent(atob(t))),n=xi[e.f];if(!n&&e.ff){const i=Si[e.ff];return i?{type:e.type,field:i}:{}}if(!n)return{};const r=n.getPathState(e.ff);return{type:e.type,form:n,state:r}}catch{}return{}}function jc(t){return{"Field state":[{key:"errors",value:t.errors},{key:"initialValue",value:t.initialValue},{key:"currentValue",value:t.value},{key:"touched",value:t.touched},{key:"dirty",value:t.dirty},{key:"valid",value:t.valid}]}}function Gm(t){const{errorBag:e,meta:n,values:r,isSubmitting:i,isValidating:s,submitCount:o}=t;return{"Form state":[{key:"submitCount",value:o.value},{key:"isSubmitting",value:i.value},{key:"isValidating",value:s.value},{key:"touched",value:n.value.touched},{key:"dirty",value:n.value.dirty},{key:"valid",value:n.value.valid},{key:"initialValues",value:n.value.initialValues},{key:"currentValues",value:r},{key:"errors",value:rt(e.value).reduce((a,l)=>{var c;const u=(c=e.value[l])===null||c===void 0?void 0:c[0];return u&&(a[l]=u),a},{})}]}}function Wc(t){return{bgColor:t?it.success:it.error,textColor:t?it.black:it.white}}function Zm(t,e,n){return wi(n==null?void 0:n.type)?Qm(t,e,n):Hc(t,e,n)}function Hc(t,e,n){const{initialValue:r,validateOnMount:i,bails:s,type:o,checkedValue:a,label:l,validateOnValueUpdate:c,uncheckedValue:u,controlled:f,keepValueOnUnmount:h,syncVModel:p,form:m}=Xm(n),y=f?Zo(ki):void 0,g=m||y,k=d.computed(()=>vi(d.toValue(t))),x=d.computed(()=>{if(d.toValue(g==null?void 0:g.schema))return;const K=d.unref(e);return ys(K)||At(K)||Ae(K)||Array.isArray(K)?K:Bc(K)}),O=!Ae(x.value)&&At(d.toValue(e)),{id:b,value:C,initialValue:v,meta:T,setState:B,errors:V,flags:F}=$m(k,{modelValue:r,form:g,bails:s,label:l,type:o,validate:x.value?j:void 0,schema:O?e:void 0}),te=d.computed(()=>V.value[0]);p&&eg({value:C,prop:p,handleChange:ie,shouldValidate:()=>c&&!F.pendingReset});const G=(P,K=!1)=>{T.touched=!0,K&&oe()};async function ne(P){var K,fe;if(g!=null&&g.validateSchema){const{results:ae}=await g.validateSchema(P);return(K=ae[d.toValue(k)])!==null&&K!==void 0?K:{valid:!0,errors:[]}}return x.value?Ic(C.value,x.value,{name:d.toValue(k),label:d.toValue(l),values:(fe=g==null?void 0:g.values)!==null&&fe!==void 0?fe:{},bails:s}):{valid:!0,errors:[]}}const oe=Xo(async()=>(T.pending=!0,T.validated=!0,ne("validated-only")),P=>(F.pendingUnmount[ke.id]||(B({errors:P.errors}),T.pending=!1,T.valid=P.valid),P)),re=Xo(async()=>ne("silent"),P=>(T.valid=P.valid,P));function j(P){return(P==null?void 0:P.mode)==="silent"?re():oe()}function ie(P,K=!0){const fe=ks(P);ct(fe,K)}d.onMounted(()=>{if(i)return oe();(!g||!g.validateSchema)&&re()});function ue(P){T.touched=P}function _e(P){var K;const fe=P&&"value"in P?P.value:v.value;B({value:pe(fe),initialValue:pe(fe),touched:(K=P==null?void 0:P.touched)!==null&&K!==void 0?K:!1,errors:(P==null?void 0:P.errors)||[]}),T.pending=!1,T.validated=!1,re()}const Qe=d.getCurrentInstance();function ct(P,K=!0){C.value=Qe&&p?Sm(P,Qe.props.modelModifiers):P,(K?oe:re)()}function bt(P){B({errors:Array.isArray(P)?P:[P]})}const vt=d.computed({get(){return C.value},set(P){ct(P,c)}}),ke={id:b,name:k,label:l,value:vt,meta:T,errors:V,errorMessage:te,type:o,checkedValue:a,uncheckedValue:u,bails:s,keepValueOnUnmount:h,resetField:_e,handleReset:()=>_e(),validate:j,handleChange:ie,handleBlur:G,setState:B,setTouched:ue,setErrors:bt,setValue:ct};if(d.provide(Oc,ke),d.isRef(e)&&typeof d.unref(e)!="function"&&d.watch(e,(P,K)=>{qe(P,K)||(T.validated?oe():re())},{deep:!0}),process.env.NODE_ENV!=="production"&&(ke._vm=d.getCurrentInstance(),d.watch(()=>Object.assign(Object.assign({errors:V.value},T),{value:C.value}),Tr,{deep:!0}),g||Hm(ke)),!g)return ke;const et=d.computed(()=>{const P=x.value;return!P||Ae(P)||ys(P)||At(P)||Array.isArray(P)?{}:Object.keys(P).reduce((K,fe)=>{const ae=_m(P[fe]).map(Re=>Re.__locatorRef).reduce((Re,$e)=>{const dt=nt(g.values,$e)||g.values[$e];return dt!==void 0&&(Re[$e]=dt),Re},{});return Object.assign(K,ae),K},{})});return d.watch(et,(P,K)=>{if(!Object.keys(P).length)return;!qe(P,K)&&(T.validated?oe():re())}),d.onBeforeUnmount(()=>{var P;const K=(P=d.toValue(ke.keepValueOnUnmount))!==null&&P!==void 0?P:d.toValue(g.keepValuesOnUnmount),fe=d.toValue(k);if(K||!g||F.pendingUnmount[ke.id]){g==null||g.removePathState(fe,b);return}F.pendingUnmount[ke.id]=!0;const ae=g.getPathState(fe);if(Array.isArray(ae==null?void 0:ae.id)&&(ae!=null&&ae.multiple)?ae!=null&&ae.id.includes(ke.id):(ae==null?void 0:ae.id)===ke.id){if(ae!=null&&ae.multiple&&Array.isArray(ae.value)){const $e=ae.value.findIndex(dt=>qe(dt,d.toValue(ke.checkedValue)));if($e>-1){const dt=[...ae.value];dt.splice($e,1),g.setFieldValue(fe,dt)}Array.isArray(ae.id)&&ae.id.splice(ae.id.indexOf(ke.id),1)}else g.unsetPathValue(d.toValue(k));g.removePathState(fe,b)}}),ke}function Xm(t){const e=()=>({initialValue:void 0,validateOnMount:!1,bails:!0,label:void 0,validateOnValueUpdate:!0,keepValueOnUnmount:void 0,syncVModel:!1,controlled:!0}),n=!!(t!=null&&t.syncVModel),r=typeof(t==null?void 0:t.syncVModel)=="string"?t.syncVModel:(t==null?void 0:t.modelPropName)||"modelValue",i=n&&!("initialValue"in(t||{}))?ra(d.getCurrentInstance(),r):t==null?void 0:t.initialValue;if(!t)return Object.assign(Object.assign({},e()),{initialValue:i});const s="valueProp"in t?t.valueProp:t.checkedValue,o="standalone"in t?!t.standalone:t.controlled,a=(t==null?void 0:t.modelPropName)||(t==null?void 0:t.syncVModel)||!1;return Object.assign(Object.assign(Object.assign({},e()),t||{}),{initialValue:i,controlled:o??!0,checkedValue:s,syncVModel:a})}function Qm(t,e,n){const r=n!=null&&n.standalone?void 0:Zo(ki),i=n==null?void 0:n.checkedValue,s=n==null?void 0:n.uncheckedValue;function o(a){const l=a.handleChange,c=d.computed(()=>{const f=d.toValue(a.value),h=d.toValue(i);return Array.isArray(f)?f.findIndex(p=>qe(p,h))>=0:qe(h,f)});function u(f,h=!0){var p,m;if(c.value===((p=f==null?void 0:f.target)===null||p===void 0?void 0:p.checked)){h&&a.validate();return}const y=d.toValue(t),g=r==null?void 0:r.getPathState(y),k=ks(f);let x=(m=d.toValue(i))!==null&&m!==void 0?m:k;r&&(g!=null&&g.multiple)&&g.type==="checkbox"?x=Dc(nt(r.values,y)||[],x,void 0):(n==null?void 0:n.type)==="checkbox"&&(x=Dc(d.toValue(a.value),x,d.toValue(s))),l(x,h)}return Object.assign(Object.assign({},a),{checked:c,checkedValue:i,uncheckedValue:s,handleChange:u})}return o(Hc(t,e,n))}function eg({prop:t,value:e,handleChange:n,shouldValidate:r}){const i=d.getCurrentInstance();if(!i||!t){process.env.NODE_ENV!=="production"&&console.warn("Failed to setup model events because `useField` was not called in setup.");return}const s=typeof t=="string"?t:"modelValue",o=`update:${s}`;s in i.props&&(d.watch(e,a=>{qe(a,ra(i,s))||i.emit(o,a)}),d.watch(()=>ra(i,s),a=>{if(a===gs&&e.value===void 0)return;const l=a===gs?void 0:a;qe(l,e.value)||n(l,r())}))}function ra(t,e){if(t)return t.props[e]}const tg=d.defineComponent({name:"Field",inheritAttrs:!1,props:{as:{type:[String,Object],default:void 0},name:{type:String,required:!0},rules:{type:[Object,String,Function],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnBlur:{type:Boolean,default:void 0},validateOnChange:{type:Boolean,default:void 0},validateOnInput:{type:Boolean,default:void 0},validateOnModelUpdate:{type:Boolean,default:void 0},bails:{type:Boolean,default:()=>tr().bails},label:{type:String,default:void 0},uncheckedValue:{type:null,default:void 0},modelValue:{type:null,default:gs},modelModifiers:{type:null,default:()=>({})},"onUpdate:modelValue":{type:null,default:void 0},standalone:{type:Boolean,default:!1},keepValue:{type:Boolean,default:void 0}},setup(t,e){const n=d.toRef(t,"rules"),r=d.toRef(t,"name"),i=d.toRef(t,"label"),s=d.toRef(t,"uncheckedValue"),o=d.toRef(t,"keepValue"),{errors:a,value:l,errorMessage:c,validate:u,handleChange:f,handleBlur:h,setTouched:p,resetField:m,handleReset:y,meta:g,checked:k,setErrors:x}=Zm(r,n,{validateOnMount:t.validateOnMount,bails:t.bails,standalone:t.standalone,type:e.attrs.type,initialValue:rg(t,e),checkedValue:e.attrs.value,uncheckedValue:s,label:i,validateOnValueUpdate:t.validateOnModelUpdate,keepValueOnUnmount:o,syncVModel:!0}),O=function(V,F=!0){f(V,F)},b=d.computed(()=>{const{validateOnInput:B,validateOnChange:V,validateOnBlur:F,validateOnModelUpdate:te}=ng(t);function G(j){h(j,F),Ae(e.attrs.onBlur)&&e.attrs.onBlur(j)}function ne(j){O(j,B),Ae(e.attrs.onInput)&&e.attrs.onInput(j)}function oe(j){O(j,V),Ae(e.attrs.onChange)&&e.attrs.onChange(j)}const re={name:t.name,onBlur:G,onInput:ne,onChange:oe};return re["onUpdate:modelValue"]=j=>O(j,te),re}),C=d.computed(()=>{const B=Object.assign({},b.value);wi(e.attrs.type)&&k&&(B.checked=k.value);const V=Yc(t,e);return wm(V,e.attrs)&&(B.value=l.value),B}),v=d.computed(()=>Object.assign(Object.assign({},b.value),{modelValue:l.value}));function T(){return{field:C.value,componentField:v.value,value:l.value,meta:g,errors:a.value,errorMessage:c.value,validate:u,resetField:m,handleChange:O,handleInput:B=>O(B,!1),handleReset:y,handleBlur:b.value.onBlur,setTouched:p,setErrors:x}}return e.expose({value:l,meta:g,errors:a,errorMessage:c,setErrors:x,setTouched:p,reset:m,validate:u,handleChange:f}),()=>{const B=d.resolveDynamicComponent(Yc(t,e)),V=ea(B,e,T);return B?d.h(B,Object.assign(Object.assign({},e.attrs),C.value),V):V}}});function Yc(t,e){let n=t.as||"";return!t.as&&!e.slots.default&&(n="input"),n}function ng(t){var e,n,r,i;const{validateOnInput:s,validateOnChange:o,validateOnBlur:a,validateOnModelUpdate:l}=tr();return{validateOnInput:(e=t.validateOnInput)!==null&&e!==void 0?e:s,validateOnChange:(n=t.validateOnChange)!==null&&n!==void 0?n:o,validateOnBlur:(r=t.validateOnBlur)!==null&&r!==void 0?r:a,validateOnModelUpdate:(i=t.validateOnModelUpdate)!==null&&i!==void 0?i:l}}function rg(t,e){return wi(e.attrs.type)?Ec(t,"modelValue")?t.modelValue:void 0:Ec(t,"modelValue")?t.modelValue:e.attrs.value}const ws=tg;let ig=0;const xs=["bails","fieldsCount","id","multiple","type","validate"];function Uc(t){const e=(t==null?void 0:t.initialValues)||{},n=Object.assign({},d.toValue(e)),r=d.unref(t==null?void 0:t.validationSchema);return r&&At(r)&&Ae(r.cast)?pe(r.cast(n)||{}):pe(n)}function sg(t){var e;const n=ig++;let r=0;const i=d.ref(!1),s=d.ref(!1),o=d.ref(0),a=[],l=d.reactive(Uc(t)),c=d.ref([]),u=d.ref({}),f=d.ref({}),h=Mm(()=>{f.value=c.value.reduce((M,S)=>(M[vi(d.toValue(S.path))]=S,M),{})});function p(M,S){const E=j(M);if(!E){typeof M=="string"&&(u.value[vi(M)]=Qo(S));return}if(typeof M=="string"){const R=vi(M);u.value[R]&&delete u.value[R]}E.errors=Qo(S),E.valid=!E.errors.length}function m(M){rt(M).forEach(S=>{p(S,M[S])})}t!=null&&t.initialErrors&&m(t.initialErrors);const y=d.computed(()=>{const M=c.value.reduce((S,E)=>(E.errors.length&&(S[E.path]=E.errors),S),{});return Object.assign(Object.assign({},u.value),M)}),g=d.computed(()=>rt(y.value).reduce((M,S)=>{const E=y.value[S];return E!=null&&E.length&&(M[S]=E[0]),M},{})),k=d.computed(()=>c.value.reduce((M,S)=>(M[S.path]={name:S.path||"",label:S.label||""},M),{})),x=d.computed(()=>c.value.reduce((M,S)=>{var E;return M[S.path]=(E=S.bails)!==null&&E!==void 0?E:!0,M},{})),O=Object.assign({},(t==null?void 0:t.initialErrors)||{}),b=(e=t==null?void 0:t.keepValuesOnUnmount)!==null&&e!==void 0?e:!1,{initialValues:C,originalInitialValues:v,setInitialValues:T}=ag(c,l,t),B=og(c,l,v,g),V=d.computed(()=>c.value.reduce((M,S)=>{const E=nt(l,S.path);return dn(M,S.path,E),M},{})),F=t==null?void 0:t.validationSchema;function te(M,S){var E,R;const U=d.computed(()=>nt(C.value,d.toValue(M))),w=f.value[d.toValue(M)],D=(S==null?void 0:S.type)==="checkbox"||(S==null?void 0:S.type)==="radio";if(w&&D){w.multiple=!0;const tt=r++;return Array.isArray(w.id)?w.id.push(tt):w.id=[w.id,tt],w.fieldsCount++,w.__flags.pendingUnmount[tt]=!1,w}const $=d.computed(()=>nt(l,d.toValue(M))),Y=d.toValue(M),q=ue.findIndex(tt=>tt===Y);q!==-1&&ue.splice(q,1);const X=d.computed(()=>{var tt,kt,Or,er;const cn=d.toValue(F);if(At(cn))return(kt=(tt=cn.describe)===null||tt===void 0?void 0:tt.call(cn,d.toValue(M)).required)!==null&&kt!==void 0?kt:!1;const ms=d.toValue(S==null?void 0:S.schema);return At(ms)&&(er=(Or=ms.describe)===null||Or===void 0?void 0:Or.call(ms).required)!==null&&er!==void 0?er:!1}),he=r++,Oe=d.reactive({id:he,path:M,touched:!1,pending:!1,valid:!0,validated:!!(!((E=O[Y])===null||E===void 0)&&E.length),required:X,initialValue:U,errors:d.shallowRef([]),bails:(R=S==null?void 0:S.bails)!==null&&R!==void 0?R:!1,label:S==null?void 0:S.label,type:(S==null?void 0:S.type)||"default",value:$,multiple:!1,__flags:{pendingUnmount:{[he]:!1},pendingReset:!1},fieldsCount:1,validate:S==null?void 0:S.validate,dirty:d.computed(()=>!qe(d.unref($),d.unref(U)))});return c.value.push(Oe),f.value[Y]=Oe,h(),g.value[Y]&&!O[Y]&&d.nextTick(()=>{_t(Y,{mode:"silent"})}),d.isRef(M)&&d.watch(M,tt=>{h();const kt=pe($.value);f.value[tt]=Oe,d.nextTick(()=>{dn(l,tt,kt)})}),Oe}const G=Ac(ln,5),ne=Ac(ln,5),oe=Xo(async M=>await(M==="silent"?G():ne()),(M,[S])=>{const E=rt(P.errorBag.value),U=[...new Set([...rt(M.results),...c.value.map(w=>w.path),...E])].sort().reduce((w,D)=>{var $;const Y=D,q=j(Y)||ie(Y),X=(($=M.results[Y])===null||$===void 0?void 0:$.errors)||[],he=d.toValue(q==null?void 0:q.path)||Y,Oe=lg({errors:X,valid:!X.length},w.results[he]);return w.results[he]=Oe,Oe.valid||(w.errors[he]=Oe.errors[0]),q&&u.value[he]&&delete u.value[he],q?(q.valid=Oe.valid,S==="silent"||S==="validated-only"&&!q.validated||p(q,Oe.errors),w):(p(he,X),w)},{valid:M.valid,results:{},errors:{}});return M.values&&(U.values=M.values),rt(U.results).forEach(w=>{var D;const $=j(w);$&&S!=="silent"&&(S==="validated-only"&&!$.validated||p($,(D=U.results[w])===null||D===void 0?void 0:D.errors))}),U});function re(M){c.value.forEach(M)}function j(M){const S=typeof M=="string"?vi(M):M;return typeof S=="string"?f.value[S]:S}function ie(M){return c.value.filter(E=>M.startsWith(E.path)).reduce((E,R)=>E?R.path.length>E.path.length?R:E:R,void 0)}let ue=[],_e;function Qe(M){return ue.push(M),_e||(_e=d.nextTick(()=>{[...ue].sort().reverse().forEach(E=>{Nc(l,E)}),ue=[],_e=null})),_e}function ct(M){return function(E,R){return function(w){return w instanceof Event&&(w.preventDefault(),w.stopPropagation()),re(D=>D.touched=!0),i.value=!0,o.value++,Wt().then(D=>{const $=pe(l);if(D.valid&&typeof E=="function"){const Y=pe(V.value);let q=M?Y:$;return D.values&&(q=D.values),E(q,{evt:w,controlledValues:Y,setErrors:m,setFieldError:p,setTouched:Zn,setFieldTouched:$e,setValues:ae,setFieldValue:K,resetForm:Tn,resetField:Xn})}!D.valid&&typeof R=="function"&&R({values:$,evt:w,errors:D.errors,results:D.results})}).then(D=>(i.value=!1,D),D=>{throw i.value=!1,D})}}}const vt=ct(!1);vt.withControlled=ct(!0);function ke(M,S){const E=c.value.findIndex(U=>U.path===M&&(Array.isArray(U.id)?U.id.includes(S):U.id===S)),R=c.value[E];if(!(E===-1||!R)){if(d.nextTick(()=>{_t(M,{mode:"silent",warn:!1})}),R.multiple&&R.fieldsCount&&R.fieldsCount--,Array.isArray(R.id)){const U=R.id.indexOf(S);U>=0&&R.id.splice(U,1),delete R.__flags.pendingUnmount[S]}(!R.multiple||R.fieldsCount<=0)&&(c.value.splice(E,1),Nt(M),h(),delete f.value[M])}}function et(M){rt(f.value).forEach(S=>{S.startsWith(M)&&delete f.value[S]}),c.value=c.value.filter(S=>!S.path.startsWith(M)),d.nextTick(()=>{h()})}const P={formId:n,values:l,controlledValues:V,errorBag:y,errors:g,schema:F,submitCount:o,meta:B,isSubmitting:i,isValidating:s,fieldArrays:a,keepValuesOnUnmount:b,validateSchema:d.unref(F)?oe:void 0,validate:Wt,setFieldError:p,validateField:_t,setFieldValue:K,setValues:ae,setErrors:m,setFieldTouched:$e,setTouched:Zn,resetForm:Tn,resetField:Xn,handleSubmit:vt,useFieldModel:pi,defineInputBinds:mi,defineComponentBinds:gi,defineField:Qn,stageInitialValue:an,unsetInitialValue:Nt,setFieldInitialValue:En,createPathState:te,getPathState:j,unsetPathValue:Qe,removePathState:ke,initialValues:C,getAllPathStates:()=>c.value,destroyPath:et,isFieldTouched:dt,isFieldDirty:Sr,isFieldValid:hi};function K(M,S,E=!0){const R=pe(S),U=typeof M=="string"?M:M.path;j(U)||te(U),dn(l,U,R),E&&_t(U)}function fe(M,S=!0){rt(l).forEach(E=>{delete l[E]}),rt(M).forEach(E=>{K(E,M[E],!1)}),S&&Wt()}function ae(M,S=!0){bi(l,M),a.forEach(E=>E&&E.reset()),S&&Wt()}function Re(M,S){const E=j(d.toValue(M))||te(M);return d.computed({get(){return E.value},set(R){var U;const w=d.toValue(M);K(w,R,(U=d.toValue(S))!==null&&U!==void 0?U:!1)}})}function $e(M,S){const E=j(M);E&&(E.touched=S)}function dt(M){const S=j(M);return S?S.touched:c.value.filter(E=>E.path.startsWith(M)).some(E=>E.touched)}function Sr(M){const S=j(M);return S?S.dirty:c.value.filter(E=>E.path.startsWith(M)).some(E=>E.dirty)}function hi(M){const S=j(M);return S?S.valid:c.value.filter(E=>E.path.startsWith(M)).every(E=>E.valid)}function Zn(M){if(typeof M=="boolean"){re(S=>{S.touched=M});return}rt(M).forEach(S=>{$e(S,!!M[S])})}function Xn(M,S){var E;const R=S&&"value"in S?S.value:nt(C.value,M),U=j(M);U&&(U.__flags.pendingReset=!0),En(M,pe(R),!0),K(M,R,!1),$e(M,(E=S==null?void 0:S.touched)!==null&&E!==void 0?E:!1),p(M,(S==null?void 0:S.errors)||[]),d.nextTick(()=>{U&&(U.__flags.pendingReset=!1)})}function Tn(M,S){let E=pe(M!=null&&M.values?M.values:v.value);E=S!=null&&S.force?E:bi(v.value,E),E=At(F)&&Ae(F.cast)?F.cast(E):E,T(E),re(R=>{var U;R.__flags.pendingReset=!0,R.validated=!1,R.touched=((U=M==null?void 0:M.touched)===null||U===void 0?void 0:U[R.path])||!1,K(R.path,nt(E,R.path),!1),p(R.path,void 0)}),S!=null&&S.force?fe(E,!1):ae(E,!1),m((M==null?void 0:M.errors)||{}),o.value=(M==null?void 0:M.submitCount)||0,d.nextTick(()=>{Wt({mode:"silent"}),re(R=>{R.__flags.pendingReset=!1})})}async function Wt(M){const S=(M==null?void 0:M.mode)||"force";if(S==="force"&&re(w=>w.validated=!0),P.validateSchema)return P.validateSchema(S);s.value=!0;const E=await Promise.all(c.value.map(w=>w.validate?w.validate(M).then(D=>({key:w.path,valid:D.valid,errors:D.errors})):Promise.resolve({key:w.path,valid:!0,errors:[]})));s.value=!1;const R={},U={};for(const w of E)R[w.key]={valid:w.valid,errors:w.errors},w.errors.length&&(U[w.key]=w.errors[0]);return{valid:E.every(w=>w.valid),results:R,errors:U}}async function _t(M,S){var E;const R=j(M);if(R&&(S==null?void 0:S.mode)!=="silent"&&(R.validated=!0),F){const{results:w}=await oe((S==null?void 0:S.mode)||"validated-only");return w[M]||{errors:[],valid:!0}}return R!=null&&R.validate?R.validate(S):(!R&&((E=S==null?void 0:S.warn)!==null&&E!==void 0?E:!0)&&process.env.NODE_ENV!=="production"&&d.warn(`field with path ${M} was not found`),Promise.resolve({errors:[],valid:!0}))}function Nt(M){Nc(C.value,M)}function an(M,S,E=!1){En(M,S),dn(l,M,S),E&&!(t!=null&&t.initialValues)&&dn(v.value,M,pe(S))}function En(M,S,E=!1){dn(C.value,M,pe(S)),E&&dn(v.value,M,pe(S))}async function ln(){const M=d.unref(F);if(!M)return{valid:!0,results:{},errors:{}};s.value=!0;const S=ys(M)||At(M)?await Im(M,l):await Rm(M,l,{names:k.value,bailsMap:x.value});return s.value=!1,S}const Mr=vt((M,{evt:S})=>{Tc(S)&&S.target.submit()});d.onMounted(()=>{if(t!=null&&t.initialErrors&&m(t.initialErrors),t!=null&&t.initialTouched&&Zn(t.initialTouched),t!=null&&t.validateOnMount){Wt();return}P.validateSchema&&P.validateSchema("silent")}),d.isRef(F)&&d.watch(F,()=>{var M;(M=P.validateSchema)===null||M===void 0||M.call(P,"validated-only")}),d.provide(ki,P),process.env.NODE_ENV!=="production"&&(Wm(P),d.watch(()=>Object.assign(Object.assign({errors:y.value},B.value),{values:l,isSubmitting:i.value,isValidating:s.value,submitCount:o.value}),Tr,{deep:!0}));function Qn(M,S){const E=Ae(S)||S==null?void 0:S.label,R=j(d.toValue(M))||te(M,{label:E}),U=()=>Ae(S)?S(vs(R,xs)):S||{};function w(){var X;R.touched=!0,((X=U().validateOnBlur)!==null&&X!==void 0?X:tr().validateOnBlur)&&_t(R.path)}function D(){var X;((X=U().validateOnInput)!==null&&X!==void 0?X:tr().validateOnInput)&&d.nextTick(()=>{_t(R.path)})}function $(){var X;((X=U().validateOnChange)!==null&&X!==void 0?X:tr().validateOnChange)&&d.nextTick(()=>{_t(R.path)})}const Y=d.computed(()=>{const X={onChange:$,onInput:D,onBlur:w};return Ae(S)?Object.assign(Object.assign({},X),S(vs(R,xs)).props||{}):S!=null&&S.props?Object.assign(Object.assign({},X),S.props(vs(R,xs))):X});return[Re(M,()=>{var X,he,Oe;return(Oe=(X=U().validateOnModelUpdate)!==null&&X!==void 0?X:(he=tr())===null||he===void 0?void 0:he.validateOnModelUpdate)!==null&&Oe!==void 0?Oe:!0}),Y]}function pi(M){return Array.isArray(M)?M.map(S=>Re(S,!0)):Re(M)}function mi(M,S){const[E,R]=Qn(M,S);function U(){R.value.onBlur()}function w($){const Y=ks($);K(d.toValue(M),Y,!1),R.value.onInput()}function D($){const Y=ks($);K(d.toValue(M),Y,!1),R.value.onChange()}return d.computed(()=>Object.assign(Object.assign({},R.value),{onBlur:U,onInput:w,onChange:D,value:E.value}))}function gi(M,S){const[E,R]=Qn(M,S),U=j(d.toValue(M));function w(D){E.value=D}return d.computed(()=>{const D=Ae(S)?S(vs(U,xs)):S||{};return Object.assign({[D.model||"modelValue"]:E.value,[`onUpdate:${D.model||"modelValue"}`]:w},R.value)})}return Object.assign(Object.assign({},P),{values:d.readonly(l),handleReset:()=>Tn(),submitForm:Mr})}function og(t,e,n,r){const i={touched:"some",pending:"some",valid:"every"},s=d.computed(()=>!qe(e,d.unref(n)));function o(){const l=t.value;return rt(i).reduce((c,u)=>{const f=i[u];return c[u]=l[f](h=>h[u]),c},{})}const a=d.reactive(o());return d.watchEffect(()=>{const l=o();a.touched=l.touched,a.valid=l.valid,a.pending=l.pending}),d.computed(()=>Object.assign(Object.assign({initialValues:d.unref(n)},a),{valid:a.valid&&!rt(r.value).length,dirty:s.value}))}function ag(t,e,n){const r=Uc(n),i=d.ref(r),s=d.ref(pe(r));function o(a,l=!1){i.value=bi(pe(i.value)||{},pe(a)),s.value=bi(pe(s.value)||{},pe(a)),l&&t.value.forEach(c=>{if(c.touched)return;const f=nt(i.value,c.path);dn(e,c.path,pe(f))})}return{initialValues:i,originalInitialValues:s,setInitialValues:o}}function lg(t,e){return e?{valid:t.valid&&e.valid,errors:[...t.errors,...e.errors]}:t}const cg=d.defineComponent({name:"Form",inheritAttrs:!1,props:{as:{type:null,default:"form"},validationSchema:{type:Object,default:void 0},initialValues:{type:Object,default:void 0},initialErrors:{type:Object,default:void 0},initialTouched:{type:Object,default:void 0},validateOnMount:{type:Boolean,default:!1},onSubmit:{type:Function,default:void 0},onInvalidSubmit:{type:Function,default:void 0},keepValues:{type:Boolean,default:!1}},setup(t,e){const n=d.toRef(t,"validationSchema"),r=d.toRef(t,"keepValues"),{errors:i,errorBag:s,values:o,meta:a,isSubmitting:l,isValidating:c,submitCount:u,controlledValues:f,validate:h,validateField:p,handleReset:m,resetForm:y,handleSubmit:g,setErrors:k,setFieldError:x,setFieldValue:O,setValues:b,setFieldTouched:C,setTouched:v,resetField:T}=sg({validationSchema:n.value?n:void 0,initialValues:t.initialValues,initialErrors:t.initialErrors,initialTouched:t.initialTouched,validateOnMount:t.validateOnMount,keepValuesOnUnmount:r}),B=g((j,{evt:ie})=>{Tc(ie)&&ie.target.submit()},t.onInvalidSubmit),V=t.onSubmit?g(t.onSubmit,t.onInvalidSubmit):B;function F(j){Ko(j)&&j.preventDefault(),m(),typeof e.attrs.onReset=="function"&&e.attrs.onReset()}function te(j,ie){return g(typeof j=="function"&&!ie?j:ie,t.onInvalidSubmit)(j)}function G(){return pe(o)}function ne(){return pe(a.value)}function oe(){return pe(i.value)}function re(){return{meta:a.value,errors:i.value,errorBag:s.value,values:o,isSubmitting:l.value,isValidating:c.value,submitCount:u.value,controlledValues:f.value,validate:h,validateField:p,handleSubmit:te,handleReset:m,submitForm:B,setErrors:k,setFieldError:x,setFieldValue:O,setValues:b,setFieldTouched:C,setTouched:v,resetForm:y,resetField:T,getValues:G,getMeta:ne,getErrors:oe}}return e.expose({setFieldError:x,setErrors:k,setFieldValue:O,setValues:b,setFieldTouched:C,setTouched:v,resetForm:y,validate:h,validateField:p,resetField:T,getValues:G,getMeta:ne,getErrors:oe,values:o,meta:a,errors:i}),function(){const ie=t.as==="form"?t.as:t.as?d.resolveDynamicComponent(t.as):null,ue=ea(ie,e,re);if(!ie)return ue;const _e=ie==="form"?{novalidate:!0}:{};return d.h(ie,Object.assign(Object.assign(Object.assign({},_e),e.attrs),{onSubmit:V,onReset:F}),ue)}}}),dg=d.defineComponent({name:"ErrorMessage",props:{as:{type:String,default:void 0},name:{type:String,required:!0}},setup(t,e){const n=d.inject(ki,void 0),r=d.computed(()=>n==null?void 0:n.errors.value[t.name]);function i(){return{message:r.value}}return()=>{if(!r.value)return;const s=t.as?d.resolveDynamicComponent(t.as):t.as,o=ea(s,e,i),a=Object.assign({role:"alert"},e.attrs);return!s&&(Array.isArray(o)||!o)&&(o!=null&&o.length)?o:(Array.isArray(o)||!o)&&!(o!=null&&o.length)?d.h(s||"span",a,r.value):d.h(s,a,o)}}});function ug(t){const e=Zo(ki),n=t?void 0:d.inject(Oc);return d.computed(()=>t?e==null?void 0:e.errors.value[d.toValue(t)]:n==null?void 0:n.errorMessage.value)}Dt("required",t=>typeof t=="object"&&t!=null||typeof t=="boolean"&&t===!0?!0:!t||!t.length?"This field is required":!0),Dt("email",t=>{var e=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return e.test(String(t).trim().toLowerCase())?!0:"This field must be a valid email"}),Dt("strong_password",t=>t?t.indexOf(" ")>-1?"Password shouldn't contain space":t.length<8||t.length>30?"Password must be between 8 and 30 characters":t.match(/[a-z]/)===null||t.match(/[A-Z]/)===null||t.match(/\d/)===null?"Password must contain at least one uppercase letter, one lowercase letter and one number digit":!0:"Password is required"),Dt("no_space",t=>(t==null?void 0:t.indexOf(" "))>-1?"This field shouldn't contain space":!0),Dt("minLength",(t,[e])=>!t||!t.length?!0:t.length<e?`This field must be at least ${e} characters`:!0),Dt("hasUppercaseLetter",t=>/[A-Z]/.test(t)?!0:"This field must have at least one uppercase character"),Dt("hasLowercaseLetter",t=>/[a-z]/.test(t)?!0:"This field must have at least one lowercase character"),Dt("hasNumber",t=>/\d/.test(t)?!0:"This field must have at least one number"),Dt("hasSpecialCharacter",t=>/[!@$%^&*(),.?":{}|]/.test(t)?!0:"This field must have at least one special character"),Dt("url",t=>{var e=/(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/gi;return e.test(String(t).trim().toLowerCase())?!0:"This field must be a valid URL"}),Dt("number",t=>parseFloat(t)?!0:"This field must be a number");const ye=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},fg={},hg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor"},pg=[d.createElementVNode("path",{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200z"},null,-1)];function mg(t,e){return d.openBlock(),d.createElementBlock("svg",hg,pg)}const gg=ye(fg,[["render",mg]]),yg={},bg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor"},vg=[d.createElementVNode("path",{d:"M460.116 373.846l-20.823-12.022c-5.541-3.199-7.54-10.159-4.663-15.874 30.137-59.886 28.343-131.652-5.386-189.946-33.641-58.394-94.896-95.833-161.827-99.676C261.028 55.961 256 50.751 256 44.352V20.309c0-6.904 5.808-12.337 12.703-11.982 83.556 4.306 160.163 50.864 202.11 123.677 42.063 72.696 44.079 162.316 6.031 236.832-3.14 6.148-10.75 8.461-16.728 5.01z"},null,-1)];function kg(t,e){return d.openBlock(),d.createElementBlock("svg",bg,vg)}const wg=ye(yg,[["render",kg]]),xg={class:"relative"},Ss=Object.assign({name:"WpicSpinner"},{props:{color:{type:String,default:""}},setup(t){return(e,n)=>(d.openBlock(),d.createElementBlock("div",xg,[d.createVNode(gg,{class:"absolute opacity-25"}),d.createVNode(wg,{class:d.normalizeClass(["animate-spin",{[`${t.color}`]:!0}])},null,8,["class"])]))}});let Se={theme:"pmi"};const Sg={key:0,class:"absolute inset-0 flex justify-center items-center"},Mg=Object.assign({name:"WpicButton"},{props:{label:String,primary:Boolean,type:{type:String,default:"button"},secondary:Boolean,inverse:Boolean,disabled:Boolean,full:Boolean,loading:Boolean,outline:{type:Boolean,default:!0},medium:Boolean,small:Boolean,mini:Boolean,plain:Boolean,outlining:Boolean,square:Boolean,to:[String,Object]},setup(t){const e=t,n=d.computed(()=>e.to?"router-link":"button"),r={pmi:"bg-violet-800 border border-violet-800 focus:bg-violet-800 text-white disabled:bg-zinc-100 disabled:text-zinc-400 disabled:border-zinc-100 enabled:hover:bg-violet-900 enabled:hover:border-violet-900 active:scale-95 enabled:transform","wpic-tools":"text-white bg-lime-500 border-lime-500 enabled:hover:bg-lime-400 enabled:hover:border-lime-400 enabled:active:bg-lime-500 enabled:active:border-lime-500 enabled:active:shadow-inner disabled:bg-lime-600/25 disabled:text-white disabled:border-0"},i={pmi:"bg-white text-violet-800 border-zinc-400 dark:border-zinc-700 dark:text-zinc-200 dark:bg-zinc-700 dark:hover:bg-zinc-600 dark:hover:border-zinc-600 disabled:text-zinc-400 active:scale-95 enabled:transform","wpic-tools":"text-slate-700 bg-slate-100 border-slate-300 enabled:hover:bg-lime-50 enabled:hover:border-lime-300 enabled:hover:text-lime-600 enabled:active:shadow-inner disabled:border-slate-200 disabled:text-zinc-400 disabled:bg-slate-50/50"},s={pmi:"border-zinc-300 dark:border-zinc-700 dark:text-zinc-300","wpic-tools":"border-slate-200 bg-slate-200 enabled:hover:bg-slate-300 enabled:hover:border-slate-300 enabled:active:bg-slate-200 enabled:active:border-slate-200 enabled:active:shadow-inner disabled:bg-slate-100 disabled:text-zinc-400 disabled:border-0"},o={pmi:"text-violet-800 hover:underline","wpic-tools":"text-lime-800 hover:underline"},a={pmi:"hover:text-violet-800","wpic-tools":"hover:text-lime-800"};return(l,c)=>(d.openBlock(),d.createBlock(d.resolveDynamicComponent(n.value),{to:t.to,type:t.type,disabled:t.disabled,class:d.normalizeClass([{"cursor-pointer":!t.disabled&&!t.loading,"active:outline active:outline-2 active:outline-offset-4":!t.disabled&&!t.loading&&t.outlining,"cursor-not-allowed":t.disabled,border:t.outline&&!t.plain,[`${r[d.unref(Se).theme]}`]:t.primary&&!t.plain&&!t.inverse,[`${i[d.unref(Se).theme]}`]:t.secondary,[`${s[d.unref(Se).theme]}`]:!t.primary&&!t.secondary&&!t.plain,[`${o[d.unref(Se).theme]}`]:t.primary&&t.plain,[`${a[d.unref(Se).theme]}`]:!t.primary&&t.plain,"bg-zinc-50 border-violet-800 text-violet-800":t.primary&&t.inverse,"hover:bg-white":t.primary&&t.inverse&&!t.disabled&&!t.loading,"w-full":t.full,"text-opacity-50":t.disabled,"text-sm":t.small,"px-4 py-1 rounded h-8":t.small&&!t.plain,"px-5 py-1 rounded h-10":t.medium&&!t.plain,"px-5 py-1 rounded h-12":!t.small&&!t.medium&&!t.plain,"px-0 aspect-square":t.square},"wpic-button leading-none font-medium no-underline appearance-none outline-zinc-600 focus:outline-none relative inline-flex justify-center items-center"])},{default:d.withCtx(()=>[t.loading?(d.openBlock(),d.createElementBlock("div",Sg,[d.createVNode(Ss,{class:"w-6 h-6"})])):d.createCommentVNode("",!0),d.createElementVNode("span",{class:d.normalizeClass(["flex items-center select-none whitespace-nowrap",{"opacity-0":t.loading}])},[d.renderSlot(l.$slots,"default",{},()=>[d.createTextVNode(d.toDisplayString(t.label),1)])],2)]),_:3},8,["to","type","disabled","class"]))}}),Og={name:"WpicButtonGroup"},Cg={class:"wpic-button-group flex flex-wrap"};function Tg(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("div",Cg,[d.renderSlot(t.$slots,"default")])}const Eg=ye(Og,[["render",Tg]]),_g={name:"WpicInputGroup"},Ng={class:"wpic-input-group flex w-full"};function Dg(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("div",Ng,[d.renderSlot(t.$slots,"default")])}const Ag=ye(_g,[["render",Dg]]),Vg=Object.assign({name:"WpicForm"},{setup(t){return(e,n)=>(d.openBlock(),d.createBlock(d.unref(cg),null,{default:d.withCtx(({values:r,meta:i,errors:s})=>[d.renderSlot(e.$slots,"default")]),_:3}))}}),ia=Math.min,_r=Math.max,Ms=Math.round,Nn=t=>({x:t,y:t}),Bg={left:"right",right:"left",bottom:"top",top:"bottom"},Pg={start:"end",end:"start"};function qc(t,e,n){return _r(t,ia(e,n))}function Os(t,e){return typeof t=="function"?t(e):t}function nr(t){return t.split("-")[0]}function Cs(t){return t.split("-")[1]}function Kc(t){return t==="x"?"y":"x"}function Jc(t){return t==="y"?"height":"width"}function Ts(t){return["top","bottom"].includes(nr(t))?"y":"x"}function Gc(t){return Kc(Ts(t))}function Ig(t,e,n){n===void 0&&(n=!1);const r=Cs(t),i=Gc(t),s=Jc(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Es(o)),[o,Es(o)]}function Rg(t){const e=Es(t);return[sa(t),e,sa(e)]}function sa(t){return t.replace(/start|end/g,e=>Pg[e])}function $g(t,e,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?s:o;default:return[]}}function Lg(t,e,n,r){const i=Cs(t);let s=$g(nr(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(sa)))),s}function Es(t){return t.replace(/left|right|bottom|top/g,e=>Bg[e])}function Fg(t){return{top:0,right:0,bottom:0,left:0,...t}}function zg(t){return typeof t!="number"?Fg(t):{top:t,right:t,bottom:t,left:t}}function _s(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function Zc(t,e,n){let{reference:r,floating:i}=t;const s=Ts(e),o=Gc(e),a=Jc(o),l=nr(e),c=s==="y",u=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-i.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Cs(e)){case"start":p[o]-=h*(n&&c?-1:1);break;case"end":p[o]+=h*(n&&c?-1:1);break}return p}const jg=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=Zc(c,r,l),h=r,p={},m=0;for(let y=0;y<a.length;y++){const{name:g,fn:k}=a[y],{x,y:O,data:b,reset:C}=await k({x:u,y:f,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:c,platform:o,elements:{reference:t,floating:e}});u=x??u,f=O??f,p={...p,[g]:{...p[g],...b}},C&&m<=50&&(m++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(c=C.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):C.rects),{x:u,y:f}=Zc(c,h,l)),y=-1)}return{x:u,y:f,placement:h,strategy:i,middlewareData:p}};async function Xc(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Os(e,t),m=zg(p),g=a[h?f==="floating"?"reference":"floating":f],k=_s(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),x=f==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),b=await(s.isElement==null?void 0:s.isElement(O))?await(s.getScale==null?void 0:s.getScale(O))||{x:1,y:1}:{x:1,y:1},C=_s(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:O,strategy:l}):x);return{top:(k.top-C.top+m.top)/b.y,bottom:(C.bottom-k.bottom+m.bottom)/b.y,left:(k.left-C.left+m.left)/b.x,right:(C.right-k.right+m.right)/b.x}}const Wg=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...g}=Os(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const k=nr(i),x=nr(a)===a,O=await(l.isRTL==null?void 0:l.isRTL(c.floating)),b=h||(x||!y?[Es(a)]:Rg(a));!h&&m!=="none"&&b.push(...Lg(a,y,m,O));const C=[a,...b],v=await Xc(e,g),T=[];let B=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&T.push(v[k]),f){const G=Ig(i,o,O);T.push(v[G[0]],v[G[1]])}if(B=[...B,{placement:i,overflows:T}],!T.every(G=>G<=0)){var V,F;const G=(((V=s.flip)==null?void 0:V.index)||0)+1,ne=C[G];if(ne)return{data:{index:G,overflows:B},reset:{placement:ne}};let oe=(F=B.filter(re=>re.overflows[0]<=0).sort((re,j)=>re.overflows[1]-j.overflows[1])[0])==null?void 0:F.placement;if(!oe)switch(p){case"bestFit":{var te;const re=(te=B.map(j=>[j.placement,j.overflows.filter(ie=>ie>0).reduce((ie,ue)=>ie+ue,0)]).sort((j,ie)=>j[1]-ie[1])[0])==null?void 0:te[0];re&&(oe=re);break}case"initialPlacement":oe=a;break}if(i!==oe)return{reset:{placement:oe}}}return{}}}};async function Hg(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=nr(n),a=Cs(n),l=Ts(n)==="y",c=["left","top"].includes(o)?-1:1,u=s&&l?-1:1,f=Os(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),l?{x:p*u,y:h*c}:{x:h*c,y:p*u}}const Yg=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=e,l=await Hg(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},Ug=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:k,y:x}=g;return{x:k,y:x}}},...l}=Os(t,e),c={x:n,y:r},u=await Xc(e,l),f=Ts(nr(i)),h=Kc(f);let p=c[h],m=c[f];if(s){const g=h==="y"?"top":"left",k=h==="y"?"bottom":"right",x=p+u[g],O=p-u[k];p=qc(x,p,O)}if(o){const g=f==="y"?"top":"left",k=f==="y"?"bottom":"right",x=m+u[g],O=m-u[k];m=qc(x,m,O)}const y=a.fn({...e,[h]:p,[f]:m});return{...y,data:{x:y.x-n,y:y.y-r}}}}};function Nr(t){return Qc(t)?(t.nodeName||"").toLowerCase():"#document"}function ut(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Dn(t){var e;return(e=(Qc(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Qc(t){return t instanceof Node||t instanceof ut(t).Node}function Ht(t){return t instanceof Element||t instanceof ut(t).Element}function Yt(t){return t instanceof HTMLElement||t instanceof ut(t).HTMLElement}function ed(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ut(t).ShadowRoot}function Mi(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Vt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function qg(t){return["table","td","th"].includes(Nr(t))}function oa(t){const e=aa(),n=Vt(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Kg(t){let e=An(t);for(;Yt(e)&&!Dr(e);){if(oa(e))return e;e=An(e)}return null}function aa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Dr(t){return["html","body","#document"].includes(Nr(t))}function Vt(t){return ut(t).getComputedStyle(t)}function Ns(t){return Ht(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function An(t){if(Nr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ed(t)&&t.host||Dn(t);return ed(e)?e.host:e}function td(t){const e=An(t);return Dr(e)?t.ownerDocument?t.ownerDocument.body:t.body:Yt(e)&&Mi(e)?e:td(e)}function la(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=td(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=ut(i);return s?e.concat(o,o.visualViewport||[],Mi(i)?i:[],o.frameElement&&n?la(o.frameElement):[]):e.concat(i,la(i,[],n))}function nd(t){const e=Vt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Yt(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,a=Ms(n)!==s||Ms(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function rd(t){return Ht(t)?t:t.contextElement}function Ar(t){const e=rd(t);if(!Yt(e))return Nn(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=nd(e);let o=(s?Ms(n.width):n.width)/r,a=(s?Ms(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const Jg=Nn(0);function id(t){const e=ut(t);return!aa()||!e.visualViewport?Jg:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Gg(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==ut(t)?!1:e}function Oi(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=rd(t);let o=Nn(1);e&&(r?Ht(r)&&(o=Ar(r)):o=Ar(t));const a=Gg(s,n,r)?id(s):Nn(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,u=i.width/o.x,f=i.height/o.y;if(s){const h=ut(s),p=r&&Ht(r)?ut(r):r;let m=h,y=m.frameElement;for(;y&&r&&p!==m;){const g=Ar(y),k=y.getBoundingClientRect(),x=Vt(y),O=k.left+(y.clientLeft+parseFloat(x.paddingLeft))*g.x,b=k.top+(y.clientTop+parseFloat(x.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,f*=g.y,l+=O,c+=b,m=ut(y),y=m.frameElement}}return _s({width:u,height:f,x:l,y:c})}const Zg=[":popover-open",":modal"];function ca(t){return Zg.some(e=>{try{return t.matches(e)}catch{return!1}})}function Xg(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",o=Dn(r),a=e?ca(e.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Nn(1);const u=Nn(0),f=Yt(r);if((f||!f&&!s)&&((Nr(r)!=="body"||Mi(o))&&(l=Ns(r)),Yt(r))){const h=Oi(r);c=Ar(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function Qg(t){return Array.from(t.getClientRects())}function sd(t){return Oi(Dn(t)).left+Ns(t).scrollLeft}function e0(t){const e=Dn(t),n=Ns(t),r=t.ownerDocument.body,i=_r(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=_r(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+sd(t);const a=-n.scrollTop;return Vt(r).direction==="rtl"&&(o+=_r(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function t0(t,e){const n=ut(t),r=Dn(t),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const c=aa();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function n0(t,e){const n=Oi(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=Yt(t)?Ar(t):Nn(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=i*s.x,c=r*s.y;return{width:o,height:a,x:l,y:c}}function od(t,e,n){let r;if(e==="viewport")r=t0(t,n);else if(e==="document")r=e0(Dn(t));else if(Ht(e))r=n0(e,n);else{const i=id(t);r={...e,x:e.x-i.x,y:e.y-i.y}}return _s(r)}function ad(t,e){const n=An(t);return n===e||!Ht(n)||Dr(n)?!1:Vt(n).position==="fixed"||ad(n,e)}function r0(t,e){const n=e.get(t);if(n)return n;let r=la(t,[],!1).filter(a=>Ht(a)&&Nr(a)!=="body"),i=null;const s=Vt(t).position==="fixed";let o=s?An(t):t;for(;Ht(o)&&!Dr(o);){const a=Vt(o),l=oa(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Mi(o)&&!l&&ad(t,o))?r=r.filter(u=>u!==o):i=a,o=An(o)}return e.set(t,r),r}function i0(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?ca(e)?[]:r0(e,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const f=od(e,u,i);return c.top=_r(f.top,c.top),c.right=ia(f.right,c.right),c.bottom=ia(f.bottom,c.bottom),c.left=_r(f.left,c.left),c},od(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function s0(t){const{width:e,height:n}=nd(t);return{width:e,height:n}}function o0(t,e,n){const r=Yt(e),i=Dn(e),s=n==="fixed",o=Oi(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=Nn(0);if(r||!r&&!s)if((Nr(e)!=="body"||Mi(i))&&(a=Ns(e)),r){const f=Oi(e,!0,s,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else i&&(l.x=sd(i));const c=o.left+a.scrollLeft-l.x,u=o.top+a.scrollTop-l.y;return{x:c,y:u,width:o.width,height:o.height}}function da(t){return Vt(t).position==="static"}function ld(t,e){return!Yt(t)||Vt(t).position==="fixed"?null:e?e(t):t.offsetParent}function cd(t,e){const n=ut(t);if(ca(t))return n;if(!Yt(t)){let i=An(t);for(;i&&!Dr(i);){if(Ht(i)&&!da(i))return i;i=An(i)}return n}let r=ld(t,e);for(;r&&qg(r)&&da(r);)r=ld(r,e);return r&&Dr(r)&&da(r)&&!oa(r)?n:r||Kg(t)||n}const a0=async function(t){const e=this.getOffsetParent||cd,n=this.getDimensions,r=await n(t.floating);return{reference:o0(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function l0(t){return Vt(t).direction==="rtl"}const c0={convertOffsetParentRelativeRectToViewportRelativeRect:Xg,getDocumentElement:Dn,getClippingRect:i0,getOffsetParent:cd,getElementRects:a0,getClientRects:Qg,getDimensions:s0,getScale:Ar,isElement:Ht,isRTL:l0},d0=Yg,u0=Ug,f0=Wg,h0=(t,e,n)=>{const r=new Map,i={platform:c0,...n},s={...i.platform,_c:r};return jg(t,e,{...i,platform:s})};function p0(t,e,n){if(!t)throw new Error("A target component has to be provided.");if(!e)throw new Error("A callback has to be provided.");const r=i=>{i.target===t.value||i.composedPath().includes(t.value)||i.target===n.value||i.composedPath().includes(n.value)||typeof e=="function"&&e()};d.onMounted(()=>{window.addEventListener("click",r)}),d.onBeforeUnmount(()=>{window.removeEventListener("click",r)})}const m0={},g0={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor"},y0=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"},null,-1)];function b0(t,e){return d.openBlock(),d.createElementBlock("svg",g0,y0)}const ua=ye(m0,[["render",b0]]);let Ds;const v0=new Uint8Array(16);function k0(){if(!Ds&&(Ds=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ds))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ds(v0)}const Le=[];for(let t=0;t<256;++t)Le.push((t+256).toString(16).slice(1));function w0(t,e=0){return Le[t[e+0]]+Le[t[e+1]]+Le[t[e+2]]+Le[t[e+3]]+"-"+Le[t[e+4]]+Le[t[e+5]]+"-"+Le[t[e+6]]+Le[t[e+7]]+"-"+Le[t[e+8]]+Le[t[e+9]]+"-"+Le[t[e+10]]+Le[t[e+11]]+Le[t[e+12]]+Le[t[e+13]]+Le[t[e+14]]+Le[t[e+15]]}const dd={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ud(t,e,n){if(dd.randomUUID&&!e&&!t)return dd.randomUUID();t=t||{};const r=t.random||(t.rng||k0)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,w0(r)}let fa={isMobile(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},capitalize(t){return t?(t=t.toString(),t=t.replace(/(?:^|\s)\S/g,function(e){return e.toUpperCase()}).trim(),t.charAt(0).toUpperCase()+t.slice(1)):""}};const x0={class:"bg-white rounded-t-lg w-full"},S0={class:"flex justify-between items-center border-b px-4 py-3"},Ci=Object.assign({name:"WpicPopover"},{props:{placement:{type:String,default:"bottom-start"},label:String,hover:Boolean,custom:Boolean,disabled:Boolean,offset:{type:Number,default:0},customWidth:{}},setup(t,{expose:e}){const n=ud(),r=t,i={pmi:"lg:absolute shadow-[0_5px_30px_0px_rgba(0,0,0,0.25)]","wpic-tools":"mt-2 md:absolute border border-slate-300 shadow-md"},s={pmi:"lg:hidden","wpic-tools":"md:hidden"},o=d.ref(null),a=d.ref(null),l=d.ref(!0);fa.isMobile()||p0(a,()=>{u()},o);function c(){fa.isMobile()&&(document.documentElement.style.overflow="hidden",document.querySelector("#app").style.overflow="hidden"),r.disabled||(l.value=!1,f())}function u(){document.documentElement.style.overflow=null,document.querySelector("#app").style.overflow=null,l.value=!0}async function f(){const m=await h0(o.value,a.value,{placement:r.placement,middleware:[f0(),u0(),d0(r.offset)]});a.value.style.left=`${m.x}px`,a.value.style.top=`${m.y}px`}function h(){r.hover&&c()}function p(){r.hover&&u()}return e({hide:u}),(m,y)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[(d.openBlock(),d.createElementBlock("div",{class:"w-full",key:`reference_${d.unref(n)}`,ref_key:"reference",ref:o,onMouseenter:h,onMouseleave:p,onClick:y[0]||(y[0]=g=>l.value?c():u())},[d.renderSlot(m.$slots,"default",{isHidden:l.value})],32)),(d.openBlock(),d.createBlock(d.Teleport,{to:"body"},[(d.openBlock(),d.createElementBlock("div",{key:`floating_${d.unref(n)}`,ref_key:"floating",ref:a,class:d.normalizeClass(["z-10 bg-white rounded-md overflow-hidden",{[`${t.customWidth}`]:!0,hidden:l.value,[`${i[d.unref(Se).theme]}`]:!l.value,"bg-white px-3 py-2 rounded-md":!t.custom}])},[d.renderSlot(m.$slots,"content")],2)),d.createElementVNode("div",{onClick:y[1]||(y[1]=g=>u()),class:d.normalizeClass(["fixed z-20 flex items-end w-screen h-screen top-0 bg-black/20",{hidden:l.value,[`${s[d.unref(Se).theme]}`]:!0}])},[d.createElementVNode("div",x0,[d.createElementVNode("div",S0,[d.createElementVNode("span",null,d.toDisplayString(t.label),1),d.createVNode(ua,{onClick:u,class:"w-4 h-4"})]),d.renderSlot(m.$slots,"content")])],2)]))],64))}}),M0={},O0={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},C0=[d.createElementVNode("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"},null,-1),d.createElementVNode("path",{"fill-rule":"evenodd",d:"M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 0 1 0-1.113ZM17.25 12a5.25 5.25 0 1 1-10.5 0 5.25 5.25 0 0 1 10.5 0Z","clip-rule":"evenodd"},null,-1)];function T0(t,e){return d.openBlock(),d.createElementBlock("svg",O0,C0)}const E0=ye(M0,[["render",T0]]),_0={},N0={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},D0=[d.createElementVNode("path",{d:"M3.53 2.47a.75.75 0 0 0-1.06 1.06l18 18a.75.75 0 1 0 1.06-1.06l-18-18ZM22.676 12.553a11.249 11.249 0 0 1-2.631 4.31l-3.099-3.099a5.25 5.25 0 0 0-6.71-6.71L7.759 4.577a11.217 11.217 0 0 1 4.242-.827c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113Z"},null,-1),d.createElementVNode("path",{d:"M15.75 12c0 .18-.013.357-.037.53l-4.244-4.243A3.75 3.75 0 0 1 15.75 12ZM12.53 15.713l-4.243-4.244a3.75 3.75 0 0 0 4.244 4.243Z"},null,-1),d.createElementVNode("path",{d:"M6.75 12c0-.619.107-1.213.304-1.764l-3.1-3.1a11.25 11.25 0 0 0-2.63 4.31c-.12.362-.12.752 0 1.114 1.489 4.467 5.704 7.69 10.675 7.69 1.5 0 2.933-.294 4.242-.827l-2.477-2.477A5.25 5.25 0 0 1 6.75 12Z"},null,-1)];function A0(t,e){return d.openBlock(),d.createElementBlock("svg",N0,D0)}const V0=ye(_0,[["render",A0]]),B0={},P0={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor"},I0=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)];function R0(t,e){return d.openBlock(),d.createElementBlock("svg",P0,I0)}const fd=ye(B0,[["render",R0]]),$0={},L0={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},F0=[d.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.34l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z","clip-rule":"evenodd"},null,-1)];function z0(t,e){return d.openBlock(),d.createElementBlock("svg",L0,F0)}const hd=ye($0,[["render",z0]]);var As=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function j0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function W0(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var pd=W0,H0=typeof As=="object"&&As&&As.Object===Object&&As,Y0=H0,U0=Y0,q0=typeof self=="object"&&self&&self.Object===Object&&self,K0=U0||q0||Function("return this")(),md=K0,J0=md,G0=function(){return J0.Date.now()},Z0=G0,X0=/\s/;function Q0(t){for(var e=t.length;e--&&X0.test(t.charAt(e)););return e}var ey=Q0,ty=ey,ny=/^\s+/;function ry(t){return t&&t.slice(0,ty(t)+1).replace(ny,"")}var iy=ry,sy=md,oy=sy.Symbol,gd=oy,yd=gd,bd=Object.prototype,ay=bd.hasOwnProperty,ly=bd.toString,Ti=yd?yd.toStringTag:void 0;function cy(t){var e=ay.call(t,Ti),n=t[Ti];try{t[Ti]=void 0;var r=!0}catch{}var i=ly.call(t);return r&&(e?t[Ti]=n:delete t[Ti]),i}var dy=cy,uy=Object.prototype,fy=uy.toString;function hy(t){return fy.call(t)}var py=hy,vd=gd,my=dy,gy=py,yy="[object Null]",by="[object Undefined]",kd=vd?vd.toStringTag:void 0;function vy(t){return t==null?t===void 0?by:yy:kd&&kd in Object(t)?my(t):gy(t)}var ky=vy;function wy(t){return t!=null&&typeof t=="object"}var xy=wy,Sy=ky,My=xy,Oy="[object Symbol]";function Cy(t){return typeof t=="symbol"||My(t)&&Sy(t)==Oy}var Ty=Cy,Ey=iy,wd=pd,_y=Ty,xd=NaN,Ny=/^[-+]0x[0-9a-f]+$/i,Dy=/^0b[01]+$/i,Ay=/^0o[0-7]+$/i,Vy=parseInt;function By(t){if(typeof t=="number")return t;if(_y(t))return xd;if(wd(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=wd(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Ey(t);var n=Dy.test(t);return n||Ay.test(t)?Vy(t.slice(2),n?2:8):Ny.test(t)?xd:+t}var Py=By,Iy=pd,ha=Z0,Sd=Py,Ry="Expected a function",$y=Math.max,Ly=Math.min;function Fy(t,e,n){var r,i,s,o,a,l,c=0,u=!1,f=!1,h=!0;if(typeof t!="function")throw new TypeError(Ry);e=Sd(e)||0,Iy(n)&&(u=!!n.leading,f="maxWait"in n,s=f?$y(Sd(n.maxWait)||0,e):s,h="trailing"in n?!!n.trailing:h);function p(v){var T=r,B=i;return r=i=void 0,c=v,o=t.apply(B,T),o}function m(v){return c=v,a=setTimeout(k,e),u?p(v):o}function y(v){var T=v-l,B=v-c,V=e-T;return f?Ly(V,s-B):V}function g(v){var T=v-l,B=v-c;return l===void 0||T>=e||T<0||f&&B>=s}function k(){var v=ha();if(g(v))return x(v);a=setTimeout(k,y(v))}function x(v){return a=void 0,h&&r?p(v):(r=i=void 0,o)}function O(){a!==void 0&&clearTimeout(a),c=0,r=l=i=a=void 0}function b(){return a===void 0?o:x(ha())}function C(){var v=ha(),T=g(v);if(r=arguments,i=this,l=v,T){if(a===void 0)return m(l);if(f)return clearTimeout(a),a=setTimeout(k,e),p(l)}return a===void 0&&(a=setTimeout(k,e)),o}return C.cancel=O,C.flush=b,C}var zy=Fy;const jy=j0(zy),Wy={key:0,class:"mb-2 gap-2 wpic-form-label text-base text-zinc-600 dark:text-zinc-300 flex items-center"},Hy={class:""},Yy=["name","value","checked"],Uy={key:0,class:"absolute left-0 ml-3 h-full flex items-center justify-center text-center"},qy={class:"opacity-50 w-4 h-4 leading-tight"},Ky={key:3,class:"absolute z-10 right-0 mr-3 h-full flex items-center"},Jy={class:"min-w-5 h-5 leading-tight cursor-pointer"},Gy={key:5,class:"text-red-700 mt-1 text-base"},Zy=Object.assign({name:"WpicFormField"},{props:{label:{type:[String,Number]},placeholder:String,name:{type:String,default:null},select:Boolean,checkbox:Boolean,radio:Boolean,textarea:Boolean,rules:{},type:{type:String,default:"text"},tag:{type:String,default:null},options:{type:Array},required:Boolean,email:Boolean,multiple:Boolean,slim:Boolean,error:{type:Boolean,default:!0},clearable:Boolean,modelValue:{},checkboxValue:{},uncheckedValue:{},radioValue:{},disabled:Boolean,debounce:{type:Number,default:0},loading:Boolean,password:Boolean,addLabel:{type:String,default:"Add"},help:String,labelName:Boolean,half:Boolean,hideSelect:Boolean,date:Boolean,range:Boolean,rows:{type:[String,Number],default:3},transparent:Boolean,loadingPercent:{type:Number,default:null},loadingPulse:{type:Boolean,default:!1},blur:{type:Boolean,default:!1},large:Boolean,noResize:Boolean,autoResize:Boolean,minHeight:{type:[String,Number],default:50},maxHeight:{type:[String,Number],default:300},hideFocus:Boolean,min:{type:[String,Number],default:-1/0},max:{type:[String,Number],default:1/0},info:{type:String}},emits:["onChange","update:modelValue","onClear"],setup(t,{expose:e,emit:n}){const r={pmi:"shadow-inner border-zinc-400 focus-within:border-zinc-500 focus-within:outline focus-within:outline-2 focus-within:outline-offset-3 bg-zinc-100 dark:bg-zinc-700/25 dark:border-zinc-700/50 dark:text-zinc-300","wpic-tools":"border-slate-300 bg-white focus-within:border-blue-400 outline-blue-200 focus-within:outline focus-within:outline-[3px]"},i=t,s=d.computed(()=>i.name?i.name:ud()),o=ug(s.value),a=d.computed(()=>{if(i.label)return i.label;if(i.name&&i.labelName)return`${i.name}#${i.labelName}`}),l=d.ref(!0),c=d.computed(()=>(i.type=="password"||i.password)&&l.value?"password":i.type);function u(){l.value=!l.value}const f=d.computed(()=>{if(i.rules&&typeof i.rules=="string"){let v=i.rules.split("|");return i.required&&v.push("required"),i.email&&v.push("email"),v.join("|")}else if(!i.rules){let v=[];return i.required&&v.push("required"),i.email&&v.push("email"),v.join("|")}return"required"});function h(v){let T=v&&v.target?v.target.value:v;k(T)}const p=n;function m(v){v===!0||v===!1?p("update:modelValue",!v):p("update:modelValue",v)}function y(v){let T=v&&v.target?v.target.value:v;p("update:modelValue",T),p("onChange",T)}function g(){p("update:modelValue",null),p("onChange",null),p("onClear")}const k=jy(function(v){p("update:modelValue",v),p("onChange",v)},i.debounce),x=d.ref(null),O=d.ref(!1);d.watch(()=>i.modelValue,v=>{i.tag=="textarea"&&(x.value.$el.style.height="auto",d.nextTick(()=>{i.minHeight&&(x.value.$el.style.height=`${x.value.$el.scrollHeight<i.minHeight?i.minHeight:x.value.$el.scrollHeight}px`),i.maxHeight&&(x.value.$el.scrollHeight>i.maxHeight?(x.value.$el.style.height=`${i.maxHeight}px`,O.value=!0):O.value=!1)}))},{deep:!0});function b(){var v;i.tag=="textarea"?x.value.$el.focus():(v=x.value)==null||v.$el.focus()}function C(){return x.value.meta.valid}return e({focus:b,isValid:C}),(v,T)=>{const B=d.resolveComponent("wpic-choice-list");return d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["wpic-form-field",{"mb-6":!t.slim}])},[a.value&&!t.checkbox&&!t.radio?(d.openBlock(),d.createElementBlock("div",Wy,[d.createTextVNode(d.toDisplayString(a.value)+" ",1),d.createElementVNode("div",Hy,[t.info?(d.openBlock(),d.createBlock(Ci,{key:0,hover:""},{content:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(t.info),1)]),default:d.withCtx(()=>[d.createVNode(hd,{class:"w-4 h-4 text-zinc-600"})]),_:1})):d.createCommentVNode("",!0)])])):d.createCommentVNode("",!0),t.checkbox?(d.openBlock(),d.createBlock(d.unref(ws),{key:1,ref_key:"myInput",ref:x,name:s.value,rules:f.value,value:t.checkboxValue,"unchecked-value":t.uncheckedValue,modelValue:t.modelValue},{default:d.withCtx(({field:V})=>[d.createElementVNode("div",{class:"inline-flex items-center gap-2",onClick:T[0]||(T[0]=F=>t.disabled?void 0:m(t.modelValue))},[d.createElementVNode("div",{class:d.normalizeClass(["w-4 h-4 border rounded-sm cursor-pointer",{"border-zinc-400":!t.disabled&&!t.modelValue,"bg-violet-800 border-violet-800 text-white":t.modelValue===!0,"bg-opacity-50 border-opacity-50 text-opacity-75":t.disabled}])},[t.modelValue===!0?(d.openBlock(),d.createBlock(fd,{key:0})):d.createCommentVNode("",!0)],2),d.createElementVNode("span",{class:d.normalizeClass(["text-base cursor-pointer select-none",{"opacity-50":t.disabled}])},[d.renderSlot(v.$slots,"default",{},()=>[d.createTextVNode(d.toDisplayString(a.value),1)])],2)])]),_:3},8,["name","rules","value","unchecked-value","modelValue"])):t.radio?(d.openBlock(),d.createBlock(d.unref(ws),{key:2,ref_key:"myInput",ref:x,name:s.value,value:t.radioValue,modelValue:t.modelValue},{default:d.withCtx(({field:V})=>[d.createElementVNode("div",{onClick:T[2]||(T[2]=()=>{t.disabled||y(t.radioValue)}),class:d.normalizeClass([{"cursor-pointer":!t.disabled},"inline-flex items-center gap-2 select-none"])},[d.createElementVNode("span",{class:d.normalizeClass(["h-4 w-4 border border-zinc-400 rounded-full p-[2px]",{"border-opacity-50":t.disabled}])},[t.radioValue==t.modelValue?(d.openBlock(),d.createElementBlock("span",{key:0,class:d.normalizeClass(["flex rounded-full h-full w-full bg-violet-800",{"bg-opacity-50":t.disabled}])},null,2)):d.createCommentVNode("",!0)],2),d.createElementVNode("input",{class:"hidden",type:"radio",name:t.name,value:t.radioValue,onChange:T[1]||(T[1]=(...F)=>v.onChange&&v.onChange(...F)),checked:t.radioValue==t.modelValue},null,40,Yy),a.value?(d.openBlock(),d.createElementBlock("span",{key:0,class:d.normalizeClass(["text-base",{"opacity-50":t.disabled}])},d.toDisplayString(a.value),3)):d.createCommentVNode("",!0)],2)]),_:1},8,["name","value","modelValue"])):t.select?(d.openBlock(),d.createBlock(d.unref(ws),{key:3,ref_key:"myInput",ref:x,modelValue:t.modelValue,rules:f.value,name:s.value},{default:d.withCtx(({field:V})=>{var F;return[d.createVNode(B,{modelValue:t.modelValue,"onUpdate:modelValue":y,disabled:t.disabled,options:t.options,hideSelect:t.hideSelect,multiple:t.multiple,isInvalid:!!(t.error&&d.unref(o)),required:t.required||((F=f.value)==null?void 0:F.indexOf("required"))>=0,label:a.value,placeholder:"Select..."},null,8,["modelValue","disabled","options","hideSelect","multiple","isInvalid","required","label"])]}),_:1},8,["modelValue","rules","name"])):(d.openBlock(),d.createElementBlock("div",{key:4,class:d.normalizeClass(["wpic-input rounded flex relative border",{[`${r[d.unref(Se).theme]}`]:!0,"h-10":!t.textarea&&!t.large,"h-12":!t.textarea&&t.large,"border-opacity-50 border-zinc-300 text-zinc-400":t.disabled,"!border-red-600 focus-within:outline-red-600":d.unref(o)}])},[v.$slots.prepend?(d.openBlock(),d.createElementBlock("div",Uy,[d.createElementVNode("div",qy,[d.renderSlot(v.$slots,"prepend")])])):d.createCommentVNode("",!0),d.createVNode(d.unref(ws),{ref_key:"myInput",ref:x,as:t.textarea?"textarea":void 0,autocomplete:"off",style:{"z-index":"1"},class:d.normalizeClass(["flex w-full h-full rounded pr-4 bg-transparent outline-none appearance-none",{"pl-4":!v.$slots.prepend,"pl-12":v.$slots.prepend,"py-2":t.textarea,"cursor-not-allowed":t.disabled}]),type:c.value,min:t.min,max:t.max,rows:t.rows,name:s.value,disabled:t.disabled,modelValue:t.modelValue,onInput:h,placeholder:t.placeholder,validateOnInput:!!d.unref(o),rules:f.value},null,8,["as","class","type","min","max","rows","name","disabled","modelValue","placeholder","validateOnInput","rules"]),t.loading?(d.openBlock(),d.createElementBlock("div",{key:1,onClick:g,class:"absolute right-0 mr-3 h-full flex items-center cursor-pointer opacity-75 hover:opacity-100"},[d.createVNode(Ss,{class:"w-6 h-6 opacity-50"})])):t.clearable&&t.modelValue?(d.openBlock(),d.createElementBlock("div",{key:2,onClick:d.withModifiers(g,["stop"]),style:{"z-index":"2"},class:"absolute right-0 mr-3 h-full flex items-center cursor-pointer opacity-75 hover:opacity-100"},[d.createVNode(ua,{class:"w-5 h-5 opacity-50"})])):d.createCommentVNode("",!0),v.$slots.append||t.password||t.type=="password"?(d.openBlock(),d.createElementBlock("div",Ky,[d.createElementVNode("div",Jy,[d.renderSlot(v.$slots,"append",{},()=>[d.withDirectives(d.createVNode(E0,{class:"text-zinc-600 select-none",onClick:u},null,512),[[d.vShow,l.value]]),d.withDirectives(d.createVNode(V0,{class:"text-zinc-600 select-none",onClick:u},null,512),[[d.vShow,!l.value]])])])])):d.createCommentVNode("",!0)],2)),t.error&&d.unref(o)?(d.openBlock(),d.createElementBlock("div",Gy,[d.createVNode(d.unref(dg),{name:s.value},{default:d.withCtx(V=>[d.createTextVNode(d.toDisplayString(V.message),1)]),_:1},8,["name"])])):d.createCommentVNode("",!0),v.$slots.help||t.help?(d.openBlock(),d.createElementBlock("div",{key:6,class:d.normalizeClass(["text-base mt-1",{"ml-7":t.type=="checkbox","opacity-50":t.disabled}])},[d.renderSlot(v.$slots,"help",{},()=>[d.createTextVNode(d.toDisplayString(t.help),1)])],2)):d.createCommentVNode("",!0)],2)}}}),Xy={key:0,class:"mb-2 gap-2 wpic-form-label text-base text-zinc-600 dark:text-zinc-300 flex items-center"},Qy={class:""},eb={key:0,class:"absolute left-0 ml-3 h-full flex items-center justify-center text-center"},tb={class:"opacity-50 w-4 h-4 leading-tight"},Md=Object.assign({name:"WpicFormInput"},{props:{label:String,info:String,disabled:Boolean,large:Boolean},setup(t){const e={pmi:"shadow-inner border-zinc-400 focus-within:border-zinc-500 focus-within:outline focus-within:outline-2 focus-within:outline-offset-3 bg-zinc-100 dark:bg-zinc-700/25 dark:border-zinc-700/50 dark:text-zinc-300","wpic-tools":"border-slate-300 bg-white focus-within:border-blue-400 outline-blue-200 focus-within:outline focus-within:outline-[3px]"},n={pmi:"border-opacity-50 border-zinc-300 text-zinc-400","wpic-tools":"border-slate-200 text-slate-400"};return(r,i)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[t.label?(d.openBlock(),d.createElementBlock("div",Xy,[d.createTextVNode(d.toDisplayString(t.label)+" ",1),d.createElementVNode("div",Qy,[t.info?(d.openBlock(),d.createBlock(Ci,{key:0,hover:""},{content:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(t.info),1)]),default:d.withCtx(()=>[d.createVNode(hd,{class:"w-4 h-4 text-zinc-600"})]),_:1})):d.createCommentVNode("",!0)])])):d.createCommentVNode("",!0),d.createElementVNode("div",{class:d.normalizeClass(["wpic-input rounded flex relative border pr-4 items-center",{"pl-4":!r.$slots.prepend,"pl-10":r.$slots.prepend,[`${e[d.unref(Se).theme]}`]:!0,"h-10":!t.large,"h-12":t.large,[`${n[d.unref(Se).theme]}`]:t.disabled,"cursor-pointer":!t.disabled}])},[r.$slots.prepend?(d.openBlock(),d.createElementBlock("div",eb,[d.createElementVNode("div",tb,[d.renderSlot(r.$slots,"prepend")])])):d.createCommentVNode("",!0),d.renderSlot(r.$slots,"default")],2)],64))}}),nb={},rb={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor"},ib=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)];function sb(t,e){return d.openBlock(),d.createElementBlock("svg",rb,ib)}const ob=ye(nb,[["render",sb]]),ab=["disabled"],lb={key:0,class:"leading-none"},cb={key:0},db={key:1,class:"flex flex-col max-h-80 overflow-y-auto"},ub=["onClick"],fb={class:"select-none flex w-full items-center justify-between"},hb=Object.assign({name:"WpicChoiceList"},{props:{modelValue:{},value:{},name:String,small:Boolean,hideSelect:Boolean,label:String,placeholder:String,options:Array,multiple:Boolean,required:Boolean,disabled:Boolean,isInvalid:Boolean,maxDisplay:{type:Number}},emits:["blur","input","change","update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=d.ref();function s(f){if(n.multiple){if(f){let h=n.modelValue||[];h.indexOf(f)>=0?h.splice(h.indexOf(f),1):h.push(f),r("update:modelValue",h)}}else r("update:modelValue",f),i.value.hide()}const o=d.computed(()=>{var f,h,p,m;if(n.multiple)if(n.maxDisplay){let y=(h=n.options)==null?void 0:h.filter(k=>{var x;return((x=n.modelValue)==null?void 0:x.indexOf(k.value))>=0}).map(k=>k.label),g=y==null?void 0:y.slice(0,n.maxDisplay);return y.length-g.length>0?(g==null?void 0:g.join(", "))+` (+${y.length-g.length})`:g==null?void 0:g.join(", ")}else return(f=n.options)==null?void 0:f.filter(y=>{var g;return((g=n.modelValue)==null?void 0:g.indexOf(y.value))>=0}).map(y=>y.label).join(", ");else return((m=(p=n.options)==null?void 0:p.find(y=>y.value===n.modelValue))==null?void 0:m.label)||n.modelValue}),a=d.computed(()=>{if(n.required)return n.options;{let f=n.options;return f.unshift({label:n.placeholder||"-",value:null}),f}});function l(f){var h;return n.multiple?n.modelValue!==null&&((h=n.modelValue)==null?void 0:h.indexOf(f))>=0:n.modelValue!==null&&f===n.modelValue}const c={pmi:"text-zinc-800 dark:text-zinc-300 disabled:bg-zinc-50 disabled:border-zinc-300 disabled:text-zinc-400 enabled:bg-zinc-100 enabled:border-zinc-400 enabled:text-zinc-500 enabled:dark:bg-zinc-700/25 enabled:dark:border-zinc-700/50 enabled:dark:text-zinc-300","wpic-tools":"disabled:text-slate-400 disabled:border-slate-200 bg-white border-slate-300 focus-within:border-lime-400 disabled:bg-slate-50"},u={pmi:"group-[.is-selected]:bg-violet-50 group-[.is-selected]:hover:bg-violet-100","wpic-tools":"hover:bg-slate-50 group-[.is-selected]:text-lime-500 group-[.is-selected]:font-semibold"};return(f,h)=>(d.openBlock(),d.createBlock(Ci,{custom:"",ref_key:"myPopover",ref:i,label:t.label,disabled:t.disabled},{default:d.withCtx(({isHidden:p})=>{var m;return[d.createElementVNode("button",{class:d.normalizeClass(["flex appearance-none w-full items-center gap-2 px-3 lg:text-base rounded border overflow-hidden leading-none",{"h-10":!t.small,"h-8":t.small,"cursor-pointer":!t.disabled,"!border-red-600 focus-within:outline-red-600":t.isInvalid,[`${c[d.unref(Se).theme]}`]:!0}]),disabled:t.disabled},[d.createElementVNode("span",{class:d.normalizeClass(["select-none w-full text-left flex-1",{"whitespace-pre":!t.multiple}])},[t.modelValue&&((m=t.modelValue)==null?void 0:m.length)>0&&!t.hideSelect?(d.openBlock(),d.createElementBlock("span",lb,d.toDisplayString(o.value),1)):d.renderSlot(f.$slots,"default",{key:1},()=>[d.createTextVNode(d.toDisplayString(t.placeholder),1)])],2),d.createVNode(ob,{class:d.normalizeClass(["h-4 w-4 transition-all transform",{"rotate-180":!p}])},null,8,["class"])],10,ab)]}),content:d.withCtx(()=>{var p;return[!t.options&&((p=t.options)==null?void 0:p.length)==0?(d.openBlock(),d.createElementBlock("span",cb,"No data.")):(d.openBlock(),d.createElementBlock("div",db,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(a.value,m=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["group",{"is-selected":!!l(m.value)}])},[d.createElementVNode("div",{class:d.normalizeClass(["flex items-center py-2 px-4 min-w-64 text-base",{"cursor-pointer":!t.multiple||m.value,[`${u[d.unref(Se).theme]}`]:!0}]),onClick:y=>s(m.value)},[d.createElementVNode("div",fb,[d.createElementVNode("span",null,d.toDisplayString(m.label||m.value),1),l(m.value)?(d.openBlock(),d.createBlock(fd,{key:0,class:"w-4 h-4"})):d.createCommentVNode("",!0)])],10,ub)],2))),256))]))]}),_:3},8,["label","disabled"]))}}),pb={class:"bg-white dark:bg-zinc-800/50 rounded-lg wpic-card shadow-[0_4px_16px_0px_rgba(0,0,0,0.1)]"},mb={key:0,class:"flex justify-between items-baseline pt-6 px-6"},gb={key:0,class:"text-xl font-bold"},yb={class:""},bb={key:1,class:"flex items-center justify-end py-4 px-6"},vb=Object.assign({name:"WpicCard"},{props:{title:String},setup(t){return(e,n)=>(d.openBlock(),d.createElementBlock("div",pb,[t.title||e.$slots.actions?(d.openBlock(),d.createElementBlock("div",mb,[t.title?(d.openBlock(),d.createElementBlock("div",gb,d.toDisplayString(t.title),1)):d.createCommentVNode("",!0),d.createElementVNode("div",yb,[d.renderSlot(e.$slots,"actions")])])):d.createCommentVNode("",!0),d.renderSlot(e.$slots,"default"),e.$slots.buttons?(d.openBlock(),d.createElementBlock("div",bb,[d.renderSlot(e.$slots,"buttons")])):d.createCommentVNode("",!0)]))}}),kb={name:"WpicCardSection"},wb={class:"py-6 border-b last:border-0 mx-6"};function xb(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("div",wb,[d.renderSlot(t.$slots,"default")])}const Sb=ye(kb,[["render",xb]]),Mb={class:"flex h-2 rounded-full w-full ring-1 ring-zinc-400"},Ob=Object.assign({name:"WpicProgressBar"},{props:{value:Number},setup(t){return(e,n)=>(d.openBlock(),d.createElementBlock("div",Mb,[t.value>0?(d.openBlock(),d.createElementBlock("div",{key:0,style:d.normalizeStyle({width:`${t.value}%`}),class:"flex h-full bg-cyan-400 ring-1 ring-cyan-400 rounded-full"},null,4)):d.createCommentVNode("",!0)]))}}),Cb={class:"text-base leading-none"},Tb=Object.assign({name:"WpicTag"},{props:{clearable:Boolean},emits:["clear"],setup(t,{emit:e}){const n=e;function r(){n("clear")}return(i,s)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["wpic-tag select-none border border-cyan-500 bg-cyan-50 inline-flex rounded text-cyan-600 h-8 items-center justify-center pl-3 py-1",{"pr-3":!t.clearable,"pr-2":t.clearable}])},[d.createElementVNode("span",Cb,[d.renderSlot(i.$slots,"default")]),t.clearable?(d.openBlock(),d.createElementBlock("span",{key:0,onClick:r,class:"ml-1 cursor-pointer opacity-75 hover:opacity-100"},[d.createVNode(ua,{class:"w-4 h-4"})])):d.createCommentVNode("",!0)],2))}}),Eb=Object.assign({name:"WpicTagGroup"},{props:{full:Boolean},setup(t){return(e,n)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass({"w-full":t.full})},[d.createElementVNode("div",{class:d.normalizeClass(["ui-tag-group flex flex-wrap gap-2",{"w-full":t.full}])},[d.renderSlot(e.$slots,"default")],2)],2))}}),_b={class:"w-full h-full flex items-center justify-center"},Nb=Object.assign({name:"WpicLoadingPanel"},{props:{color:{type:String,default:""}},setup(t){return(e,n)=>(d.openBlock(),d.createElementBlock("div",_b,[d.createVNode(Ss,{color:t.color,class:"w-10 h-10"},null,8,["color"])]))}}),Db={class:"text-base font-medium"},Od=Object.assign({name:"WpicPaginationItem"},{props:{active:Boolean},setup(t){return(e,n)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["border rounded flex items-center justify-center w-10 h-10 cursor-pointer",{"border-zinc-300 dark:border-zinc-700 text-zinc-600 dark:text-zinc-300 hover:bg-zinc-500 hover:text-white":!t.active,"bg-violet-800 border-violet-800 hover:bg-violet-900 hover:border-violet-900 text-white":t.active}])},[d.createElementVNode("span",Db,[d.renderSlot(e.$slots,"default")])],2))}}),Ab={class:"wpic-pagination flex justify-between"},Vb={class:"flex flex-wrap gap-2"},Bb={class:"hidden lg:flex gap-2 items-center"},Pb=d.createElementVNode("span",{class:"text-base text-zinc-500"},"Results per page",-1),Ib={class:"flex gap-2"},Rb=Object.assign({name:"WpicPagination"},{props:{total:Number,perPage:{type:Number,default:10},currentPage:Number},emits:["update:perPage","update:currentPage"],setup(t,{expose:e,emit:n}){const r=t,i=n,s=d.computed(()=>r.total&&r.perPage?Math.ceil(r.total/r.perPage):1),o=[10,25,50,100];function a(f){i("update:currentPage",f)}function l(f){i("update:perPage",f)}function c(){return r.perPage*(r.currentPage-1)+1}function u(){return r.perPage*r.currentPage>r.total?r.total:r.perPage*r.currentPage}return e({getStart:c,getEnd:u}),(f,h)=>(d.openBlock(),d.createElementBlock("div",Ab,[d.createElementVNode("div",Vb,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.value,p=>(d.openBlock(),d.createBlock(Od,{onClick:m=>a(p),active:p===t.currentPage},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(p),1)]),_:2},1032,["onClick","active"]))),256))]),d.createElementVNode("div",Bb,[Pb,d.createElementVNode("div",Ib,[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(o,p=>d.createVNode(Od,{onClick:m=>l(p),active:p==t.perPage},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(p),1)]),_:2},1032,["onClick","active"])),64))])])]))}}),Cd=(t,e)=>t.column.children&&t.column.children.default&&typeof t.column.children.default=="function"?d.h("td",e.attrs,t.column.children.default({item:t.item})):d.h("td",e.attrs,t.column.children);Cd.props=["column","item","rowIndex"];const Td=Cd,$b={},Lb={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},Fb=[d.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"},null,-1)];function zb(t,e){return d.openBlock(),d.createElementBlock("svg",Lb,Fb)}const jb=ye($b,[["render",zb]]),Wb={class:"font-semibold"},Ed={__name:"TotalRow",props:{columns:Array,noXPadding:Boolean,totalItem:{},position:String},setup(t){return(e,n)=>(d.openBlock(),d.createElementBlock("tr",Wb,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(t.columns,(r,i)=>(d.openBlock(),d.createBlock(Td,{class:d.normalizeClass(["py-3 px-6 lg:text-base border-t",{"border-b":t.position==="header","border-t":t.position==="footer","first:pl-0 last:pr-0":t.noXPadding,"last:rounded-br-lg":!0,"first:rounded-bl-lg":!0,"text-center":r.align=="center","text-right":r.align=="right"}]),id:`total_${i}`,column:r,item:t.totalItem,key:`tr_total_${i}`},null,8,["class","id","column","item"]))),128))]))}},Hb={class:"w-full rounded-lg"},Yb=["width","max-width"],Ub={key:0,class:"rounded-t-lg"},qb=["onClick"],Kb={class:"rounded-b-lg"},Jb={key:1},Gb=Object.assign({name:"WpicTable"},{props:{data:{type:Array,default:()=>[]},hideHeaders:Boolean,sortOptions:{},border:Boolean,noXPadding:Boolean,totalItem:{},totalOnBottom:Boolean,totalOnTop:Boolean},emits:["changeSort"],setup(t,{expose:e,emit:n}){const r=t,i={pmi:"","wpic-tools":"border-slate-300"},s={pmi:"bg-zinc-50 dark:bg-zinc-800/60 text-zinc-500 dark:text-zinc-400 dark:border-zinc-900","wpic-tools":"bg-slate-100 dark:bg-slate-800/60 text-slate-400 dark:text-slate-400 border-slate-200 dark:border-slate-900"},o={pmi:"bg-white dark:text-zinc-300 dark:border-zinc-900 dark:bg-zinc-800","wpic-tools":"bg-white border-slate-200 dark:border-slate-900 dark:bg-slate-800"},a=n;d.onMounted(()=>{f()});const l=d.getCurrentInstance();d.provide("wtable",l==null?void 0:l.proxy);const c=d.useSlots(),u=d.ref([]);function f(){const p=(g,k)=>{let x={};for(let O in g){if(typeof g[O].default=="boolean"&&k[O]!==void 0){x[O]=k[O]!==!1;continue}if(k[O]!==void 0){x[O]=k[O];continue}if(typeof g[O].default=="function"){x[O]=g[O].default();continue}x[O]=g[O].default}return x};let m=[];(c.default&&c.default()||[]).forEach(g=>{var k,x;((k=g.type)==null?void 0:k.name)==="WpicTableColumn"?m.push(g):(x=g.children)!=null&&x.length&&g.children.forEach(O=>{var b;((b=O.type)==null?void 0:b.name)==="WpicTableColumn"&&m.push(O)})}),u.value=m.map(g=>{let k=g.children,x=g.props||{},{field:O,label:b,help:C,width:v,minWidth:T,maxWidth:B,sortable:V,selectable:F,render:te,type:G,align:ne,visible:oe}=p(g.type.props,x);return{label:b,help:C,width:v,minWidth:T,maxWidth:B,type:G,align:ne,sortable:V,selectable:F,field:O,render:te,children:k,visible:oe}}).filter(g=>g.visible||g.selectable)}function h(p){var y,g;let m=(y=r.sortOptions)==null?void 0:y.sortDirection;((g=r.sortOptions)==null?void 0:g.sortBy)===p&&(m=m==="asc"?"desc":"asc"),a("changeSort",{sortDirection:m,sortBy:p})}return d.watch(()=>c.default,p=>{console.log("watch slots.default",p),f()},{deep:!0}),e({buildColumns:f}),(p,m)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["relative w-full rounded-lg",{border:t.border,[`${i[d.unref(Se).theme]}`]:!0}])},[d.createElementVNode("table",Hb,[d.createElementVNode("colgroup",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(u.value,(y,g)=>(d.openBlock(),d.createElementBlock("col",{style:d.normalizeStyle({minWidth:`${y.minWidth}px`}),width:y.width,"max-width":y.maxWidth,key:g},null,12,Yb))),128))]),t.hideHeaders?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("thead",Ub,[d.createElementVNode("tr",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(u.value,(y,g)=>{var k,x;return d.openBlock(),d.createElementBlock("th",{class:d.normalizeClass(["first:rounded-tl-lg last:rounded-tr-lg p-0 border-b",[`${s[d.unref(Se).theme]}`]])},[d.createElementVNode("div",{onClick:()=>{y.sortable&&h(y.field)},class:d.normalizeClass(["flex items-center py-3 px-6 lg:text-base rounded-lg",{"cursor-pointer":y.sortable&&y.field,"justify-center":y.align=="center","justify-end":y.align=="right"}])},[d.createElementVNode("span",{class:d.normalizeClass(["select-none font-medium",{"text-right":y.align=="right"}])},d.toDisplayString(y.label),3),y.sortable&&y.field?(d.openBlock(),d.createElementBlock("span",{key:0,class:d.normalizeClass(["ml-1",{"opacity-25":y.field!=((k=t.sortOptions)==null?void 0:k.sortBy)}])},[d.createVNode(jb,{class:d.normalizeClass(["w-4 h-4",{"rotate-180":((x=t.sortOptions)==null?void 0:x.sortDirection)==="asc"}])},null,8,["class"])],2)):d.createCommentVNode("",!0)],10,qb)],2)}),256))])])),d.createElementVNode("tbody",Kb,[t.totalItem&&t.totalOnTop?(d.openBlock(),d.createBlock(Ed,{key:0,position:"header",columns:u.value,noXPadding:t.noXPadding,totalItem:t.totalItem},null,8,["columns","noXPadding","totalItem"])):d.createCommentVNode("",!0),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(t.data,(y,g)=>(d.openBlock(),d.createElementBlock("tr",{class:d.normalizeClass(["tr border-b last:border-b-0 overflow-hidden",[`${o[d.unref(Se).theme]}`]]),key:`tr_${g}`},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(u.value,(k,x)=>{var O,b;return d.openBlock(),d.createBlock(Td,{class:d.normalizeClass(["py-3 px-6 lg:text-base",{"first:pl-0 last:pr-0":t.noXPadding,"last:rounded-br-lg":g===((O=t.data)==null?void 0:O.length)-1&&!t.totalItem,"first:rounded-bl-lg":g===((b=t.data)==null?void 0:b.length)-1&&!t.totalItem,"text-center":k.align=="center","text-right":k.align=="right"}]),id:`${g}_${x}`,column:k,item:y,rowIndex:g,key:x},null,8,["class","id","column","item","rowIndex"])}),128))],2))),128))]),t.totalItem&&t.totalOnBottom?(d.openBlock(),d.createElementBlock("tfoot",Jb,[d.createVNode(Ed,{position:"footer",columns:u.value,noXPadding:t.noXPadding,totalItem:t.totalItem},null,8,["columns","noXPadding","totalItem"])])):d.createCommentVNode("",!0)])],2))}}),Zb={name:"WpicTableColumn",props:{label:{type:String},help:{type:String},field:{type:String,default:""},selectable:{type:Boolean,default:!0},sortable:{type:Boolean,default:!1},type:{type:String,default:"default"},width:{type:[String,Number],default:null},minWidth:{type:[String,Number],default:null},maxWidth:{type:[String,Number],default:null},align:{type:String,default:"left"},visible:{type:Boolean,default:!0}},setup(t){const e=inject("wtable",null);return onMounted(()=>{e&&e.buildColumns&&e.buildColumns()}),onBeforeUnmount(()=>{e&&e.buildColumns&&e.buildColumns()}),()=>null}};function Fe(t){this.content=t}Fe.prototype={constructor:Fe,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),s=r.content.slice();return i==-1?s.push(n||t,e):(s[i+1]=e,n&&(s[i]=n)),new Fe(s)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Fe(n)},addToStart:function(t,e){return new Fe([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Fe(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),s=r.find(t);return i.splice(s==-1?i.length:s,0,e,n),new Fe(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Fe.from(t),t.size?new Fe(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Fe.from(t),t.size?new Fe(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Fe.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}},Fe.from=function(t){if(t instanceof Fe)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Fe(e)};function _d(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),s=e.child(r);if(i==s){n+=i.nodeSize;continue}if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)n++;return n}if(i.content.size||s.content.size){let o=_d(i.content,s.content,n+1);if(o!=null)return o}n+=i.nodeSize}}function Nd(t,e,n,r){for(let i=t.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:n,b:r};let o=t.child(--i),a=e.child(--s),l=o.nodeSize;if(o==a){n-=l,r-=l;continue}if(!o.sameMarkup(a))return{a:n,b:r};if(o.isText&&o.text!=a.text){let c=0,u=Math.min(o.text.length,a.text.length);for(;c<u&&o.text[o.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(o.content.size||a.content.size){let c=Nd(o.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}}class N{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,s){for(let o=0,a=0;a<n;o++){let l=this.content[o],c=a+l.nodeSize;if(c>e&&r(l,i+a,s||null,o)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,n-u),r,i+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let s="",o=!0;return this.nodesBetween(e,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);return new N(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let s=0,o=0;o<n;s++){let a=this.content[s],l=o+a.nodeSize;l>e&&((o<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-o),Math.min(a.text.length,n-o)):a=a.cut(Math.max(0,e-o-1),Math.min(a.content.size,n-o-1))),r.push(a),i+=a.nodeSize),o=l}return new N(r,i)}cutByIndex(e,n){return e==n?N.empty:e==0&&n==this.content.length?this:new N(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new N(i,s)}addToStart(e){return new N([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new N(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return _d(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return Nd(this,e,n,r)}findIndex(e,n=-1){if(e==0)return Vs(0,e);if(e==this.size)return Vs(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,i=0;;r++){let s=this.child(r),o=i+s.nodeSize;if(o>=e)return o==e||n>0?Vs(r+1,o):Vs(r,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return N.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new N(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return N.empty;let n,r=0;for(let i=0;i<e.length;i++){let s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(n||(n=e.slice(0,i)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new N(n||e,r)}static from(e){if(!e)return N.empty;if(e instanceof N)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new N([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}N.empty=new N([],0);const pa={index:0,offset:0};function Vs(t,e){return pa.index=t,pa.offset=e,pa}function Bs(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Bs(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Bs(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let me=class yc{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))n||(n=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Bs(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);return r.create(n.attrs)}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return yc.none;if(e instanceof yc)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};me.none=[];class Ps extends Error{}class I{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=Ad(this.content,e+this.openStart,n);return r&&new I(r,this.openStart,this.openEnd)}removeBetween(e,n){return new I(Dd(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return I.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new I(N.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)i++;return new I(e,r,i)}}I.empty=new I(N.empty,0,0);function Dd(t,e,n){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r),{index:o,offset:a}=t.findIndex(n);if(i==e||s.isText){if(a!=n&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(Dd(s.content,e-i-1,n-i-1)))}function Ad(t,e,n,r){let{index:i,offset:s}=t.findIndex(e),o=t.maybeChild(i);if(s==e||o.isText)return t.cut(0,e).append(n).append(t.cut(e));let a=Ad(o.content,e-s-1,n);return a&&t.replaceChild(i,o.copy(a))}function Xb(t,e,n){if(n.openStart>t.depth)throw new Ps("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Ps("Inconsistent open depths");return Vd(t,e,n,0)}function Vd(t,e,n,r){let i=t.index(r),s=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let o=Vd(t,e,n,r+1);return s.copy(s.content.replaceChild(i,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let o=t.parent,a=o.content;return ir(o,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:o,end:a}=Qb(n,t);return ir(s,Pd(t,o,a,e,r))}else return ir(s,Is(t,e,r))}function Bd(t,e){if(!e.type.compatibleContent(t.type))throw new Ps("Cannot join "+e.type.name+" onto "+t.type.name)}function ma(t,e,n){let r=t.node(n);return Bd(r,e.node(n)),r}function rr(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Ei(t,e,n,r){let i=(e||t).node(n),s=0,o=e?e.index(n):i.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&(rr(t.nodeAfter,r),s++));for(let a=s;a<o;a++)rr(i.child(a),r);e&&e.depth==n&&e.textOffset&&rr(e.nodeBefore,r)}function ir(t,e){return t.type.checkContent(e),t.copy(e)}function Pd(t,e,n,r,i){let s=t.depth>i&&ma(t,e,i+1),o=r.depth>i&&ma(n,r,i+1),a=[];return Ei(null,t,i,a),s&&o&&e.index(i)==n.index(i)?(Bd(s,o),rr(ir(s,Pd(t,e,n,r,i+1)),a)):(s&&rr(ir(s,Is(t,e,i+1)),a),Ei(e,n,i,a),o&&rr(ir(o,Is(n,r,i+1)),a)),Ei(r,null,i,a),new N(a)}function Is(t,e,n){let r=[];if(Ei(null,t,n,r),t.depth>n){let i=ma(t,e,n+1);rr(ir(i,Is(t,e,n+1)),r)}return Ei(e,null,n,r),new N(r)}function Qb(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let s=n-1;s>=0;s--)i=e.node(s).copy(N.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class _i{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let s=0;s<e;s++)i+=r.child(s).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return me.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let a=r;r=i,i=a}let s=r.marks;for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!i||!s[o].isInSet(i.marks))&&(s=s[o--].removeFromSet(s));return s}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new Rs(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,s=n;for(let o=e;;){let{index:a,offset:l}=o.content.findIndex(s),c=s-l;if(r.push(o,a,i+l),!c||(o=o.child(a),o.isText))break;s=c-1,i+=l+1}return new _i(n,r,s)}static resolveCached(e,n){for(let i=0;i<ga.length;i++){let s=ga[i];if(s.pos==n&&s.doc==e)return s}let r=ga[ya]=_i.resolve(e,n);return ya=(ya+1)%e1,r}}let ga=[],ya=0,e1=12;class Rs{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const t1=Object.create(null);let sr=class bc{constructor(e,n,r,i=me.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||N.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Bs(this.attrs,n||e.defaultAttrs||t1)&&me.sameSet(this.marks,r||me.none)}copy(e=null){return e==this.content?this:new bc(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new bc(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return I.empty;let i=this.resolve(e),s=this.resolve(n),o=r?0:i.sharedDepth(n),a=i.start(o),c=i.node(o).content.cut(i.pos-a,s.pos-a);return new I(c,i.depth-o,s.depth-o)}replace(e,n,r){return Xb(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return _i.resolveCached(this,e)}resolveNoCache(e){return _i.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Id(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=N.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),a=o&&o.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=i;l<s;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(e).matchType(r),o=s&&s.matchFragment(this.content,n);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content);let e=me.none;for(let n=0;n<this.marks.length;n++)e=this.marks[n].addToSet(e);if(!me.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=N.fromJSON(e,n.content);return e.nodeType(n.type).create(n.attrs,i,r)}};sr.prototype.text=void 0;class $s extends sr{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Id(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new $s(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new $s(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Id(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class or{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new n1(e,n);if(r.next==null)return or.empty;let i=Rd(r);r.next&&r.err("Unexpected trailing text");let s=c1(l1(i));return d1(s,r),s}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let s=n;i&&s<r;s++)i=i.matchType(e.child(s).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function s(o,a){let l=o.matchFragment(e,r);if(l&&(!n||l.validEnd))return N.from(a.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:f}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let h=s(f,a.concat(u));if(h)return h}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(e)){let o=[];for(let a=i;a.type;a=a.via)o.push(a.type);return o.reverse()}for(let o=0;o<s.next.length;o++){let{type:a,next:l}=s.next[o];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!i.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)s+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return s}).join(`
5
+ */function Ae(t){return typeof t=="function"}function wc(t){return t==null}const _n=t=>t!==null&&!!t&&typeof t=="object"&&!Array.isArray(t);function Uo(t){return Number(t)>=0}function um(t){const e=parseFloat(t);return isNaN(e)?t:e}function fm(t){return typeof t=="object"&&t!==null}function hm(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}function xc(t){if(!fm(t)||hm(t)!=="[object Object]")return!1;if(Object.getPrototypeOf(t)===null)return!0;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function bi(t,e){return Object.keys(e).forEach(n=>{if(xc(e[n])&&xc(t[n])){t[n]||(t[n]={}),bi(t[n],e[n]);return}t[n]=e[n]}),t}function vi(t){const e=t.split(".");if(!e.length)return"";let n=String(e[0]);for(let r=1;r<e.length;r++){if(Uo(e[r])){n+=`[${e[r]}]`;continue}n+=`.${e[r]}`}return n}const Sc={};function Dt(t,e){mm(t,e),Sc[t]=e}function pm(t){return Sc[t]}function mm(t,e){if(!Ae(e))throw new Error(`Extension Error: The validator '${t}' must be a function.`)}function Mc(t,e,n){typeof n.value=="object"&&(n.value=pe(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||e==="__proto__"?Object.defineProperty(t,e,n):t[e]=n.value}function pe(t){if(typeof t!="object")return t;var e=0,n,r,i,s=Object.prototype.toString.call(t);if(s==="[object Object]"?i=Object.create(t.__proto__||null):s==="[object Array]"?i=Array(t.length):s==="[object Set]"?(i=new Set,t.forEach(function(o){i.add(pe(o))})):s==="[object Map]"?(i=new Map,t.forEach(function(o,a){i.set(pe(a),pe(o))})):s==="[object Date]"?i=new Date(+t):s==="[object RegExp]"?i=new RegExp(t.source,t.flags):s==="[object DataView]"?i=new t.constructor(pe(t.buffer)):s==="[object ArrayBuffer]"?i=t.slice(0):s.slice(-6)==="Array]"&&(i=new t.constructor(t)),i){for(r=Object.getOwnPropertySymbols(t);e<r.length;e++)Mc(i,r[e],Object.getOwnPropertyDescriptor(t,r[e]));for(e=0,r=Object.getOwnPropertyNames(t);e<r.length;e++)Object.hasOwnProperty.call(i,n=r[e])&&i[n]===t[n]||Mc(i,n,Object.getOwnPropertyDescriptor(t,n))}return i||t}const ki=Symbol("vee-validate-form"),Oc=Symbol("vee-validate-field-instance"),gs=Symbol("Default empty value"),gm=typeof window<"u";function qo(t){return Ae(t)&&!!t.__locatorRef}function At(t){return!!t&&Ae(t.parse)&&t.__type==="VVTypedSchema"}function ys(t){return!!t&&Ae(t.validate)}function wi(t){return t==="checkbox"||t==="radio"}function ym(t){return _n(t)||Array.isArray(t)}function bm(t){return Array.isArray(t)?t.length===0:_n(t)&&Object.keys(t).length===0}function bs(t){return/^\[.+\]$/i.test(t)}function vm(t){return Cc(t)&&t.multiple}function Cc(t){return t.tagName==="SELECT"}function km(t,e){const n=![!1,null,void 0,0].includes(e.multiple)&&!Number.isNaN(e.multiple);return t==="select"&&"multiple"in e&&n}function wm(t,e){return!km(t,e)&&e.type!=="file"&&!wi(e.type)}function Tc(t){return Ko(t)&&t.target&&"submit"in t.target}function Ko(t){return t?!!(typeof Event<"u"&&Ae(Event)&&t instanceof Event||t&&t.srcElement):!1}function Ec(t,e){return e in t&&t[e]!==gs}function qe(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,i;if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!qe(t[r],e[r]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;for(r of t.entries())if(!qe(r[1],e.get(r[0])))return!1;return!0}if(_c(t)&&_c(e))return!(t.size!==e.size||t.name!==e.name||t.lastModified!==e.lastModified||t.type!==e.type);if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(t[r]!==e[r])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();for(i=Object.keys(t),n=i.length,r=n;r--!==0;){var s=i[r];if(!qe(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function _c(t){return gm?t instanceof File:!1}function Jo(t){return bs(t)?t.replace(/\[|\]/gi,""):t}function nt(t,e,n){return t?bs(e)?t[Jo(e)]:(e||"").split(/\.|\[(\d+)\]/).filter(Boolean).reduce((i,s)=>ym(i)&&s in i?i[s]:n,t):n}function dn(t,e,n){if(bs(e)){t[Jo(e)]=n;return}const r=e.split(/\.|\[(\d+)\]/).filter(Boolean);let i=t;for(let s=0;s<r.length;s++){if(s===r.length-1){i[r[s]]=n;return}(!(r[s]in i)||wc(i[r[s]]))&&(i[r[s]]=Uo(r[s+1])?[]:{}),i=i[r[s]]}}function Go(t,e){if(Array.isArray(t)&&Uo(e)){t.splice(Number(e),1);return}_n(t)&&delete t[e]}function Nc(t,e){if(bs(e)){delete t[Jo(e)];return}const n=e.split(/\.|\[(\d+)\]/).filter(Boolean);let r=t;for(let s=0;s<n.length;s++){if(s===n.length-1){Go(r,n[s]);break}if(!(n[s]in r)||wc(r[n[s]]))break;r=r[n[s]]}const i=n.map((s,o)=>nt(t,n.slice(0,o).join(".")));for(let s=i.length-1;s>=0;s--)if(bm(i[s])){if(s===0){Go(t,n[0]);continue}Go(i[s-1],n[s-1])}}function rt(t){return Object.keys(t)}function Zo(t,e=void 0){const n=d.getCurrentInstance();return(n==null?void 0:n.provides[t])||d.inject(t,e)}function Dc(t,e,n){if(Array.isArray(t)){const r=[...t],i=r.findIndex(s=>qe(s,e));return i>=0?r.splice(i,1):r.push(e),r}return qe(t,e)?n:e}function xm(t,e){let n,r;return function(...i){const s=this;return n||(n=!0,setTimeout(()=>n=!1,e),r=t.apply(s,i)),r}}function Ac(t,e=0){let n=null,r=[];return function(...i){return n&&clearTimeout(n),n=setTimeout(()=>{const s=t(...i);r.forEach(o=>o(s)),r=[]},e),new Promise(s=>r.push(s))}}function Sm(t,e){return _n(e)&&e.number?um(t):t}function Xo(t,e){let n;return async function(...i){const s=t(...i);n=s;const o=await s;return s!==n?o:(n=void 0,e(o,i))}}function Qo(t){return Array.isArray(t)?t:t?[t]:[]}function vs(t,e){const n={};for(const r in t)e.includes(r)||(n[r]=t[r]);return n}function Mm(t){let e=null,n=[];return function(...r){const i=d.nextTick(()=>{if(e!==i)return;const s=t(...r);n.forEach(o=>o(s)),n=[],e=null});return e=i,new Promise(s=>n.push(s))}}function ea(t,e,n){return e.slots.default?typeof t=="string"||!t?e.slots.default(n()):{default:()=>{var r,i;return(i=(r=e.slots).default)===null||i===void 0?void 0:i.call(r,n())}}:e.slots.default}function ta(t){if(Vc(t))return t._value}function Vc(t){return"_value"in t}function Om(t){return t.type==="number"||t.type==="range"?Number.isNaN(t.valueAsNumber)?t.value:t.valueAsNumber:t.value}function ks(t){if(!Ko(t))return t;const e=t.target;if(wi(e.type)&&Vc(e))return ta(e);if(e.type==="file"&&e.files){const n=Array.from(e.files);return e.multiple?n:n[0]}if(vm(e))return Array.from(e.options).filter(n=>n.selected&&!n.disabled).map(ta);if(Cc(e)){const n=Array.from(e.options).find(r=>r.selected);return n?ta(n):e.value}return Om(e)}function Bc(t){const e={};return Object.defineProperty(e,"_$$isNormalized",{value:!0,writable:!1,enumerable:!1,configurable:!1}),t?_n(t)&&t._$$isNormalized?t:_n(t)?Object.keys(t).reduce((n,r)=>{const i=Cm(t[r]);return t[r]!==!1&&(n[r]=Pc(i)),n},e):typeof t!="string"?e:t.split("|").reduce((n,r)=>{const i=Tm(r);return i.name&&(n[i.name]=Pc(i.params)),n},e):e}function Cm(t){return t===!0?[]:Array.isArray(t)||_n(t)?t:[t]}function Pc(t){const e=n=>typeof n=="string"&&n[0]==="@"?Em(n.slice(1)):n;return Array.isArray(t)?t.map(e):t instanceof RegExp?[t]:Object.keys(t).reduce((n,r)=>(n[r]=e(t[r]),n),{})}const Tm=t=>{let e=[];const n=t.split(":")[0];return t.includes(":")&&(e=t.split(":").slice(1).join(":").split(",")),{name:n,params:e}};function Em(t){const e=n=>nt(n,t)||n[t];return e.__locatorRef=t,e}function _m(t){return Array.isArray(t)?t.filter(qo):rt(t).filter(e=>qo(t[e])).map(e=>t[e])}let Nm=Object.assign({},{generateMessage:({field:t})=>`${t} is not valid.`,bails:!0,validateOnBlur:!0,validateOnChange:!0,validateOnInput:!1,validateOnModelUpdate:!0});const tr=()=>Nm;async function Ic(t,e,n={}){const r=n==null?void 0:n.bails,i={name:(n==null?void 0:n.name)||"{field}",rules:e,label:n==null?void 0:n.label,bails:r??!0,formData:(n==null?void 0:n.values)||{}},o=(await Dm(i,t)).errors;return{errors:o,valid:!o.length}}async function Dm(t,e){if(At(t.rules)||ys(t.rules))return Vm(e,t.rules);if(Ae(t.rules)||Array.isArray(t.rules)){const o={field:t.label||t.name,name:t.name,label:t.label,form:t.formData,value:e},a=Array.isArray(t.rules)?t.rules:[t.rules],l=a.length,c=[];for(let u=0;u<l;u++){const f=a[u],h=await f(e,o);if(!(typeof h!="string"&&!Array.isArray(h)&&h)){if(Array.isArray(h))c.push(...h);else{const m=typeof h=="string"?h:$c(o);c.push(m)}if(t.bails)return{errors:c}}}return{errors:c}}const n=Object.assign(Object.assign({},t),{rules:Bc(t.rules)}),r=[],i=Object.keys(n.rules),s=i.length;for(let o=0;o<s;o++){const a=i[o],l=await Bm(n,e,{name:a,params:n.rules[a]});if(l.error&&(r.push(l.error),t.bails))return{errors:r}}return{errors:r}}function Am(t){return!!t&&t.name==="ValidationError"}function Rc(t){return{__type:"VVTypedSchema",async parse(n){var r;try{return{output:await t.validate(n,{abortEarly:!1}),errors:[]}}catch(i){if(!Am(i))throw i;if(!(!((r=i.inner)===null||r===void 0)&&r.length)&&i.errors.length)return{errors:[{path:i.path,errors:i.errors}]};const s=i.inner.reduce((o,a)=>{const l=a.path||"";return o[l]||(o[l]={errors:[],path:l}),o[l].errors.push(...a.errors),o},{});return{errors:Object.values(s)}}}}}async function Vm(t,e){const r=await(At(e)?e:Rc(e)).parse(t),i=[];for(const s of r.errors)s.errors.length&&i.push(...s.errors);return{errors:i}}async function Bm(t,e,n){const r=pm(n.name);if(!r)throw new Error(`No such validator '${n.name}' exists.`);const i=Pm(n.params,t.formData),s={field:t.label||t.name,name:t.name,label:t.label,value:e,form:t.formData,rule:Object.assign(Object.assign({},n),{params:i})},o=await r(e,i,s);return typeof o=="string"?{error:o}:{error:o?void 0:$c(s)}}function $c(t){const e=tr().generateMessage;return e?e(t):"Field is invalid"}function Pm(t,e){const n=r=>qo(r)?r(e):r;return Array.isArray(t)?t.map(n):Object.keys(t).reduce((r,i)=>(r[i]=n(t[i]),r),{})}async function Im(t,e){const r=await(At(t)?t:Rc(t)).parse(pe(e)),i={},s={};for(const o of r.errors){const a=o.errors,l=(o.path||"").replace(/\["(\d+)"\]/g,(c,u)=>`[${u}]`);i[l]={valid:!a.length,errors:a},a.length&&(s[l]=a[0])}return{valid:!r.errors.length,results:i,errors:s,values:r.value}}async function Rm(t,e,n){const i=rt(t).map(async c=>{var u,f,h;const p=(u=n==null?void 0:n.names)===null||u===void 0?void 0:u[c],m=await Ic(nt(e,c),t[c],{name:(p==null?void 0:p.name)||c,label:p==null?void 0:p.label,values:e,bails:(h=(f=n==null?void 0:n.bailsMap)===null||f===void 0?void 0:f[c])!==null&&h!==void 0?h:!0});return Object.assign(Object.assign({},m),{path:c})});let s=!0;const o=await Promise.all(i),a={},l={};for(const c of o)a[c.path]={valid:c.valid,errors:c.errors},c.valid||(s=!1,l[c.path]=c.errors[0]);return{valid:s,results:a,errors:l}}let Lc=0;function $m(t,e){const{value:n,initialValue:r,setInitialValue:i}=Lm(t,e.modelValue,e.form);if(!e.form){let h=function(p){var m;"value"in p&&(n.value=p.value),"errors"in p&&c(p.errors),"touched"in p&&(f.touched=(m=p.touched)!==null&&m!==void 0?m:f.touched),"initialValue"in p&&i(p.initialValue)};const{errors:l,setErrors:c}=jm(),u=Lc>=Number.MAX_SAFE_INTEGER?0:++Lc,f=zm(n,r,l,e.schema);return{id:u,path:t,value:n,initialValue:r,meta:f,flags:{pendingUnmount:{[u]:!1},pendingReset:!1},errors:l,setState:h}}const s=e.form.createPathState(t,{bails:e.bails,label:e.label,type:e.type,validate:e.validate,schema:e.schema}),o=d.computed(()=>s.errors);function a(l){var c,u,f;"value"in l&&(n.value=l.value),"errors"in l&&((c=e.form)===null||c===void 0||c.setFieldError(d.unref(t),l.errors)),"touched"in l&&((u=e.form)===null||u===void 0||u.setFieldTouched(d.unref(t),(f=l.touched)!==null&&f!==void 0?f:!1)),"initialValue"in l&&i(l.initialValue)}return{id:Array.isArray(s.id)?s.id[s.id.length-1]:s.id,path:t,value:n,errors:o,meta:s,initialValue:r,flags:s.__flags,setState:a}}function Lm(t,e,n){const r=d.ref(d.unref(e));function i(){return n?nt(n.initialValues.value,d.unref(t),d.unref(r)):d.unref(r)}function s(c){if(!n){r.value=c;return}n.setFieldInitialValue(d.unref(t),c,!0)}const o=d.computed(i);if(!n)return{value:d.ref(i()),initialValue:o,setInitialValue:s};const a=Fm(e,n,o,t);return n.stageInitialValue(d.unref(t),a,!0),{value:d.computed({get(){return nt(n.values,d.unref(t))},set(c){n.setFieldValue(d.unref(t),c,!1)}}),initialValue:o,setInitialValue:s}}function Fm(t,e,n,r){return d.isRef(t)?d.unref(t):t!==void 0?t:nt(e.values,d.unref(r),d.unref(n))}function zm(t,e,n,r){const i=d.computed(()=>{var o,a,l;return(l=(a=(o=d.toValue(r))===null||o===void 0?void 0:o.describe)===null||a===void 0?void 0:a.call(o).required)!==null&&l!==void 0?l:!1}),s=d.reactive({touched:!1,pending:!1,valid:!0,required:i,validated:!!d.unref(n).length,initialValue:d.computed(()=>d.unref(e)),dirty:d.computed(()=>!qe(d.unref(t),d.unref(e)))});return d.watch(n,o=>{s.valid=!o.length},{immediate:!0,flush:"sync"}),s}function jm(){const t=d.ref([]);return{errors:t,setErrors:e=>{t.value=Qo(e)}}}function Fc(t){process.env.NODE_ENV!=="production"&&dm({id:"vee-validate-devtools-plugin",label:"VeeValidate Plugin",packageName:"vee-validate",homepage:"https://vee-validate.logaretm.com/v4",app:t,logo:"https://vee-validate.logaretm.com/v4/logo.png"},Ym)}const xi={},Si={};let un;const Tr=xm(()=>{setTimeout(async()=>{await d.nextTick(),un==null||un.sendInspectorState(Er),un==null||un.sendInspectorTree(Er)},100)},100);function Wm(t){const e=d.getCurrentInstance();if(!un){const n=e==null?void 0:e.appContext.app;if(!n)return;Fc(n)}xi[t.formId]=Object.assign({},t),xi[t.formId]._vm=e,d.onUnmounted(()=>{delete xi[t.formId],Tr()}),Tr()}function Hm(t){const e=d.getCurrentInstance();if(!un){const n=e==null?void 0:e.appContext.app;if(!n)return;Fc(n)}Si[t.id]=Object.assign({},t),Si[t.id]._vm=e,d.onUnmounted(()=>{delete Si[t.id],Tr()}),Tr()}const Er="vee-validate-inspector",it={error:12405579,success:448379,unknown:5522283,white:16777215,black:0,blue:218007,purple:12157168,orange:16099682,gray:12304330};let Ce=null;function Ym(t){un=t,t.addInspector({id:Er,icon:"rule",label:"vee-validate",noSelectionText:"Select a vee-validate node to inspect",actions:[{icon:"done_outline",tooltip:"Validate selected item",action:async()=>{if(!Ce){console.error("There is not a valid selected vee-validate node or component");return}if(Ce.type==="field"){await Ce.field.validate();return}if(Ce.type==="form"){await Ce.form.validate();return}Ce.type==="pathState"&&await Ce.form.validateField(Ce.state.path)}},{icon:"delete_sweep",tooltip:"Clear validation state of the selected item",action:()=>{if(!Ce){console.error("There is not a valid selected vee-validate node or component");return}if(Ce.type==="field"){Ce.field.resetField();return}Ce.type==="form"&&Ce.form.resetForm(),Ce.type==="pathState"&&Ce.form.resetField(Ce.state.path)}}]}),t.on.getInspectorTree(e=>{if(e.inspectorId!==Er)return;const n=Object.values(xi),r=Object.values(Si);e.rootNodes=[...n.map(Um),...r.map(i=>Km(i))]}),t.on.getInspectorState((e,n)=>{if(e.inspectorId!==Er||n.currentTab!==`custom-inspector:${Er}`)return;const{form:r,field:i,state:s,type:o}=Jm(e.nodeId);if(r&&o==="form"){e.state=Gm(r),Ce={type:"form",form:r};return}if(s&&o==="pathState"&&r){e.state=jc(s),Ce={type:"pathState",state:s,form:r};return}if(i&&o==="field"){e.state=jc({errors:i.errors.value,dirty:i.meta.dirty,valid:i.meta.valid,touched:i.meta.touched,value:i.value.value,initialValue:i.meta.initialValue}),Ce={field:i,type:"field"};return}Ce=null})}function Um(t){const{textColor:e,bgColor:n}=Wc(t.meta.value.valid),r={};Object.values(t.getAllPathStates()).forEach(o=>{dn(r,d.unref(o.path),qm(o,t))});function i(o,a=[]){const l=[...a].pop();return"id"in o?Object.assign(Object.assign({},o),{label:l||o.label}):_n(o)?{id:`${a.join(".")}`,label:l||"",children:Object.keys(o).map(c=>i(o[c],[...a,c]))}:Array.isArray(o)?{id:`${a.join(".")}`,label:`${l}[]`,children:o.map((c,u)=>i(c,[...a,String(u)]))}:{id:"",label:"",children:[]}}const{children:s}=i(r);return{id:na(t),label:"Form",children:s,tags:[{label:"Form",textColor:e,backgroundColor:n},{label:`${t.getAllPathStates().length} fields`,textColor:it.white,backgroundColor:it.unknown}]}}function qm(t,e){return{id:na(e,t),label:d.unref(t.path),tags:zc(t.multiple,t.fieldsCount,t.type,t.valid,e)}}function Km(t,e){return{id:na(e,t),label:d.unref(t.name),tags:zc(!1,1,t.type,t.meta.valid,e)}}function zc(t,e,n,r,i){const{textColor:s,bgColor:o}=Wc(r);return[t?void 0:{label:"Field",textColor:s,backgroundColor:o},i?void 0:{label:"Standalone",textColor:it.black,backgroundColor:it.gray},n==="checkbox"?{label:"Checkbox",textColor:it.white,backgroundColor:it.blue}:void 0,n==="radio"?{label:"Radio",textColor:it.white,backgroundColor:it.purple}:void 0,t?{label:"Multiple",textColor:it.black,backgroundColor:it.orange}:void 0].filter(Boolean)}function na(t,e){const n=e?"path"in e?"pathState":"field":"form",r=e?"path"in e?e==null?void 0:e.path:d.unref(e==null?void 0:e.name):"",i={f:t==null?void 0:t.formId,ff:r,type:n};return btoa(encodeURIComponent(JSON.stringify(i)))}function Jm(t){try{const e=JSON.parse(decodeURIComponent(atob(t))),n=xi[e.f];if(!n&&e.ff){const i=Si[e.ff];return i?{type:e.type,field:i}:{}}if(!n)return{};const r=n.getPathState(e.ff);return{type:e.type,form:n,state:r}}catch{}return{}}function jc(t){return{"Field state":[{key:"errors",value:t.errors},{key:"initialValue",value:t.initialValue},{key:"currentValue",value:t.value},{key:"touched",value:t.touched},{key:"dirty",value:t.dirty},{key:"valid",value:t.valid}]}}function Gm(t){const{errorBag:e,meta:n,values:r,isSubmitting:i,isValidating:s,submitCount:o}=t;return{"Form state":[{key:"submitCount",value:o.value},{key:"isSubmitting",value:i.value},{key:"isValidating",value:s.value},{key:"touched",value:n.value.touched},{key:"dirty",value:n.value.dirty},{key:"valid",value:n.value.valid},{key:"initialValues",value:n.value.initialValues},{key:"currentValues",value:r},{key:"errors",value:rt(e.value).reduce((a,l)=>{var c;const u=(c=e.value[l])===null||c===void 0?void 0:c[0];return u&&(a[l]=u),a},{})}]}}function Wc(t){return{bgColor:t?it.success:it.error,textColor:t?it.black:it.white}}function Zm(t,e,n){return wi(n==null?void 0:n.type)?Qm(t,e,n):Hc(t,e,n)}function Hc(t,e,n){const{initialValue:r,validateOnMount:i,bails:s,type:o,checkedValue:a,label:l,validateOnValueUpdate:c,uncheckedValue:u,controlled:f,keepValueOnUnmount:h,syncVModel:p,form:m}=Xm(n),y=f?Zo(ki):void 0,g=m||y,k=d.computed(()=>vi(d.toValue(t))),x=d.computed(()=>{if(d.toValue(g==null?void 0:g.schema))return;const K=d.unref(e);return ys(K)||At(K)||Ae(K)||Array.isArray(K)?K:Bc(K)}),O=!Ae(x.value)&&At(d.toValue(e)),{id:b,value:C,initialValue:v,meta:T,setState:B,errors:V,flags:F}=$m(k,{modelValue:r,form:g,bails:s,label:l,type:o,validate:x.value?j:void 0,schema:O?e:void 0}),te=d.computed(()=>V.value[0]);p&&eg({value:C,prop:p,handleChange:ie,shouldValidate:()=>c&&!F.pendingReset});const G=(P,K=!1)=>{T.touched=!0,K&&oe()};async function ne(P){var K,fe;if(g!=null&&g.validateSchema){const{results:ae}=await g.validateSchema(P);return(K=ae[d.toValue(k)])!==null&&K!==void 0?K:{valid:!0,errors:[]}}return x.value?Ic(C.value,x.value,{name:d.toValue(k),label:d.toValue(l),values:(fe=g==null?void 0:g.values)!==null&&fe!==void 0?fe:{},bails:s}):{valid:!0,errors:[]}}const oe=Xo(async()=>(T.pending=!0,T.validated=!0,ne("validated-only")),P=>(F.pendingUnmount[ke.id]||(B({errors:P.errors}),T.pending=!1,T.valid=P.valid),P)),re=Xo(async()=>ne("silent"),P=>(T.valid=P.valid,P));function j(P){return(P==null?void 0:P.mode)==="silent"?re():oe()}function ie(P,K=!0){const fe=ks(P);ct(fe,K)}d.onMounted(()=>{if(i)return oe();(!g||!g.validateSchema)&&re()});function ue(P){T.touched=P}function _e(P){var K;const fe=P&&"value"in P?P.value:v.value;B({value:pe(fe),initialValue:pe(fe),touched:(K=P==null?void 0:P.touched)!==null&&K!==void 0?K:!1,errors:(P==null?void 0:P.errors)||[]}),T.pending=!1,T.validated=!1,re()}const Qe=d.getCurrentInstance();function ct(P,K=!0){C.value=Qe&&p?Sm(P,Qe.props.modelModifiers):P,(K?oe:re)()}function bt(P){B({errors:Array.isArray(P)?P:[P]})}const vt=d.computed({get(){return C.value},set(P){ct(P,c)}}),ke={id:b,name:k,label:l,value:vt,meta:T,errors:V,errorMessage:te,type:o,checkedValue:a,uncheckedValue:u,bails:s,keepValueOnUnmount:h,resetField:_e,handleReset:()=>_e(),validate:j,handleChange:ie,handleBlur:G,setState:B,setTouched:ue,setErrors:bt,setValue:ct};if(d.provide(Oc,ke),d.isRef(e)&&typeof d.unref(e)!="function"&&d.watch(e,(P,K)=>{qe(P,K)||(T.validated?oe():re())},{deep:!0}),process.env.NODE_ENV!=="production"&&(ke._vm=d.getCurrentInstance(),d.watch(()=>Object.assign(Object.assign({errors:V.value},T),{value:C.value}),Tr,{deep:!0}),g||Hm(ke)),!g)return ke;const et=d.computed(()=>{const P=x.value;return!P||Ae(P)||ys(P)||At(P)||Array.isArray(P)?{}:Object.keys(P).reduce((K,fe)=>{const ae=_m(P[fe]).map(Re=>Re.__locatorRef).reduce((Re,$e)=>{const dt=nt(g.values,$e)||g.values[$e];return dt!==void 0&&(Re[$e]=dt),Re},{});return Object.assign(K,ae),K},{})});return d.watch(et,(P,K)=>{if(!Object.keys(P).length)return;!qe(P,K)&&(T.validated?oe():re())}),d.onBeforeUnmount(()=>{var P;const K=(P=d.toValue(ke.keepValueOnUnmount))!==null&&P!==void 0?P:d.toValue(g.keepValuesOnUnmount),fe=d.toValue(k);if(K||!g||F.pendingUnmount[ke.id]){g==null||g.removePathState(fe,b);return}F.pendingUnmount[ke.id]=!0;const ae=g.getPathState(fe);if(Array.isArray(ae==null?void 0:ae.id)&&(ae!=null&&ae.multiple)?ae!=null&&ae.id.includes(ke.id):(ae==null?void 0:ae.id)===ke.id){if(ae!=null&&ae.multiple&&Array.isArray(ae.value)){const $e=ae.value.findIndex(dt=>qe(dt,d.toValue(ke.checkedValue)));if($e>-1){const dt=[...ae.value];dt.splice($e,1),g.setFieldValue(fe,dt)}Array.isArray(ae.id)&&ae.id.splice(ae.id.indexOf(ke.id),1)}else g.unsetPathValue(d.toValue(k));g.removePathState(fe,b)}}),ke}function Xm(t){const e=()=>({initialValue:void 0,validateOnMount:!1,bails:!0,label:void 0,validateOnValueUpdate:!0,keepValueOnUnmount:void 0,syncVModel:!1,controlled:!0}),n=!!(t!=null&&t.syncVModel),r=typeof(t==null?void 0:t.syncVModel)=="string"?t.syncVModel:(t==null?void 0:t.modelPropName)||"modelValue",i=n&&!("initialValue"in(t||{}))?ra(d.getCurrentInstance(),r):t==null?void 0:t.initialValue;if(!t)return Object.assign(Object.assign({},e()),{initialValue:i});const s="valueProp"in t?t.valueProp:t.checkedValue,o="standalone"in t?!t.standalone:t.controlled,a=(t==null?void 0:t.modelPropName)||(t==null?void 0:t.syncVModel)||!1;return Object.assign(Object.assign(Object.assign({},e()),t||{}),{initialValue:i,controlled:o??!0,checkedValue:s,syncVModel:a})}function Qm(t,e,n){const r=n!=null&&n.standalone?void 0:Zo(ki),i=n==null?void 0:n.checkedValue,s=n==null?void 0:n.uncheckedValue;function o(a){const l=a.handleChange,c=d.computed(()=>{const f=d.toValue(a.value),h=d.toValue(i);return Array.isArray(f)?f.findIndex(p=>qe(p,h))>=0:qe(h,f)});function u(f,h=!0){var p,m;if(c.value===((p=f==null?void 0:f.target)===null||p===void 0?void 0:p.checked)){h&&a.validate();return}const y=d.toValue(t),g=r==null?void 0:r.getPathState(y),k=ks(f);let x=(m=d.toValue(i))!==null&&m!==void 0?m:k;r&&(g!=null&&g.multiple)&&g.type==="checkbox"?x=Dc(nt(r.values,y)||[],x,void 0):(n==null?void 0:n.type)==="checkbox"&&(x=Dc(d.toValue(a.value),x,d.toValue(s))),l(x,h)}return Object.assign(Object.assign({},a),{checked:c,checkedValue:i,uncheckedValue:s,handleChange:u})}return o(Hc(t,e,n))}function eg({prop:t,value:e,handleChange:n,shouldValidate:r}){const i=d.getCurrentInstance();if(!i||!t){process.env.NODE_ENV!=="production"&&console.warn("Failed to setup model events because `useField` was not called in setup.");return}const s=typeof t=="string"?t:"modelValue",o=`update:${s}`;s in i.props&&(d.watch(e,a=>{qe(a,ra(i,s))||i.emit(o,a)}),d.watch(()=>ra(i,s),a=>{if(a===gs&&e.value===void 0)return;const l=a===gs?void 0:a;qe(l,e.value)||n(l,r())}))}function ra(t,e){if(t)return t.props[e]}const tg=d.defineComponent({name:"Field",inheritAttrs:!1,props:{as:{type:[String,Object],default:void 0},name:{type:String,required:!0},rules:{type:[Object,String,Function],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnBlur:{type:Boolean,default:void 0},validateOnChange:{type:Boolean,default:void 0},validateOnInput:{type:Boolean,default:void 0},validateOnModelUpdate:{type:Boolean,default:void 0},bails:{type:Boolean,default:()=>tr().bails},label:{type:String,default:void 0},uncheckedValue:{type:null,default:void 0},modelValue:{type:null,default:gs},modelModifiers:{type:null,default:()=>({})},"onUpdate:modelValue":{type:null,default:void 0},standalone:{type:Boolean,default:!1},keepValue:{type:Boolean,default:void 0}},setup(t,e){const n=d.toRef(t,"rules"),r=d.toRef(t,"name"),i=d.toRef(t,"label"),s=d.toRef(t,"uncheckedValue"),o=d.toRef(t,"keepValue"),{errors:a,value:l,errorMessage:c,validate:u,handleChange:f,handleBlur:h,setTouched:p,resetField:m,handleReset:y,meta:g,checked:k,setErrors:x}=Zm(r,n,{validateOnMount:t.validateOnMount,bails:t.bails,standalone:t.standalone,type:e.attrs.type,initialValue:rg(t,e),checkedValue:e.attrs.value,uncheckedValue:s,label:i,validateOnValueUpdate:t.validateOnModelUpdate,keepValueOnUnmount:o,syncVModel:!0}),O=function(V,F=!0){f(V,F)},b=d.computed(()=>{const{validateOnInput:B,validateOnChange:V,validateOnBlur:F,validateOnModelUpdate:te}=ng(t);function G(j){h(j,F),Ae(e.attrs.onBlur)&&e.attrs.onBlur(j)}function ne(j){O(j,B),Ae(e.attrs.onInput)&&e.attrs.onInput(j)}function oe(j){O(j,V),Ae(e.attrs.onChange)&&e.attrs.onChange(j)}const re={name:t.name,onBlur:G,onInput:ne,onChange:oe};return re["onUpdate:modelValue"]=j=>O(j,te),re}),C=d.computed(()=>{const B=Object.assign({},b.value);wi(e.attrs.type)&&k&&(B.checked=k.value);const V=Yc(t,e);return wm(V,e.attrs)&&(B.value=l.value),B}),v=d.computed(()=>Object.assign(Object.assign({},b.value),{modelValue:l.value}));function T(){return{field:C.value,componentField:v.value,value:l.value,meta:g,errors:a.value,errorMessage:c.value,validate:u,resetField:m,handleChange:O,handleInput:B=>O(B,!1),handleReset:y,handleBlur:b.value.onBlur,setTouched:p,setErrors:x}}return e.expose({value:l,meta:g,errors:a,errorMessage:c,setErrors:x,setTouched:p,reset:m,validate:u,handleChange:f}),()=>{const B=d.resolveDynamicComponent(Yc(t,e)),V=ea(B,e,T);return B?d.h(B,Object.assign(Object.assign({},e.attrs),C.value),V):V}}});function Yc(t,e){let n=t.as||"";return!t.as&&!e.slots.default&&(n="input"),n}function ng(t){var e,n,r,i;const{validateOnInput:s,validateOnChange:o,validateOnBlur:a,validateOnModelUpdate:l}=tr();return{validateOnInput:(e=t.validateOnInput)!==null&&e!==void 0?e:s,validateOnChange:(n=t.validateOnChange)!==null&&n!==void 0?n:o,validateOnBlur:(r=t.validateOnBlur)!==null&&r!==void 0?r:a,validateOnModelUpdate:(i=t.validateOnModelUpdate)!==null&&i!==void 0?i:l}}function rg(t,e){return wi(e.attrs.type)?Ec(t,"modelValue")?t.modelValue:void 0:Ec(t,"modelValue")?t.modelValue:e.attrs.value}const ws=tg;let ig=0;const xs=["bails","fieldsCount","id","multiple","type","validate"];function Uc(t){const e=(t==null?void 0:t.initialValues)||{},n=Object.assign({},d.toValue(e)),r=d.unref(t==null?void 0:t.validationSchema);return r&&At(r)&&Ae(r.cast)?pe(r.cast(n)||{}):pe(n)}function sg(t){var e;const n=ig++;let r=0;const i=d.ref(!1),s=d.ref(!1),o=d.ref(0),a=[],l=d.reactive(Uc(t)),c=d.ref([]),u=d.ref({}),f=d.ref({}),h=Mm(()=>{f.value=c.value.reduce((M,S)=>(M[vi(d.toValue(S.path))]=S,M),{})});function p(M,S){const E=j(M);if(!E){typeof M=="string"&&(u.value[vi(M)]=Qo(S));return}if(typeof M=="string"){const R=vi(M);u.value[R]&&delete u.value[R]}E.errors=Qo(S),E.valid=!E.errors.length}function m(M){rt(M).forEach(S=>{p(S,M[S])})}t!=null&&t.initialErrors&&m(t.initialErrors);const y=d.computed(()=>{const M=c.value.reduce((S,E)=>(E.errors.length&&(S[E.path]=E.errors),S),{});return Object.assign(Object.assign({},u.value),M)}),g=d.computed(()=>rt(y.value).reduce((M,S)=>{const E=y.value[S];return E!=null&&E.length&&(M[S]=E[0]),M},{})),k=d.computed(()=>c.value.reduce((M,S)=>(M[S.path]={name:S.path||"",label:S.label||""},M),{})),x=d.computed(()=>c.value.reduce((M,S)=>{var E;return M[S.path]=(E=S.bails)!==null&&E!==void 0?E:!0,M},{})),O=Object.assign({},(t==null?void 0:t.initialErrors)||{}),b=(e=t==null?void 0:t.keepValuesOnUnmount)!==null&&e!==void 0?e:!1,{initialValues:C,originalInitialValues:v,setInitialValues:T}=ag(c,l,t),B=og(c,l,v,g),V=d.computed(()=>c.value.reduce((M,S)=>{const E=nt(l,S.path);return dn(M,S.path,E),M},{})),F=t==null?void 0:t.validationSchema;function te(M,S){var E,R;const U=d.computed(()=>nt(C.value,d.toValue(M))),w=f.value[d.toValue(M)],D=(S==null?void 0:S.type)==="checkbox"||(S==null?void 0:S.type)==="radio";if(w&&D){w.multiple=!0;const tt=r++;return Array.isArray(w.id)?w.id.push(tt):w.id=[w.id,tt],w.fieldsCount++,w.__flags.pendingUnmount[tt]=!1,w}const $=d.computed(()=>nt(l,d.toValue(M))),Y=d.toValue(M),q=ue.findIndex(tt=>tt===Y);q!==-1&&ue.splice(q,1);const X=d.computed(()=>{var tt,kt,Or,er;const cn=d.toValue(F);if(At(cn))return(kt=(tt=cn.describe)===null||tt===void 0?void 0:tt.call(cn,d.toValue(M)).required)!==null&&kt!==void 0?kt:!1;const ms=d.toValue(S==null?void 0:S.schema);return At(ms)&&(er=(Or=ms.describe)===null||Or===void 0?void 0:Or.call(ms).required)!==null&&er!==void 0?er:!1}),he=r++,Oe=d.reactive({id:he,path:M,touched:!1,pending:!1,valid:!0,validated:!!(!((E=O[Y])===null||E===void 0)&&E.length),required:X,initialValue:U,errors:d.shallowRef([]),bails:(R=S==null?void 0:S.bails)!==null&&R!==void 0?R:!1,label:S==null?void 0:S.label,type:(S==null?void 0:S.type)||"default",value:$,multiple:!1,__flags:{pendingUnmount:{[he]:!1},pendingReset:!1},fieldsCount:1,validate:S==null?void 0:S.validate,dirty:d.computed(()=>!qe(d.unref($),d.unref(U)))});return c.value.push(Oe),f.value[Y]=Oe,h(),g.value[Y]&&!O[Y]&&d.nextTick(()=>{_t(Y,{mode:"silent"})}),d.isRef(M)&&d.watch(M,tt=>{h();const kt=pe($.value);f.value[tt]=Oe,d.nextTick(()=>{dn(l,tt,kt)})}),Oe}const G=Ac(ln,5),ne=Ac(ln,5),oe=Xo(async M=>await(M==="silent"?G():ne()),(M,[S])=>{const E=rt(P.errorBag.value),U=[...new Set([...rt(M.results),...c.value.map(w=>w.path),...E])].sort().reduce((w,D)=>{var $;const Y=D,q=j(Y)||ie(Y),X=(($=M.results[Y])===null||$===void 0?void 0:$.errors)||[],he=d.toValue(q==null?void 0:q.path)||Y,Oe=lg({errors:X,valid:!X.length},w.results[he]);return w.results[he]=Oe,Oe.valid||(w.errors[he]=Oe.errors[0]),q&&u.value[he]&&delete u.value[he],q?(q.valid=Oe.valid,S==="silent"||S==="validated-only"&&!q.validated||p(q,Oe.errors),w):(p(he,X),w)},{valid:M.valid,results:{},errors:{}});return M.values&&(U.values=M.values),rt(U.results).forEach(w=>{var D;const $=j(w);$&&S!=="silent"&&(S==="validated-only"&&!$.validated||p($,(D=U.results[w])===null||D===void 0?void 0:D.errors))}),U});function re(M){c.value.forEach(M)}function j(M){const S=typeof M=="string"?vi(M):M;return typeof S=="string"?f.value[S]:S}function ie(M){return c.value.filter(E=>M.startsWith(E.path)).reduce((E,R)=>E?R.path.length>E.path.length?R:E:R,void 0)}let ue=[],_e;function Qe(M){return ue.push(M),_e||(_e=d.nextTick(()=>{[...ue].sort().reverse().forEach(E=>{Nc(l,E)}),ue=[],_e=null})),_e}function ct(M){return function(E,R){return function(w){return w instanceof Event&&(w.preventDefault(),w.stopPropagation()),re(D=>D.touched=!0),i.value=!0,o.value++,Wt().then(D=>{const $=pe(l);if(D.valid&&typeof E=="function"){const Y=pe(V.value);let q=M?Y:$;return D.values&&(q=D.values),E(q,{evt:w,controlledValues:Y,setErrors:m,setFieldError:p,setTouched:Zn,setFieldTouched:$e,setValues:ae,setFieldValue:K,resetForm:Tn,resetField:Xn})}!D.valid&&typeof R=="function"&&R({values:$,evt:w,errors:D.errors,results:D.results})}).then(D=>(i.value=!1,D),D=>{throw i.value=!1,D})}}}const vt=ct(!1);vt.withControlled=ct(!0);function ke(M,S){const E=c.value.findIndex(U=>U.path===M&&(Array.isArray(U.id)?U.id.includes(S):U.id===S)),R=c.value[E];if(!(E===-1||!R)){if(d.nextTick(()=>{_t(M,{mode:"silent",warn:!1})}),R.multiple&&R.fieldsCount&&R.fieldsCount--,Array.isArray(R.id)){const U=R.id.indexOf(S);U>=0&&R.id.splice(U,1),delete R.__flags.pendingUnmount[S]}(!R.multiple||R.fieldsCount<=0)&&(c.value.splice(E,1),Nt(M),h(),delete f.value[M])}}function et(M){rt(f.value).forEach(S=>{S.startsWith(M)&&delete f.value[S]}),c.value=c.value.filter(S=>!S.path.startsWith(M)),d.nextTick(()=>{h()})}const P={formId:n,values:l,controlledValues:V,errorBag:y,errors:g,schema:F,submitCount:o,meta:B,isSubmitting:i,isValidating:s,fieldArrays:a,keepValuesOnUnmount:b,validateSchema:d.unref(F)?oe:void 0,validate:Wt,setFieldError:p,validateField:_t,setFieldValue:K,setValues:ae,setErrors:m,setFieldTouched:$e,setTouched:Zn,resetForm:Tn,resetField:Xn,handleSubmit:vt,useFieldModel:pi,defineInputBinds:mi,defineComponentBinds:gi,defineField:Qn,stageInitialValue:an,unsetInitialValue:Nt,setFieldInitialValue:En,createPathState:te,getPathState:j,unsetPathValue:Qe,removePathState:ke,initialValues:C,getAllPathStates:()=>c.value,destroyPath:et,isFieldTouched:dt,isFieldDirty:Sr,isFieldValid:hi};function K(M,S,E=!0){const R=pe(S),U=typeof M=="string"?M:M.path;j(U)||te(U),dn(l,U,R),E&&_t(U)}function fe(M,S=!0){rt(l).forEach(E=>{delete l[E]}),rt(M).forEach(E=>{K(E,M[E],!1)}),S&&Wt()}function ae(M,S=!0){bi(l,M),a.forEach(E=>E&&E.reset()),S&&Wt()}function Re(M,S){const E=j(d.toValue(M))||te(M);return d.computed({get(){return E.value},set(R){var U;const w=d.toValue(M);K(w,R,(U=d.toValue(S))!==null&&U!==void 0?U:!1)}})}function $e(M,S){const E=j(M);E&&(E.touched=S)}function dt(M){const S=j(M);return S?S.touched:c.value.filter(E=>E.path.startsWith(M)).some(E=>E.touched)}function Sr(M){const S=j(M);return S?S.dirty:c.value.filter(E=>E.path.startsWith(M)).some(E=>E.dirty)}function hi(M){const S=j(M);return S?S.valid:c.value.filter(E=>E.path.startsWith(M)).every(E=>E.valid)}function Zn(M){if(typeof M=="boolean"){re(S=>{S.touched=M});return}rt(M).forEach(S=>{$e(S,!!M[S])})}function Xn(M,S){var E;const R=S&&"value"in S?S.value:nt(C.value,M),U=j(M);U&&(U.__flags.pendingReset=!0),En(M,pe(R),!0),K(M,R,!1),$e(M,(E=S==null?void 0:S.touched)!==null&&E!==void 0?E:!1),p(M,(S==null?void 0:S.errors)||[]),d.nextTick(()=>{U&&(U.__flags.pendingReset=!1)})}function Tn(M,S){let E=pe(M!=null&&M.values?M.values:v.value);E=S!=null&&S.force?E:bi(v.value,E),E=At(F)&&Ae(F.cast)?F.cast(E):E,T(E),re(R=>{var U;R.__flags.pendingReset=!0,R.validated=!1,R.touched=((U=M==null?void 0:M.touched)===null||U===void 0?void 0:U[R.path])||!1,K(R.path,nt(E,R.path),!1),p(R.path,void 0)}),S!=null&&S.force?fe(E,!1):ae(E,!1),m((M==null?void 0:M.errors)||{}),o.value=(M==null?void 0:M.submitCount)||0,d.nextTick(()=>{Wt({mode:"silent"}),re(R=>{R.__flags.pendingReset=!1})})}async function Wt(M){const S=(M==null?void 0:M.mode)||"force";if(S==="force"&&re(w=>w.validated=!0),P.validateSchema)return P.validateSchema(S);s.value=!0;const E=await Promise.all(c.value.map(w=>w.validate?w.validate(M).then(D=>({key:w.path,valid:D.valid,errors:D.errors})):Promise.resolve({key:w.path,valid:!0,errors:[]})));s.value=!1;const R={},U={};for(const w of E)R[w.key]={valid:w.valid,errors:w.errors},w.errors.length&&(U[w.key]=w.errors[0]);return{valid:E.every(w=>w.valid),results:R,errors:U}}async function _t(M,S){var E;const R=j(M);if(R&&(S==null?void 0:S.mode)!=="silent"&&(R.validated=!0),F){const{results:w}=await oe((S==null?void 0:S.mode)||"validated-only");return w[M]||{errors:[],valid:!0}}return R!=null&&R.validate?R.validate(S):(!R&&((E=S==null?void 0:S.warn)!==null&&E!==void 0?E:!0)&&process.env.NODE_ENV!=="production"&&d.warn(`field with path ${M} was not found`),Promise.resolve({errors:[],valid:!0}))}function Nt(M){Nc(C.value,M)}function an(M,S,E=!1){En(M,S),dn(l,M,S),E&&!(t!=null&&t.initialValues)&&dn(v.value,M,pe(S))}function En(M,S,E=!1){dn(C.value,M,pe(S)),E&&dn(v.value,M,pe(S))}async function ln(){const M=d.unref(F);if(!M)return{valid:!0,results:{},errors:{}};s.value=!0;const S=ys(M)||At(M)?await Im(M,l):await Rm(M,l,{names:k.value,bailsMap:x.value});return s.value=!1,S}const Mr=vt((M,{evt:S})=>{Tc(S)&&S.target.submit()});d.onMounted(()=>{if(t!=null&&t.initialErrors&&m(t.initialErrors),t!=null&&t.initialTouched&&Zn(t.initialTouched),t!=null&&t.validateOnMount){Wt();return}P.validateSchema&&P.validateSchema("silent")}),d.isRef(F)&&d.watch(F,()=>{var M;(M=P.validateSchema)===null||M===void 0||M.call(P,"validated-only")}),d.provide(ki,P),process.env.NODE_ENV!=="production"&&(Wm(P),d.watch(()=>Object.assign(Object.assign({errors:y.value},B.value),{values:l,isSubmitting:i.value,isValidating:s.value,submitCount:o.value}),Tr,{deep:!0}));function Qn(M,S){const E=Ae(S)||S==null?void 0:S.label,R=j(d.toValue(M))||te(M,{label:E}),U=()=>Ae(S)?S(vs(R,xs)):S||{};function w(){var X;R.touched=!0,((X=U().validateOnBlur)!==null&&X!==void 0?X:tr().validateOnBlur)&&_t(R.path)}function D(){var X;((X=U().validateOnInput)!==null&&X!==void 0?X:tr().validateOnInput)&&d.nextTick(()=>{_t(R.path)})}function $(){var X;((X=U().validateOnChange)!==null&&X!==void 0?X:tr().validateOnChange)&&d.nextTick(()=>{_t(R.path)})}const Y=d.computed(()=>{const X={onChange:$,onInput:D,onBlur:w};return Ae(S)?Object.assign(Object.assign({},X),S(vs(R,xs)).props||{}):S!=null&&S.props?Object.assign(Object.assign({},X),S.props(vs(R,xs))):X});return[Re(M,()=>{var X,he,Oe;return(Oe=(X=U().validateOnModelUpdate)!==null&&X!==void 0?X:(he=tr())===null||he===void 0?void 0:he.validateOnModelUpdate)!==null&&Oe!==void 0?Oe:!0}),Y]}function pi(M){return Array.isArray(M)?M.map(S=>Re(S,!0)):Re(M)}function mi(M,S){const[E,R]=Qn(M,S);function U(){R.value.onBlur()}function w($){const Y=ks($);K(d.toValue(M),Y,!1),R.value.onInput()}function D($){const Y=ks($);K(d.toValue(M),Y,!1),R.value.onChange()}return d.computed(()=>Object.assign(Object.assign({},R.value),{onBlur:U,onInput:w,onChange:D,value:E.value}))}function gi(M,S){const[E,R]=Qn(M,S),U=j(d.toValue(M));function w(D){E.value=D}return d.computed(()=>{const D=Ae(S)?S(vs(U,xs)):S||{};return Object.assign({[D.model||"modelValue"]:E.value,[`onUpdate:${D.model||"modelValue"}`]:w},R.value)})}return Object.assign(Object.assign({},P),{values:d.readonly(l),handleReset:()=>Tn(),submitForm:Mr})}function og(t,e,n,r){const i={touched:"some",pending:"some",valid:"every"},s=d.computed(()=>!qe(e,d.unref(n)));function o(){const l=t.value;return rt(i).reduce((c,u)=>{const f=i[u];return c[u]=l[f](h=>h[u]),c},{})}const a=d.reactive(o());return d.watchEffect(()=>{const l=o();a.touched=l.touched,a.valid=l.valid,a.pending=l.pending}),d.computed(()=>Object.assign(Object.assign({initialValues:d.unref(n)},a),{valid:a.valid&&!rt(r.value).length,dirty:s.value}))}function ag(t,e,n){const r=Uc(n),i=d.ref(r),s=d.ref(pe(r));function o(a,l=!1){i.value=bi(pe(i.value)||{},pe(a)),s.value=bi(pe(s.value)||{},pe(a)),l&&t.value.forEach(c=>{if(c.touched)return;const f=nt(i.value,c.path);dn(e,c.path,pe(f))})}return{initialValues:i,originalInitialValues:s,setInitialValues:o}}function lg(t,e){return e?{valid:t.valid&&e.valid,errors:[...t.errors,...e.errors]}:t}const cg=d.defineComponent({name:"Form",inheritAttrs:!1,props:{as:{type:null,default:"form"},validationSchema:{type:Object,default:void 0},initialValues:{type:Object,default:void 0},initialErrors:{type:Object,default:void 0},initialTouched:{type:Object,default:void 0},validateOnMount:{type:Boolean,default:!1},onSubmit:{type:Function,default:void 0},onInvalidSubmit:{type:Function,default:void 0},keepValues:{type:Boolean,default:!1}},setup(t,e){const n=d.toRef(t,"validationSchema"),r=d.toRef(t,"keepValues"),{errors:i,errorBag:s,values:o,meta:a,isSubmitting:l,isValidating:c,submitCount:u,controlledValues:f,validate:h,validateField:p,handleReset:m,resetForm:y,handleSubmit:g,setErrors:k,setFieldError:x,setFieldValue:O,setValues:b,setFieldTouched:C,setTouched:v,resetField:T}=sg({validationSchema:n.value?n:void 0,initialValues:t.initialValues,initialErrors:t.initialErrors,initialTouched:t.initialTouched,validateOnMount:t.validateOnMount,keepValuesOnUnmount:r}),B=g((j,{evt:ie})=>{Tc(ie)&&ie.target.submit()},t.onInvalidSubmit),V=t.onSubmit?g(t.onSubmit,t.onInvalidSubmit):B;function F(j){Ko(j)&&j.preventDefault(),m(),typeof e.attrs.onReset=="function"&&e.attrs.onReset()}function te(j,ie){return g(typeof j=="function"&&!ie?j:ie,t.onInvalidSubmit)(j)}function G(){return pe(o)}function ne(){return pe(a.value)}function oe(){return pe(i.value)}function re(){return{meta:a.value,errors:i.value,errorBag:s.value,values:o,isSubmitting:l.value,isValidating:c.value,submitCount:u.value,controlledValues:f.value,validate:h,validateField:p,handleSubmit:te,handleReset:m,submitForm:B,setErrors:k,setFieldError:x,setFieldValue:O,setValues:b,setFieldTouched:C,setTouched:v,resetForm:y,resetField:T,getValues:G,getMeta:ne,getErrors:oe}}return e.expose({setFieldError:x,setErrors:k,setFieldValue:O,setValues:b,setFieldTouched:C,setTouched:v,resetForm:y,validate:h,validateField:p,resetField:T,getValues:G,getMeta:ne,getErrors:oe,values:o,meta:a,errors:i}),function(){const ie=t.as==="form"?t.as:t.as?d.resolveDynamicComponent(t.as):null,ue=ea(ie,e,re);if(!ie)return ue;const _e=ie==="form"?{novalidate:!0}:{};return d.h(ie,Object.assign(Object.assign(Object.assign({},_e),e.attrs),{onSubmit:V,onReset:F}),ue)}}}),dg=d.defineComponent({name:"ErrorMessage",props:{as:{type:String,default:void 0},name:{type:String,required:!0}},setup(t,e){const n=d.inject(ki,void 0),r=d.computed(()=>n==null?void 0:n.errors.value[t.name]);function i(){return{message:r.value}}return()=>{if(!r.value)return;const s=t.as?d.resolveDynamicComponent(t.as):t.as,o=ea(s,e,i),a=Object.assign({role:"alert"},e.attrs);return!s&&(Array.isArray(o)||!o)&&(o!=null&&o.length)?o:(Array.isArray(o)||!o)&&!(o!=null&&o.length)?d.h(s||"span",a,r.value):d.h(s,a,o)}}});function ug(t){const e=Zo(ki),n=t?void 0:d.inject(Oc);return d.computed(()=>t?e==null?void 0:e.errors.value[d.toValue(t)]:n==null?void 0:n.errorMessage.value)}Dt("required",t=>typeof t=="object"&&t!=null||typeof t=="boolean"&&t===!0?!0:!t||!t.length?"This field is required":!0),Dt("email",t=>{var e=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return e.test(String(t).trim().toLowerCase())?!0:"This field must be a valid email"}),Dt("strong_password",t=>t?t.indexOf(" ")>-1?"Password shouldn't contain space":t.length<8||t.length>30?"Password must be between 8 and 30 characters":t.match(/[a-z]/)===null||t.match(/[A-Z]/)===null||t.match(/\d/)===null?"Password must contain at least one uppercase letter, one lowercase letter and one number digit":!0:"Password is required"),Dt("no_space",t=>(t==null?void 0:t.indexOf(" "))>-1?"This field shouldn't contain space":!0),Dt("minLength",(t,[e])=>!t||!t.length?!0:t.length<e?`This field must be at least ${e} characters`:!0),Dt("hasUppercaseLetter",t=>/[A-Z]/.test(t)?!0:"This field must have at least one uppercase character"),Dt("hasLowercaseLetter",t=>/[a-z]/.test(t)?!0:"This field must have at least one lowercase character"),Dt("hasNumber",t=>/\d/.test(t)?!0:"This field must have at least one number"),Dt("hasSpecialCharacter",t=>/[!@$%^&*(),.?":{}|]/.test(t)?!0:"This field must have at least one special character"),Dt("url",t=>{var e=/(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/gi;return e.test(String(t).trim().toLowerCase())?!0:"This field must be a valid URL"}),Dt("number",t=>parseFloat(t)?!0:"This field must be a number");const ye=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},fg={},hg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor"},pg=[d.createElementVNode("path",{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200z"},null,-1)];function mg(t,e){return d.openBlock(),d.createElementBlock("svg",hg,pg)}const gg=ye(fg,[["render",mg]]),yg={},bg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor"},vg=[d.createElementVNode("path",{d:"M460.116 373.846l-20.823-12.022c-5.541-3.199-7.54-10.159-4.663-15.874 30.137-59.886 28.343-131.652-5.386-189.946-33.641-58.394-94.896-95.833-161.827-99.676C261.028 55.961 256 50.751 256 44.352V20.309c0-6.904 5.808-12.337 12.703-11.982 83.556 4.306 160.163 50.864 202.11 123.677 42.063 72.696 44.079 162.316 6.031 236.832-3.14 6.148-10.75 8.461-16.728 5.01z"},null,-1)];function kg(t,e){return d.openBlock(),d.createElementBlock("svg",bg,vg)}const wg=ye(yg,[["render",kg]]),xg={class:"relative"},Ss=Object.assign({name:"WpicSpinner"},{props:{color:{type:String,default:""}},setup(t){return(e,n)=>(d.openBlock(),d.createElementBlock("div",xg,[d.createVNode(gg,{class:"absolute opacity-25"}),d.createVNode(wg,{class:d.normalizeClass(["animate-spin",{[`${t.color}`]:!0}])},null,8,["class"])]))}});let xe={theme:"pmi"};const Sg={key:0,class:"absolute inset-0 flex justify-center items-center"},Mg=Object.assign({name:"WpicButton"},{props:{label:String,primary:Boolean,type:{type:String,default:"button"},secondary:Boolean,inverse:Boolean,disabled:Boolean,full:Boolean,loading:Boolean,outline:{type:Boolean,default:!0},medium:Boolean,small:Boolean,mini:Boolean,plain:Boolean,outlining:Boolean,square:Boolean,to:[String,Object]},setup(t){const e=t,n=d.computed(()=>e.to?"router-link":"button"),r={pmi:"bg-violet-800 border border-violet-800 focus:bg-violet-800 text-white disabled:bg-zinc-100 disabled:text-zinc-400 disabled:border-zinc-100 enabled:hover:bg-violet-900 enabled:hover:border-violet-900 active:scale-95 enabled:transform","wpic-tools":"text-white bg-lime-500 border-lime-500 enabled:hover:bg-lime-400 enabled:hover:border-lime-400 enabled:active:bg-lime-500 enabled:active:border-lime-500 enabled:active:shadow-inner disabled:bg-lime-600/25 disabled:text-white disabled:border-0"},i={pmi:"bg-white text-violet-800 border-zinc-400 dark:border-zinc-700 dark:text-zinc-200 dark:bg-zinc-700 dark:hover:bg-zinc-600 dark:hover:border-zinc-600 disabled:text-zinc-400 active:scale-95 enabled:transform","wpic-tools":"text-slate-700 bg-slate-100 border-slate-300 enabled:hover:bg-lime-50 enabled:hover:border-lime-300 enabled:hover:text-lime-600 enabled:active:shadow-inner disabled:border-slate-200 disabled:text-zinc-400 disabled:bg-slate-50/50"},s={pmi:"border-zinc-300 dark:border-zinc-700 dark:text-zinc-300","wpic-tools":"border-slate-200 bg-slate-200 enabled:hover:bg-slate-300 enabled:hover:border-slate-300 enabled:active:bg-slate-200 enabled:active:border-slate-200 enabled:active:shadow-inner disabled:bg-slate-100 disabled:text-zinc-400 disabled:border-0"},o={pmi:"text-violet-800 hover:underline","wpic-tools":"text-lime-800 hover:underline"},a={pmi:"hover:text-violet-800","wpic-tools":"hover:text-lime-800"};return(l,c)=>(d.openBlock(),d.createBlock(d.resolveDynamicComponent(n.value),{to:t.to,type:t.type,disabled:t.disabled,class:d.normalizeClass([{"cursor-pointer":!t.disabled&&!t.loading,"active:outline active:outline-2 active:outline-offset-4":!t.disabled&&!t.loading&&t.outlining,"cursor-not-allowed":t.disabled,border:t.outline&&!t.plain,[`${r[d.unref(xe).theme]}`]:t.primary&&!t.plain&&!t.inverse,[`${i[d.unref(xe).theme]}`]:t.secondary,[`${s[d.unref(xe).theme]}`]:!t.primary&&!t.secondary&&!t.plain,[`${o[d.unref(xe).theme]}`]:t.primary&&t.plain,[`${a[d.unref(xe).theme]}`]:!t.primary&&t.plain,"bg-zinc-50 border-violet-800 text-violet-800":t.primary&&t.inverse,"hover:bg-white":t.primary&&t.inverse&&!t.disabled&&!t.loading,"w-full":t.full,"text-opacity-50":t.disabled,"text-sm":t.small,"px-4 py-1 rounded h-8":t.small&&!t.plain,"px-5 py-1 rounded h-10":t.medium&&!t.plain,"px-5 py-1 rounded h-12":!t.small&&!t.medium&&!t.plain,"px-0 aspect-square":t.square},"wpic-button leading-none font-medium no-underline appearance-none outline-zinc-600 focus:outline-none relative inline-flex justify-center items-center"])},{default:d.withCtx(()=>[t.loading?(d.openBlock(),d.createElementBlock("div",Sg,[d.createVNode(Ss,{class:"w-6 h-6"})])):d.createCommentVNode("",!0),d.createElementVNode("span",{class:d.normalizeClass(["flex items-center select-none whitespace-nowrap",{"opacity-0":t.loading}])},[d.renderSlot(l.$slots,"default",{},()=>[d.createTextVNode(d.toDisplayString(t.label),1)])],2)]),_:3},8,["to","type","disabled","class"]))}}),Og={name:"WpicButtonGroup"},Cg={class:"wpic-button-group flex flex-wrap"};function Tg(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("div",Cg,[d.renderSlot(t.$slots,"default")])}const Eg=ye(Og,[["render",Tg]]),_g={name:"WpicInputGroup"},Ng={class:"wpic-input-group flex w-full"};function Dg(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("div",Ng,[d.renderSlot(t.$slots,"default")])}const Ag=ye(_g,[["render",Dg]]),Vg=Object.assign({name:"WpicForm"},{setup(t){return(e,n)=>(d.openBlock(),d.createBlock(d.unref(cg),null,{default:d.withCtx(({values:r,meta:i,errors:s})=>[d.renderSlot(e.$slots,"default")]),_:3}))}}),ia=Math.min,_r=Math.max,Ms=Math.round,Nn=t=>({x:t,y:t}),Bg={left:"right",right:"left",bottom:"top",top:"bottom"},Pg={start:"end",end:"start"};function qc(t,e,n){return _r(t,ia(e,n))}function Os(t,e){return typeof t=="function"?t(e):t}function nr(t){return t.split("-")[0]}function Cs(t){return t.split("-")[1]}function Kc(t){return t==="x"?"y":"x"}function Jc(t){return t==="y"?"height":"width"}function Ts(t){return["top","bottom"].includes(nr(t))?"y":"x"}function Gc(t){return Kc(Ts(t))}function Ig(t,e,n){n===void 0&&(n=!1);const r=Cs(t),i=Gc(t),s=Jc(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=Es(o)),[o,Es(o)]}function Rg(t){const e=Es(t);return[sa(t),e,sa(e)]}function sa(t){return t.replace(/start|end/g,e=>Pg[e])}function $g(t,e,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?s:o;default:return[]}}function Lg(t,e,n,r){const i=Cs(t);let s=$g(nr(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(sa)))),s}function Es(t){return t.replace(/left|right|bottom|top/g,e=>Bg[e])}function Fg(t){return{top:0,right:0,bottom:0,left:0,...t}}function zg(t){return typeof t!="number"?Fg(t):{top:t,right:t,bottom:t,left:t}}function _s(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function Zc(t,e,n){let{reference:r,floating:i}=t;const s=Ts(e),o=Gc(e),a=Jc(o),l=nr(e),c=s==="y",u=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-i.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Cs(e)){case"start":p[o]-=h*(n&&c?-1:1);break;case"end":p[o]+=h*(n&&c?-1:1);break}return p}const jg=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=Zc(c,r,l),h=r,p={},m=0;for(let y=0;y<a.length;y++){const{name:g,fn:k}=a[y],{x,y:O,data:b,reset:C}=await k({x:u,y:f,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:c,platform:o,elements:{reference:t,floating:e}});u=x??u,f=O??f,p={...p,[g]:{...p[g],...b}},C&&m<=50&&(m++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(c=C.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):C.rects),{x:u,y:f}=Zc(c,h,l)),y=-1)}return{x:u,y:f,placement:h,strategy:i,middlewareData:p}};async function Xc(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Os(e,t),m=zg(p),g=a[h?f==="floating"?"reference":"floating":f],k=_s(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),x=f==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,O=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),b=await(s.isElement==null?void 0:s.isElement(O))?await(s.getScale==null?void 0:s.getScale(O))||{x:1,y:1}:{x:1,y:1},C=_s(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:O,strategy:l}):x);return{top:(k.top-C.top+m.top)/b.y,bottom:(C.bottom-k.bottom+m.bottom)/b.y,left:(k.left-C.left+m.left)/b.x,right:(C.right-k.right+m.right)/b.x}}const Wg=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:y=!0,...g}=Os(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const k=nr(i),x=nr(a)===a,O=await(l.isRTL==null?void 0:l.isRTL(c.floating)),b=h||(x||!y?[Es(a)]:Rg(a));!h&&m!=="none"&&b.push(...Lg(a,y,m,O));const C=[a,...b],v=await Xc(e,g),T=[];let B=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&T.push(v[k]),f){const G=Ig(i,o,O);T.push(v[G[0]],v[G[1]])}if(B=[...B,{placement:i,overflows:T}],!T.every(G=>G<=0)){var V,F;const G=(((V=s.flip)==null?void 0:V.index)||0)+1,ne=C[G];if(ne)return{data:{index:G,overflows:B},reset:{placement:ne}};let oe=(F=B.filter(re=>re.overflows[0]<=0).sort((re,j)=>re.overflows[1]-j.overflows[1])[0])==null?void 0:F.placement;if(!oe)switch(p){case"bestFit":{var te;const re=(te=B.map(j=>[j.placement,j.overflows.filter(ie=>ie>0).reduce((ie,ue)=>ie+ue,0)]).sort((j,ie)=>j[1]-ie[1])[0])==null?void 0:te[0];re&&(oe=re);break}case"initialPlacement":oe=a;break}if(i!==oe)return{reset:{placement:oe}}}return{}}}};async function Hg(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=nr(n),a=Cs(n),l=Ts(n)==="y",c=["left","top"].includes(o)?-1:1,u=s&&l?-1:1,f=Os(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),l?{x:p*u,y:h*c}:{x:h*c,y:p*u}}const Yg=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=e,l=await Hg(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},Ug=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:k,y:x}=g;return{x:k,y:x}}},...l}=Os(t,e),c={x:n,y:r},u=await Xc(e,l),f=Ts(nr(i)),h=Kc(f);let p=c[h],m=c[f];if(s){const g=h==="y"?"top":"left",k=h==="y"?"bottom":"right",x=p+u[g],O=p-u[k];p=qc(x,p,O)}if(o){const g=f==="y"?"top":"left",k=f==="y"?"bottom":"right",x=m+u[g],O=m-u[k];m=qc(x,m,O)}const y=a.fn({...e,[h]:p,[f]:m});return{...y,data:{x:y.x-n,y:y.y-r}}}}};function Nr(t){return Qc(t)?(t.nodeName||"").toLowerCase():"#document"}function ut(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Dn(t){var e;return(e=(Qc(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Qc(t){return t instanceof Node||t instanceof ut(t).Node}function Ht(t){return t instanceof Element||t instanceof ut(t).Element}function Yt(t){return t instanceof HTMLElement||t instanceof ut(t).HTMLElement}function ed(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ut(t).ShadowRoot}function Mi(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Vt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function qg(t){return["table","td","th"].includes(Nr(t))}function oa(t){const e=aa(),n=Vt(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Kg(t){let e=An(t);for(;Yt(e)&&!Dr(e);){if(oa(e))return e;e=An(e)}return null}function aa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Dr(t){return["html","body","#document"].includes(Nr(t))}function Vt(t){return ut(t).getComputedStyle(t)}function Ns(t){return Ht(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function An(t){if(Nr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ed(t)&&t.host||Dn(t);return ed(e)?e.host:e}function td(t){const e=An(t);return Dr(e)?t.ownerDocument?t.ownerDocument.body:t.body:Yt(e)&&Mi(e)?e:td(e)}function la(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=td(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=ut(i);return s?e.concat(o,o.visualViewport||[],Mi(i)?i:[],o.frameElement&&n?la(o.frameElement):[]):e.concat(i,la(i,[],n))}function nd(t){const e=Vt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Yt(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,a=Ms(n)!==s||Ms(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function rd(t){return Ht(t)?t:t.contextElement}function Ar(t){const e=rd(t);if(!Yt(e))return Nn(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=nd(e);let o=(s?Ms(n.width):n.width)/r,a=(s?Ms(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const Jg=Nn(0);function id(t){const e=ut(t);return!aa()||!e.visualViewport?Jg:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Gg(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==ut(t)?!1:e}function Oi(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=rd(t);let o=Nn(1);e&&(r?Ht(r)&&(o=Ar(r)):o=Ar(t));const a=Gg(s,n,r)?id(s):Nn(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,u=i.width/o.x,f=i.height/o.y;if(s){const h=ut(s),p=r&&Ht(r)?ut(r):r;let m=h,y=m.frameElement;for(;y&&r&&p!==m;){const g=Ar(y),k=y.getBoundingClientRect(),x=Vt(y),O=k.left+(y.clientLeft+parseFloat(x.paddingLeft))*g.x,b=k.top+(y.clientTop+parseFloat(x.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,f*=g.y,l+=O,c+=b,m=ut(y),y=m.frameElement}}return _s({width:u,height:f,x:l,y:c})}const Zg=[":popover-open",":modal"];function ca(t){return Zg.some(e=>{try{return t.matches(e)}catch{return!1}})}function Xg(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",o=Dn(r),a=e?ca(e.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Nn(1);const u=Nn(0),f=Yt(r);if((f||!f&&!s)&&((Nr(r)!=="body"||Mi(o))&&(l=Ns(r)),Yt(r))){const h=Oi(r);c=Ar(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function Qg(t){return Array.from(t.getClientRects())}function sd(t){return Oi(Dn(t)).left+Ns(t).scrollLeft}function e0(t){const e=Dn(t),n=Ns(t),r=t.ownerDocument.body,i=_r(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=_r(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+sd(t);const a=-n.scrollTop;return Vt(r).direction==="rtl"&&(o+=_r(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function t0(t,e){const n=ut(t),r=Dn(t),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const c=aa();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function n0(t,e){const n=Oi(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=Yt(t)?Ar(t):Nn(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=i*s.x,c=r*s.y;return{width:o,height:a,x:l,y:c}}function od(t,e,n){let r;if(e==="viewport")r=t0(t,n);else if(e==="document")r=e0(Dn(t));else if(Ht(e))r=n0(e,n);else{const i=id(t);r={...e,x:e.x-i.x,y:e.y-i.y}}return _s(r)}function ad(t,e){const n=An(t);return n===e||!Ht(n)||Dr(n)?!1:Vt(n).position==="fixed"||ad(n,e)}function r0(t,e){const n=e.get(t);if(n)return n;let r=la(t,[],!1).filter(a=>Ht(a)&&Nr(a)!=="body"),i=null;const s=Vt(t).position==="fixed";let o=s?An(t):t;for(;Ht(o)&&!Dr(o);){const a=Vt(o),l=oa(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Mi(o)&&!l&&ad(t,o))?r=r.filter(u=>u!==o):i=a,o=An(o)}return e.set(t,r),r}function i0(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?ca(e)?[]:r0(e,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const f=od(e,u,i);return c.top=_r(f.top,c.top),c.right=ia(f.right,c.right),c.bottom=ia(f.bottom,c.bottom),c.left=_r(f.left,c.left),c},od(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function s0(t){const{width:e,height:n}=nd(t);return{width:e,height:n}}function o0(t,e,n){const r=Yt(e),i=Dn(e),s=n==="fixed",o=Oi(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=Nn(0);if(r||!r&&!s)if((Nr(e)!=="body"||Mi(i))&&(a=Ns(e)),r){const f=Oi(e,!0,s,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else i&&(l.x=sd(i));const c=o.left+a.scrollLeft-l.x,u=o.top+a.scrollTop-l.y;return{x:c,y:u,width:o.width,height:o.height}}function da(t){return Vt(t).position==="static"}function ld(t,e){return!Yt(t)||Vt(t).position==="fixed"?null:e?e(t):t.offsetParent}function cd(t,e){const n=ut(t);if(ca(t))return n;if(!Yt(t)){let i=An(t);for(;i&&!Dr(i);){if(Ht(i)&&!da(i))return i;i=An(i)}return n}let r=ld(t,e);for(;r&&qg(r)&&da(r);)r=ld(r,e);return r&&Dr(r)&&da(r)&&!oa(r)?n:r||Kg(t)||n}const a0=async function(t){const e=this.getOffsetParent||cd,n=this.getDimensions,r=await n(t.floating);return{reference:o0(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function l0(t){return Vt(t).direction==="rtl"}const c0={convertOffsetParentRelativeRectToViewportRelativeRect:Xg,getDocumentElement:Dn,getClippingRect:i0,getOffsetParent:cd,getElementRects:a0,getClientRects:Qg,getDimensions:s0,getScale:Ar,isElement:Ht,isRTL:l0},d0=Yg,u0=Ug,f0=Wg,h0=(t,e,n)=>{const r=new Map,i={platform:c0,...n},s={...i.platform,_c:r};return jg(t,e,{...i,platform:s})};function p0(t,e,n){if(!t)throw new Error("A target component has to be provided.");if(!e)throw new Error("A callback has to be provided.");const r=i=>{i.target===t.value||i.composedPath().includes(t.value)||i.target===n.value||i.composedPath().includes(n.value)||typeof e=="function"&&e()};d.onMounted(()=>{window.addEventListener("click",r)}),d.onBeforeUnmount(()=>{window.removeEventListener("click",r)})}const m0={},g0={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor"},y0=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"},null,-1)];function b0(t,e){return d.openBlock(),d.createElementBlock("svg",g0,y0)}const ua=ye(m0,[["render",b0]]);let Ds;const v0=new Uint8Array(16);function k0(){if(!Ds&&(Ds=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ds))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ds(v0)}const Le=[];for(let t=0;t<256;++t)Le.push((t+256).toString(16).slice(1));function w0(t,e=0){return Le[t[e+0]]+Le[t[e+1]]+Le[t[e+2]]+Le[t[e+3]]+"-"+Le[t[e+4]]+Le[t[e+5]]+"-"+Le[t[e+6]]+Le[t[e+7]]+"-"+Le[t[e+8]]+Le[t[e+9]]+"-"+Le[t[e+10]]+Le[t[e+11]]+Le[t[e+12]]+Le[t[e+13]]+Le[t[e+14]]+Le[t[e+15]]}const dd={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ud(t,e,n){if(dd.randomUUID&&!e&&!t)return dd.randomUUID();t=t||{};const r=t.random||(t.rng||k0)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,w0(r)}let fa={isMobile(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},capitalize(t){return t?(t=t.toString(),t=t.replace(/(?:^|\s)\S/g,function(e){return e.toUpperCase()}).trim(),t.charAt(0).toUpperCase()+t.slice(1)):""}};const x0={class:"bg-white rounded-t-lg w-full"},S0={class:"flex justify-between items-center border-b px-4 py-3"},Ci=Object.assign({name:"WpicPopover"},{props:{placement:{type:String,default:"bottom-start"},label:String,hover:Boolean,custom:Boolean,disabled:Boolean,offset:{type:Number,default:0},customWidth:{}},setup(t,{expose:e}){const n=ud(),r=t,i={pmi:"lg:absolute shadow-[0_5px_30px_0px_rgba(0,0,0,0.25)]","wpic-tools":"mt-2 md:absolute border border-slate-300 shadow-md"},s={pmi:"lg:hidden","wpic-tools":"md:hidden"},o=d.ref(null),a=d.ref(null),l=d.ref(!0);fa.isMobile()||p0(a,()=>{u()},o);function c(){fa.isMobile()&&(document.documentElement.style.overflow="hidden",document.querySelector("#app").style.overflow="hidden"),r.disabled||(l.value=!1,f())}function u(){document.documentElement.style.overflow=null,document.querySelector("#app").style.overflow=null,l.value=!0}async function f(){const m=await h0(o.value,a.value,{placement:r.placement,middleware:[f0(),u0(),d0(r.offset)]});a.value.style.left=`${m.x}px`,a.value.style.top=`${m.y}px`}function h(){r.hover&&c()}function p(){r.hover&&u()}return e({hide:u}),(m,y)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[(d.openBlock(),d.createElementBlock("div",{class:"w-full",key:`reference_${d.unref(n)}`,ref_key:"reference",ref:o,onMouseenter:h,onMouseleave:p,onClick:y[0]||(y[0]=g=>l.value?c():u())},[d.renderSlot(m.$slots,"default",{isHidden:l.value})],32)),(d.openBlock(),d.createBlock(d.Teleport,{to:"body"},[(d.openBlock(),d.createElementBlock("div",{key:`floating_${d.unref(n)}`,ref_key:"floating",ref:a,class:d.normalizeClass(["z-10 bg-white rounded-md overflow-hidden",{[`${t.customWidth}`]:!0,hidden:l.value,[`${i[d.unref(xe).theme]}`]:!l.value,"bg-white px-3 py-2 rounded-md":!t.custom}])},[d.renderSlot(m.$slots,"content")],2)),d.createElementVNode("div",{onClick:y[1]||(y[1]=g=>u()),class:d.normalizeClass(["fixed z-20 flex items-end w-screen h-screen top-0 bg-black/20",{hidden:l.value,[`${s[d.unref(xe).theme]}`]:!0}])},[d.createElementVNode("div",x0,[d.createElementVNode("div",S0,[d.createElementVNode("span",null,d.toDisplayString(t.label),1),d.createVNode(ua,{onClick:u,class:"w-4 h-4"})]),d.renderSlot(m.$slots,"content")])],2)]))],64))}}),M0={},O0={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},C0=[d.createElementVNode("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"},null,-1),d.createElementVNode("path",{"fill-rule":"evenodd",d:"M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 0 1 0-1.113ZM17.25 12a5.25 5.25 0 1 1-10.5 0 5.25 5.25 0 0 1 10.5 0Z","clip-rule":"evenodd"},null,-1)];function T0(t,e){return d.openBlock(),d.createElementBlock("svg",O0,C0)}const E0=ye(M0,[["render",T0]]),_0={},N0={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},D0=[d.createElementVNode("path",{d:"M3.53 2.47a.75.75 0 0 0-1.06 1.06l18 18a.75.75 0 1 0 1.06-1.06l-18-18ZM22.676 12.553a11.249 11.249 0 0 1-2.631 4.31l-3.099-3.099a5.25 5.25 0 0 0-6.71-6.71L7.759 4.577a11.217 11.217 0 0 1 4.242-.827c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113Z"},null,-1),d.createElementVNode("path",{d:"M15.75 12c0 .18-.013.357-.037.53l-4.244-4.243A3.75 3.75 0 0 1 15.75 12ZM12.53 15.713l-4.243-4.244a3.75 3.75 0 0 0 4.244 4.243Z"},null,-1),d.createElementVNode("path",{d:"M6.75 12c0-.619.107-1.213.304-1.764l-3.1-3.1a11.25 11.25 0 0 0-2.63 4.31c-.12.362-.12.752 0 1.114 1.489 4.467 5.704 7.69 10.675 7.69 1.5 0 2.933-.294 4.242-.827l-2.477-2.477A5.25 5.25 0 0 1 6.75 12Z"},null,-1)];function A0(t,e){return d.openBlock(),d.createElementBlock("svg",N0,D0)}const V0=ye(_0,[["render",A0]]),B0={},P0={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor"},I0=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)];function R0(t,e){return d.openBlock(),d.createElementBlock("svg",P0,I0)}const fd=ye(B0,[["render",R0]]),$0={},L0={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},F0=[d.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.34l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z","clip-rule":"evenodd"},null,-1)];function z0(t,e){return d.openBlock(),d.createElementBlock("svg",L0,F0)}const hd=ye($0,[["render",z0]]);var As=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function j0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function W0(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var pd=W0,H0=typeof As=="object"&&As&&As.Object===Object&&As,Y0=H0,U0=Y0,q0=typeof self=="object"&&self&&self.Object===Object&&self,K0=U0||q0||Function("return this")(),md=K0,J0=md,G0=function(){return J0.Date.now()},Z0=G0,X0=/\s/;function Q0(t){for(var e=t.length;e--&&X0.test(t.charAt(e)););return e}var ey=Q0,ty=ey,ny=/^\s+/;function ry(t){return t&&t.slice(0,ty(t)+1).replace(ny,"")}var iy=ry,sy=md,oy=sy.Symbol,gd=oy,yd=gd,bd=Object.prototype,ay=bd.hasOwnProperty,ly=bd.toString,Ti=yd?yd.toStringTag:void 0;function cy(t){var e=ay.call(t,Ti),n=t[Ti];try{t[Ti]=void 0;var r=!0}catch{}var i=ly.call(t);return r&&(e?t[Ti]=n:delete t[Ti]),i}var dy=cy,uy=Object.prototype,fy=uy.toString;function hy(t){return fy.call(t)}var py=hy,vd=gd,my=dy,gy=py,yy="[object Null]",by="[object Undefined]",kd=vd?vd.toStringTag:void 0;function vy(t){return t==null?t===void 0?by:yy:kd&&kd in Object(t)?my(t):gy(t)}var ky=vy;function wy(t){return t!=null&&typeof t=="object"}var xy=wy,Sy=ky,My=xy,Oy="[object Symbol]";function Cy(t){return typeof t=="symbol"||My(t)&&Sy(t)==Oy}var Ty=Cy,Ey=iy,wd=pd,_y=Ty,xd=NaN,Ny=/^[-+]0x[0-9a-f]+$/i,Dy=/^0b[01]+$/i,Ay=/^0o[0-7]+$/i,Vy=parseInt;function By(t){if(typeof t=="number")return t;if(_y(t))return xd;if(wd(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=wd(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Ey(t);var n=Dy.test(t);return n||Ay.test(t)?Vy(t.slice(2),n?2:8):Ny.test(t)?xd:+t}var Py=By,Iy=pd,ha=Z0,Sd=Py,Ry="Expected a function",$y=Math.max,Ly=Math.min;function Fy(t,e,n){var r,i,s,o,a,l,c=0,u=!1,f=!1,h=!0;if(typeof t!="function")throw new TypeError(Ry);e=Sd(e)||0,Iy(n)&&(u=!!n.leading,f="maxWait"in n,s=f?$y(Sd(n.maxWait)||0,e):s,h="trailing"in n?!!n.trailing:h);function p(v){var T=r,B=i;return r=i=void 0,c=v,o=t.apply(B,T),o}function m(v){return c=v,a=setTimeout(k,e),u?p(v):o}function y(v){var T=v-l,B=v-c,V=e-T;return f?Ly(V,s-B):V}function g(v){var T=v-l,B=v-c;return l===void 0||T>=e||T<0||f&&B>=s}function k(){var v=ha();if(g(v))return x(v);a=setTimeout(k,y(v))}function x(v){return a=void 0,h&&r?p(v):(r=i=void 0,o)}function O(){a!==void 0&&clearTimeout(a),c=0,r=l=i=a=void 0}function b(){return a===void 0?o:x(ha())}function C(){var v=ha(),T=g(v);if(r=arguments,i=this,l=v,T){if(a===void 0)return m(l);if(f)return clearTimeout(a),a=setTimeout(k,e),p(l)}return a===void 0&&(a=setTimeout(k,e)),o}return C.cancel=O,C.flush=b,C}var zy=Fy;const jy=j0(zy),Wy={key:0,class:"mb-2 gap-2 wpic-form-label text-base text-zinc-600 dark:text-zinc-300 flex items-center"},Hy={class:""},Yy=["name","value","checked"],Uy={key:0,class:"absolute left-0 ml-3 h-full flex items-center justify-center text-center"},qy={class:"opacity-50 w-4 h-4 leading-tight"},Ky={key:3,class:"absolute z-10 right-0 mr-3 h-full flex items-center"},Jy={class:"min-w-5 h-5 leading-tight cursor-pointer"},Gy={key:5,class:"text-red-700 mt-1 text-base"},Zy=Object.assign({name:"WpicFormField"},{props:{label:{type:[String,Number]},placeholder:String,name:{type:String,default:null},select:Boolean,checkbox:Boolean,radio:Boolean,textarea:Boolean,rules:{},type:{type:String,default:"text"},tag:{type:String,default:null},options:{type:Array},required:Boolean,email:Boolean,multiple:Boolean,slim:Boolean,error:{type:Boolean,default:!0},clearable:Boolean,modelValue:{},checkboxValue:{},uncheckedValue:{},radioValue:{},disabled:Boolean,debounce:{type:Number,default:0},loading:Boolean,password:Boolean,addLabel:{type:String,default:"Add"},help:String,labelName:Boolean,half:Boolean,hideSelect:Boolean,date:Boolean,range:Boolean,rows:{type:[String,Number],default:3},transparent:Boolean,loadingPercent:{type:Number,default:null},loadingPulse:{type:Boolean,default:!1},blur:{type:Boolean,default:!1},large:Boolean,noResize:Boolean,autoResize:Boolean,minHeight:{type:[String,Number],default:50},maxHeight:{type:[String,Number],default:300},hideFocus:Boolean,min:{type:[String,Number],default:-1/0},max:{type:[String,Number],default:1/0},info:{type:String}},emits:["onChange","update:modelValue","onClear"],setup(t,{expose:e,emit:n}){const r={pmi:"shadow-inner border-zinc-400 focus-within:border-zinc-500 focus-within:outline focus-within:outline-2 focus-within:outline-offset-3 bg-zinc-100 dark:bg-zinc-700/25 dark:border-zinc-700/50 dark:text-zinc-300","wpic-tools":"border-slate-300 bg-white focus-within:border-blue-400 outline-blue-200 focus-within:outline focus-within:outline-[3px]"},i=t,s=d.computed(()=>i.name?i.name:ud()),o=ug(s.value),a=d.computed(()=>{if(i.label)return i.label;if(i.name&&i.labelName)return`${i.name}#${i.labelName}`}),l=d.ref(!0),c=d.computed(()=>(i.type=="password"||i.password)&&l.value?"password":i.type);function u(){l.value=!l.value}const f=d.computed(()=>{if(i.rules&&typeof i.rules=="string"){let v=i.rules.split("|");return i.required&&v.push("required"),i.email&&v.push("email"),v.join("|")}else if(!i.rules){let v=[];return i.required&&v.push("required"),i.email&&v.push("email"),v.join("|")}return"required"});function h(v){let T=v&&v.target?v.target.value:v;k(T)}const p=n;function m(v){v===!0||v===!1?p("update:modelValue",!v):p("update:modelValue",v)}function y(v){let T=v&&v.target?v.target.value:v;p("update:modelValue",T),p("onChange",T)}function g(){p("update:modelValue",null),p("onChange",null),p("onClear")}const k=jy(function(v){p("update:modelValue",v),p("onChange",v)},i.debounce),x=d.ref(null),O=d.ref(!1);d.watch(()=>i.modelValue,v=>{i.tag=="textarea"&&(x.value.$el.style.height="auto",d.nextTick(()=>{i.minHeight&&(x.value.$el.style.height=`${x.value.$el.scrollHeight<i.minHeight?i.minHeight:x.value.$el.scrollHeight}px`),i.maxHeight&&(x.value.$el.scrollHeight>i.maxHeight?(x.value.$el.style.height=`${i.maxHeight}px`,O.value=!0):O.value=!1)}))},{deep:!0});function b(){var v;i.tag=="textarea"?x.value.$el.focus():(v=x.value)==null||v.$el.focus()}function C(){return x.value.meta.valid}return e({focus:b,isValid:C}),(v,T)=>{const B=d.resolveComponent("wpic-choice-list");return d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["wpic-form-field",{"mb-6":!t.slim}])},[a.value&&!t.checkbox&&!t.radio?(d.openBlock(),d.createElementBlock("div",Wy,[d.createTextVNode(d.toDisplayString(a.value)+" ",1),d.createElementVNode("div",Hy,[t.info?(d.openBlock(),d.createBlock(Ci,{key:0,hover:""},{content:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(t.info),1)]),default:d.withCtx(()=>[d.createVNode(hd,{class:"w-4 h-4 text-zinc-600"})]),_:1})):d.createCommentVNode("",!0)])])):d.createCommentVNode("",!0),t.checkbox?(d.openBlock(),d.createBlock(d.unref(ws),{key:1,ref_key:"myInput",ref:x,name:s.value,rules:f.value,value:t.checkboxValue,"unchecked-value":t.uncheckedValue,modelValue:t.modelValue},{default:d.withCtx(({field:V})=>[d.createElementVNode("div",{class:"inline-flex items-center gap-2",onClick:T[0]||(T[0]=F=>t.disabled?void 0:m(t.modelValue))},[d.createElementVNode("div",{class:d.normalizeClass(["w-4 h-4 border rounded-sm cursor-pointer",{"border-zinc-400":!t.disabled&&!t.modelValue,"bg-violet-800 border-violet-800 text-white":t.modelValue===!0,"bg-opacity-50 border-opacity-50 text-opacity-75":t.disabled}])},[t.modelValue===!0?(d.openBlock(),d.createBlock(fd,{key:0})):d.createCommentVNode("",!0)],2),d.createElementVNode("span",{class:d.normalizeClass(["text-base cursor-pointer select-none",{"opacity-50":t.disabled}])},[d.renderSlot(v.$slots,"default",{},()=>[d.createTextVNode(d.toDisplayString(a.value),1)])],2)])]),_:3},8,["name","rules","value","unchecked-value","modelValue"])):t.radio?(d.openBlock(),d.createBlock(d.unref(ws),{key:2,ref_key:"myInput",ref:x,name:s.value,value:t.radioValue,modelValue:t.modelValue},{default:d.withCtx(({field:V})=>[d.createElementVNode("div",{onClick:T[2]||(T[2]=()=>{t.disabled||y(t.radioValue)}),class:d.normalizeClass([{"cursor-pointer":!t.disabled},"inline-flex items-center gap-2 select-none"])},[d.createElementVNode("span",{class:d.normalizeClass(["h-4 w-4 border border-zinc-400 rounded-full p-[2px]",{"border-opacity-50":t.disabled}])},[t.radioValue==t.modelValue?(d.openBlock(),d.createElementBlock("span",{key:0,class:d.normalizeClass(["flex rounded-full h-full w-full bg-violet-800",{"bg-opacity-50":t.disabled}])},null,2)):d.createCommentVNode("",!0)],2),d.createElementVNode("input",{class:"hidden",type:"radio",name:t.name,value:t.radioValue,onChange:T[1]||(T[1]=(...F)=>v.onChange&&v.onChange(...F)),checked:t.radioValue==t.modelValue},null,40,Yy),a.value?(d.openBlock(),d.createElementBlock("span",{key:0,class:d.normalizeClass(["text-base",{"opacity-50":t.disabled}])},d.toDisplayString(a.value),3)):d.createCommentVNode("",!0)],2)]),_:1},8,["name","value","modelValue"])):t.select?(d.openBlock(),d.createBlock(d.unref(ws),{key:3,ref_key:"myInput",ref:x,modelValue:t.modelValue,rules:f.value,name:s.value},{default:d.withCtx(({field:V})=>{var F;return[d.createVNode(B,{modelValue:t.modelValue,"onUpdate:modelValue":y,disabled:t.disabled,options:t.options,hideSelect:t.hideSelect,multiple:t.multiple,isInvalid:!!(t.error&&d.unref(o)),required:t.required||((F=f.value)==null?void 0:F.indexOf("required"))>=0,label:a.value,placeholder:"Select..."},null,8,["modelValue","disabled","options","hideSelect","multiple","isInvalid","required","label"])]}),_:1},8,["modelValue","rules","name"])):(d.openBlock(),d.createElementBlock("div",{key:4,class:d.normalizeClass(["wpic-input rounded flex relative border",{[`${r[d.unref(xe).theme]}`]:!0,"h-10":!t.textarea&&!t.large,"h-12":!t.textarea&&t.large,"border-opacity-50 border-zinc-300 text-zinc-400":t.disabled,"!border-red-600 focus-within:outline-red-600":d.unref(o)}])},[v.$slots.prepend?(d.openBlock(),d.createElementBlock("div",Uy,[d.createElementVNode("div",qy,[d.renderSlot(v.$slots,"prepend")])])):d.createCommentVNode("",!0),d.createVNode(d.unref(ws),{ref_key:"myInput",ref:x,as:t.textarea?"textarea":void 0,autocomplete:"off",style:{"z-index":"1"},class:d.normalizeClass(["flex w-full h-full rounded pr-4 bg-transparent outline-none appearance-none",{"pl-4":!v.$slots.prepend,"pl-12":v.$slots.prepend,"py-2":t.textarea,"cursor-not-allowed":t.disabled}]),type:c.value,min:t.min,max:t.max,rows:t.rows,name:s.value,disabled:t.disabled,modelValue:t.modelValue,onInput:h,placeholder:t.placeholder,validateOnInput:!!d.unref(o),rules:f.value},null,8,["as","class","type","min","max","rows","name","disabled","modelValue","placeholder","validateOnInput","rules"]),t.loading?(d.openBlock(),d.createElementBlock("div",{key:1,onClick:g,class:"absolute right-0 mr-3 h-full flex items-center cursor-pointer opacity-75 hover:opacity-100"},[d.createVNode(Ss,{class:"w-6 h-6 opacity-50"})])):t.clearable&&t.modelValue?(d.openBlock(),d.createElementBlock("div",{key:2,onClick:d.withModifiers(g,["stop"]),style:{"z-index":"2"},class:"absolute right-0 mr-3 h-full flex items-center cursor-pointer opacity-75 hover:opacity-100"},[d.createVNode(ua,{class:"w-5 h-5 opacity-50"})])):d.createCommentVNode("",!0),v.$slots.append||t.password||t.type=="password"?(d.openBlock(),d.createElementBlock("div",Ky,[d.createElementVNode("div",Jy,[d.renderSlot(v.$slots,"append",{},()=>[d.withDirectives(d.createVNode(E0,{class:"text-zinc-600 select-none",onClick:u},null,512),[[d.vShow,l.value]]),d.withDirectives(d.createVNode(V0,{class:"text-zinc-600 select-none",onClick:u},null,512),[[d.vShow,!l.value]])])])])):d.createCommentVNode("",!0)],2)),t.error&&d.unref(o)?(d.openBlock(),d.createElementBlock("div",Gy,[d.createVNode(d.unref(dg),{name:s.value},{default:d.withCtx(V=>[d.createTextVNode(d.toDisplayString(V.message),1)]),_:1},8,["name"])])):d.createCommentVNode("",!0),v.$slots.help||t.help?(d.openBlock(),d.createElementBlock("div",{key:6,class:d.normalizeClass(["text-base mt-1",{"ml-7":t.type=="checkbox","opacity-50":t.disabled}])},[d.renderSlot(v.$slots,"help",{},()=>[d.createTextVNode(d.toDisplayString(t.help),1)])],2)):d.createCommentVNode("",!0)],2)}}}),Xy={key:0,class:"mb-2 gap-2 wpic-form-label text-base text-zinc-600 dark:text-zinc-300 flex items-center"},Qy={class:""},eb={key:0,class:"absolute left-0 ml-3 h-full flex items-center justify-center text-center"},tb={class:"opacity-50 w-4 h-4 leading-tight"},Md=Object.assign({name:"WpicFormInput"},{props:{label:String,info:String,disabled:Boolean,large:Boolean},setup(t){const e={pmi:"shadow-inner border-zinc-400 focus-within:border-zinc-500 focus-within:outline focus-within:outline-2 focus-within:outline-offset-3 bg-zinc-100 dark:bg-zinc-700/25 dark:border-zinc-700/50 dark:text-zinc-300","wpic-tools":"border-slate-300 bg-white focus-within:border-blue-400 outline-blue-200 focus-within:outline focus-within:outline-[3px]"},n={pmi:"border-opacity-50 border-zinc-300 text-zinc-400","wpic-tools":"border-slate-200 text-slate-400"};return(r,i)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[t.label?(d.openBlock(),d.createElementBlock("div",Xy,[d.createTextVNode(d.toDisplayString(t.label)+" ",1),d.createElementVNode("div",Qy,[t.info?(d.openBlock(),d.createBlock(Ci,{key:0,hover:""},{content:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(t.info),1)]),default:d.withCtx(()=>[d.createVNode(hd,{class:"w-4 h-4 text-zinc-600"})]),_:1})):d.createCommentVNode("",!0)])])):d.createCommentVNode("",!0),d.createElementVNode("div",{class:d.normalizeClass(["wpic-input rounded flex relative border pr-4 items-center",{"pl-4":!r.$slots.prepend,"pl-10":r.$slots.prepend,[`${e[d.unref(xe).theme]}`]:!0,"h-10":!t.large,"h-12":t.large,[`${n[d.unref(xe).theme]}`]:t.disabled,"cursor-pointer":!t.disabled}])},[r.$slots.prepend?(d.openBlock(),d.createElementBlock("div",eb,[d.createElementVNode("div",tb,[d.renderSlot(r.$slots,"prepend")])])):d.createCommentVNode("",!0),d.renderSlot(r.$slots,"default")],2)],64))}}),nb={},rb={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor"},ib=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"},null,-1)];function sb(t,e){return d.openBlock(),d.createElementBlock("svg",rb,ib)}const ob=ye(nb,[["render",sb]]),ab=["disabled"],lb={key:0,class:"leading-none"},cb={key:0},db={key:1,class:"flex flex-col max-h-80 overflow-y-auto"},ub=["onClick"],fb={class:"select-none flex w-full items-center justify-between"},hb=Object.assign({name:"WpicChoiceList"},{props:{modelValue:{},value:{},name:String,small:Boolean,hideSelect:Boolean,label:String,placeholder:String,options:Array,multiple:Boolean,required:Boolean,disabled:Boolean,isInvalid:Boolean,maxDisplay:{type:Number}},emits:["blur","input","change","update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=d.ref();function s(f){if(n.multiple){if(f){let h=n.modelValue||[];h.indexOf(f)>=0?h.splice(h.indexOf(f),1):h.push(f),r("update:modelValue",h)}}else r("update:modelValue",f),i.value.hide()}const o=d.computed(()=>{var f,h,p,m;if(n.multiple)if(n.maxDisplay){let y=(h=n.options)==null?void 0:h.filter(k=>{var x;return((x=n.modelValue)==null?void 0:x.indexOf(k.value))>=0}).map(k=>k.label),g=y==null?void 0:y.slice(0,n.maxDisplay);return y.length-g.length>0?(g==null?void 0:g.join(", "))+` (+${y.length-g.length})`:g==null?void 0:g.join(", ")}else return(f=n.options)==null?void 0:f.filter(y=>{var g;return((g=n.modelValue)==null?void 0:g.indexOf(y.value))>=0}).map(y=>y.label).join(", ");else return((m=(p=n.options)==null?void 0:p.find(y=>y.value===n.modelValue))==null?void 0:m.label)||n.modelValue}),a=d.computed(()=>{if(n.required)return n.options;{let f=n.options;return f.unshift({label:n.placeholder||"-",value:null}),f}});function l(f){var h;return n.multiple?n.modelValue!==null&&((h=n.modelValue)==null?void 0:h.indexOf(f))>=0:n.modelValue!==null&&f===n.modelValue}const c={pmi:"text-zinc-800 dark:text-zinc-300 disabled:bg-zinc-50 disabled:border-zinc-300 disabled:text-zinc-400 enabled:bg-zinc-100 enabled:border-zinc-400 enabled:text-zinc-500 enabled:dark:bg-zinc-700/25 enabled:dark:border-zinc-700/50 enabled:dark:text-zinc-300","wpic-tools":"disabled:text-slate-400 disabled:border-slate-200 bg-white border-slate-300 focus-within:border-lime-400 disabled:bg-slate-50"},u={pmi:"group-[.is-selected]:bg-violet-50 group-[.is-selected]:hover:bg-violet-100","wpic-tools":"hover:bg-slate-50 group-[.is-selected]:text-lime-500 group-[.is-selected]:font-semibold"};return(f,h)=>(d.openBlock(),d.createBlock(Ci,{custom:"",ref_key:"myPopover",ref:i,label:t.label,disabled:t.disabled},{default:d.withCtx(({isHidden:p})=>{var m;return[d.createElementVNode("button",{class:d.normalizeClass(["flex appearance-none w-full items-center gap-2 px-3 lg:text-base rounded border overflow-hidden leading-none",{"h-10":!t.small,"h-8":t.small,"cursor-pointer":!t.disabled,"!border-red-600 focus-within:outline-red-600":t.isInvalid,[`${c[d.unref(xe).theme]}`]:!0}]),disabled:t.disabled},[d.createElementVNode("span",{class:d.normalizeClass(["select-none w-full text-left flex-1",{"whitespace-pre":!t.multiple}])},[t.modelValue&&((m=t.modelValue)==null?void 0:m.length)>0&&!t.hideSelect?(d.openBlock(),d.createElementBlock("span",lb,d.toDisplayString(o.value),1)):d.renderSlot(f.$slots,"default",{key:1},()=>[d.createTextVNode(d.toDisplayString(t.placeholder),1)])],2),d.createVNode(ob,{class:d.normalizeClass(["h-4 w-4 transition-all transform",{"rotate-180":!p}])},null,8,["class"])],10,ab)]}),content:d.withCtx(()=>{var p;return[!t.options&&((p=t.options)==null?void 0:p.length)==0?(d.openBlock(),d.createElementBlock("span",cb,"No data.")):(d.openBlock(),d.createElementBlock("div",db,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(a.value,m=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["group",{"is-selected":!!l(m.value)}])},[d.createElementVNode("div",{class:d.normalizeClass(["flex items-center py-2 px-4 min-w-64 text-base",{"cursor-pointer":!t.multiple||m.value,[`${u[d.unref(xe).theme]}`]:!0}]),onClick:y=>s(m.value)},[d.createElementVNode("div",fb,[d.createElementVNode("span",null,d.toDisplayString(m.label||m.value),1),l(m.value)?(d.openBlock(),d.createBlock(fd,{key:0,class:"w-4 h-4"})):d.createCommentVNode("",!0)])],10,ub)],2))),256))]))]}),_:3},8,["label","disabled"]))}}),pb={key:0,class:"flex justify-between items-baseline pt-6 px-6"},mb={key:0,class:"text-xl font-bold"},gb={class:""},yb={key:1,class:"flex items-center justify-end py-4 px-6"},bb=Object.assign({name:"WpicCard"},{props:{title:String},setup(t){const e={pmi:"shadow-[0_4px_16px_0px_rgba(0,0,0,0.1)]","wpic-tools":"border border-slate-300"};return(n,r)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["bg-white dark:bg-zinc-800/50 rounded-lg wpic-card",[e[d.unref(xe).theme]]])},[t.title||n.$slots.actions?(d.openBlock(),d.createElementBlock("div",pb,[t.title?(d.openBlock(),d.createElementBlock("div",mb,d.toDisplayString(t.title),1)):d.createCommentVNode("",!0),d.createElementVNode("div",gb,[d.renderSlot(n.$slots,"actions")])])):d.createCommentVNode("",!0),d.renderSlot(n.$slots,"default"),n.$slots.buttons?(d.openBlock(),d.createElementBlock("div",yb,[d.renderSlot(n.$slots,"buttons")])):d.createCommentVNode("",!0)],2))}}),vb={name:"WpicCardSection"},kb={class:"py-6 border-b last:border-0 mx-6"};function wb(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("div",kb,[d.renderSlot(t.$slots,"default")])}const xb=ye(vb,[["render",wb]]),Sb={class:"flex h-2 rounded-full w-full ring-1 ring-zinc-400"},Mb=Object.assign({name:"WpicProgressBar"},{props:{value:Number},setup(t){return(e,n)=>(d.openBlock(),d.createElementBlock("div",Sb,[t.value>0?(d.openBlock(),d.createElementBlock("div",{key:0,style:d.normalizeStyle({width:`${t.value}%`}),class:"flex h-full bg-cyan-400 ring-1 ring-cyan-400 rounded-full"},null,4)):d.createCommentVNode("",!0)]))}}),Ob={class:"text-base leading-none"},Cb=Object.assign({name:"WpicTag"},{props:{clearable:Boolean},emits:["clear"],setup(t,{emit:e}){const n=e;function r(){n("clear")}return(i,s)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["wpic-tag select-none border border-cyan-500 bg-cyan-50 inline-flex rounded text-cyan-600 h-8 items-center justify-center pl-3 py-1",{"pr-3":!t.clearable,"pr-2":t.clearable}])},[d.createElementVNode("span",Ob,[d.renderSlot(i.$slots,"default")]),t.clearable?(d.openBlock(),d.createElementBlock("span",{key:0,onClick:r,class:"ml-1 cursor-pointer opacity-75 hover:opacity-100"},[d.createVNode(ua,{class:"w-4 h-4"})])):d.createCommentVNode("",!0)],2))}}),Tb=Object.assign({name:"WpicTagGroup"},{props:{full:Boolean},setup(t){return(e,n)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass({"w-full":t.full})},[d.createElementVNode("div",{class:d.normalizeClass(["ui-tag-group flex flex-wrap gap-2",{"w-full":t.full}])},[d.renderSlot(e.$slots,"default")],2)],2))}}),Eb={class:"w-full h-full flex items-center justify-center"},_b=Object.assign({name:"WpicLoadingPanel"},{props:{color:{type:String,default:""}},setup(t){return(e,n)=>(d.openBlock(),d.createElementBlock("div",Eb,[d.createVNode(Ss,{color:t.color,class:"w-10 h-10"},null,8,["color"])]))}}),Nb={class:"text-base font-medium"},Od=Object.assign({name:"WpicPaginationItem"},{props:{active:Boolean},setup(t){return(e,n)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["border rounded flex items-center justify-center w-10 h-10 cursor-pointer",{"border-zinc-300 dark:border-zinc-700 text-zinc-600 dark:text-zinc-300 hover:bg-zinc-500 hover:text-white":!t.active,"bg-violet-800 border-violet-800 hover:bg-violet-900 hover:border-violet-900 text-white":t.active}])},[d.createElementVNode("span",Nb,[d.renderSlot(e.$slots,"default")])],2))}}),Db={class:"wpic-pagination flex justify-between"},Ab={class:"flex flex-wrap gap-2"},Vb={class:"hidden lg:flex gap-2 items-center"},Bb=d.createElementVNode("span",{class:"text-base text-zinc-500"},"Results per page",-1),Pb={class:"flex gap-2"},Ib=Object.assign({name:"WpicPagination"},{props:{total:Number,perPage:{type:Number,default:10},currentPage:Number},emits:["update:perPage","update:currentPage"],setup(t,{expose:e,emit:n}){const r=t,i=n,s=d.computed(()=>r.total&&r.perPage?Math.ceil(r.total/r.perPage):1),o=[10,25,50,100];function a(f){i("update:currentPage",f)}function l(f){i("update:perPage",f)}function c(){return r.perPage*(r.currentPage-1)+1}function u(){return r.perPage*r.currentPage>r.total?r.total:r.perPage*r.currentPage}return e({getStart:c,getEnd:u}),(f,h)=>(d.openBlock(),d.createElementBlock("div",Db,[d.createElementVNode("div",Ab,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.value,p=>(d.openBlock(),d.createBlock(Od,{onClick:m=>a(p),active:p===t.currentPage},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(p),1)]),_:2},1032,["onClick","active"]))),256))]),d.createElementVNode("div",Vb,[Bb,d.createElementVNode("div",Pb,[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(o,p=>d.createVNode(Od,{onClick:m=>l(p),active:p==t.perPage},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(p),1)]),_:2},1032,["onClick","active"])),64))])])]))}}),Cd=(t,e)=>{const n=t.column.children&&t.column.children.default&&typeof t.column.children.default=="function"?t.column.children.default({item:t.item}):t.column.children;return d.h("td",e.attrs,[d.h("div",{class:""},n)])};Cd.props=["column","item","rowIndex"];const Td=Cd,Rb={},$b={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},Lb=[d.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"},null,-1)];function Fb(t,e){return d.openBlock(),d.createElementBlock("svg",$b,Lb)}const zb=ye(Rb,[["render",Fb]]),jb={class:"font-semibold"},Ed={__name:"TotalRow",props:{columns:Array,noXPadding:Boolean,totalItem:{},position:String},setup(t){const e={pmi:"bg-white dark:text-zinc-300 dark:border-zinc-900 dark:bg-zinc-800","wpic-tools":"bg-slate-50 border-slate-200 dark:border-slate-900 dark:bg-slate-800"};return(n,r)=>(d.openBlock(),d.createElementBlock("tr",jb,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(t.columns,(i,s)=>(d.openBlock(),d.createBlock(Td,{class:d.normalizeClass(["py-3 first:pl-6 pr-6 border-t",{[`${e[d.unref(xe).theme]}`]:!0,"sticky left-0":s===0,"border-b":t.position==="header","border-t":t.position==="footer","first:pl-0 last:pr-0":t.noXPadding,"last:rounded-br-lg":!0,"first:rounded-bl-lg":!0,"text-center":i.align=="center","text-right":i.align=="right"}]),id:`total_${s}`,column:i,item:t.totalItem,key:`tr_total_${s}`},null,8,["class","id","column","item"]))),128))]))}},Wb={class:"overflow-auto"},Hb={class:"w-full rounded-lg"},Yb=["width","max-width"],Ub={key:0,class:"rounded-t-lg"},qb=["onClick"],Kb={class:"rounded-b-lg"},Jb={key:1},Gb=Object.assign({name:"WpicTable"},{props:{data:{type:Array,default:()=>[]},hideHeaders:Boolean,sortOptions:{},border:Boolean,noXPadding:Boolean,totalItem:{},totalOnBottom:Boolean,totalOnTop:Boolean},emits:["changeSort"],setup(t,{expose:e,emit:n}){const r=t,i={pmi:"","wpic-tools":"border-slate-300"},s={pmi:"bg-zinc-50 dark:bg-zinc-800/60 text-zinc-500 dark:text-zinc-400 dark:border-zinc-900","wpic-tools":"bg-slate-100 dark:bg-slate-800/60 text-slate-400 dark:text-slate-400 border-slate-200 dark:border-slate-900"},o={pmi:"bg-white dark:text-zinc-300 dark:border-zinc-900 dark:bg-zinc-800","wpic-tools":"bg-white border-slate-200 dark:border-slate-900 dark:bg-slate-800"},a=n;d.onMounted(()=>{f()});const l=d.getCurrentInstance();d.provide("wtable",l==null?void 0:l.proxy);const c=d.useSlots(),u=d.ref([]);function f(){const p=(g,k)=>{let x={};for(let O in g){if(typeof g[O].default=="boolean"&&k[O]!==void 0){x[O]=k[O]!==!1;continue}if(k[O]!==void 0){x[O]=k[O];continue}if(typeof g[O].default=="function"){x[O]=g[O].default();continue}x[O]=g[O].default}return x};let m=[];(c.default&&c.default()||[]).forEach(g=>{var k,x;((k=g.type)==null?void 0:k.name)==="WpicTableColumn"?m.push(g):(x=g.children)!=null&&x.length&&g.children.forEach(O=>{var b;((b=O.type)==null?void 0:b.name)==="WpicTableColumn"&&m.push(O)})}),u.value=m.map(g=>{let k=g.children,x=g.props||{},{field:O,label:b,help:C,width:v,minWidth:T,maxWidth:B,sortable:V,selectable:F,render:te,type:G,align:ne,visible:oe}=p(g.type.props,x);return{label:b,help:C,width:v,minWidth:T,maxWidth:B,type:G,align:ne,sortable:V,selectable:F,field:O,render:te,children:k,visible:oe}}).filter(g=>g.visible||g.selectable)}function h(p){var y,g;let m=(y=r.sortOptions)==null?void 0:y.sortDirection;((g=r.sortOptions)==null?void 0:g.sortBy)===p&&(m=m==="asc"?"desc":"asc"),a("changeSort",{sortDirection:m,sortBy:p})}return d.watch(()=>c.default,p=>{console.log("watch slots.default",p),f()},{deep:!0}),e({buildColumns:f}),(p,m)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["relative w-full rounded-lg overflow-hidden",{border:t.border,[`${i[d.unref(xe).theme]}`]:!0}])},[d.createElementVNode("div",Wb,[d.createElementVNode("table",Hb,[d.createElementVNode("colgroup",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(u.value,(y,g)=>(d.openBlock(),d.createElementBlock("col",{style:d.normalizeStyle({minWidth:`${y.minWidth}px`}),width:y.width,"max-width":y.maxWidth,key:g},null,12,Yb))),128))]),t.hideHeaders?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("thead",Ub,[d.createElementVNode("tr",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(u.value,(y,g)=>{var k,x;return d.openBlock(),d.createElementBlock("th",{class:d.normalizeClass(["first:rounded-tl-lg last:rounded-tr-lg py-0border-b first:pl-6 pr-6",{[`${s[d.unref(xe).theme]}`]:!0,"sticky left-0":g===0}])},[d.createElementVNode("div",{onClick:()=>{y.sortable&&h(y.field)},class:d.normalizeClass(["flex items-center py-3 lg:text-base rounded-lg",{"cursor-pointer":y.sortable&&y.field,"justify-center":y.align=="center","justify-end":y.align=="right"}])},[d.createElementVNode("span",{class:d.normalizeClass(["select-none font-medium",{"text-right":y.align=="right"}])},d.toDisplayString(y.label),3),y.sortable&&y.field?(d.openBlock(),d.createElementBlock("span",{key:0,class:d.normalizeClass(["ml-1",{"opacity-25":y.field!=((k=t.sortOptions)==null?void 0:k.sortBy)}])},[d.createVNode(zb,{class:d.normalizeClass(["w-4 h-4",{"rotate-180":((x=t.sortOptions)==null?void 0:x.sortDirection)==="asc"}])},null,8,["class"])],2)):d.createCommentVNode("",!0)],10,qb)],2)}),256))])])),d.createElementVNode("tbody",Kb,[t.totalItem&&t.totalOnTop?(d.openBlock(),d.createBlock(Ed,{key:0,position:"header",columns:u.value,noXPadding:t.noXPadding,totalItem:t.totalItem},null,8,["columns","noXPadding","totalItem"])):d.createCommentVNode("",!0),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(t.data,(y,g)=>(d.openBlock(),d.createElementBlock("tr",{class:"tr border-b last:border-b-0 overflow-hidden",key:`tr_${g}`},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(u.value,(k,x)=>{var O,b;return d.openBlock(),d.createBlock(Td,{class:d.normalizeClass(["py-3 first:pl-6 pr-6 lg:text-base",{"sticky left-0 shadow":x===0,[`${o[d.unref(xe).theme]}`]:!0,"first:pl-0 last:pr-0":t.noXPadding,"last:rounded-br-lg":g===((O=t.data)==null?void 0:O.length)-1&&!t.totalItem,"first:rounded-bl-lg":g===((b=t.data)==null?void 0:b.length)-1&&!t.totalItem,"text-center":k.align=="center","text-right":k.align=="right"}]),id:`${g}_${x}`,column:k,item:y,rowIndex:g,key:x},null,8,["class","id","column","item","rowIndex"])}),128))]))),128))]),t.totalItem&&t.totalOnBottom?(d.openBlock(),d.createElementBlock("tfoot",Jb,[d.createVNode(Ed,{position:"footer",columns:u.value,noXPadding:t.noXPadding,totalItem:t.totalItem},null,8,["columns","noXPadding","totalItem"])])):d.createCommentVNode("",!0)])])],2))}}),Zb={name:"WpicTableColumn",props:{label:{type:String},help:{type:String},field:{type:String,default:""},selectable:{type:Boolean,default:!0},sortable:{type:Boolean,default:!1},type:{type:String,default:"default"},width:{type:[String,Number],default:null},minWidth:{type:[String,Number],default:null},maxWidth:{type:[String,Number],default:null},align:{type:String,default:"left"},visible:{type:Boolean,default:!0}},setup(t){const e=inject("wtable",null);return onMounted(()=>{e&&e.buildColumns&&e.buildColumns()}),onBeforeUnmount(()=>{e&&e.buildColumns&&e.buildColumns()}),()=>null}};function Fe(t){this.content=t}Fe.prototype={constructor:Fe,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),s=r.content.slice();return i==-1?s.push(n||t,e):(s[i+1]=e,n&&(s[i]=n)),new Fe(s)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Fe(n)},addToStart:function(t,e){return new Fe([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Fe(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),s=r.find(t);return i.splice(s==-1?i.length:s,0,e,n),new Fe(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Fe.from(t),t.size?new Fe(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Fe.from(t),t.size?new Fe(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Fe.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}},Fe.from=function(t){if(t instanceof Fe)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Fe(e)};function _d(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),s=e.child(r);if(i==s){n+=i.nodeSize;continue}if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)n++;return n}if(i.content.size||s.content.size){let o=_d(i.content,s.content,n+1);if(o!=null)return o}n+=i.nodeSize}}function Nd(t,e,n,r){for(let i=t.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:n,b:r};let o=t.child(--i),a=e.child(--s),l=o.nodeSize;if(o==a){n-=l,r-=l;continue}if(!o.sameMarkup(a))return{a:n,b:r};if(o.isText&&o.text!=a.text){let c=0,u=Math.min(o.text.length,a.text.length);for(;c<u&&o.text[o.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(o.content.size||a.content.size){let c=Nd(o.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}}class N{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,s){for(let o=0,a=0;a<n;o++){let l=this.content[o],c=a+l.nodeSize;if(c>e&&r(l,i+a,s||null,o)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,n-u),r,i+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let s="",o=!0;return this.nodesBetween(e,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(o?o=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);return new N(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let s=0,o=0;o<n;s++){let a=this.content[s],l=o+a.nodeSize;l>e&&((o<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-o),Math.min(a.text.length,n-o)):a=a.cut(Math.max(0,e-o-1),Math.min(a.content.size,n-o-1))),r.push(a),i+=a.nodeSize),o=l}return new N(r,i)}cutByIndex(e,n){return e==n?N.empty:e==0&&n==this.content.length?this:new N(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new N(i,s)}addToStart(e){return new N([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new N(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return _d(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return Nd(this,e,n,r)}findIndex(e,n=-1){if(e==0)return Vs(0,e);if(e==this.size)return Vs(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,i=0;;r++){let s=this.child(r),o=i+s.nodeSize;if(o>=e)return o==e||n>0?Vs(r+1,o):Vs(r,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return N.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new N(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return N.empty;let n,r=0;for(let i=0;i<e.length;i++){let s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(n||(n=e.slice(0,i)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new N(n||e,r)}static from(e){if(!e)return N.empty;if(e instanceof N)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new N([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}N.empty=new N([],0);const pa={index:0,offset:0};function Vs(t,e){return pa.index=t,pa.offset=e,pa}function Bs(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Bs(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Bs(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let me=class yc{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))n||(n=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Bs(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);return r.create(n.attrs)}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return yc.none;if(e instanceof yc)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};me.none=[];class Ps extends Error{}class I{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=Ad(this.content,e+this.openStart,n);return r&&new I(r,this.openStart,this.openEnd)}removeBetween(e,n){return new I(Dd(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return I.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new I(N.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)i++;return new I(e,r,i)}}I.empty=new I(N.empty,0,0);function Dd(t,e,n){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r),{index:o,offset:a}=t.findIndex(n);if(i==e||s.isText){if(a!=n&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(Dd(s.content,e-i-1,n-i-1)))}function Ad(t,e,n,r){let{index:i,offset:s}=t.findIndex(e),o=t.maybeChild(i);if(s==e||o.isText)return t.cut(0,e).append(n).append(t.cut(e));let a=Ad(o.content,e-s-1,n);return a&&t.replaceChild(i,o.copy(a))}function Xb(t,e,n){if(n.openStart>t.depth)throw new Ps("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Ps("Inconsistent open depths");return Vd(t,e,n,0)}function Vd(t,e,n,r){let i=t.index(r),s=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let o=Vd(t,e,n,r+1);return s.copy(s.content.replaceChild(i,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let o=t.parent,a=o.content;return ir(o,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:o,end:a}=Qb(n,t);return ir(s,Pd(t,o,a,e,r))}else return ir(s,Is(t,e,r))}function Bd(t,e){if(!e.type.compatibleContent(t.type))throw new Ps("Cannot join "+e.type.name+" onto "+t.type.name)}function ma(t,e,n){let r=t.node(n);return Bd(r,e.node(n)),r}function rr(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Ei(t,e,n,r){let i=(e||t).node(n),s=0,o=e?e.index(n):i.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&(rr(t.nodeAfter,r),s++));for(let a=s;a<o;a++)rr(i.child(a),r);e&&e.depth==n&&e.textOffset&&rr(e.nodeBefore,r)}function ir(t,e){return t.type.checkContent(e),t.copy(e)}function Pd(t,e,n,r,i){let s=t.depth>i&&ma(t,e,i+1),o=r.depth>i&&ma(n,r,i+1),a=[];return Ei(null,t,i,a),s&&o&&e.index(i)==n.index(i)?(Bd(s,o),rr(ir(s,Pd(t,e,n,r,i+1)),a)):(s&&rr(ir(s,Is(t,e,i+1)),a),Ei(e,n,i,a),o&&rr(ir(o,Is(n,r,i+1)),a)),Ei(r,null,i,a),new N(a)}function Is(t,e,n){let r=[];if(Ei(null,t,n,r),t.depth>n){let i=ma(t,e,n+1);rr(ir(i,Is(t,e,n+1)),r)}return Ei(e,null,n,r),new N(r)}function Qb(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let s=n-1;s>=0;s--)i=e.node(s).copy(N.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class _i{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let s=0;s<e;s++)i+=r.child(s).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return me.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let a=r;r=i,i=a}let s=r.marks;for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!i||!s[o].isInSet(i.marks))&&(s=s[o--].removeFromSet(s));return s}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new Rs(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,s=n;for(let o=e;;){let{index:a,offset:l}=o.content.findIndex(s),c=s-l;if(r.push(o,a,i+l),!c||(o=o.child(a),o.isText))break;s=c-1,i+=l+1}return new _i(n,r,s)}static resolveCached(e,n){for(let i=0;i<ga.length;i++){let s=ga[i];if(s.pos==n&&s.doc==e)return s}let r=ga[ya]=_i.resolve(e,n);return ya=(ya+1)%e1,r}}let ga=[],ya=0,e1=12;class Rs{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const t1=Object.create(null);let sr=class bc{constructor(e,n,r,i=me.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||N.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Bs(this.attrs,n||e.defaultAttrs||t1)&&me.sameSet(this.marks,r||me.none)}copy(e=null){return e==this.content?this:new bc(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new bc(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return I.empty;let i=this.resolve(e),s=this.resolve(n),o=r?0:i.sharedDepth(n),a=i.start(o),c=i.node(o).content.cut(i.pos-a,s.pos-a);return new I(c,i.depth-o,s.depth-o)}replace(e,n,r){return Xb(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return _i.resolveCached(this,e)}resolveNoCache(e){return _i.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Id(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=N.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),a=o&&o.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=i;l<s;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(e).matchType(r),o=s&&s.matchFragment(this.content,n);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content);let e=me.none;for(let n=0;n<this.marks.length;n++)e=this.marks[n].addToSet(e);if(!me.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=N.fromJSON(e,n.content);return e.nodeType(n.type).create(n.attrs,i,r)}};sr.prototype.text=void 0;class $s extends sr{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Id(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new $s(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new $s(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Id(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class or{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new n1(e,n);if(r.next==null)return or.empty;let i=Rd(r);r.next&&r.err("Unexpected trailing text");let s=c1(l1(i));return d1(s,r),s}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let s=n;i&&s<r;s++)i=i.matchType(e.child(s).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function s(o,a){let l=o.matchFragment(e,r);if(l&&(!n||l.validEnd))return N.from(a.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:f}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let h=s(f,a.concat(u));if(h)return h}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(e)){let o=[];for(let a=i;a.type;a=a.via)o.push(a.type);return o.reverse()}for(let o=0;o<s.next.length;o++){let{type:a,next:l}=s.next[o];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!i.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)s+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return s}).join(`
6
6
  `)}}or.empty=new or(!0);class n1{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Rd(t){let e=[];do e.push(r1(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function r1(t){let e=[];do e.push(i1(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function i1(t){let e=a1(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=s1(t,e);else break;return e}function $d(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function s1(t,e){let n=$d(t),r=n;return t.eat(",")&&(t.next!="}"?r=$d(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function o1(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let s in n){let o=n[s];o.groups.indexOf(e)>-1&&i.push(o)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function a1(t){if(t.eat("(")){let e=Rd(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=o1(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function l1(t){let e=[[]];return i(s(t,0),n()),e;function n(){return e.push([])-1}function r(o,a,l){let c={term:l,to:a};return e[o].push(c),c}function i(o,a){o.forEach(l=>l.to=a)}function s(o,a){if(o.type=="choice")return o.exprs.reduce((l,c)=>l.concat(s(c,a)),[]);if(o.type=="seq")for(let l=0;;l++){let c=s(o.exprs[l],a);if(l==o.exprs.length-1)return c;i(c,a=n())}else if(o.type=="star"){let l=n();return r(a,l),i(s(o.expr,l),l),[r(l)]}else if(o.type=="plus"){let l=n();return i(s(o.expr,a),l),i(s(o.expr,l),l),[r(l)]}else{if(o.type=="opt")return[r(a)].concat(s(o.expr,a));if(o.type=="range"){let l=a;for(let c=0;c<o.min;c++){let u=n();i(s(o.expr,l),u),l=u}if(o.max==-1)i(s(o.expr,l),l);else for(let c=o.min;c<o.max;c++){let u=n();r(l,u),i(s(o.expr,l),u),l=u}return[r(l)]}else{if(o.type=="name")return[r(a,void 0,o.value)];throw new Error("Unknown expr type")}}}}function Ld(t,e){return e-t}function Fd(t,e){let n=[];return r(e),n.sort(Ld);function r(i){let s=t[i];if(s.length==1&&!s[0].term)return r(s[0].to);n.push(i);for(let o=0;o<s.length;o++){let{term:a,to:l}=s[o];!a&&n.indexOf(l)==-1&&r(l)}}}function c1(t){let e=Object.create(null);return n(Fd(t,0));function n(r){let i=[];r.forEach(o=>{t[o].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u<i.length;u++)i[u][0]==a&&(c=i[u][1]);Fd(t,l).forEach(u=>{c||i.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let s=e[r.join(",")]=new or(r.indexOf(t.length-1)>-1);for(let o=0;o<i.length;o++){let a=i[o][1].sort(Ld);s.next.push({type:i[o][0],next:e[a.join(",")]||n(a)})}return s}}function d1(t,e){for(let n=0,r=[t];n<r.length;n++){let i=r[n],s=!i.validEnd,o=[];for(let a=0;a<i.next.length;a++){let{type:l,next:c}=i.next[a];o.push(l.name),s&&!(l.isText||l.hasRequiredAttrs())&&(s=!1),r.indexOf(c)==-1&&r.push(c)}s&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function zd(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function jd(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let s=t[r];if(s.hasDefault)i=s.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function Wd(t){let e=Object.create(null);if(t)for(let n in t)e[n]=new u1(t[n]);return e}let Hd=class rm{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Wd(r.attrs),this.defaultAttrs=zd(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==or.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:jd(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new sr(this,this.computeAttrs(e),N.from(n),me.setFrom(r))}createChecked(e=null,n,r){return n=N.from(n),this.checkContent(n),new sr(this,this.computeAttrs(e),n,me.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=N.from(n),n.size){let o=this.contentMatch.fillBefore(n);if(!o)return null;n=o.append(n)}let i=this.contentMatch.matchFragment(n),s=i&&i.fillBefore(N.empty,!0);return s?new sr(this,e,n.append(s),me.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:me.none:e}static compile(e,n){let r=Object.create(null);e.forEach((s,o)=>r[s]=new rm(s,n,o));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class u1{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class Ls{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=Wd(i.attrs),this.excluded=null;let s=zd(this.attrs);this.instance=s?new me(this,s):null}create(e=null){return!e&&this.instance?this.instance:new me(this,jd(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((s,o)=>r[s]=new Ls(s,i++,n,o)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}excludes(e){return this.excluded.indexOf(e)>-1}}class f1{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in e)n[i]=e[i];n.nodes=Fe.from(e.nodes),n.marks=Fe.from(e.marks||{}),this.nodes=Hd.compile(this.spec.nodes,this),this.marks=Ls.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",a=s.spec.marks;if(s.contentMatch=r[o]||(r[o]=or.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=a=="_"?null:a?Yd(this,a.split(" ")):a==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:Yd(this,o.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Hd){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,i)}text(e,n){let r=this.nodes.text;return new $s(r,r.defaultAttrs,e,me.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return sr.fromJSON(this,e)}markFromJSON(e){return me.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function Yd(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],s=t.marks[i],o=s;if(s)n.push(s);else for(let a in t.marks){let l=t.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function h1(t){return t.tag!=null}function p1(t){return t.style!=null}class Vr{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[],n.forEach(r=>{h1(r)?this.tags.push(r):p1(r)&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let i=e.nodes[r.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let r=new Jd(this,n,!1);return r.addAll(e,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new Jd(this,n,!0);return r.addAll(e,n.from,n.to),I.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let s=this.tags[i];if(y1(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||n.matchesContext(s.context))){if(s.getAttrs){let o=s.getAttrs(e);if(o===!1)continue;s.attrs=o||void 0}return s}}}matchStyle(e,n,r,i){for(let s=i?this.styles.indexOf(i)+1:0;s<this.styles.length;s++){let o=this.styles[s],a=o.style;if(!(a.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(o.getAttrs){let l=o.getAttrs(n);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(e){let n=[];function r(i){let s=i.priority==null?50:i.priority,o=0;for(;o<n.length;o++){let a=n[o];if((a.priority==null?50:a.priority)<s)break}n.splice(o,0,i)}for(let i in e.marks){let s=e.marks[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Gd(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Gd(o)),o.node||o.ignore||o.mark||(o.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Vr(e,Vr.schemaRules(e)))}}const Ud={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},m1={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},qd={ol:!0,ul:!0},Fs=1,zs=2,Ni=4;function Kd(t,e,n){return e!=null?(e?Fs:0)|(e==="full"?zs:0):t&&t.whitespace=="pre"?Fs|zs:n&~Ni}class js{constructor(e,n,r,i,s,o,a){this.type=e,this.attrs=n,this.marks=r,this.pendingMarks=i,this.solid=s,this.options=a,this.content=[],this.activeMarks=me.none,this.stashMarks=[],this.match=o||(a&Ni?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(N.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Fs)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let n=N.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(N.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}popFromStashMark(e){for(let n=this.stashMarks.length-1;n>=0;n--)if(e.eq(this.stashMarks[n]))return this.stashMarks.splice(n,1)[0]}applyPending(e){for(let n=0,r=this.pendingMarks;n<r.length;n++){let i=r[n];(this.type?this.type.allowsMarkType(i.type):b1(i.type,e))&&!i.isInSet(this.activeMarks)&&(this.activeMarks=i.addToSet(this.activeMarks),this.pendingMarks=i.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Ud.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Jd{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0;let i=n.topNode,s,o=Kd(null,n.preserveWhitespace,0)|(r?Ni:0);i?s=new js(i.type,i.attrs,me.none,me.none,!0,n.topMatch||i.type.contentMatch,o):r?s=new js(null,null,me.none,me.none,!0,null,o):s=new js(e.schema.topNodeType,null,me.none,me.none,!0,null,o),this.nodes=[s],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){e.nodeType==3?this.addTextNode(e):e.nodeType==1&&this.addElement(e)}withStyleRules(e,n){let r=e.style;if(!r||!r.length)return n();let i=this.readStyles(e.style);if(!i)return;let[s,o]=i,a=this.top;for(let l=0;l<o.length;l++)this.removePendingMark(o[l],a);for(let l=0;l<s.length;l++)this.addPendingMark(s[l]);n();for(let l=0;l<s.length;l++)this.removePendingMark(s[l],a);for(let l=0;l<o.length;l++)this.addPendingMark(o[l])}addTextNode(e){let n=e.nodeValue,r=this.top;if(r.options&zs||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(r.options&Fs)r.options&zs?n=n.replace(/\r\n?/g,`
7
7
  `):n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let i=r.content[r.content.length-1],s=e.previousSibling;(!i||s&&s.nodeName=="BR"||i.isText&&/[ \t\r\n\u000c]$/.test(i.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n)),this.findInText(e)}else this.findInside(e)}addElement(e,n){let r=e.nodeName.toLowerCase(),i;qd.hasOwnProperty(r)&&this.parser.normalizeLists&&g1(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(i=this.parser.matchTag(e,this,n));if(s?s.ignore:m1.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let o,a=this.top,l=this.needsBlock;if(Ud.hasOwnProperty(r))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),o=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e);return}s&&s.skip?this.addAll(e):this.withStyleRules(e,()=>this.addAll(e)),o&&this.sync(a),this.needsBlock=l}else this.withStyleRules(e,()=>{this.addElementByRule(e,s,s.consuming===!1?i:void 0)})}leafFallback(e){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
8
8
  `))}ignoreFallback(e){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(e){let n=me.none,r=me.none;for(let i=0,s=e.length;i<s;i++){let o=e.item(i);for(let a=void 0;;){let l=this.parser.matchStyle(o,e.getPropertyValue(o),this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach(c=>{l.clearMark(c)&&(r=c.addToSet(r))}):n=this.parser.schema.marks[l.mark].create(l.attrs).addToSet(n),l.consuming===!1)a=l;else break}}return[n,r]}addElementByRule(e,n,r){let i,s,o;n.node?(s=this.parser.schema.nodes[n.node],s.isLeaf?this.insertNode(s.create(n.attrs))||this.leafFallback(e):i=this.enter(s,n.attrs||null,n.preserveWhitespace)):(o=this.parser.schema.marks[n.mark].create(n.attrs),this.addPendingMark(o));let a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(r)this.addElement(e,r);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l)}i&&this.sync(a)&&this.open--,o&&this.removePendingMark(o,a)}addAll(e,n,r){let i=n||0;for(let s=n?e.childNodes[n]:e.firstChild,o=r==null?null:e.childNodes[r];s!=o;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s);this.findAtPoint(e,i)}findPlace(e){let n,r;for(let i=this.open;i>=0;i--){let s=this.nodes[i],o=s.findWrapping(e);if(o&&(!n||n.length>o.length)&&(n=o,r=s,!o.length)||s.solid)break}if(!n)return!1;this.sync(r);for(let i=0;i<n.length;i++)this.enterInner(n[i],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let n=this.textblockFromContext();n&&this.enterInner(n)}if(this.findPlace(e)){this.closeExtra();let n=this.top;n.applyPending(e.type),n.match&&(n.match=n.match.matchType(e.type));let r=n.activeMarks;for(let i=0;i<e.marks.length;i++)(!n.type||n.type.allowsMarkType(e.marks[i].type))&&(r=e.marks[i].addToSet(r));return n.content.push(e.mark(r)),!0}return!1}enter(e,n,r){let i=this.findPlace(e.create(n));return i&&this.enterInner(e,n,!0,r),i}enterInner(e,n=null,r=!1,i){this.closeExtra();let s=this.top;s.applyPending(e),s.match=s.match&&s.match.matchType(e);let o=Kd(e,i,s.options);s.options&Ni&&s.content.length==0&&(o|=Ni),this.nodes.push(new js(e,n,s.activeMarks,s.pendingMarks,r,null,o)),this.open++}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let n=this.open;n>=0;n--)if(this.nodes[n]==e)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),o=(a,l)=>{for(;a>=0;a--){let c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=s;l--)if(o(a-1,l))return!0;return!1}else{let u=l>0||l==0&&i?this.nodes[l].type:r&&l>=s?r.node(l-s).type:null;if(!u||u.name!=c&&u.groups.indexOf(c)==-1)return!1;l--}}return!0};return o(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(e){let n=v1(e,this.top.pendingMarks);n&&this.top.stashMarks.push(n),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,n){for(let r=this.open;r>=0;r--){let i=this.nodes[r];if(i.pendingMarks.lastIndexOf(e)>-1)i.pendingMarks=e.removeFromSet(i.pendingMarks);else{i.activeMarks=e.removeFromSet(i.activeMarks);let o=i.popFromStashMark(e);o&&i.type&&i.type.allowsMarkType(o.type)&&(i.activeMarks=o.addToSet(i.activeMarks))}if(i==n)break}}}function g1(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&qd.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function y1(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Gd(t){let e={};for(let n in t)e[n]=t[n];return e}function b1(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let s=[],o=a=>{s.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==e||s.indexOf(u)<0&&o(u))return!0}};if(o(i.contentMatch))return!0}}function v1(t,e){for(let n=0;n<e.length;n++)if(t.eq(e[n]))return e[n]}class Ut{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=ba(n).createDocumentFragment());let i=r,s=[];return e.forEach(o=>{if(s.length||o.marks.length){let a=0,l=0;for(;a<s.length&&l<o.marks.length;){let c=o.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(s[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<s.length;)i=s.pop()[1];for(;l<o.marks.length;){let c=o.marks[l++],u=this.serializeMark(c,o.isInline,n);u&&(s.push([c,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(o,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:i}=Ut.renderSpec(ba(n),this.nodes[e.type.name](e));if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,n);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&Ut.renderSpec(ba(r),i(e,n))}static renderSpec(e,n,r=null){if(typeof n=="string")return{dom:e.createTextNode(n)};if(n.nodeType!=null)return{dom:n};if(n.dom&&n.dom.nodeType!=null)return n;let i=n[0],s=i.indexOf(" ");s>0&&(r=i.slice(0,s),i=i.slice(s+1));let o,a=r?e.createElementNS(r,i):e.createElement(i),l=n[1],c=1;if(l&&typeof l=="object"&&l.nodeType==null&&!Array.isArray(l)){c=2;for(let u in l)if(l[u]!=null){let f=u.indexOf(" ");f>0?a.setAttributeNS(u.slice(0,f),u.slice(f+1),l[u]):a.setAttribute(u,l[u])}}for(let u=c;u<n.length;u++){let f=n[u];if(f===0){if(u<n.length-1||u>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:h,contentDOM:p}=Ut.renderSpec(e,f,r);if(a.appendChild(h),p){if(o)throw new RangeError("Multiple content holes");o=p}}}return{dom:a,contentDOM:o}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Ut(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=Zd(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return Zd(e.marks)}}function Zd(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function ba(t){return t.document||window.document}const Xd=65535,Qd=Math.pow(2,16);function k1(t,e){return t+e*Qd}function eu(t){return t&Xd}function w1(t){return(t-(t&Xd))/Qd}const tu=1,nu=2,Ws=4,ru=8;class va{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&ru)>0}get deletedBefore(){return(this.delInfo&(tu|Ws))>0}get deletedAfter(){return(this.delInfo&(nu|Ws))>0}get deletedAcross(){return(this.delInfo&Ws)>0}}class ft{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&ft.empty)return ft.empty}recover(e){let n=0,r=eu(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+w1(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,s=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let c=this.ranges[a+s],u=this.ranges[a+o],f=l+c;if(e<=f){let h=c?e==l?-1:e==f?1:n:n,p=l+i+(h<0?0:u);if(r)return p;let m=e==(n<0?l:f)?null:k1(a/3,e-l),y=e==l?nu:e==f?tu:Ws;return(n<0?e!=l:e!=f)&&(y|=ru),new va(p,y,m)}i+=u-c}return r?e+i:new va(e+i,0,null)}touches(e,n){let r=0,i=eu(n),s=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[a+s],u=l+c;if(e<=u&&a==i*3)return!0;r+=this.ranges[a+o]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i<this.ranges.length;i+=3){let o=this.ranges[i],a=o-(this.inverted?s:0),l=o+(this.inverted?0:s),c=this.ranges[i+n],u=this.ranges[i+r];e(a,a+c,l,l+u),s+=u-c}}invert(){return new ft(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?ft.empty:new ft(e<0?[0,-e,0]:[0,0,e])}}ft.empty=new ft([]);class Br{constructor(e=[],n,r=0,i=e.length){this.maps=e,this.mirror=n,this.from=r,this.to=i}slice(e=0,n=this.maps.length){return new Br(this.maps,this.mirror,e,n)}copy(){return new Br(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,n){this.to=this.maps.push(e),n!=null&&this.setMirror(this.maps.length-1,n)}appendMapping(e){for(let n=0,r=this.maps.length;n<e.maps.length;n++){let i=e.getMirror(n);this.appendMap(e.maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this.maps.length+e.maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e.maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new Br;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this.maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let s=this.from;s<this.to;s++){let o=this.maps[s],a=o.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(s);if(l!=null&&l>s&&l<this.to){s=l,e=this.maps[l].recover(a.recover);continue}}i|=a.delInfo,e=a.pos}return r?e:new va(e,i,null)}}const ka=Object.create(null);class We{getMap(){return ft.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=ka[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in ka)throw new RangeError("Duplicate use of step JSON ID "+e);return ka[e]=n,n.prototype.jsonID=e,n}}class Te{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Te(e,null)}static fail(e){return new Te(null,e)}static fromReplace(e,n,r,i){try{return Te.ok(e.replace(n,r,i))}catch(s){if(s instanceof Ps)return Te.fail(s.message);throw s}}}function wa(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let s=t.child(i);s.content.size&&(s=s.copy(wa(s.content,e,s))),s.isInline&&(s=e(s,n,i)),r.push(s)}return N.fromArray(r)}class Vn extends We{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),s=new I(wa(n.content,(o,a)=>!o.isAtom||!a.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),n.openStart,n.openEnd);return Te.fromReplace(e,this.from,this.to,s)}invert(){return new qt(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Vn(n.pos,r.pos,this.mark)}merge(e){return e instanceof Vn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Vn(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Vn(n.from,n.to,e.markFromJSON(n.mark))}}We.jsonID("addMark",Vn);class qt extends We{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new I(wa(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return Te.fromReplace(e,this.from,this.to,r)}invert(){return new Vn(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new qt(n.pos,r.pos,this.mark)}merge(e){return e instanceof qt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new qt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new qt(n.from,n.to,e.markFromJSON(n.mark))}}We.jsonID("removeMark",qt);class Bn extends We{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Te.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Te.fromReplace(e,this.pos,this.pos+1,new I(N.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new Bn(this.pos,n.marks[i]);return new Bn(this.pos,this.mark)}}return new Pr(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Bn(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Bn(n.pos,e.markFromJSON(n.mark))}}We.jsonID("addNodeMark",Bn);class Pr extends We{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Te.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Te.fromReplace(e,this.pos,this.pos+1,new I(N.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Bn(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Pr(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Pr(n.pos,e.markFromJSON(n.mark))}}We.jsonID("removeNodeMark",Pr);class Ve extends We{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&xa(e,this.from,this.to)?Te.fail("Structure replace would overwrite content"):Te.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new ft([this.from,this.to-this.from,this.slice.size])}invert(e){return new Ve(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new Ve(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(e){if(!(e instanceof Ve)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?I.empty:new I(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Ve(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?I.empty:new I(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Ve(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Ve(n.from,n.to,I.fromJSON(e,n.slice),!!n.structure)}}We.jsonID("replace",Ve);class Be extends We{constructor(e,n,r,i,s,o,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=s,this.insert=o,this.structure=a}apply(e){if(this.structure&&(xa(e,this.from,this.gapFrom)||xa(e,this.gapTo,this.to)))return Te.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Te.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Te.fromReplace(e,this.from,this.to,r):Te.fail("Content does not fit in gap")}getMap(){return new ft([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new Be(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),s=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||s>r.pos?null:new Be(n.pos,r.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Be(n.from,n.to,n.gapFrom,n.gapTo,I.fromJSON(e,n.slice),n.insert,!!n.structure)}}We.jsonID("replaceAround",Be);function xa(t,e,n){let r=t.resolve(e),i=n-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let o=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function x1(t,e,n,r){let i=[],s=[],o,a;t.doc.nodesBetween(e,n,(l,c,u)=>{if(!l.isInline)return;let f=l.marks;if(!r.isInSet(f)&&u.type.allowsMarkType(r.type)){let h=Math.max(c,e),p=Math.min(c+l.nodeSize,n),m=r.addToSet(f);for(let y=0;y<f.length;y++)f[y].isInSet(m)||(o&&o.to==h&&o.mark.eq(f[y])?o.to=p:i.push(o=new qt(h,p,f[y])));a&&a.to==h?a.to=p:s.push(a=new Vn(h,p,r))}}),i.forEach(l=>t.step(l)),s.forEach(l=>t.step(l))}function S1(t,e,n,r){let i=[],s=0;t.doc.nodesBetween(e,n,(o,a)=>{if(!o.isInline)return;s++;let l=null;if(r instanceof Ls){let c=o.marks,u;for(;u=r.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(l=[r]):l=o.marks;if(l&&l.length){let c=Math.min(a+o.nodeSize,n);for(let u=0;u<l.length;u++){let f=l[u],h;for(let p=0;p<i.length;p++){let m=i[p];m.step==s-1&&f.eq(i[p].style)&&(h=m)}h?(h.to=c,h.step=s):i.push({style:f,from:Math.max(a,e),to:c,step:s})}}}),i.forEach(o=>t.step(new qt(o.from,o.to,o.style)))}function iu(t,e,n,r=n.contentMatch,i=!0){let s=t.doc.nodeAt(e),o=[],a=e+1;for(let l=0;l<s.childCount;l++){let c=s.child(l),u=a+c.nodeSize,f=r.matchType(c.type);if(!f)o.push(new Ve(a,u,I.empty));else{r=f;for(let h=0;h<c.marks.length;h++)n.allowsMarkType(c.marks[h].type)||t.step(new qt(a,u,c.marks[h]));if(i&&c.isText&&n.whitespace!="pre"){let h,p=/\r?\n|\r/g,m;for(;h=p.exec(c.text);)m||(m=new I(N.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),o.push(new Ve(a+h.index,a+h.index+h[0].length,m))}}a=u}if(!r.validEnd){let l=r.fillBefore(N.empty,!0);t.replace(a,a,new I(l,0,0))}for(let l=o.length-1;l>=0;l--)t.step(o[l])}function M1(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Ir(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth;;--r){let i=t.$from.node(r),s=t.$from.index(r),o=t.$to.indexAfter(r);if(r<t.depth&&i.canReplace(s,o,n))return r;if(r==0||i.type.spec.isolating||!M1(i,s,o))break}return null}function O1(t,e,n){let{$from:r,$to:i,depth:s}=e,o=r.before(s+1),a=i.after(s+1),l=o,c=a,u=N.empty,f=0;for(let m=s,y=!1;m>n;m--)y||r.index(m)>0?(y=!0,u=N.from(r.node(m).copy(u)),f++):l--;let h=N.empty,p=0;for(let m=s,y=!1;m>n;m--)y||i.after(m+1)<i.end(m)?(y=!0,h=N.from(i.node(m).copy(h)),p++):c++;t.step(new Be(l,c,o,a,new I(u.append(h),f,p),u.size-f,!0))}function Sa(t,e,n=null,r=t){let i=C1(t,e),s=i&&T1(r,e);return s?i.map(su).concat({type:e,attrs:n}).concat(s.map(su)):null}function su(t){return{type:t,attrs:null}}function C1(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.contentMatchAt(r).findWrapping(e);if(!s)return null;let o=s.length?s[0]:e;return n.canReplaceWith(r,i,o)?s:null}function T1(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.child(r),o=e.contentMatch.findWrapping(s.type);if(!o)return null;let l=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;l&&c<i;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:o}function E1(t,e,n){let r=N.empty;for(let o=n.length-1;o>=0;o--){if(r.size){let a=n[o].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=N.from(n[o].type.create(n[o].attrs,r))}let i=e.start,s=e.end;t.step(new Be(i,s,i,s,new I(r,0,0),n.length,!0))}function _1(t,e,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,n,(o,a)=>{if(o.isTextblock&&!o.hasMarkup(r,i)&&A1(t.doc,t.mapping.slice(s).map(a),r)){let l=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?l=!1:!h&&p&&(l=!0)}l===!1&&D1(t,o,a,s),iu(t,t.mapping.slice(s).map(a,1),r,void 0,l===null);let c=t.mapping.slice(s),u=c.map(a,1),f=c.map(a+o.nodeSize,1);return t.step(new Be(u,f,u+1,f-1,new I(N.from(r.create(i,null,o.marks)),0,0),1,!0)),l===!0&&N1(t,o,a,s),!1}})}function N1(t,e,n,r){e.forEach((i,s)=>{if(i.isText){let o,a=/\r?\n|\r/g;for(;o=a.exec(i.text);){let l=t.mapping.slice(r).map(n+1+s+o.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function D1(t,e,n,r){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=t.mapping.slice(r).map(n+1+s);t.replaceWith(o,o+1,e.type.schema.text(`
@@ -113,7 +113,7 @@ img.ProseMirror-separator {
113
113
  `,"2) content: () => element.cloneNode(true)"].join(" "))}var a=i.reduce(function(l,c){var u=c&&bM(c,r);return u&&l.push(u),l},[]);return ts(t)?a[0]:a}ri.defaultProps=gt,ri.setDefaultProps=pM,ri.currentInput=en,Object.assign({},ah,{effect:function(e){var n=e.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}}),ri.setDefaultProps({render:Wh});class vM{constructor({editor:e,element:n,view:r,tippyOptions:i={},updateDelay:s=250,shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:a,state:l,from:c,to:u})=>{const{doc:f,selection:h}=l,{empty:p}=h,m=!f.textBetween(c,u).length&&cl(l.selection),y=this.element.contains(document.activeElement);return!(!(a.hasFocus()||y)||p||m||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:a})=>{var l;if(this.preventHide){this.preventHide=!1;return}a!=null&&a.relatedTarget&&(!((l=this.element.parentNode)===null||l===void 0)&&l.contains(a.relatedTarget))||this.hide()},this.tippyBlurHandler=a=>{this.blurHandler({event:a})},this.handleDebouncedUpdate=(a,l)=>{const c=!(l!=null&&l.selection.eq(a.state.selection)),u=!(l!=null&&l.doc.eq(a.state.doc));!c&&!u||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(a,c,u,l)},this.updateDelay))},this.updateHandler=(a,l,c,u)=>{var f,h,p;const{state:m,composing:y}=a,{selection:g}=m;if(y||!l&&!c)return;this.createTooltip();const{ranges:x}=g,O=Math.min(...x.map(v=>v.$from.pos)),b=Math.max(...x.map(v=>v.$to.pos));if(!((f=this.shouldShow)===null||f===void 0?void 0:f.call(this,{editor:this.editor,view:a,state:m,oldState:u,from:O,to:b}))){this.hide();return}(h=this.tippy)===null||h===void 0||h.setProps({getReferenceClientRect:((p=this.tippyOptions)===null||p===void 0?void 0:p.getReferenceClientRect)||(()=>{if(kx(m.selection)){let v=a.nodeDOM(O);const T=v.dataset.nodeViewWrapper?v:v.querySelector("[data-node-view-wrapper]");if(T&&(v=T.firstChild),v)return v.getBoundingClientRect()}return nh(a,O,b)})}),this.show()},this.editor=e,this.element=n,this.view=r,this.updateDelay=s,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,n=!!e.parentElement;this.tippy||!n||(this.tippy=ri(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,n){const{state:r}=e,i=r.selection.$from.pos!==r.selection.$to.pos;if(this.updateDelay>0&&i){this.handleDebouncedUpdate(e,n);return}const s=!(n!=null&&n.selection.eq(e.state.selection)),o=!(n!=null&&n.doc.eq(e.state.doc));this.updateHandler(e,s,o,n)}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,n;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(n=this.tippy)===null||n===void 0||n.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const Hh=t=>new Ke({key:typeof t.pluginKey=="string"?new Pt(t.pluginKey):t.pluginKey,view:e=>new vM({view:e,...t})});Ye.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Hh({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class kM{constructor({editor:e,element:n,view:r,tippyOptions:i={},shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:o,state:a})=>{const{selection:l}=a,{$anchor:c,empty:u}=l,f=c.depth===1,h=c.parent.isTextblock&&!c.parent.type.spec.code&&!c.parent.textContent;return!(!o.hasFocus()||!u||!f||!h||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:o})=>{var a;if(this.preventHide){this.preventHide=!1;return}o!=null&&o.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(o.relatedTarget))||this.hide()},this.tippyBlurHandler=o=>{this.blurHandler({event:o})},this.editor=e,this.element=n,this.view=r,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,n=!!e.parentElement;this.tippy||!n||(this.tippy=ri(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,n){var r,i,s;const{state:o}=e,{doc:a,selection:l}=o,{from:c,to:u}=l;if(n&&n.doc.eq(a)&&n.selection.eq(l))return;if(this.createTooltip(),!((r=this.shouldShow)===null||r===void 0?void 0:r.call(this,{editor:this.editor,view:e,state:o,oldState:n}))){this.hide();return}(i=this.tippy)===null||i===void 0||i.setProps({getReferenceClientRect:((s=this.tippyOptions)===null||s===void 0?void 0:s.getReferenceClientRect)||(()=>nh(e,c,u))}),this.show()}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,n;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(n=this.tippy)===null||n===void 0||n.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const Yh=t=>new Ke({key:typeof t.pluginKey=="string"?new Pt(t.pluginKey):t.pluginKey,view:e=>new kM({view:e,...t})});Ye.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Yh({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}}),d.defineComponent({name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(t,{slots:e}){const n=d.ref(null);return d.onMounted(()=>{const{updateDelay:r,editor:i,pluginKey:s,shouldShow:o,tippyOptions:a}=t;i.registerPlugin(Hh({updateDelay:r,editor:i,element:n.value,pluginKey:s,shouldShow:o,tippyOptions:a}))}),d.onBeforeUnmount(()=>{const{pluginKey:r,editor:i}=t;i.unregisterPlugin(r)}),()=>{var r;return d.h("div",{ref:n},(r=e.default)===null||r===void 0?void 0:r.call(e))}}});function Uh(t){return d.customRef((e,n)=>({get(){return e(),t},set(r){t=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{n()})})}}))}class wM extends $x{constructor(e={}){return super(e),this.vueRenderers=d.reactive(new Map),this.contentComponent=null,this.reactiveState=Uh(this.view.state),this.reactiveExtensionStorage=Uh(this.extensionStorage),this.on("transaction",()=>{this.reactiveState.value=this.view.state,this.reactiveExtensionStorage.value=this.extensionStorage}),d.markRaw(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,n){super.registerPlugin(e,n),this.reactiveState.value=this.view.state}unregisterPlugin(e){super.unregisterPlugin(e),this.reactiveState.value=this.view.state}}const xM=d.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(t){const e=d.ref(),n=d.getCurrentInstance();return d.watchEffect(()=>{const r=t.editor;r&&r.options.element&&e.value&&d.nextTick(()=>{if(!e.value||!r.options.element.firstChild)return;const i=d.unref(e.value);e.value.append(...r.options.element.childNodes),r.contentComponent=n.ctx._,r.setOptions({element:i}),r.createNodeViews()})}),d.onBeforeUnmount(()=>{const r=t.editor;if(!r||(r.isDestroyed||r.view.setProps({nodeViews:{}}),r.contentComponent=null,!r.options.element.firstChild))return;const i=document.createElement("div");i.append(...r.options.element.childNodes),r.setOptions({element:i})}),{rootEl:e}},render(){const t=[];return this.editor&&this.editor.vueRenderers.forEach(e=>{const n=d.h(d.Teleport,{to:e.teleportElement,key:e.id},d.h(e.component,{ref:e.id,...e.props}));t.push(n)}),d.h("div",{ref:e=>{this.rootEl=e}},...t)}});d.defineComponent({name:"FloatingMenu",props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(t,{slots:e}){const n=d.ref(null);return d.onMounted(()=>{const{pluginKey:r,editor:i,tippyOptions:s,shouldShow:o}=t;i.registerPlugin(Yh({pluginKey:r,editor:i,element:n.value,tippyOptions:s,shouldShow:o}))}),d.onBeforeUnmount(()=>{const{pluginKey:r,editor:i}=t;i.unregisterPlugin(r)}),()=>{var r;return d.h("div",{ref:n},(r=e.default)===null||r===void 0?void 0:r.call(e))}}}),d.defineComponent({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return d.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}}),d.defineComponent({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var t,e;return d.h(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(e=(t=this.$slots).default)===null||e===void 0?void 0:e.call(t))}});const SM=(t={})=>{const e=d.shallowRef();return d.onMounted(()=>{e.value=new wM(t)}),d.onBeforeUnmount(()=>{var n;(n=e.value)===null||n===void 0||n.destroy()}),e},MM=/^\s*>\s$/,OM=pt.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return["blockquote",Ne(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Ui({find:MM,type:this.type})]}}),CM=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,TM=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,EM=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,_M=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,NM=Zt.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return["strong",Ne(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Jr({find:CM,type:this.type}),Jr({find:EM,type:this.type})]},addPasteRules(){return[Gr({find:TM,type:this.type}),Gr({find:_M,type:this.type})]}}),DM=pt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Ne(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),qh=Zt.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["span",Ne(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>{const n=fo(t,this.type);return Object.entries(n).some(([,i])=>!!i)?!0:e.unsetMark(this.name)}}}}),Kh=/^\s*([-+*])\s$/,AM=pt.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",Ne(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(DM.name,this.editor.getAttributes(qh.name)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Ui({find:Kh,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Ui({find:Kh,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(qh.name),editor:this.editor})),[t]}}),VM=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))$/,BM=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))/g,PM=Zt.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",Ne(this.options.HTMLAttributes,t),0]},addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Jr({find:VM,type:this.type})]},addPasteRules(){return[Gr({find:BM,type:this.type})]}}),IM=/^```([a-z]+)?[\s\n]$/,RM=/^~~~([a-z]+)?[\s\n]$/,$M=pt.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options,s=[...((e=t.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(o=>o.startsWith(n)).map(o=>o.replace(n,""))[0];return s||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",Ne(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;const s=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith(`
114
114
 
115
115
  `);return!s||!o?!1:t.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:i,empty:s}=n;if(!s||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const a=i.after();return a===void 0||r.nodeAt(a)?!1:t.commands.exitCode()}}},addInputRules(){return[ml({find:IM,type:this.type,getAttributes:t=>({language:t[1]})}),ml({find:RM,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new Ke({key:new Pt("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,s=i==null?void 0:i.mode;if(!n||!s)return!1;const{tr:o}=t.state;return t.state.selection.from===t.state.doc.nodeSize-(1+t.state.selection.$to.depth*2)?o.insert(t.state.selection.from-1,this.type.create({language:s})):o.replaceSelectionWith(this.type.create({language:s})),o.setSelection(J.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.insertText(n.replace(/\r\n?/g,`
116
- `)),o.setMeta("paste",!0),t.dispatch(o),!0}}})]}}),LM=pt.create({name:"doc",topNode:!0,content:"block+"});function FM(t={}){return new Ke({view(e){return new zM(e,t)}})}class zM{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let s=o=>{this[i](o)};return e.dom.addEventListener(i,s),{name:i,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r;if(n){let a=e.nodeBefore,l=e.nodeAfter;if(a||l){let c=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(c){let u=c.getBoundingClientRect(),f=a?u.bottom:u.top;a&&l&&(f=(f+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:u.left,right:u.right,top:f-this.width/2,bottom:f+this.width/2}}}}if(!r){let a=this.editorView.coordsAtPos(this.cursorPos);r={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}let i=this.editorView.dom.offsetParent;this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let s,o;if(!i||i==document.body&&getComputedStyle(i).position=="static")s=-pageXOffset,o=-pageYOffset;else{let a=i.getBoundingClientRect();s=a.left-i.scrollLeft,o=a.top-i.scrollTop}this.element.style.left=r.left-s+"px",this.element.style.top=r.top-o+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),i=r&&r.type.spec.disableDropCursor,s=typeof i=="function"?i(this.editorView,n,e):i;if(n&&!s){let o=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=au(this.editorView.state.doc,o,this.editorView.dragging.slice);a!=null&&(o=a)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const jM=Ye.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[FM(this.options)]}});class xe extends Q{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return xe.valid(r)?new xe(r):Q.near(r)}content(){return I.empty}eq(e){return e instanceof xe&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new xe(e.resolve(n.pos))}getBookmark(){return new Vl(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!WM(e)||!HM(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let i=n.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&xe.valid(e))return e;let i=e.pos,s=null;for(let o=e.depth;;o--){let a=e.node(o);if(n>0?e.indexAfter(o)<a.childCount:e.index(o)>0){s=a.child(n>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;i+=n;let l=e.doc.resolve(i);if(xe.valid(l))return l}for(;;){let o=n>0?s.firstChild:s.lastChild;if(!o){if(s.isAtom&&!s.isText&&!H.isSelectable(s)){e=e.doc.resolve(i+s.nodeSize*n),r=!1;continue e}break}s=o,i+=n;let a=e.doc.resolve(i);if(xe.valid(a))return a}return null}}}xe.prototype.visible=!1,xe.findFrom=xe.findGapCursorFrom,Q.jsonID("gapcursor",xe);class Vl{constructor(e){this.pos=e}map(e){return new Vl(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return xe.valid(n)?new xe(n):Q.near(n)}}function WM(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function HM(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function YM(){return new Ke({props:{decorations:JM,createSelectionBetween(t,e,n){return e.pos==n.pos&&xe.valid(n)?new xe(n):null},handleClick:qM,handleKeyDown:UM,handleDOMEvents:{beforeinput:KM}}})}const UM=Vf({ArrowLeft:ko("horiz",-1),ArrowRight:ko("horiz",1),ArrowUp:ko("vert",-1),ArrowDown:ko("vert",1)});function ko(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,i,s){let o=r.selection,a=e>0?o.$to:o.$from,l=o.empty;if(o instanceof J){if(!s.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let c=xe.findGapCursorFrom(a,e,l);return c?(i&&i(r.tr.setSelection(new xe(c))),!0):!1}}function qM(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!xe.valid(r))return!1;let i=t.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&H.isSelectable(t.state.doc.nodeAt(i.inside))?!1:(t.dispatch(t.state.tr.setSelection(new xe(r))),!0)}function KM(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof xe))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let i=N.empty;for(let o=r.length-1;o>=0;o--)i=N.from(r[o].createAndFill(null,i));let s=t.state.tr.replace(n.pos,n.pos,new I(i,0,0));return s.setSelection(J.near(s.doc.resolve(n.pos+1))),t.dispatch(s),!1}function JM(t){if(!(t.selection instanceof xe))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Ee.create(t.doc,[ht.widget(t.selection.head,e,{key:"gapcursor"})])}const GM=Ye.create({name:"gapCursor",addProseMirrorPlugins(){return[YM()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=ee(z(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),ZM=pt.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",Ne(this.options.HTMLAttributes,t)]},renderText(){return`
116
+ `)),o.setMeta("paste",!0),t.dispatch(o),!0}}})]}}),LM=pt.create({name:"doc",topNode:!0,content:"block+"});function FM(t={}){return new Ke({view(e){return new zM(e,t)}})}class zM{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let s=o=>{this[i](o)};return e.dom.addEventListener(i,s),{name:i,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r;if(n){let a=e.nodeBefore,l=e.nodeAfter;if(a||l){let c=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(c){let u=c.getBoundingClientRect(),f=a?u.bottom:u.top;a&&l&&(f=(f+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:u.left,right:u.right,top:f-this.width/2,bottom:f+this.width/2}}}}if(!r){let a=this.editorView.coordsAtPos(this.cursorPos);r={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}let i=this.editorView.dom.offsetParent;this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let s,o;if(!i||i==document.body&&getComputedStyle(i).position=="static")s=-pageXOffset,o=-pageYOffset;else{let a=i.getBoundingClientRect();s=a.left-i.scrollLeft,o=a.top-i.scrollTop}this.element.style.left=r.left-s+"px",this.element.style.top=r.top-o+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),i=r&&r.type.spec.disableDropCursor,s=typeof i=="function"?i(this.editorView,n,e):i;if(n&&!s){let o=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=au(this.editorView.state.doc,o,this.editorView.dragging.slice);a!=null&&(o=a)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const jM=Ye.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[FM(this.options)]}});class Se extends Q{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return Se.valid(r)?new Se(r):Q.near(r)}content(){return I.empty}eq(e){return e instanceof Se&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Se(e.resolve(n.pos))}getBookmark(){return new Vl(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!WM(e)||!HM(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let i=n.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&Se.valid(e))return e;let i=e.pos,s=null;for(let o=e.depth;;o--){let a=e.node(o);if(n>0?e.indexAfter(o)<a.childCount:e.index(o)>0){s=a.child(n>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;i+=n;let l=e.doc.resolve(i);if(Se.valid(l))return l}for(;;){let o=n>0?s.firstChild:s.lastChild;if(!o){if(s.isAtom&&!s.isText&&!H.isSelectable(s)){e=e.doc.resolve(i+s.nodeSize*n),r=!1;continue e}break}s=o,i+=n;let a=e.doc.resolve(i);if(Se.valid(a))return a}return null}}}Se.prototype.visible=!1,Se.findFrom=Se.findGapCursorFrom,Q.jsonID("gapcursor",Se);class Vl{constructor(e){this.pos=e}map(e){return new Vl(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return Se.valid(n)?new Se(n):Q.near(n)}}function WM(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function HM(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function YM(){return new Ke({props:{decorations:JM,createSelectionBetween(t,e,n){return e.pos==n.pos&&Se.valid(n)?new Se(n):null},handleClick:qM,handleKeyDown:UM,handleDOMEvents:{beforeinput:KM}}})}const UM=Vf({ArrowLeft:ko("horiz",-1),ArrowRight:ko("horiz",1),ArrowUp:ko("vert",-1),ArrowDown:ko("vert",1)});function ko(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,i,s){let o=r.selection,a=e>0?o.$to:o.$from,l=o.empty;if(o instanceof J){if(!s.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let c=Se.findGapCursorFrom(a,e,l);return c?(i&&i(r.tr.setSelection(new Se(c))),!0):!1}}function qM(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!Se.valid(r))return!1;let i=t.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&H.isSelectable(t.state.doc.nodeAt(i.inside))?!1:(t.dispatch(t.state.tr.setSelection(new Se(r))),!0)}function KM(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof Se))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let i=N.empty;for(let o=r.length-1;o>=0;o--)i=N.from(r[o].createAndFill(null,i));let s=t.state.tr.replace(n.pos,n.pos,new I(i,0,0));return s.setSelection(J.near(s.doc.resolve(n.pos+1))),t.dispatch(s),!1}function JM(t){if(!(t.selection instanceof Se))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Ee.create(t.doc,[ht.widget(t.selection.head,e,{key:"gapcursor"})])}const GM=Ye.create({name:"gapCursor",addProseMirrorPlugins(){return[YM()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=ee(z(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),ZM=pt.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",Ne(this.options.HTMLAttributes,t)]},renderText(){return`
117
117
  `},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:i,storedMarks:s}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:a}=r.extensionManager,l=s||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&o){const f=l.filter(h=>a.includes(h.type.name));c.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),XM=pt.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Ne(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>ml({find:new RegExp(`^(#{1,${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var wo=200,Ie=function(){};Ie.prototype.append=function(e){return e.length?(e=Ie.from(e),!this.length&&e||e.length<wo&&this.leafAppend(e)||this.length<wo&&e.leafPrepend(this)||this.appendInner(e)):this},Ie.prototype.prepend=function(e){return e.length?Ie.from(e).append(this):this},Ie.prototype.appendInner=function(e){return new QM(this,e)},Ie.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Ie.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))},Ie.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Ie.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)},Ie.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(s,o){return i.push(e(s,o))},n,r),i},Ie.from=function(e){return e instanceof Ie?e:e&&e.length?new Jh(e):Ie.empty};var Jh=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,s){return i==0&&s==this.length?this:new e(this.values.slice(i,s))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,s,o,a){for(var l=s;l<o;l++)if(i(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(i,s,o,a){for(var l=s-1;l>=o;l--)if(i(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=wo)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=wo)return new e(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Ie);Ie.empty=new Jh([]);var QM=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,i,s,o){var a=this.left.length;if(i<a&&this.left.forEachInner(r,i,Math.min(s,a),o)===!1||s>a&&this.right.forEachInner(r,Math.max(i-a,0),Math.min(this.length,s)-a,o+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,s,o){var a=this.left.length;if(i>a&&this.right.forEachInvertedInner(r,i-a,Math.max(s,a)-a,o+a)===!1||s<a&&this.left.forEachInvertedInner(r,Math.min(i,a),s,o)===!1)return!1},e.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var s=this.left.length;return i<=s?this.left.slice(r,i):r>=s?this.right.slice(r-s,i-s):this.left.slice(r,s).append(this.right.slice(0,i-s))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(Ie);const eO=500;class $t{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,s;n&&(i=this.remapping(r,this.items.length),s=i.maps.length);let o=e.tr,a,l,c=[],u=[];return this.items.forEach((f,h)=>{if(!f.step){i||(i=this.remapping(r,h+1),s=i.maps.length),s--,u.push(f);return}if(i){u.push(new tn(f.map));let p=f.step.map(i.slice(s)),m;p&&o.maybeStep(p).doc&&(m=o.mapping.maps[o.mapping.maps.length-1],c.push(new tn(m,void 0,void 0,c.length+u.length))),s--,m&&i.appendMap(m,s)}else o.maybeStep(f.step);if(f.selection)return a=i?f.selection.map(i.slice(s)):f.selection,l=new $t(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:a}}addTransform(e,n,r,i){let s=[],o=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let u=0;u<e.steps.length;u++){let f=e.steps[u].invert(e.docs[u]),h=new tn(e.mapping.maps[u],f,n),p;(p=l&&l.merge(h))&&(h=p,u?s.pop():a=a.slice(0,a.length-1)),s.push(h),n&&(o++,n=void 0),i||(l=h)}let c=o-r.depth;return c>nO&&(a=tO(a,c),o-=c),new $t(a.append(s),o)}remapping(e,n){let r=new Br;return this.items.forEach((i,s)=>{let o=i.mirrorOffset!=null&&s-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,o)},e,n),r}addMaps(e){return this.eventCount==0?this:new $t(this.items.append(e.map(n=>new tn(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),s=e.mapping,o=e.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},i);let l=n;this.items.forEach(h=>{let p=s.getMirror(--l);if(p==null)return;o=Math.min(o,p);let m=s.maps[p];if(h.step){let y=e.steps[p].invert(e.docs[p]),g=h.selection&&h.selection.map(s.slice(l+1,p));g&&a++,r.push(new tn(m,y,g))}else r.push(new tn(m))},i);let c=[];for(let h=n;h<o;h++)c.push(new tn(s.maps[h]));let u=this.items.slice(0,i).append(c).append(r),f=new $t(u,a);return f.emptyItemCount()>eO&&(f=f.compress(this.items.length-r.length)),f}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,i=[],s=0;return this.items.forEach((o,a)=>{if(a>=e)i.push(o),o.selection&&s++;else if(o.step){let l=o.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let u=o.selection&&o.selection.map(n.slice(r));u&&s++;let f=new tn(c.invert(),l,u),h,p=i.length-1;(h=i.length&&i[p].merge(f))?i[p]=h:i.push(f)}}else o.map&&r--},this.items.length,0),new $t(Ie.from(i.reverse()),s)}}$t.empty=new $t(Ie.empty,0);function tO(t,e){let n;return t.forEach((r,i)=>{if(r.selection&&e--==0)return n=i,!1}),t.slice(n)}class tn{constructor(e,n,r,i){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new tn(n.getMap().invert(),n,this.selection)}}}class qn{constructor(e,n,r,i,s){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=s}}const nO=20;function rO(t,e,n,r){let i=n.getMeta(br),s;if(i)return i.historyState;n.getMeta(oO)&&(t=new qn(t.done,t.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(o&&o.getMeta(br))return o.getMeta(br).redo?new qn(t.done.addTransform(n,void 0,r,xo(e)),t.undone,Gh(n.mapping.maps[n.steps.length-1]),t.prevTime,t.prevComposition):new qn(t.done,t.undone.addTransform(n,void 0,r,xo(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!o&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!iO(n,t.prevRanges)),c=o?Bl(t.prevRanges,n.mapping):Gh(n.mapping.maps[n.steps.length-1]);return new qn(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,xo(e)),$t.empty,c,n.time,a??t.prevComposition)}else return(s=n.getMeta("rebased"))?new qn(t.done.rebased(n,s),t.undone.rebased(n,s),Bl(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new qn(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Bl(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function iO(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,i)=>{for(let s=0;s<e.length;s+=2)r<=e[s+1]&&i>=e[s]&&(n=!0)}),n}function Gh(t){let e=[];return t.forEach((n,r,i,s)=>e.push(i,s)),e}function Bl(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),s=e.map(t[r+1],-1);i<=s&&n.push(i,s)}return n}function sO(t,e,n){let r=xo(e),i=br.get(e).spec.config,s=(n?t.undone:t.done).popEvent(e,r);if(!s)return null;let o=s.selection.resolve(s.transform.doc),a=(n?t.done:t.undone).addTransform(s.transform,e.selection.getBookmark(),i,r),l=new qn(n?a:s.remaining,n?s.remaining:a,null,0,-1);return s.transform.setSelection(o).setMeta(br,{redo:n,historyState:l})}let Pl=!1,Zh=null;function xo(t){let e=t.plugins;if(Zh!=e){Pl=!1,Zh=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Pl=!0;break}}return Pl}const br=new Pt("history"),oO=new Pt("closeHistory");function aO(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Ke({key:br,state:{init(){return new qn($t.empty,$t.empty,null,0,-1)},apply(e,n,r){return rO(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?Qh:r=="historyRedo"?ep:null;return i?(n.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function Xh(t,e){return(n,r)=>{let i=br.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let s=sO(i,n,t);s&&r(e?s.scrollIntoView():s)}return!0}}const Qh=Xh(!1,!0),ep=Xh(!0,!0),lO=Ye.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>Qh(t,e),redo:()=>({state:t,dispatch:e})=>ep(t,e)}},addProseMirrorPlugins(){return[aO(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),cO=pt.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Ne(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{$to:n}=e.selection,r=t();return n.parentOffset===0?r.insertContentAt(Math.max(n.pos-2,0),{type:this.name}):r.insertContent({type:this.name}),r.command(({tr:i,dispatch:s})=>{var o;if(s){const{$to:a}=i.selection,l=a.end();if(a.nodeAfter)a.nodeAfter.isTextblock?i.setSelection(J.create(i.doc,a.pos+1)):a.nodeAfter.isBlock?i.setSelection(H.create(i.doc,a.pos)):i.setSelection(J.create(i.doc,a.pos));else{const c=(o=a.parent.type.contentMatch.defaultType)===null||o===void 0?void 0:o.create();c&&(i.insert(l,c),i.setSelection(J.create(i.doc,l+1)))}i.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Lx({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),dO=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,uO=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,fO=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,hO=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,pO=Zt.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Ne(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Jr({find:dO,type:this.type}),Jr({find:fO,type:this.type})]},addPasteRules(){return[Gr({find:uO,type:this.type}),Gr({find:hO,type:this.type})]}}),mO=pt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Ne(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),gO=pt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Ne(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),tp=Zt.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["span",Ne(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>{const n=fo(t,this.type);return Object.entries(n).some(([,i])=>!!i)?!0:e.unsetMark(this.name)}}}}),np=/^(\d+)\.\s$/,yO=pt.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",Ne(this.options.HTMLAttributes,n),0]:["ol",Ne(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(gO.name,this.editor.getAttributes(tp.name)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Ui({find:np,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Ui({find:np,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(tp.name)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),bO=pt.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Ne(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),vO=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,kO=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,wO=Zt.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",Ne(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Jr({find:vO,type:this.type})]},addPasteRules(){return[Gr({find:kO,type:this.type})]}}),xO=pt.create({name:"text",group:"inline"}),SO=Ye.create({name:"starterKit",addExtensions(){var t,e,n,r,i,s,o,a,l,c,u,f,h,p,m,y,g,k;const x=[];return this.options.blockquote!==!1&&x.push(OM.configure((t=this.options)===null||t===void 0?void 0:t.blockquote)),this.options.bold!==!1&&x.push(NM.configure((e=this.options)===null||e===void 0?void 0:e.bold)),this.options.bulletList!==!1&&x.push(AM.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&x.push(PM.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&x.push($M.configure((i=this.options)===null||i===void 0?void 0:i.codeBlock)),this.options.document!==!1&&x.push(LM.configure((s=this.options)===null||s===void 0?void 0:s.document)),this.options.dropcursor!==!1&&x.push(jM.configure((o=this.options)===null||o===void 0?void 0:o.dropcursor)),this.options.gapcursor!==!1&&x.push(GM.configure((a=this.options)===null||a===void 0?void 0:a.gapcursor)),this.options.hardBreak!==!1&&x.push(ZM.configure((l=this.options)===null||l===void 0?void 0:l.hardBreak)),this.options.heading!==!1&&x.push(XM.configure((c=this.options)===null||c===void 0?void 0:c.heading)),this.options.history!==!1&&x.push(lO.configure((u=this.options)===null||u===void 0?void 0:u.history)),this.options.horizontalRule!==!1&&x.push(cO.configure((f=this.options)===null||f===void 0?void 0:f.horizontalRule)),this.options.italic!==!1&&x.push(pO.configure((h=this.options)===null||h===void 0?void 0:h.italic)),this.options.listItem!==!1&&x.push(mO.configure((p=this.options)===null||p===void 0?void 0:p.listItem)),this.options.orderedList!==!1&&x.push(yO.configure((m=this.options)===null||m===void 0?void 0:m.orderedList)),this.options.paragraph!==!1&&x.push(bO.configure((y=this.options)===null||y===void 0?void 0:y.paragraph)),this.options.strike!==!1&&x.push(wO.configure((g=this.options)===null||g===void 0?void 0:g.strike)),this.options.text!==!1&&x.push(xO.configure((k=this.options)===null||k===void 0?void 0:k.text)),x}}),MO=Ye.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,considerAnyAsEmpty:!1,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new Ke({key:new Pt("placeholder"),props:{decorations:({doc:t,selection:e})=>{var n;const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=e,s=[];if(!r)return null;const{firstChild:o}=t.content,a=o&&o.type.isLeaf,l=o&&o.isAtom,c=this.options.considerAnyAsEmpty?!0:o&&o.type.name===((n=t.type.contentMatch.defaultType)===null||n===void 0?void 0:n.name),u=t.content.childCount<=1&&o&&c&&o.nodeSize<=2&&(!a||!l);return t.descendants((f,h)=>{const p=i>=h&&i<=h+f.nodeSize,m=!f.isLeaf&&!f.childCount;if((p||!this.options.showOnlyCurrent)&&m){const y=[this.options.emptyNodeClass];u&&y.push(this.options.emptyEditorClass);const g=ht.node(h,h+f.nodeSize,{class:y.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:f,pos:h,hasAnchor:p}):this.options.placeholder});s.push(g)}return this.options.includeChildren}),Ee.create(t,s)}}})]}}),OO={},CO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},TO=[d.createElementVNode("path",{d:"M3 4.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM6.25 3a.75.75 0 0 0 0 1.5h7a.75.75 0 0 0 0-1.5h-7ZM6.25 7.25a.75.75 0 0 0 0 1.5h7a.75.75 0 0 0 0-1.5h-7ZM6.25 11.5a.75.75 0 0 0 0 1.5h7a.75.75 0 0 0 0-1.5h-7ZM4 12.25a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM3 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"},null,-1)];function EO(t,e){return d.openBlock(),d.createElementBlock("svg",CO,TO)}const _O=ye(OO,[["render",EO]]),NO={},DO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},AO=[d.createElementVNode("path",{"fill-rule":"evenodd",d:"M12.5 9.75A2.75 2.75 0 0 0 9.75 7H4.56l2.22 2.22a.75.75 0 1 1-1.06 1.06l-3.5-3.5a.75.75 0 0 1 0-1.06l3.5-3.5a.75.75 0 0 1 1.06 1.06L4.56 5.5h5.19a4.25 4.25 0 0 1 0 8.5h-1a.75.75 0 0 1 0-1.5h1a2.75 2.75 0 0 0 2.75-2.75Z","clip-rule":"evenodd"},null,-1)];function VO(t,e){return d.openBlock(),d.createElementBlock("svg",DO,AO)}const BO=ye(NO,[["render",VO]]),PO={},IO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},RO=[d.createElementVNode("path",{"fill-rule":"evenodd",d:"M3.5 9.75A2.75 2.75 0 0 1 6.25 7h5.19L9.22 9.22a.75.75 0 1 0 1.06 1.06l3.5-3.5a.75.75 0 0 0 0-1.06l-3.5-3.5a.75.75 0 1 0-1.06 1.06l2.22 2.22H6.25a4.25 4.25 0 0 0 0 8.5h1a.75.75 0 0 0 0-1.5h-1A2.75 2.75 0 0 1 3.5 9.75Z","clip-rule":"evenodd"},null,-1)];function $O(t,e){return d.openBlock(),d.createElementBlock("svg",IO,RO)}const LO=ye(PO,[["render",$O]]),FO={},zO={fill:"#000000",width:"800px",height:"800px",viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},jO=[d.createElementVNode("path",{d:"M754.429 0v274.423h235.885L647.457 1645.85H343V1920h822.994v-274.149H930.11l342.857-1371.428h304.32V0z","fill-rule":"evenodd"},null,-1)];function WO(t,e){return d.openBlock(),d.createElementBlock("svg",zO,jO)}const HO=ye(FO,[["render",WO]]),YO={},UO={fill:"#000000",viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},qO=[d.createElementVNode("path",{d:"M480.286 822.857h548.571c151.269 0 274.286-123.017 274.286-274.286 0-151.268-123.017-274.285-274.286-274.285H480.286v548.571Zm0 822.857H1166c151.269 0 274.286-123.017 274.286-274.285 0-151.269-123.017-274.286-274.286-274.286H480.286v548.571ZM1166 1920H206V0h822.857c302.537 0 548.572 246.034 548.572 548.571 0 134.263-48.549 257.418-128.778 352.732 159.223 96.137 265.92 270.994 265.92 470.126 0 302.537-246.034 548.571-548.571 548.571Z","fill-rule":"evenodd"},null,-1)];function KO(t,e){return d.openBlock(),d.createElementBlock("svg",UO,qO)}const JO=ye(YO,[["render",KO]]),GO={},ZO={fill:"#000000",width:"800px",height:"800px",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},XO=[d.createElementVNode("path",{d:"M3.59 3.03h12.2v1.26H3.59zm0 4.29h12.2v1.26H3.59zm0 4.35h12.2v1.26H3.59zM.99 4.79h.49V2.52H.6v.45h.39v1.82zm.87 3.88H.91l.14-.11.3-.24c.35-.28.49-.5.49-.79A.74.74 0 0 0 1 6.8a.77.77 0 0 0-.81.84h.52A.34.34 0 0 1 1 7.25a.31.31 0 0 1 .31.31.6.6 0 0 1-.22.44l-.87.75v.39h1.64zm-.36 3.56a.52.52 0 0 0 .28-.48.67.67 0 0 0-.78-.62.71.71 0 0 0-.77.75h.5a.3.3 0 0 1 .27-.32.26.26 0 1 1 0 .51H.91v.38H1c.23 0 .37.11.37.29a.29.29 0 0 1-.33.29.35.35 0 0 1-.36-.35H.21a.76.76 0 0 0 .83.8.74.74 0 0 0 .83-.72.53.53 0 0 0-.37-.53z"},null,-1)];function QO(t,e){return d.openBlock(),d.createElementBlock("svg",ZO,XO)}const eC=ye(GO,[["render",QO]]),tC={},nC={fill:"#000000",version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"800px",height:"800px",viewBox:"0 0 96.639 96.639","xml:space":"preserve"},rC=[d.createElementVNode("g",null,[d.createElementVNode("g",null,[d.createElementVNode("path",{d:`M95.263,12.29V2.277C95.263,1.019,94.245,0,92.987,0H36.921C25.539,0,17.05,2.442,10.969,7.47\r
118
118
  c-6.364,5.265-9.594,12.724-9.594,22.167c0,10.367,3.124,18.054,9.547,23.499c6.399,5.423,15.696,8.175,27.63,8.175h10.38v33.051\r
119
119
  c0,1.258,1.02,2.277,2.278,2.277h7.096c1.257,0,2.276-1.02,2.276-2.277V14.566h9.146v79.795c0,1.258,1.021,2.276,2.277,2.276\r
@@ -126,4 +126,4 @@ var rp;function _(){return rp.apply(null,arguments)}function vC(t){rp=t}function
126
126
  [`+s+"] ";for(o in arguments[0])ce(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[s];r.push(i)}op(t+`
127
127
  Arguments: `+Array.prototype.slice.call(r).join("")+`
128
128
  `+new Error().stack),n=!1}return e.apply(this,arguments)},e)}var ap={};function lp(t,e){_.deprecationHandler!=null&&_.deprecationHandler(t,e),ap[t]||(op(e),ap[t]=!0)}_.suppressDeprecationWarnings=!1,_.deprecationHandler=null;function rn(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function wC(t){var e,n;for(n in t)ce(t,n)&&(e=t[n],rn(e)?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function zl(t,e){var n=Kn({},t),r;for(r in e)ce(e,r)&&(vr(t[r])&&vr(e[r])?(n[r]={},Kn(n[r],t[r]),Kn(n[r],e[r])):e[r]!=null?n[r]=e[r]:delete n[r]);for(r in t)ce(t,r)&&!ce(e,r)&&vr(t[r])&&(n[r]=Kn({},n[r]));return n}function jl(t){t!=null&&this.set(t)}var Wl;Object.keys?Wl=Object.keys:Wl=function(t){var e,n=[];for(e in t)ce(t,e)&&n.push(e);return n};var xC={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function SC(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return rn(r)?r.call(e,n):r}function sn(t,e,n){var r=""+Math.abs(t),i=e-r.length,s=t>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Hl=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Mo=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Yl={},ii={};function W(t,e,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),t&&(ii[t]=i),e&&(ii[e[0]]=function(){return sn(i.apply(this,arguments),e[1],e[2])}),n&&(ii[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function MC(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function OC(t){var e=t.match(Hl),n,r;for(n=0,r=e.length;n<r;n++)ii[e[n]]?e[n]=ii[e[n]]:e[n]=MC(e[n]);return function(i){var s="",o;for(o=0;o<r;o++)s+=rn(e[o])?e[o].call(i,t):e[o];return s}}function Oo(t,e){return t.isValid()?(e=cp(e,t.localeData()),Yl[e]=Yl[e]||OC(e),Yl[e](t)):t.localeData().invalidDate()}function cp(t,e){var n=5;function r(i){return e.longDateFormat(i)||i}for(Mo.lastIndex=0;n>=0&&Mo.test(t);)t=t.replace(Mo,r),Mo.lastIndex=0,n-=1;return t}var CC={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function TC(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(Hl).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[t])}var EC="Invalid date";function _C(){return this._invalidDate}var NC="%d",DC=/\d{1,2}/;function AC(t){return this._ordinal.replace("%d",t)}var VC={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function BC(t,e,n,r){var i=this._relativeTime[n];return rn(i)?i(t,e,n,r):i.replace(/%d/i,t)}function PC(t,e){var n=this._relativeTime[t>0?"future":"past"];return rn(n)?n(e):n.replace(/%s/i,e)}var dp={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Tt(t){return typeof t=="string"?dp[t]||dp[t.toLowerCase()]:void 0}function Ul(t){var e={},n,r;for(r in t)ce(t,r)&&(n=Tt(r),n&&(e[n]=t[r]));return e}var IC={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function RC(t){var e=[],n;for(n in t)ce(t,n)&&e.push({unit:n,priority:IC[n]});return e.sort(function(r,i){return r.priority-i.priority}),e}var up=/\d/,yt=/\d\d/,fp=/\d{3}/,ql=/\d{4}/,Co=/[+-]?\d{6}/,be=/\d\d?/,hp=/\d\d\d\d?/,pp=/\d\d\d\d\d\d?/,To=/\d{1,3}/,Kl=/\d{1,4}/,Eo=/[+-]?\d{1,6}/,si=/\d+/,_o=/[+-]?\d+/,$C=/Z|[+-]\d\d:?\d\d/gi,No=/Z|[+-]\d\d(?::?\d\d)?/gi,LC=/[+-]?\d+(\.\d{1,3})?/,ss=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,oi=/^[1-9]\d?/,Jl=/^([1-9]\d|\d)/,Do;Do={};function L(t,e,n){Do[t]=rn(e)?e:function(r,i){return r&&n?n:e}}function FC(t,e){return ce(Do,t)?Do[t](e._strict,e._locale):new RegExp(zC(t))}function zC(t){return vn(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,n,r,i,s){return n||r||i||s}))}function vn(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Et(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function se(t){var e=+t,n=0;return e!==0&&isFinite(e)&&(n=Et(e)),n}var Gl={};function ge(t,e){var n,r=e,i;for(typeof t=="string"&&(t=[t]),bn(e)&&(r=function(s,o){o[e]=se(s)}),i=t.length,n=0;n<i;n++)Gl[t[n]]=r}function as(t,e){ge(t,function(n,r,i,s){i._w=i._w||{},e(n,i._w,i,s)})}function jC(t,e,n){e!=null&&ce(Gl,t)&&Gl[t](e,n._a,n,t)}function Ao(t){return t%4===0&&t%100!==0||t%400===0}var Ue=0,kn=1,on=2,De=3,zt=4,wn=5,kr=6,WC=7,HC=8;W("Y",0,0,function(){var t=this.year();return t<=9999?sn(t,4):"+"+t}),W(0,["YY",2],0,function(){return this.year()%100}),W(0,["YYYY",4],0,"year"),W(0,["YYYYY",5],0,"year"),W(0,["YYYYYY",6,!0],0,"year"),L("Y",_o),L("YY",be,yt),L("YYYY",Kl,ql),L("YYYYY",Eo,Co),L("YYYYYY",Eo,Co),ge(["YYYYY","YYYYYY"],Ue),ge("YYYY",function(t,e){e[Ue]=t.length===2?_.parseTwoDigitYear(t):se(t)}),ge("YY",function(t,e){e[Ue]=_.parseTwoDigitYear(t)}),ge("Y",function(t,e){e[Ue]=parseInt(t,10)});function ls(t){return Ao(t)?366:365}_.parseTwoDigitYear=function(t){return se(t)+(se(t)>68?1900:2e3)};var mp=ai("FullYear",!0);function YC(){return Ao(this.year())}function ai(t,e){return function(n){return n!=null?(gp(this,t,n),_.updateOffset(this,e),this):cs(this,t)}}function cs(t,e){if(!t.isValid())return NaN;var n=t._d,r=t._isUTC;switch(e){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function gp(t,e,n){var r,i,s,o,a;if(!(!t.isValid()||isNaN(n))){switch(r=t._d,i=t._isUTC,e){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,o=t.month(),a=t.date(),a=a===29&&o===1&&!Ao(s)?28:a,i?r.setUTCFullYear(s,o,a):r.setFullYear(s,o,a)}}function UC(t){return t=Tt(t),rn(this[t])?this[t]():this}function qC(t,e){if(typeof t=="object"){t=Ul(t);var n=RC(t),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](t[n[r].unit])}else if(t=Tt(t),rn(this[t]))return this[t](e);return this}function KC(t,e){return(t%e+e)%e}var Me;Array.prototype.indexOf?Me=Array.prototype.indexOf:Me=function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1};function Zl(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=KC(e,12);return t+=(e-n)/12,n===1?Ao(t)?29:28:31-n%7%2}W("M",["MM",2],"Mo",function(){return this.month()+1}),W("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),W("MMMM",0,0,function(t){return this.localeData().months(this,t)}),L("M",be,oi),L("MM",be,yt),L("MMM",function(t,e){return e.monthsShortRegex(t)}),L("MMMM",function(t,e){return e.monthsRegex(t)}),ge(["M","MM"],function(t,e){e[kn]=se(t)-1}),ge(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);i!=null?e[kn]=i:Z(n).invalidMonth=t});var JC="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),yp="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),bp=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,GC=ss,ZC=ss;function XC(t,e){return t?Lt(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||bp).test(e)?"format":"standalone"][t.month()]:Lt(this._months)?this._months:this._months.standalone}function QC(t,e){return t?Lt(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[bp.test(e)?"format":"standalone"][t.month()]:Lt(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function eT(t,e,n){var r,i,s,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=nn([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?e==="MMM"?(i=Me.call(this._shortMonthsParse,o),i!==-1?i:null):(i=Me.call(this._longMonthsParse,o),i!==-1?i:null):e==="MMM"?(i=Me.call(this._shortMonthsParse,o),i!==-1?i:(i=Me.call(this._longMonthsParse,o),i!==-1?i:null)):(i=Me.call(this._longMonthsParse,o),i!==-1?i:(i=Me.call(this._shortMonthsParse,o),i!==-1?i:null))}function tT(t,e,n){var r,i,s;if(this._monthsParseExact)return eT.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=nn([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(s="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&e==="MMMM"&&this._longMonthsParse[r].test(t))return r;if(n&&e==="MMM"&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function vp(t,e){if(!t.isValid())return t;if(typeof e=="string"){if(/^\d+$/.test(e))e=se(e);else if(e=t.localeData().monthsParse(e),!bn(e))return t}var n=e,r=t.date();return r=r<29?r:Math.min(r,Zl(t.year(),n)),t._isUTC?t._d.setUTCMonth(n,r):t._d.setMonth(n,r),t}function kp(t){return t!=null?(vp(this,t),_.updateOffset(this,!0),this):cs(this,"Month")}function nT(){return Zl(this.year(),this.month())}function rT(t){return this._monthsParseExact?(ce(this,"_monthsRegex")||wp.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(ce(this,"_monthsShortRegex")||(this._monthsShortRegex=GC),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function iT(t){return this._monthsParseExact?(ce(this,"_monthsRegex")||wp.call(this),t?this._monthsStrictRegex:this._monthsRegex):(ce(this,"_monthsRegex")||(this._monthsRegex=ZC),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function wp(){function t(l,c){return c.length-l.length}var e=[],n=[],r=[],i,s,o,a;for(i=0;i<12;i++)s=nn([2e3,i]),o=vn(this.monthsShort(s,"")),a=vn(this.months(s,"")),e.push(o),n.push(a),r.push(a),r.push(o);e.sort(t),n.sort(t),r.sort(t),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function sT(t,e,n,r,i,s,o){var a;return t<100&&t>=0?(a=new Date(t+400,e,n,r,i,s,o),isFinite(a.getFullYear())&&a.setFullYear(t)):a=new Date(t,e,n,r,i,s,o),a}function ds(t){var e,n;return t<100&&t>=0?(n=Array.prototype.slice.call(arguments),n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function Vo(t,e,n){var r=7+e-n,i=(7+ds(t,0,r).getUTCDay()-e)%7;return-i+r-1}function xp(t,e,n,r,i){var s=(7+n-r)%7,o=Vo(t,r,i),a=1+7*(e-1)+s+o,l,c;return a<=0?(l=t-1,c=ls(l)+a):a>ls(t)?(l=t+1,c=a-ls(t)):(l=t,c=a),{year:l,dayOfYear:c}}function us(t,e,n){var r=Vo(t.year(),e,n),i=Math.floor((t.dayOfYear()-r-1)/7)+1,s,o;return i<1?(o=t.year()-1,s=i+xn(o,e,n)):i>xn(t.year(),e,n)?(s=i-xn(t.year(),e,n),o=t.year()+1):(o=t.year(),s=i),{week:s,year:o}}function xn(t,e,n){var r=Vo(t,e,n),i=Vo(t+1,e,n);return(ls(t)-r+i)/7}W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),L("w",be,oi),L("ww",be,yt),L("W",be,oi),L("WW",be,yt),as(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=se(t)});function oT(t){return us(t,this._week.dow,this._week.doy).week}var aT={dow:0,doy:6};function lT(){return this._week.dow}function cT(){return this._week.doy}function dT(t){var e=this.localeData().week(this);return t==null?e:this.add((t-e)*7,"d")}function uT(t){var e=us(this,1,4).week;return t==null?e:this.add((t-e)*7,"d")}W("d",0,"do","day"),W("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),W("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),W("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),L("d",be),L("e",be),L("E",be),L("dd",function(t,e){return e.weekdaysMinRegex(t)}),L("ddd",function(t,e){return e.weekdaysShortRegex(t)}),L("dddd",function(t,e){return e.weekdaysRegex(t)}),as(["dd","ddd","dddd"],function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);i!=null?e.d=i:Z(n).invalidWeekday=t}),as(["d","e","E"],function(t,e,n,r){e[r]=se(t)});function fT(t,e){return typeof t!="string"?t:isNaN(t)?(t=e.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function hT(t,e){return typeof t=="string"?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Xl(t,e){return t.slice(e,7).concat(t.slice(0,e))}var pT="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Sp="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),mT="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),gT=ss,yT=ss,bT=ss;function vT(t,e){var n=Lt(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return t===!0?Xl(n,this._week.dow):t?n[t.day()]:n}function kT(t){return t===!0?Xl(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function wT(t){return t===!0?Xl(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function xT(t,e,n){var r,i,s,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=nn([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?e==="dddd"?(i=Me.call(this._weekdaysParse,o),i!==-1?i:null):e==="ddd"?(i=Me.call(this._shortWeekdaysParse,o),i!==-1?i:null):(i=Me.call(this._minWeekdaysParse,o),i!==-1?i:null):e==="dddd"?(i=Me.call(this._weekdaysParse,o),i!==-1||(i=Me.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=Me.call(this._minWeekdaysParse,o),i!==-1?i:null)):e==="ddd"?(i=Me.call(this._shortWeekdaysParse,o),i!==-1||(i=Me.call(this._weekdaysParse,o),i!==-1)?i:(i=Me.call(this._minWeekdaysParse,o),i!==-1?i:null)):(i=Me.call(this._minWeekdaysParse,o),i!==-1||(i=Me.call(this._weekdaysParse,o),i!==-1)?i:(i=Me.call(this._shortWeekdaysParse,o),i!==-1?i:null))}function ST(t,e,n){var r,i,s;if(this._weekdaysParseExact)return xT.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=nn([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&e==="dddd"&&this._fullWeekdaysParse[r].test(t))return r;if(n&&e==="ddd"&&this._shortWeekdaysParse[r].test(t))return r;if(n&&e==="dd"&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}}function MT(t){if(!this.isValid())return t!=null?this:NaN;var e=cs(this,"Day");return t!=null?(t=fT(t,this.localeData()),this.add(t-e,"d")):e}function OT(t){if(!this.isValid())return t!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return t==null?e:this.add(t-e,"d")}function CT(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var e=hT(t,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function TT(t){return this._weekdaysParseExact?(ce(this,"_weekdaysRegex")||Ql.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(ce(this,"_weekdaysRegex")||(this._weekdaysRegex=gT),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function ET(t){return this._weekdaysParseExact?(ce(this,"_weekdaysRegex")||Ql.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(ce(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=yT),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function _T(t){return this._weekdaysParseExact?(ce(this,"_weekdaysRegex")||Ql.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(ce(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=bT),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ql(){function t(u,f){return f.length-u.length}var e=[],n=[],r=[],i=[],s,o,a,l,c;for(s=0;s<7;s++)o=nn([2e3,1]).day(s),a=vn(this.weekdaysMin(o,"")),l=vn(this.weekdaysShort(o,"")),c=vn(this.weekdays(o,"")),e.push(a),n.push(l),r.push(c),i.push(a),i.push(l),i.push(c);e.sort(t),n.sort(t),r.sort(t),i.sort(t),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function ec(){return this.hours()%12||12}function NT(){return this.hours()||24}W("H",["HH",2],0,"hour"),W("h",["hh",2],0,ec),W("k",["kk",2],0,NT),W("hmm",0,0,function(){return""+ec.apply(this)+sn(this.minutes(),2)}),W("hmmss",0,0,function(){return""+ec.apply(this)+sn(this.minutes(),2)+sn(this.seconds(),2)}),W("Hmm",0,0,function(){return""+this.hours()+sn(this.minutes(),2)}),W("Hmmss",0,0,function(){return""+this.hours()+sn(this.minutes(),2)+sn(this.seconds(),2)});function Mp(t,e){W(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}Mp("a",!0),Mp("A",!1);function Op(t,e){return e._meridiemParse}L("a",Op),L("A",Op),L("H",be,Jl),L("h",be,oi),L("k",be,oi),L("HH",be,yt),L("hh",be,yt),L("kk",be,yt),L("hmm",hp),L("hmmss",pp),L("Hmm",hp),L("Hmmss",pp),ge(["H","HH"],De),ge(["k","kk"],function(t,e,n){var r=se(t);e[De]=r===24?0:r}),ge(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),ge(["h","hh"],function(t,e,n){e[De]=se(t),Z(n).bigHour=!0}),ge("hmm",function(t,e,n){var r=t.length-2;e[De]=se(t.substr(0,r)),e[zt]=se(t.substr(r)),Z(n).bigHour=!0}),ge("hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[De]=se(t.substr(0,r)),e[zt]=se(t.substr(r,2)),e[wn]=se(t.substr(i)),Z(n).bigHour=!0}),ge("Hmm",function(t,e,n){var r=t.length-2;e[De]=se(t.substr(0,r)),e[zt]=se(t.substr(r))}),ge("Hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[De]=se(t.substr(0,r)),e[zt]=se(t.substr(r,2)),e[wn]=se(t.substr(i))});function DT(t){return(t+"").toLowerCase().charAt(0)==="p"}var AT=/[ap]\.?m?\.?/i,VT=ai("Hours",!0);function BT(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var Cp={calendar:xC,longDateFormat:CC,invalidDate:EC,ordinal:NC,dayOfMonthOrdinalParse:DC,relativeTime:VC,months:JC,monthsShort:yp,week:aT,weekdays:pT,weekdaysMin:mT,weekdaysShort:Sp,meridiemParse:AT},we={},fs={},hs;function PT(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n+=1)if(t[n]!==e[n])return n;return r}function Tp(t){return t&&t.toLowerCase().replace("_","-")}function IT(t){for(var e=0,n,r,i,s;e<t.length;){for(s=Tp(t[e]).split("-"),n=s.length,r=Tp(t[e+1]),r=r?r.split("-"):null;n>0;){if(i=Bo(s.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&PT(s,r)>=n-1)break;n--}e++}return hs}function RT(t){return!!(t&&t.match("^[^/\\\\]*$"))}function Bo(t){var e=null,n;if(we[t]===void 0&&typeof module<"u"&&module&&module.exports&&RT(t))try{e=hs._abbr,n=require,n("./locale/"+t),Jn(e)}catch{we[t]=null}return we[t]}function Jn(t,e){var n;return t&&(lt(e)?n=Sn(t):n=tc(t,e),n?hs=n:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),hs._abbr}function tc(t,e){if(e!==null){var n,r=Cp;if(e.abbr=t,we[t]!=null)lp("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=we[t]._config;else if(e.parentLocale!=null)if(we[e.parentLocale]!=null)r=we[e.parentLocale]._config;else if(n=Bo(e.parentLocale),n!=null)r=n._config;else return fs[e.parentLocale]||(fs[e.parentLocale]=[]),fs[e.parentLocale].push({name:t,config:e}),null;return we[t]=new jl(zl(r,e)),fs[t]&&fs[t].forEach(function(i){tc(i.name,i.config)}),Jn(t),we[t]}else return delete we[t],null}function $T(t,e){if(e!=null){var n,r,i=Cp;we[t]!=null&&we[t].parentLocale!=null?we[t].set(zl(we[t]._config,e)):(r=Bo(t),r!=null&&(i=r._config),e=zl(i,e),r==null&&(e.abbr=t),n=new jl(e),n.parentLocale=we[t],we[t]=n),Jn(t)}else we[t]!=null&&(we[t].parentLocale!=null?(we[t]=we[t].parentLocale,t===Jn()&&Jn(t)):we[t]!=null&&delete we[t]);return we[t]}function Sn(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return hs;if(!Lt(t)){if(e=Bo(t),e)return e;t=[t]}return IT(t)}function LT(){return Wl(we)}function nc(t){var e,n=t._a;return n&&Z(t).overflow===-2&&(e=n[kn]<0||n[kn]>11?kn:n[on]<1||n[on]>Zl(n[Ue],n[kn])?on:n[De]<0||n[De]>24||n[De]===24&&(n[zt]!==0||n[wn]!==0||n[kr]!==0)?De:n[zt]<0||n[zt]>59?zt:n[wn]<0||n[wn]>59?wn:n[kr]<0||n[kr]>999?kr:-1,Z(t)._overflowDayOfYear&&(e<Ue||e>on)&&(e=on),Z(t)._overflowWeeks&&e===-1&&(e=WC),Z(t)._overflowWeekday&&e===-1&&(e=HC),Z(t).overflow=e),t}var FT=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,zT=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,jT=/Z|[+-]\d\d(?::?\d\d)?/,Po=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],rc=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],WT=/^\/?Date\((-?\d+)/i,HT=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,YT={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Ep(t){var e,n,r=t._i,i=FT.exec(r)||zT.exec(r),s,o,a,l,c=Po.length,u=rc.length;if(i){for(Z(t).iso=!0,e=0,n=c;e<n;e++)if(Po[e][1].exec(i[1])){o=Po[e][0],s=Po[e][2]!==!1;break}if(o==null){t._isValid=!1;return}if(i[3]){for(e=0,n=u;e<n;e++)if(rc[e][1].exec(i[3])){a=(i[2]||" ")+rc[e][0];break}if(a==null){t._isValid=!1;return}}if(!s&&a!=null){t._isValid=!1;return}if(i[4])if(jT.exec(i[4]))l="Z";else{t._isValid=!1;return}t._f=o+(a||"")+(l||""),sc(t)}else t._isValid=!1}function UT(t,e,n,r,i,s){var o=[qT(t),yp.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return s&&o.push(parseInt(s,10)),o}function qT(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function KT(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function JT(t,e,n){if(t){var r=Sp.indexOf(t),i=new Date(e[0],e[1],e[2]).getDay();if(r!==i)return Z(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function GT(t,e,n){if(t)return YT[t];if(e)return 0;var r=parseInt(n,10),i=r%100,s=(r-i)/100;return s*60+i}function _p(t){var e=HT.exec(KT(t._i)),n;if(e){if(n=UT(e[4],e[3],e[2],e[5],e[6],e[7]),!JT(e[1],n,t))return;t._a=n,t._tzm=GT(e[8],e[9],e[10]),t._d=ds.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),Z(t).rfc2822=!0}else t._isValid=!1}function ZT(t){var e=WT.exec(t._i);if(e!==null){t._d=new Date(+e[1]);return}if(Ep(t),t._isValid===!1)delete t._isValid;else return;if(_p(t),t._isValid===!1)delete t._isValid;else return;t._strict?t._isValid=!1:_.createFromInputFallback(t)}_.createFromInputFallback=Ct("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))});function li(t,e,n){return t??e??n}function XT(t){var e=new Date(_.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function ic(t){var e,n,r=[],i,s,o;if(!t._d){for(i=XT(t),t._w&&t._a[on]==null&&t._a[kn]==null&&QT(t),t._dayOfYear!=null&&(o=li(t._a[Ue],i[Ue]),(t._dayOfYear>ls(o)||t._dayOfYear===0)&&(Z(t)._overflowDayOfYear=!0),n=ds(o,0,t._dayOfYear),t._a[kn]=n.getUTCMonth(),t._a[on]=n.getUTCDate()),e=0;e<3&&t._a[e]==null;++e)t._a[e]=r[e]=i[e];for(;e<7;e++)t._a[e]=r[e]=t._a[e]==null?e===2?1:0:t._a[e];t._a[De]===24&&t._a[zt]===0&&t._a[wn]===0&&t._a[kr]===0&&(t._nextDay=!0,t._a[De]=0),t._d=(t._useUTC?ds:sT).apply(null,r),s=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[De]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==s&&(Z(t).weekdayMismatch=!0)}}function QT(t){var e,n,r,i,s,o,a,l,c;e=t._w,e.GG!=null||e.W!=null||e.E!=null?(s=1,o=4,n=li(e.GG,t._a[Ue],us(ve(),1,4).year),r=li(e.W,1),i=li(e.E,1),(i<1||i>7)&&(l=!0)):(s=t._locale._week.dow,o=t._locale._week.doy,c=us(ve(),s,o),n=li(e.gg,t._a[Ue],c.year),r=li(e.w,c.week),e.d!=null?(i=e.d,(i<0||i>6)&&(l=!0)):e.e!=null?(i=e.e+s,(e.e<0||e.e>6)&&(l=!0)):i=s),r<1||r>xn(n,s,o)?Z(t)._overflowWeeks=!0:l!=null?Z(t)._overflowWeekday=!0:(a=xp(n,r,i,s,o),t._a[Ue]=a.year,t._dayOfYear=a.dayOfYear)}_.ISO_8601=function(){},_.RFC_2822=function(){};function sc(t){if(t._f===_.ISO_8601){Ep(t);return}if(t._f===_.RFC_2822){_p(t);return}t._a=[],Z(t).empty=!0;var e=""+t._i,n,r,i,s,o,a=e.length,l=0,c,u;for(i=cp(t._f,t._locale).match(Hl)||[],u=i.length,n=0;n<u;n++)s=i[n],r=(e.match(FC(s,t))||[])[0],r&&(o=e.substr(0,e.indexOf(r)),o.length>0&&Z(t).unusedInput.push(o),e=e.slice(e.indexOf(r)+r.length),l+=r.length),ii[s]?(r?Z(t).empty=!1:Z(t).unusedTokens.push(s),jC(s,r,t)):t._strict&&!r&&Z(t).unusedTokens.push(s);Z(t).charsLeftOver=a-l,e.length>0&&Z(t).unusedInput.push(e),t._a[De]<=12&&Z(t).bigHour===!0&&t._a[De]>0&&(Z(t).bigHour=void 0),Z(t).parsedDateParts=t._a.slice(0),Z(t).meridiem=t._meridiem,t._a[De]=eE(t._locale,t._a[De],t._meridiem),c=Z(t).era,c!==null&&(t._a[Ue]=t._locale.erasConvertYear(c,t._a[Ue])),ic(t),nc(t)}function eE(t,e,n){var r;return n==null?e:t.meridiemHour!=null?t.meridiemHour(e,n):(t.isPM!=null&&(r=t.isPM(n),r&&e<12&&(e+=12),!r&&e===12&&(e=0)),e)}function tE(t){var e,n,r,i,s,o,a=!1,l=t._f.length;if(l===0){Z(t).invalidFormat=!0,t._d=new Date(NaN);return}for(i=0;i<l;i++)s=0,o=!1,e=Fl({},t),t._useUTC!=null&&(e._useUTC=t._useUTC),e._f=t._f[i],sc(e),$l(e)&&(o=!0),s+=Z(e).charsLeftOver,s+=Z(e).unusedTokens.length*10,Z(e).score=s,a?s<r&&(r=s,n=e):(r==null||s<r||o)&&(r=s,n=e,o&&(a=!0));Kn(t,n||e)}function nE(t){if(!t._d){var e=Ul(t._i),n=e.day===void 0?e.date:e.day;t._a=ip([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],function(r){return r&&parseInt(r,10)}),ic(t)}}function rE(t){var e=new is(nc(Np(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Np(t){var e=t._i,n=t._f;return t._locale=t._locale||Sn(t._l),e===null||n===void 0&&e===""?So({nullInput:!0}):(typeof e=="string"&&(t._i=e=t._locale.preparse(e)),Ft(e)?new is(nc(e)):(rs(e)?t._d=e:Lt(n)?tE(t):n?sc(t):iE(t),$l(t)||(t._d=null),t))}function iE(t){var e=t._i;lt(e)?t._d=new Date(_.now()):rs(e)?t._d=new Date(e.valueOf()):typeof e=="string"?ZT(t):Lt(e)?(t._a=ip(e.slice(0),function(n){return parseInt(n,10)}),ic(t)):vr(e)?nE(t):bn(e)?t._d=new Date(e):_.createFromInputFallback(t)}function Dp(t,e,n,r,i){var s={};return(e===!0||e===!1)&&(r=e,e=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(vr(t)&&Il(t)||Lt(t)&&t.length===0)&&(t=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=t,s._f=e,s._strict=r,rE(s)}function ve(t,e,n,r){return Dp(t,e,n,r,!1)}var sE=Ct("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=ve.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:So()}),oE=Ct("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=ve.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:So()});function Ap(t,e){var n,r;if(e.length===1&&Lt(e[0])&&(e=e[0]),!e.length)return ve();for(n=e[0],r=1;r<e.length;++r)(!e[r].isValid()||e[r][t](n))&&(n=e[r]);return n}function aE(){var t=[].slice.call(arguments,0);return Ap("isBefore",t)}function lE(){var t=[].slice.call(arguments,0);return Ap("isAfter",t)}var cE=function(){return Date.now?Date.now():+new Date},ps=["year","quarter","month","week","day","hour","minute","second","millisecond"];function dE(t){var e,n=!1,r,i=ps.length;for(e in t)if(ce(t,e)&&!(Me.call(ps,e)!==-1&&(t[e]==null||!isNaN(t[e]))))return!1;for(r=0;r<i;++r)if(t[ps[r]]){if(n)return!1;parseFloat(t[ps[r]])!==se(t[ps[r]])&&(n=!0)}return!0}function uE(){return this._isValid}function fE(){return jt(NaN)}function Io(t){var e=Ul(t),n=e.year||0,r=e.quarter||0,i=e.month||0,s=e.week||e.isoWeek||0,o=e.day||0,a=e.hour||0,l=e.minute||0,c=e.second||0,u=e.millisecond||0;this._isValid=dE(e),this._milliseconds=+u+c*1e3+l*6e4+a*1e3*60*60,this._days=+o+s*7,this._months=+i+r*3+n*12,this._data={},this._locale=Sn(),this._bubble()}function Ro(t){return t instanceof Io}function oc(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function hE(t,e,n){var r=Math.min(t.length,e.length),i=Math.abs(t.length-e.length),s=0,o;for(o=0;o<r;o++)se(t[o])!==se(e[o])&&s++;return s+i}function Vp(t,e){W(t,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+sn(~~(n/60),2)+e+sn(~~n%60,2)})}Vp("Z",":"),Vp("ZZ",""),L("Z",No),L("ZZ",No),ge(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=ac(No,t)});var pE=/([\+\-]|\d\d)/gi;function ac(t,e){var n=(e||"").match(t),r,i,s;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(pE)||["-",0,0],s=+(i[1]*60)+se(i[2]),s===0?0:i[0]==="+"?s:-s)}function lc(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(Ft(t)||rs(t)?t.valueOf():ve(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),_.updateOffset(n,!1),n):ve(t).local()}function cc(t){return-Math.round(t._d.getTimezoneOffset())}_.updateOffset=function(){};function mE(t,e,n){var r=this._offset||0,i;if(!this.isValid())return t!=null?this:NaN;if(t!=null){if(typeof t=="string"){if(t=ac(No,t),t===null)return this}else Math.abs(t)<16&&!n&&(t=t*60);return!this._isUTC&&e&&(i=cc(this)),this._offset=t,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==t&&(!e||this._changeInProgress?Rp(this,jt(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,_.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:cc(this)}function gE(t,e){return t!=null?(typeof t!="string"&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function yE(t){return this.utcOffset(0,t)}function bE(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(cc(this),"m")),this}function vE(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var t=ac($C,this._i);t!=null?this.utcOffset(t):this.utcOffset(0,!0)}return this}function kE(t){return this.isValid()?(t=t?ve(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function wE(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function xE(){if(!lt(this._isDSTShifted))return this._isDSTShifted;var t={},e;return Fl(t,this),t=Np(t),t._a?(e=t._isUTC?nn(t._a):ve(t._a),this._isDSTShifted=this.isValid()&&hE(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function SE(){return this.isValid()?!this._isUTC:!1}function ME(){return this.isValid()?this._isUTC:!1}function Bp(){return this.isValid()?this._isUTC&&this._offset===0:!1}var OE=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,CE=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function jt(t,e){var n=t,r=null,i,s,o;return Ro(t)?n={ms:t._milliseconds,d:t._days,M:t._months}:bn(t)||!isNaN(+t)?(n={},e?n[e]=+t:n.milliseconds=+t):(r=OE.exec(t))?(i=r[1]==="-"?-1:1,n={y:0,d:se(r[on])*i,h:se(r[De])*i,m:se(r[zt])*i,s:se(r[wn])*i,ms:se(oc(r[kr]*1e3))*i}):(r=CE.exec(t))?(i=r[1]==="-"?-1:1,n={y:wr(r[2],i),M:wr(r[3],i),w:wr(r[4],i),d:wr(r[5],i),h:wr(r[6],i),m:wr(r[7],i),s:wr(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(o=TE(ve(n.from),ve(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),s=new Io(n),Ro(t)&&ce(t,"_locale")&&(s._locale=t._locale),Ro(t)&&ce(t,"_isValid")&&(s._isValid=t._isValid),s}jt.fn=Io.prototype,jt.invalid=fE;function wr(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Pp(t,e){var n={};return n.months=e.month()-t.month()+(e.year()-t.year())*12,t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function TE(t,e){var n;return t.isValid()&&e.isValid()?(e=lc(e,t),t.isBefore(e)?n=Pp(t,e):(n=Pp(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Ip(t,e){return function(n,r){var i,s;return r!==null&&!isNaN(+r)&&(lp(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=jt(n,r),Rp(this,i,t),this}}function Rp(t,e,n,r){var i=e._milliseconds,s=oc(e._days),o=oc(e._months);t.isValid()&&(r=r??!0,o&&vp(t,cs(t,"Month")+o*n),s&&gp(t,"Date",cs(t,"Date")+s*n),i&&t._d.setTime(t._d.valueOf()+i*n),r&&_.updateOffset(t,s||o))}var EE=Ip(1,"add"),_E=Ip(-1,"subtract");function $p(t){return typeof t=="string"||t instanceof String}function NE(t){return Ft(t)||rs(t)||$p(t)||bn(t)||AE(t)||DE(t)||t===null||t===void 0}function DE(t){var e=vr(t)&&!Il(t),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,s,o=r.length;for(i=0;i<o;i+=1)s=r[i],n=n||ce(t,s);return e&&n}function AE(t){var e=Lt(t),n=!1;return e&&(n=t.filter(function(r){return!bn(r)&&$p(t)}).length===0),e&&n}function VE(t){var e=vr(t)&&!Il(t),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,s;for(i=0;i<r.length;i+=1)s=r[i],n=n||ce(t,s);return e&&n}function BE(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function PE(t,e){arguments.length===1&&(arguments[0]?NE(arguments[0])?(t=arguments[0],e=void 0):VE(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||ve(),r=lc(n,this).startOf("day"),i=_.calendarFormat(this,r)||"sameElse",s=e&&(rn(e[i])?e[i].call(this,n):e[i]);return this.format(s||this.localeData().calendar(i,this,ve(n)))}function IE(){return new is(this)}function RE(t,e){var n=Ft(t)?t:ve(t);return this.isValid()&&n.isValid()?(e=Tt(e)||"millisecond",e==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf()):!1}function $E(t,e){var n=Ft(t)?t:ve(t);return this.isValid()&&n.isValid()?(e=Tt(e)||"millisecond",e==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf()):!1}function LE(t,e,n,r){var i=Ft(t)?t:ve(t),s=Ft(e)?e:ve(e);return this.isValid()&&i.isValid()&&s.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(s,n):!this.isAfter(s,n))):!1}function FE(t,e){var n=Ft(t)?t:ve(t),r;return this.isValid()&&n.isValid()?(e=Tt(e)||"millisecond",e==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(e).valueOf()<=r&&r<=this.clone().endOf(e).valueOf())):!1}function zE(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function jE(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function WE(t,e,n){var r,i,s;if(!this.isValid())return NaN;if(r=lc(t,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,e=Tt(e),e){case"year":s=$o(this,r)/12;break;case"month":s=$o(this,r);break;case"quarter":s=$o(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-i)/864e5;break;case"week":s=(this-r-i)/6048e5;break;default:s=this-r}return n?s:Et(s)}function $o(t,e){if(t.date()<e.date())return-$o(e,t);var n=(e.year()-t.year())*12+(e.month()-t.month()),r=t.clone().add(n,"months"),i,s;return e-r<0?(i=t.clone().add(n-1,"months"),s=(e-r)/(r-i)):(i=t.clone().add(n+1,"months"),s=(e-r)/(i-r)),-(n+s)||0}_.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",_.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function HE(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function YE(t){if(!this.isValid())return null;var e=t!==!0,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?Oo(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):rn(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Oo(n,"Z")):Oo(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function UE(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="",n,r,i,s;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",s=e+'[")]',this.format(n+r+i+s)}function qE(t){t||(t=this.isUtc()?_.defaultFormatUtc:_.defaultFormat);var e=Oo(this,t);return this.localeData().postformat(e)}function KE(t,e){return this.isValid()&&(Ft(t)&&t.isValid()||ve(t).isValid())?jt({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function JE(t){return this.from(ve(),t)}function GE(t,e){return this.isValid()&&(Ft(t)&&t.isValid()||ve(t).isValid())?jt({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ZE(t){return this.to(ve(),t)}function Lp(t){var e;return t===void 0?this._locale._abbr:(e=Sn(t),e!=null&&(this._locale=e),this)}var Fp=Ct("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function zp(){return this._locale}var Lo=1e3,ci=60*Lo,Fo=60*ci,jp=(365*400+97)*24*Fo;function di(t,e){return(t%e+e)%e}function Wp(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-jp:new Date(t,e,n).valueOf()}function Hp(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-jp:Date.UTC(t,e,n)}function XE(t){var e,n;if(t=Tt(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Hp:Wp,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=di(e+(this._isUTC?0:this.utcOffset()*ci),Fo);break;case"minute":e=this._d.valueOf(),e-=di(e,ci);break;case"second":e=this._d.valueOf(),e-=di(e,Lo);break}return this._d.setTime(e),_.updateOffset(this,!0),this}function QE(t){var e,n;if(t=Tt(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?Hp:Wp,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=Fo-di(e+(this._isUTC?0:this.utcOffset()*ci),Fo)-1;break;case"minute":e=this._d.valueOf(),e+=ci-di(e,ci)-1;break;case"second":e=this._d.valueOf(),e+=Lo-di(e,Lo)-1;break}return this._d.setTime(e),_.updateOffset(this,!0),this}function e_(){return this._d.valueOf()-(this._offset||0)*6e4}function t_(){return Math.floor(this.valueOf()/1e3)}function n_(){return new Date(this.valueOf())}function r_(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function i_(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function s_(){return this.isValid()?this.toISOString():null}function o_(){return $l(this)}function a_(){return Kn({},Z(this))}function l_(){return Z(this).overflow}function c_(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}W("N",0,0,"eraAbbr"),W("NN",0,0,"eraAbbr"),W("NNN",0,0,"eraAbbr"),W("NNNN",0,0,"eraName"),W("NNNNN",0,0,"eraNarrow"),W("y",["y",1],"yo","eraYear"),W("y",["yy",2],0,"eraYear"),W("y",["yyy",3],0,"eraYear"),W("y",["yyyy",4],0,"eraYear"),L("N",dc),L("NN",dc),L("NNN",dc),L("NNNN",k_),L("NNNNN",w_),ge(["N","NN","NNN","NNNN","NNNNN"],function(t,e,n,r){var i=n._locale.erasParse(t,r,n._strict);i?Z(n).era=i:Z(n).invalidEra=t}),L("y",si),L("yy",si),L("yyy",si),L("yyyy",si),L("yo",x_),ge(["y","yy","yyy","yyyy"],Ue),ge(["yo"],function(t,e,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[Ue]=n._locale.eraYearOrdinalParse(t,i):e[Ue]=parseInt(t,10)});function d_(t,e){var n,r,i,s=this._eras||Sn("en")._eras;for(n=0,r=s.length;n<r;++n){switch(typeof s[n].since){case"string":i=_(s[n].since).startOf("day"),s[n].since=i.valueOf();break}switch(typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":i=_(s[n].until).startOf("day").valueOf(),s[n].until=i.valueOf();break}}return s}function u_(t,e,n){var r,i,s=this.eras(),o,a,l;for(t=t.toUpperCase(),r=0,i=s.length;r<i;++r)if(o=s[r].name.toUpperCase(),a=s[r].abbr.toUpperCase(),l=s[r].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(a===t)return s[r];break;case"NNNN":if(o===t)return s[r];break;case"NNNNN":if(l===t)return s[r];break}else if([o,a,l].indexOf(t)>=0)return s[r]}function f_(t,e){var n=t.since<=t.until?1:-1;return e===void 0?_(t.since).year():_(t.since).year()+(e-t.offset)*n}function h_(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].name;return""}function p_(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].narrow;return""}function m_(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].abbr;return""}function g_(){var t,e,n,r,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t)if(n=i[t].since<=i[t].until?1:-1,r=this.clone().startOf("day").valueOf(),i[t].since<=r&&r<=i[t].until||i[t].until<=r&&r<=i[t].since)return(this.year()-_(i[t].since).year())*n+i[t].offset;return this.year()}function y_(t){return ce(this,"_erasNameRegex")||uc.call(this),t?this._erasNameRegex:this._erasRegex}function b_(t){return ce(this,"_erasAbbrRegex")||uc.call(this),t?this._erasAbbrRegex:this._erasRegex}function v_(t){return ce(this,"_erasNarrowRegex")||uc.call(this),t?this._erasNarrowRegex:this._erasRegex}function dc(t,e){return e.erasAbbrRegex(t)}function k_(t,e){return e.erasNameRegex(t)}function w_(t,e){return e.erasNarrowRegex(t)}function x_(t,e){return e._eraYearOrdinalRegex||si}function uc(){var t=[],e=[],n=[],r=[],i,s,o,a,l,c=this.eras();for(i=0,s=c.length;i<s;++i)o=vn(c[i].name),a=vn(c[i].abbr),l=vn(c[i].narrow),e.push(o),t.push(a),n.push(l),r.push(o),r.push(a),r.push(l);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}W(0,["gg",2],0,function(){return this.weekYear()%100}),W(0,["GG",2],0,function(){return this.isoWeekYear()%100});function zo(t,e){W(0,[t,t.length],0,e)}zo("gggg","weekYear"),zo("ggggg","weekYear"),zo("GGGG","isoWeekYear"),zo("GGGGG","isoWeekYear"),L("G",_o),L("g",_o),L("GG",be,yt),L("gg",be,yt),L("GGGG",Kl,ql),L("gggg",Kl,ql),L("GGGGG",Eo,Co),L("ggggg",Eo,Co),as(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=se(t)}),as(["gg","GG"],function(t,e,n,r){e[r]=_.parseTwoDigitYear(t)});function S_(t){return Yp.call(this,t,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function M_(t){return Yp.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function O_(){return xn(this.year(),1,4)}function C_(){return xn(this.isoWeekYear(),1,4)}function T_(){var t=this.localeData()._week;return xn(this.year(),t.dow,t.doy)}function E_(){var t=this.localeData()._week;return xn(this.weekYear(),t.dow,t.doy)}function Yp(t,e,n,r,i){var s;return t==null?us(this,r,i).year:(s=xn(t,r,i),e>s&&(e=s),__.call(this,t,e,n,r,i))}function __(t,e,n,r,i){var s=xp(t,e,n,r,i),o=ds(s.year,0,s.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}W("Q",0,"Qo","quarter"),L("Q",up),ge("Q",function(t,e){e[kn]=(se(t)-1)*3});function N_(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}W("D",["DD",2],"Do","date"),L("D",be,oi),L("DD",be,yt),L("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),ge(["D","DD"],on),ge("Do",function(t,e){e[on]=se(t.match(be)[0])});var Up=ai("Date",!0);W("DDD",["DDDD",3],"DDDo","dayOfYear"),L("DDD",To),L("DDDD",fp),ge(["DDD","DDDD"],function(t,e,n){n._dayOfYear=se(t)});function D_(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?e:this.add(t-e,"d")}W("m",["mm",2],0,"minute"),L("m",be,Jl),L("mm",be,yt),ge(["m","mm"],zt);var A_=ai("Minutes",!1);W("s",["ss",2],0,"second"),L("s",be,Jl),L("ss",be,yt),ge(["s","ss"],wn);var V_=ai("Seconds",!1);W("S",0,0,function(){return~~(this.millisecond()/100)}),W(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),W(0,["SSS",3],0,"millisecond"),W(0,["SSSS",4],0,function(){return this.millisecond()*10}),W(0,["SSSSS",5],0,function(){return this.millisecond()*100}),W(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),W(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),W(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),W(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),L("S",To,up),L("SS",To,yt),L("SSS",To,fp);var Gn,qp;for(Gn="SSSS";Gn.length<=9;Gn+="S")L(Gn,si);function B_(t,e){e[kr]=se(("0."+t)*1e3)}for(Gn="S";Gn.length<=9;Gn+="S")ge(Gn,B_);qp=ai("Milliseconds",!1),W("z",0,0,"zoneAbbr"),W("zz",0,0,"zoneName");function P_(){return this._isUTC?"UTC":""}function I_(){return this._isUTC?"Coordinated Universal Time":""}var A=is.prototype;A.add=EE,A.calendar=PE,A.clone=IE,A.diff=WE,A.endOf=QE,A.format=qE,A.from=KE,A.fromNow=JE,A.to=GE,A.toNow=ZE,A.get=UC,A.invalidAt=l_,A.isAfter=RE,A.isBefore=$E,A.isBetween=LE,A.isSame=FE,A.isSameOrAfter=zE,A.isSameOrBefore=jE,A.isValid=o_,A.lang=Fp,A.locale=Lp,A.localeData=zp,A.max=oE,A.min=sE,A.parsingFlags=a_,A.set=qC,A.startOf=XE,A.subtract=_E,A.toArray=r_,A.toObject=i_,A.toDate=n_,A.toISOString=YE,A.inspect=UE,typeof Symbol<"u"&&Symbol.for!=null&&(A[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),A.toJSON=s_,A.toString=HE,A.unix=t_,A.valueOf=e_,A.creationData=c_,A.eraName=h_,A.eraNarrow=p_,A.eraAbbr=m_,A.eraYear=g_,A.year=mp,A.isLeapYear=YC,A.weekYear=S_,A.isoWeekYear=M_,A.quarter=A.quarters=N_,A.month=kp,A.daysInMonth=nT,A.week=A.weeks=dT,A.isoWeek=A.isoWeeks=uT,A.weeksInYear=T_,A.weeksInWeekYear=E_,A.isoWeeksInYear=O_,A.isoWeeksInISOWeekYear=C_,A.date=Up,A.day=A.days=MT,A.weekday=OT,A.isoWeekday=CT,A.dayOfYear=D_,A.hour=A.hours=VT,A.minute=A.minutes=A_,A.second=A.seconds=V_,A.millisecond=A.milliseconds=qp,A.utcOffset=mE,A.utc=yE,A.local=bE,A.parseZone=vE,A.hasAlignedHourOffset=kE,A.isDST=wE,A.isLocal=SE,A.isUtcOffset=ME,A.isUtc=Bp,A.isUTC=Bp,A.zoneAbbr=P_,A.zoneName=I_,A.dates=Ct("dates accessor is deprecated. Use date instead.",Up),A.months=Ct("months accessor is deprecated. Use month instead",kp),A.years=Ct("years accessor is deprecated. Use year instead",mp),A.zone=Ct("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gE),A.isDSTShifted=Ct("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",xE);function R_(t){return ve(t*1e3)}function $_(){return ve.apply(null,arguments).parseZone()}function Kp(t){return t}var de=jl.prototype;de.calendar=SC,de.longDateFormat=TC,de.invalidDate=_C,de.ordinal=AC,de.preparse=Kp,de.postformat=Kp,de.relativeTime=BC,de.pastFuture=PC,de.set=wC,de.eras=d_,de.erasParse=u_,de.erasConvertYear=f_,de.erasAbbrRegex=b_,de.erasNameRegex=y_,de.erasNarrowRegex=v_,de.months=XC,de.monthsShort=QC,de.monthsParse=tT,de.monthsRegex=iT,de.monthsShortRegex=rT,de.week=oT,de.firstDayOfYear=cT,de.firstDayOfWeek=lT,de.weekdays=vT,de.weekdaysMin=wT,de.weekdaysShort=kT,de.weekdaysParse=ST,de.weekdaysRegex=TT,de.weekdaysShortRegex=ET,de.weekdaysMinRegex=_T,de.isPM=DT,de.meridiem=BT;function jo(t,e,n,r){var i=Sn(),s=nn().set(r,e);return i[n](s,t)}function Jp(t,e,n){if(bn(t)&&(e=t,t=void 0),t=t||"",e!=null)return jo(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=jo(t,r,n,"month");return i}function fc(t,e,n,r){typeof t=="boolean"?(bn(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,bn(e)&&(n=e,e=void 0),e=e||"");var i=Sn(),s=t?i._week.dow:0,o,a=[];if(n!=null)return jo(e,(n+s)%7,r,"day");for(o=0;o<7;o++)a[o]=jo(e,(o+s)%7,r,"day");return a}function L_(t,e){return Jp(t,e,"months")}function F_(t,e){return Jp(t,e,"monthsShort")}function z_(t,e,n){return fc(t,e,n,"weekdays")}function j_(t,e,n){return fc(t,e,n,"weekdaysShort")}function W_(t,e,n){return fc(t,e,n,"weekdaysMin")}Jn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=se(t%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return t+n}}),_.lang=Ct("moment.lang is deprecated. Use moment.locale instead.",Jn),_.langData=Ct("moment.langData is deprecated. Use moment.localeData instead.",Sn);var Mn=Math.abs;function H_(){var t=this._data;return this._milliseconds=Mn(this._milliseconds),this._days=Mn(this._days),this._months=Mn(this._months),t.milliseconds=Mn(t.milliseconds),t.seconds=Mn(t.seconds),t.minutes=Mn(t.minutes),t.hours=Mn(t.hours),t.months=Mn(t.months),t.years=Mn(t.years),this}function Gp(t,e,n,r){var i=jt(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function Y_(t,e){return Gp(this,t,e,1)}function U_(t,e){return Gp(this,t,e,-1)}function Zp(t){return t<0?Math.floor(t):Math.ceil(t)}function q_(){var t=this._milliseconds,e=this._days,n=this._months,r=this._data,i,s,o,a,l;return t>=0&&e>=0&&n>=0||t<=0&&e<=0&&n<=0||(t+=Zp(hc(n)+e)*864e5,e=0,n=0),r.milliseconds=t%1e3,i=Et(t/1e3),r.seconds=i%60,s=Et(i/60),r.minutes=s%60,o=Et(s/60),r.hours=o%24,e+=Et(o/24),l=Et(Xp(e)),n+=l,e-=Zp(hc(l)),a=Et(n/12),n%=12,r.days=e,r.months=n,r.years=a,this}function Xp(t){return t*4800/146097}function hc(t){return t*146097/4800}function K_(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if(t=Tt(t),t==="month"||t==="quarter"||t==="year")switch(e=this._days+r/864e5,n=this._months+Xp(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(hc(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return e*24+r/36e5;case"minute":return e*1440+r/6e4;case"second":return e*86400+r/1e3;case"millisecond":return Math.floor(e*864e5)+r;default:throw new Error("Unknown unit "+t)}}function On(t){return function(){return this.as(t)}}var Qp=On("ms"),J_=On("s"),G_=On("m"),Z_=On("h"),X_=On("d"),Q_=On("w"),eN=On("M"),tN=On("Q"),nN=On("y"),rN=Qp;function iN(){return jt(this)}function sN(t){return t=Tt(t),this.isValid()?this[t+"s"]():NaN}function xr(t){return function(){return this.isValid()?this._data[t]:NaN}}var oN=xr("milliseconds"),aN=xr("seconds"),lN=xr("minutes"),cN=xr("hours"),dN=xr("days"),uN=xr("months"),fN=xr("years");function hN(){return Et(this.days()/7)}var Cn=Math.round,ui={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function pN(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function mN(t,e,n,r){var i=jt(t).abs(),s=Cn(i.as("s")),o=Cn(i.as("m")),a=Cn(i.as("h")),l=Cn(i.as("d")),c=Cn(i.as("M")),u=Cn(i.as("w")),f=Cn(i.as("y")),h=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||o<=1&&["m"]||o<n.m&&["mm",o]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return n.w!=null&&(h=h||u<=1&&["w"]||u<n.w&&["ww",u]),h=h||c<=1&&["M"]||c<n.M&&["MM",c]||f<=1&&["y"]||["yy",f],h[2]=e,h[3]=+t>0,h[4]=r,pN.apply(null,h)}function gN(t){return t===void 0?Cn:typeof t=="function"?(Cn=t,!0):!1}function yN(t,e){return ui[t]===void 0?!1:e===void 0?ui[t]:(ui[t]=e,t==="s"&&(ui.ss=e-1),!0)}function bN(t,e){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=ui,i,s;return typeof t=="object"&&(e=t,t=!1),typeof t=="boolean"&&(n=t),typeof e=="object"&&(r=Object.assign({},ui,e),e.s!=null&&e.ss==null&&(r.ss=e.s-1)),i=this.localeData(),s=mN(this,!n,r,i),n&&(s=i.pastFuture(+this,s)),i.postformat(s)}var pc=Math.abs;function fi(t){return(t>0)-(t<0)||+t}function Wo(){if(!this.isValid())return this.localeData().invalidDate();var t=pc(this._milliseconds)/1e3,e=pc(this._days),n=pc(this._months),r,i,s,o,a=this.asSeconds(),l,c,u,f;return a?(r=Et(t/60),i=Et(r/60),t%=60,r%=60,s=Et(n/12),n%=12,o=t?t.toFixed(3).replace(/\.?0+$/,""):"",l=a<0?"-":"",c=fi(this._months)!==fi(a)?"-":"",u=fi(this._days)!==fi(a)?"-":"",f=fi(this._milliseconds)!==fi(a)?"-":"",l+"P"+(s?c+s+"Y":"")+(n?c+n+"M":"")+(e?u+e+"D":"")+(i||r||t?"T":"")+(i?f+i+"H":"")+(r?f+r+"M":"")+(t?f+o+"S":"")):"P0D"}var le=Io.prototype;le.isValid=uE,le.abs=H_,le.add=Y_,le.subtract=U_,le.as=K_,le.asMilliseconds=Qp,le.asSeconds=J_,le.asMinutes=G_,le.asHours=Z_,le.asDays=X_,le.asWeeks=Q_,le.asMonths=eN,le.asQuarters=tN,le.asYears=nN,le.valueOf=rN,le._bubble=q_,le.clone=iN,le.get=sN,le.milliseconds=oN,le.seconds=aN,le.minutes=lN,le.hours=cN,le.days=dN,le.weeks=hN,le.months=uN,le.years=fN,le.humanize=bN,le.toISOString=Wo,le.toString=Wo,le.toJSON=Wo,le.locale=Lp,le.localeData=zp,le.toIsoString=Ct("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Wo),le.lang=Fp,W("X",0,0,"unix"),W("x",0,0,"valueOf"),L("x",_o),L("X",LC),ge("X",function(t,e,n){n._d=new Date(parseFloat(t)*1e3)}),ge("x",function(t,e,n){n._d=new Date(se(t))});//! moment.js
129
- _.version="2.30.1",vC(ve),_.fn=A,_.min=aE,_.max=lE,_.now=cE,_.utc=nn,_.unix=R_,_.months=L_,_.isDate=rs,_.locale=Jn,_.invalid=So,_.duration=jt,_.isMoment=Ft,_.weekdays=z_,_.parseZone=$_,_.localeData=Sn,_.isDuration=Ro,_.monthsShort=F_,_.weekdaysMin=W_,_.defineLocale=tc,_.updateLocale=$T,_.locales=LT,_.weekdaysShort=j_,_.normalizeUnits=Tt,_.relativeTimeRounding=gN,_.relativeTimeThreshold=yN,_.calendarFormat=BE,_.prototype=A,_.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const em={__name:"DayItem",props:{day:{},today:Boolean,selected:Boolean,off:Boolean,between:Boolean,firstDay:Boolean,lastDay:Boolean},setup(t){const e={pmi:"","wpic-tools":"hover:text-lime-500 group-[.is-off]:text-slate-400 group-[.is-today]:text-lime-500 group-[.is-today]:font-medium group-[.is-selected]:bg-lime-500 group-[.is-selected]:text-white rounded-full"},n={pmi:"","wpic-tools":"bg-slate-100"},r={pmi:"","wpic-tools":"bg-slate-100 rounded-l-0"},i={pmi:"","wpic-tools":"bg-slate-100 rounded-r-0"};return(s,o)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["relative flex items-center justify-center text-sm py-2 group",{"is-today":t.today&&!t.selected,"is-selected":t.selected,"is-off":t.off,"cursor-pointer":!t.off}])},[d.createElementVNode("div",{class:d.normalizeClass(["h-8 w-full flex justify-center items-center",{[`${n[d.unref(Se).theme]}`]:t.between,[`${r[d.unref(Se).theme]}`]:t.firstDay,[`${i[d.unref(Se).theme]}`]:t.lastDay}]),style:d.normalizeStyle({marginLeft:t.firstDay?"50%":void 0,marginRight:t.lastDay?"50%":void 0})},[d.createElementVNode("span",{class:d.normalizeClass(["absolute w-8 h-8 flex items-center justify-center",[`${e[d.unref(Se).theme]}`]]),style:{left:"50%",transform:"translateX(-50%)"}},[d.renderSlot(s.$slots,"default",{},()=>[d.createTextVNode(d.toDisplayString(t.day),1)])],2)],6)],2))}},vN={},kN={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},wN=[d.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.72 9.47a.75.75 0 0 0 0 1.06l4.25 4.25a.75.75 0 1 0 1.06-1.06L6.31 10l3.72-3.72a.75.75 0 1 0-1.06-1.06L4.72 9.47Zm9.25-4.25L9.72 9.47a.75.75 0 0 0 0 1.06l4.25 4.25a.75.75 0 1 0 1.06-1.06L11.31 10l3.72-3.72a.75.75 0 0 0-1.06-1.06Z","clip-rule":"evenodd"},null,-1)];function xN(t,e){return d.openBlock(),d.createElementBlock("svg",kN,wN)}const SN=ye(vN,[["render",xN]]),MN={},ON={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},CN=[d.createElementVNode("path",{"fill-rule":"evenodd",d:"M15.28 9.47a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 1 1-1.06-1.06L13.69 10 9.97 6.28a.75.75 0 0 1 1.06-1.06l4.25 4.25ZM6.03 5.22l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L8.69 10 4.97 6.28a.75.75 0 0 1 1.06-1.06Z","clip-rule":"evenodd"},null,-1)];function TN(t,e){return d.openBlock(),d.createElementBlock("svg",ON,CN)}const EN=ye(MN,[["render",TN]]),_N={},NN={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},DN=[d.createElementVNode("path",{"fill-rule":"evenodd",d:"M11.78 5.22a.75.75 0 0 1 0 1.06L8.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z","clip-rule":"evenodd"},null,-1)];function AN(t,e){return d.openBlock(),d.createElementBlock("svg",NN,DN)}const VN=ye(_N,[["render",AN]]),BN={},PN={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},IN=[d.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"},null,-1)];function RN(t,e){return d.openBlock(),d.createElementBlock("svg",PN,IN)}const $N=ye(BN,[["render",RN]]),LN={class:"w-full"},FN={class:"flex justify-between items-center mb-3"},zN={class:"flex"},jN={class:"font-medium"},WN={class:"flex"},HN={class:"grid grid-cols-7 border-b mb-2 pb-2"},YN={class:"flex justify-center text-sm"},UN={class:"grid grid-cols-7"},tm=Object.assign({name:"WpicCalendar"},{props:{modelValue:{},range:Boolean,doubleMonths:Boolean},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=d.ref([_(new Date),_(new Date).add(1,"month")]);d.onMounted(()=>{});const i=e,s=d.computed(()=>n.doubleMonths?[0,1]:[0]);function o(b){var C,v,T;if(n.range){if(((C=n.modelValue)==null?void 0:C.length)==0)i("update:modelValue",[b]);else if(((v=n.modelValue)==null?void 0:v.length)==2)i("update:modelValue",[b]);else if(((T=n.modelValue)==null?void 0:T.length)==1){let B=[_(n.modelValue[0]),_(b)];B=B.sort((V,F)=>V-F),i("update:modelValue",B)}}else i("update:modelValue",_(b))}function a(b){const C=_(b).daysInMonth(),v=[];for(let T=1;T<=C;T++){let B=_().date(T).month(_(b).month()).year(_(b).year());v.push(B)}return v}function l(b){return _(b).startOf("month").day()}function c(b){return _(b).subtract(1,"month")}function u(b){const C=_();return _(b).isSame(C,"day")}function f(b){var C,v;if(n.range){if(((C=n.modelValue)==null?void 0:C.length)==1)return _(b).isSame(_(n.modelValue[0]),"day");if(((v=n.modelValue)==null?void 0:v.length)==2)return _(b).isSame(_(n.modelValue[0]),"day")||_(b).isSame(_(n.modelValue[1]),"day")}else if(n.modelValue)return _(b).isSame(_(n.modelValue),"day")}function h(b){var C;if(n.range&&((C=n.modelValue)==null?void 0:C.length)==2)return _(b).isBetween(_(n.modelValue[0]),_(n.modelValue[1]))}function p(b){var C;if(n.range&&((C=n.modelValue)==null?void 0:C.length)==2)return _(b).isSame(_(n.modelValue[0]),"day")}function m(b){var C;if(n.range&&((C=n.modelValue)==null?void 0:C.length)==2)return _(b).isSame(_(n.modelValue[1]),"day")}function y(b){O(b,r.value[b].subtract(1,"month"))}function g(b){O(b,r.value[b].add(1,"month"))}function k(b){O(b,r.value[b].subtract(1,"year"))}function x(b){O(b,r.value[b].add(1,"year"))}function O(b,C){b==0?r.value=[C,r.value[1]]:r.value=[r.value[0],C]}return(b,C)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["flex-shrink-0 flex gap-6",{"min-w-96":s.value.length===1,"min-w-192":s.value.length===2}])},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.value,v=>(d.openBlock(),d.createElementBlock("div",LN,[d.createElementVNode("div",FN,[d.createElementVNode("div",zN,[d.createVNode(SN,{class:"w-5 h-5 cursor-pointer select-none opacity-50 hover:opacity-100",onClick:T=>k(v)},null,8,["onClick"]),d.createVNode(VN,{class:"w-5 h-5 cursor-pointer select-none opacity-50 hover:opacity-100",onClick:T=>y(v)},null,8,["onClick"])]),d.createElementVNode("div",jN,d.toDisplayString(r.value[v].format("YYYY MMMM")),1),d.createElementVNode("div",WN,[d.createVNode($N,{class:"w-5 h-5 cursor-pointer select-none opacity-50 hover:opacity-100",onClick:T=>g(v)},null,8,["onClick"]),d.createVNode(EN,{class:"w-5 h-5 cursor-pointer select-none opacity-50 hover:opacity-100",onClick:T=>x(v)},null,8,["onClick"])])]),d.createElementVNode("div",HN,[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(7,T=>{var B;return d.createElementVNode("div",YN,d.toDisplayString((B=r.value[v])==null?void 0:B.clone().startOf("week").subtract(1,"days").add(T,"days").format("ddd")),1)}),64))]),d.createElementVNode("div",UN,[l(r.value[v])>0?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:0},d.renderList(l(r.value[v]),T=>(d.openBlock(),d.createBlock(em,{off:""},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(c(r.value[v]).clone().endOf("month").subtract(l(r.value[v])-T,"days").format("D")),1)]),_:2},1024))),256)):d.createCommentVNode("",!0),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(a(r.value[v].clone()),T=>(d.openBlock(),d.createBlock(em,{onClick:B=>o(T),today:u(T),selected:f(T,r.value[v]),firstDay:p(T,r.value[v]),lastDay:m(T,r.value[v]),between:h(T,r.value[v])},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(d.unref(_)(T).format("D")),1)]),_:2},1032,["onClick","today","selected","firstDay","lastDay","between"]))),256))])]))),256))],2))}}),qN={},KN={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},JN=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.75 2.994v2.25m10.5-2.25v2.25m-14.252 13.5V7.491a2.25 2.25 0 0 1 2.25-2.25h13.5a2.25 2.25 0 0 1 2.25 2.25v11.251m-18 0a2.25 2.25 0 0 0 2.25 2.25h13.5a2.25 2.25 0 0 0 2.25-2.25m-18 0v-7.5a2.25 2.25 0 0 1 2.25-2.25h13.5a2.25 2.25 0 0 1 2.25 2.25v7.5m-6.75-6h2.25m-9 2.25h4.5m.002-2.25h.005v.006H12v-.006Zm-.001 4.5h.006v.006h-.006v-.005Zm-2.25.001h.005v.006H9.75v-.006Zm-2.25 0h.005v.005h-.006v-.005Zm6.75-2.247h.005v.005h-.005v-.005Zm0 2.247h.006v.006h-.006v-.006Zm2.25-2.248h.006V15H16.5v-.005Z"},null,-1)];function GN(t,e){return d.openBlock(),d.createElementBlock("svg",KN,JN)}const ZN=ye(qN,[["render",GN]]),XN={},QN={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},e2=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z"},null,-1)];function t2(t,e){return d.openBlock(),d.createElementBlock("svg",QN,e2)}const n2=ye(XN,[["render",t2]]),mc={WpicCalendar:tm,WpicDateField:Object.assign({name:"WpicDateField"},{props:{modelValue:{},label:String,placeholder:{type:String,default:"Select date"},range:Boolean,disabled:Boolean,large:Boolean,info:String,doubleMonths:Boolean},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e;function i(o){r("update:modelValue",o)}const s=d.computed(()=>{var o;if(n.range)return(o=n.modelValue)==null?void 0:o.map(a=>_(a).format("YYYY-MM-DD")).join(" to ");if(n.modelValue)return _(n.modelValue).format("YYYY-MM-DD")});return(o,a)=>(d.openBlock(),d.createBlock(Ci,{disabled:t.disabled},{content:d.withCtx(()=>[d.createVNode(tm,{doubleMonths:t.doubleMonths,modelValue:t.modelValue,"onUpdate:modelValue":i,range:t.range},null,8,["doubleMonths","modelValue","range"])]),default:d.withCtx(()=>[d.createVNode(Md,{label:t.label,disabled:t.disabled,large:t.large,info:t.info},{prepend:d.withCtx(()=>[t.range?(d.openBlock(),d.createBlock(ZN,{key:0})):(d.openBlock(),d.createBlock(n2,{key:1}))]),default:d.withCtx(()=>[d.createTextVNode(" "+d.toDisplayString(s.value||t.placeholder),1)]),_:1},8,["label","disabled","large","info"])]),_:1},8,["disabled"]))}}),WpicFormInput:Md,WpicButton:Mg,WpicBadge:bC,WpicTextEditor:yC,WpicInputGroup:Ag,WpicButtonGroup:Eg,WpicForm:Vg,WpicFormField:Zy,WpicSpinner:Ss,WpicPopover:Ci,WpicChoiceList:hb,WpicCard:vb,WpicCardSection:Sb,WpicProgressBar:Ob,WpicTag:Tb,WpicTagGroup:Eb,WpicPagination:Rb,WpicLoadingPanel:Nb,WpicTable:Gb,WpicTableColumn:Zb};function nm(t,e){for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(typeof e[n]=="object"&&t[n]?nm(t[n],e[n]):t[n]=e[n])}function r2(t,e){nm(Se,e);for(const n in mc)if(mc.hasOwnProperty(n)){const r=mc[n];t.component(r.name,r)}}return{install:r2,options:Se}});
129
+ _.version="2.30.1",vC(ve),_.fn=A,_.min=aE,_.max=lE,_.now=cE,_.utc=nn,_.unix=R_,_.months=L_,_.isDate=rs,_.locale=Jn,_.invalid=So,_.duration=jt,_.isMoment=Ft,_.weekdays=z_,_.parseZone=$_,_.localeData=Sn,_.isDuration=Ro,_.monthsShort=F_,_.weekdaysMin=W_,_.defineLocale=tc,_.updateLocale=$T,_.locales=LT,_.weekdaysShort=j_,_.normalizeUnits=Tt,_.relativeTimeRounding=gN,_.relativeTimeThreshold=yN,_.calendarFormat=BE,_.prototype=A,_.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const em={__name:"DayItem",props:{day:{},today:Boolean,selected:Boolean,off:Boolean,between:Boolean,firstDay:Boolean,lastDay:Boolean},setup(t){const e={pmi:"","wpic-tools":"hover:text-lime-500 group-[.is-off]:text-slate-400 group-[.is-today]:text-lime-500 group-[.is-today]:font-medium group-[.is-selected]:bg-lime-500 group-[.is-selected]:text-white rounded-full"},n={pmi:"","wpic-tools":"bg-slate-100"},r={pmi:"","wpic-tools":"bg-slate-100 rounded-l-0"},i={pmi:"","wpic-tools":"bg-slate-100 rounded-r-0"};return(s,o)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["relative flex items-center justify-center text-sm py-2 group",{"is-today":t.today&&!t.selected,"is-selected":t.selected,"is-off":t.off,"cursor-pointer":!t.off}])},[d.createElementVNode("div",{class:d.normalizeClass(["h-8 w-full flex justify-center items-center",{[`${n[d.unref(xe).theme]}`]:t.between,[`${r[d.unref(xe).theme]}`]:t.firstDay,[`${i[d.unref(xe).theme]}`]:t.lastDay}]),style:d.normalizeStyle({marginLeft:t.firstDay?"50%":void 0,marginRight:t.lastDay?"50%":void 0})},[d.createElementVNode("span",{class:d.normalizeClass(["absolute w-8 h-8 flex items-center justify-center",[`${e[d.unref(xe).theme]}`]]),style:{left:"50%",transform:"translateX(-50%)"}},[d.renderSlot(s.$slots,"default",{},()=>[d.createTextVNode(d.toDisplayString(t.day),1)])],2)],6)],2))}},vN={},kN={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},wN=[d.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.72 9.47a.75.75 0 0 0 0 1.06l4.25 4.25a.75.75 0 1 0 1.06-1.06L6.31 10l3.72-3.72a.75.75 0 1 0-1.06-1.06L4.72 9.47Zm9.25-4.25L9.72 9.47a.75.75 0 0 0 0 1.06l4.25 4.25a.75.75 0 1 0 1.06-1.06L11.31 10l3.72-3.72a.75.75 0 0 0-1.06-1.06Z","clip-rule":"evenodd"},null,-1)];function xN(t,e){return d.openBlock(),d.createElementBlock("svg",kN,wN)}const SN=ye(vN,[["render",xN]]),MN={},ON={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},CN=[d.createElementVNode("path",{"fill-rule":"evenodd",d:"M15.28 9.47a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 1 1-1.06-1.06L13.69 10 9.97 6.28a.75.75 0 0 1 1.06-1.06l4.25 4.25ZM6.03 5.22l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L8.69 10 4.97 6.28a.75.75 0 0 1 1.06-1.06Z","clip-rule":"evenodd"},null,-1)];function TN(t,e){return d.openBlock(),d.createElementBlock("svg",ON,CN)}const EN=ye(MN,[["render",TN]]),_N={},NN={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},DN=[d.createElementVNode("path",{"fill-rule":"evenodd",d:"M11.78 5.22a.75.75 0 0 1 0 1.06L8.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z","clip-rule":"evenodd"},null,-1)];function AN(t,e){return d.openBlock(),d.createElementBlock("svg",NN,DN)}const VN=ye(_N,[["render",AN]]),BN={},PN={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},IN=[d.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"},null,-1)];function RN(t,e){return d.openBlock(),d.createElementBlock("svg",PN,IN)}const $N=ye(BN,[["render",RN]]),LN={class:"w-full"},FN={class:"flex justify-between items-center mb-3"},zN={class:"flex"},jN={class:"font-medium"},WN={class:"flex"},HN={class:"grid grid-cols-7 border-b mb-2 pb-2"},YN={class:"flex justify-center text-sm"},UN={class:"grid grid-cols-7"},tm=Object.assign({name:"WpicCalendar"},{props:{modelValue:{},range:Boolean,doubleMonths:Boolean},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=d.ref([_(new Date),_(new Date).add(1,"month")]);d.onMounted(()=>{});const i=e,s=d.computed(()=>n.doubleMonths?[0,1]:[0]);function o(b){var C,v,T;if(n.range){if(((C=n.modelValue)==null?void 0:C.length)==0)i("update:modelValue",[b]);else if(((v=n.modelValue)==null?void 0:v.length)==2)i("update:modelValue",[b]);else if(((T=n.modelValue)==null?void 0:T.length)==1){let B=[_(n.modelValue[0]),_(b)];B=B.sort((V,F)=>V-F),i("update:modelValue",B)}}else i("update:modelValue",_(b))}function a(b){const C=_(b).daysInMonth(),v=[];for(let T=1;T<=C;T++){let B=_().date(T).month(_(b).month()).year(_(b).year());v.push(B)}return v}function l(b){return _(b).startOf("month").day()}function c(b){return _(b).subtract(1,"month")}function u(b){const C=_();return _(b).isSame(C,"day")}function f(b){var C,v;if(n.range){if(((C=n.modelValue)==null?void 0:C.length)==1)return _(b).isSame(_(n.modelValue[0]),"day");if(((v=n.modelValue)==null?void 0:v.length)==2)return _(b).isSame(_(n.modelValue[0]),"day")||_(b).isSame(_(n.modelValue[1]),"day")}else if(n.modelValue)return _(b).isSame(_(n.modelValue),"day")}function h(b){var C;if(n.range&&((C=n.modelValue)==null?void 0:C.length)==2)return _(b).isBetween(_(n.modelValue[0]),_(n.modelValue[1]))}function p(b){var C;if(n.range&&((C=n.modelValue)==null?void 0:C.length)==2)return _(b).isSame(_(n.modelValue[0]),"day")}function m(b){var C;if(n.range&&((C=n.modelValue)==null?void 0:C.length)==2)return _(b).isSame(_(n.modelValue[1]),"day")}function y(b){O(b,r.value[b].subtract(1,"month"))}function g(b){O(b,r.value[b].add(1,"month"))}function k(b){O(b,r.value[b].subtract(1,"year"))}function x(b){O(b,r.value[b].add(1,"year"))}function O(b,C){b==0?r.value=[C,r.value[1]]:r.value=[r.value[0],C]}return(b,C)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["flex-shrink-0 flex gap-6",{"min-w-96":s.value.length===1,"min-w-192":s.value.length===2}])},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.value,v=>(d.openBlock(),d.createElementBlock("div",LN,[d.createElementVNode("div",FN,[d.createElementVNode("div",zN,[d.createVNode(SN,{class:"w-5 h-5 cursor-pointer select-none opacity-50 hover:opacity-100",onClick:T=>k(v)},null,8,["onClick"]),d.createVNode(VN,{class:"w-5 h-5 cursor-pointer select-none opacity-50 hover:opacity-100",onClick:T=>y(v)},null,8,["onClick"])]),d.createElementVNode("div",jN,d.toDisplayString(r.value[v].format("YYYY MMMM")),1),d.createElementVNode("div",WN,[d.createVNode($N,{class:"w-5 h-5 cursor-pointer select-none opacity-50 hover:opacity-100",onClick:T=>g(v)},null,8,["onClick"]),d.createVNode(EN,{class:"w-5 h-5 cursor-pointer select-none opacity-50 hover:opacity-100",onClick:T=>x(v)},null,8,["onClick"])])]),d.createElementVNode("div",HN,[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(7,T=>{var B;return d.createElementVNode("div",YN,d.toDisplayString((B=r.value[v])==null?void 0:B.clone().startOf("week").subtract(1,"days").add(T,"days").format("ddd")),1)}),64))]),d.createElementVNode("div",UN,[l(r.value[v])>0?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:0},d.renderList(l(r.value[v]),T=>(d.openBlock(),d.createBlock(em,{off:""},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(c(r.value[v]).clone().endOf("month").subtract(l(r.value[v])-T,"days").format("D")),1)]),_:2},1024))),256)):d.createCommentVNode("",!0),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(a(r.value[v].clone()),T=>(d.openBlock(),d.createBlock(em,{onClick:B=>o(T),today:u(T),selected:f(T,r.value[v]),firstDay:p(T,r.value[v]),lastDay:m(T,r.value[v]),between:h(T,r.value[v])},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(d.unref(_)(T).format("D")),1)]),_:2},1032,["onClick","today","selected","firstDay","lastDay","between"]))),256))])]))),256))],2))}}),qN={},KN={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},JN=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.75 2.994v2.25m10.5-2.25v2.25m-14.252 13.5V7.491a2.25 2.25 0 0 1 2.25-2.25h13.5a2.25 2.25 0 0 1 2.25 2.25v11.251m-18 0a2.25 2.25 0 0 0 2.25 2.25h13.5a2.25 2.25 0 0 0 2.25-2.25m-18 0v-7.5a2.25 2.25 0 0 1 2.25-2.25h13.5a2.25 2.25 0 0 1 2.25 2.25v7.5m-6.75-6h2.25m-9 2.25h4.5m.002-2.25h.005v.006H12v-.006Zm-.001 4.5h.006v.006h-.006v-.005Zm-2.25.001h.005v.006H9.75v-.006Zm-2.25 0h.005v.005h-.006v-.005Zm6.75-2.247h.005v.005h-.005v-.005Zm0 2.247h.006v.006h-.006v-.006Zm2.25-2.248h.006V15H16.5v-.005Z"},null,-1)];function GN(t,e){return d.openBlock(),d.createElementBlock("svg",KN,JN)}const ZN=ye(qN,[["render",GN]]),XN={},QN={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},e2=[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z"},null,-1)];function t2(t,e){return d.openBlock(),d.createElementBlock("svg",QN,e2)}const n2=ye(XN,[["render",t2]]),mc={WpicCalendar:tm,WpicDateField:Object.assign({name:"WpicDateField"},{props:{modelValue:{},label:String,placeholder:{type:String,default:"Select date"},range:Boolean,disabled:Boolean,large:Boolean,info:String,doubleMonths:Boolean},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e;function i(o){r("update:modelValue",o)}const s=d.computed(()=>{var o;if(n.range)return(o=n.modelValue)==null?void 0:o.map(a=>_(a).format("YYYY-MM-DD")).join(" to ");if(n.modelValue)return _(n.modelValue).format("YYYY-MM-DD")});return(o,a)=>(d.openBlock(),d.createBlock(Ci,{disabled:t.disabled},{content:d.withCtx(()=>[d.createVNode(tm,{doubleMonths:t.doubleMonths,modelValue:t.modelValue,"onUpdate:modelValue":i,range:t.range},null,8,["doubleMonths","modelValue","range"])]),default:d.withCtx(()=>[d.createVNode(Md,{label:t.label,disabled:t.disabled,large:t.large,info:t.info},{prepend:d.withCtx(()=>[t.range?(d.openBlock(),d.createBlock(ZN,{key:0})):(d.openBlock(),d.createBlock(n2,{key:1}))]),default:d.withCtx(()=>[d.createTextVNode(" "+d.toDisplayString(s.value||t.placeholder),1)]),_:1},8,["label","disabled","large","info"])]),_:1},8,["disabled"]))}}),WpicFormInput:Md,WpicButton:Mg,WpicBadge:bC,WpicTextEditor:yC,WpicInputGroup:Ag,WpicButtonGroup:Eg,WpicForm:Vg,WpicFormField:Zy,WpicSpinner:Ss,WpicPopover:Ci,WpicChoiceList:hb,WpicCard:bb,WpicCardSection:xb,WpicProgressBar:Mb,WpicTag:Cb,WpicTagGroup:Tb,WpicPagination:Ib,WpicLoadingPanel:_b,WpicTable:Gb,WpicTableColumn:Zb};function nm(t,e){for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(typeof e[n]=="object"&&t[n]?nm(t[n],e[n]):t[n]=e[n])}function r2(t,e){nm(xe,e);for(const n in mc)if(mc.hasOwnProperty(n)){const r=mc[n];t.component(r.name,r)}}return{install:r2,options:xe}});