function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = ["./index-5u5REPT4.js","./serialization-DJC7NP0N.js","./Arrow.dom-GBJpMYQS.js","./CoreChatbotLoader-DGIYek7Y.js","./CoreChatbotLoader-CzZ8znJ5.css","./CoreDataframe-wiZQRIXg.js","./BaseDropdown-BzQ2P46q.js","./useFocusWithin-D9cSjn1O.js","./BaseDropdown-BDTgF1zj.css","./CoreDataframe-BCtzj0qO.css","./ComponentRenderer-BhrKbn-H.js","./instancePath-BsbOTTI8.js","./ComponentRenderer-Ck2UJegu.css","./BuilderApp-enbW7Uwi.js","./marked.esm-273vDTCT.js","./BuilderApp-DPjY_zZq.css"]
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();const J0="modulepreload",Y0=function(e,t){return new URL(e,t).href},Xf={},pn=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),i=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));a=Promise.all(n.map(l=>{if(l=Y0(l,r),l in Xf)return;Xf[l]=!0;const c=l.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(!!r)for(let w=o.length-1;w>=0;w--){const b=o[w];if(b.href===l&&(!c||b.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${f}`))return;const m=document.createElement("link");if(m.rel=c?"stylesheet":J0,c||(m.as="script",m.crossOrigin=""),m.href=l,i&&m.setAttribute("nonce",i),document.head.appendChild(m),c)return new Promise((w,b)=>{m.addEventListener("load",w),m.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${l}`)))})}))}return a.then(()=>t()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})};/**
* @vue/shared v3.4.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function el(e,t){const n=new Set(e.split(","));return t?r=>n.has(r.toLowerCase()):r=>n.has(r)}const Tt={},oo=[],xn=()=>{},Q0=()=>!1,$s=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),du=e=>e.startsWith("onUpdate:"),Vt=Object.assign,fu=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},X0=Object.prototype.hasOwnProperty,At=(e,t)=>X0.call(e,t),qe=Array.isArray,so=e=>Io(e)==="[object Map]",Da=e=>Io(e)==="[object Set]",Zf=e=>Io(e)==="[object Date]",Z0=e=>Io(e)==="[object RegExp]",rt=e=>typeof e=="function",Bt=e=>typeof e=="string",Xr=e=>typeof e=="symbol",Mt=e=>e!==null&&typeof e=="object",pu=e=>(Mt(e)||rt(e))&&rt(e.then)&&rt(e.catch),Uh=Object.prototype.toString,Io=e=>Uh.call(e),ew=e=>Io(e).slice(8,-1),Hh=e=>Io(e)==="[object Object]",hu=e=>Bt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,io=el(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),tl=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},tw=/-(\w)/g,Cn=tl(e=>e.replace(tw,(t,n)=>n?n.toUpperCase():"")),nw=/\B([A-Z])/g,Un=tl(e=>e.replace(nw,"-$1").toLowerCase()),Is=tl(e=>e.charAt(0).toUpperCase()+e.slice(1)),ts=tl(e=>e?`on${Is(e)}`:""),ir=(e,t)=>!Object.is(e,t),lo=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},Ri=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},hs=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Li=e=>{const t=Bt(e)?Number(e):NaN;return isNaN(t)?e:t};let ep;const zh=()=>ep||(ep=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),rw="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error",aw=el(rw);function vt(e){if(qe(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],a=Bt(r)?lw(r):vt(r);if(a)for(const o in a)t[o]=a[o]}return t}else if(Bt(e)||Mt(e))return e}const ow=/;(?![^(]*\))/g,sw=/:([^]+)/,iw=/\/\*[^]*?\*\//g;function lw(e){const t={};return e.replace(iw,"").split(ow).forEach(n=>{if(n){const r=n.split(sw);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function ut(e){let t="";if(Bt(e))t=e;else if(qe(e))for(let n=0;n<e.length;n++){const r=ut(e[n]);r&&(t+=r+" ")}else if(Mt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function cw(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Bt(t)&&(e.class=ut(t)),n&&(e.style=vt(n)),e}const uw="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",dw=el(uw);function Kh(e){return!!e||e===""}function fw(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=Zr(e[r],t[r]);return n}function Zr(e,t){if(e===t)return!0;let n=Zf(e),r=Zf(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=Xr(e),r=Xr(t),n||r)return e===t;if(n=qe(e),r=qe(t),n||r)return n&&r?fw(e,t):!1;if(n=Mt(e),r=Mt(t),n||r){if(!n||!r)return!1;const a=Object.keys(e).length,o=Object.keys(t).length;if(a!==o)return!1;for(const s in e){const i=e.hasOwnProperty(s),l=t.hasOwnProperty(s);if(i&&!l||!i&&l||!Zr(e[s],t[s]))return!1}}return String(e)===String(t)}function nl(e,t){return e.findIndex(n=>Zr(n,t))}const Te=e=>Bt(e)?e:e==null?"":qe(e)||Mt(e)&&(e.toString===Uh||!rt(e.toString))?JSON.stringify(e,Wh,2):String(e),Wh=(e,t)=>t&&t.__v_isRef?Wh(e,t.value):so(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,a],o)=>(n[lc(r,o)+" =>"]=a,n),{})}:Da(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>lc(n))}:Xr(t)?lc(t):Mt(t)&&!qe(t)&&!Hh(t)?String(t):t,lc=(e,t="")=>{var n;return Xr(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
* @vue/reactivity v3.4.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let jn;class mu{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=jn,!t&&jn&&(this.index=(jn.scopes||(jn.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=jn;try{return jn=this,t()}finally{jn=n}}}on(){jn=this}off(){jn=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const a=this.parent.scopes.pop();a&&a!==this&&(this.parent.scopes[this.index]=a,a.index=this.index)}this.parent=void 0,this._active=!1}}}function pw(e){return new mu(e)}function Gh(e,t=jn){t&&t.active&&t.effects.push(e)}function qh(){return jn}function hw(e){jn&&jn.cleanups.push(e)}let $a;class vo{constructor(t,n,r,a){this.fn=t,this.trigger=n,this.scheduler=r,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,Gh(this,a)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,Fa();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(mw(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),ja()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Yr,n=$a;try{return Yr=!0,$a=this,this._runnings++,tp(this),this.fn()}finally{np(this),this._runnings--,$a=n,Yr=t}}stop(){var t;this.active&&(tp(this),np(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function mw(e){return e.value}function tp(e){e._trackId++,e._depsLength=0}function np(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)Jh(e.deps[t],e);e.deps.length=e._depsLength}}function Jh(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}function vw(e,t){e.effect instanceof vo&&(e=e.effect.fn);const n=new vo(e,xn,()=>{n.dirty&&n.run()});t&&(Vt(n,t),t.scope&&Gh(n,t.scope)),(!t||!t.lazy)&&n.run();const r=n.run.bind(n);return r.effect=n,r}function gw(e){e.effect.stop()}let Yr=!0,Mc=0;const Yh=[];function Fa(){Yh.push(Yr),Yr=!1}function ja(){const e=Yh.pop();Yr=e===void 0?!0:e}function vu(){Mc++}function gu(){for(Mc--;!Mc&&Nc.length;)Nc.shift()()}function Qh(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const r=e.deps[e._depsLength];r!==t?(r&&Jh(r,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Nc=[];function Xh(e,t,n){vu();for(const r of e.keys()){let a;r._dirtyLevel<t&&(a??(a=e.get(r)===r._trackId))&&(r._shouldSchedule||(r._shouldSchedule=r._dirtyLevel===0),r._dirtyLevel=t),r._shouldSchedule&&(a??(a=e.get(r)===r._trackId))&&(r.trigger(),(!r._runnings||r.allowRecurse)&&r._dirtyLevel!==2&&(r._shouldSchedule=!1,r.scheduler&&Nc.push(r.scheduler)))}gu()}const Zh=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},Di=new WeakMap,Ia=Symbol(""),Oc=Symbol("");function On(e,t,n){if(Yr&&$a){let r=Di.get(e);r||Di.set(e,r=new Map);let a=r.get(n);a||r.set(n,a=Zh(()=>r.delete(n))),Qh($a,a)}}function Er(e,t,n,r,a,o){const s=Di.get(e);if(!s)return;let i=[];if(t==="clear")i=[...s.values()];else if(n==="length"&&qe(e)){const l=Number(r);s.forEach((c,f)=>{(f==="length"||!Xr(f)&&f>=l)&&i.push(c)})}else switch(n!==void 0&&i.push(s.get(n)),t){case"add":qe(e)?hu(n)&&i.push(s.get("length")):(i.push(s.get(Ia)),so(e)&&i.push(s.get(Oc)));break;case"delete":qe(e)||(i.push(s.get(Ia)),so(e)&&i.push(s.get(Oc)));break;case"set":so(e)&&i.push(s.get(Ia));break}vu();for(const l of i)l&&Xh(l,4);gu()}function yw(e,t){var n;return(n=Di.get(e))==null?void 0:n.get(t)}const _w=el("__proto__,__v_isRef,__isVue"),em=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Xr)),rp=bw();function bw(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=ct(this);for(let o=0,s=this.length;o<s;o++)On(r,"get",o+"");const a=r[t](...n);return a===-1||a===!1?r[t](...n.map(ct)):a}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){Fa(),vu();const r=ct(this)[t].apply(this,n);return gu(),ja(),r}}),e}function ww(e){const t=ct(this);return On(t,"has",e),t.hasOwnProperty(e)}class tm{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){const a=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!a;if(n==="__v_isReadonly")return a;if(n==="__v_isShallow")return o;if(n==="__v_raw")return r===(a?o?im:sm:o?om:am).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const s=qe(t);if(!a){if(s&&At(rp,n))return Reflect.get(rp,n,r);if(n==="hasOwnProperty")return ww}const i=Reflect.get(t,n,r);return(Xr(n)?em.has(n):_w(n))||(a||On(t,"get",n),o)?i:an(i)?s&&hu(n)?i:i.value:Mt(i)?a?Vn(i):ol(i):i}}class nm extends tm{constructor(t=!1){super(!1,t)}set(t,n,r,a){let o=t[n];if(!this._isShallow){const l=Ta(o);if(!ms(r)&&!Ta(r)&&(o=ct(o),r=ct(r)),!qe(t)&&an(o)&&!an(r))return l?!1:(o.value=r,!0)}const s=qe(t)&&hu(n)?Number(n)<t.length:At(t,n),i=Reflect.set(t,n,r,a);return t===ct(a)&&(s?ir(r,o)&&Er(t,"set",n,r):Er(t,"add",n,r)),i}deleteProperty(t,n){const r=At(t,n);t[n];const a=Reflect.deleteProperty(t,n);return a&&r&&Er(t,"delete",n,void 0),a}has(t,n){const r=Reflect.has(t,n);return(!Xr(n)||!em.has(n))&&On(t,"has",n),r}ownKeys(t){return On(t,"iterate",qe(t)?"length":Ia),Reflect.ownKeys(t)}}class rm extends tm{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Aw=new nm,Cw=new rm,$w=new nm(!0),Iw=new rm(!0),yu=e=>e,rl=e=>Reflect.getPrototypeOf(e);function ei(e,t,n=!1,r=!1){e=e.__v_raw;const a=ct(e),o=ct(t);n||(ir(t,o)&&On(a,"get",t),On(a,"get",o));const{has:s}=rl(a),i=r?yu:n?wu:vs;if(s.call(a,t))return i(e.get(t));if(s.call(a,o))return i(e.get(o));e!==a&&e.get(t)}function ti(e,t=!1){const n=this.__v_raw,r=ct(n),a=ct(e);return t||(ir(e,a)&&On(r,"has",e),On(r,"has",a)),e===a?n.has(e):n.has(e)||n.has(a)}function ni(e,t=!1){return e=e.__v_raw,!t&&On(ct(e),"iterate",Ia),Reflect.get(e,"size",e)}function ap(e){e=ct(e);const t=ct(this);return rl(t).has.call(t,e)||(t.add(e),Er(t,"add",e,e)),this}function op(e,t){t=ct(t);const n=ct(this),{has:r,get:a}=rl(n);let o=r.call(n,e);o||(e=ct(e),o=r.call(n,e));const s=a.call(n,e);return n.set(e,t),o?ir(t,s)&&Er(n,"set",e,t):Er(n,"add",e,t),this}function sp(e){const t=ct(this),{has:n,get:r}=rl(t);let a=n.call(t,e);a||(e=ct(e),a=n.call(t,e)),r&&r.call(t,e);const o=t.delete(e);return a&&Er(t,"delete",e,void 0),o}function ip(){const e=ct(this),t=e.size!==0,n=e.clear();return t&&Er(e,"clear",void 0,void 0),n}function ri(e,t){return function(r,a){const o=this,s=o.__v_raw,i=ct(s),l=t?yu:e?wu:vs;return!e&&On(i,"iterate",Ia),s.forEach((c,f)=>r.call(a,l(c),l(f),o))}}function ai(e,t,n){return function(...r){const a=this.__v_raw,o=ct(a),s=so(o),i=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,c=a[e](...r),f=n?yu:t?wu:vs;return!t&&On(o,"iterate",l?Oc:Ia),{next(){const{value:u,done:m}=c.next();return m?{value:u,done:m}:{value:i?[f(u[0]),f(u[1])]:f(u),done:m}},[Symbol.iterator](){return this}}}}function jr(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Sw(){const e={get(o){return ei(this,o)},get size(){return ni(this)},has:ti,add:ap,set:op,delete:sp,clear:ip,forEach:ri(!1,!1)},t={get(o){return ei(this,o,!1,!0)},get size(){return ni(this)},has:ti,add:ap,set:op,delete:sp,clear:ip,forEach:ri(!1,!0)},n={get(o){return ei(this,o,!0)},get size(){return ni(this,!0)},has(o){return ti.call(this,o,!0)},add:jr("add"),set:jr("set"),delete:jr("delete"),clear:jr("clear"),forEach:ri(!0,!1)},r={get(o){return ei(this,o,!0,!0)},get size(){return ni(this,!0)},has(o){return ti.call(this,o,!0)},add:jr("add"),set:jr("set"),delete:jr("delete"),clear:jr("clear"),forEach:ri(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=ai(o,!1,!1),n[o]=ai(o,!0,!1),t[o]=ai(o,!1,!0),r[o]=ai(o,!0,!0)}),[e,n,t,r]}const[Ew,kw,Tw,xw]=Sw();function al(e,t){const n=t?e?xw:Tw:e?kw:Ew;return(r,a,o)=>a==="__v_isReactive"?!e:a==="__v_isReadonly"?e:a==="__v_raw"?r:Reflect.get(At(n,a)&&a in r?n:r,a,o)}const Pw={get:al(!1,!1)},Mw={get:al(!1,!0)},Nw={get:al(!0,!1)},Ow={get:al(!0,!0)},am=new WeakMap,om=new WeakMap,sm=new WeakMap,im=new WeakMap;function Rw(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Lw(e){return e.__v_skip||!Object.isExtensible(e)?0:Rw(ew(e))}function ol(e){return Ta(e)?e:sl(e,!1,Aw,Pw,am)}function lm(e){return sl(e,!1,$w,Mw,om)}function Vn(e){return sl(e,!0,Cw,Nw,sm)}function Dw(e){return sl(e,!0,Iw,Ow,im)}function sl(e,t,n,r,a){if(!Mt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=a.get(e);if(o)return o;const s=Lw(e);if(s===0)return e;const i=new Proxy(e,s===2?r:n);return a.set(e,i),i}function Sa(e){return Ta(e)?Sa(e.__v_raw):!!(e&&e.__v_isReactive)}function Ta(e){return!!(e&&e.__v_isReadonly)}function ms(e){return!!(e&&e.__v_isShallow)}function _u(e){return Sa(e)||Ta(e)}function ct(e){const t=e&&e.__v_raw;return t?ct(t):e}function bu(e){return Object.isExtensible(e)&&Ri(e,"__v_skip",!0),e}const vs=e=>Mt(e)?ol(e):e,wu=e=>Mt(e)?Vn(e):e;class cm{constructor(t,n,r,a){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new vo(()=>t(this._value),()=>co(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!a,this.__v_isReadonly=r}get value(){const t=ct(this);return(!t._cacheable||t.effect.dirty)&&ir(t._value,t._value=t.effect.run())&&co(t,4),Au(t),t.effect._dirtyLevel>=2&&co(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Fw(e,t,n=!1){let r,a;const o=rt(e);return o?(r=e,a=xn):(r=e.get,a=e.set),new cm(r,a,o||!a,n)}function Au(e){var t;Yr&&$a&&(e=ct(e),Qh($a,(t=e.dep)!=null?t:e.dep=Zh(()=>e.dep=void 0,e instanceof cm?e:void 0)))}function co(e,t=4,n){e=ct(e);const r=e.dep;r&&Xh(r,t)}function an(e){return!!(e&&e.__v_isRef===!0)}function oe(e){return um(e,!1)}function go(e){return um(e,!0)}function um(e,t){return an(e)?e:new jw(e,t)}class jw{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:ct(t),this._value=n?t:vs(t)}get value(){return Au(this),this._value}set value(t){const n=this.__v_isShallow||ms(t)||Ta(t);t=n?t:ct(t),ir(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:vs(t),co(this,4))}}function Vw(e){co(e,4)}function P(e){return an(e)?e.value:e}function Bw(e){return rt(e)?e():P(e)}const Uw={get:(e,t,n)=>P(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const a=e[t];return an(a)&&!an(n)?(a.value=n,!0):Reflect.set(e,t,n,r)}};function Cu(e){return Sa(e)?e:new Proxy(e,Uw)}class Hw{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>Au(this),()=>co(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function dm(e){return new Hw(e)}function $u(e){const t=qe(e)?new Array(e.length):{};for(const n in e)t[n]=fm(e,n);return t}class zw{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return yw(ct(this._object),this._key)}}class Kw{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function ea(e,t,n){return an(e)?e:rt(e)?new Kw(e):Mt(e)&&arguments.length>1?fm(e,t,n):oe(e)}function fm(e,t,n){const r=e[t];return an(r)?r:new zw(e,t,n)}const Ww={GET:"get",HAS:"has",ITERATE:"iterate"},Gw={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"};/**
* @vue/runtime-core v3.4.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function qw(e,t){}const Jw={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER"},Yw={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."};function kr(e,t,n,r){try{return r?e(...r):e()}catch(a){Va(a,t,n)}}function Hn(e,t,n,r){if(rt(e)){const o=kr(e,t,n,r);return o&&pu(o)&&o.catch(s=>{Va(s,t,n)}),o}const a=[];for(let o=0;o<e.length;o++)a.push(Hn(e[o],t,n,r));return a}function Va(e,t,n,r=!0){const a=t?t.vnode:null;if(t){let o=t.parent;const s=t.proxy,i=`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const c=o.ec;if(c){for(let f=0;f<c.length;f++)if(c[f](e,s,i)===!1)return}o=o.parent}const l=t.appContext.config.errorHandler;if(l){kr(l,null,10,[e,s,i]);return}}Qw(e,n,a,r)}function Qw(e,t,n,r=!0){console.error(e)}let gs=!1,Rc=!1;const gn=[];let fr=0;const uo=[];let Kr=null,ya=0;const pm=Promise.resolve();let Iu=null;function Mn(e){const t=Iu||pm;return e?t.then(this?e.bind(this):e):t}function Xw(e){let t=fr+1,n=gn.length;for(;t<n;){const r=t+n>>>1,a=gn[r],o=ys(a);o<e||o===e&&a.pre?t=r+1:n=r}return t}function il(e){(!gn.length||!gn.includes(e,gs&&e.allowRecurse?fr+1:fr))&&(e.id==null?gn.push(e):gn.splice(Xw(e.id),0,e),hm())}function hm(){!gs&&!Rc&&(Rc=!0,Iu=pm.then(mm))}function Zw(e){const t=gn.indexOf(e);t>fr&&gn.splice(t,1)}function Fi(e){qe(e)?uo.push(...e):(!Kr||!Kr.includes(e,e.allowRecurse?ya+1:ya))&&uo.push(e),hm()}function lp(e,t,n=gs?fr+1:0){for(;n<gn.length;n++){const r=gn[n];if(r&&r.pre){if(e&&r.id!==e.uid)continue;gn.splice(n,1),n--,r()}}}function ji(e){if(uo.length){const t=[...new Set(uo)].sort((n,r)=>ys(n)-ys(r));if(uo.length=0,Kr){Kr.push(...t);return}for(Kr=t,ya=0;ya<Kr.length;ya++)Kr[ya]();Kr=null,ya=0}}const ys=e=>e.id==null?1/0:e.id,e1=(e,t)=>{const n=ys(e)-ys(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function mm(e){Rc=!1,gs=!0,gn.sort(e1);try{for(fr=0;fr<gn.length;fr++){const t=gn[fr];t&&t.active!==!1&&kr(t,null,14)}}finally{fr=0,gn.length=0,ji(),gs=!1,Iu=null,(gn.length||uo.length)&&mm()}}let no,oi=[];function vm(e,t){var n,r;no=e,no?(no.enabled=!0,oi.forEach(({event:a,args:o})=>no.emit(a,...o)),oi=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{vm(o,t)}),setTimeout(()=>{no||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,oi=[])},3e3)):oi=[]}function t1(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Tt;let a=n;const o=t.startsWith("update:"),s=o&&t.slice(7);if(s&&s in r){const f=`${s==="modelValue"?"model":s}Modifiers`,{number:u,trim:m}=r[f]||Tt;m&&(a=n.map(w=>Bt(w)?w.trim():w)),u&&(a=n.map(hs))}let i,l=r[i=ts(t)]||r[i=ts(Cn(t))];!l&&o&&(l=r[i=ts(Un(t))]),l&&Hn(l,e,6,a);const c=r[i+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,Hn(c,e,6,a)}}function gm(e,t,n=!1){const r=t.emitsCache,a=r.get(e);if(a!==void 0)return a;const o=e.emits;let s={},i=!1;if(!rt(e)){const l=c=>{const f=gm(c,t,!0);f&&(i=!0,Vt(s,f))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!o&&!i?(Mt(e)&&r.set(e,null),null):(qe(o)?o.forEach(l=>s[l]=null):Vt(s,o),Mt(e)&&r.set(e,s),s)}function ll(e,t){return!e||!$s(t)?!1:(t=t.slice(2).replace(/Once$/,""),At(e,t[0].toLowerCase()+t.slice(1))||At(e,Un(t))||At(e,t))}let Kt=null,cl=null;function _s(e){const t=Kt;return Kt=e,cl=e&&e.type.__scopeId||null,t}function Qt(e){cl=e}function Xt(){cl=null}const n1=e=>Ze;function Ze(e,t=Kt,n){if(!t||e._n)return e;const r=(...a)=>{r._d&&zc(-1);const o=_s(t);let s;try{s=e(...a)}finally{_s(o),r._d&&zc(1)}return s};return r._n=!0,r._c=!0,r._d=!0,r}function Ii(e){const{type:t,vnode:n,proxy:r,withProxy:a,props:o,propsOptions:[s],slots:i,attrs:l,emit:c,render:f,renderCache:u,data:m,setupState:w,ctx:b,inheritAttrs:g}=e;let v,A;const C=_s(e);try{if(n.shapeFlag&4){const p=a||r,$=p;v=Bn(f.call($,p,u,o,w,m,b)),A=l}else{const p=t;v=Bn(p.length>1?p(o,{attrs:l,slots:i,emit:c}):p(o,null)),A=t.props?l:a1(l)}}catch(p){as.length=0,Va(p,e,1),v=Ye(yn)}let y=v;if(A&&g!==!1){const p=Object.keys(A),{shapeFlag:$}=y;p.length&&$&7&&(s&&p.some(du)&&(A=o1(A,s)),y=vr(y,A))}return n.dirs&&(y=vr(y),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&(y.transition=n.transition),v=y,_s(C),v}function r1(e,t=!0){let n;for(let r=0;r<e.length;r++){const a=e[r];if(ta(a)){if(a.type!==yn||a.children==="v-if"){if(n)return;n=a}}else return}return n}const a1=e=>{let t;for(const n in e)(n==="class"||n==="style"||$s(n))&&((t||(t={}))[n]=e[n]);return t},o1=(e,t)=>{const n={};for(const r in e)(!du(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function s1(e,t,n){const{props:r,children:a,component:o}=e,{props:s,children:i,patchFlag:l}=t,c=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?cp(r,s,c):!!s;if(l&8){const f=t.dynamicProps;for(let u=0;u<f.length;u++){const m=f[u];if(s[m]!==r[m]&&!ll(c,m))return!0}}}else return(a||i)&&(!i||!i.$stable)?!0:r===s?!1:r?s?cp(r,s,c):!0:!!s;return!1}function cp(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let a=0;a<r.length;a++){const o=r[a];if(t[o]!==e[o]&&!ll(n,o))return!0}return!1}function Su({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const Eu="components",i1="directives";function l1(e,t){return ku(Eu,e,!0,t)||e}const ym=Symbol.for("v-ndc");function Ss(e){return Bt(e)?ku(Eu,e,!1)||e:e||ym}function _m(e){return ku(i1,e)}function ku(e,t,n=!0,r=!1){const a=Kt||Yt;if(a){const o=a.type;if(e===Eu){const i=Jc(o,!1);if(i&&(i===t||i===Cn(t)||i===Is(Cn(t))))return o}const s=up(a[e]||o[e],t)||up(a.appContext[e],t);return!s&&r?o:s}}function up(e,t){return e&&(e[t]||e[Cn(t)]||e[Is(Cn(t))])}const bm=e=>e.__isSuspense;let Lc=0;const c1={name:"Suspense",__isSuspense:!0,process(e,t,n,r,a,o,s,i,l,c){if(e==null)d1(t,n,r,a,o,s,i,l,c);else{if(o&&o.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}f1(e,t,n,r,a,s,i,l,c)}},hydrate:p1,create:Tu,normalize:h1},u1=c1;function bs(e,t){const n=e.props&&e.props[t];rt(n)&&n()}function d1(e,t,n,r,a,o,s,i,l){const{p:c,o:{createElement:f}}=l,u=f("div"),m=e.suspense=Tu(e,a,r,t,u,n,o,s,i,l);c(null,m.pendingBranch=e.ssContent,u,null,r,m,o,s),m.deps>0?(bs(e,"onPending"),bs(e,"onFallback"),c(null,e.ssFallback,t,n,r,null,o,s),fo(m,e.ssFallback)):m.resolve(!1,!0)}function f1(e,t,n,r,a,o,s,i,{p:l,um:c,o:{createElement:f}}){const u=t.suspense=e.suspense;u.vnode=t,t.el=e.el;const m=t.ssContent,w=t.ssFallback,{activeBranch:b,pendingBranch:g,isInFallback:v,isHydrating:A}=u;if(g)u.pendingBranch=m,rr(m,g)?(l(g,m,u.hiddenContainer,null,a,u,o,s,i),u.deps<=0?u.resolve():v&&(A||(l(b,w,n,r,a,null,o,s,i),fo(u,w)))):(u.pendingId=Lc++,A?(u.isHydrating=!1,u.activeBranch=g):c(g,a,u),u.deps=0,u.effects.length=0,u.hiddenContainer=f("div"),v?(l(null,m,u.hiddenContainer,null,a,u,o,s,i),u.deps<=0?u.resolve():(l(b,w,n,r,a,null,o,s,i),fo(u,w))):b&&rr(m,b)?(l(b,m,n,r,a,u,o,s,i),u.resolve(!0)):(l(null,m,u.hiddenContainer,null,a,u,o,s,i),u.deps<=0&&u.resolve()));else if(b&&rr(m,b))l(b,m,n,r,a,u,o,s,i),fo(u,m);else if(bs(t,"onPending"),u.pendingBranch=m,m.shapeFlag&512?u.pendingId=m.component.suspenseId:u.pendingId=Lc++,l(null,m,u.hiddenContainer,null,a,u,o,s,i),u.deps<=0)u.resolve();else{const{timeout:C,pendingId:y}=u;C>0?setTimeout(()=>{u.pendingId===y&&u.fallback(w)},C):C===0&&u.fallback(w)}}function Tu(e,t,n,r,a,o,s,i,l,c,f=!1){const{p:u,m,um:w,n:b,o:{parentNode:g,remove:v}}=c;let A;const C=m1(e);C&&t!=null&&t.pendingBranch&&(A=t.pendingId,t.deps++);const y=e.props?Li(e.props.timeout):void 0,p=o,$={vnode:e,parent:t,parentComponent:n,namespace:s,container:r,hiddenContainer:a,deps:0,pendingId:Lc++,timeout:typeof y=="number"?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!f,isHydrating:f,isUnmounted:!1,effects:[],resolve(E=!1,B=!1){const{vnode:z,activeBranch:le,pendingBranch:fe,pendingId:Le,effects:be,parentComponent:Ce,container:Re}=$;let Je=!1;$.isHydrating?$.isHydrating=!1:E||(Je=le&&fe.transition&&fe.transition.mode==="out-in",Je&&(le.transition.afterLeave=()=>{Le===$.pendingId&&(m(fe,Re,o===p?b(le):o,0),Fi(be))}),le&&(g(le.el)!==$.hiddenContainer&&(o=b(le)),w(le,Ce,$,!0)),Je||m(fe,Re,o,0)),fo($,fe),$.pendingBranch=null,$.isInFallback=!1;let se=$.parent,ce=!1;for(;se;){if(se.pendingBranch){se.effects.push(...be),ce=!0;break}se=se.parent}!ce&&!Je&&Fi(be),$.effects=[],C&&t&&t.pendingBranch&&A===t.pendingId&&(t.deps--,t.deps===0&&!B&&t.resolve()),bs(z,"onResolve")},fallback(E){if(!$.pendingBranch)return;const{vnode:B,activeBranch:z,parentComponent:le,container:fe,namespace:Le}=$;bs(B,"onFallback");const be=b(z),Ce=()=>{$.isInFallback&&(u(null,E,fe,be,le,null,Le,i,l),fo($,E))},Re=E.transition&&E.transition.mode==="out-in";Re&&(z.transition.afterLeave=Ce),$.isInFallback=!0,w(z,le,null,!0),Re||Ce()},move(E,B,z){$.activeBranch&&m($.activeBranch,E,B,z),$.container=E},next(){return $.activeBranch&&b($.activeBranch)},registerDep(E,B){const z=!!$.pendingBranch;z&&$.deps++;const le=E.vnode.el;E.asyncDep.catch(fe=>{Va(fe,E,0)}).then(fe=>{if(E.isUnmounted||$.isUnmounted||$.pendingId!==E.suspenseId)return;E.asyncResolved=!0;const{vnode:Le}=E;Gc(E,fe,!1),le&&(Le.el=le);const be=!le&&E.subTree.el;B(E,Le,g(le||E.subTree.el),le?null:b(E.subTree),$,s,l),be&&v(be),Su(E,Le.el),z&&--$.deps===0&&$.resolve()})},unmount(E,B){$.isUnmounted=!0,$.activeBranch&&w($.activeBranch,n,E,B),$.pendingBranch&&w($.pendingBranch,n,E,B)}};return $}function p1(e,t,n,r,a,o,s,i,l){const c=t.suspense=Tu(t,r,n,e.parentNode,document.createElement("div"),null,a,o,s,i,!0),f=l(e,c.pendingBranch=t.ssContent,n,c,o,s);return c.deps===0&&c.resolve(!1,!0),f}function h1(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=dp(r?n.default:n),e.ssFallback=r?dp(n.fallback):Ye(yn)}function dp(e){let t;if(rt(e)){const n=Ma&&e._c;n&&(e._d=!1,T()),e=e(),n&&(e._d=!0,t=Pn,Zm())}return qe(e)&&(e=r1(e)),e=Bn(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function wm(e,t){t&&t.pendingBranch?qe(e)?t.effects.push(...e):t.effects.push(e):Fi(e)}function fo(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e;let a=t.el;for(;!a&&t.component;)t=t.component.subTree,a=t.el;n.el=a,r&&r.subTree===n&&(r.vnode.el=a,Su(r,a))}function m1(e){var t;return((t=e.props)==null?void 0:t.suspensible)!=null&&e.props.suspensible!==!1}const Am=Symbol.for("v-scx"),Cm=()=>Z(Am);function v1(e,t){return Es(e,null,t)}function $m(e,t){return Es(e,null,{flush:"post"})}function Im(e,t){return Es(e,null,{flush:"sync"})}const si={};function Ke(e,t,n){return Es(e,t,n)}function Es(e,t,{immediate:n,deep:r,flush:a,once:o,onTrack:s,onTrigger:i}=Tt){if(t&&o){const E=t;t=(...B)=>{E(...B),$()}}const l=Yt,c=E=>r===!0?E:Ca(E,r===!1?1:void 0);let f,u=!1,m=!1;if(an(e)?(f=()=>e.value,u=ms(e)):Sa(e)?(f=()=>c(e),u=!0):qe(e)?(m=!0,u=e.some(E=>Sa(E)||ms(E)),f=()=>e.map(E=>{if(an(E))return E.value;if(Sa(E))return c(E);if(rt(E))return kr(E,l,2)})):rt(e)?t?f=()=>kr(e,l,2):f=()=>(w&&w(),Hn(e,l,3,[b])):f=xn,t&&r){const E=f;f=()=>Ca(E())}let w,b=E=>{w=y.onStop=()=>{kr(E,l,4),w=y.onStop=void 0}},g;if(Ts)if(b=xn,t?n&&Hn(t,l,3,[f(),m?[]:void 0,b]):f(),a==="sync"){const E=Cm();g=E.__watcherHandles||(E.__watcherHandles=[])}else return xn;let v=m?new Array(e.length).fill(si):si;const A=()=>{if(!(!y.active||!y.dirty))if(t){const E=y.run();(r||u||(m?E.some((B,z)=>ir(B,v[z])):ir(E,v)))&&(w&&w(),Hn(t,l,3,[E,v===si?void 0:m&&v[0]===si?[]:v,b]),v=E)}else y.run()};A.allowRecurse=!!t;let C;a==="sync"?C=A:a==="post"?C=()=>dn(A,l&&l.suspense):(A.pre=!0,l&&(A.id=l.uid),C=()=>il(A));const y=new vo(f,xn,C),p=qh(),$=()=>{y.stop(),p&&fu(p.effects,y)};return t?n?A():v=y.run():a==="post"?dn(y.run.bind(y),l&&l.suspense):y.run(),g&&g.push($),$}function g1(e,t,n){const r=this.proxy,a=Bt(e)?e.includes(".")?Sm(r,e):()=>r[e]:e.bind(r,r);let o;rt(t)?o=t:(o=t.handler,n=t);const s=Na(this),i=Es(a,o.bind(r),n);return s(),i}function Sm(e,t){const n=t.split(".");return()=>{let r=e;for(let a=0;a<n.length&&r;a++)r=r[n[a]];return r}}function Ca(e,t,n=0,r){if(!Mt(e)||e.__v_skip)return e;if(t&&t>0){if(n>=t)return e;n++}if(r=r||new Set,r.has(e))return e;if(r.add(e),an(e))Ca(e.value,t,n,r);else if(qe(e))for(let a=0;a<e.length;a++)Ca(e[a],t,n,r);else if(Da(e)||so(e))e.forEach(a=>{Ca(a,t,n,r)});else if(Hh(e))for(const a in e)Ca(e[a],t,n,r);return e}function Wt(e,t){if(Kt===null)return e;const n=hl(Kt)||Kt.proxy,r=e.dirs||(e.dirs=[]);for(let a=0;a<t.length;a++){let[o,s,i,l=Tt]=t[a];o&&(rt(o)&&(o={mounted:o,updated:o}),o.deep&&Ca(s),r.push({dir:o,instance:n,value:s,oldValue:void 0,arg:i,modifiers:l}))}return e}function dr(e,t,n,r){const a=e.dirs,o=t&&t.dirs;for(let s=0;s<a.length;s++){const i=a[s];o&&(i.oldValue=o[s].value);let l=i.dir[r];l&&(Fa(),Hn(l,n,8,[e.el,i,e,t]),ja())}}const Wr=Symbol("_leaveCb"),ii=Symbol("_enterCb");function xu(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Zt(()=>{e.isMounted=!0}),Ba(()=>{e.isUnmounting=!0}),e}const Wn=[Function,Array],Pu={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Wn,onEnter:Wn,onAfterEnter:Wn,onEnterCancelled:Wn,onBeforeLeave:Wn,onLeave:Wn,onAfterLeave:Wn,onLeaveCancelled:Wn,onBeforeAppear:Wn,onAppear:Wn,onAfterAppear:Wn,onAppearCancelled:Wn},y1={name:"BaseTransition",props:Pu,setup(e,{slots:t}){const n=Nr(),r=xu();return()=>{const a=t.default&&ul(t.default(),!0);if(!a||!a.length)return;let o=a[0];if(a.length>1){for(const m of a)if(m.type!==yn){o=m;break}}const s=ct(e),{mode:i}=s;if(r.isLeaving)return cc(o);const l=fp(o);if(!l)return cc(o);const c=yo(l,s,r,n);xa(l,c);const f=n.subTree,u=f&&fp(f);if(u&&u.type!==yn&&!rr(l,u)){const m=yo(u,s,r,n);if(xa(u,m),i==="out-in")return r.isLeaving=!0,m.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},cc(o);i==="in-out"&&l.type!==yn&&(m.delayLeave=(w,b,g)=>{const v=km(r,u);v[String(u.key)]=u,w[Wr]=()=>{b(),w[Wr]=void 0,delete c.delayedLeave},c.delayedLeave=g})}return o}}},Em=y1;function km(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function yo(e,t,n,r){const{appear:a,mode:o,persisted:s=!1,onBeforeEnter:i,onEnter:l,onAfterEnter:c,onEnterCancelled:f,onBeforeLeave:u,onLeave:m,onAfterLeave:w,onLeaveCancelled:b,onBeforeAppear:g,onAppear:v,onAfterAppear:A,onAppearCancelled:C}=t,y=String(e.key),p=km(n,e),$=(z,le)=>{z&&Hn(z,r,9,le)},E=(z,le)=>{const fe=le[1];$(z,le),qe(z)?z.every(Le=>Le.length<=1)&&fe():z.length<=1&&fe()},B={mode:o,persisted:s,beforeEnter(z){let le=i;if(!n.isMounted)if(a)le=g||i;else return;z[Wr]&&z[Wr](!0);const fe=p[y];fe&&rr(e,fe)&&fe.el[Wr]&&fe.el[Wr](),$(le,[z])},enter(z){let le=l,fe=c,Le=f;if(!n.isMounted)if(a)le=v||l,fe=A||c,Le=C||f;else return;let be=!1;const Ce=z[ii]=Re=>{be||(be=!0,Re?$(Le,[z]):$(fe,[z]),B.delayedLeave&&B.delayedLeave(),z[ii]=void 0)};le?E(le,[z,Ce]):Ce()},leave(z,le){const fe=String(e.key);if(z[ii]&&z[ii](!0),n.isUnmounting)return le();$(u,[z]);let Le=!1;const be=z[Wr]=Ce=>{Le||(Le=!0,le(),Ce?$(b,[z]):$(w,[z]),z[Wr]=void 0,p[fe]===e&&delete p[fe])};p[fe]=e,m?E(m,[z,be]):be()},clone(z){return yo(z,t,n,r)}};return B}function cc(e){if(ks(e))return e=vr(e),e.children=null,e}function fp(e){return ks(e)?e.children?e.children[0]:void 0:e}function xa(e,t){e.shapeFlag&6&&e.component?xa(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ul(e,t=!1,n){let r=[],a=0;for(let o=0;o<e.length;o++){let s=e[o];const i=n==null?s.key:String(n)+String(s.key!=null?s.key:o);s.type===je?(s.patchFlag&128&&a++,r=r.concat(ul(s.children,t,i))):(t||s.type!==yn)&&r.push(i!=null?vr(s,{key:i}):s)}if(a>1)for(let o=0;o<r.length;o++)r[o].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function Pe(e,t){return rt(e)?Vt({name:e.name},t,{setup:e}):e}const Ea=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function Dc(e){rt(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:a=200,timeout:o,suspensible:s=!0,onError:i}=e;let l=null,c,f=0;const u=()=>(f++,l=null,m()),m=()=>{let w;return l||(w=l=t().catch(b=>{if(b=b instanceof Error?b:new Error(String(b)),i)return new Promise((g,v)=>{i(b,()=>g(u()),()=>v(b),f+1)});throw b}).then(b=>w!==l&&l?l:(b&&(b.__esModule||b[Symbol.toStringTag]==="Module")&&(b=b.default),c=b,b)))};return Pe({name:"AsyncComponentWrapper",__asyncLoader:m,get __asyncResolved(){return c},setup(){const w=Yt;if(c)return()=>uc(c,w);const b=C=>{l=null,Va(C,w,13,!r)};if(s&&w.suspense||Ts)return m().then(C=>()=>uc(C,w)).catch(C=>(b(C),()=>r?Ye(r,{error:C}):null));const g=oe(!1),v=oe(),A=oe(!!a);return a&&setTimeout(()=>{A.value=!1},a),o!=null&&setTimeout(()=>{if(!g.value&&!v.value){const C=new Error(`Async component timed out after ${o}ms.`);b(C),v.value=C}},o),m().then(()=>{g.value=!0,w.parent&&ks(w.parent.vnode)&&(w.parent.effect.dirty=!0,il(w.parent.update))}).catch(C=>{b(C),v.value=C}),()=>{if(g.value&&c)return uc(c,w);if(v.value&&r)return Ye(r,{error:v.value});if(n&&!A.value)return Ye(n)}}})}function uc(e,t){const{ref:n,props:r,children:a,ce:o}=t.vnode,s=Ye(e,r,a);return s.ref=n,s.ce=o,delete t.vnode.ce,s}const ks=e=>e.type.__isKeepAlive,_1={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Nr(),r=n.ctx;if(!r.renderer)return()=>{const C=t.default&&t.default();return C&&C.length===1?C[0]:C};const a=new Map,o=new Set;let s=null;const i=n.suspense,{renderer:{p:l,m:c,um:f,o:{createElement:u}}}=r,m=u("div");r.activate=(C,y,p,$,E)=>{const B=C.component;c(C,y,p,0,i),l(B.vnode,C,y,p,B,i,$,C.slotScopeIds,E),dn(()=>{B.isDeactivated=!1,B.a&&lo(B.a);const z=C.props&&C.props.onVnodeMounted;z&&En(z,B.parent,C)},i)},r.deactivate=C=>{const y=C.component;c(C,m,null,1,i),dn(()=>{y.da&&lo(y.da);const p=C.props&&C.props.onVnodeUnmounted;p&&En(p,y.parent,C),y.isDeactivated=!0},i)};function w(C){dc(C),f(C,n,i,!0)}function b(C){a.forEach((y,p)=>{const $=Jc(y.type);$&&(!C||!C($))&&g(p)})}function g(C){const y=a.get(C);!s||!rr(y,s)?w(y):s&&dc(s),a.delete(C),o.delete(C)}Ke(()=>[e.include,e.exclude],([C,y])=>{C&&b(p=>Yo(C,p)),y&&b(p=>!Yo(y,p))},{flush:"post",deep:!0});let v=null;const A=()=>{v!=null&&a.set(v,fc(n.subTree))};return Zt(A),fl(A),Ba(()=>{a.forEach(C=>{const{subTree:y,suspense:p}=n,$=fc(y);if(C.type===$.type&&C.key===$.key){dc($);const E=$.component.da;E&&dn(E,p);return}w(C)})}),()=>{if(v=null,!t.default)return null;const C=t.default(),y=C[0];if(C.length>1)return s=null,C;if(!ta(y)||!(y.shapeFlag&4)&&!(y.shapeFlag&128))return s=null,y;let p=fc(y);const $=p.type,E=Jc(Ea(p)?p.type.__asyncResolved||{}:$),{include:B,exclude:z,max:le}=e;if(B&&(!E||!Yo(B,E))||z&&E&&Yo(z,E))return s=p,y;const fe=p.key==null?$:p.key,Le=a.get(fe);return p.el&&(p=vr(p),y.shapeFlag&128&&(y.ssContent=p)),v=fe,Le?(p.el=Le.el,p.component=Le.component,p.transition&&xa(p,p.transition),p.shapeFlag|=512,o.delete(fe),o.add(fe)):(o.add(fe),le&&o.size>parseInt(le,10)&&g(o.values().next().value)),p.shapeFlag|=256,s=p,bm(y.type)?y:p}}},b1=_1;function Yo(e,t){return qe(e)?e.some(n=>Yo(n,t)):Bt(e)?e.split(",").includes(t):Z0(e)?e.test(t):!1}function Tm(e,t){Pm(e,"a",t)}function xm(e,t){Pm(e,"da",t)}function Pm(e,t,n=Yt){const r=e.__wdc||(e.__wdc=()=>{let a=n;for(;a;){if(a.isDeactivated)return;a=a.parent}return e()});if(dl(t,r,n),n){let a=n.parent;for(;a&&a.parent;)ks(a.parent.vnode)&&w1(r,t,n,a),a=a.parent}}function w1(e,t,n,r){const a=dl(t,e,r,!0);cr(()=>{fu(r[t],a)},n)}function dc(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function fc(e){return e.shapeFlag&128?e.ssContent:e}function dl(e,t,n=Yt,r=!1){if(n){const a=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...s)=>{if(n.isUnmounted)return;Fa();const i=Na(n),l=Hn(t,n,e,s);return i(),ja(),l});return r?a.unshift(o):a.push(o),o}}const Mr=e=>(t,n=Yt)=>(!Ts||e==="sp")&&dl(e,(...r)=>t(...r),n),So=Mr("bm"),Zt=Mr("m"),Mm=Mr("bu"),fl=Mr("u"),Ba=Mr("bum"),cr=Mr("um"),Nm=Mr("sp"),Om=Mr("rtg"),Rm=Mr("rtc");function Lm(e,t=Yt){dl("ec",e,t)}function It(e,t,n,r){let a;const o=n&&n[r];if(qe(e)||Bt(e)){a=new Array(e.length);for(let s=0,i=e.length;s<i;s++)a[s]=t(e[s],s,void 0,o&&o[s])}else if(typeof e=="number"){a=new Array(e);for(let s=0;s<e;s++)a[s]=t(s+1,s,void 0,o&&o[s])}else if(Mt(e))if(e[Symbol.iterator])a=Array.from(e,(s,i)=>t(s,i,void 0,o&&o[i]));else{const s=Object.keys(e);a=new Array(s.length);for(let i=0,l=s.length;i<l;i++){const c=s[i];a[i]=t(e[c],c,i,o&&o[i])}}else a=[];return n&&(n[r]=a),a}function A1(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(qe(r))for(let a=0;a<r.length;a++)e[r[a].name]=r[a].fn;else r&&(e[r.name]=r.key?(...a)=>{const o=r.fn(...a);return o&&(o.key=r.key),o}:r.fn)}return e}function Dt(e,t,n={},r,a){if(Kt.isCE||Kt.parent&&Ea(Kt.parent)&&Kt.parent.isCE)return t!=="default"&&(n.name=t),Ye("slot",n,r&&r());let o=e[t];o&&o._c&&(o._d=!1),T();const s=o&&Dm(o(n)),i=Ue(je,{key:n.key||s&&s.key||`_${t}`},s||(r?r():[]),s&&e._===1?64:-2);return!a&&i.scopeId&&(i.slotScopeIds=[i.scopeId+"-s"]),o&&o._c&&(o._d=!0),i}function Dm(e){return e.some(t=>ta(t)?!(t.type===yn||t.type===je&&!Dm(t.children)):!0)?e:null}function C1(e,t){const n={};for(const r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:ts(r)]=e[r];return n}const Fc=e=>e?av(e)?hl(e)||e.proxy:Fc(e.parent):null,ns=Vt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Fc(e.parent),$root:e=>Fc(e.root),$emit:e=>e.emit,$options:e=>Mu(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,il(e.update)}),$nextTick:e=>e.n||(e.n=Mn.bind(e.proxy)),$watch:e=>g1.bind(e)}),pc=(e,t)=>e!==Tt&&!e.__isScriptSetup&&At(e,t),jc={get({_:e},t){const{ctx:n,setupState:r,data:a,props:o,accessCache:s,type:i,appContext:l}=e;let c;if(t[0]!=="$"){const w=s[t];if(w!==void 0)switch(w){case 1:return r[t];case 2:return a[t];case 4:return n[t];case 3:return o[t]}else{if(pc(r,t))return s[t]=1,r[t];if(a!==Tt&&At(a,t))return s[t]=2,a[t];if((c=e.propsOptions[0])&&At(c,t))return s[t]=3,o[t];if(n!==Tt&&At(n,t))return s[t]=4,n[t];Vc&&(s[t]=0)}}const f=ns[t];let u,m;if(f)return t==="$attrs"&&On(e,"get",t),f(e);if((u=i.__cssModules)&&(u=u[t]))return u;if(n!==Tt&&At(n,t))return s[t]=4,n[t];if(m=l.config.globalProperties,At(m,t))return m[t]},set({_:e},t,n){const{data:r,setupState:a,ctx:o}=e;return pc(a,t)?(a[t]=n,!0):r!==Tt&&At(r,t)?(r[t]=n,!0):At(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:a,propsOptions:o}},s){let i;return!!n[s]||e!==Tt&&At(e,s)||pc(t,s)||(i=o[0])&&At(i,s)||At(r,s)||At(ns,s)||At(a.config.globalProperties,s)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:At(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},$1=Vt({},jc,{get(e,t){if(t!==Symbol.unscopables)return jc.get(e,t,e)},has(e,t){return t[0]!=="_"&&!aw(t)}});function I1(){return null}function S1(){return null}function E1(e){}function k1(e){}function T1(){return null}function x1(){}function P1(e,t){return null}function M1(){return Fm().slots}function N1(){return Fm().attrs}function Fm(){const e=Nr();return e.setupContext||(e.setupContext=iv(e))}function ws(e){return qe(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function O1(e,t){const n=ws(e);for(const r in t){if(r.startsWith("__skip"))continue;let a=n[r];a?qe(a)||rt(a)?a=n[r]={type:a,default:t[r]}:a.default=t[r]:a===null&&(a=n[r]={default:t[r]}),a&&t[`__skip_${r}`]&&(a.skipFactory=!0)}return n}function Ua(e,t){return!e||!t?e||t:qe(e)&&qe(t)?e.concat(t):Vt({},ws(e),ws(t))}function R1(e,t){const n={};for(const r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function L1(e){const t=Nr();let n=e();return Wc(),pu(n)&&(n=n.catch(r=>{throw Na(t),r})),[n,()=>Na(t)]}let Vc=!0;function D1(e){const t=Mu(e),n=e.proxy,r=e.ctx;Vc=!1,t.beforeCreate&&pp(t.beforeCreate,e,"bc");const{data:a,computed:o,methods:s,watch:i,provide:l,inject:c,created:f,beforeMount:u,mounted:m,beforeUpdate:w,updated:b,activated:g,deactivated:v,beforeDestroy:A,beforeUnmount:C,destroyed:y,unmounted:p,render:$,renderTracked:E,renderTriggered:B,errorCaptured:z,serverPrefetch:le,expose:fe,inheritAttrs:Le,components:be,directives:Ce,filters:Re}=t;if(c&&F1(c,r,null),s)for(const ce in s){const he=s[ce];rt(he)&&(r[ce]=he.bind(n))}if(a){const ce=a.call(n,n);Mt(ce)&&(e.data=ol(ce))}if(Vc=!0,o)for(const ce in o){const he=o[ce],ke=rt(he)?he.bind(n,n):rt(he.get)?he.get.bind(n,n):xn,ye=!rt(he)&&rt(he.set)?he.set.bind(n):xn,j=ne({get:ke,set:ye});Object.defineProperty(r,ce,{enumerable:!0,configurable:!0,get:()=>j.value,set:ue=>j.value=ue})}if(i)for(const ce in i)jm(i[ce],r,n,ce);if(l){const ce=rt(l)?l.call(n):l;Reflect.ownKeys(ce).forEach(he=>{Bm(he,ce[he])})}f&&pp(f,e,"c");function se(ce,he){qe(he)?he.forEach(ke=>ce(ke.bind(n))):he&&ce(he.bind(n))}if(se(So,u),se(Zt,m),se(Mm,w),se(fl,b),se(Tm,g),se(xm,v),se(Lm,z),se(Rm,E),se(Om,B),se(Ba,C),se(cr,p),se(Nm,le),qe(fe))if(fe.length){const ce=e.exposed||(e.exposed={});fe.forEach(he=>{Object.defineProperty(ce,he,{get:()=>n[he],set:ke=>n[he]=ke})})}else e.exposed||(e.exposed={});$&&e.render===xn&&(e.render=$),Le!=null&&(e.inheritAttrs=Le),be&&(e.components=be),Ce&&(e.directives=Ce)}function F1(e,t,n=xn){qe(e)&&(e=Bc(e));for(const r in e){const a=e[r];let o;Mt(a)?"default"in a?o=Z(a.from||r,a.default,!0):o=Z(a.from||r):o=Z(a),an(o)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:s=>o.value=s}):t[r]=o}}function pp(e,t,n){Hn(qe(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function jm(e,t,n,r){const a=r.includes(".")?Sm(n,r):()=>n[r];if(Bt(e)){const o=t[e];rt(o)&&Ke(a,o)}else if(rt(e))Ke(a,e.bind(n));else if(Mt(e))if(qe(e))e.forEach(o=>jm(o,t,n,r));else{const o=rt(e.handler)?e.handler.bind(n):t[e.handler];rt(o)&&Ke(a,o,e)}}function Mu(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:a,optionsCache:o,config:{optionMergeStrategies:s}}=e.appContext,i=o.get(t);let l;return i?l=i:!a.length&&!n&&!r?l=t:(l={},a.length&&a.forEach(c=>Vi(l,c,s,!0)),Vi(l,t,s)),Mt(t)&&o.set(t,l),l}function Vi(e,t,n,r=!1){const{mixins:a,extends:o}=t;o&&Vi(e,o,n,!0),a&&a.forEach(s=>Vi(e,s,n,!0));for(const s in t)if(!(r&&s==="expose")){const i=j1[s]||n&&n[s];e[s]=i?i(e[s],t[s]):t[s]}return e}const j1={data:hp,props:mp,emits:mp,methods:Qo,computed:Qo,beforeCreate:wn,created:wn,beforeMount:wn,mounted:wn,beforeUpdate:wn,updated:wn,beforeDestroy:wn,beforeUnmount:wn,destroyed:wn,unmounted:wn,activated:wn,deactivated:wn,errorCaptured:wn,serverPrefetch:wn,components:Qo,directives:Qo,watch:B1,provide:hp,inject:V1};function hp(e,t){return t?e?function(){return Vt(rt(e)?e.call(this,this):e,rt(t)?t.call(this,this):t)}:t:e}function V1(e,t){return Qo(Bc(e),Bc(t))}function Bc(e){if(qe(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function wn(e,t){return e?[...new Set([].concat(e,t))]:t}function Qo(e,t){return e?Vt(Object.create(null),e,t):t}function mp(e,t){return e?qe(e)&&qe(t)?[...new Set([...e,...t])]:Vt(Object.create(null),ws(e),ws(t??{})):t}function B1(e,t){if(!e)return t;if(!t)return e;const n=Vt(Object.create(null),e);for(const r in t)n[r]=wn(e[r],t[r]);return n}function Vm(){return{app:null,config:{isNativeTag:Q0,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let U1=0;function H1(e,t){return function(r,a=null){rt(r)||(r=Vt({},r)),a!=null&&!Mt(a)&&(a=null);const o=Vm(),s=new WeakSet;let i=!1;const l=o.app={_uid:U1++,_component:r,_props:a,_container:null,_context:o,_instance:null,version:cv,get config(){return o.config},set config(c){},use(c,...f){return s.has(c)||(c&&rt(c.install)?(s.add(c),c.install(l,...f)):rt(c)&&(s.add(c),c(l,...f))),l},mixin(c){return o.mixins.includes(c)||o.mixins.push(c),l},component(c,f){return f?(o.components[c]=f,l):o.components[c]},directive(c,f){return f?(o.directives[c]=f,l):o.directives[c]},mount(c,f,u){if(!i){const m=Ye(r,a);return m.appContext=o,u===!0?u="svg":u===!1&&(u=void 0),f&&t?t(m,c):e(m,c,u),i=!0,l._container=c,c.__vue_app__=l,hl(m.component)||m.component.proxy}},unmount(){i&&(e(null,l._container),delete l._container.__vue_app__)},provide(c,f){return o.provides[c]=f,l},runWithContext(c){const f=po;po=l;try{return c()}finally{po=f}}};return l}}let po=null;function Bm(e,t){if(Yt){let n=Yt.provides;const r=Yt.parent&&Yt.parent.provides;r===n&&(n=Yt.provides=Object.create(r)),n[e]=t}}function Z(e,t,n=!1){const r=Yt||Kt;if(r||po){const a=r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:po._context.provides;if(a&&e in a)return a[e];if(arguments.length>1)return n&&rt(t)?t.call(r&&r.proxy):t}}function z1(){return!!(Yt||Kt||po)}function K1(e,t,n,r=!1){const a={},o={};Ri(o,pl,1),e.propsDefaults=Object.create(null),Um(e,t,a,o);for(const s in e.propsOptions[0])s in a||(a[s]=void 0);n?e.props=r?a:lm(a):e.type.props?e.props=a:e.props=o,e.attrs=o}function W1(e,t,n,r){const{props:a,attrs:o,vnode:{patchFlag:s}}=e,i=ct(a),[l]=e.propsOptions;let c=!1;if((r||s>0)&&!(s&16)){if(s&8){const f=e.vnode.dynamicProps;for(let u=0;u<f.length;u++){let m=f[u];if(ll(e.emitsOptions,m))continue;const w=t[m];if(l)if(At(o,m))w!==o[m]&&(o[m]=w,c=!0);else{const b=Cn(m);a[b]=Uc(l,i,b,w,e,!1)}else w!==o[m]&&(o[m]=w,c=!0)}}}else{Um(e,t,a,o)&&(c=!0);let f;for(const u in i)(!t||!At(t,u)&&((f=Un(u))===u||!At(t,f)))&&(l?n&&(n[u]!==void 0||n[f]!==void 0)&&(a[u]=Uc(l,i,u,void 0,e,!0)):delete a[u]);if(o!==i)for(const u in o)(!t||!At(t,u))&&(delete o[u],c=!0)}c&&Er(e,"set","$attrs")}function Um(e,t,n,r){const[a,o]=e.propsOptions;let s=!1,i;if(t)for(let l in t){if(io(l))continue;const c=t[l];let f;a&&At(a,f=Cn(l))?!o||!o.includes(f)?n[f]=c:(i||(i={}))[f]=c:ll(e.emitsOptions,l)||(!(l in r)||c!==r[l])&&(r[l]=c,s=!0)}if(o){const l=ct(n),c=i||Tt;for(let f=0;f<o.length;f++){const u=o[f];n[u]=Uc(a,l,u,c[u],e,!At(c,u))}}return s}function Uc(e,t,n,r,a,o){const s=e[n];if(s!=null){const i=At(s,"default");if(i&&r===void 0){const l=s.default;if(s.type!==Function&&!s.skipFactory&&rt(l)){const{propsDefaults:c}=a;if(n in c)r=c[n];else{const f=Na(a);r=c[n]=l.call(null,t),f()}}else r=l}s[0]&&(o&&!i?r=!1:s[1]&&(r===""||r===Un(n))&&(r=!0))}return r}function Hm(e,t,n=!1){const r=t.propsCache,a=r.get(e);if(a)return a;const o=e.props,s={},i=[];let l=!1;if(!rt(e)){const f=u=>{l=!0;const[m,w]=Hm(u,t,!0);Vt(s,m),w&&i.push(...w)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!o&&!l)return Mt(e)&&r.set(e,oo),oo;if(qe(o))for(let f=0;f<o.length;f++){const u=Cn(o[f]);vp(u)&&(s[u]=Tt)}else if(o)for(const f in o){const u=Cn(f);if(vp(u)){const m=o[f],w=s[u]=qe(m)||rt(m)?{type:m}:Vt({},m);if(w){const b=_p(Boolean,w.type),g=_p(String,w.type);w[0]=b>-1,w[1]=g<0||b<g,(b>-1||At(w,"default"))&&i.push(u)}}}const c=[s,i];return Mt(e)&&r.set(e,c),c}function vp(e){return e[0]!=="$"&&!io(e)}function gp(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function yp(e,t){return gp(e)===gp(t)}function _p(e,t){return qe(t)?t.findIndex(n=>yp(n,e)):rt(t)&&yp(t,e)?0:-1}const zm=e=>e[0]==="_"||e==="$stable",Nu=e=>qe(e)?e.map(Bn):[Bn(e)],G1=(e,t,n)=>{if(t._n)return t;const r=Ze((...a)=>Nu(t(...a)),n);return r._c=!1,r},Km=(e,t,n)=>{const r=e._ctx;for(const a in e){if(zm(a))continue;const o=e[a];if(rt(o))t[a]=G1(a,o,r);else if(o!=null){const s=Nu(o);t[a]=()=>s}}},Wm=(e,t)=>{const n=Nu(t);e.slots.default=()=>n},q1=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=ct(t),Ri(t,"_",n)):Km(t,e.slots={})}else e.slots={},t&&Wm(e,t);Ri(e.slots,pl,1)},J1=(e,t,n)=>{const{vnode:r,slots:a}=e;let o=!0,s=Tt;if(r.shapeFlag&32){const i=t._;i?n&&i===1?o=!1:(Vt(a,t),!n&&i===1&&delete a._):(o=!t.$stable,Km(t,a)),s=t}else t&&(Wm(e,t),s={default:1});if(o)for(const i in a)!zm(i)&&s[i]==null&&delete a[i]};function Bi(e,t,n,r,a=!1){if(qe(e)){e.forEach((m,w)=>Bi(m,t&&(qe(t)?t[w]:t),n,r,a));return}if(Ea(r)&&!a)return;const o=r.shapeFlag&4?hl(r.component)||r.component.proxy:r.el,s=a?null:o,{i,r:l}=e,c=t&&t.r,f=i.refs===Tt?i.refs={}:i.refs,u=i.setupState;if(c!=null&&c!==l&&(Bt(c)?(f[c]=null,At(u,c)&&(u[c]=null)):an(c)&&(c.value=null)),rt(l))kr(l,i,12,[s,f]);else{const m=Bt(l),w=an(l);if(m||w){const b=()=>{if(e.f){const g=m?At(u,l)?u[l]:f[l]:l.value;a?qe(g)&&fu(g,o):qe(g)?g.includes(o)||g.push(o):m?(f[l]=[o],At(u,l)&&(u[l]=f[l])):(l.value=[o],e.k&&(f[e.k]=l.value))}else m?(f[l]=s,At(u,l)&&(u[l]=s)):w&&(l.value=s,e.k&&(f[e.k]=s))};s?(b.id=-1,dn(b,n)):b()}}}let Vr=!1;const Y1=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Q1=e=>e.namespaceURI.includes("MathML"),li=e=>{if(Y1(e))return"svg";if(Q1(e))return"mathml"},ci=e=>e.nodeType===8;function X1(e){const{mt:t,p:n,o:{patchProp:r,createText:a,nextSibling:o,parentNode:s,remove:i,insert:l,createComment:c}}=e,f=(y,p)=>{if(!p.hasChildNodes()){n(null,y,p),ji(),p._vnode=y;return}Vr=!1,u(p.firstChild,y,null,null,null),ji(),p._vnode=y,Vr&&console.error("Hydration completed but contains mismatches.")},u=(y,p,$,E,B,z=!1)=>{const le=ci(y)&&y.data==="[",fe=()=>g(y,p,$,E,B,le),{type:Le,ref:be,shapeFlag:Ce,patchFlag:Re}=p;let Je=y.nodeType;p.el=y,Re===-2&&(z=!1,p.dynamicChildren=null);let se=null;switch(Le){case Pa:Je!==3?p.children===""?(l(p.el=a(""),s(y),y),se=y):se=fe():(y.data!==p.children&&(Vr=!0,y.data=p.children),se=o(y));break;case yn:C(y)?(se=o(y),A(p.el=y.content.firstChild,y,$)):Je!==8||le?se=fe():se=o(y);break;case ka:if(le&&(y=o(y),Je=y.nodeType),Je===1||Je===3){se=y;const ce=!p.children.length;for(let he=0;he<p.staticCount;he++)ce&&(p.children+=se.nodeType===1?se.outerHTML:se.data),he===p.staticCount-1&&(p.anchor=se),se=o(se);return le?o(se):se}else fe();break;case je:le?se=b(y,p,$,E,B,z):se=fe();break;default:if(Ce&1)(Je!==1||p.type.toLowerCase()!==y.tagName.toLowerCase())&&!C(y)?se=fe():se=m(y,p,$,E,B,z);else if(Ce&6){p.slotScopeIds=B;const ce=s(y);if(le?se=v(y):ci(y)&&y.data==="teleport start"?se=v(y,y.data,"teleport end"):se=o(y),t(p,ce,null,$,E,li(ce),z),Ea(p)){let he;le?(he=Ye(je),he.anchor=se?se.previousSibling:ce.lastChild):he=y.nodeType===3?xt(""):Ye("div"),he.el=y,p.component.subTree=he}}else Ce&64?Je!==8?se=fe():se=p.type.hydrate(y,p,$,E,B,z,e,w):Ce&128&&(se=p.type.hydrate(y,p,$,E,li(s(y)),B,z,e,u))}return be!=null&&Bi(be,null,E,p),se},m=(y,p,$,E,B,z)=>{z=z||!!p.dynamicChildren;const{type:le,props:fe,patchFlag:Le,shapeFlag:be,dirs:Ce,transition:Re}=p,Je=le==="input"||le==="option";if(Je||Le!==-1){Ce&&dr(p,null,$,"created");let se=!1;if(C(y)){se=Ym(E,Re)&&$&&$.vnode.props&&$.vnode.props.appear;const he=y.content.firstChild;se&&Re.beforeEnter(he),A(he,y,$),p.el=y=he}if(be&16&&!(fe&&(fe.innerHTML||fe.textContent))){let he=w(y.firstChild,p,y,$,E,B,z);for(;he;){Vr=!0;const ke=he;he=he.nextSibling,i(ke)}}else be&8&&y.textContent!==p.children&&(Vr=!0,y.textContent=p.children);if(fe)if(Je||!z||Le&48)for(const he in fe)(Je&&(he.endsWith("value")||he==="indeterminate")||$s(he)&&!io(he)||he[0]===".")&&r(y,he,null,fe[he],void 0,void 0,$);else fe.onClick&&r(y,"onClick",null,fe.onClick,void 0,void 0,$);let ce;(ce=fe&&fe.onVnodeBeforeMount)&&En(ce,$,p),Ce&&dr(p,null,$,"beforeMount"),((ce=fe&&fe.onVnodeMounted)||Ce||se)&&wm(()=>{ce&&En(ce,$,p),se&&Re.enter(y),Ce&&dr(p,null,$,"mounted")},E)}return y.nextSibling},w=(y,p,$,E,B,z,le)=>{le=le||!!p.dynamicChildren;const fe=p.children,Le=fe.length;for(let be=0;be<Le;be++){const Ce=le?fe[be]:fe[be]=Bn(fe[be]);if(y)y=u(y,Ce,E,B,z,le);else{if(Ce.type===Pa&&!Ce.children)continue;Vr=!0,n(null,Ce,$,null,E,B,li($),z)}}return y},b=(y,p,$,E,B,z)=>{const{slotScopeIds:le}=p;le&&(B=B?B.concat(le):le);const fe=s(y),Le=w(o(y),p,fe,$,E,B,z);return Le&&ci(Le)&&Le.data==="]"?o(p.anchor=Le):(Vr=!0,l(p.anchor=c("]"),fe,Le),Le)},g=(y,p,$,E,B,z)=>{if(Vr=!0,p.el=null,z){const Le=v(y);for(;;){const be=o(y);if(be&&be!==Le)i(be);else break}}const le=o(y),fe=s(y);return i(y),n(null,p,fe,le,$,E,li(fe),B),le},v=(y,p="[",$="]")=>{let E=0;for(;y;)if(y=o(y),y&&ci(y)&&(y.data===p&&E++,y.data===$)){if(E===0)return o(y);E--}return y},A=(y,p,$)=>{const E=p.parentNode;E&&E.replaceChild(y,p);let B=$;for(;B;)B.vnode.el===p&&(B.vnode.el=B.subTree.el=y),B=B.parent},C=y=>y.nodeType===1&&y.tagName.toLowerCase()==="template";return[f,u]}const dn=wm;function Gm(e){return Jm(e)}function qm(e){return Jm(e,X1)}function Jm(e,t){const n=zh();n.__VUE__=!0;const{insert:r,remove:a,patchProp:o,createElement:s,createText:i,createComment:l,setText:c,setElementText:f,parentNode:u,nextSibling:m,setScopeId:w=xn,insertStaticContent:b}=e,g=(S,k,V,Y=null,re=null,ie=null,$e=void 0,ge=null,Ae=!!k.dynamicChildren)=>{if(S===k)return;S&&!rr(S,k)&&(Y=Me(S),ue(S,re,ie,!0),S=null),k.patchFlag===-2&&(Ae=!1,k.dynamicChildren=null);const{type:_e,ref:H,shapeFlag:pe}=k;switch(_e){case Pa:v(S,k,V,Y);break;case yn:A(S,k,V,Y);break;case ka:S==null&&C(k,V,Y,$e);break;case je:be(S,k,V,Y,re,ie,$e,ge,Ae);break;default:pe&1?$(S,k,V,Y,re,ie,$e,ge,Ae):pe&6?Ce(S,k,V,Y,re,ie,$e,ge,Ae):(pe&64||pe&128)&&_e.process(S,k,V,Y,re,ie,$e,ge,Ae,J)}H!=null&&re&&Bi(H,S&&S.ref,ie,k||S,!k)},v=(S,k,V,Y)=>{if(S==null)r(k.el=i(k.children),V,Y);else{const re=k.el=S.el;k.children!==S.children&&c(re,k.children)}},A=(S,k,V,Y)=>{S==null?r(k.el=l(k.children||""),V,Y):k.el=S.el},C=(S,k,V,Y)=>{[S.el,S.anchor]=b(S.children,k,V,Y,S.el,S.anchor)},y=({el:S,anchor:k},V,Y)=>{let re;for(;S&&S!==k;)re=m(S),r(S,V,Y),S=re;r(k,V,Y)},p=({el:S,anchor:k})=>{let V;for(;S&&S!==k;)V=m(S),a(S),S=V;a(k)},$=(S,k,V,Y,re,ie,$e,ge,Ae)=>{k.type==="svg"?$e="svg":k.type==="math"&&($e="mathml"),S==null?E(k,V,Y,re,ie,$e,ge,Ae):le(S,k,re,ie,$e,ge,Ae)},E=(S,k,V,Y,re,ie,$e,ge)=>{let Ae,_e;const{props:H,shapeFlag:pe,transition:de,dirs:me}=S;if(Ae=S.el=s(S.type,ie,H&&H.is,H),pe&8?f(Ae,S.children):pe&16&&z(S.children,Ae,null,Y,re,hc(S,ie),$e,ge),me&&dr(S,null,Y,"created"),B(Ae,S,S.scopeId,$e,Y),H){for(const De in H)De!=="value"&&!io(De)&&o(Ae,De,null,H[De],ie,S.children,Y,re,Q);"value"in H&&o(Ae,"value",null,H.value,ie),(_e=H.onVnodeBeforeMount)&&En(_e,Y,S)}me&&dr(S,null,Y,"beforeMount");const Ee=Ym(re,de);Ee&&de.beforeEnter(Ae),r(Ae,k,V),((_e=H&&H.onVnodeMounted)||Ee||me)&&dn(()=>{_e&&En(_e,Y,S),Ee&&de.enter(Ae),me&&dr(S,null,Y,"mounted")},re)},B=(S,k,V,Y,re)=>{if(V&&w(S,V),Y)for(let ie=0;ie<Y.length;ie++)w(S,Y[ie]);if(re){let ie=re.subTree;if(k===ie){const $e=re.vnode;B(S,$e,$e.scopeId,$e.slotScopeIds,re.parent)}}},z=(S,k,V,Y,re,ie,$e,ge,Ae=0)=>{for(let _e=Ae;_e<S.length;_e++){const H=S[_e]=ge?Gr(S[_e]):Bn(S[_e]);g(null,H,k,V,Y,re,ie,$e,ge)}},le=(S,k,V,Y,re,ie,$e)=>{const ge=k.el=S.el;let{patchFlag:Ae,dynamicChildren:_e,dirs:H}=k;Ae|=S.patchFlag&16;const pe=S.props||Tt,de=k.props||Tt;let me;if(V&&ha(V,!1),(me=de.onVnodeBeforeUpdate)&&En(me,V,k,S),H&&dr(k,S,V,"beforeUpdate"),V&&ha(V,!0),_e?fe(S.dynamicChildren,_e,ge,V,Y,hc(k,re),ie):$e||he(S,k,ge,null,V,Y,hc(k,re),ie,!1),Ae>0){if(Ae&16)Le(ge,k,pe,de,V,Y,re);else if(Ae&2&&pe.class!==de.class&&o(ge,"class",null,de.class,re),Ae&4&&o(ge,"style",pe.style,de.style,re),Ae&8){const Ee=k.dynamicProps;for(let De=0;De<Ee.length;De++){const We=Ee[De],nt=pe[We],ot=de[We];(ot!==nt||We==="value")&&o(ge,We,nt,ot,re,S.children,V,Y,Q)}}Ae&1&&S.children!==k.children&&f(ge,k.children)}else!$e&&_e==null&&Le(ge,k,pe,de,V,Y,re);((me=de.onVnodeUpdated)||H)&&dn(()=>{me&&En(me,V,k,S),H&&dr(k,S,V,"updated")},Y)},fe=(S,k,V,Y,re,ie,$e)=>{for(let ge=0;ge<k.length;ge++){const Ae=S[ge],_e=k[ge],H=Ae.el&&(Ae.type===je||!rr(Ae,_e)||Ae.shapeFlag&70)?u(Ae.el):V;g(Ae,_e,H,null,Y,re,ie,$e,!0)}},Le=(S,k,V,Y,re,ie,$e)=>{if(V!==Y){if(V!==Tt)for(const ge in V)!io(ge)&&!(ge in Y)&&o(S,ge,V[ge],null,$e,k.children,re,ie,Q);for(const ge in Y){if(io(ge))continue;const Ae=Y[ge],_e=V[ge];Ae!==_e&&ge!=="value"&&o(S,ge,_e,Ae,$e,k.children,re,ie,Q)}"value"in Y&&o(S,"value",V.value,Y.value,$e)}},be=(S,k,V,Y,re,ie,$e,ge,Ae)=>{const _e=k.el=S?S.el:i(""),H=k.anchor=S?S.anchor:i("");let{patchFlag:pe,dynamicChildren:de,slotScopeIds:me}=k;me&&(ge=ge?ge.concat(me):me),S==null?(r(_e,V,Y),r(H,V,Y),z(k.children||[],V,H,re,ie,$e,ge,Ae)):pe>0&&pe&64&&de&&S.dynamicChildren?(fe(S.dynamicChildren,de,V,re,ie,$e,ge),(k.key!=null||re&&k===re.subTree)&&Ou(S,k,!0)):he(S,k,V,H,re,ie,$e,ge,Ae)},Ce=(S,k,V,Y,re,ie,$e,ge,Ae)=>{k.slotScopeIds=ge,S==null?k.shapeFlag&512?re.ctx.activate(k,V,Y,$e,Ae):Re(k,V,Y,re,ie,$e,Ae):Je(S,k,Ae)},Re=(S,k,V,Y,re,ie,$e)=>{const ge=S.component=rv(S,Y,re);if(ks(S)&&(ge.ctx.renderer=J),ov(ge),ge.asyncDep){if(re&&re.registerDep(ge,se),!S.el){const Ae=ge.subTree=Ye(yn);A(null,Ae,k,V)}}else se(ge,S,k,V,re,ie,$e)},Je=(S,k,V)=>{const Y=k.component=S.component;if(s1(S,k,V))if(Y.asyncDep&&!Y.asyncResolved){ce(Y,k,V);return}else Y.next=k,Zw(Y.update),Y.effect.dirty=!0,Y.update();else k.el=S.el,Y.vnode=k},se=(S,k,V,Y,re,ie,$e)=>{const ge=()=>{if(S.isMounted){let{next:H,bu:pe,u:de,parent:me,vnode:Ee}=S;{const _t=Qm(S);if(_t){H&&(H.el=Ee.el,ce(S,H,$e)),_t.asyncDep.then(()=>{S.isUnmounted||ge()});return}}let De=H,We;ha(S,!1),H?(H.el=Ee.el,ce(S,H,$e)):H=Ee,pe&&lo(pe),(We=H.props&&H.props.onVnodeBeforeUpdate)&&En(We,me,H,Ee),ha(S,!0);const nt=Ii(S),ot=S.subTree;S.subTree=nt,g(ot,nt,u(ot.el),Me(ot),S,re,ie),H.el=nt.el,De===null&&Su(S,nt.el),de&&dn(de,re),(We=H.props&&H.props.onVnodeUpdated)&&dn(()=>En(We,me,H,Ee),re)}else{let H;const{el:pe,props:de}=k,{bm:me,m:Ee,parent:De}=S,We=Ea(k);if(ha(S,!1),me&&lo(me),!We&&(H=de&&de.onVnodeBeforeMount)&&En(H,De,k),ha(S,!0),pe&&K){const nt=()=>{S.subTree=Ii(S),K(pe,S.subTree,S,re,null)};We?k.type.__asyncLoader().then(()=>!S.isUnmounted&&nt()):nt()}else{const nt=S.subTree=Ii(S);g(null,nt,V,Y,S,re,ie),k.el=nt.el}if(Ee&&dn(Ee,re),!We&&(H=de&&de.onVnodeMounted)){const nt=k;dn(()=>En(H,De,nt),re)}(k.shapeFlag&256||De&&Ea(De.vnode)&&De.vnode.shapeFlag&256)&&S.a&&dn(S.a,re),S.isMounted=!0,k=V=Y=null}},Ae=S.effect=new vo(ge,xn,()=>il(_e),S.scope),_e=S.update=()=>{Ae.dirty&&Ae.run()};_e.id=S.uid,ha(S,!0),_e()},ce=(S,k,V)=>{k.component=S;const Y=S.vnode.props;S.vnode=k,S.next=null,W1(S,k.props,Y,V),J1(S,k.children,V),Fa(),lp(S),ja()},he=(S,k,V,Y,re,ie,$e,ge,Ae=!1)=>{const _e=S&&S.children,H=S?S.shapeFlag:0,pe=k.children,{patchFlag:de,shapeFlag:me}=k;if(de>0){if(de&128){ye(_e,pe,V,Y,re,ie,$e,ge,Ae);return}else if(de&256){ke(_e,pe,V,Y,re,ie,$e,ge,Ae);return}}me&8?(H&16&&Q(_e,re,ie),pe!==_e&&f(V,pe)):H&16?me&16?ye(_e,pe,V,Y,re,ie,$e,ge,Ae):Q(_e,re,ie,!0):(H&8&&f(V,""),me&16&&z(pe,V,Y,re,ie,$e,ge,Ae))},ke=(S,k,V,Y,re,ie,$e,ge,Ae)=>{S=S||oo,k=k||oo;const _e=S.length,H=k.length,pe=Math.min(_e,H);let de;for(de=0;de<pe;de++){const me=k[de]=Ae?Gr(k[de]):Bn(k[de]);g(S[de],me,V,null,re,ie,$e,ge,Ae)}_e>H?Q(S,re,ie,!0,!1,pe):z(k,V,Y,re,ie,$e,ge,Ae,pe)},ye=(S,k,V,Y,re,ie,$e,ge,Ae)=>{let _e=0;const H=k.length;let pe=S.length-1,de=H-1;for(;_e<=pe&&_e<=de;){const me=S[_e],Ee=k[_e]=Ae?Gr(k[_e]):Bn(k[_e]);if(rr(me,Ee))g(me,Ee,V,null,re,ie,$e,ge,Ae);else break;_e++}for(;_e<=pe&&_e<=de;){const me=S[pe],Ee=k[de]=Ae?Gr(k[de]):Bn(k[de]);if(rr(me,Ee))g(me,Ee,V,null,re,ie,$e,ge,Ae);else break;pe--,de--}if(_e>pe){if(_e<=de){const me=de+1,Ee=me<H?k[me].el:Y;for(;_e<=de;)g(null,k[_e]=Ae?Gr(k[_e]):Bn(k[_e]),V,Ee,re,ie,$e,ge,Ae),_e++}}else if(_e>de)for(;_e<=pe;)ue(S[_e],re,ie,!0),_e++;else{const me=_e,Ee=_e,De=new Map;for(_e=Ee;_e<=de;_e++){const Rt=k[_e]=Ae?Gr(k[_e]):Bn(k[_e]);Rt.key!=null&&De.set(Rt.key,_e)}let We,nt=0;const ot=de-Ee+1;let _t=!1,jt=0;const gt=new Array(ot);for(_e=0;_e<ot;_e++)gt[_e]=0;for(_e=me;_e<=pe;_e++){const Rt=S[_e];if(nt>=ot){ue(Rt,re,ie,!0);continue}let bn;if(Rt.key!=null)bn=De.get(Rt.key);else for(We=Ee;We<=de;We++)if(gt[We-Ee]===0&&rr(Rt,k[We])){bn=We;break}bn===void 0?ue(Rt,re,ie,!0):(gt[bn-Ee]=_e+1,bn>=jt?jt=bn:_t=!0,g(Rt,k[bn],V,null,re,ie,$e,ge,Ae),nt++)}const sn=_t?Z1(gt):oo;for(We=sn.length-1,_e=ot-1;_e>=0;_e--){const Rt=Ee+_e,bn=k[Rt],la=Rt+1<H?k[Rt+1].el:Y;gt[_e]===0?g(null,bn,V,la,re,ie,$e,ge,Ae):_t&&(We<0||_e!==sn[We]?j(bn,V,la,2):We--)}}},j=(S,k,V,Y,re=null)=>{const{el:ie,type:$e,transition:ge,children:Ae,shapeFlag:_e}=S;if(_e&6){j(S.component.subTree,k,V,Y);return}if(_e&128){S.suspense.move(k,V,Y);return}if(_e&64){$e.move(S,k,V,J);return}if($e===je){r(ie,k,V);for(let pe=0;pe<Ae.length;pe++)j(Ae[pe],k,V,Y);r(S.anchor,k,V);return}if($e===ka){y(S,k,V);return}if(Y!==2&&_e&1&&ge)if(Y===0)ge.beforeEnter(ie),r(ie,k,V),dn(()=>ge.enter(ie),re);else{const{leave:pe,delayLeave:de,afterLeave:me}=ge,Ee=()=>r(ie,k,V),De=()=>{pe(ie,()=>{Ee(),me&&me()})};de?de(ie,Ee,De):De()}else r(ie,k,V)},ue=(S,k,V,Y=!1,re=!1)=>{const{type:ie,props:$e,ref:ge,children:Ae,dynamicChildren:_e,shapeFlag:H,patchFlag:pe,dirs:de}=S;if(ge!=null&&Bi(ge,null,V,S,!0),H&256){k.ctx.deactivate(S);return}const me=H&1&&de,Ee=!Ea(S);let De;if(Ee&&(De=$e&&$e.onVnodeBeforeUnmount)&&En(De,k,S),H&6)M(S.component,V,Y);else{if(H&128){S.suspense.unmount(V,Y);return}me&&dr(S,null,k,"beforeUnmount"),H&64?S.type.remove(S,k,V,re,J,Y):_e&&(ie!==je||pe>0&&pe&64)?Q(_e,k,V,!1,!0):(ie===je&&pe&384||!re&&H&16)&&Q(Ae,k,V),Y&&O(S)}(Ee&&(De=$e&&$e.onVnodeUnmounted)||me)&&dn(()=>{De&&En(De,k,S),me&&dr(S,null,k,"unmounted")},V)},O=S=>{const{type:k,el:V,anchor:Y,transition:re}=S;if(k===je){I(V,Y);return}if(k===ka){p(S);return}const ie=()=>{a(V),re&&!re.persisted&&re.afterLeave&&re.afterLeave()};if(S.shapeFlag&1&&re&&!re.persisted){const{leave:$e,delayLeave:ge}=re,Ae=()=>$e(V,ie);ge?ge(S.el,ie,Ae):Ae()}else ie()},I=(S,k)=>{let V;for(;S!==k;)V=m(S),a(S),S=V;a(k)},M=(S,k,V)=>{const{bum:Y,scope:re,update:ie,subTree:$e,um:ge}=S;Y&&lo(Y),re.stop(),ie&&(ie.active=!1,ue($e,S,k,V)),ge&&dn(ge,k),dn(()=>{S.isUnmounted=!0},k),k&&k.pendingBranch&&!k.isUnmounted&&S.asyncDep&&!S.asyncResolved&&S.suspenseId===k.pendingId&&(k.deps--,k.deps===0&&k.resolve())},Q=(S,k,V,Y=!1,re=!1,ie=0)=>{for(let $e=ie;$e<S.length;$e++)ue(S[$e],k,V,Y,re)},Me=S=>S.shapeFlag&6?Me(S.component.subTree):S.shapeFlag&128?S.suspense.next():m(S.anchor||S.el);let F=!1;const G=(S,k,V)=>{S==null?k._vnode&&ue(k._vnode,null,null,!0):g(k._vnode||null,S,k,null,null,null,V),F||(F=!0,lp(),ji(),F=!1),k._vnode=S},J={p:g,um:ue,m:j,r:O,mt:Re,mc:z,pc:he,pbc:fe,n:Me,o:e};let ae,K;return t&&([ae,K]=t(J)),{render:G,hydrate:ae,createApp:H1(G,ae)}}function hc({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function ha({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Ym(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ou(e,t,n=!1){const r=e.children,a=t.children;if(qe(r)&&qe(a))for(let o=0;o<r.length;o++){const s=r[o];let i=a[o];i.shapeFlag&1&&!i.dynamicChildren&&((i.patchFlag<=0||i.patchFlag===32)&&(i=a[o]=Gr(a[o]),i.el=s.el),n||Ou(s,i)),i.type===Pa&&(i.el=s.el)}}function Z1(e){const t=e.slice(),n=[0];let r,a,o,s,i;const l=e.length;for(r=0;r<l;r++){const c=e[r];if(c!==0){if(a=n[n.length-1],e[a]<c){t[r]=a,n.push(r);continue}for(o=0,s=n.length-1;o<s;)i=o+s>>1,e[n[i]]<c?o=i+1:s=i;c<e[n[o]]&&(o>0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,s=n[o-1];o-- >0;)n[o]=s,s=t[s];return n}function Qm(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Qm(t)}const eA=e=>e.__isTeleport,rs=e=>e&&(e.disabled||e.disabled===""),bp=e=>typeof SVGElement<"u"&&e instanceof SVGElement,wp=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Hc=(e,t)=>{const n=e&&e.to;return Bt(n)?t?t(n):null:n},tA={name:"Teleport",__isTeleport:!0,process(e,t,n,r,a,o,s,i,l,c){const{mc:f,pc:u,pbc:m,o:{insert:w,querySelector:b,createText:g,createComment:v}}=c,A=rs(t.props);let{shapeFlag:C,children:y,dynamicChildren:p}=t;if(e==null){const $=t.el=g(""),E=t.anchor=g("");w($,n,r),w(E,n,r);const B=t.target=Hc(t.props,b),z=t.targetAnchor=g("");B&&(w(z,B),s==="svg"||bp(B)?s="svg":(s==="mathml"||wp(B))&&(s="mathml"));const le=(fe,Le)=>{C&16&&f(y,fe,Le,a,o,s,i,l)};A?le(n,E):B&&le(B,z)}else{t.el=e.el;const $=t.anchor=e.anchor,E=t.target=e.target,B=t.targetAnchor=e.targetAnchor,z=rs(e.props),le=z?n:E,fe=z?$:B;if(s==="svg"||bp(E)?s="svg":(s==="mathml"||wp(E))&&(s="mathml"),p?(m(e.dynamicChildren,p,le,a,o,s,i),Ou(e,t,!0)):l||u(e,t,le,fe,a,o,s,i,!1),A)z?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ui(t,n,$,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Le=t.target=Hc(t.props,b);Le&&ui(t,Le,null,c,0)}else z&&ui(t,E,B,c,1)}Xm(t)},remove(e,t,n,r,{um:a,o:{remove:o}},s){const{shapeFlag:i,children:l,anchor:c,targetAnchor:f,target:u,props:m}=e;if(u&&o(f),s&&o(c),i&16){const w=s||!rs(m);for(let b=0;b<l.length;b++){const g=l[b];a(g,t,n,w,!!g.dynamicChildren)}}},move:ui,hydrate:nA};function ui(e,t,n,{o:{insert:r},m:a},o=2){o===0&&r(e.targetAnchor,t,n);const{el:s,anchor:i,shapeFlag:l,children:c,props:f}=e,u=o===2;if(u&&r(s,t,n),(!u||rs(f))&&l&16)for(let m=0;m<c.length;m++)a(c[m],t,n,2);u&&r(i,t,n)}function nA(e,t,n,r,a,o,{o:{nextSibling:s,parentNode:i,querySelector:l}},c){const f=t.target=Hc(t.props,l);if(f){const u=f._lpa||f.firstChild;if(t.shapeFlag&16)if(rs(t.props))t.anchor=c(s(e),t,i(e),n,r,a,o),t.targetAnchor=u;else{t.anchor=s(e);let m=u;for(;m;)if(m=s(m),m&&m.nodeType===8&&m.data==="teleport anchor"){t.targetAnchor=m,f._lpa=t.targetAnchor&&s(t.targetAnchor);break}c(u,t,f,n,r,a,o)}Xm(t)}return t.anchor&&s(t.anchor)}const rA=tA;function Xm(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n&&n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}const je=Symbol.for("v-fgt"),Pa=Symbol.for("v-txt"),yn=Symbol.for("v-cmt"),ka=Symbol.for("v-stc"),as=[];let Pn=null;function T(e=!1){as.push(Pn=e?null:[])}function Zm(){as.pop(),Pn=as[as.length-1]||null}let Ma=1;function zc(e){Ma+=e}function ev(e){return e.dynamicChildren=Ma>0?Pn||oo:null,Zm(),Ma>0&&Pn&&Pn.push(e),e}function R(e,t,n,r,a,o){return ev(q(e,t,n,r,a,o,!0))}function Ue(e,t,n,r,a){return ev(Ye(e,t,n,r,a,!0))}function ta(e){return e?e.__v_isVNode===!0:!1}function rr(e,t){return e.type===t.type&&e.key===t.key}function aA(e){}const pl="__vInternal",tv=({key:e})=>e??null,Si=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Bt(e)||an(e)||rt(e)?{i:Kt,r:e,k:t,f:!!n}:e:null);function q(e,t=null,n=null,r=0,a=null,o=e===je?0:1,s=!1,i=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&tv(t),ref:t&&Si(t),scopeId:cl,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:Kt};return i?(Ru(l,n),o&128&&e.normalize(l)):n&&(l.shapeFlag|=Bt(n)?8:16),Ma>0&&!s&&Pn&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Pn.push(l),l}const Ye=oA;function oA(e,t=null,n=null,r=0,a=null,o=!1){if((!e||e===ym)&&(e=yn),ta(e)){const i=vr(e,t,!0);return n&&Ru(i,n),Ma>0&&!o&&Pn&&(i.shapeFlag&6?Pn[Pn.indexOf(e)]=i:Pn.push(i)),i.patchFlag|=-2,i}if(pA(e)&&(e=e.__vccOpts),t){t=nv(t);let{class:i,style:l}=t;i&&!Bt(i)&&(t.class=ut(i)),Mt(l)&&(_u(l)&&!qe(l)&&(l=Vt({},l)),t.style=vt(l))}const s=Bt(e)?1:bm(e)?128:eA(e)?64:Mt(e)?4:rt(e)?2:0;return q(e,t,n,r,a,s,o,!0)}function nv(e){return e?_u(e)||pl in e?Vt({},e):e:null}function vr(e,t,n=!1){const{props:r,ref:a,patchFlag:o,children:s}=e,i=t?os(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:i,key:i&&tv(i),ref:t&&t.ref?n&&a?qe(a)?a.concat(Si(t)):[a,Si(t)]:Si(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==je?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&vr(e.ssContent),ssFallback:e.ssFallback&&vr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function xt(e=" ",t=0){return Ye(Pa,null,e,t)}function sA(e,t){const n=Ye(ka,null,e);return n.staticCount=t,n}function xe(e="",t=!1){return t?(T(),Ue(yn,null,e)):Ye(yn,null,e)}function Bn(e){return e==null||typeof e=="boolean"?Ye(yn):qe(e)?Ye(je,null,e.slice()):typeof e=="object"?Gr(e):Ye(Pa,null,String(e))}function Gr(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:vr(e)}function Ru(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(qe(t))n=16;else if(typeof t=="object")if(r&65){const a=t.default;a&&(a._c&&(a._d=!1),Ru(e,a()),a._c&&(a._d=!0));return}else{n=32;const a=t._;!a&&!(pl in t)?t._ctx=Kt:a===3&&Kt&&(Kt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else rt(t)?(t={default:t,_ctx:Kt},n=32):(t=String(t),r&64?(n=16,t=[xt(t)]):n=8);e.children=t,e.shapeFlag|=n}function os(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const a in r)if(a==="class")t.class!==r.class&&(t.class=ut([t.class,r.class]));else if(a==="style")t.style=vt([t.style,r.style]);else if($s(a)){const o=t[a],s=r[a];s&&o!==s&&!(qe(o)&&o.includes(s))&&(t[a]=o?[].concat(o,s):s)}else a!==""&&(t[a]=r[a])}return t}function En(e,t,n,r=null){Hn(e,t,7,[n,r])}const iA=Vm();let lA=0;function rv(e,t,n){const r=e.type,a=(t?t.appContext:e.appContext)||iA,o={uid:lA++,vnode:e,type:r,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,scope:new mu(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Hm(r,a),emitsOptions:gm(r,a),emit:null,emitted:null,propsDefaults:Tt,inheritAttrs:r.inheritAttrs,ctx:Tt,data:Tt,props:Tt,attrs:Tt,slots:Tt,refs:Tt,setupState:Tt,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=t1.bind(null,o),e.ce&&e.ce(o),o}let Yt=null;const Nr=()=>Yt||Kt;let Ui,Kc;{const e=zh(),t=(n,r)=>{let a;return(a=e[n])||(a=e[n]=[]),a.push(r),o=>{a.length>1?a.forEach(s=>s(o)):a[0](o)}};Ui=t("__VUE_INSTANCE_SETTERS__",n=>Yt=n),Kc=t("__VUE_SSR_SETTERS__",n=>Ts=n)}const Na=e=>{const t=Yt;return Ui(e),e.scope.on(),()=>{e.scope.off(),Ui(t)}},Wc=()=>{Yt&&Yt.scope.off(),Ui(null)};function av(e){return e.vnode.shapeFlag&4}let Ts=!1;function ov(e,t=!1){t&&Kc(t);const{props:n,children:r}=e.vnode,a=av(e);K1(e,n,a,t),q1(e,r);const o=a?cA(e,t):void 0;return t&&Kc(!1),o}function cA(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=bu(new Proxy(e.ctx,jc));const{setup:r}=n;if(r){const a=e.setupContext=r.length>1?iv(e):null,o=Na(e);Fa();const s=kr(r,e,0,[e.props,a]);if(ja(),o(),pu(s)){if(s.then(Wc,Wc),t)return s.then(i=>{Gc(e,i,t)}).catch(i=>{Va(i,e,0)});e.asyncDep=s}else Gc(e,s,t)}else sv(e,t)}function Gc(e,t,n){rt(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Mt(t)&&(e.setupState=Cu(t)),sv(e,n)}let Hi,qc;function uA(e){Hi=e,qc=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,$1))}}const dA=()=>!Hi;function sv(e,t,n){const r=e.type;if(!e.render){if(!t&&Hi&&!r.render){const a=r.template||Mu(e).template;if(a){const{isCustomElement:o,compilerOptions:s}=e.appContext.config,{delimiters:i,compilerOptions:l}=r,c=Vt(Vt({isCustomElement:o,delimiters:i},s),l);r.render=Hi(a,c)}}e.render=r.render||xn,qc&&qc(e)}{const a=Na(e);Fa();try{D1(e)}finally{ja(),a()}}}function fA(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,n){return On(e,"get","$attrs"),t[n]}}))}function iv(e){const t=n=>{e.exposed=n||{}};return{get attrs(){return fA(e)},slots:e.slots,emit:e.emit,expose:t}}function hl(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Cu(bu(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ns)return ns[n](e)},has(t,n){return n in t||n in ns}}))}function Jc(e,t=!0){return rt(e)?e.displayName||e.name:e.name||t&&e.__name}function pA(e){return rt(e)&&"__vccOpts"in e}const ne=(e,t)=>Fw(e,t,Ts);function oa(e,t,n=Tt){const r=Nr(),a=Cn(t),o=Un(t),s=dm((l,c)=>{let f;return Im(()=>{const u=e[t];ir(f,u)&&(f=u,c())}),{get(){return l(),n.get?n.get(f):f},set(u){const m=r.vnode.props;!(m&&(t in m||a in m||o in m)&&(`onUpdate:${t}`in m||`onUpdate:${a}`in m||`onUpdate:${o}`in m))&&ir(u,f)&&(f=u,c()),r.emit(`update:${t}`,n.set?n.set(u):u)}}}),i=t==="modelValue"?"modelModifiers":`${t}Modifiers`;return s[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?e[i]||{}:s,done:!1}:{done:!0}}}},s}function na(e,t,n){const r=arguments.length;return r===2?Mt(t)&&!qe(t)?ta(t)?Ye(e,null,[t]):Ye(e,t):Ye(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&ta(n)&&(n=[n]),Ye(e,t,n))}function hA(){}function mA(e,t,n,r){const a=n[r];if(a&&lv(a,e))return a;const o=t();return o.memo=e.slice(),n[r]=o}function lv(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let r=0;r<n.length;r++)if(ir(n[r],t[r]))return!1;return Ma>0&&Pn&&Pn.push(e),!0}const cv="3.4.21",vA=xn,gA=Yw,yA=no,_A=vm,bA={createComponentInstance:rv,setupComponent:ov,renderComponentRoot:Ii,setCurrentRenderingInstance:_s,isVNode:ta,normalizeVNode:Bn},wA=bA,AA=null,CA=null,$A=null;/**
* @vue/runtime-dom v3.4.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const IA="http://www.w3.org/2000/svg",SA="http://www.w3.org/1998/Math/MathML",qr=typeof document<"u"?document:null,Ap=qr&&qr.createElement("template"),EA={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const a=t==="svg"?qr.createElementNS(IA,e):t==="mathml"?qr.createElementNS(SA,e):qr.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&a.setAttribute("multiple",r.multiple),a},createText:e=>qr.createTextNode(e),createComment:e=>qr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>qr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,a,o){const s=n?n.previousSibling:t.lastChild;if(a&&(a===o||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),n),!(a===o||!(a=a.nextSibling)););else{Ap.innerHTML=r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e;const i=Ap.content;if(r==="svg"||r==="mathml"){const l=i.firstChild;for(;l.firstChild;)i.appendChild(l.firstChild);i.removeChild(l)}t.insertBefore(i,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Br="transition",Bo="animation",_o=Symbol("_vtc"),ml=(e,{slots:t})=>na(Em,dv(e),t);ml.displayName="Transition";const uv={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},kA=ml.props=Vt({},Pu,uv),ma=(e,t=[])=>{qe(e)?e.forEach(n=>n(...t)):e&&e(...t)},Cp=e=>e?qe(e)?e.some(t=>t.length>1):e.length>1:!1;function dv(e){const t={};for(const be in e)be in uv||(t[be]=e[be]);if(e.css===!1)return t;const{name:n="v",type:r,duration:a,enterFromClass:o=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:i=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:c=s,appearToClass:f=i,leaveFromClass:u=`${n}-leave-from`,leaveActiveClass:m=`${n}-leave-active`,leaveToClass:w=`${n}-leave-to`}=e,b=TA(a),g=b&&b[0],v=b&&b[1],{onBeforeEnter:A,onEnter:C,onEnterCancelled:y,onLeave:p,onLeaveCancelled:$,onBeforeAppear:E=A,onAppear:B=C,onAppearCancelled:z=y}=t,le=(be,Ce,Re)=>{zr(be,Ce?f:i),zr(be,Ce?c:s),Re&&Re()},fe=(be,Ce)=>{be._isLeaving=!1,zr(be,u),zr(be,w),zr(be,m),Ce&&Ce()},Le=be=>(Ce,Re)=>{const Je=be?B:C,se=()=>le(Ce,be,Re);ma(Je,[Ce,se]),$p(()=>{zr(Ce,be?l:o),Ir(Ce,be?f:i),Cp(Je)||Ip(Ce,r,g,se)})};return Vt(t,{onBeforeEnter(be){ma(A,[be]),Ir(be,o),Ir(be,s)},onBeforeAppear(be){ma(E,[be]),Ir(be,l),Ir(be,c)},onEnter:Le(!1),onAppear:Le(!0),onLeave(be,Ce){be._isLeaving=!0;const Re=()=>fe(be,Ce);Ir(be,u),pv(),Ir(be,m),$p(()=>{be._isLeaving&&(zr(be,u),Ir(be,w),Cp(p)||Ip(be,r,v,Re))}),ma(p,[be,Re])},onEnterCancelled(be){le(be,!1),ma(y,[be])},onAppearCancelled(be){le(be,!0),ma(z,[be])},onLeaveCancelled(be){fe(be),ma($,[be])}})}function TA(e){if(e==null)return null;if(Mt(e))return[mc(e.enter),mc(e.leave)];{const t=mc(e);return[t,t]}}function mc(e){return Li(e)}function Ir(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[_o]||(e[_o]=new Set)).add(t)}function zr(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[_o];n&&(n.delete(t),n.size||(e[_o]=void 0))}function $p(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let xA=0;function Ip(e,t,n,r){const a=e._endId=++xA,o=()=>{a===e._endId&&r()};if(n)return setTimeout(o,n);const{type:s,timeout:i,propCount:l}=fv(e,t);if(!s)return r();const c=s+"end";let f=0;const u=()=>{e.removeEventListener(c,m),o()},m=w=>{w.target===e&&++f>=l&&u()};setTimeout(()=>{f<l&&u()},i+1),e.addEventListener(c,m)}function fv(e,t){const n=window.getComputedStyle(e),r=b=>(n[b]||"").split(", "),a=r(`${Br}Delay`),o=r(`${Br}Duration`),s=Sp(a,o),i=r(`${Bo}Delay`),l=r(`${Bo}Duration`),c=Sp(i,l);let f=null,u=0,m=0;t===Br?s>0&&(f=Br,u=s,m=o.length):t===Bo?c>0&&(f=Bo,u=c,m=l.length):(u=Math.max(s,c),f=u>0?s>c?Br:Bo:null,m=f?f===Br?o.length:l.length:0);const w=f===Br&&/\b(transform|all)(,|$)/.test(r(`${Br}Property`).toString());return{type:f,timeout:u,propCount:m,hasTransform:w}}function Sp(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>Ep(n)+Ep(e[r])))}function Ep(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function pv(){return document.body.offsetHeight}function PA(e,t,n){const r=e[_o];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const zi=Symbol("_vod"),hv=Symbol("_vsh"),$n={beforeMount(e,{value:t},{transition:n}){e[zi]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Uo(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Uo(e,!0),r.enter(e)):r.leave(e,()=>{Uo(e,!1)}):Uo(e,t))},beforeUnmount(e,{value:t}){Uo(e,t)}};function Uo(e,t){e.style.display=t?e[zi]:"none",e[hv]=!t}function MA(){$n.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const mv=Symbol("");function Ha(e){const t=Nr();if(!t)return;const n=t.ut=(a=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(o=>Qc(o,a))},r=()=>{const a=e(t.proxy);Yc(t.subTree,a),n(a)};$m(r),Zt(()=>{const a=new MutationObserver(r);a.observe(t.subTree.el.parentNode,{childList:!0}),cr(()=>a.disconnect())})}function Yc(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Yc(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Qc(e.el,t);else if(e.type===je)e.children.forEach(n=>Yc(n,t));else if(e.type===ka){let{el:n,anchor:r}=e;for(;n&&(Qc(n,t),n!==r);)n=n.nextSibling}}function Qc(e,t){if(e.nodeType===1){const n=e.style;let r="";for(const a in t)n.setProperty(`--${a}`,t[a]),r+=`--${a}: ${t[a]};`;n[mv]=r}}const NA=/(^|;)\s*display\s*:/;function OA(e,t,n){const r=e.style,a=Bt(n);let o=!1;if(n&&!a){if(t)if(Bt(t))for(const s of t.split(";")){const i=s.slice(0,s.indexOf(":")).trim();n[i]==null&&Ei(r,i,"")}else for(const s in t)n[s]==null&&Ei(r,s,"");for(const s in n)s==="display"&&(o=!0),Ei(r,s,n[s])}else if(a){if(t!==n){const s=r[mv];s&&(n+=";"+s),r.cssText=n,o=NA.test(n)}}else t&&e.removeAttribute("style");zi in e&&(e[zi]=o?r.display:"",e[hv]&&(r.display="none"))}const kp=/\s*!important$/;function Ei(e,t,n){if(qe(n))n.forEach(r=>Ei(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=RA(e,t);kp.test(n)?e.setProperty(Un(r),n.replace(kp,""),"important"):e[r]=n}}const Tp=["Webkit","Moz","ms"],vc={};function RA(e,t){const n=vc[t];if(n)return n;let r=Cn(t);if(r!=="filter"&&r in e)return vc[t]=r;r=Is(r);for(let a=0;a<Tp.length;a++){const o=Tp[a]+r;if(o in e)return vc[t]=o}return t}const xp="http://www.w3.org/1999/xlink";function LA(e,t,n,r,a){if(r&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(xp,t.slice(6,t.length)):e.setAttributeNS(xp,t,n);else{const o=dw(t);n==null||o&&!Kh(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}function DA(e,t,n,r,a,o,s){if(t==="innerHTML"||t==="textContent"){r&&s(r,a,o),e[t]=n??"";return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const c=i==="OPTION"?e.getAttribute("value")||"":e.value,f=n??"";(c!==f||!("_value"in e))&&(e.value=f),n==null&&e.removeAttribute(t),e._value=n;return}let l=!1;if(n===""||n==null){const c=typeof e[t];c==="boolean"?n=Kh(n):n==null&&c==="string"?(n="",l=!0):c==="number"&&(n=0,l=!0)}try{e[t]=n}catch{}l&&e.removeAttribute(t)}function Sr(e,t,n,r){e.addEventListener(t,n,r)}function FA(e,t,n,r){e.removeEventListener(t,n,r)}const Pp=Symbol("_vei");function jA(e,t,n,r,a=null){const o=e[Pp]||(e[Pp]={}),s=o[t];if(r&&s)s.value=r;else{const[i,l]=VA(t);if(r){const c=o[t]=HA(r,a);Sr(e,i,c,l)}else s&&(FA(e,i,s,l),o[t]=void 0)}}const Mp=/(?:Once|Passive|Capture)$/;function VA(e){let t;if(Mp.test(e)){t={};let r;for(;r=e.match(Mp);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Un(e.slice(2)),t]}let gc=0;const BA=Promise.resolve(),UA=()=>gc||(BA.then(()=>gc=0),gc=Date.now());function HA(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Hn(zA(r,n.value),t,5,[r])};return n.value=e,n.attached=UA(),n}function zA(e,t){if(qe(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>a=>!a._stopped&&r&&r(a))}else return t}const Np=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,KA=(e,t,n,r,a,o,s,i,l)=>{const c=a==="svg";t==="class"?PA(e,r,c):t==="style"?OA(e,n,r):$s(t)?du(t)||jA(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):WA(e,t,r,c))?DA(e,t,r,o,s,i,l):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),LA(e,t,r,c))};function WA(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Np(t)&&rt(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const a=e.tagName;if(a==="IMG"||a==="VIDEO"||a==="CANVAS"||a==="SOURCE")return!1}return Np(t)&&Bt(n)?!1:t in e}/*! #__NO_SIDE_EFFECTS__ */function vv(e,t){const n=Pe(e);class r extends vl{constructor(o){super(n,o,t)}}return r.def=n,r}/*! #__NO_SIDE_EFFECTS__ */const GA=e=>vv(e,Iv),qA=typeof HTMLElement<"u"?HTMLElement:class{};class vl extends qA{constructor(t,n={},r){super(),this._def=t,this._props=n,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&r?r(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,this._ob&&(this._ob.disconnect(),this._ob=null),Mn(()=>{this._connected||(Xc(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let r=0;r<this.attributes.length;r++)this._setAttr(this.attributes[r].name);this._ob=new MutationObserver(r=>{for(const a of r)this._setAttr(a.attributeName)}),this._ob.observe(this,{attributes:!0});const t=(r,a=!1)=>{const{props:o,styles:s}=r;let i;if(o&&!qe(o))for(const l in o){const c=o[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=Li(this._props[l])),(i||(i=Object.create(null)))[Cn(l)]=!0)}this._numberProps=i,a&&this._resolveProps(r),this._applyStyles(s),this._update()},n=this._def.__asyncLoader;n?n().then(r=>t(r,!0)):t(this._def)}_resolveProps(t){const{props:n}=t,r=qe(n)?n:Object.keys(n||{});for(const a of Object.keys(this))a[0]!=="_"&&r.includes(a)&&this._setProp(a,this[a],!0,!1);for(const a of r.map(Cn))Object.defineProperty(this,a,{get(){return this._getProp(a)},set(o){this._setProp(a,o)}})}_setAttr(t){let n=this.getAttribute(t);const r=Cn(t);this._numberProps&&this._numberProps[r]&&(n=Li(n)),this._setProp(r,n,!1)}_getProp(t){return this._props[t]}_setProp(t,n,r=!0,a=!0){n!==this._props[t]&&(this._props[t]=n,a&&this._instance&&this._update(),r&&(n===!0?this.setAttribute(Un(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Un(t),n+""):n||this.removeAttribute(Un(t))))}_update(){Xc(this._createVNode(),this.shadowRoot)}_createVNode(){const t=Ye(this._def,Vt({},this._props));return this._instance||(t.ce=n=>{this._instance=n,n.isCE=!0;const r=(o,s)=>{this.dispatchEvent(new CustomEvent(o,{detail:s}))};n.emit=(o,...s)=>{r(o,s),Un(o)!==o&&r(Un(o),s)};let a=this;for(;a=a&&(a.parentNode||a.host);)if(a instanceof vl){n.parent=a._instance,n.provides=a._instance.provides;break}}),t}_applyStyles(t){t&&t.forEach(n=>{const r=document.createElement("style");r.textContent=n,this.shadowRoot.appendChild(r)})}}function JA(e="$style"){{const t=Nr();if(!t)return Tt;const n=t.type.__cssModules;if(!n)return Tt;const r=n[e];return r||Tt}}const gv=new WeakMap,yv=new WeakMap,Ki=Symbol("_moveCb"),Op=Symbol("_enterCb"),_v={name:"TransitionGroup",props:Vt({},kA,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Nr(),r=xu();let a,o;return fl(()=>{if(!a.length)return;const s=e.moveClass||`${e.name||"v"}-move`;if(!tC(a[0].el,n.vnode.el,s))return;a.forEach(XA),a.forEach(ZA);const i=a.filter(eC);pv(),i.forEach(l=>{const c=l.el,f=c.style;Ir(c,s),f.transform=f.webkitTransform=f.transitionDuration="";const u=c[Ki]=m=>{m&&m.target!==c||(!m||/transform$/.test(m.propertyName))&&(c.removeEventListener("transitionend",u),c[Ki]=null,zr(c,s))};c.addEventListener("transitionend",u)})}),()=>{const s=ct(e),i=dv(s);let l=s.tag||je;a=o,o=t.default?ul(t.default()):[];for(let c=0;c<o.length;c++){const f=o[c];f.key!=null&&xa(f,yo(f,i,r,n))}if(a)for(let c=0;c<a.length;c++){const f=a[c];xa(f,yo(f,i,r,n)),gv.set(f,f.el.getBoundingClientRect())}return Ye(l,null,o)}}},YA=e=>delete e.mode;_v.props;const QA=_v;function XA(e){const t=e.el;t[Ki]&&t[Ki](),t[Op]&&t[Op]()}function ZA(e){yv.set(e,e.el.getBoundingClientRect())}function eC(e){const t=gv.get(e),n=yv.get(e),r=t.left-n.left,a=t.top-n.top;if(r||a){const o=e.el.style;return o.transform=o.webkitTransform=`translate(${r}px,${a}px)`,o.transitionDuration="0s",e}}function tC(e,t,n){const r=e.cloneNode(),a=e[_o];a&&a.forEach(i=>{i.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(i=>i&&r.classList.add(i)),r.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(r);const{hasTransform:s}=fv(r);return o.removeChild(r),s}const ra=e=>{const t=e.props["onUpdate:modelValue"]||!1;return qe(t)?n=>lo(t,n):t};function nC(e){e.target.composing=!0}function Rp(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const qn=Symbol("_assign"),bo={created(e,{modifiers:{lazy:t,trim:n,number:r}},a){e[qn]=ra(a);const o=r||a.props&&a.props.type==="number";Sr(e,t?"change":"input",s=>{if(s.target.composing)return;let i=e.value;n&&(i=i.trim()),o&&(i=hs(i)),e[qn](i)}),n&&Sr(e,"change",()=>{e.value=e.value.trim()}),t||(Sr(e,"compositionstart",nC),Sr(e,"compositionend",Rp),Sr(e,"change",Rp))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:a}},o){if(e[qn]=ra(o),e.composing)return;const s=a||e.type==="number"?hs(e.value):e.value,i=t??"";s!==i&&(document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===i)||(e.value=i))}},Lu={deep:!0,created(e,t,n){e[qn]=ra(n),Sr(e,"change",()=>{const r=e._modelValue,a=wo(e),o=e.checked,s=e[qn];if(qe(r)){const i=nl(r,a),l=i!==-1;if(o&&!l)s(r.concat(a));else if(!o&&l){const c=[...r];c.splice(i,1),s(c)}}else if(Da(r)){const i=new Set(r);o?i.add(a):i.delete(a),s(i)}else s(bv(e,o))})},mounted:Lp,beforeUpdate(e,t,n){e[qn]=ra(n),Lp(e,t,n)}};function Lp(e,{value:t,oldValue:n},r){e._modelValue=t,qe(t)?e.checked=nl(t,r.props.value)>-1:Da(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=Zr(t,bv(e,!0)))}const Du={created(e,{value:t},n){e.checked=Zr(t,n.props.value),e[qn]=ra(n),Sr(e,"change",()=>{e[qn](wo(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[qn]=ra(r),t!==n&&(e.checked=Zr(t,r.props.value))}},Fu={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const a=Da(t);Sr(e,"change",()=>{const o=Array.prototype.filter.call(e.options,s=>s.selected).map(s=>n?hs(wo(s)):wo(s));e[qn](e.multiple?a?new Set(o):o:o[0]),e._assigning=!0,Mn(()=>{e._assigning=!1})}),e[qn]=ra(r)},mounted(e,{value:t,modifiers:{number:n}}){Dp(e,t,n)},beforeUpdate(e,t,n){e[qn]=ra(n)},updated(e,{value:t,modifiers:{number:n}}){e._assigning||Dp(e,t,n)}};function Dp(e,t,n){const r=e.multiple,a=qe(t);if(!(r&&!a&&!Da(t))){for(let o=0,s=e.options.length;o<s;o++){const i=e.options[o],l=wo(i);if(r)if(a){const c=typeof l;c==="string"||c==="number"?i.selected=t.includes(n?hs(l):l):i.selected=nl(t,l)>-1}else i.selected=t.has(l);else if(Zr(wo(i),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!r&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function wo(e){return"_value"in e?e._value:e.value}function bv(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Wi={created(e,t,n){di(e,t,n,null,"created")},mounted(e,t,n){di(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){di(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){di(e,t,n,r,"updated")}};function wv(e,t){switch(e){case"SELECT":return Fu;case"TEXTAREA":return bo;default:switch(t){case"checkbox":return Lu;case"radio":return Du;default:return bo}}}function di(e,t,n,r,a){const s=wv(e.tagName,n.props&&n.props.type)[a];s&&s(e,t,n,r)}function rC(){bo.getSSRProps=({value:e})=>({value:e}),Du.getSSRProps=({value:e},t)=>{if(t.props&&Zr(t.props.value,e))return{checked:!0}},Lu.getSSRProps=({value:e},t)=>{if(qe(e)){if(t.props&&nl(e,t.props.value)>-1)return{checked:!0}}else if(Da(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Wi.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=wv(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const aC=["ctrl","shift","alt","meta"],oC={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>aC.some(n=>e[`${n}Key`]&&!t.includes(n))},Ao=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(a,...o)=>{for(let s=0;s<t.length;s++){const i=oC[t[s]];if(i&&i(a,t))return}return e(a,...o)})},sC={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},aa=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=a=>{if(!("key"in a))return;const o=Un(a.key);if(t.some(s=>s===o||sC[s]===o))return e(a)})},Av=Vt({patchProp:KA},EA);let ss,Fp=!1;function Cv(){return ss||(ss=Gm(Av))}function $v(){return ss=Fp?ss:qm(Av),Fp=!0,ss}const Xc=(...e)=>{Cv().render(...e)},Iv=(...e)=>{$v().hydrate(...e)},Sv=(...e)=>{const t=Cv().createApp(...e),{mount:n}=t;return t.mount=r=>{const a=kv(r);if(!a)return;const o=t._component;!rt(o)&&!o.render&&!o.template&&(o.template=a.innerHTML),a.innerHTML="";const s=n(a,!1,Ev(a));return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),s},t},iC=(...e)=>{const t=$v().createApp(...e),{mount:n}=t;return t.mount=r=>{const a=kv(r);if(a)return n(a,!0,Ev(a))},t};function Ev(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function kv(e){return Bt(e)?document.querySelector(e):e}let jp=!1;const lC=()=>{jp||(jp=!0,rC(),MA())};/**
* vue v3.4.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const cC=()=>{},uC=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:Em,BaseTransitionPropsValidators:Pu,Comment:yn,DeprecationTypes:$A,EffectScope:mu,ErrorCodes:Jw,ErrorTypeStrings:gA,Fragment:je,KeepAlive:b1,ReactiveEffect:vo,Static:ka,Suspense:u1,Teleport:rA,Text:Pa,TrackOpTypes:Ww,Transition:ml,TransitionGroup:QA,TriggerOpTypes:Gw,VueElement:vl,assertNumber:qw,callWithAsyncErrorHandling:Hn,callWithErrorHandling:kr,camelize:Cn,capitalize:Is,cloneVNode:vr,compatUtils:CA,compile:cC,computed:ne,createApp:Sv,createBlock:Ue,createCommentVNode:xe,createElementBlock:R,createElementVNode:q,createHydrationRenderer:qm,createPropsRestProxy:R1,createRenderer:Gm,createSSRApp:iC,createSlots:A1,createStaticVNode:sA,createTextVNode:xt,createVNode:Ye,customRef:dm,defineAsyncComponent:Dc,defineComponent:Pe,defineCustomElement:vv,defineEmits:S1,defineExpose:E1,defineModel:x1,defineOptions:k1,defineProps:I1,defineSSRCustomElement:GA,defineSlots:T1,devtools:yA,effect:vw,effectScope:pw,getCurrentInstance:Nr,getCurrentScope:qh,getTransitionRawChildren:ul,guardReactiveProps:nv,h:na,handleError:Va,hasInjectionContext:z1,hydrate:Iv,initCustomFormatter:hA,initDirectivesForSSR:lC,inject:Z,isMemoSame:lv,isProxy:_u,isReactive:Sa,isReadonly:Ta,isRef:an,isRuntimeOnly:dA,isShallow:ms,isVNode:ta,markRaw:bu,mergeDefaults:O1,mergeModels:Ua,mergeProps:os,nextTick:Mn,normalizeClass:ut,normalizeProps:cw,normalizeStyle:vt,onActivated:Tm,onBeforeMount:So,onBeforeUnmount:Ba,onBeforeUpdate:Mm,onDeactivated:xm,onErrorCaptured:Lm,onMounted:Zt,onRenderTracked:Rm,onRenderTriggered:Om,onScopeDispose:hw,onServerPrefetch:Nm,onUnmounted:cr,onUpdated:fl,openBlock:T,popScopeId:Xt,provide:Bm,proxyRefs:Cu,pushScopeId:Qt,queuePostFlushCb:Fi,reactive:ol,readonly:Vn,ref:oe,registerRuntimeCompiler:uA,render:Xc,renderList:It,renderSlot:Dt,resolveComponent:l1,resolveDirective:_m,resolveDynamicComponent:Ss,resolveFilter:AA,resolveTransitionHooks:yo,setBlockTracking:zc,setDevtoolsHook:_A,setTransitionHooks:xa,shallowReactive:lm,shallowReadonly:Dw,shallowRef:go,ssrContextKey:Am,ssrUtils:wA,stop:gw,toDisplayString:Te,toHandlerKey:ts,toHandlers:C1,toRaw:ct,toRef:ea,toRefs:$u,toValue:Bw,transformVNodeArgs:aA,triggerRef:Vw,unref:P,useAttrs:N1,useCssModule:JA,useCssVars:Ha,useModel:oa,useSSRContext:Cm,useSlots:M1,useTransitionState:xu,vModelCheckbox:Lu,vModelDynamic:Wi,vModelRadio:Du,vModelSelect:Fu,vModelText:bo,vShow:$n,version:cv,warn:vA,watch:Ke,watchEffect:v1,watchPostEffect:$m,watchSyncEffect:Im,withAsyncContext:L1,withCtx:Ze,withDefaults:P1,withDirectives:Wt,withKeys:aa,withMemo:mA,withModifiers:Ao,withScopeId:n1},Symbol.toStringTag,{value:"Module"}));/*! @license DOMPurify 3.0.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.9/LICENSE */const{entries:Tv,setPrototypeOf:Vp,isFrozen:dC,getPrototypeOf:fC,getOwnPropertyDescriptor:pC}=Object;let{freeze:In,seal:lr,create:xv}=Object,{apply:Zc,construct:eu}=typeof Reflect<"u"&&Reflect;In||(In=function(t){return t});lr||(lr=function(t){return t});Zc||(Zc=function(t,n,r){return t.apply(n,r)});eu||(eu=function(t,n){return new t(...n)});const fi=zn(Array.prototype.forEach),Bp=zn(Array.prototype.pop),Ho=zn(Array.prototype.push),ki=zn(String.prototype.toLowerCase),yc=zn(String.prototype.toString),hC=zn(String.prototype.match),zo=zn(String.prototype.replace),mC=zn(String.prototype.indexOf),vC=zn(String.prototype.trim),tr=zn(Object.prototype.hasOwnProperty),Fn=zn(RegExp.prototype.test),Ko=gC(TypeError);function zn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return Zc(e,t,r)}}function gC(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return eu(e,n)}}function mt(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ki;Vp&&Vp(e,null);let r=t.length;for(;r--;){let a=t[r];if(typeof a=="string"){const o=n(a);o!==a&&(dC(t)||(t[r]=o),a=o)}e[a]=!0}return e}function yC(e){for(let t=0;t<e.length;t++)tr(e,t)||(e[t]=null);return e}function ga(e){const t=xv(null);for(const[n,r]of Tv(e))tr(e,n)&&(Array.isArray(r)?t[n]=yC(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=ga(r):t[n]=r);return t}function pi(e,t){for(;e!==null;){const r=pC(e,t);if(r){if(r.get)return zn(r.get);if(typeof r.value=="function")return zn(r.value)}e=fC(e)}function n(){return null}return n}const Up=In(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),_c=In(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),bc=In(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),_C=In(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),wc=In(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),bC=In(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Hp=In(["#text"]),zp=In(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Ac=In(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Kp=In(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),hi=In(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),wC=lr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),AC=lr(/<%[\w\W]*|[\w\W]*%>/gm),CC=lr(/\${[\w\W]*}/gm),$C=lr(/^data-[\-\w.\u00B7-\uFFFF]/),IC=lr(/^aria-[\-\w]+$/),Pv=lr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),SC=lr(/^(?:\w+script|data):/i),EC=lr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Mv=lr(/^html$/i);var Wp=Object.freeze({__proto__:null,MUSTACHE_EXPR:wC,ERB_EXPR:AC,TMPLIT_EXPR:CC,DATA_ATTR:$C,ARIA_ATTR:IC,IS_ALLOWED_URI:Pv,IS_SCRIPT_OR_DATA:SC,ATTR_WHITESPACE:EC,DOCTYPE_NAME:Mv});const kC=function(){return typeof window>"u"?null:window},TC=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const a="data-tt-policy-suffix";n&&n.hasAttribute(a)&&(r=n.getAttribute(a));const o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function Nv(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:kC();const t=Qe=>Nv(Qe);if(t.version="3.0.9",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e;const r=n,a=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:i,Element:l,NodeFilter:c,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:m,trustedTypes:w}=e,b=l.prototype,g=pi(b,"cloneNode"),v=pi(b,"nextSibling"),A=pi(b,"childNodes"),C=pi(b,"parentNode");if(typeof s=="function"){const Qe=n.createElement("template");Qe.content&&Qe.content.ownerDocument&&(n=Qe.content.ownerDocument)}let y,p="";const{implementation:$,createNodeIterator:E,createDocumentFragment:B,getElementsByTagName:z}=n,{importNode:le}=r;let fe={};t.isSupported=typeof Tv=="function"&&typeof C=="function"&&$&&$.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Le,ERB_EXPR:be,TMPLIT_EXPR:Ce,DATA_ATTR:Re,ARIA_ATTR:Je,IS_SCRIPT_OR_DATA:se,ATTR_WHITESPACE:ce}=Wp;let{IS_ALLOWED_URI:he}=Wp,ke=null;const ye=mt({},[...Up,..._c,...bc,...wc,...Hp]);let j=null;const ue=mt({},[...zp,...Ac,...Kp,...hi]);let O=Object.seal(xv(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),I=null,M=null,Q=!0,Me=!0,F=!1,G=!0,J=!1,ae=!1,K=!1,S=!1,k=!1,V=!1,Y=!1,re=!0,ie=!1;const $e="user-content-";let ge=!0,Ae=!1,_e={},H=null;const pe=mt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let de=null;const me=mt({},["audio","video","img","source","image","track"]);let Ee=null;const De=mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),We="http://www.w3.org/1998/Math/MathML",nt="http://www.w3.org/2000/svg",ot="http://www.w3.org/1999/xhtml";let _t=ot,jt=!1,gt=null;const sn=mt({},[We,nt,ot],yc);let Rt=null;const bn=["application/xhtml+xml","text/html"],la="text/html";let Ht=null,Or=null;const xl=n.createElement("form"),Ls=function(W){return W instanceof RegExp||W instanceof Function},No=function(){let W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Or&&Or===W)){if((!W||typeof W!="object")&&(W={}),W=ga(W),Rt=bn.indexOf(W.PARSER_MEDIA_TYPE)===-1?la:W.PARSER_MEDIA_TYPE,Ht=Rt==="application/xhtml+xml"?yc:ki,ke=tr(W,"ALLOWED_TAGS")?mt({},W.ALLOWED_TAGS,Ht):ye,j=tr(W,"ALLOWED_ATTR")?mt({},W.ALLOWED_ATTR,Ht):ue,gt=tr(W,"ALLOWED_NAMESPACES")?mt({},W.ALLOWED_NAMESPACES,yc):sn,Ee=tr(W,"ADD_URI_SAFE_ATTR")?mt(ga(De),W.ADD_URI_SAFE_ATTR,Ht):De,de=tr(W,"ADD_DATA_URI_TAGS")?mt(ga(me),W.ADD_DATA_URI_TAGS,Ht):me,H=tr(W,"FORBID_CONTENTS")?mt({},W.FORBID_CONTENTS,Ht):pe,I=tr(W,"FORBID_TAGS")?mt({},W.FORBID_TAGS,Ht):{},M=tr(W,"FORBID_ATTR")?mt({},W.FORBID_ATTR,Ht):{},_e=tr(W,"USE_PROFILES")?W.USE_PROFILES:!1,Q=W.ALLOW_ARIA_ATTR!==!1,Me=W.ALLOW_DATA_ATTR!==!1,F=W.ALLOW_UNKNOWN_PROTOCOLS||!1,G=W.ALLOW_SELF_CLOSE_IN_ATTR!==!1,J=W.SAFE_FOR_TEMPLATES||!1,ae=W.WHOLE_DOCUMENT||!1,k=W.RETURN_DOM||!1,V=W.RETURN_DOM_FRAGMENT||!1,Y=W.RETURN_TRUSTED_TYPE||!1,S=W.FORCE_BODY||!1,re=W.SANITIZE_DOM!==!1,ie=W.SANITIZE_NAMED_PROPS||!1,ge=W.KEEP_CONTENT!==!1,Ae=W.IN_PLACE||!1,he=W.ALLOWED_URI_REGEXP||Pv,_t=W.NAMESPACE||ot,O=W.CUSTOM_ELEMENT_HANDLING||{},W.CUSTOM_ELEMENT_HANDLING&&Ls(W.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(O.tagNameCheck=W.CUSTOM_ELEMENT_HANDLING.tagNameCheck),W.CUSTOM_ELEMENT_HANDLING&&Ls(W.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(O.attributeNameCheck=W.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),W.CUSTOM_ELEMENT_HANDLING&&typeof W.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(O.allowCustomizedBuiltInElements=W.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),J&&(Me=!1),V&&(k=!0),_e&&(ke=mt({},Hp),j=[],_e.html===!0&&(mt(ke,Up),mt(j,zp)),_e.svg===!0&&(mt(ke,_c),mt(j,Ac),mt(j,hi)),_e.svgFilters===!0&&(mt(ke,bc),mt(j,Ac),mt(j,hi)),_e.mathMl===!0&&(mt(ke,wc),mt(j,Kp),mt(j,hi))),W.ADD_TAGS&&(ke===ye&&(ke=ga(ke)),mt(ke,W.ADD_TAGS,Ht)),W.ADD_ATTR&&(j===ue&&(j=ga(j)),mt(j,W.ADD_ATTR,Ht)),W.ADD_URI_SAFE_ATTR&&mt(Ee,W.ADD_URI_SAFE_ATTR,Ht),W.FORBID_CONTENTS&&(H===pe&&(H=ga(H)),mt(H,W.FORBID_CONTENTS,Ht)),ge&&(ke["#text"]=!0),ae&&mt(ke,["html","head","body"]),ke.table&&(mt(ke,["tbody"]),delete I.tbody),W.TRUSTED_TYPES_POLICY){if(typeof W.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ko('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof W.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ko('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=W.TRUSTED_TYPES_POLICY,p=y.createHTML("")}else y===void 0&&(y=TC(w,a)),y!==null&&typeof p=="string"&&(p=y.createHTML(""));In&&In(W),Or=W}},Ds=mt({},["mi","mo","mn","ms","mtext"]),Fs=mt({},["foreignobject","desc","title","annotation-xml"]),Pl=mt({},["title","style","font","a","script"]),js=mt({},[..._c,...bc,..._C]),Vs=mt({},[...wc,...bC]),Ml=function(W){let Ne=C(W);(!Ne||!Ne.tagName)&&(Ne={namespaceURI:_t,tagName:"template"});const Ge=ki(W.tagName),Pt=ki(Ne.tagName);return gt[W.namespaceURI]?W.namespaceURI===nt?Ne.namespaceURI===ot?Ge==="svg":Ne.namespaceURI===We?Ge==="svg"&&(Pt==="annotation-xml"||Ds[Pt]):!!js[Ge]:W.namespaceURI===We?Ne.namespaceURI===ot?Ge==="math":Ne.namespaceURI===nt?Ge==="math"&&Fs[Pt]:!!Vs[Ge]:W.namespaceURI===ot?Ne.namespaceURI===nt&&!Fs[Pt]||Ne.namespaceURI===We&&!Ds[Pt]?!1:!Vs[Ge]&&(Pl[Ge]||!js[Ge]):!!(Rt==="application/xhtml+xml"&&gt[W.namespaceURI]):!1},wr=function(W){Ho(t.removed,{element:W});try{W.parentNode.removeChild(W)}catch{W.remove()}},Oo=function(W,Ne){try{Ho(t.removed,{attribute:Ne.getAttributeNode(W),from:Ne})}catch{Ho(t.removed,{attribute:null,from:Ne})}if(Ne.removeAttribute(W),W==="is"&&!j[W])if(k||V)try{wr(Ne)}catch{}else try{Ne.setAttribute(W,"")}catch{}},Ro=function(W){let Ne=null,Ge=null;if(S)W="<remove></remove>"+W;else{const tn=hC(W,/^[\r\n\t ]+/);Ge=tn&&tn[0]}Rt==="application/xhtml+xml"&&_t===ot&&(W='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+W+"</body></html>");const Pt=y?y.createHTML(W):W;if(_t===ot)try{Ne=new m().parseFromString(Pt,Rt)}catch{}if(!Ne||!Ne.documentElement){Ne=$.createDocument(_t,"template",null);try{Ne.documentElement.innerHTML=jt?p:Pt}catch{}}const qt=Ne.body||Ne.documentElement;return W&&Ge&&qt.insertBefore(n.createTextNode(Ge),qt.childNodes[0]||null),_t===ot?z.call(Ne,ae?"html":"body")[0]:ae?Ne.documentElement:qt},Lo=function(W){return E.call(W.ownerDocument||W,W,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null)},Nl=function(W){return W instanceof u&&(typeof W.nodeName!="string"||typeof W.textContent!="string"||typeof W.removeChild!="function"||!(W.attributes instanceof f)||typeof W.removeAttribute!="function"||typeof W.setAttribute!="function"||typeof W.namespaceURI!="string"||typeof W.insertBefore!="function"||typeof W.hasChildNodes!="function")},Bs=function(W){return typeof i=="function"&&W instanceof i},Jn=function(W,Ne,Ge){fe[W]&&fi(fe[W],Pt=>{Pt.call(t,Ne,Ge,Or)})},ca=function(W){let Ne=null;if(Jn("beforeSanitizeElements",W,null),Nl(W))return wr(W),!0;const Ge=Ht(W.nodeName);if(Jn("uponSanitizeElement",W,{tagName:Ge,allowedTags:ke}),W.hasChildNodes()&&!Bs(W.firstElementChild)&&Fn(/<[/\w]/g,W.innerHTML)&&Fn(/<[/\w]/g,W.textContent))return wr(W),!0;if(!ke[Ge]||I[Ge]){if(!I[Ge]&&Do(Ge)&&(O.tagNameCheck instanceof RegExp&&Fn(O.tagNameCheck,Ge)||O.tagNameCheck instanceof Function&&O.tagNameCheck(Ge)))return!1;if(ge&&!H[Ge]){const Pt=C(W)||W.parentNode,qt=A(W)||W.childNodes;if(qt&&Pt){const tn=qt.length;for(let hn=tn-1;hn>=0;--hn)Pt.insertBefore(g(qt[hn],!0),v(W))}}return wr(W),!0}return W instanceof l&&!Ml(W)||(Ge==="noscript"||Ge==="noembed"||Ge==="noframes")&&Fn(/<\/no(script|embed|frames)/i,W.innerHTML)?(wr(W),!0):(J&&W.nodeType===3&&(Ne=W.textContent,fi([Le,be,Ce],Pt=>{Ne=zo(Ne,Pt," ")}),W.textContent!==Ne&&(Ho(t.removed,{element:W.cloneNode()}),W.textContent=Ne)),Jn("afterSanitizeElements",W,null),!1)},Us=function(W,Ne,Ge){if(re&&(Ne==="id"||Ne==="name")&&(Ge in n||Ge in xl))return!1;if(!(Me&&!M[Ne]&&Fn(Re,Ne))){if(!(Q&&Fn(Je,Ne))){if(!j[Ne]||M[Ne]){if(!(Do(W)&&(O.tagNameCheck instanceof RegExp&&Fn(O.tagNameCheck,W)||O.tagNameCheck instanceof Function&&O.tagNameCheck(W))&&(O.attributeNameCheck instanceof RegExp&&Fn(O.attributeNameCheck,Ne)||O.attributeNameCheck instanceof Function&&O.attributeNameCheck(Ne))||Ne==="is"&&O.allowCustomizedBuiltInElements&&(O.tagNameCheck instanceof RegExp&&Fn(O.tagNameCheck,Ge)||O.tagNameCheck instanceof Function&&O.tagNameCheck(Ge))))return!1}else if(!Ee[Ne]){if(!Fn(he,zo(Ge,ce,""))){if(!((Ne==="src"||Ne==="xlink:href"||Ne==="href")&&W!=="script"&&mC(Ge,"data:")===0&&de[W])){if(!(F&&!Fn(se,zo(Ge,ce,"")))){if(Ge)return!1}}}}}}return!0},Do=function(W){return W!=="annotation-xml"&&W.indexOf("-")>0},Hs=function(W){Jn("beforeSanitizeAttributes",W,null);const{attributes:Ne}=W;if(!Ne)return;const Ge={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:j};let Pt=Ne.length;for(;Pt--;){const qt=Ne[Pt],{name:tn,namespaceURI:hn,value:ur}=qt,ua=Ht(tn);let mn=tn==="value"?ur:vC(ur);if(Ge.attrName=ua,Ge.attrValue=mn,Ge.keepAttr=!0,Ge.forceKeepAttr=void 0,Jn("uponSanitizeAttribute",W,Ge),mn=Ge.attrValue,Ge.forceKeepAttr||(Oo(tn,W),!Ge.keepAttr))continue;if(!G&&Fn(/\/>/i,mn)){Oo(tn,W);continue}J&&fi([Le,be,Ce],Ks=>{mn=zo(mn,Ks," ")});const zs=Ht(W.nodeName);if(Us(zs,ua,mn)){if(ie&&(ua==="id"||ua==="name")&&(Oo(tn,W),mn=$e+mn),y&&typeof w=="object"&&typeof w.getAttributeType=="function"&&!hn)switch(w.getAttributeType(zs,ua)){case"TrustedHTML":{mn=y.createHTML(mn);break}case"TrustedScriptURL":{mn=y.createScriptURL(mn);break}}try{hn?W.setAttributeNS(hn,tn,mn):W.setAttribute(tn,mn),Bp(t.removed)}catch{}}}Jn("afterSanitizeAttributes",W,null)},Ol=function Qe(W){let Ne=null;const Ge=Lo(W);for(Jn("beforeSanitizeShadowDOM",W,null);Ne=Ge.nextNode();)Jn("uponSanitizeShadowNode",Ne,null),!ca(Ne)&&(Ne.content instanceof o&&Qe(Ne.content),Hs(Ne));Jn("afterSanitizeShadowDOM",W,null)};return t.sanitize=function(Qe){let W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ne=null,Ge=null,Pt=null,qt=null;if(jt=!Qe,jt&&(Qe="<!-->"),typeof Qe!="string"&&!Bs(Qe))if(typeof Qe.toString=="function"){if(Qe=Qe.toString(),typeof Qe!="string")throw Ko("dirty is not a string, aborting")}else throw Ko("toString is not a function");if(!t.isSupported)return Qe;if(K||No(W),t.removed=[],typeof Qe=="string"&&(Ae=!1),Ae){if(Qe.nodeName){const ur=Ht(Qe.nodeName);if(!ke[ur]||I[ur])throw Ko("root node is forbidden and cannot be sanitized in-place")}}else if(Qe instanceof i)Ne=Ro("<!---->"),Ge=Ne.ownerDocument.importNode(Qe,!0),Ge.nodeType===1&&Ge.nodeName==="BODY"||Ge.nodeName==="HTML"?Ne=Ge:Ne.appendChild(Ge);else{if(!k&&!J&&!ae&&Qe.indexOf("<")===-1)return y&&Y?y.createHTML(Qe):Qe;if(Ne=Ro(Qe),!Ne)return k?null:Y?p:""}Ne&&S&&wr(Ne.firstChild);const tn=Lo(Ae?Qe:Ne);for(;Pt=tn.nextNode();)ca(Pt)||(Pt.content instanceof o&&Ol(Pt.content),Hs(Pt));if(Ae)return Qe;if(k){if(V)for(qt=B.call(Ne.ownerDocument);Ne.firstChild;)qt.appendChild(Ne.firstChild);else qt=Ne;return(j.shadowroot||j.shadowrootmode)&&(qt=le.call(r,qt,!0)),qt}let hn=ae?Ne.outerHTML:Ne.innerHTML;return ae&&ke["!doctype"]&&Ne.ownerDocument&&Ne.ownerDocument.doctype&&Ne.ownerDocument.doctype.name&&Fn(Mv,Ne.ownerDocument.doctype.name)&&(hn="<!DOCTYPE "+Ne.ownerDocument.doctype.name+`>
`+hn),J&&fi([Le,be,Ce],ur=>{hn=zo(hn,ur," ")}),y&&Y?y.createHTML(hn):hn},t.setConfig=function(){let Qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};No(Qe),K=!0},t.clearConfig=function(){Or=null,K=!1},t.isValidAttribute=function(Qe,W,Ne){Or||No({});const Ge=Ht(Qe),Pt=Ht(W);return Us(Ge,Pt,Ne)},t.addHook=function(Qe,W){typeof W=="function"&&(fe[Qe]=fe[Qe]||[],Ho(fe[Qe],W))},t.removeHook=function(Qe){if(fe[Qe])return Bp(fe[Qe])},t.removeHooks=function(Qe){fe[Qe]&&(fe[Qe]=[])},t.removeAllHooks=function(){fe={}},t}var xC=Nv();function PC(e,t){const n=e.hooks??{};let r;for(r in n){const a=n[r];a!==void 0&&t.addHook(r,a)}}function Ov(){return xC()}function MC(e={},t=Ov){const n=t();PC(e,n);const r=function(a,o){const s=o.value;if(o.oldValue===s)return;const i=`${s}`,l=o.arg,c=e.namedConfigurations,f=e.default??{};if(c&&l!==void 0){a.innerHTML=n.sanitize(i,c[l]??f);return}a.innerHTML=n.sanitize(i,f)};return{mounted:r,updated:r}}const NC={install(e,t={},n=Ov){e.directive("dompurify-html",MC(t,n))}},OC=1500,RC=1e3,LC=100;var DC=(e=>(e[e.None=0]="None",e[e.Single=1]="Single",e[e.Multiple=2]="Multiple",e))(DC||{});function FC(){const t=oe({mode:"ui",selection:[],clipboard:null,mutationTransactionsSnapshot:{undo:null,redo:null},logEntries:[]});let n=null,r=0;const a=[],o=se=>{t.value.mode=se},s=()=>t.value.mode,i=(se,ce,he)=>{if(se===null){t.value.selection=[];return}t.value.selection.length!==0&&(t.value.selection=[]),l(se,ce,he)},l=(se,ce,he)=>{let ke=ce;if(typeof ke>"u"){const ye=document.querySelector(`.ComponentRenderer [data-writer-id="${se}"]`);ke=ye==null?void 0:ye.dataset.writerInstancePath}t.value.selection.push({componentId:se,instancePath:ke,source:he})},c=(se,ce,he,ke)=>{if(!se.shiftKey&&!se.ctrlKey&&!se.metaKey)return i(ce,he,ke);f(ce)?u(ce):l(ce,he,ke)},f=se=>t.value.selection.some(ce=>ce.componentId===se),u=se=>{const ce=t.value.selection.filter(he=>he.componentId!==se);ce.length!==t.value.selection.length&&(t.value.selection=ce)},m=ne(()=>t.value.selection.length===0?0:t.value.selection.length===1?1:2),w=ne(()=>m.value===1),b=ne(()=>t.value.selection[0]),g=ne(()=>{var se;return(se=t.value.selection[0])==null?void 0:se.componentId}),v=se=>{t.value.clipboard=se},A=()=>t.value.clipboard,C=(se,ce,he=!1)=>{if(n!==null)return;r<0&&(a.splice(r),r=0);const ke=a[a.length-1],ye=Date.now()-(ke==null?void 0:ke.timestamp);if(ke!=null&&ke.enableDebounce&&(ke==null?void 0:ke.id)==se&&ye<RC){n=a.pop();return}n={id:se,desc:ce,timestamp:null,enableDebounce:he,mutations:{}}},y=se=>{n.mutations[se.id]||(n.mutations[se.id]={jsonPre:se?JSON.stringify(se):void 0})},p=se=>{n.mutations[se.id]||(n.mutations[se.id]={}),n.mutations[se.id].jsonPost=se?JSON.stringify(se):void 0},$=se=>{n.id===se&&(n.timestamp=Date.now(),a.push(n),n=null,z())},E=()=>{const se=a.length-1+r,ce=a[se];return ce&&r--,z(),ce},B=()=>{const se=a.length+r,ce=a[se];return ce&&r++,z(),ce},z=()=>{const se=a.length-1+r,ce=a[se],he=a.length+r,ke=a[he];t.value.mutationTransactionsSnapshot={undo:ce,redo:ke}},le=()=>t.value.mutationTransactionsSnapshot;async function fe(se){const ce=JSON.stringify(se);let he=5981;for(let ye=0;ye<ce.length;ye++)he=(he<<5)+he+ce.charCodeAt(ye);return he.toString(16).padStart(2,"0")}const Le=async se=>{const{type:ce,title:he,message:ke,code:ye,workflowExecution:j}=se,ue=await fe(se),O=t.value.logEntries.find(I=>I.fingerprint===ue);if(O){O.repeated++,O.timestampReceived=new Date,t.value.logEntries.sort((I,M)=>I.timestampReceived<M.timestampReceived?1:-1);return}t.value.logEntries.unshift({type:ce,title:he,message:ke,code:ye,workflowExecution:j,timestampReceived:new Date,fingerprint:ue,repeated:0}),t.value.logEntries.splice(LC)},be=()=>t.value.logEntries.length,Ce=()=>{t.value.logEntries=[]},Re=()=>t.value.logEntries;return{setMode:o,getMode:s,openPanels:oe(new Set),isSettingsBarCollapsed:oe(!1),isComponentIdSelected:f,selectionStatus:m,isSingleSelectionActive:w,firstSelectedId:g,firstSelectedItem:b,removeSelectedComponentId:u,setSelection:i,appendSelection:l,handleSelectionFromEvent:c,selection:ne(()=>t.value.selection),setClipboard:v,getClipboard:A,openMutationTransaction:C,registerPreMutation:y,registerPostMutation:p,closeMutationTransaction:$,consumeUndoTransaction:E,consumeRedoTransaction:B,getMutationTransactionsSnapshot:le,handleLogEntry:Le,getLogEntryCount:be,clearLogEntries:Ce,getLogEntries:Re}}const ee={core:Symbol(),builderManager:Symbol(),evaluatedFields:Symbol(),componentId:Symbol(),isBeingEdited:Symbol(),isDisabled:Symbol(),getChildrenVNodes:Symbol(),renderProxiedComponent:Symbol(),instancePath:Symbol(),flattenedInstancePath:Symbol(),instanceData:Symbol()};var ro=(e=>(e.Cut="cut",e.Copy="copy",e))(ro||{}),L=(e=>(e.Text="Text",e.KeyValue="Key-Value",e.Color="Color",e.Shadow="Shadow",e.Number="Number",e.Object="Object",e.IdKey="Identifying Key",e.Width="Width",e.HAlign="Align (H)",e.VAlign="Align (V)",e.Padding="Padding",e.Tools="Tools",e))(L||{}),Be=(e=>(e.General="General",e.Style="Style",e.Tools="Tools",e))(Be||{}),gl=(e=>(e.Text="Text",e.Textarea="Textarea",e))(gl||{}),jC=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Rv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function J3(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}),n}var tu={exports:{}},Lv={},sr={},Co={},xs={},pt={},As={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends t{constructor(C){if(super(),!e.IDENTIFIER.test(C))throw new Error("CodeGen: name must be a valid identifier");this.str=C}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class r extends t{constructor(C){super(),this._items=typeof C=="string"?[C]:C}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const C=this._items[0];return C===""||C==='""'}get str(){var C;return(C=this._str)!==null&&C!==void 0?C:this._str=this._items.reduce((y,p)=>`${y}${p}`,"")}get names(){var C;return(C=this._names)!==null&&C!==void 0?C:this._names=this._items.reduce((y,p)=>(p instanceof n&&(y[p.str]=(y[p.str]||0)+1),y),{})}}e._Code=r,e.nil=new r("");function a(A,...C){const y=[A[0]];let p=0;for(;p<C.length;)i(y,C[p]),y.push(A[++p]);return new r(y)}e._=a;const o=new r("+");function s(A,...C){const y=[w(A[0])];let p=0;for(;p<C.length;)y.push(o),i(y,C[p]),y.push(o,w(A[++p]));return l(y),new r(y)}e.str=s;function i(A,C){C instanceof r?A.push(...C._items):C instanceof n?A.push(C):A.push(u(C))}e.addCodeArg=i;function l(A){let C=1;for(;C<A.length-1;){if(A[C]===o){const y=c(A[C-1],A[C+1]);if(y!==void 0){A.splice(C-1,3,y);continue}A[C++]="+"}C++}}function c(A,C){if(C==='""')return A;if(A==='""')return C;if(typeof A=="string")return C instanceof n||A[A.length-1]!=='"'?void 0:typeof C!="string"?`${A.slice(0,-1)}${C}"`:C[0]==='"'?A.slice(0,-1)+C.slice(1):void 0;if(typeof C=="string"&&C[0]==='"'&&!(A instanceof n))return`"${A}${C.slice(1)}`}function f(A,C){return C.emptyStr()?A:A.emptyStr()?C:s`${A}${C}`}e.strConcat=f;function u(A){return typeof A=="number"||typeof A=="boolean"||A===null?A:w(Array.isArray(A)?A.join(","):A)}function m(A){return new r(w(A))}e.stringify=m;function w(A){return JSON.stringify(A).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=w;function b(A){return typeof A=="string"&&e.IDENTIFIER.test(A)?new r(`.${A}`):a`[${A}]`}e.getProperty=b;function g(A){if(typeof A=="string"&&e.IDENTIFIER.test(A))return new r(`${A}`);throw new Error(`CodeGen: invalid export name: ${A}, use explicit $id name mapping`)}e.getEsmExportName=g;function v(A){return new r(A.toString())}e.regexpCode=v})(As);var nu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=As;class n extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}}var r;(function(l){l[l.Started=0]="Started",l[l.Completed=1]="Completed"})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class a{constructor({prefixes:c,parent:f}={}){this._names={},this._prefixes=c,this._parent=f}toName(c){return c instanceof t.Name?c:this.name(c)}name(c){return new t.Name(this._newName(c))}_newName(c){const f=this._names[c]||this._nameGroup(c);return`${c}${f.index++}`}_nameGroup(c){var f,u;if(!((u=(f=this._parent)===null||f===void 0?void 0:f._prefixes)===null||u===void 0)&&u.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}}e.Scope=a;class o extends t.Name{constructor(c,f){super(f),this.prefix=c}setValue(c,{property:f,itemIndex:u}){this.value=c,this.scopePath=(0,t._)`.${new t.Name(f)}[${u}]`}}e.ValueScopeName=o;const s=(0,t._)`\n`;class i extends a{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?s:t.nil}}get(){return this._scope}name(c){return new o(c,this._newName(c))}value(c,f){var u;if(f.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const m=this.toName(c),{prefix:w}=m,b=(u=f.key)!==null&&u!==void 0?u:f.ref;let g=this._values[w];if(g){const C=g.get(b);if(C)return C}else g=this._values[w]=new Map;g.set(b,m);const v=this._scope[w]||(this._scope[w]=[]),A=v.length;return v[A]=f.ref,m.setValue(f,{property:w,itemIndex:A}),m}getValue(c,f){const u=this._values[c];if(u)return u.get(f)}scopeRefs(c,f=this._values){return this._reduceValues(f,u=>{if(u.scopePath===void 0)throw new Error(`CodeGen: name "${u}" has no value`);return(0,t._)`${c}${u.scopePath}`})}scopeCode(c=this._values,f,u){return this._reduceValues(c,m=>{if(m.value===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return m.value.code},f,u)}_reduceValues(c,f,u={},m){let w=t.nil;for(const b in c){const g=c[b];if(!g)continue;const v=u[b]=u[b]||new Map;g.forEach(A=>{if(v.has(A))return;v.set(A,r.Started);let C=f(A);if(C){const y=this.opts.es5?e.varKinds.var:e.varKinds.const;w=(0,t._)`${w}${y} ${A} = ${C};${this.opts._n}`}else if(C=m==null?void 0:m(A))w=(0,t._)`${w}${C}${this.opts._n}`;else throw new n(A);v.set(A,r.Completed)})}return w}}e.ValueScope=i})(nu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=As,n=nu;var r=As;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var a=nu;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class o{optimizeNodes(){return this}optimizeNames(I,M){return this}}class s extends o{constructor(I,M,Q){super(),this.varKind=I,this.name=M,this.rhs=Q}render({es5:I,_n:M}){const Q=I?n.varKinds.var:this.varKind,Me=this.rhs===void 0?"":` = ${this.rhs}`;return`${Q} ${this.name}${Me};`+M}optimizeNames(I,M){if(I[this.name.str])return this.rhs&&(this.rhs=Re(this.rhs,I,M)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class i extends o{constructor(I,M,Q){super(),this.lhs=I,this.rhs=M,this.sideEffects=Q}render({_n:I}){return`${this.lhs} = ${this.rhs};`+I}optimizeNames(I,M){if(!(this.lhs instanceof t.Name&&!I[this.lhs.str]&&!this.sideEffects))return this.rhs=Re(this.rhs,I,M),this}get names(){const I=this.lhs instanceof t.Name?{}:{...this.lhs.names};return Ce(I,this.rhs)}}class l extends i{constructor(I,M,Q,Me){super(I,Q,Me),this.op=M}render({_n:I}){return`${this.lhs} ${this.op}= ${this.rhs};`+I}}class c extends o{constructor(I){super(),this.label=I,this.names={}}render({_n:I}){return`${this.label}:`+I}}class f extends o{constructor(I){super(),this.label=I,this.names={}}render({_n:I}){return`break${this.label?` ${this.label}`:""};`+I}}class u extends o{constructor(I){super(),this.error=I}render({_n:I}){return`throw ${this.error};`+I}get names(){return this.error.names}}class m extends o{constructor(I){super(),this.code=I}render({_n:I}){return`${this.code};`+I}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(I,M){return this.code=Re(this.code,I,M),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class w extends o{constructor(I=[]){super(),this.nodes=I}render(I){return this.nodes.reduce((M,Q)=>M+Q.render(I),"")}optimizeNodes(){const{nodes:I}=this;let M=I.length;for(;M--;){const Q=I[M].optimizeNodes();Array.isArray(Q)?I.splice(M,1,...Q):Q?I[M]=Q:I.splice(M,1)}return I.length>0?this:void 0}optimizeNames(I,M){const{nodes:Q}=this;let Me=Q.length;for(;Me--;){const F=Q[Me];F.optimizeNames(I,M)||(Je(I,F.names),Q.splice(Me,1))}return Q.length>0?this:void 0}get names(){return this.nodes.reduce((I,M)=>be(I,M.names),{})}}class b extends w{render(I){return"{"+I._n+super.render(I)+"}"+I._n}}class g extends w{}class v extends b{}v.kind="else";class A extends b{constructor(I,M){super(M),this.condition=I}render(I){let M=`if(${this.condition})`+super.render(I);return this.else&&(M+="else "+this.else.render(I)),M}optimizeNodes(){super.optimizeNodes();const I=this.condition;if(I===!0)return this.nodes;let M=this.else;if(M){const Q=M.optimizeNodes();M=this.else=Array.isArray(Q)?new v(Q):Q}if(M)return I===!1?M instanceof A?M:M.nodes:this.nodes.length?this:new A(se(I),M instanceof A?[M]:M.nodes);if(!(I===!1||!this.nodes.length))return this}optimizeNames(I,M){var Q;if(this.else=(Q=this.else)===null||Q===void 0?void 0:Q.optimizeNames(I,M),!!(super.optimizeNames(I,M)||this.else))return this.condition=Re(this.condition,I,M),this}get names(){const I=super.names;return Ce(I,this.condition),this.else&&be(I,this.else.names),I}}A.kind="if";class C extends b{}C.kind="for";class y extends C{constructor(I){super(),this.iteration=I}render(I){return`for(${this.iteration})`+super.render(I)}optimizeNames(I,M){if(super.optimizeNames(I,M))return this.iteration=Re(this.iteration,I,M),this}get names(){return be(super.names,this.iteration.names)}}class p extends C{constructor(I,M,Q,Me){super(),this.varKind=I,this.name=M,this.from=Q,this.to=Me}render(I){const M=I.es5?n.varKinds.var:this.varKind,{name:Q,from:Me,to:F}=this;return`for(${M} ${Q}=${Me}; ${Q}<${F}; ${Q}++)`+super.render(I)}get names(){const I=Ce(super.names,this.from);return Ce(I,this.to)}}class $ extends C{constructor(I,M,Q,Me){super(),this.loop=I,this.varKind=M,this.name=Q,this.iterable=Me}render(I){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(I)}optimizeNames(I,M){if(super.optimizeNames(I,M))return this.iterable=Re(this.iterable,I,M),this}get names(){return be(super.names,this.iterable.names)}}class E extends b{constructor(I,M,Q){super(),this.name=I,this.args=M,this.async=Q}render(I){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(I)}}E.kind="func";class B extends w{render(I){return"return "+super.render(I)}}B.kind="return";class z extends b{render(I){let M="try"+super.render(I);return this.catch&&(M+=this.catch.render(I)),this.finally&&(M+=this.finally.render(I)),M}optimizeNodes(){var I,M;return super.optimizeNodes(),(I=this.catch)===null||I===void 0||I.optimizeNodes(),(M=this.finally)===null||M===void 0||M.optimizeNodes(),this}optimizeNames(I,M){var Q,Me;return super.optimizeNames(I,M),(Q=this.catch)===null||Q===void 0||Q.optimizeNames(I,M),(Me=this.finally)===null||Me===void 0||Me.optimizeNames(I,M),this}get names(){const I=super.names;return this.catch&&be(I,this.catch.names),this.finally&&be(I,this.finally.names),I}}class le extends b{constructor(I){super(),this.error=I}render(I){return`catch(${this.error})`+super.render(I)}}le.kind="catch";class fe extends b{render(I){return"finally"+super.render(I)}}fe.kind="finally";class Le{constructor(I,M={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...M,_n:M.lines?`
`:""},this._extScope=I,this._scope=new n.Scope({parent:I}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(I){return this._scope.name(I)}scopeName(I){return this._extScope.name(I)}scopeValue(I,M){const Q=this._extScope.value(I,M);return(this._values[Q.prefix]||(this._values[Q.prefix]=new Set)).add(Q),Q}getScopeValue(I,M){return this._extScope.getValue(I,M)}scopeRefs(I){return this._extScope.scopeRefs(I,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(I,M,Q,Me){const F=this._scope.toName(M);return Q!==void 0&&Me&&(this._constants[F.str]=Q),this._leafNode(new s(I,F,Q)),F}const(I,M,Q){return this._def(n.varKinds.const,I,M,Q)}let(I,M,Q){return this._def(n.varKinds.let,I,M,Q)}var(I,M,Q){return this._def(n.varKinds.var,I,M,Q)}assign(I,M,Q){return this._leafNode(new i(I,M,Q))}add(I,M){return this._leafNode(new l(I,e.operators.ADD,M))}code(I){return typeof I=="function"?I():I!==t.nil&&this._leafNode(new m(I)),this}object(...I){const M=["{"];for(const[Q,Me]of I)M.length>1&&M.push(","),M.push(Q),(Q!==Me||this.opts.es5)&&(M.push(":"),(0,t.addCodeArg)(M,Me));return M.push("}"),new t._Code(M)}if(I,M,Q){if(this._blockNode(new A(I)),M&&Q)this.code(M).else().code(Q).endIf();else if(M)this.code(M).endIf();else if(Q)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(I){return this._elseNode(new A(I))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(A,v)}_for(I,M){return this._blockNode(I),M&&this.code(M).endFor(),this}for(I,M){return this._for(new y(I),M)}forRange(I,M,Q,Me,F=this.opts.es5?n.varKinds.var:n.varKinds.let){const G=this._scope.toName(I);return this._for(new p(F,G,M,Q),()=>Me(G))}forOf(I,M,Q,Me=n.varKinds.const){const F=this._scope.toName(I);if(this.opts.es5){const G=M instanceof t.Name?M:this.var("_arr",M);return this.forRange("_i",0,(0,t._)`${G}.length`,J=>{this.var(F,(0,t._)`${G}[${J}]`),Q(F)})}return this._for(new $("of",Me,F,M),()=>Q(F))}forIn(I,M,Q,Me=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(I,(0,t._)`Object.keys(${M})`,Q);const F=this._scope.toName(I);return this._for(new $("in",Me,F,M),()=>Q(F))}endFor(){return this._endBlockNode(C)}label(I){return this._leafNode(new c(I))}break(I){return this._leafNode(new f(I))}return(I){const M=new B;if(this._blockNode(M),this.code(I),M.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(B)}try(I,M,Q){if(!M&&!Q)throw new Error('CodeGen: "try" without "catch" and "finally"');const Me=new z;if(this._blockNode(Me),this.code(I),M){const F=this.name("e");this._currNode=Me.catch=new le(F),M(F)}return Q&&(this._currNode=Me.finally=new fe,this.code(Q)),this._endBlockNode(le,fe)}throw(I){return this._leafNode(new u(I))}block(I,M){return this._blockStarts.push(this._nodes.length),I&&this.code(I).endBlock(M),this}endBlock(I){const M=this._blockStarts.pop();if(M===void 0)throw new Error("CodeGen: not in self-balancing block");const Q=this._nodes.length-M;if(Q<0||I!==void 0&&Q!==I)throw new Error(`CodeGen: wrong number of nodes: ${Q} vs ${I} expected`);return this._nodes.length=M,this}func(I,M=t.nil,Q,Me){return this._blockNode(new E(I,M,Q)),Me&&this.code(Me).endFunc(),this}endFunc(){return this._endBlockNode(E)}optimize(I=1){for(;I-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(I){return this._currNode.nodes.push(I),this}_blockNode(I){this._currNode.nodes.push(I),this._nodes.push(I)}_endBlockNode(I,M){const Q=this._currNode;if(Q instanceof I||M&&Q instanceof M)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${M?`${I.kind}/${M.kind}`:I.kind}"`)}_elseNode(I){const M=this._currNode;if(!(M instanceof A))throw new Error('CodeGen: "else" without "if"');return this._currNode=M.else=I,this}get _root(){return this._nodes[0]}get _currNode(){const I=this._nodes;return I[I.length-1]}set _currNode(I){const M=this._nodes;M[M.length-1]=I}}e.CodeGen=Le;function be(O,I){for(const M in I)O[M]=(O[M]||0)+(I[M]||0);return O}function Ce(O,I){return I instanceof t._CodeOrName?be(O,I.names):O}function Re(O,I,M){if(O instanceof t.Name)return Q(O);if(!Me(O))return O;return new t._Code(O._items.reduce((F,G)=>(G instanceof t.Name&&(G=Q(G)),G instanceof t._Code?F.push(...G._items):F.push(G),F),[]));function Q(F){const G=M[F.str];return G===void 0||I[F.str]!==1?F:(delete I[F.str],G)}function Me(F){return F instanceof t._Code&&F._items.some(G=>G instanceof t.Name&&I[G.str]===1&&M[G.str]!==void 0)}}function Je(O,I){for(const M in I)O[M]=(O[M]||0)-(I[M]||0)}function se(O){return typeof O=="boolean"||typeof O=="number"||O===null?!O:(0,t._)`!${ue(O)}`}e.not=se;const ce=j(e.operators.AND);function he(...O){return O.reduce(ce)}e.and=he;const ke=j(e.operators.OR);function ye(...O){return O.reduce(ke)}e.or=ye;function j(O){return(I,M)=>I===t.nil?M:M===t.nil?I:(0,t._)`${ue(I)} ${O} ${ue(M)}`}function ue(O){return O instanceof t.Name?O:(0,t._)`(${O})`}})(pt);var Ve={};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.checkStrictMode=Ve.getErrorPath=Ve.Type=Ve.useFunc=Ve.setEvaluated=Ve.evaluatedPropsToName=Ve.mergeEvaluated=Ve.eachItem=Ve.unescapeJsonPointer=Ve.escapeJsonPointer=Ve.escapeFragment=Ve.unescapeFragment=Ve.schemaRefOrVal=Ve.schemaHasRulesButRef=Ve.schemaHasRules=Ve.checkUnknownRules=Ve.alwaysValidSchema=Ve.toHash=void 0;const Nt=pt,VC=As;function BC(e){const t={};for(const n of e)t[n]=!0;return t}Ve.toHash=BC;function UC(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(Dv(e,t),!Fv(t,e.self.RULES.all))}Ve.alwaysValidSchema=UC;function Dv(e,t=e.schema){const{opts:n,self:r}=e;if(!n.strictSchema||typeof t=="boolean")return;const a=r.RULES.keywords;for(const o in t)a[o]||Bv(e,`unknown keyword: "${o}"`)}Ve.checkUnknownRules=Dv;function Fv(e,t){if(typeof e=="boolean")return!e;for(const n in e)if(t[n])return!0;return!1}Ve.schemaHasRules=Fv;function HC(e,t){if(typeof e=="boolean")return!e;for(const n in e)if(n!=="$ref"&&t.all[n])return!0;return!1}Ve.schemaHasRulesButRef=HC;function zC({topSchemaRef:e,schemaPath:t},n,r,a){if(!a){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,Nt._)`${n}`}return(0,Nt._)`${e}${t}${(0,Nt.getProperty)(r)}`}Ve.schemaRefOrVal=zC;function KC(e){return jv(decodeURIComponent(e))}Ve.unescapeFragment=KC;function WC(e){return encodeURIComponent(ju(e))}Ve.escapeFragment=WC;function ju(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Ve.escapeJsonPointer=ju;function jv(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Ve.unescapeJsonPointer=jv;function GC(e,t){if(Array.isArray(e))for(const n of e)t(n);else t(e)}Ve.eachItem=GC;function Gp({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:r}){return(a,o,s,i)=>{const l=s===void 0?o:s instanceof Nt.Name?(o instanceof Nt.Name?e(a,o,s):t(a,o,s),s):o instanceof Nt.Name?(t(a,s,o),o):n(o,s);return i===Nt.Name&&!(l instanceof Nt.Name)?r(a,l):l}}Ve.mergeEvaluated={props:Gp({mergeNames:(e,t,n)=>e.if((0,Nt._)`${n} !== true && ${t} !== undefined`,()=>{e.if((0,Nt._)`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,(0,Nt._)`${n} || {}`).code((0,Nt._)`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if((0,Nt._)`${n} !== true`,()=>{t===!0?e.assign(n,!0):(e.assign(n,(0,Nt._)`${n} || {}`),Vu(e,n,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:Vv}),items:Gp({mergeNames:(e,t,n)=>e.if((0,Nt._)`${n} !== true && ${t} !== undefined`,()=>e.assign(n,(0,Nt._)`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if((0,Nt._)`${n} !== true`,()=>e.assign(n,t===!0?!0:(0,Nt._)`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function Vv(e,t){if(t===!0)return e.var("props",!0);const n=e.var("props",(0,Nt._)`{}`);return t!==void 0&&Vu(e,n,t),n}Ve.evaluatedPropsToName=Vv;function Vu(e,t,n){Object.keys(n).forEach(r=>e.assign((0,Nt._)`${t}${(0,Nt.getProperty)(r)}`,!0))}Ve.setEvaluated=Vu;const qp={};function qC(e,t){return e.scopeValue("func",{ref:t,code:qp[t.code]||(qp[t.code]=new VC._Code(t.code))})}Ve.useFunc=qC;var ru;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(ru||(Ve.Type=ru={}));function JC(e,t,n){if(e instanceof Nt.Name){const r=t===ru.Num;return n?r?(0,Nt._)`"[" + ${e} + "]"`:(0,Nt._)`"['" + ${e} + "']"`:r?(0,Nt._)`"/" + ${e}`:(0,Nt._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,Nt.getProperty)(e).toString():"/"+ju(e)}Ve.getErrorPath=JC;function Bv(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw new Error(t);e.self.logger.warn(t)}}Ve.checkStrictMode=Bv;var gr={};Object.defineProperty(gr,"__esModule",{value:!0});const vn=pt,YC={data:new vn.Name("data"),valCxt:new vn.Name("valCxt"),instancePath:new vn.Name("instancePath"),parentData:new vn.Name("parentData"),parentDataProperty:new vn.Name("parentDataProperty"),rootData:new vn.Name("rootData"),dynamicAnchors:new vn.Name("dynamicAnchors"),vErrors:new vn.Name("vErrors"),errors:new vn.Name("errors"),this:new vn.Name("this"),self:new vn.Name("self"),scope:new vn.Name("scope"),json:new vn.Name("json"),jsonPos:new vn.Name("jsonPos"),jsonLen:new vn.Name("jsonLen"),jsonPart:new vn.Name("jsonPart")};gr.default=YC;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=pt,n=Ve,r=gr;e.keywordError={message:({keyword:v})=>(0,t.str)`must pass "${v}" keyword validation`},e.keyword$DataError={message:({keyword:v,schemaType:A})=>A?(0,t.str)`"${v}" keyword must be ${A} ($data)`:(0,t.str)`"${v}" keyword is invalid ($data)`};function a(v,A=e.keywordError,C,y){const{it:p}=v,{gen:$,compositeRule:E,allErrors:B}=p,z=u(v,A,C);y??(E||B)?l($,z):c(p,(0,t._)`[${z}]`)}e.reportError=a;function o(v,A=e.keywordError,C){const{it:y}=v,{gen:p,compositeRule:$,allErrors:E}=y,B=u(v,A,C);l(p,B),$||E||c(y,r.default.vErrors)}e.reportExtraError=o;function s(v,A){v.assign(r.default.errors,A),v.if((0,t._)`${r.default.vErrors} !== null`,()=>v.if(A,()=>v.assign((0,t._)`${r.default.vErrors}.length`,A),()=>v.assign(r.default.vErrors,null)))}e.resetErrorsCount=s;function i({gen:v,keyword:A,schemaValue:C,data:y,errsCount:p,it:$}){if(p===void 0)throw new Error("ajv implementation error");const E=v.name("err");v.forRange("i",p,r.default.errors,B=>{v.const(E,(0,t._)`${r.default.vErrors}[${B}]`),v.if((0,t._)`${E}.instancePath === undefined`,()=>v.assign((0,t._)`${E}.instancePath`,(0,t.strConcat)(r.default.instancePath,$.errorPath))),v.assign((0,t._)`${E}.schemaPath`,(0,t.str)`${$.errSchemaPath}/${A}`),$.opts.verbose&&(v.assign((0,t._)`${E}.schema`,C),v.assign((0,t._)`${E}.data`,y))})}e.extendErrors=i;function l(v,A){const C=v.const("err",A);v.if((0,t._)`${r.default.vErrors} === null`,()=>v.assign(r.default.vErrors,(0,t._)`[${C}]`),(0,t._)`${r.default.vErrors}.push(${C})`),v.code((0,t._)`${r.default.errors}++`)}function c(v,A){const{gen:C,validateName:y,schemaEnv:p}=v;p.$async?C.throw((0,t._)`new ${v.ValidationError}(${A})`):(C.assign((0,t._)`${y}.errors`,A),C.return(!1))}const f={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function u(v,A,C){const{createErrors:y}=v.it;return y===!1?(0,t._)`{}`:m(v,A,C)}function m(v,A,C={}){const{gen:y,it:p}=v,$=[w(p,C),b(v,C)];return g(v,A,$),y.object(...$)}function w({errorPath:v},{instancePath:A}){const C=A?(0,t.str)`${v}${(0,n.getErrorPath)(A,n.Type.Str)}`:v;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,C)]}function b({keyword:v,it:{errSchemaPath:A}},{schemaPath:C,parentSchema:y}){let p=y?A:(0,t.str)`${A}/${v}`;return C&&(p=(0,t.str)`${p}${(0,n.getErrorPath)(C,n.Type.Str)}`),[f.schemaPath,p]}function g(v,{params:A,message:C},y){const{keyword:p,data:$,schemaValue:E,it:B}=v,{opts:z,propertyName:le,topSchemaRef:fe,schemaPath:Le}=B;y.push([f.keyword,p],[f.params,typeof A=="function"?A(v):A||(0,t._)`{}`]),z.messages&&y.push([f.message,typeof C=="function"?C(v):C]),z.verbose&&y.push([f.schema,E],[f.parentSchema,(0,t._)`${fe}${Le}`],[r.default.data,$]),le&&y.push([f.propertyName,le])}})(xs);Object.defineProperty(Co,"__esModule",{value:!0});Co.boolOrEmptySchema=Co.topBoolOrEmptySchema=void 0;const QC=xs,XC=pt,ZC=gr,e$={message:"boolean schema is false"};function t$(e){const{gen:t,schema:n,validateName:r}=e;n===!1?Uv(e,!1):typeof n=="object"&&n.$async===!0?t.return(ZC.default.data):(t.assign((0,XC._)`${r}.errors`,null),t.return(!0))}Co.topBoolOrEmptySchema=t$;function n$(e,t){const{gen:n,schema:r}=e;r===!1?(n.var(t,!1),Uv(e)):n.var(t,!0)}Co.boolOrEmptySchema=n$;function Uv(e,t){const{gen:n,data:r}=e,a={gen:n,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,QC.reportError)(a,e$,void 0,t)}var Jt={},Oa={};Object.defineProperty(Oa,"__esModule",{value:!0});Oa.getRules=Oa.isJSONType=void 0;const r$=["string","number","integer","boolean","null","object","array"],a$=new Set(r$);function o$(e){return typeof e=="string"&&a$.has(e)}Oa.isJSONType=o$;function s$(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Oa.getRules=s$;var Tr={};Object.defineProperty(Tr,"__esModule",{value:!0});Tr.shouldUseRule=Tr.shouldUseGroup=Tr.schemaHasRulesForType=void 0;function i$({schema:e,self:t},n){const r=t.RULES.types[n];return r&&r!==!0&&Hv(e,r)}Tr.schemaHasRulesForType=i$;function Hv(e,t){return t.rules.some(n=>zv(e,n))}Tr.shouldUseGroup=Hv;function zv(e,t){var n;return e[t.keyword]!==void 0||((n=t.definition.implements)===null||n===void 0?void 0:n.some(r=>e[r]!==void 0))}Tr.shouldUseRule=zv;Object.defineProperty(Jt,"__esModule",{value:!0});Jt.reportTypeError=Jt.checkDataTypes=Jt.checkDataType=Jt.coerceAndCheckDataType=Jt.getJSONTypes=Jt.getSchemaTypes=Jt.DataType=void 0;const l$=Oa,c$=Tr,u$=xs,st=pt,Kv=Ve;var ho;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(ho||(Jt.DataType=ho={}));function d$(e){const t=Wv(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}Jt.getSchemaTypes=d$;function Wv(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(l$.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}Jt.getJSONTypes=Wv;function f$(e,t){const{gen:n,data:r,opts:a}=e,o=p$(t,a.coerceTypes),s=t.length>0&&!(o.length===0&&t.length===1&&(0,c$.schemaHasRulesForType)(e,t[0]));if(s){const i=Bu(t,r,a.strictNumbers,ho.Wrong);n.if(i,()=>{o.length?h$(e,t,o):Uu(e)})}return s}Jt.coerceAndCheckDataType=f$;const Gv=new Set(["string","number","integer","boolean","null"]);function p$(e,t){return t?e.filter(n=>Gv.has(n)||t==="array"&&n==="array"):[]}function h$(e,t,n){const{gen:r,data:a,opts:o}=e,s=r.let("dataType",(0,st._)`typeof ${a}`),i=r.let("coerced",(0,st._)`undefined`);o.coerceTypes==="array"&&r.if((0,st._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,st._)`${a}[0]`).assign(s,(0,st._)`typeof ${a}`).if(Bu(t,a,o.strictNumbers),()=>r.assign(i,a))),r.if((0,st._)`${i} !== undefined`);for(const c of n)(Gv.has(c)||c==="array"&&o.coerceTypes==="array")&&l(c);r.else(),Uu(e),r.endIf(),r.if((0,st._)`${i} !== undefined`,()=>{r.assign(a,i),m$(e,i)});function l(c){switch(c){case"string":r.elseIf((0,st._)`${s} == "number" || ${s} == "boolean"`).assign(i,(0,st._)`"" + ${a}`).elseIf((0,st._)`${a} === null`).assign(i,(0,st._)`""`);return;case"number":r.elseIf((0,st._)`${s} == "boolean" || ${a} === null
              || (${s} == "string" && ${a} && ${a} == +${a})`).assign(i,(0,st._)`+${a}`);return;case"integer":r.elseIf((0,st._)`${s} === "boolean" || ${a} === null
              || (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(i,(0,st._)`+${a}`);return;case"boolean":r.elseIf((0,st._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(i,!1).elseIf((0,st._)`${a} === "true" || ${a} === 1`).assign(i,!0);return;case"null":r.elseIf((0,st._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(i,null);return;case"array":r.elseIf((0,st._)`${s} === "string" || ${s} === "number"
              || ${s} === "boolean" || ${a} === null`).assign(i,(0,st._)`[${a}]`)}}}function m$({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,st._)`${t} !== undefined`,()=>e.assign((0,st._)`${t}[${n}]`,r))}function au(e,t,n,r=ho.Correct){const a=r===ho.Correct?st.operators.EQ:st.operators.NEQ;let o;switch(e){case"null":return(0,st._)`${t} ${a} null`;case"array":o=(0,st._)`Array.isArray(${t})`;break;case"object":o=(0,st._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=s((0,st._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=s();break;default:return(0,st._)`typeof ${t} ${a} ${e}`}return r===ho.Correct?o:(0,st.not)(o);function s(i=st.nil){return(0,st.and)((0,st._)`typeof ${t} == "number"`,i,n?(0,st._)`isFinite(${t})`:st.nil)}}Jt.checkDataType=au;function Bu(e,t,n,r){if(e.length===1)return au(e[0],t,n,r);let a;const o=(0,Kv.toHash)(e);if(o.array&&o.object){const s=(0,st._)`typeof ${t} != "object"`;a=o.null?s:(0,st._)`!${t} || ${s}`,delete o.null,delete o.array,delete o.object}else a=st.nil;o.number&&delete o.integer;for(const s in o)a=(0,st.and)(a,au(s,t,n,r));return a}Jt.checkDataTypes=Bu;const v$={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,st._)`{type: ${e}}`:(0,st._)`{type: ${t}}`};function Uu(e){const t=g$(e);(0,u$.reportError)(t,v$)}Jt.reportTypeError=Uu;function g$(e){const{gen:t,data:n,schema:r}=e,a=(0,Kv.schemaRefOrVal)(e,r,"type");return{gen:t,keyword:"type",data:n,schema:r.type,schemaCode:a,schemaValue:a,parentSchema:r,params:{},it:e}}var yl={};Object.defineProperty(yl,"__esModule",{value:!0});yl.assignDefaults=void 0;const eo=pt,y$=Ve;function _$(e,t){const{properties:n,items:r}=e.schema;if(t==="object"&&n)for(const a in n)Jp(e,a,n[a].default);else t==="array"&&Array.isArray(r)&&r.forEach((a,o)=>Jp(e,o,a.default))}yl.assignDefaults=_$;function Jp(e,t,n){const{gen:r,compositeRule:a,data:o,opts:s}=e;if(n===void 0)return;const i=(0,eo._)`${o}${(0,eo.getProperty)(t)}`;if(a){(0,y$.checkStrictMode)(e,`default is ignored for: ${i}`);return}let l=(0,eo._)`${i} === undefined`;s.useDefaults==="empty"&&(l=(0,eo._)`${l} || ${i} === null || ${i} === ""`),r.if(l,(0,eo._)`${i} = ${(0,eo.stringify)(n)}`)}var hr={},ft={};Object.defineProperty(ft,"__esModule",{value:!0});ft.validateUnion=ft.validateArray=ft.usePattern=ft.callValidateCode=ft.schemaProperties=ft.allSchemaProperties=ft.noPropertyInData=ft.propertyInData=ft.isOwnProperty=ft.hasPropFunc=ft.reportMissingProp=ft.checkMissingProp=ft.checkReportMissingProp=void 0;const Lt=pt,Hu=Ve,Ur=gr,b$=Ve;function w$(e,t){const{gen:n,data:r,it:a}=e;n.if(Ku(n,r,t,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Lt._)`${t}`},!0),e.error()})}ft.checkReportMissingProp=w$;function A$({gen:e,data:t,it:{opts:n}},r,a){return(0,Lt.or)(...r.map(o=>(0,Lt.and)(Ku(e,t,o,n.ownProperties),(0,Lt._)`${a} = ${o}`)))}ft.checkMissingProp=A$;function C$(e,t){e.setParams({missingProperty:t},!0),e.error()}ft.reportMissingProp=C$;function qv(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Lt._)`Object.prototype.hasOwnProperty`})}ft.hasPropFunc=qv;function zu(e,t,n){return(0,Lt._)`${qv(e)}.call(${t}, ${n})`}ft.isOwnProperty=zu;function $$(e,t,n,r){const a=(0,Lt._)`${t}${(0,Lt.getProperty)(n)} !== undefined`;return r?(0,Lt._)`${a} && ${zu(e,t,n)}`:a}ft.propertyInData=$$;function Ku(e,t,n,r){const a=(0,Lt._)`${t}${(0,Lt.getProperty)(n)} === undefined`;return r?(0,Lt.or)(a,(0,Lt.not)(zu(e,t,n))):a}ft.noPropertyInData=Ku;function Jv(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}ft.allSchemaProperties=Jv;function I$(e,t){return Jv(t).filter(n=>!(0,Hu.alwaysValidSchema)(e,t[n]))}ft.schemaProperties=I$;function S$({schemaCode:e,data:t,it:{gen:n,topSchemaRef:r,schemaPath:a,errorPath:o},it:s},i,l,c){const f=c?(0,Lt._)`${e}, ${t}, ${r}${a}`:t,u=[[Ur.default.instancePath,(0,Lt.strConcat)(Ur.default.instancePath,o)],[Ur.default.parentData,s.parentData],[Ur.default.parentDataProperty,s.parentDataProperty],[Ur.default.rootData,Ur.default.rootData]];s.opts.dynamicRef&&u.push([Ur.default.dynamicAnchors,Ur.default.dynamicAnchors]);const m=(0,Lt._)`${f}, ${n.object(...u)}`;return l!==Lt.nil?(0,Lt._)`${i}.call(${l}, ${m})`:(0,Lt._)`${i}(${m})`}ft.callValidateCode=S$;const E$=(0,Lt._)`new RegExp`;function k$({gen:e,it:{opts:t}},n){const r=t.unicodeRegExp?"u":"",{regExp:a}=t.code,o=a(n,r);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,Lt._)`${a.code==="new RegExp"?E$:(0,b$.useFunc)(e,a)}(${n}, ${r})`})}ft.usePattern=k$;function T$(e){const{gen:t,data:n,keyword:r,it:a}=e,o=t.name("valid");if(a.allErrors){const i=t.let("valid",!0);return s(()=>t.assign(i,!1)),i}return t.var(o,!0),s(()=>t.break()),o;function s(i){const l=t.const("len",(0,Lt._)`${n}.length`);t.forRange("i",0,l,c=>{e.subschema({keyword:r,dataProp:c,dataPropType:Hu.Type.Num},o),t.if((0,Lt.not)(o),i)})}}ft.validateArray=T$;function x$(e){const{gen:t,schema:n,keyword:r,it:a}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(l=>(0,Hu.alwaysValidSchema)(a,l))&&!a.opts.unevaluated)return;const s=t.let("valid",!1),i=t.name("_valid");t.block(()=>n.forEach((l,c)=>{const f=e.subschema({keyword:r,schemaProp:c,compositeRule:!0},i);t.assign(s,(0,Lt._)`${s} || ${i}`),e.mergeValidEvaluated(f,i)||t.if((0,Lt.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}ft.validateUnion=x$;Object.defineProperty(hr,"__esModule",{value:!0});hr.validateKeywordUsage=hr.validSchemaType=hr.funcKeywordCode=hr.macroKeywordCode=void 0;const An=pt,_a=gr,P$=ft,M$=xs;function N$(e,t){const{gen:n,keyword:r,schema:a,parentSchema:o,it:s}=e,i=t.macro.call(s.self,a,o,s),l=Yv(n,r,i);s.opts.validateSchema!==!1&&s.self.validateSchema(i,!0);const c=n.name("valid");e.subschema({schema:i,schemaPath:An.nil,errSchemaPath:`${s.errSchemaPath}/${r}`,topSchemaRef:l,compositeRule:!0},c),e.pass(c,()=>e.error(!0))}hr.macroKeywordCode=N$;function O$(e,t){var n;const{gen:r,keyword:a,schema:o,parentSchema:s,$data:i,it:l}=e;L$(l,t);const c=!i&&t.compile?t.compile.call(l.self,o,s,l):t.validate,f=Yv(r,a,c),u=r.let("valid");e.block$data(u,m),e.ok((n=t.valid)!==null&&n!==void 0?n:u);function m(){if(t.errors===!1)g(),t.modifying&&Yp(e),v(()=>e.error());else{const A=t.async?w():b();t.modifying&&Yp(e),v(()=>R$(e,A))}}function w(){const A=r.let("ruleErrs",null);return r.try(()=>g((0,An._)`await `),C=>r.assign(u,!1).if((0,An._)`${C} instanceof ${l.ValidationError}`,()=>r.assign(A,(0,An._)`${C}.errors`),()=>r.throw(C))),A}function b(){const A=(0,An._)`${f}.errors`;return r.assign(A,null),g(An.nil),A}function g(A=t.async?(0,An._)`await `:An.nil){const C=l.opts.passContext?_a.default.this:_a.default.self,y=!("compile"in t&&!i||t.schema===!1);r.assign(u,(0,An._)`${A}${(0,P$.callValidateCode)(e,f,C,y)}`,t.modifying)}function v(A){var C;r.if((0,An.not)((C=t.valid)!==null&&C!==void 0?C:u),A)}}hr.funcKeywordCode=O$;function Yp(e){const{gen:t,data:n,it:r}=e;t.if(r.parentData,()=>t.assign(n,(0,An._)`${r.parentData}[${r.parentDataProperty}]`))}function R$(e,t){const{gen:n}=e;n.if((0,An._)`Array.isArray(${t})`,()=>{n.assign(_a.default.vErrors,(0,An._)`${_a.default.vErrors} === null ? ${t} : ${_a.default.vErrors}.concat(${t})`).assign(_a.default.errors,(0,An._)`${_a.default.vErrors}.length`),(0,M$.extendErrors)(e)},()=>e.error())}function L$({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Yv(e,t,n){if(n===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,An.stringify)(n)})}function D$(e,t,n=!1){return!t.length||t.some(r=>r==="array"?Array.isArray(e):r==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==r||n&&typeof e>"u")}hr.validSchemaType=D$;function F$({schema:e,opts:t,self:n,errSchemaPath:r},a,o){if(Array.isArray(a.keyword)?!a.keyword.includes(o):a.keyword!==o)throw new Error("ajv implementation error");const s=a.dependencies;if(s!=null&&s.some(i=>!Object.prototype.hasOwnProperty.call(e,i)))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(a.validateSchema&&!a.validateSchema(e[o])){const l=`keyword "${o}" value is invalid at path "${r}": `+n.errorsText(a.validateSchema.errors);if(t.validateSchema==="log")n.logger.error(l);else throw new Error(l)}}hr.validateKeywordUsage=F$;var Qr={};Object.defineProperty(Qr,"__esModule",{value:!0});Qr.extendSubschemaMode=Qr.extendSubschemaData=Qr.getSubschema=void 0;const pr=pt,Qv=Ve;function j$(e,{keyword:t,schemaProp:n,schema:r,schemaPath:a,errSchemaPath:o,topSchemaRef:s}){if(t!==void 0&&r!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const i=e.schema[t];return n===void 0?{schema:i,schemaPath:(0,pr._)`${e.schemaPath}${(0,pr.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:i[n],schemaPath:(0,pr._)`${e.schemaPath}${(0,pr.getProperty)(t)}${(0,pr.getProperty)(n)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Qv.escapeFragment)(n)}`}}if(r!==void 0){if(a===void 0||o===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:a,topSchemaRef:s,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}Qr.getSubschema=j$;function V$(e,t,{dataProp:n,dataPropType:r,data:a,dataTypes:o,propertyName:s}){if(a!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:i}=t;if(n!==void 0){const{errorPath:c,dataPathArr:f,opts:u}=t,m=i.let("data",(0,pr._)`${t.data}${(0,pr.getProperty)(n)}`,!0);l(m),e.errorPath=(0,pr.str)`${c}${(0,Qv.getErrorPath)(n,r,u.jsPropertySyntax)}`,e.parentDataProperty=(0,pr._)`${n}`,e.dataPathArr=[...f,e.parentDataProperty]}if(a!==void 0){const c=a instanceof pr.Name?a:i.let("data",a,!0);l(c),s!==void 0&&(e.propertyName=s)}o&&(e.dataTypes=o);function l(c){e.data=c,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,c]}}Qr.extendSubschemaData=V$;function B$(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:a,allErrors:o}){r!==void 0&&(e.compositeRule=r),a!==void 0&&(e.createErrors=a),o!==void 0&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=n}Qr.extendSubschemaMode=B$;var fn={},Xv=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,a,o;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(a=r;a--!==0;)if(!e(t[a],n[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(o=Object.keys(t),r=o.length,r!==Object.keys(n).length)return!1;for(a=r;a--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[a]))return!1;for(a=r;a--!==0;){var s=o[a];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n},Zv={exports:{}},Jr=Zv.exports=function(e,t,n){typeof t=="function"&&(n=t,t={}),n=t.cb||n;var r=typeof n=="function"?n:n.pre||function(){},a=n.post||function(){};Ti(t,r,a,e,"",e)};Jr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Jr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Jr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Jr.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Ti(e,t,n,r,a,o,s,i,l,c){if(r&&typeof r=="object"&&!Array.isArray(r)){t(r,a,o,s,i,l,c);for(var f in r){var u=r[f];if(Array.isArray(u)){if(f in Jr.arrayKeywords)for(var m=0;m<u.length;m++)Ti(e,t,n,u[m],a+"/"+f+"/"+m,o,a,f,r,m)}else if(f in Jr.propsKeywords){if(u&&typeof u=="object")for(var w in u)Ti(e,t,n,u[w],a+"/"+f+"/"+U$(w),o,a,f,r,w)}else(f in Jr.keywords||e.allKeys&&!(f in Jr.skipKeywords))&&Ti(e,t,n,u,a+"/"+f,o,a,f,r)}n(r,a,o,s,i,l,c)}}function U$(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var H$=Zv.exports;Object.defineProperty(fn,"__esModule",{value:!0});fn.getSchemaRefs=fn.resolveUrl=fn.normalizeId=fn._getFullPath=fn.getFullPath=fn.inlineRef=void 0;const z$=Ve,K$=Xv,W$=H$,G$=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function q$(e,t=!0){return typeof e=="boolean"?!0:t===!0?!ou(e):t?eg(e)<=t:!1}fn.inlineRef=q$;const J$=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function ou(e){for(const t in e){if(J$.has(t))return!0;const n=e[t];if(Array.isArray(n)&&n.some(ou)||typeof n=="object"&&ou(n))return!0}return!1}function eg(e){let t=0;for(const n in e){if(n==="$ref")return 1/0;if(t++,!G$.has(n)&&(typeof e[n]=="object"&&(0,z$.eachItem)(e[n],r=>t+=eg(r)),t===1/0))return 1/0}return t}function tg(e,t="",n){n!==!1&&(t=mo(t));const r=e.parse(t);return ng(e,r)}fn.getFullPath=tg;function ng(e,t){return e.serialize(t).split("#")[0]+"#"}fn._getFullPath=ng;const Y$=/#\/?$/;function mo(e){return e?e.replace(Y$,""):""}fn.normalizeId=mo;function Q$(e,t,n){return n=mo(n),e.resolve(t,n)}fn.resolveUrl=Q$;const X$=/^[a-z_][-a-z0-9._]*$/i;function Z$(e,t){if(typeof e=="boolean")return{};const{schemaId:n,uriResolver:r}=this.opts,a=mo(e[n]||t),o={"":a},s=tg(r,a,!1),i={},l=new Set;return W$(e,{allKeys:!0},(u,m,w,b)=>{if(b===void 0)return;const g=s+m;let v=o[b];typeof u[n]=="string"&&(v=A.call(this,u[n])),C.call(this,u.$anchor),C.call(this,u.$dynamicAnchor),o[m]=v;function A(y){const p=this.opts.uriResolver.resolve;if(y=mo(v?p(v,y):y),l.has(y))throw f(y);l.add(y);let $=this.refs[y];return typeof $=="string"&&($=this.refs[$]),typeof $=="object"?c(u,$.schema,y):y!==mo(g)&&(y[0]==="#"?(c(u,i[y],y),i[y]=u):this.refs[y]=g),y}function C(y){if(typeof y=="string"){if(!X$.test(y))throw new Error(`invalid anchor "${y}"`);A.call(this,`#${y}`)}}}),i;function c(u,m,w){if(m!==void 0&&!K$(u,m))throw f(w)}function f(u){return new Error(`reference "${u}" resolves to more than one schema`)}}fn.getSchemaRefs=Z$;Object.defineProperty(sr,"__esModule",{value:!0});sr.getData=sr.KeywordCxt=sr.validateFunctionCode=void 0;const rg=Co,Qp=Jt,Wu=Tr,Gi=Jt,eI=yl,is=hr,Cc=Qr,Xe=pt,at=gr,tI=fn,xr=Ve,Wo=xs;function nI(e){if(sg(e)&&(ig(e),og(e))){oI(e);return}ag(e,()=>(0,rg.topBoolOrEmptySchema)(e))}sr.validateFunctionCode=nI;function ag({gen:e,validateName:t,schema:n,schemaEnv:r,opts:a},o){a.code.es5?e.func(t,(0,Xe._)`${at.default.data}, ${at.default.valCxt}`,r.$async,()=>{e.code((0,Xe._)`"use strict"; ${Xp(n,a)}`),aI(e,a),e.code(o)}):e.func(t,(0,Xe._)`${at.default.data}, ${rI(a)}`,r.$async,()=>e.code(Xp(n,a)).code(o))}function rI(e){return(0,Xe._)`{${at.default.instancePath}="", ${at.default.parentData}, ${at.default.parentDataProperty}, ${at.default.rootData}=${at.default.data}${e.dynamicRef?(0,Xe._)`, ${at.default.dynamicAnchors}={}`:Xe.nil}}={}`}function aI(e,t){e.if(at.default.valCxt,()=>{e.var(at.default.instancePath,(0,Xe._)`${at.default.valCxt}.${at.default.instancePath}`),e.var(at.default.parentData,(0,Xe._)`${at.default.valCxt}.${at.default.parentData}`),e.var(at.default.parentDataProperty,(0,Xe._)`${at.default.valCxt}.${at.default.parentDataProperty}`),e.var(at.default.rootData,(0,Xe._)`${at.default.valCxt}.${at.default.rootData}`),t.dynamicRef&&e.var(at.default.dynamicAnchors,(0,Xe._)`${at.default.valCxt}.${at.default.dynamicAnchors}`)},()=>{e.var(at.default.instancePath,(0,Xe._)`""`),e.var(at.default.parentData,(0,Xe._)`undefined`),e.var(at.default.parentDataProperty,(0,Xe._)`undefined`),e.var(at.default.rootData,at.default.data),t.dynamicRef&&e.var(at.default.dynamicAnchors,(0,Xe._)`{}`)})}function oI(e){const{schema:t,opts:n,gen:r}=e;ag(e,()=>{n.$comment&&t.$comment&&cg(e),uI(e),r.let(at.default.vErrors,null),r.let(at.default.errors,0),n.unevaluated&&sI(e),lg(e),pI(e)})}function sI(e){const{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",(0,Xe._)`${n}.evaluated`),t.if((0,Xe._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,Xe._)`${e.evaluated}.props`,(0,Xe._)`undefined`)),t.if((0,Xe._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,Xe._)`${e.evaluated}.items`,(0,Xe._)`undefined`))}function Xp(e,t){const n=typeof e=="object"&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,Xe._)`/*# sourceURL=${n} */`:Xe.nil}function iI(e,t){if(sg(e)&&(ig(e),og(e))){lI(e,t);return}(0,rg.boolOrEmptySchema)(e,t)}function og({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const n in e)if(t.RULES.all[n])return!0;return!1}function sg(e){return typeof e.schema!="boolean"}function lI(e,t){const{schema:n,gen:r,opts:a}=e;a.$comment&&n.$comment&&cg(e),dI(e),fI(e);const o=r.const("_errs",at.default.errors);lg(e,o),r.var(t,(0,Xe._)`${o} === ${at.default.errors}`)}function ig(e){(0,xr.checkUnknownRules)(e),cI(e)}function lg(e,t){if(e.opts.jtd)return Zp(e,[],!1,t);const n=(0,Qp.getSchemaTypes)(e.schema),r=(0,Qp.coerceAndCheckDataType)(e,n);Zp(e,n,!r,t)}function cI(e){const{schema:t,errSchemaPath:n,opts:r,self:a}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,xr.schemaHasRulesButRef)(t,a.RULES)&&a.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function uI(e){const{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,xr.checkStrictMode)(e,"default is ignored in the schema root")}function dI(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,tI.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function fI(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function cg({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:a}){const o=n.$comment;if(a.$comment===!0)e.code((0,Xe._)`${at.default.self}.logger.log(${o})`);else if(typeof a.$comment=="function"){const s=(0,Xe.str)`${r}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code((0,Xe._)`${at.default.self}.opts.$comment(${o}, ${s}, ${i}.schema)`)}}function pI(e){const{gen:t,schemaEnv:n,validateName:r,ValidationError:a,opts:o}=e;n.$async?t.if((0,Xe._)`${at.default.errors} === 0`,()=>t.return(at.default.data),()=>t.throw((0,Xe._)`new ${a}(${at.default.vErrors})`)):(t.assign((0,Xe._)`${r}.errors`,at.default.vErrors),o.unevaluated&&hI(e),t.return((0,Xe._)`${at.default.errors} === 0`))}function hI({gen:e,evaluated:t,props:n,items:r}){n instanceof Xe.Name&&e.assign((0,Xe._)`${t}.props`,n),r instanceof Xe.Name&&e.assign((0,Xe._)`${t}.items`,r)}function Zp(e,t,n,r){const{gen:a,schema:o,data:s,allErrors:i,opts:l,self:c}=e,{RULES:f}=c;if(o.$ref&&(l.ignoreKeywordsWithRef||!(0,xr.schemaHasRulesButRef)(o,f))){a.block(()=>fg(e,"$ref",f.all.$ref.definition));return}l.jtd||mI(e,t),a.block(()=>{for(const m of f.rules)u(m);u(f.post)});function u(m){(0,Wu.shouldUseGroup)(o,m)&&(m.type?(a.if((0,Gi.checkDataType)(m.type,s,l.strictNumbers)),eh(e,m),t.length===1&&t[0]===m.type&&n&&(a.else(),(0,Gi.reportTypeError)(e)),a.endIf()):eh(e,m),i||a.if((0,Xe._)`${at.default.errors} === ${r||0}`))}}function eh(e,t){const{gen:n,schema:r,opts:{useDefaults:a}}=e;a&&(0,eI.assignDefaults)(e,t.type),n.block(()=>{for(const o of t.rules)(0,Wu.shouldUseRule)(r,o)&&fg(e,o.keyword,o.definition,t.type)})}function mI(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(vI(e,t),e.opts.allowUnionTypes||gI(e,t),yI(e,e.dataTypes))}function vI(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(n=>{ug(e.dataTypes,n)||Gu(e,`type "${n}" not allowed by context "${e.dataTypes.join(",")}"`)}),bI(e,t)}}function gI(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Gu(e,"use allowUnionTypes to allow union type keyword")}function yI(e,t){const n=e.self.RULES.all;for(const r in n){const a=n[r];if(typeof a=="object"&&(0,Wu.shouldUseRule)(e.schema,a)){const{type:o}=a.definition;o.length&&!o.some(s=>_I(t,s))&&Gu(e,`missing type "${o.join(",")}" for keyword "${r}"`)}}}function _I(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function ug(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function bI(e,t){const n=[];for(const r of e.dataTypes)ug(t,r)?n.push(r):t.includes("integer")&&r==="number"&&n.push("integer");e.dataTypes=n}function Gu(e,t){const n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,xr.checkStrictMode)(e,t,e.opts.strictTypes)}class dg{constructor(t,n,r){if((0,is.validateKeywordUsage)(t,n,r),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=r,this.data=t.data,this.schema=t.schema[r],this.$data=n.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,xr.schemaRefOrVal)(t,this.schema,r,this.$data),this.schemaType=n.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=n,this.$data)this.schemaCode=t.gen.const("vSchema",pg(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,is.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=t.gen.const("_errs",at.default.errors))}result(t,n,r){this.failResult((0,Xe.not)(t),n,r)}failResult(t,n,r){this.gen.if(t),r?r():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,n){this.failResult((0,Xe.not)(t),void 0,n)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:n}=this;this.fail((0,Xe._)`${n} !== undefined && (${(0,Xe.or)(this.invalid$data(),t)})`)}error(t,n,r){if(n){this.setParams(n),this._error(t,r),this.setParams({});return}this._error(t,r)}_error(t,n){(t?Wo.reportExtraError:Wo.reportError)(this,this.def.error,n)}$dataError(){(0,Wo.reportError)(this,this.def.$dataError||Wo.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Wo.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,n){n?Object.assign(this.params,t):this.params=t}block$data(t,n,r=Xe.nil){this.gen.block(()=>{this.check$data(t,r),n()})}check$data(t=Xe.nil,n=Xe.nil){if(!this.$data)return;const{gen:r,schemaCode:a,schemaType:o,def:s}=this;r.if((0,Xe.or)((0,Xe._)`${a} === undefined`,n)),t!==Xe.nil&&r.assign(t,!0),(o.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),t!==Xe.nil&&r.assign(t,!1)),r.else()}invalid$data(){const{gen:t,schemaCode:n,schemaType:r,def:a,it:o}=this;return(0,Xe.or)(s(),i());function s(){if(r.length){if(!(n instanceof Xe.Name))throw new Error("ajv implementation error");const l=Array.isArray(r)?r:[r];return(0,Xe._)`${(0,Gi.checkDataTypes)(l,n,o.opts.strictNumbers,Gi.DataType.Wrong)}`}return Xe.nil}function i(){if(a.validateSchema){const l=t.scopeValue("validate$data",{ref:a.validateSchema});return(0,Xe._)`!${l}(${n})`}return Xe.nil}}subschema(t,n){const r=(0,Cc.getSubschema)(this.it,t);(0,Cc.extendSubschemaData)(r,this.it,t),(0,Cc.extendSubschemaMode)(r,t);const a={...this.it,...r,items:void 0,props:void 0};return iI(a,n),a}mergeEvaluated(t,n){const{it:r,gen:a}=this;r.opts.unevaluated&&(r.props!==!0&&t.props!==void 0&&(r.props=xr.mergeEvaluated.props(a,t.props,r.props,n)),r.items!==!0&&t.items!==void 0&&(r.items=xr.mergeEvaluated.items(a,t.items,r.items,n)))}mergeValidEvaluated(t,n){const{it:r,gen:a}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return a.if(n,()=>this.mergeEvaluated(t,Xe.Name)),!0}}sr.KeywordCxt=dg;function fg(e,t,n,r){const a=new dg(e,n,t);"code"in n?n.code(a,r):a.$data&&n.validate?(0,is.funcKeywordCode)(a,n):"macro"in n?(0,is.macroKeywordCode)(a,n):(n.compile||n.validate)&&(0,is.funcKeywordCode)(a,n)}const wI=/^\/(?:[^~]|~0|~1)*$/,AI=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function pg(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let a,o;if(e==="")return at.default.rootData;if(e[0]==="/"){if(!wI.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);a=e,o=at.default.rootData}else{const c=AI.exec(e);if(!c)throw new Error(`Invalid JSON-pointer: ${e}`);const f=+c[1];if(a=c[2],a==="#"){if(f>=t)throw new Error(l("property/index",f));return r[t-f]}if(f>t)throw new Error(l("data",f));if(o=n[t-f],!a)return o}let s=o;const i=a.split("/");for(const c of i)c&&(o=(0,Xe._)`${o}${(0,Xe.getProperty)((0,xr.unescapeJsonPointer)(c))}`,s=(0,Xe._)`${s} && ${o}`);return s;function l(c,f){return`Cannot access ${c} ${f} levels up, current level is ${t}`}}sr.getData=pg;var Ps={};Object.defineProperty(Ps,"__esModule",{value:!0});class CI extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}Ps.default=CI;var Eo={};Object.defineProperty(Eo,"__esModule",{value:!0});const $c=fn;class $I extends Error{constructor(t,n,r,a){super(a||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,$c.resolveUrl)(t,n,r),this.missingSchema=(0,$c.normalizeId)((0,$c.getFullPath)(t,this.missingRef))}}Eo.default=$I;var Tn={};Object.defineProperty(Tn,"__esModule",{value:!0});Tn.resolveSchema=Tn.getCompilingSchema=Tn.resolveRef=Tn.compileSchema=Tn.SchemaEnv=void 0;const Zn=pt,II=Ps,va=gr,ar=fn,th=Ve,SI=sr;class _l{constructor(t){var n;this.refs={},this.dynamicAnchors={};let r;typeof t.schema=="object"&&(r=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(n=t.baseId)!==null&&n!==void 0?n:(0,ar.normalizeId)(r==null?void 0:r[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=r==null?void 0:r.$async,this.refs={}}}Tn.SchemaEnv=_l;function qu(e){const t=hg.call(this,e);if(t)return t;const n=(0,ar.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:r,lines:a}=this.opts.code,{ownProperties:o}=this.opts,s=new Zn.CodeGen(this.scope,{es5:r,lines:a,ownProperties:o});let i;e.$async&&(i=s.scopeValue("Error",{ref:II.default,code:(0,Zn._)`require("ajv/dist/runtime/validation_error").default`}));const l=s.scopeName("validate");e.validateName=l;const c={gen:s,allErrors:this.opts.allErrors,data:va.default.data,parentData:va.default.parentData,parentDataProperty:va.default.parentDataProperty,dataNames:[va.default.data],dataPathArr:[Zn.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Zn.stringify)(e.schema)}:{ref:e.schema}),validateName:l,ValidationError:i,schema:e.schema,schemaEnv:e,rootId:n,baseId:e.baseId||n,schemaPath:Zn.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Zn._)`""`,opts:this.opts,self:this};let f;try{this._compilations.add(e),(0,SI.validateFunctionCode)(c),s.optimize(this.opts.code.optimize);const u=s.toString();f=`${s.scopeRefs(va.default.scope)}return ${u}`,this.opts.code.process&&(f=this.opts.code.process(f,e));const w=new Function(`${va.default.self}`,`${va.default.scope}`,f)(this,this.scope.get());if(this.scope.value(l,{ref:w}),w.errors=null,w.schema=e.schema,w.schemaEnv=e,e.$async&&(w.$async=!0),this.opts.code.source===!0&&(w.source={validateName:l,validateCode:u,scopeValues:s._values}),this.opts.unevaluated){const{props:b,items:g}=c;w.evaluated={props:b instanceof Zn.Name?void 0:b,items:g instanceof Zn.Name?void 0:g,dynamicProps:b instanceof Zn.Name,dynamicItems:g instanceof Zn.Name},w.source&&(w.source.evaluated=(0,Zn.stringify)(w.evaluated))}return e.validate=w,e}catch(u){throw delete e.validate,delete e.validateName,f&&this.logger.error("Error compiling schema, function code:",f),u}finally{this._compilations.delete(e)}}Tn.compileSchema=qu;function EI(e,t,n){var r;n=(0,ar.resolveUrl)(this.opts.uriResolver,t,n);const a=e.refs[n];if(a)return a;let o=xI.call(this,e,n);if(o===void 0){const s=(r=e.localRefs)===null||r===void 0?void 0:r[n],{schemaId:i}=this.opts;s&&(o=new _l({schema:s,schemaId:i,root:e,baseId:t}))}if(o!==void 0)return e.refs[n]=kI.call(this,o)}Tn.resolveRef=EI;function kI(e){return(0,ar.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:qu.call(this,e)}function hg(e){for(const t of this._compilations)if(TI(t,e))return t}Tn.getCompilingSchema=hg;function TI(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function xI(e,t){let n;for(;typeof(n=this.refs[t])=="string";)t=n;return n||this.schemas[t]||bl.call(this,e,t)}function bl(e,t){const n=this.opts.uriResolver.parse(t),r=(0,ar._getFullPath)(this.opts.uriResolver,n);let a=(0,ar.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===a)return Ic.call(this,n,e);const o=(0,ar.normalizeId)(r),s=this.refs[o]||this.schemas[o];if(typeof s=="string"){const i=bl.call(this,e,s);return typeof(i==null?void 0:i.schema)!="object"?void 0:Ic.call(this,n,i)}if(typeof(s==null?void 0:s.schema)=="object"){if(s.validate||qu.call(this,s),o===(0,ar.normalizeId)(t)){const{schema:i}=s,{schemaId:l}=this.opts,c=i[l];return c&&(a=(0,ar.resolveUrl)(this.opts.uriResolver,a,c)),new _l({schema:i,schemaId:l,root:e,baseId:a})}return Ic.call(this,n,s)}}Tn.resolveSchema=bl;const PI=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Ic(e,{baseId:t,schema:n,root:r}){var a;if(((a=e.fragment)===null||a===void 0?void 0:a[0])!=="/")return;for(const i of e.fragment.slice(1).split("/")){if(typeof n=="boolean")return;const l=n[(0,th.unescapeFragment)(i)];if(l===void 0)return;n=l;const c=typeof n=="object"&&n[this.opts.schemaId];!PI.has(i)&&c&&(t=(0,ar.resolveUrl)(this.opts.uriResolver,t,c))}let o;if(typeof n!="boolean"&&n.$ref&&!(0,th.schemaHasRulesButRef)(n,this.RULES)){const i=(0,ar.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=bl.call(this,r,i)}const{schemaId:s}=this.opts;if(o=o||new _l({schema:n,schemaId:s,root:r,baseId:t}),o.schema!==o.root.schema)return o}const MI="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",NI="Meta-schema for $data reference (JSON AnySchema extension proposal)",OI="object",RI=["$data"],LI={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},DI=!1,FI={$id:MI,description:NI,type:OI,required:RI,properties:LI,additionalProperties:DI};var Ju={},wl={exports:{}};const jI={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};var VI={HEX:jI};const{HEX:BI}=VI;function mg(e){if(gg(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[n]=t;return n?{host:HI(n,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function su(e,t=!1){let n="",r=!0;for(const a of e){if(BI[a]===void 0)return;a!=="0"&&r===!0&&(r=!1),r||(n+=a)}return t&&n.length===0&&(n="0"),n}function UI(e){let t=0;const n={error:!1,address:"",zone:""},r=[],a=[];let o=!1,s=!1,i=!1;function l(){if(a.length){if(o===!1){const c=su(a);if(c!==void 0)r.push(c);else return n.error=!0,!1}a.length=0}return!0}for(let c=0;c<e.length;c++){const f=e[c];if(!(f==="["||f==="]"))if(f===":"){if(s===!0&&(i=!0),!l())break;if(t++,r.push(":"),t>7){n.error=!0;break}c-1>=0&&e[c-1]===":"&&(s=!0);continue}else if(f==="%"){if(!l())break;o=!0}else{a.push(f);continue}}return a.length&&(o?n.zone=a.join(""):i?r.push(a.join("")):r.push(su(a))),n.address=r.join(""),n}function vg(e,t={}){if(gg(e,":")<2)return{host:e,isIPV6:!1};const n=UI(e);if(n.error)return{host:e,isIPV6:!1};{let r=n.address,a=n.address;return n.zone&&(r+="%"+n.zone,a+="%25"+n.zone),{host:r,escapedHost:a,isIPV6:!0}}}function HI(e,t){let n="",r=!0;const a=e.length;for(let o=0;o<a;o++){const s=e[o];s==="0"&&r?(o+1<=a&&e[o+1]===t||o+1===a)&&(n+=s,r=!1):(s===t?r=!0:r=!1,n+=s)}return n}function gg(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}const nh=/^\.\.?\//u,rh=/^\/\.(?:\/|$)/u,ah=/^\/\.\.(?:\/|$)/u,zI=/^\/?(?:.|\n)*?(?=\/|$)/u;function KI(e){const t=[];for(;e.length;)if(e.match(nh))e=e.replace(nh,"");else if(e.match(rh))e=e.replace(rh,"/");else if(e.match(ah))e=e.replace(ah,"/"),t.pop();else if(e==="."||e==="..")e="";else{const n=e.match(zI);if(n){const r=n[0];e=e.slice(r.length),t.push(r)}else throw new Error("Unexpected dot segment condition")}return t.join("")}function WI(e,t){const n=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=n(e.scheme)),e.userinfo!==void 0&&(e.userinfo=n(e.userinfo)),e.host!==void 0&&(e.host=n(e.host)),e.path!==void 0&&(e.path=n(e.path)),e.query!==void 0&&(e.query=n(e.query)),e.fragment!==void 0&&(e.fragment=n(e.fragment)),e}function GI(e,t){const n=[];if(e.userinfo!==void 0&&(n.push(e.userinfo),n.push("@")),e.host!==void 0){let r=unescape(e.host);const a=mg(r);if(a.isIPV4)r=a.host;else{const o=vg(a.host,{isIPV4:!1});o.isIPV6===!0?r=`[${o.escapedHost}]`:r=e.host}n.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var qI={recomposeAuthority:GI,normalizeComponentEncoding:WI,removeDotSegments:KI,normalizeIPv4:mg,normalizeIPv6:vg,stringArrayToHexStripped:su};const JI=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,YI=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function yg(e){return typeof e.secure=="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}function _g(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function bg(e){const t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function QI(e){return e.secure=yg(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function XI(e){if((e.port===(yg(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,n]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function ZI(e,t){if(!e.path)return e.error="URN can not be parsed",e;const n=e.path.match(YI);if(n){const r=t.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];const a=`${r}:${t.nid||e.nid}`,o=Yu[a];e.path=void 0,o&&(e=o.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function eS(e,t){const n=t.scheme||e.scheme||"urn",r=e.nid.toLowerCase(),a=`${n}:${t.nid||r}`,o=Yu[a];o&&(e=o.serialize(e,t));const s=e,i=e.nss;return s.path=`${r||t.nid}:${i}`,t.skipEscape=!0,s}function tS(e,t){const n=e;return n.uuid=n.nss,n.nss=void 0,!t.tolerant&&(!n.uuid||!JI.test(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function nS(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t}const wg={scheme:"http",domainHost:!0,parse:_g,serialize:bg},rS={scheme:"https",domainHost:wg.domainHost,parse:_g,serialize:bg},xi={scheme:"ws",domainHost:!0,parse:QI,serialize:XI},aS={scheme:"wss",domainHost:xi.domainHost,parse:xi.parse,serialize:xi.serialize},oS={scheme:"urn",parse:ZI,serialize:eS,skipNormalize:!0},sS={scheme:"urn:uuid",parse:tS,serialize:nS,skipNormalize:!0},Yu={http:wg,https:rS,ws:xi,wss:aS,urn:oS,"urn:uuid":sS};var iS=Yu;const{normalizeIPv6:lS,normalizeIPv4:cS,removeDotSegments:Xo,recomposeAuthority:uS,normalizeComponentEncoding:mi}=qI,Qu=iS;function dS(e,t){return typeof e=="string"?e=mr(Pr(e,t),t):typeof e=="object"&&(e=Pr(mr(e,t),t)),e}function fS(e,t,n){const r=Object.assign({scheme:"null"},n),a=Ag(Pr(e,r),Pr(t,r),r,!0);return mr(a,{...r,skipEscape:!0})}function Ag(e,t,n,r){const a={};return r||(e=Pr(mr(e,n),n),t=Pr(mr(t,n),n)),n=n||{},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=Xo(t.path||""),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=Xo(t.path||""),a.query=t.query):(t.path?(t.path.charAt(0)==="/"?a.path=Xo(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?a.path="/"+t.path:e.path?a.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:a.path=t.path,a.path=Xo(a.path)),a.query=t.query):(a.path=e.path,t.query!==void 0?a.query=t.query:a.query=e.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function pS(e,t,n){return typeof e=="string"?(e=unescape(e),e=mr(mi(Pr(e,n),!0),{...n,skipEscape:!0})):typeof e=="object"&&(e=mr(mi(e,!0),{...n,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=mr(mi(Pr(t,n),!0),{...n,skipEscape:!0})):typeof t=="object"&&(t=mr(mi(t,!0),{...n,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function mr(e,t){const n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},r=Object.assign({},t),a=[],o=Qu[(r.scheme||n.scheme||"").toLowerCase()];o&&o.serialize&&o.serialize(n,r),n.path!==void 0&&(r.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),n.scheme!==void 0&&(n.path=n.path.split("%3A").join(":")))),r.reference!=="suffix"&&n.scheme&&a.push(n.scheme,":");const s=uS(n,r);if(s!==void 0&&(r.reference!=="suffix"&&a.push("//"),a.push(s),n.path&&n.path.charAt(0)!=="/"&&a.push("/")),n.path!==void 0){let i=n.path;!r.absolutePath&&(!o||!o.absolutePath)&&(i=Xo(i)),s===void 0&&(i=i.replace(/^\/\//u,"/%2F")),a.push(i)}return n.query!==void 0&&a.push("?",n.query),n.fragment!==void 0&&a.push("#",n.fragment),a.join("")}const hS=Array.from({length:127},(e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)));function mS(e){let t=0;for(let n=0,r=e.length;n<r;++n)if(t=e.charCodeAt(n),t>126||hS[t])return!0;return!1}const vS=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Pr(e,t){const n=Object.assign({},t),r={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},a=e.indexOf("%")!==-1;let o=!1;n.reference==="suffix"&&(e=(n.scheme?n.scheme+":":"")+"//"+e);const s=e.match(vS);if(s){if(r.scheme=s[1],r.userinfo=s[3],r.host=s[4],r.port=parseInt(s[5],10),r.path=s[6]||"",r.query=s[7],r.fragment=s[8],isNaN(r.port)&&(r.port=s[5]),r.host){const l=cS(r.host);if(l.isIPV4===!1){const c=lS(l.host,{isIPV4:!1});r.host=c.host.toLowerCase(),o=c.isIPV6}else r.host=l.host,o=!0}r.scheme===void 0&&r.userinfo===void 0&&r.host===void 0&&r.port===void 0&&!r.path&&r.query===void 0?r.reference="same-document":r.scheme===void 0?r.reference="relative":r.fragment===void 0?r.reference="absolute":r.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==r.reference&&(r.error=r.error||"URI is not a "+n.reference+" reference.");const i=Qu[(n.scheme||r.scheme||"").toLowerCase()];if(!n.unicodeSupport&&(!i||!i.unicodeSupport)&&r.host&&(n.domainHost||i&&i.domainHost)&&o===!1&&mS(r.host))try{r.host=URL.domainToASCII(r.host.toLowerCase())}catch(l){r.error=r.error||"Host's domain name can not be converted to ASCII: "+l}(!i||i&&!i.skipNormalize)&&(a&&r.scheme!==void 0&&(r.scheme=unescape(r.scheme)),a&&r.host!==void 0&&(r.host=unescape(r.host)),r.path!==void 0&&r.path.length&&(r.path=escape(unescape(r.path))),r.fragment!==void 0&&r.fragment.length&&(r.fragment=encodeURI(decodeURIComponent(r.fragment)))),i&&i.parse&&i.parse(r,n)}else r.error=r.error||"URI can not be parsed.";return r}const Xu={SCHEMES:Qu,normalize:dS,resolve:fS,resolveComponents:Ag,equal:pS,serialize:mr,parse:Pr};wl.exports=Xu;wl.exports.default=Xu;wl.exports.fastUri=Xu;var gS=wl.exports;Object.defineProperty(Ju,"__esModule",{value:!0});const Cg=gS;Cg.code='require("ajv/dist/runtime/uri").default';Ju.default=Cg;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=sr;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=pt;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=Ps,a=Eo,o=Oa,s=Tn,i=pt,l=fn,c=Jt,f=Ve,u=FI,m=Ju,w=(ye,j)=>new RegExp(ye,j);w.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},A={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},C=200;function y(ye){var j,ue,O,I,M,Q,Me,F,G,J,ae,K,S,k,V,Y,re,ie,$e,ge,Ae,_e,H,pe,de;const me=ye.strict,Ee=(j=ye.code)===null||j===void 0?void 0:j.optimize,De=Ee===!0||Ee===void 0?1:Ee||0,We=(O=(ue=ye.code)===null||ue===void 0?void 0:ue.regExp)!==null&&O!==void 0?O:w,nt=(I=ye.uriResolver)!==null&&I!==void 0?I:m.default;return{strictSchema:(Q=(M=ye.strictSchema)!==null&&M!==void 0?M:me)!==null&&Q!==void 0?Q:!0,strictNumbers:(F=(Me=ye.strictNumbers)!==null&&Me!==void 0?Me:me)!==null&&F!==void 0?F:!0,strictTypes:(J=(G=ye.strictTypes)!==null&&G!==void 0?G:me)!==null&&J!==void 0?J:"log",strictTuples:(K=(ae=ye.strictTuples)!==null&&ae!==void 0?ae:me)!==null&&K!==void 0?K:"log",strictRequired:(k=(S=ye.strictRequired)!==null&&S!==void 0?S:me)!==null&&k!==void 0?k:!1,code:ye.code?{...ye.code,optimize:De,regExp:We}:{optimize:De,regExp:We},loopRequired:(V=ye.loopRequired)!==null&&V!==void 0?V:C,loopEnum:(Y=ye.loopEnum)!==null&&Y!==void 0?Y:C,meta:(re=ye.meta)!==null&&re!==void 0?re:!0,messages:(ie=ye.messages)!==null&&ie!==void 0?ie:!0,inlineRefs:($e=ye.inlineRefs)!==null&&$e!==void 0?$e:!0,schemaId:(ge=ye.schemaId)!==null&&ge!==void 0?ge:"$id",addUsedSchema:(Ae=ye.addUsedSchema)!==null&&Ae!==void 0?Ae:!0,validateSchema:(_e=ye.validateSchema)!==null&&_e!==void 0?_e:!0,validateFormats:(H=ye.validateFormats)!==null&&H!==void 0?H:!0,unicodeRegExp:(pe=ye.unicodeRegExp)!==null&&pe!==void 0?pe:!0,int32range:(de=ye.int32range)!==null&&de!==void 0?de:!0,uriResolver:nt}}class p{constructor(j={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,j=this.opts={...j,...y(j)};const{es5:ue,lines:O}=this.opts.code;this.scope=new i.ValueScope({scope:{},prefixes:g,es5:ue,lines:O}),this.logger=be(j.logger);const I=j.validateFormats;j.validateFormats=!1,this.RULES=(0,o.getRules)(),$.call(this,v,j,"NOT SUPPORTED"),$.call(this,A,j,"DEPRECATED","warn"),this._metaOpts=fe.call(this),j.formats&&z.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),j.keywords&&le.call(this,j.keywords),typeof j.meta=="object"&&this.addMetaSchema(j.meta),B.call(this),j.validateFormats=I}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:j,meta:ue,schemaId:O}=this.opts;let I=u;O==="id"&&(I={...u},I.id=I.$id,delete I.$id),ue&&j&&this.addMetaSchema(I,I[O],!1)}defaultMeta(){const{meta:j,schemaId:ue}=this.opts;return this.opts.defaultMeta=typeof j=="object"?j[ue]||j:void 0}validate(j,ue){let O;if(typeof j=="string"){if(O=this.getSchema(j),!O)throw new Error(`no schema with key or ref "${j}"`)}else O=this.compile(j);const I=O(ue);return"$async"in O||(this.errors=O.errors),I}compile(j,ue){const O=this._addSchema(j,ue);return O.validate||this._compileSchemaEnv(O)}compileAsync(j,ue){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:O}=this.opts;return I.call(this,j,ue);async function I(J,ae){await M.call(this,J.$schema);const K=this._addSchema(J,ae);return K.validate||Q.call(this,K)}async function M(J){J&&!this.getSchema(J)&&await I.call(this,{$ref:J},!0)}async function Q(J){try{return this._compileSchemaEnv(J)}catch(ae){if(!(ae instanceof a.default))throw ae;return Me.call(this,ae),await F.call(this,ae.missingSchema),Q.call(this,J)}}function Me({missingSchema:J,missingRef:ae}){if(this.refs[J])throw new Error(`AnySchema ${J} is loaded but ${ae} cannot be resolved`)}async function F(J){const ae=await G.call(this,J);this.refs[J]||await M.call(this,ae.$schema),this.refs[J]||this.addSchema(ae,J,ue)}async function G(J){const ae=this._loading[J];if(ae)return ae;try{return await(this._loading[J]=O(J))}finally{delete this._loading[J]}}}addSchema(j,ue,O,I=this.opts.validateSchema){if(Array.isArray(j)){for(const Q of j)this.addSchema(Q,void 0,O,I);return this}let M;if(typeof j=="object"){const{schemaId:Q}=this.opts;if(M=j[Q],M!==void 0&&typeof M!="string")throw new Error(`schema ${Q} must be string`)}return ue=(0,l.normalizeId)(ue||M),this._checkUnique(ue),this.schemas[ue]=this._addSchema(j,O,ue,I,!0),this}addMetaSchema(j,ue,O=this.opts.validateSchema){return this.addSchema(j,ue,!0,O),this}validateSchema(j,ue){if(typeof j=="boolean")return!0;let O;if(O=j.$schema,O!==void 0&&typeof O!="string")throw new Error("$schema must be a string");if(O=O||this.opts.defaultMeta||this.defaultMeta(),!O)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const I=this.validate(O,j);if(!I&&ue){const M="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(M);else throw new Error(M)}return I}getSchema(j){let ue;for(;typeof(ue=E.call(this,j))=="string";)j=ue;if(ue===void 0){const{schemaId:O}=this.opts,I=new s.SchemaEnv({schema:{},schemaId:O});if(ue=s.resolveSchema.call(this,I,j),!ue)return;this.refs[j]=ue}return ue.validate||this._compileSchemaEnv(ue)}removeSchema(j){if(j instanceof RegExp)return this._removeAllSchemas(this.schemas,j),this._removeAllSchemas(this.refs,j),this;switch(typeof j){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const ue=E.call(this,j);return typeof ue=="object"&&this._cache.delete(ue.schema),delete this.schemas[j],delete this.refs[j],this}case"object":{const ue=j;this._cache.delete(ue);let O=j[this.opts.schemaId];return O&&(O=(0,l.normalizeId)(O),delete this.schemas[O],delete this.refs[O]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(j){for(const ue of j)this.addKeyword(ue);return this}addKeyword(j,ue){let O;if(typeof j=="string")O=j,typeof ue=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),ue.keyword=O);else if(typeof j=="object"&&ue===void 0){if(ue=j,O=ue.keyword,Array.isArray(O)&&!O.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Re.call(this,O,ue),!ue)return(0,f.eachItem)(O,M=>Je.call(this,M)),this;ce.call(this,ue);const I={...ue,type:(0,c.getJSONTypes)(ue.type),schemaType:(0,c.getJSONTypes)(ue.schemaType)};return(0,f.eachItem)(O,I.type.length===0?M=>Je.call(this,M,I):M=>I.type.forEach(Q=>Je.call(this,M,I,Q))),this}getKeyword(j){const ue=this.RULES.all[j];return typeof ue=="object"?ue.definition:!!ue}removeKeyword(j){const{RULES:ue}=this;delete ue.keywords[j],delete ue.all[j];for(const O of ue.rules){const I=O.rules.findIndex(M=>M.keyword===j);I>=0&&O.rules.splice(I,1)}return this}addFormat(j,ue){return typeof ue=="string"&&(ue=new RegExp(ue)),this.formats[j]=ue,this}errorsText(j=this.errors,{separator:ue=", ",dataVar:O="data"}={}){return!j||j.length===0?"No errors":j.map(I=>`${O}${I.instancePath} ${I.message}`).reduce((I,M)=>I+ue+M)}$dataMetaSchema(j,ue){const O=this.RULES.all;j=JSON.parse(JSON.stringify(j));for(const I of ue){const M=I.split("/").slice(1);let Q=j;for(const Me of M)Q=Q[Me];for(const Me in O){const F=O[Me];if(typeof F!="object")continue;const{$data:G}=F.definition,J=Q[Me];G&&J&&(Q[Me]=ke(J))}}return j}_removeAllSchemas(j,ue){for(const O in j){const I=j[O];(!ue||ue.test(O))&&(typeof I=="string"?delete j[O]:I&&!I.meta&&(this._cache.delete(I.schema),delete j[O]))}}_addSchema(j,ue,O,I=this.opts.validateSchema,M=this.opts.addUsedSchema){let Q;const{schemaId:Me}=this.opts;if(typeof j=="object")Q=j[Me];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof j!="boolean")throw new Error("schema must be object or boolean")}let F=this._cache.get(j);if(F!==void 0)return F;O=(0,l.normalizeId)(Q||O);const G=l.getSchemaRefs.call(this,j,O);return F=new s.SchemaEnv({schema:j,schemaId:Me,meta:ue,baseId:O,localRefs:G}),this._cache.set(F.schema,F),M&&!O.startsWith("#")&&(O&&this._checkUnique(O),this.refs[O]=F),I&&this.validateSchema(j,!0),F}_checkUnique(j){if(this.schemas[j]||this.refs[j])throw new Error(`schema with key or id "${j}" already exists`)}_compileSchemaEnv(j){if(j.meta?this._compileMetaSchema(j):s.compileSchema.call(this,j),!j.validate)throw new Error("ajv implementation error");return j.validate}_compileMetaSchema(j){const ue=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,j)}finally{this.opts=ue}}}p.ValidationError=r.default,p.MissingRefError=a.default,e.default=p;function $(ye,j,ue,O="error"){for(const I in ye){const M=I;M in j&&this.logger[O](`${ue}: option ${I}. ${ye[M]}`)}}function E(ye){return ye=(0,l.normalizeId)(ye),this.schemas[ye]||this.refs[ye]}function B(){const ye=this.opts.schemas;if(ye)if(Array.isArray(ye))this.addSchema(ye);else for(const j in ye)this.addSchema(ye[j],j)}function z(){for(const ye in this.opts.formats){const j=this.opts.formats[ye];j&&this.addFormat(ye,j)}}function le(ye){if(Array.isArray(ye)){this.addVocabulary(ye);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const j in ye){const ue=ye[j];ue.keyword||(ue.keyword=j),this.addKeyword(ue)}}function fe(){const ye={...this.opts};for(const j of b)delete ye[j];return ye}const Le={log(){},warn(){},error(){}};function be(ye){if(ye===!1)return Le;if(ye===void 0)return console;if(ye.log&&ye.warn&&ye.error)return ye;throw new Error("logger must implement log, warn and error methods")}const Ce=/^[a-z_$][a-z0-9_$:-]*$/i;function Re(ye,j){const{RULES:ue}=this;if((0,f.eachItem)(ye,O=>{if(ue.keywords[O])throw new Error(`Keyword ${O} is already defined`);if(!Ce.test(O))throw new Error(`Keyword ${O} has invalid name`)}),!!j&&j.$data&&!("code"in j||"validate"in j))throw new Error('$data keyword must have "code" or "validate" function')}function Je(ye,j,ue){var O;const I=j==null?void 0:j.post;if(ue&&I)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:M}=this;let Q=I?M.post:M.rules.find(({type:F})=>F===ue);if(Q||(Q={type:ue,rules:[]},M.rules.push(Q)),M.keywords[ye]=!0,!j)return;const Me={keyword:ye,definition:{...j,type:(0,c.getJSONTypes)(j.type),schemaType:(0,c.getJSONTypes)(j.schemaType)}};j.before?se.call(this,Q,Me,j.before):Q.rules.push(Me),M.all[ye]=Me,(O=j.implements)===null||O===void 0||O.forEach(F=>this.addKeyword(F))}function se(ye,j,ue){const O=ye.rules.findIndex(I=>I.keyword===ue);O>=0?ye.rules.splice(O,0,j):(ye.rules.push(j),this.logger.warn(`rule ${ue} is not defined`))}function ce(ye){let{metaSchema:j}=ye;j!==void 0&&(ye.$data&&this.opts.$data&&(j=ke(j)),ye.validateSchema=this.compile(j,!0))}const he={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ke(ye){return{anyOf:[ye,he]}}})(Lv);var Zu={},ed={},td={};Object.defineProperty(td,"__esModule",{value:!0});const yS={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};td.default=yS;var Ra={};Object.defineProperty(Ra,"__esModule",{value:!0});Ra.callRef=Ra.getValidate=void 0;const _S=Eo,oh=ft,kn=pt,to=gr,sh=Tn,vi=Ve,bS={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:n,it:r}=e,{baseId:a,schemaEnv:o,validateName:s,opts:i,self:l}=r,{root:c}=o;if((n==="#"||n==="#/")&&a===c.baseId)return u();const f=sh.resolveRef.call(l,c,a,n);if(f===void 0)throw new _S.default(r.opts.uriResolver,a,n);if(f instanceof sh.SchemaEnv)return m(f);return w(f);function u(){if(o===c)return Pi(e,s,o,o.$async);const b=t.scopeValue("root",{ref:c});return Pi(e,(0,kn._)`${b}.validate`,c,c.$async)}function m(b){const g=$g(e,b);Pi(e,g,b,b.$async)}function w(b){const g=t.scopeValue("schema",i.code.source===!0?{ref:b,code:(0,kn.stringify)(b)}:{ref:b}),v=t.name("valid"),A=e.subschema({schema:b,dataTypes:[],schemaPath:kn.nil,topSchemaRef:g,errSchemaPath:n},v);e.mergeEvaluated(A),e.ok(v)}}};function $g(e,t){const{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):(0,kn._)`${n.scopeValue("wrapper",{ref:t})}.validate`}Ra.getValidate=$g;function Pi(e,t,n,r){const{gen:a,it:o}=e,{allErrors:s,schemaEnv:i,opts:l}=o,c=l.passContext?to.default.this:kn.nil;r?f():u();function f(){if(!i.$async)throw new Error("async schema referenced by sync schema");const b=a.let("valid");a.try(()=>{a.code((0,kn._)`await ${(0,oh.callValidateCode)(e,t,c)}`),w(t),s||a.assign(b,!0)},g=>{a.if((0,kn._)`!(${g} instanceof ${o.ValidationError})`,()=>a.throw(g)),m(g),s||a.assign(b,!1)}),e.ok(b)}function u(){e.result((0,oh.callValidateCode)(e,t,c),()=>w(t),()=>m(t))}function m(b){const g=(0,kn._)`${b}.errors`;a.assign(to.default.vErrors,(0,kn._)`${to.default.vErrors} === null ? ${g} : ${to.default.vErrors}.concat(${g})`),a.assign(to.default.errors,(0,kn._)`${to.default.vErrors}.length`)}function w(b){var g;if(!o.opts.unevaluated)return;const v=(g=n==null?void 0:n.validate)===null||g===void 0?void 0:g.evaluated;if(o.props!==!0)if(v&&!v.dynamicProps)v.props!==void 0&&(o.props=vi.mergeEvaluated.props(a,v.props,o.props));else{const A=a.var("props",(0,kn._)`${b}.evaluated.props`);o.props=vi.mergeEvaluated.props(a,A,o.props,kn.Name)}if(o.items!==!0)if(v&&!v.dynamicItems)v.items!==void 0&&(o.items=vi.mergeEvaluated.items(a,v.items,o.items));else{const A=a.var("items",(0,kn._)`${b}.evaluated.items`);o.items=vi.mergeEvaluated.items(a,A,o.items,kn.Name)}}}Ra.callRef=Pi;Ra.default=bS;Object.defineProperty(ed,"__esModule",{value:!0});const wS=td,AS=Ra,CS=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",wS.default,AS.default];ed.default=CS;var nd={},rd={};Object.defineProperty(rd,"__esModule",{value:!0});const qi=pt,Hr=qi.operators,Ji={maximum:{okStr:"<=",ok:Hr.LTE,fail:Hr.GT},minimum:{okStr:">=",ok:Hr.GTE,fail:Hr.LT},exclusiveMaximum:{okStr:"<",ok:Hr.LT,fail:Hr.GTE},exclusiveMinimum:{okStr:">",ok:Hr.GT,fail:Hr.LTE}},$S={message:({keyword:e,schemaCode:t})=>(0,qi.str)`must be ${Ji[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,qi._)`{comparison: ${Ji[e].okStr}, limit: ${t}}`},IS={keyword:Object.keys(Ji),type:"number",schemaType:"number",$data:!0,error:$S,code(e){const{keyword:t,data:n,schemaCode:r}=e;e.fail$data((0,qi._)`${n} ${Ji[t].fail} ${r} || isNaN(${n})`)}};rd.default=IS;var ad={};Object.defineProperty(ad,"__esModule",{value:!0});const ls=pt,SS={message:({schemaCode:e})=>(0,ls.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,ls._)`{multipleOf: ${e}}`},ES={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:SS,code(e){const{gen:t,data:n,schemaCode:r,it:a}=e,o=a.opts.multipleOfPrecision,s=t.let("res"),i=o?(0,ls._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,ls._)`${s} !== parseInt(${s})`;e.fail$data((0,ls._)`(${r} === 0 || (${s} = ${n}/${r}, ${i}))`)}};ad.default=ES;var od={},sd={};Object.defineProperty(sd,"__esModule",{value:!0});function Ig(e){const t=e.length;let n=0,r=0,a;for(;r<t;)n++,a=e.charCodeAt(r++),a>=55296&&a<=56319&&r<t&&(a=e.charCodeAt(r),(a&64512)===56320&&r++);return n}sd.default=Ig;Ig.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(od,"__esModule",{value:!0});const ba=pt,kS=Ve,TS=sd,xS={message({keyword:e,schemaCode:t}){const n=e==="maxLength"?"more":"fewer";return(0,ba.str)`must NOT have ${n} than ${t} characters`},params:({schemaCode:e})=>(0,ba._)`{limit: ${e}}`},PS={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:xS,code(e){const{keyword:t,data:n,schemaCode:r,it:a}=e,o=t==="maxLength"?ba.operators.GT:ba.operators.LT,s=a.opts.unicode===!1?(0,ba._)`${n}.length`:(0,ba._)`${(0,kS.useFunc)(e.gen,TS.default)}(${n})`;e.fail$data((0,ba._)`${s} ${o} ${r}`)}};od.default=PS;var id={};Object.defineProperty(id,"__esModule",{value:!0});const MS=ft,Yi=pt,NS={message:({schemaCode:e})=>(0,Yi.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Yi._)`{pattern: ${e}}`},OS={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:NS,code(e){const{data:t,$data:n,schema:r,schemaCode:a,it:o}=e,s=o.opts.unicodeRegExp?"u":"",i=n?(0,Yi._)`(new RegExp(${a}, ${s}))`:(0,MS.usePattern)(e,r);e.fail$data((0,Yi._)`!${i}.test(${t})`)}};id.default=OS;var ld={};Object.defineProperty(ld,"__esModule",{value:!0});const cs=pt,RS={message({keyword:e,schemaCode:t}){const n=e==="maxProperties"?"more":"fewer";return(0,cs.str)`must NOT have ${n} than ${t} properties`},params:({schemaCode:e})=>(0,cs._)`{limit: ${e}}`},LS={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:RS,code(e){const{keyword:t,data:n,schemaCode:r}=e,a=t==="maxProperties"?cs.operators.GT:cs.operators.LT;e.fail$data((0,cs._)`Object.keys(${n}).length ${a} ${r}`)}};ld.default=LS;var cd={};Object.defineProperty(cd,"__esModule",{value:!0});const Go=ft,us=pt,DS=Ve,FS={message:({params:{missingProperty:e}})=>(0,us.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,us._)`{missingProperty: ${e}}`},jS={keyword:"required",type:"object",schemaType:"array",$data:!0,error:FS,code(e){const{gen:t,schema:n,schemaCode:r,data:a,$data:o,it:s}=e,{opts:i}=s;if(!o&&n.length===0)return;const l=n.length>=i.loopRequired;if(s.allErrors?c():f(),i.strictRequired){const w=e.parentSchema.properties,{definedProperties:b}=e.it;for(const g of n)if((w==null?void 0:w[g])===void 0&&!b.has(g)){const v=s.schemaEnv.baseId+s.errSchemaPath,A=`required property "${g}" is not defined at "${v}" (strictRequired)`;(0,DS.checkStrictMode)(s,A,s.opts.strictRequired)}}function c(){if(l||o)e.block$data(us.nil,u);else for(const w of n)(0,Go.checkReportMissingProp)(e,w)}function f(){const w=t.let("missing");if(l||o){const b=t.let("valid",!0);e.block$data(b,()=>m(w,b)),e.ok(b)}else t.if((0,Go.checkMissingProp)(e,n,w)),(0,Go.reportMissingProp)(e,w),t.else()}function u(){t.forOf("prop",r,w=>{e.setParams({missingProperty:w}),t.if((0,Go.noPropertyInData)(t,a,w,i.ownProperties),()=>e.error())})}function m(w,b){e.setParams({missingProperty:w}),t.forOf(w,r,()=>{t.assign(b,(0,Go.propertyInData)(t,a,w,i.ownProperties)),t.if((0,us.not)(b),()=>{e.error(),t.break()})},us.nil)}}};cd.default=jS;var ud={};Object.defineProperty(ud,"__esModule",{value:!0});const ds=pt,VS={message({keyword:e,schemaCode:t}){const n=e==="maxItems"?"more":"fewer";return(0,ds.str)`must NOT have ${n} than ${t} items`},params:({schemaCode:e})=>(0,ds._)`{limit: ${e}}`},BS={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:VS,code(e){const{keyword:t,data:n,schemaCode:r}=e,a=t==="maxItems"?ds.operators.GT:ds.operators.LT;e.fail$data((0,ds._)`${n}.length ${a} ${r}`)}};ud.default=BS;var dd={},Ms={};Object.defineProperty(Ms,"__esModule",{value:!0});const Sg=Xv;Sg.code='require("ajv/dist/runtime/equal").default';Ms.default=Sg;Object.defineProperty(dd,"__esModule",{value:!0});const Sc=Jt,un=pt,US=Ve,HS=Ms,zS={message:({params:{i:e,j:t}})=>(0,un.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,un._)`{i: ${e}, j: ${t}}`},KS={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:zS,code(e){const{gen:t,data:n,$data:r,schema:a,parentSchema:o,schemaCode:s,it:i}=e;if(!r&&!a)return;const l=t.let("valid"),c=o.items?(0,Sc.getSchemaTypes)(o.items):[];e.block$data(l,f,(0,un._)`${s} === false`),e.ok(l);function f(){const b=t.let("i",(0,un._)`${n}.length`),g=t.let("j");e.setParams({i:b,j:g}),t.assign(l,!0),t.if((0,un._)`${b} > 1`,()=>(u()?m:w)(b,g))}function u(){return c.length>0&&!c.some(b=>b==="object"||b==="array")}function m(b,g){const v=t.name("item"),A=(0,Sc.checkDataTypes)(c,v,i.opts.strictNumbers,Sc.DataType.Wrong),C=t.const("indices",(0,un._)`{}`);t.for((0,un._)`;${b}--;`,()=>{t.let(v,(0,un._)`${n}[${b}]`),t.if(A,(0,un._)`continue`),c.length>1&&t.if((0,un._)`typeof ${v} == "string"`,(0,un._)`${v} += "_"`),t.if((0,un._)`typeof ${C}[${v}] == "number"`,()=>{t.assign(g,(0,un._)`${C}[${v}]`),e.error(),t.assign(l,!1).break()}).code((0,un._)`${C}[${v}] = ${b}`)})}function w(b,g){const v=(0,US.useFunc)(t,HS.default),A=t.name("outer");t.label(A).for((0,un._)`;${b}--;`,()=>t.for((0,un._)`${g} = ${b}; ${g}--;`,()=>t.if((0,un._)`${v}(${n}[${b}], ${n}[${g}])`,()=>{e.error(),t.assign(l,!1).break(A)})))}}};dd.default=KS;var fd={};Object.defineProperty(fd,"__esModule",{value:!0});const iu=pt,WS=Ve,GS=Ms,qS={message:"must be equal to constant",params:({schemaCode:e})=>(0,iu._)`{allowedValue: ${e}}`},JS={keyword:"const",$data:!0,error:qS,code(e){const{gen:t,data:n,$data:r,schemaCode:a,schema:o}=e;r||o&&typeof o=="object"?e.fail$data((0,iu._)`!${(0,WS.useFunc)(t,GS.default)}(${n}, ${a})`):e.fail((0,iu._)`${o} !== ${n}`)}};fd.default=JS;var pd={};Object.defineProperty(pd,"__esModule",{value:!0});const Zo=pt,YS=Ve,QS=Ms,XS={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Zo._)`{allowedValues: ${e}}`},ZS={keyword:"enum",schemaType:"array",$data:!0,error:XS,code(e){const{gen:t,data:n,$data:r,schema:a,schemaCode:o,it:s}=e;if(!r&&a.length===0)throw new Error("enum must have non-empty array");const i=a.length>=s.opts.loopEnum;let l;const c=()=>l??(l=(0,YS.useFunc)(t,QS.default));let f;if(i||r)f=t.let("valid"),e.block$data(f,u);else{if(!Array.isArray(a))throw new Error("ajv implementation error");const w=t.const("vSchema",o);f=(0,Zo.or)(...a.map((b,g)=>m(w,g)))}e.pass(f);function u(){t.assign(f,!1),t.forOf("v",o,w=>t.if((0,Zo._)`${c()}(${n}, ${w})`,()=>t.assign(f,!0).break()))}function m(w,b){const g=a[b];return typeof g=="object"&&g!==null?(0,Zo._)`${c()}(${n}, ${w}[${b}])`:(0,Zo._)`${n} === ${g}`}}};pd.default=ZS;Object.defineProperty(nd,"__esModule",{value:!0});const eE=rd,tE=ad,nE=od,rE=id,aE=ld,oE=cd,sE=ud,iE=dd,lE=fd,cE=pd,uE=[eE.default,tE.default,nE.default,rE.default,aE.default,oE.default,sE.default,iE.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},lE.default,cE.default];nd.default=uE;var hd={},ko={};Object.defineProperty(ko,"__esModule",{value:!0});ko.validateAdditionalItems=void 0;const wa=pt,lu=Ve,dE={message:({params:{len:e}})=>(0,wa.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,wa._)`{limit: ${e}}`},fE={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:dE,code(e){const{parentSchema:t,it:n}=e,{items:r}=t;if(!Array.isArray(r)){(0,lu.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}Eg(e,r)}};function Eg(e,t){const{gen:n,schema:r,data:a,keyword:o,it:s}=e;s.items=!0;const i=n.const("len",(0,wa._)`${a}.length`);if(r===!1)e.setParams({len:t.length}),e.pass((0,wa._)`${i} <= ${t.length}`);else if(typeof r=="object"&&!(0,lu.alwaysValidSchema)(s,r)){const c=n.var("valid",(0,wa._)`${i} <= ${t.length}`);n.if((0,wa.not)(c),()=>l(c)),e.ok(c)}function l(c){n.forRange("i",t.length,i,f=>{e.subschema({keyword:o,dataProp:f,dataPropType:lu.Type.Num},c),s.allErrors||n.if((0,wa.not)(c),()=>n.break())})}}ko.validateAdditionalItems=Eg;ko.default=fE;var md={},To={};Object.defineProperty(To,"__esModule",{value:!0});To.validateTuple=void 0;const ih=pt,Mi=Ve,pE=ft,hE={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:n}=e;if(Array.isArray(t))return kg(e,"additionalItems",t);n.items=!0,!(0,Mi.alwaysValidSchema)(n,t)&&e.ok((0,pE.validateArray)(e))}};function kg(e,t,n=e.schema){const{gen:r,parentSchema:a,data:o,keyword:s,it:i}=e;f(a),i.opts.unevaluated&&n.length&&i.items!==!0&&(i.items=Mi.mergeEvaluated.items(r,n.length,i.items));const l=r.name("valid"),c=r.const("len",(0,ih._)`${o}.length`);n.forEach((u,m)=>{(0,Mi.alwaysValidSchema)(i,u)||(r.if((0,ih._)`${c} > ${m}`,()=>e.subschema({keyword:s,schemaProp:m,dataProp:m},l)),e.ok(l))});function f(u){const{opts:m,errSchemaPath:w}=i,b=n.length,g=b===u.minItems&&(b===u.maxItems||u[t]===!1);if(m.strictTuples&&!g){const v=`"${s}" is ${b}-tuple, but minItems or maxItems/${t} are not specified or different at path "${w}"`;(0,Mi.checkStrictMode)(i,v,m.strictTuples)}}}To.validateTuple=kg;To.default=hE;Object.defineProperty(md,"__esModule",{value:!0});const mE=To,vE={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,mE.validateTuple)(e,"items")};md.default=vE;var vd={};Object.defineProperty(vd,"__esModule",{value:!0});const lh=pt,gE=Ve,yE=ft,_E=ko,bE={message:({params:{len:e}})=>(0,lh.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,lh._)`{limit: ${e}}`},wE={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:bE,code(e){const{schema:t,parentSchema:n,it:r}=e,{prefixItems:a}=n;r.items=!0,!(0,gE.alwaysValidSchema)(r,t)&&(a?(0,_E.validateAdditionalItems)(e,a):e.ok((0,yE.validateArray)(e)))}};vd.default=wE;var gd={};Object.defineProperty(gd,"__esModule",{value:!0});const Gn=pt,gi=Ve,AE={message:({params:{min:e,max:t}})=>t===void 0?(0,Gn.str)`must contain at least ${e} valid item(s)`:(0,Gn.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Gn._)`{minContains: ${e}}`:(0,Gn._)`{minContains: ${e}, maxContains: ${t}}`},CE={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:AE,code(e){const{gen:t,schema:n,parentSchema:r,data:a,it:o}=e;let s,i;const{minContains:l,maxContains:c}=r;o.opts.next?(s=l===void 0?1:l,i=c):s=1;const f=t.const("len",(0,Gn._)`${a}.length`);if(e.setParams({min:s,max:i}),i===void 0&&s===0){(0,gi.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(i!==void 0&&s>i){(0,gi.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,gi.alwaysValidSchema)(o,n)){let g=(0,Gn._)`${f} >= ${s}`;i!==void 0&&(g=(0,Gn._)`${g} && ${f} <= ${i}`),e.pass(g);return}o.items=!0;const u=t.name("valid");i===void 0&&s===1?w(u,()=>t.if(u,()=>t.break())):s===0?(t.let(u,!0),i!==void 0&&t.if((0,Gn._)`${a}.length > 0`,m)):(t.let(u,!1),m()),e.result(u,()=>e.reset());function m(){const g=t.name("_valid"),v=t.let("count",0);w(g,()=>t.if(g,()=>b(v)))}function w(g,v){t.forRange("i",0,f,A=>{e.subschema({keyword:"contains",dataProp:A,dataPropType:gi.Type.Num,compositeRule:!0},g),v()})}function b(g){t.code((0,Gn._)`${g}++`),i===void 0?t.if((0,Gn._)`${g} >= ${s}`,()=>t.assign(u,!0).break()):(t.if((0,Gn._)`${g} > ${i}`,()=>t.assign(u,!1).break()),s===1?t.assign(u,!0):t.if((0,Gn._)`${g} >= ${s}`,()=>t.assign(u,!0)))}}};gd.default=CE;var Tg={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=pt,n=Ve,r=ft;e.error={message:({params:{property:l,depsCount:c,deps:f}})=>{const u=c===1?"property":"properties";return(0,t.str)`must have ${u} ${f} when property ${l} is present`},params:({params:{property:l,depsCount:c,deps:f,missingProperty:u}})=>(0,t._)`{property: ${l},
    missingProperty: ${u},
    depsCount: ${c},
    deps: ${f}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(l){const[c,f]=o(l);s(l,c),i(l,f)}};function o({schema:l}){const c={},f={};for(const u in l){if(u==="__proto__")continue;const m=Array.isArray(l[u])?c:f;m[u]=l[u]}return[c,f]}function s(l,c=l.schema){const{gen:f,data:u,it:m}=l;if(Object.keys(c).length===0)return;const w=f.let("missing");for(const b in c){const g=c[b];if(g.length===0)continue;const v=(0,r.propertyInData)(f,u,b,m.opts.ownProperties);l.setParams({property:b,depsCount:g.length,deps:g.join(", ")}),m.allErrors?f.if(v,()=>{for(const A of g)(0,r.checkReportMissingProp)(l,A)}):(f.if((0,t._)`${v} && (${(0,r.checkMissingProp)(l,g,w)})`),(0,r.reportMissingProp)(l,w),f.else())}}e.validatePropertyDeps=s;function i(l,c=l.schema){const{gen:f,data:u,keyword:m,it:w}=l,b=f.name("valid");for(const g in c)(0,n.alwaysValidSchema)(w,c[g])||(f.if((0,r.propertyInData)(f,u,g,w.opts.ownProperties),()=>{const v=l.subschema({keyword:m,schemaProp:g},b);l.mergeValidEvaluated(v,b)},()=>f.var(b,!0)),l.ok(b))}e.validateSchemaDeps=i,e.default=a})(Tg);var yd={};Object.defineProperty(yd,"__esModule",{value:!0});const xg=pt,$E=Ve,IE={message:"property name must be valid",params:({params:e})=>(0,xg._)`{propertyName: ${e.propertyName}}`},SE={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:IE,code(e){const{gen:t,schema:n,data:r,it:a}=e;if((0,$E.alwaysValidSchema)(a,n))return;const o=t.name("valid");t.forIn("key",r,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),t.if((0,xg.not)(o),()=>{e.error(!0),a.allErrors||t.break()})}),e.ok(o)}};yd.default=SE;var Al={};Object.defineProperty(Al,"__esModule",{value:!0});const yi=ft,er=pt,EE=gr,_i=Ve,kE={message:"must NOT have additional properties",params:({params:e})=>(0,er._)`{additionalProperty: ${e.additionalProperty}}`},TE={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:kE,code(e){const{gen:t,schema:n,parentSchema:r,data:a,errsCount:o,it:s}=e;if(!o)throw new Error("ajv implementation error");const{allErrors:i,opts:l}=s;if(s.props=!0,l.removeAdditional!=="all"&&(0,_i.alwaysValidSchema)(s,n))return;const c=(0,yi.allSchemaProperties)(r.properties),f=(0,yi.allSchemaProperties)(r.patternProperties);u(),e.ok((0,er._)`${o} === ${EE.default.errors}`);function u(){t.forIn("key",a,v=>{!c.length&&!f.length?b(v):t.if(m(v),()=>b(v))})}function m(v){let A;if(c.length>8){const C=(0,_i.schemaRefOrVal)(s,r.properties,"properties");A=(0,yi.isOwnProperty)(t,C,v)}else c.length?A=(0,er.or)(...c.map(C=>(0,er._)`${v} === ${C}`)):A=er.nil;return f.length&&(A=(0,er.or)(A,...f.map(C=>(0,er._)`${(0,yi.usePattern)(e,C)}.test(${v})`))),(0,er.not)(A)}function w(v){t.code((0,er._)`delete ${a}[${v}]`)}function b(v){if(l.removeAdditional==="all"||l.removeAdditional&&n===!1){w(v);return}if(n===!1){e.setParams({additionalProperty:v}),e.error(),i||t.break();return}if(typeof n=="object"&&!(0,_i.alwaysValidSchema)(s,n)){const A=t.name("valid");l.removeAdditional==="failing"?(g(v,A,!1),t.if((0,er.not)(A),()=>{e.reset(),w(v)})):(g(v,A),i||t.if((0,er.not)(A),()=>t.break()))}}function g(v,A,C){const y={keyword:"additionalProperties",dataProp:v,dataPropType:_i.Type.Str};C===!1&&Object.assign(y,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(y,A)}}};Al.default=TE;var _d={};Object.defineProperty(_d,"__esModule",{value:!0});const xE=sr,ch=ft,Ec=Ve,uh=Al,PE={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,parentSchema:r,data:a,it:o}=e;o.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&uh.default.code(new xE.KeywordCxt(o,uh.default,"additionalProperties"));const s=(0,ch.allSchemaProperties)(n);for(const u of s)o.definedProperties.add(u);o.opts.unevaluated&&s.length&&o.props!==!0&&(o.props=Ec.mergeEvaluated.props(t,(0,Ec.toHash)(s),o.props));const i=s.filter(u=>!(0,Ec.alwaysValidSchema)(o,n[u]));if(i.length===0)return;const l=t.name("valid");for(const u of i)c(u)?f(u):(t.if((0,ch.propertyInData)(t,a,u,o.opts.ownProperties)),f(u),o.allErrors||t.else().var(l,!0),t.endIf()),e.it.definedProperties.add(u),e.ok(l);function c(u){return o.opts.useDefaults&&!o.compositeRule&&n[u].default!==void 0}function f(u){e.subschema({keyword:"properties",schemaProp:u,dataProp:u},l)}}};_d.default=PE;var bd={};Object.defineProperty(bd,"__esModule",{value:!0});const dh=ft,bi=pt,fh=Ve,ph=Ve,ME={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,data:r,parentSchema:a,it:o}=e,{opts:s}=o,i=(0,dh.allSchemaProperties)(n),l=i.filter(g=>(0,fh.alwaysValidSchema)(o,n[g]));if(i.length===0||l.length===i.length&&(!o.opts.unevaluated||o.props===!0))return;const c=s.strictSchema&&!s.allowMatchingProperties&&a.properties,f=t.name("valid");o.props!==!0&&!(o.props instanceof bi.Name)&&(o.props=(0,ph.evaluatedPropsToName)(t,o.props));const{props:u}=o;m();function m(){for(const g of i)c&&w(g),o.allErrors?b(g):(t.var(f,!0),b(g),t.if(f))}function w(g){for(const v in c)new RegExp(g).test(v)&&(0,fh.checkStrictMode)(o,`property ${v} matches pattern ${g} (use allowMatchingProperties)`)}function b(g){t.forIn("key",r,v=>{t.if((0,bi._)`${(0,dh.usePattern)(e,g)}.test(${v})`,()=>{const A=l.includes(g);A||e.subschema({keyword:"patternProperties",schemaProp:g,dataProp:v,dataPropType:ph.Type.Str},f),o.opts.unevaluated&&u!==!0?t.assign((0,bi._)`${u}[${v}]`,!0):!A&&!o.allErrors&&t.if((0,bi.not)(f),()=>t.break())})})}}};bd.default=ME;var wd={};Object.defineProperty(wd,"__esModule",{value:!0});const NE=Ve,OE={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:n,it:r}=e;if((0,NE.alwaysValidSchema)(r,n)){e.fail();return}const a=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};wd.default=OE;var Ad={};Object.defineProperty(Ad,"__esModule",{value:!0});const RE=ft,LE={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:RE.validateUnion,error:{message:"must match a schema in anyOf"}};Ad.default=LE;var Cd={};Object.defineProperty(Cd,"__esModule",{value:!0});const Ni=pt,DE=Ve,FE={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Ni._)`{passingSchemas: ${e.passing}}`},jE={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:FE,code(e){const{gen:t,schema:n,parentSchema:r,it:a}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(a.opts.discriminator&&r.discriminator)return;const o=n,s=t.let("valid",!1),i=t.let("passing",null),l=t.name("_valid");e.setParams({passing:i}),t.block(c),e.result(s,()=>e.reset(),()=>e.error(!0));function c(){o.forEach((f,u)=>{let m;(0,DE.alwaysValidSchema)(a,f)?t.var(l,!0):m=e.subschema({keyword:"oneOf",schemaProp:u,compositeRule:!0},l),u>0&&t.if((0,Ni._)`${l} && ${s}`).assign(s,!1).assign(i,(0,Ni._)`[${i}, ${u}]`).else(),t.if(l,()=>{t.assign(s,!0),t.assign(i,u),m&&e.mergeEvaluated(m,Ni.Name)})})}}};Cd.default=jE;var $d={};Object.defineProperty($d,"__esModule",{value:!0});const VE=Ve,BE={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:n,it:r}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");const a=t.name("valid");n.forEach((o,s)=>{if((0,VE.alwaysValidSchema)(r,o))return;const i=e.subschema({keyword:"allOf",schemaProp:s},a);e.ok(a),e.mergeEvaluated(i)})}};$d.default=BE;var Id={};Object.defineProperty(Id,"__esModule",{value:!0});const Qi=pt,Pg=Ve,UE={message:({params:e})=>(0,Qi.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Qi._)`{failingKeyword: ${e.ifClause}}`},HE={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:UE,code(e){const{gen:t,parentSchema:n,it:r}=e;n.then===void 0&&n.else===void 0&&(0,Pg.checkStrictMode)(r,'"if" without "then" and "else" is ignored');const a=hh(r,"then"),o=hh(r,"else");if(!a&&!o)return;const s=t.let("valid",!0),i=t.name("_valid");if(l(),e.reset(),a&&o){const f=t.let("ifClause");e.setParams({ifClause:f}),t.if(i,c("then",f),c("else",f))}else a?t.if(i,c("then")):t.if((0,Qi.not)(i),c("else"));e.pass(s,()=>e.error(!0));function l(){const f=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},i);e.mergeEvaluated(f)}function c(f,u){return()=>{const m=e.subschema({keyword:f},i);t.assign(s,i),e.mergeValidEvaluated(m,s),u?t.assign(u,(0,Qi._)`${f}`):e.setParams({ifClause:f})}}}};function hh(e,t){const n=e.schema[t];return n!==void 0&&!(0,Pg.alwaysValidSchema)(e,n)}Id.default=HE;var Sd={};Object.defineProperty(Sd,"__esModule",{value:!0});const zE=Ve,KE={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){t.if===void 0&&(0,zE.checkStrictMode)(n,`"${e}" without "if" is ignored`)}};Sd.default=KE;Object.defineProperty(hd,"__esModule",{value:!0});const WE=ko,GE=md,qE=To,JE=vd,YE=gd,QE=Tg,XE=yd,ZE=Al,ek=_d,tk=bd,nk=wd,rk=Ad,ak=Cd,ok=$d,sk=Id,ik=Sd;function lk(e=!1){const t=[nk.default,rk.default,ak.default,ok.default,sk.default,ik.default,XE.default,ZE.default,QE.default,ek.default,tk.default];return e?t.push(GE.default,JE.default):t.push(WE.default,qE.default),t.push(YE.default),t}hd.default=lk;var Ed={},kd={};Object.defineProperty(kd,"__esModule",{value:!0});const Ut=pt,ck={message:({schemaCode:e})=>(0,Ut.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Ut._)`{format: ${e}}`},uk={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:ck,code(e,t){const{gen:n,data:r,$data:a,schema:o,schemaCode:s,it:i}=e,{opts:l,errSchemaPath:c,schemaEnv:f,self:u}=i;if(!l.validateFormats)return;a?m():w();function m(){const b=n.scopeValue("formats",{ref:u.formats,code:l.code.formats}),g=n.const("fDef",(0,Ut._)`${b}[${s}]`),v=n.let("fType"),A=n.let("format");n.if((0,Ut._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>n.assign(v,(0,Ut._)`${g}.type || "string"`).assign(A,(0,Ut._)`${g}.validate`),()=>n.assign(v,(0,Ut._)`"string"`).assign(A,g)),e.fail$data((0,Ut.or)(C(),y()));function C(){return l.strictSchema===!1?Ut.nil:(0,Ut._)`${s} && !${A}`}function y(){const p=f.$async?(0,Ut._)`(${g}.async ? await ${A}(${r}) : ${A}(${r}))`:(0,Ut._)`${A}(${r})`,$=(0,Ut._)`(typeof ${A} == "function" ? ${p} : ${A}.test(${r}))`;return(0,Ut._)`${A} && ${A} !== true && ${v} === ${t} && !${$}`}}function w(){const b=u.formats[o];if(!b){C();return}if(b===!0)return;const[g,v,A]=y(b);g===t&&e.pass(p());function C(){if(l.strictSchema===!1){u.logger.warn($());return}throw new Error($());function $(){return`unknown format "${o}" ignored in schema at path "${c}"`}}function y($){const E=$ instanceof RegExp?(0,Ut.regexpCode)($):l.code.formats?(0,Ut._)`${l.code.formats}${(0,Ut.getProperty)(o)}`:void 0,B=n.scopeValue("formats",{key:o,ref:$,code:E});return typeof $=="object"&&!($ instanceof RegExp)?[$.type||"string",$.validate,(0,Ut._)`${B}.validate`]:["string",$,B]}function p(){if(typeof b=="object"&&!(b instanceof RegExp)&&b.async){if(!f.$async)throw new Error("async format in sync schema");return(0,Ut._)`await ${A}(${r})`}return typeof v=="function"?(0,Ut._)`${A}(${r})`:(0,Ut._)`${A}.test(${r})`}}}};kd.default=uk;Object.defineProperty(Ed,"__esModule",{value:!0});const dk=kd,fk=[dk.default];Ed.default=fk;var $o={};Object.defineProperty($o,"__esModule",{value:!0});$o.contentVocabulary=$o.metadataVocabulary=void 0;$o.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];$o.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(Zu,"__esModule",{value:!0});const pk=ed,hk=nd,mk=hd,vk=Ed,mh=$o,gk=[pk.default,hk.default,(0,mk.default)(),vk.default,mh.metadataVocabulary,mh.contentVocabulary];Zu.default=gk;var Td={},Cl={};Object.defineProperty(Cl,"__esModule",{value:!0});Cl.DiscrError=void 0;var vh;(function(e){e.Tag="tag",e.Mapping="mapping"})(vh||(Cl.DiscrError=vh={}));Object.defineProperty(Td,"__esModule",{value:!0});const ao=pt,cu=Cl,gh=Tn,yk=Eo,_k=Ve,bk={message:({params:{discrError:e,tagName:t}})=>e===cu.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>(0,ao._)`{error: ${e}, tag: ${n}, tagValue: ${t}}`},wk={keyword:"discriminator",type:"object",schemaType:"object",error:bk,code(e){const{gen:t,data:n,schema:r,parentSchema:a,it:o}=e,{oneOf:s}=a;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");const i=r.propertyName;if(typeof i!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");const l=t.let("valid",!1),c=t.const("tag",(0,ao._)`${n}${(0,ao.getProperty)(i)}`);t.if((0,ao._)`typeof ${c} == "string"`,()=>f(),()=>e.error(!1,{discrError:cu.DiscrError.Tag,tag:c,tagName:i})),e.ok(l);function f(){const w=m();t.if(!1);for(const b in w)t.elseIf((0,ao._)`${c} === ${b}`),t.assign(l,u(w[b]));t.else(),e.error(!1,{discrError:cu.DiscrError.Mapping,tag:c,tagName:i}),t.endIf()}function u(w){const b=t.name("valid"),g=e.subschema({keyword:"oneOf",schemaProp:w},b);return e.mergeEvaluated(g,ao.Name),b}function m(){var w;const b={},g=A(a);let v=!0;for(let p=0;p<s.length;p++){let $=s[p];if($!=null&&$.$ref&&!(0,_k.schemaHasRulesButRef)($,o.self.RULES)){const B=$.$ref;if($=gh.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,B),$ instanceof gh.SchemaEnv&&($=$.schema),$===void 0)throw new yk.default(o.opts.uriResolver,o.baseId,B)}const E=(w=$==null?void 0:$.properties)===null||w===void 0?void 0:w[i];if(typeof E!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${i}"`);v=v&&(g||A($)),C(E,p)}if(!v)throw new Error(`discriminator: "${i}" must be required`);return b;function A({required:p}){return Array.isArray(p)&&p.includes(i)}function C(p,$){if(p.const)y(p.const,$);else if(p.enum)for(const E of p.enum)y(E,$);else throw new Error(`discriminator: "properties/${i}" must have "const" or "enum"`)}function y(p,$){if(typeof p!="string"||p in b)throw new Error(`discriminator: "${i}" values must be unique strings`);b[p]=$}}}};Td.default=wk;const Ak="http://json-schema.org/draft-07/schema#",Ck="http://json-schema.org/draft-07/schema#",$k="Core schema meta-schema",Ik={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},Sk=["object","boolean"],Ek={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},kk={$schema:Ak,$id:Ck,title:$k,definitions:Ik,type:Sk,properties:Ek,default:!0};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const n=Lv,r=Zu,a=Td,o=kk,s=["/properties"],i="http://json-schema.org/draft-07/schema";class l extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(o,s):o;this.addMetaSchema(b,i,!1),this.refs["http://json-schema.org/schema"]=i}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(i)?i:void 0)}}t.Ajv=l,e.exports=t=l,e.exports.Ajv=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var c=sr;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var f=pt;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var u=Ps;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return u.default}});var m=Eo;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(tu,tu.exports);var Tk=tu.exports;const xk=Rv(Tk);var Pk=(e=>(e.WriterWorkflowKey="writer#workflowKey",e.CssClassnames="cssClassnames",e.CssSize="cssSize",e.Uri="uri",e.Uuid="uuid",e))(Pk||{});function Rn(e){return`https://dev.writer.com/framework/${encodeURIComponent(e)}.json`}function Y3(e){return{$id:Rn(e.join(",")),type:"string",enum:e}}function fs(e,t){return{$id:Rn(`between-${e}-${t}`),type:"number",minimum:e,maximum:t}}const Mk={$id:Rn("cssClassname"),type:"string",format:"cssClassnames"},Mg={$id:Rn("cssSize"),type:"string",format:"cssSize"},Ng={$id:Rn("arrayOfString"),type:"array",items:{type:"string"}},xd=fs(-90,90),Pd=fs(-180,180),Nk={$id:Rn("gpsMarker"),type:"object",properties:{name:{type:"string"},lat:xd,lng:Pd},required:["lat","lng","name"],additionalProperties:!1},Og={$id:Rn("gpsMarkers"),type:"array",items:Nk},La={$id:Rn("objectRecordNotNested"),type:"object",patternProperties:{"^.*$":{type:["string","number","boolean"]}},additionalProperties:!0},Ok={$id:Rn("anotatedText"),type:"array",items:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},Rk={$id:Rn("repeaterObject"),oneOf:[{type:"object",patternProperties:{"^.*$":{type:"object"}},additionalProperties:!0},{type:"array",items:{type:"object"}}]},Lk={$id:Rn("chatBotMessage"),type:"object",properties:{role:{type:"string"},content:{type:"string"},tools:{type:"array",items:{type:"object",properties:{type:{type:"string"}},required:["type"],additionalProperties:!0}}},required:["role"],additionalProperties:!0},Dk={$id:Rn("chatBotMessages"),type:"array",items:Lk},Nn={$id:Rn("positiveNumber"),type:"number",minimum:0},Rg={$id:Rn("uri"),type:"string",format:"uri"},Oi=new xk({strict:!0,allowUnionTypes:!0});function Q3(e){return(e==null?void 0:e.$id)===void 0?Oi.compile(e):Oi.getSchema(e.$id)||Oi.compile(e)}const Fk={uri:{format:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,errorMessage:"must be a valid URL"},uuid:{format:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,errorMessage:"must be a valid UUID"},cssClassnames:{format:/(^\s*[a-zA-Z_][-\w]*(\s+[a-zA-Z_][-\w]*)*\s*$)|(^$)/,errorMessage:"must be a valid list of CSS classes separated by spaces"},cssSize:{format:/(^([+-]?\d*\.?\d+)(px|em|%|vh|vw|rem|pt|pc|in|cm|mm|ex|ch|vmin|vmax|fr)$)|(^$)/,errorMessage:"must be a valid CSS size"},"writer#workflowKey":{format:{type:"string",validate:e=>{const t=Z(ee.core);return t?t.getComponents().filter(r=>r.type==="workflows_workflow").map(r=>r.content.key).includes(e):!0}},errorMessage:"must correspond to an existing workflow key"}};Object.entries(Fk).map(([e,t])=>Oi.addFormat(e,t.format));const en={name:"Accent",type:L.Color,category:Be.Style,applyStyleVariable:!0},Ft={name:"Primary text",type:L.Color,category:Be.Style,applyStyleVariable:!0},Ln={name:"Secondary text",type:L.Color,category:Be.Style,applyStyleVariable:!0},Lg={name:"Emptiness",desc:"Page background color",type:L.Color,category:Be.Style,applyStyleVariable:!0},yr={name:"Container background",type:L.Color,category:Be.Style,applyStyleVariable:!0},xo={name:"Container shadow",type:L.Shadow,category:Be.Style,applyStyleVariable:!0},Gt={name:"Separator",type:L.Color,category:Be.Style,applyStyleVariable:!0},_r={name:"Button",type:L.Color,category:Be.Style,applyStyleVariable:!0},br={name:"Button text",type:L.Color,category:Be.Style,applyStyleVariable:!0},sa={name:"Button shadow",type:L.Shadow,category:Be.Style,applyStyleVariable:!0},et={name:"Custom CSS classes",type:L.Text,category:Be.Style,desc:"CSS classes, separated by spaces. You can define classes in custom stylesheets.",validator:Mk},jk={name:"Content width",type:L.Width,default:"100%",category:Be.Style,desc:"Configure content width using CSS units, e.g. 100px, 50%, 10vw, etc.",validator:Mg},Po={name:"Content alignment (H)",type:L.HAlign,default:"unset",category:Be.Style},Md={name:"Content alignment (V)",type:L.VAlign,default:"unset",category:Be.Style},Mo={name:"Padding",type:L.Padding,default:"0",category:Be.Style},Dg={yes:"Yes",no:"No"},Nd={name:"Collapsible",default:"no",type:L.Text,options:Dg,category:Be.Style},$l={name:"Start collapsed",type:L.Text,category:Be.Style,default:"no",options:Dg,desc:"Only applied when the component is collapsible."},Vk=Object.freeze(Object.defineProperty({__proto__:null,accentColor:en,buttonColor:_r,buttonShadow:sa,buttonTextColor:br,containerBackgroundColor:yr,containerShadow:xo,contentHAlign:Po,contentPadding:Mo,contentVAlign:Md,contentWidth:jk,cssClasses:et,emptinessColor:Lg,isCollapsible:Nd,primaryTextColor:Ft,secondaryTextColor:Ln,separatorColor:Gt,startCollapsed:$l},Symbol.toStringTag,{value:"Module"})),Bk=["aria-invalid"],Uk={class:"material-symbols-outlined"},Hk=["aria-invalid"],zk=Pe({inheritAttrs:!1,__name:"WdsTextInput",props:Ua({leftIcon:{type:String,required:!1,default:void 0},invalid:{type:Boolean,required:!1},variant:{type:String,default:void 0}},{modelValue:{type:String},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:t}){const n=oa(e,"modelValue");t({focus:i,getSelection:s,value:n,setSelectionEnd:o,setSelectionStart:a});const r=oe();function a(l){r.value&&(r.value.selectionStart=l)}function o(l){r.value&&(r.value.selectionEnd=l)}function s(){var l,c;return{selectionStart:(l=r.value)==null?void 0:l.selectionStart,selectionEnd:(c=r.value)==null?void 0:c.selectionEnd}}function i(){var l;(l=r.value)==null||l.focus()}return(l,c)=>e.leftIcon?(T(),R("div",os({key:0,class:["WdsTextInput WdsTextInput--leftIcon colorTransformer",{"WdsTextInput--ghost":e.variant==="ghost"}]},l.$attrs,{"aria-invalid":e.invalid,onClick:i}),[q("i",Uk,Te(e.leftIcon),1),Wt(q("input",os({ref_key:"input",ref:r,"onUpdate:modelValue":c[0]||(c[0]=f=>n.value=f)},l.$attrs),null,16),[[Wi,n.value]])],16,Bk)):Wt((T(),R("input",os({key:1},l.$attrs,{ref_key:"input",ref:r,"onUpdate:modelValue":c[1]||(c[1]=f=>n.value=f),"aria-invalid":e.invalid,class:["WdsTextInput colorTransformer",{"WdsTextInput--ghost":e.variant==="ghost"}]}),null,16,Hk)),[[Wi,n.value]])}}),Oe=(e,t)=>{const n=e.__vccOpts||e;for(const[r,a]of t)n[r]=a;return n},Fg=Oe(zk,[["__scopeId","data-v-df938b4e"]]),Kk={};function Wk(e,t){return T(),R("button",null,[Dt(e.$slots,"default",{},void 0,!0)])}const nr=Oe(Kk,[["render",Wk],["__scopeId","data-v-75345289"]]),Gk={class:"markdown"},qk=Pe({__name:"BaseMarkdownRaw",props:{rawMarkdown:{type:String,required:!0}},setup(e){return(t,n)=>{const r=_m("dompurify-html");return Wt((T(),R("div",Gk,null,512)),[[r,e.rawMarkdown]])}}}),jg=Oe(qk,[["__scopeId","data-v-2220bc7a"]]),Vg=Pe({__name:"BaseMarkdown",props:{rawText:{}},setup(e){let t;const n=oe(!1),r=e;return So(async()=>{t=await pn(()=>import("./marked.esm-273vDTCT.js"),[],import.meta.url),n.value=!0}),(a,o)=>n.value?(T(),Ue(jg,{key:0,"raw-markdown":String(P(t).parse(r.rawText)).trim(),class:"BaseMarkdown"},null,8,["raw-markdown"])):xe("",!0)}});var Ct=(e=>(e.White="#ffffff",e.Black="#000000",e.Blue1="#f3f5ff",e.Blue2="#e4e9ff",e.Blue3="#bfcbff",e.Blue4="#6985ff",e.Blue5="#5551ff",e.Blue6="#4a46da",e.Gray0="#fbfbfd",e.Gray1="#f5f5f9",e.Gray2="#e4e7ed",e.Gray3="#d2d4d7",e.Gray4="#828282",e.Gray5="#4f4f4f",e.Gray6="#333333",e.Purple1="#f6effd",e.Purple2="#ede2ff",e.Purple3="#d4b2f7",e.Purple4="#a95ef8",e.Purple5="#721cc9",e.Orange1="#fff4f1",e.Orange2="#ffcfc2",e.Orange4="#ff8866",e.Orange5="#ff643c",e.Green1="#f2fffb",e.Green2="#d4fff2",e.Green3="#a9f9e1",e.Green5="#3bdcab",e.Green6="#078660",e))(Ct||{}),Bg=(e=>(e.Box="0px 2px 0px 0px #f3f3f3",e.Menu="0px 1px 8px 0px #bfcbff40",e.Large="0px 3px 40px 0px #acb9dc66",e))(Bg||{});const X3=Object.freeze(Object.fromEntries([...Object.entries(Ct).map(([e,t])=>[`--wdsColor${e}`,t]),...Object.entries(Bg).map(([e,t])=>[`--wdsShadow${e}`,t])]));function Kn(){return{log:console.log,warn:console.warn,info:console.info,error:console.error}}const Il=e=>(Qt("data-v-8d5c50fe"),e=e(),Xt(),e),Jk={key:0},Yk=Il(()=>q("i",{class:"material-symbols-outlined"}," download ",-1)),Qk={key:0,"data-writer-grid-col":"0",class:"cell headerCell indexCell"},Xk=Il(()=>q("div",{class:"name"},null,-1)),Zk=Il(()=>q("div",{class:"widthAdjuster"},null,-1)),eT=[Xk,Zk],tT=["data-writer-grid-col","onClick"],nT={class:"name"},rT={class:"material-symbols-outlined"},aT={class:"material-symbols-outlined"},oT=Il(()=>q("div",{class:"widthAdjuster"},null,-1)),sT={key:0,class:"cell indexCell"},iT="A component to display Pandas DataFrames.",lT="data:application/vnd.apache.arrow.file;base64,QVJST1cxAAD/////iAMAABAAAAAAAAoADgAGAAUACAAKAAAAAAEEABAAAAAAAAoADAAAAAQACAAKAAAAlAIAAAQAAAABAAAADAAAAAgADAAEAAgACAAAAGwCAAAEAAAAXwIAAHsiaW5kZXhfY29sdW1ucyI6IFsiX19pbmRleF9sZXZlbF8wX18iXSwgImNvbHVtbl9pbmRleGVzIjogW3sibmFtZSI6IG51bGwsICJmaWVsZF9uYW1lIjogbnVsbCwgInBhbmRhc190eXBlIjogInVuaWNvZGUiLCAibnVtcHlfdHlwZSI6ICJvYmplY3QiLCAibWV0YWRhdGEiOiB7ImVuY29kaW5nIjogIlVURi04In19XSwgImNvbHVtbnMiOiBbeyJuYW1lIjogImNvbF9hIiwgImZpZWxkX25hbWUiOiAiY29sX2EiLCAicGFuZGFzX3R5cGUiOiAiaW50NjQiLCAibnVtcHlfdHlwZSI6ICJpbnQ2NCIsICJtZXRhZGF0YSI6IG51bGx9LCB7Im5hbWUiOiAiY29sX2IiLCAiZmllbGRfbmFtZSI6ICJjb2xfYiIsICJwYW5kYXNfdHlwZSI6ICJpbnQ2NCIsICJudW1weV90eXBlIjogImludDY0IiwgIm1ldGFkYXRhIjogbnVsbH0sIHsibmFtZSI6IG51bGwsICJmaWVsZF9uYW1lIjogIl9faW5kZXhfbGV2ZWxfMF9fIiwgInBhbmRhc190eXBlIjogImludDY0IiwgIm51bXB5X3R5cGUiOiAiaW50NjQiLCAibWV0YWRhdGEiOiBudWxsfV0sICJjcmVhdG9yIjogeyJsaWJyYXJ5IjogInB5YXJyb3ciLCAidmVyc2lvbiI6ICIxMi4wLjAifSwgInBhbmRhc192ZXJzaW9uIjogIjEuNS4zIn0ABgAAAHBhbmRhcwAAAwAAAIgAAABEAAAABAAAAJT///8AAAECEAAAACQAAAAEAAAAAAAAABEAAABfX2luZGV4X2xldmVsXzBfXwAAAJD///8AAAABQAAAAND///8AAAECEAAAABgAAAAEAAAAAAAAAAUAAABjb2xfYgAAAMD///8AAAABQAAAABAAFAAIAAYABwAMAAAAEAAQAAAAAAABAhAAAAAgAAAABAAAAAAAAAAFAAAAY29sX2EAAAAIAAwACAAHAAgAAAAAAAABQAAAAAAAAAD/////6AAAABQAAAAAAAAADAAWAAYABQAIAAwADAAAAAADBAAYAAAAMAAAAAAAAAAAAAoAGAAMAAQACAAKAAAAfAAAABAAAAACAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAABAAAAAAAAAAAAAAAAMAAAACAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAIAAAAAAAAAAwAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAD/////AAAAABAAAAAMABQABgAIAAwAEAAMAAAAAAAEADwAAAAoAAAABAAAAAEAAACYAwAAAAAAAPAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAACgAMAAAABAAIAAoAAACUAgAABAAAAAEAAAAMAAAACAAMAAQACAAIAAAAbAIAAAQAAABfAgAAeyJpbmRleF9jb2x1bW5zIjogWyJfX2luZGV4X2xldmVsXzBfXyJdLCAiY29sdW1uX2luZGV4ZXMiOiBbeyJuYW1lIjogbnVsbCwgImZpZWxkX25hbWUiOiBudWxsLCAicGFuZGFzX3R5cGUiOiAidW5pY29kZSIsICJudW1weV90eXBlIjogIm9iamVjdCIsICJtZXRhZGF0YSI6IHsiZW5jb2RpbmciOiAiVVRGLTgifX1dLCAiY29sdW1ucyI6IFt7Im5hbWUiOiAiY29sX2EiLCAiZmllbGRfbmFtZSI6ICJjb2xfYSIsICJwYW5kYXNfdHlwZSI6ICJpbnQ2NCIsICJudW1weV90eXBlIjogImludDY0IiwgIm1ldGFkYXRhIjogbnVsbH0sIHsibmFtZSI6ICJjb2xfYiIsICJmaWVsZF9uYW1lIjogImNvbF9iIiwgInBhbmRhc190eXBlIjogImludDY0IiwgIm51bXB5X3R5cGUiOiAiaW50NjQiLCAibWV0YWRhdGEiOiBudWxsfSwgeyJuYW1lIjogbnVsbCwgImZpZWxkX25hbWUiOiAiX19pbmRleF9sZXZlbF8wX18iLCAicGFuZGFzX3R5cGUiOiAiaW50NjQiLCAibnVtcHlfdHlwZSI6ICJpbnQ2NCIsICJtZXRhZGF0YSI6IG51bGx9XSwgImNyZWF0b3IiOiB7ImxpYnJhcnkiOiAicHlhcnJvdyIsICJ2ZXJzaW9uIjogIjEyLjAuMCJ9LCAicGFuZGFzX3ZlcnNpb24iOiAiMS41LjMifQAGAAAAcGFuZGFzAAADAAAAiAAAAEQAAAAEAAAAlP///wAAAQIQAAAAJAAAAAQAAAAAAAAAEQAAAF9faW5kZXhfbGV2ZWxfMF9fAAAAkP///wAAAAFAAAAA0P///wAAAQIQAAAAGAAAAAQAAAAAAAAABQAAAGNvbF9iAAAAwP///wAAAAFAAAAAEAAUAAgABgAHAAwAAAAQABAAAAAAAAECEAAAACAAAAAEAAAAAAAAAAUAAABjb2xfYQAAAAgADAAIAAcACAAAAAAAAAFAAAAAsAMAAEFSUk9XMQ==",cT={writer:{name:"DataFrame",description:iT,category:"Content",fields:{dataframe:{name:"Data",desc:"Must be a state reference to a Pandas dataframe or PyArrow table. Alternatively, a URL for an Arrow IPC file.",type:L.Text,default:lT},showIndex:{name:"Show index",desc:"Shows the dataframe's index. If an Arrow table is used, shows the zero-based integer index.",type:L.Text,default:"yes",options:{yes:"yes",no:"no"}},enableSearch:{name:"Enable search",type:L.Text,default:"no",options:{yes:"yes",no:"no"}},enableDownload:{name:"Enable download",desc:"Allows the user to download the data as CSV.",type:L.Text,default:"no",options:{yes:"yes",no:"no"}},useMarkdown:{name:"Use Markdown",type:L.Text,desc:"If active, the output will be sanitized; unsafe elements will be removed.",options:{yes:"yes",no:"no"},default:"no"},displayRowCount:{name:"Display row count",desc:"Specifies how many rows to show simultaneously.",type:L.Number,category:Be.Style,default:"10",validator:Nn},wrapText:{name:"Wrap text",type:L.Text,category:Be.Style,desc:"Not wrapping text allows for an uniform grid, but may be inconvenient if your data contains longer text fields.",options:{yes:"yes",no:"no"},default:"no"},primaryTextColor:Ft,secondaryTextColor:Ln,separatorColor:Gt,dataframeBackgroundColor:{name:"Background",type:L.Color,category:Be.Style,default:Ct.White,applyStyleVariable:!0},fontStyle:{name:"Font style",type:L.Text,category:Be.Style,options:{normal:"normal",monospace:"monospace"},default:"normal"},cssClasses:et}}},uT=Pe({...cT,__name:"CoreDataframeLegacy",setup(e){Ha(O=>({"08de163c":B.value?"sticky":"unset"}));const t=1e3,n=36,r=80,a=300,o=/^__index_level_[0-9]+__$/,s=Z(ee.evaluatedFields),i=oe(),l=oe(),c=oe();let f=null;const u=oe(null),m=oe([]),w=ne(()=>s.showIndex.value=="yes"),b=oe(null),g=oe(0),v=oe([]);let A=null;const C=ne(()=>{var O;return u.value?(O=u.value)==null?void 0:O.columnNames():[]}),y=ne(()=>C.value.filter(O=>m.value.includes(O))),p=ne(()=>C.value.filter(I=>{const M=m.value.includes(I),Q=o.test(I);return!(M&&Q)})),$=ne(()=>(w.value?1:0)+p.value.length),E=ne(()=>{var O;return((O=u.value)==null?void 0:O.numRows())??0}),B=ne(()=>E.value>t),z=ne(()=>Math.min(s.displayRowCount.value,E.value)),le=ne(()=>{let O;return s.wrapText.value=="yes"?O=E.value-1:O=E.value-z.value,Math.min(Math.ceil(g.value*O),O)}),fe=ne(()=>{if(!u.value)return null;const O=B.value?le.value:0,I=B.value?z.value:t,M=u.value.objects({offset:O,limit:I}),Q=u.value.indices().slice(le.value,le.value+z.value);return{data:M,indices:Q}}),Le=ne(()=>{const O=s.fontStyle.value;let I;return v.value.length==0?I=`repeat(${$.value}, minmax(min-content, 1fr))`:I=v.value.map(M=>`${Math.max(M,r)}px`).join(" "),{"min-height":`${n*(1+s.displayRowCount.value)}px`,"max-height":`${(z.value+1)*n}px`,"font-family":O=="monospace"?"monospace":void 0,"grid-template-columns":I,"grid-template-rows":`${n}px repeat(${z.value}, min-content)`}}),be=ne(()=>({top:`${n*E.value}px`}));function Ce(){const O=c.value.scrollTop;g.value=O/(c.value.scrollHeight-c.value.clientHeight)}function Re(){c.value.scrollTop=0}async function Je(){var I;v.value=[],await Mn();const O=(I=c.value)==null?void 0:I.querySelectorAll("[data-writer-grid-col]");O==null||O.forEach(M=>{const Q=M,Me=Q.dataset.writerGridCol,{width:F}=Q.getBoundingClientRect(),G=Math.min(F,a);v.value[Me]=G})}function se(O,I){var F,G;if(O.target.classList.contains("widthAdjuster"))return;if(((F=b.value)==null?void 0:F.columnName)!==I){b.value={columnName:I,descending:!1};return}if((G=b.value)==null?void 0:G.descending){b.value=null;return}b.value={columnName:I,descending:!b.value.descending}}function ce(O){const I=O.schema.metadata.get("pandas");return I?JSON.parse(I).index_columns:[]}async function he(){const O=await pn(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([0,1]),import.meta.url),{tableFromIPC:I}=await pn(()=>import("./Arrow.dom-GBJpMYQS.js"),__vite__mapDeps([2,1]),import.meta.url),M=s.dataframe.value;try{const F=await(await(await fetch(M)).blob()).arrayBuffer(),G=I(F);m.value=ce(G),f=O.fromArrow(G),u.value=f}catch(Q){Kn().error("Couldn't load dataframe from Arrow URL.",Q)}}function ke(){const O=u.value.toCSV(),I=document.createElement("a"),M=new Blob([O],{type:"text/csv"}),Q=URL.createObjectURL(M);I.href=Q,I.download="data.csv",I.click(),URL.revokeObjectURL(Q)}async function ye(){const O=await pn(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([0,1]),import.meta.url);if(b.value===null){u.value=u.value.unorder();return}let I;b.value.descending?I=O.desc(b.value.columnName):I=b.value.columnName,u.value=u.value.orderby(I)}async function j(O){const I=O.target.value;if(!I)u.value=f;else{const M=new RegExp(I,"i"),Me="(d, $) => "+f.columnNames().map(F=>`aq.op.match(d.${F}, $.pattern) !== null`).join(" || ");u.value=f.params({pattern:M,filterS:Me}).filter(Me)}await Mn(),Re()}async function ue(O){if(O.buttons!==1){A=null;return}const I=O.target;if(!i.value.contains(I))return;if(A===null&&I.classList.contains("widthAdjuster")){const ae=I.closest(".cell");A=parseInt(ae.dataset.writerGridCol)}else if(A===null)return;const M=c.value.querySelector(`[data-writer-grid-col="${A}"]`),Q=M.querySelector(".widthAdjuster"),{width:Me}=Q.getBoundingClientRect(),{left:F}=M.getBoundingClientRect(),J=O.clientX-F+Me/2;v.value[A]=J}return Ke(s.dataframe,()=>{he()}),Ke(b,async()=>{await ye()}),Ke($,()=>{Je()}),Ke(s.wrapText,()=>{Je()}),Zt(async()=>{await he(),document.addEventListener("mousemove",ue),l.value&&new ResizeObserver(Je).observe(l.value,{box:"border-box"})}),cr(()=>{document.removeEventListener("mousemove",ue)}),(O,I)=>{var M;return T(),R("div",{ref_key:"rootEl",ref:i,class:"CoreDataframe"},[q("div",{ref_key:"toolsEl",ref:l,class:"tools"},[P(s).enableSearch.value==="yes"?(T(),R("div",Jk,[Ye(Fg,{class:"search",placeholder:"Search","left-icon":"search",onChange:j})])):xe("",!0),P(s).enableDownload.value==="yes"?(T(),Ue(nr,{key:1,title:"Download",class:"download",onClick:ke},{default:Ze(()=>[Yk]),_:1})):xe("",!0)],512),q("div",{ref_key:"gridContainerEl",ref:c,class:"gridContainer",onScroll:Ce},[q("div",{class:ut(["grid",{scrolled:le.value>0,wrapText:P(s).wrapText.value==="yes"}]),style:vt(Le.value)},[w.value?(T(),R("div",Qk,eT)):xe("",!0),(T(!0),R(je,null,It(p.value,(Q,Me)=>{var F,G,J;return T(),R("div",{key:Q,"data-writer-grid-col":Me+(w.value?1:0),class:"cell headerCell",onClick:ae=>se(ae,Q)},[q("div",nT,Te(Q),1),q("div",{class:"icon",style:vt({visibility:((F=b.value)==null?void 0:F.columnName)==Q?"visible":"hidden"})},[Wt(q("span",rT," arrow_downward ",512),[[$n,!((G=b.value)!=null&&G.descending)]]),Wt(q("span",aT," arrow_upward ",512),[[$n,(J=b.value)==null?void 0:J.descending]])],4),oT],8,tT)}),128)),(T(!0),R(je,null,It((M=fe.value)==null?void 0:M.data,(Q,Me)=>(T(),R(je,{key:Me},[w.value?(T(),R("div",sT,[m.value.length==0?(T(),R(je,{key:0},[xt(Te(fe.value.indices[Me]),1)],64)):(T(),R(je,{key:1},[xt(Te(y.value.map(F=>Q[F]).join(", ")),1)],64))])):xe("",!0),(T(!0),R(je,null,It(p.value,F=>(T(),R("div",{key:F,class:"cell"},[P(s).useMarkdown.value=="yes"?(T(),Ue(Vg,{key:0,"raw-text":Q[F]},null,8,["raw-text"])):(T(),R(je,{key:1},[xt(Te(Q[F]),1)],64))]))),128))],64))),128))],6),B.value?(T(),R("div",{key:0,class:"endpoint",style:vt(be.value)},null,4)):xe("",!0)],544)],512)}}}),dT=Oe(uT,[["__scopeId","data-v-8d5c50fe"]]),fT={key:0},pT={key:1},hT={key:2},mT={key:3},vT="A text component used to display headings or titles in different sizes and styles.",gT={writer:{name:"Heading",description:vT,category:"Content",fields:{text:{name:"Text",default:"(No text)",init:"Heading Text",desc:"Add text directly, or reference state elements with @{my_text}.",type:L.Text},headingType:{name:"Heading type",default:"h3",options:{h1:"h1 (Big)",h2:"h2 (Normal)",h3:"h3 (Small)",h4:"h4 (Smallest)"},type:L.Text,category:Be.Style},alignment:{name:"Alignment",default:"left",type:L.Text,category:Be.Style,options:{left:"Left",center:"Center",right:"Right"}},primaryTextColor:Ft,cssClasses:et},previewField:"text"}},yT=Pe({...gT,__name:"CoreHeading",setup(e){const t=Z(ee.evaluatedFields);return(n,r)=>(T(),R("div",{class:"CoreHeading",style:vt({"text-align":P(t).alignment.value})},[P(t).headingType.value=="h1"?(T(),R("h1",fT,Te(P(t).text.value),1)):P(t).headingType.value=="h3"?(T(),R("h3",pT,Te(P(t).text.value),1)):P(t).headingType.value=="h4"?(T(),R("h4",hT,Te(P(t).text.value),1)):(T(),R("h2",mT,Te(P(t).text.value),1))],4))}}),_T=Oe(yT,[["__scopeId","data-v-a24181bd"]]),bT={class:"icon"},wT={writer:{name:"Icon",description:"A component to display an icon",category:"Content",fields:{icon:{name:"Icon",type:L.Text,desc:'A Material Symbols id, such as "arrow_forward".',category:Be.Style,default:"arrow_forward"},size:{name:"Icon size",type:L.Number,desc:"Icon size in px",category:Be.Style,default:"14",validator:Nn},color:{name:"Icon color",type:L.Color,category:Be.Style},cssClasses:et},previewField:"icon"}},Ug=Pe({...wT,__name:"CoreIcon",setup(e){const t=Z(ee.evaluatedFields);return(n,r)=>(T(),R("div",bT,[P(t).icon.value?(T(),R("span",{key:0,class:"material-symbols-outlined",style:vt({fontSize:`${P(t).size.value}px`,color:P(t).color.value})},Te(P(t).icon.value),5)):xe("",!0)]))}}),yh=e=>{e.writer&&(e.writer.docs="Writer Framework uses Material Symbols to display icons. To include an icon, check https://fonts.google.com/icons, find the icon's id (such as `arrow_forward`) and it to your _Icon.")};typeof yh=="function"&&yh(Ug);const AT=Oe(Ug,[["__scopeId","data-v-983dfef2"]]);function Ns(e){const t={ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey};return new CustomEvent("wf-click",{detail:{payload:t}})}function CT(e){const t={key:e.key,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey};return new CustomEvent("wf-keydown",{detail:{payload:t}})}const $T=["src","alt"],IT={key:0,class:"captionContainer"},ST="A component to display images.",ET=`
def click_handler(state):

	# Increment counter when the image is clicked

	state["counter"] += 1`,kT={writer:{name:"Image",description:ST,category:"Content",fields:{src:{name:"Source",default:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQoAAAEKCAYAAADqyxvJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAemSURBVHgB7d3baltHGIZhJd5DW3pS2vu/tkKgEFragiXLjuvVkpOS5PMa6Z8ZWc8DPXPBJNGrpX82evfrh4/PG4BveL8BCIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiC43HN3PP/24ubyoafCnT8+bD7/9vur/+f67u80PL/9V+fjHX5vtdv/qn794+bP55eXPaJbfh8wTRYGHh7p/pO/fv/v3hbZG5e+zuLm+WvXzT0+fNo8v/1XZ7582HJdQFKj+h3p7c73q5/ePTy9PInUvzOuVoVhUxWsJ0FNhhM6VUBS43z1sKl1fXaz6+eXjyv6xMBSXF5t3L086a+weHjcVqp+ezpVQFFje0Srfwdc+USz2jzUvzM+WWKyxK3pB74SihFAU2e7mmlNst7VPObe36+JVFdOqJ5VzJxRFqucUaweIy5yi0tXl+gW0Y8fUfKKOUBTZla80rHth/jenqIvFVcOc4tgx3e89TVQRiiLVKw03DSsNu+Jl29Fzim3xEPmcCUWhh8LPy8uMYu07+EPx5/frho9Dx4yp/RN1hKJQ9WDtbuXqx26yjVeLY8Wr+qPVuROKQtVLklcN+ykqd0RerfzosThWTC2L1hKKQsuLoHJOcdewn6Lyc/wyp1g7ZD3WC9yyaC2hKFa5I7JlTlH9Of5y5TLpseYUdmTWEopi1Rud1r6DV68MrP19FofG1HyinlAUq55TrB0gVs8pWgaah8ZUJOoJRbFzOrm5WOYUa4eah8b0fmv/RDWhKHZOJzc/672f4vHRILOaUHRwLic3P2vbXt4eCise9YSigxlPbs42p2iNl0j0IRQdzHhy861c12ejVR9C0cHyaF35zrc86s+2n6Llur4W9k/0IRSdzDanmPG6vpaY+ujRh1B0MtvJzerr+lrmFGtjKhL9CEUnb/nk5pcsM4r1c4p1v8/esmg3QtFJjxum1qp+R14br7Ux3dpo1Y1QdFR9w9Sok5tfU31d34Ot290IRUdv9eTm11Tup1gi8fwSFvoQio6qT27e3bZ838dcx+BfO6ewLNqXUHQ04w1T1Z/zq67rs9GqL6Ho7K2d3EyqruuzNNqXUHQ228nN6uv6Wo7Bp49o5hP9CUVns600LGY7Bp+Gvo++6Kc7oejsLZ3cfK1jL9ve+6Kf7oRigLdycvO1bhq2l38rpr7opz+hGGDGk5uVc4pjHoP3RcRjCMUAM57crJxTtByD/9rQ1/6JMYRigOqTm7c3LRuvTuO6PvsnxhCKQba7ueYUM17X96WY2j8xhlAMUj2nuGm4CbtSy5zi/zE1nxhHKAY59ZOba10dYT/F3v6JYYRikFM+udli+Th06Jxia//EMEIxUPUNU1UnN1sd+sVA9k+MIxQDVQ/mqk5utjrkuj5fRDyWUAx0qic3Wx1yXZ9l0bGEYqDqk5t3DfspKucAh1zXZ1l0LKEYbLYbpma9rs+OzLGEYrDZlkmrVxZajsEvcwrzibGEYrDZTm5WzylaBpp//n2/YSyhGKx6P8V100rDbNf1eZoYTSgGqz652XLD1GzX9TGeUEzgVE5uHsvaY/CMJxQTmPHkZuWcouUYPGMJxQRmPLk523V9jOVvawLLnKJyLtByw9Rs1/UxllBMYrY5xWzX9TGWUExitpOb1df13Vj5OClCMYmZT25WWGYU5hSnw9/UJHrcMLVW9X4KTxWnQygmUn3D1LG/setQLec+GEMoJjLryc0qnihOh1BMpPrk5t1ty/d9zHUMnjGEYiIz3jBVvWv0zn6KkyAUk5nv5OZc1/UxhlBMZraTm9XX9TlJehqEYjIzrjTMdgye/oRiMtUnN2f7YqCFZdL5CcWEZju5Odt1ffT37tcPH583AN/giQKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKI/gE7SXVdY25ypwAAAABJRU5ErkJggg==",desc:"A valid URL. Alternatively, you can provide a state reference to a Matplotlib figure or a packed file.",type:L.Text},caption:{name:"Caption",init:"Image Caption",desc:"Leave blank to hide.",type:L.Text},maxWidth:{name:"Max width (px)",type:L.Number,default:"-1",category:Be.Style},maxHeight:{name:"Max height (px)",type:L.Number,default:"-1",category:Be.Style},secondaryTextColor:Ln,cssClasses:et},events:{"wf-click":{desc:"Capture single clicks.",stub:ET.trim()}},previewField:"caption"}},Hg=Pe({...kT,__name:"CoreImage",setup(e){const t=oe(null),n=Z(ee.core),r=Z(ee.evaluatedFields),a=Z(ee.componentId),o=ne(()=>{var f;return{cursor:typeof((f=n.getComponentById(a).handlers)==null?void 0:f["wf-click"])<"u"?"pointer":"unset"}}),s=ne(()=>{const l=r.maxWidth.value,c=r.maxHeight.value;return{"max-width":l!==-1?`${l}px`:void 0,"max-height":c!==-1?`${c}px`:void 0}});function i(l){const c=Ns(l);t.value.dispatchEvent(c)}return(l,c)=>(T(),R("div",{ref_key:"rootEl",ref:t,class:"CoreImage",style:vt(o.value),onClick:i},[q("img",{src:P(r).src.value,alt:P(r).caption.value,draggable:"false",style:vt(s.value)},null,12,$T),P(r).caption.value||P(r).caption.value===0?(T(),R("div",IT,Te(P(r).caption.value),1)):xe("",!0)],4))}}),_h=e=>{e.writer&&(e.writer.docs=`Use your app's static folder to serve images directly. For example, \`static/my_image.png\`.

Alternatively, pass a Matplotlib figure via state.

\`state["my_fig"] = fig\` and then setting the _Image_ source to \`@{fig}\`

You can also use packed files or bytes:

\`state["img_b"] = wf.pack_bytes(img_bytes, "image/png")\`

\`state["img_f"] = wf.pack_file(img_file, "image/png")\``)};typeof _h=="function"&&_h(Hg);const TT=Oe(Hg,[["__scopeId","data-v-0185a273"]]),xT={},PT=e=>(Qt("data-v-5a38f374"),e=e(),Xt(),e),MT={class:"LoadingSymbol"},NT=PT(()=>q("div",null,null,-1)),OT=[NT];function RT(e,t){return T(),R("div",MT,OT)}const zg=Oe(xT,[["render",RT],["__scopeId","data-v-5a38f374"]]),LT={class:"BaseEmptiness"},DT={class:"content"},FT={class:"title"},jT={key:0,class:"message"},VT=Pe({__name:"BaseEmptiness",props:{componentId:{type:String,required:!0},message:{type:String,required:!1,default:void 0}},setup(e){const t=e,n=Z(ee.core),r=ne(()=>n.getComponentById(t.componentId)),a=ne(()=>n.getComponentDefinition(r.value.type));return(o,s)=>(T(),R("div",LT,[q("div",DT,[q("div",FT,[q("h3",null,"Empty "+Te(a.value.name),1)]),e.message?(T(),R("div",jT,Te(e.message),1)):xe("",!0)])]))}}),Od=Oe(VT,[["__scopeId","data-v-8c972dbe"]]),BT={key:0,class:"message"},UT="A component that displays a message in various styles, including success, error, warning, and informational.",HT={writer:{name:"Message",description:UT,category:"Content",fields:{message:{name:"Message",type:L.Text,desc:"Prefix with '+' for a success message, with '-' for error, '!' for warning, '%' for loading. No prefix for info. Leave empty to hide."},successColor:{name:"Success",default:Ct.Green3,type:L.Color,category:Be.Style},errorColor:{name:"Error",default:Ct.Orange2,type:L.Color,category:Be.Style},warningColor:{name:"Warning",default:"#FFE999",type:L.Color,category:Be.Style},infoColor:{name:"Info",default:Ct.Blue2,type:L.Color,category:Be.Style},loadingColor:{name:"Loading",default:Ct.Blue2,type:L.Color,category:Be.Style},primaryTextColor:Ft,cssClasses:et},previewField:"name"}},Kg=Pe({...HT,__name:"CoreMessage",setup(e){const t=Z(ee.componentId),n=Z(ee.evaluatedFields),r=Z(ee.isBeingEdited),a=ne(()=>{const i=n.message.value;if(!i)return"neutral";const l=i.charAt(0);return l=="+"?"success":l=="-"?"error":l=="!"?"warning":l=="%"?"loading":"info"}),o=ne(()=>{const i=n.message.value;if(!i)return;const l=i.charAt(0);return l=="+"||l=="-"||l=="!"||l=="%"?i.substring(1).trim():i}),s=ne(()=>({"--messageActiveSeverityColor":{error:n.errorColor.value,success:n.successColor.value,warning:n.warningColor.value,info:n.infoColor.value,loading:n.loadingColor.value}[a.value]}));return(i,l)=>o.value||P(r)?(T(),R("div",{key:0,class:ut(["CoreMessage",a.value]),style:vt(s.value)},[o.value?(T(),R("div",BT,[a.value=="loading"?(T(),Ue(zg,{key:0,class:"loadingSymbol"})):xe("",!0),q("span",null,Te(o.value),1)])):(T(),Ue(Od,{key:1,"component-id":P(t)},null,8,["component-id"]))],6)):xe("",!0)}}),bh=e=>{e.writer&&(e.writer.docs=`When working with operations that can succeed or fail, _Message_ can be useful. You can reserve a state element to be used for the outcome of the operation; empty messages aren't shown, so you can initialise it empty.
Then, assign a message when the operation is completed.

\`\`\`python
state["msg"] = ""

if is_ok:
  state["msg"] = "+It worked!"
else:
  state["msg"] = "-It failed"
\`\`\``)};typeof bh=="function"&&bh(Kg);const zT=Oe(Kg,[["__scopeId","data-v-4e7d44c6"]]),KT={key:0,class:"name"},WT={key:1,class:"description"},GT={class:"value"},qT={key:2,class:"note"},JT="A component that prominently displays a metric value and associated information.",YT={writer:{name:"Metric",description:JT,category:"Content",fields:{name:{name:"Name",init:"Metric",type:L.Text},metricValue:{name:"Value",default:"0",type:L.Text,desc:"The main value to be displayed. It's not limited to numbers."},description:{name:"Description",type:L.Text},note:{name:"Note",init:"+Pass",type:L.Text,desc:"Prefix with '+' for a positive message, with '-' for a negative message."},primaryTextColor:Ft,secondaryTextColor:Ln,positiveColor:{name:"Positive",default:Ct.Green3,type:L.Color,category:Be.Style},neutralColor:{name:"Neutral",default:"var(--separatorColor)",type:L.Color,category:Be.Style},negativeColor:{name:"Negative",default:Ct.Orange2,type:L.Color,category:Be.Style},cssClasses:et},previewField:"name"}},QT=Pe({...YT,__name:"CoreMetric",setup(e){const t=Z(ee.evaluatedFields),n=ne(()=>{const o=t.note.value;if(!o)return"neutral";const s=o.charAt(0);return s=="+"?"positive":s=="-"?"negative":"neutral"}),r=ne(()=>{const o=t.note.value;if(!o)return;const s=o.charAt(0);return s=="+"||s=="-"?o.substring(1):o}),a=ne(()=>({"--messageActiveSentimentColor":{positive:t.positiveColor.value,neutral:t.neutralColor.value,negative:t.negativeColor.value}[n.value]}));return(o,s)=>(T(),R("div",{class:"CoreMetric",style:vt(a.value)},[P(t).name.value?(T(),R("div",KT,Te(P(t).name.value),1)):xe("",!0),P(t).description.value?(T(),R("div",WT,Te(P(t).description.value),1)):xe("",!0),q("h2",GT,Te(P(t).metricValue.value),1),r.value?(T(),R("div",qT,Te(r.value),1)):xe("",!0)],4))}}),XT=Oe(QT,[["__scopeId","data-v-bc5826e1"]]),ZT=e=>(Qt("data-v-356594ef"),e=e(),Xt(),e),ex=ZT(()=>q("div",{class:"mask"},null,-1)),tx="A component that displays Plotly graphs.",nx={data:[{x:["a","b","c"],y:[22,25,29],type:"bar"}]},rx={writer:{name:"Plotly Graph",description:tx,category:"Content",fields:{spec:{name:"Graph specification",default:JSON.stringify(nx,null,2),desc:"Plotly graph specification. Pass it using state, e.g. @{fig}, or paste a JSON specification.",type:L.Object},cssClasses:et},events:{"plotly-click":{desc:"Sends a list with the clicked points."},"plotly-selected":{desc:"Sends a list with the selected points."},"plotly-deselect":{desc:"Triggered when points are deselected."}}}},Wg=Pe({...rx,__name:"CorePlotlyGraph",setup(e){const t=oe(null),n=oe(null),r=Z(ee.evaluatedFields),a=ne(()=>r.spec.value),o={paper_bgcolor:Ct.White,plot_bgcolor:Ct.Gray1,colorway:[Ct.Blue4,Ct.Blue4,Ct.Orange4,Ct.Green5],font:{family:"Poppins, sans-serif",size:12,color:Ct.Black},hoverlabel:{color:Ct.White,bgcolor:Ct.Black}},s=async()=>{var w,b,g;if(!a.value||!n.value)return;const u=await pn(()=>import("./plotly.min-C1SWiT4V.js").then(v=>v.p),[],import.meta.url);if(!t.value||t.value.clientHeight==0)return;const m={...a.value,layout:{...o,...(w=a.value)==null?void 0:w.layout}};u.newPlot(n.value,m),l(),(g=(b=a.value)==null?void 0:b.layout)!=null&&g.autosize&&i()};function i(){const u=t.value.parentElement;u!=null&&u.clientHeight&&(t.value.style.height="100%",n.value.style.height="100%")}function l(){n.value.on("plotly_click",f("plotly-click")),n.value.on("plotly_selected",f("plotly-selected")),n.value.on("plotly_deselect",f("plotly-deselect"))}function c(u){var m,w;return{curveNumber:u.curveNumber,pointNumber:u.pointNumber,pointNumbers:u.pointNumbers,x:u.x,y:u.y,z:u.z,label:u.label,lat:u.lat,lon:u.lon,xaxis:{anchor:(m=u.xaxis)==null?void 0:m.anchor},yaxis:{anchor:(w=u.yaxis)==null?void 0:w.anchor}}}function f(u){return m=>{var b;const w=new CustomEvent(u,{detail:{payload:(b=m==null?void 0:m.points)==null?void 0:b.map(g=>c(g))}});t.value.dispatchEvent(w)}}return Ke(a,u=>{u&&s()}),Zt(async()=>{await s(),t.value&&new ResizeObserver(s).observe(t.value,{box:"border-box"})}),(u,m)=>(T(),R("div",{ref_key:"rootEl",ref:t,class:"CorePlotlyGraph"},[q("div",{ref_key:"chartTargetEl",ref:n,class:"target"},null,512),ex],512))}}),wh=e=>{e.writer&&(e.writer.docs=`You can listen to events triggered by Plotly.js and add interactivity to your charts.
For example, implement cross-filtering.`)};typeof wh=="function"&&wh(Wg);const ax=Oe(Wg,[["__scopeId","data-v-356594ef"]]),ox=`
def click_handler(state):

	# Increment counter when the text is clicked

	state["counter"] += 1`,sx="A component to display plain text or formatted text using Markdown syntax.",ix={writer:{name:"Text",description:sx,category:"Content",fields:{text:{name:"Text",init:"Text",desc:"Add text directly, or reference state elements with @{my_text}.",type:L.Text,control:gl.Textarea},useMarkdown:{name:"Use Markdown",desc:"The Markdown output will be sanitised; unsafe elements will be removed.",default:"no",type:L.Text,options:{yes:"Yes",no:"No"}},alignment:{name:"Alignment",default:"left",type:L.Text,options:{left:"Left",center:"Center",right:"Right"},category:Be.Style},primaryTextColor:Ft,cssClasses:et},events:{"wf-click":{desc:"Capture single clicks.",stub:ox.trim()}},previewField:"text"}},lx=Pe({...ix,__name:"CoreText",setup(e){const t=oe(null),n=Z(ee.evaluatedFields),r=Z(ee.componentId),a=Z(ee.core),o=Z(ee.isBeingEdited),s=ne(()=>!n.text.value),i=ne(()=>!s.value||o.value),l=ne(()=>{var w;return{cursor:typeof((w=a.getComponentById(r).handlers)==null?void 0:w["wf-click"])<"u"?"pointer":"unset"}}),c=ne(()=>({"text-align":n.alignment.value}));function f(u){const m=Ns(u);t.value.dispatchEvent(m)}return(u,m)=>i.value?(T(),R("div",{key:0,ref_key:"rootEl",ref:t,class:"CoreText",style:vt(l.value),onClick:f},[s.value?(T(),Ue(Od,{key:0,"component-id":P(r)},null,8,["component-id"])):(T(),R(je,{key:1},[P(n).useMarkdown.value=="yes"?(T(),Ue(Vg,{key:0,"raw-text":P(n).text.value,style:vt(c.value)},null,8,["raw-text","style"])):(T(),R("div",{key:1,class:"plainText",style:vt(c.value)},Te(P(n).text.value),5))],64))],4)):xe("",!0)}}),cx=Oe(lx,[["__scopeId","data-v-1a886b3d"]]),Gg="A component that displays Vega-Lite/Altair charts.",ux={$schema:"https://vega.github.io/schema/vega-lite/v5.json",description:Gg,data:{values:[{a:"A",b:100},{a:"B",b:200},{a:"C",b:150},{a:"D",b:300}]},mark:"bar",encoding:{x:{field:"a",type:"nominal"},y:{field:"b",type:"quantitative"}}},dx={writer:{name:"Vega Lite Chart",description:Gg,category:"Content",fields:{spec:{name:"Chart specification",default:JSON.stringify(ux,null,2),desc:"Vega-Lite chart specification. Pass a Vega Altair chart using state or paste a JSON specification.",type:L.Object},cssClasses:et}}},qg=Pe({...dx,__name:"CoreVegaLiteChart",setup(e){const t=oe(null),n=oe(null),r=Z(ee.evaluatedFields),a=async()=>{if(!r.spec.value||!n.value)return;const{default:o}=await pn(()=>import("./vega-embed.module-SNP5iNdJ.js"),[],import.meta.url);await o(n.value,r.spec.value)};return Ke(()=>r.spec.value,o=>{o&&a()}),Zt(()=>{a(),new ResizeObserver(a).observe(t.value,{box:"border-box"})}),(o,s)=>(T(),R("div",{ref_key:"rootEl",ref:t,class:"CoreVegaLiteChart"},[q("div",{ref_key:"chartTargetEl",ref:n,class:"target"},null,512)],512))}}),Ah=e=>{e.writer&&(e.writer.docs=`Generate a chart using Altair and pass it via state; it'll be converted to Vega-Lite specification.

\`state["my_chart"] = chart\`

Afterwards, you can reference the chart in the specification using the syntax \`@{my_chart}\`.

Alternatively, you can work with Vega-Lite directly.`)};typeof Ah=="function"&&Ah(qg);const fx=Oe(qg,[["__scopeId","data-v-9420293e"]]),px=e=>(Qt("data-v-94257eae"),e=e(),Xt(),e),hx={class:"CoreVideoPlayer"},mx=["src","controls","autoplay","loop","muted"],vx=px(()=>q("div",{class:"mask"},null,-1)),gx="A video player component that can play various video formats.",yx={writer:{name:"Video Player",description:gx,category:"Content",fields:{src:{name:"Source",desc:"The URL of the video file. Alternatively, you can pass a file via state.",default:"",type:L.Text,validator:Rg},controls:{name:"Controls",desc:"Display video player controls.",default:"yes",type:L.Text,options:{yes:"Yes",no:"No"}},autoplay:{name:"Autoplay",desc:"Autoplay the video when the component is loaded.",default:"no",type:L.Text,options:{yes:"Yes",no:"No"}},loop:{name:"Loop",desc:"Loop the video when it reaches the end.",default:"no",type:L.Text,options:{yes:"Yes",no:"No"}},muted:{name:"Muted",desc:"Mute the video by default.",default:"no",type:L.Text,options:{yes:"Yes",no:"No"}},cssClasses:et}}},Jg=Pe({...yx,__name:"CoreVideoPlayer",setup(e){const t=Z(ee.evaluatedFields);return(n,r)=>(T(),R("div",hx,[q("video",{src:P(t).src.value,controls:P(t).controls.value==="yes",autoplay:P(t).autoplay.value==="yes",loop:P(t).loop.value==="yes",muted:P(t).muted.value==="yes"},null,8,mx),vx]))}}),Ch=e=>{e.writer&&(e.writer.docs=`Use your app's static folder to serve videos directly. For example, \`static/my_video.mp4\`.

Alternatively, you can pack bytes or files in state:

\`state["vid_b"] = wf.pack_bytes(vid_bytes, "video/mp4")\`

\`state["vid_f"] = wf.pack_file(vid_file, "video/mp4")\`

Afterwards, you can reference the video using the syntax \`@{vid_f}\`.`)};typeof Ch=="function"&&Ch(Jg);const _x=Oe(Jg,[["__scopeId","data-v-94257eae"]]),bx={class:"CoreLink"},wx=["href","target","rel"],Ax={writer:{name:"Link",description:"A component to create a hyperlink.",category:"Content",fields:{url:{name:"URL",type:L.Text,default:"https://writer.com",desc:"Specify a URL or choose a page. Keep in mind that you can only link to pages for which a key has been specified.",options:e=>Object.fromEntries(e.getComponents("root",{sortedByPosition:!0}).map(t=>t.content.key).filter(t=>!!t).map(t=>[`#${t}`,`Page with key: ${t}`]))},target:{name:"Target",type:L.Text,options:{_self:"Self",_blank:"Blank",_parent:"Parent",_top:"Top"},desc:"Specifies where to open the linked document.",default:"_self"},rel:{name:"Rel",type:L.Text,desc:"Specifies the relationship between the current document and the linked document."},text:{name:"Text",default:"",type:L.Text,desc:"The text to display in the link."},primaryTextColor:Ft,cssClasses:et}}},Cx=Pe({...Ax,__name:"CoreLink",setup(e){const t=Z(ee.evaluatedFields),n=ne(()=>t.text.value||t.url.value);return(r,a)=>(T(),R("div",bx,[q("a",{href:P(t).url.value,target:P(t).target.value,rel:P(t).rel.value},Te(n.value),9,wx)]))}}),$x=Oe(Cx,[["__scopeId","data-v-9c5e1448"]]),Ix={},Sx={width:"15",height:"12",viewBox:"0 0 15 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ex=q("path",{d:"M14.0712 4.50295C14.2882 4.72002 14.2882 5.07197 14.0712 5.28905L10.5337 8.8265C10.3166 9.04357 9.96468 9.04357 9.7476 8.8265C9.53052 8.60942 9.53052 8.25747 9.7476 8.0404L12.892 4.896L9.7476 1.7516C9.53052 1.53452 9.53052 1.18257 9.7476 0.965495C9.96467 0.74842 10.3166 0.74842 10.5337 0.965495L14.0712 4.50295ZM13.6781 5.45185L3.67268 5.45185L3.67268 4.34014L13.6781 4.34014L13.6781 5.45185ZM2.00511 7.11942L2.00511 8.23114L0.893394 8.23114L0.893394 7.11942L2.00511 7.11942ZM3.67268 9.89871L5.52553 9.89871L5.52553 11.0104L3.67268 11.0104L3.67268 9.89871ZM2.00511 8.23114C2.00511 9.15211 2.7517 9.89871 3.67268 9.89871L3.67268 11.0104C2.13772 11.0104 0.893394 9.76609 0.893394 8.23114L2.00511 8.23114ZM3.67268 5.45185C2.7517 5.45185 2.00511 6.19845 2.00511 7.11942L0.893394 7.11942C0.893394 5.58447 2.13772 4.34014 3.67268 4.34014L3.67268 5.45185Z",fill:"currentColor"},null,-1),kx=[Ex];function Tx(e,t){return T(),R("svg",Sx,kx)}const xx=Oe(Ix,[["render",Tx]]),Px={class:"CoreChatbotAvatar"},Mx=Pe({__name:"CoreChatbotAvatar",props:{initials:{type:String,required:!0}},setup(e){return(t,n)=>(T(),R("div",Px,Te(e.initials),1))}}),Nx=Oe(Mx,[["__scopeId","data-v-ce5bb453"]]),Ox=["aria-busy"],Rx={key:1,class:"CoreChatbotMessage__content__text"},Lx={key:2,class:"CoreChatbotMessage__content__actions"},Dx=["onClick"],Fx={key:0,class:"subheading"},jx={class:"name"},Vx={key:1,class:"desc"},Bx=Pe({__name:"CoreChatbotMessage",props:{initials:{type:String,required:!0},useMarkdown:{type:Boolean,required:!1},message:{type:Object,required:!1,default:void 0},assistantRoleColor:{type:String,required:!1,default:""},isLoading:{type:Boolean,required:!1}},emits:{actionClick:e=>typeof e=="object"&&e!==null},setup(e){const t=Dc(()=>pn(()=>import("./BaseMarkdown-Cq1so8HH.js"),[],import.meta.url)),n=Dc(()=>pn(()=>import("./CoreChatbotLoader-DGIYek7Y.js"),__vite__mapDeps([3,4]),import.meta.url)),r=e,a=ne(()=>{var c;return((c=r.message)==null?void 0:c.actions)??[]}),o=ne(()=>r.isLoading&&!i.value),s=ne(()=>{var c;return r.isLoading?"assistant":((c=r.message)==null?void 0:c.role)??""}),i=ne(()=>{var c;return((c=r.message)==null?void 0:c.content.trim())??""}),l=ne(()=>{switch(s.value){case"user":return"var(--userRoleColor)";case"assistant":return r.assistantRoleColor||"linear-gradient(264deg, #f5ebff 0.71%, #eef1ff 100%)";default:return""}});return(c,f)=>(T(),R("div",{class:"CoreChatbotMessage","aria-busy":e.isLoading},[Ye(Nx,{initials:e.initials},null,8,["initials"]),q("div",{class:"CoreChatbotMessage__content",style:vt({background:l.value})},[o.value?(T(),Ue(P(n),{key:0})):(T(),R("div",Rx,[e.useMarkdown?(T(),Ue(P(t),{key:0,"raw-text":i.value},null,8,["raw-text"])):(T(),R(je,{key:1},[xt(Te(i.value),1)],64))])),a.value.length?(T(),R("div",Lx,[(T(!0),R(je,null,It(a.value,(u,m)=>(T(),R("button",{key:m,class:"action",onClick:w=>c.$emit("actionClick",u)},[u.subheading?(T(),R("div",Fx,Te(u.subheading),1)):xe("",!0),q("h3",jx,Te(u.name),1),u.desc?(T(),R("div",Vx,Te(u.desc),1)):xe("",!0)],8,Dx))),128))])):xe("",!0)],4)],8,Ox))}}),$h=Oe(Bx,[["__scopeId","data-v-54e985f1"]]),Ux=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Hx=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],zx=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Kx=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Ih=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function Sh(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?Kx:zx:t.binary?Hx:Ux,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const a=e<0,o=a?"-":t.signed?"+":"";a&&(e=-e);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),e<1){const f=Ih(e,t.locale,s);return o+f+r+n[0]}const i=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**i,s||(e=e.toPrecision(3));const l=Ih(Number(e),t.locale,s),c=n[i];return o+l+r+c}const Wx=["aria-invalid"],Gx=Pe({__name:"WdsTextareaInput",props:Ua({invalid:{type:Boolean,required:!1}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:t}){const n=oa(e,"modelValue");t({focus:i,getSelection:s,value:n,setSelectionEnd:o,setSelectionStart:a});const r=oe();function a(l){r.value&&(r.value.selectionStart=l)}function o(l){r.value&&(r.value.selectionEnd=l)}function s(){var l,c;return{selectionStart:(l=r.value)==null?void 0:l.selectionStart,selectionEnd:(c=r.value)==null?void 0:c.selectionEnd}}function i(){var l;(l=r.value)==null||l.focus()}return(l,c)=>Wt((T(),R("textarea",{ref_key:"input",ref:r,"onUpdate:modelValue":c[0]||(c[0]=f=>n.value=f),"aria-invalid":e.invalid},null,8,Wx)),[[bo,n.value]])}}),qx=Oe(Gx,[["__scopeId","data-v-04c3fbf4"]]),Sl=e=>(Qt("data-v-b9a3a5ac"),e=e(),Xt(),e),Jx={class:"filesArea"},Yx={key:1,class:"list"},Qx=["title"],Xx={class:"size"},Zx=Sl(()=>q("i",{class:"material-symbols-outlined"}," delete ",-1)),eP={class:"filesButtons"},tP=Sl(()=>q("i",{class:"material-symbols-outlined"},"upload",-1)),nP={key:1,class:"sizeExceededMessage"},rP=Sl(()=>q("i",{class:"material-symbols-outlined"},"warning",-1)),aP={class:"inputArea"},oP={class:"inputButtons"},sP=Sl(()=>q("i",{class:"material-symbols-outlined"},"attach_file",-1)),kc=200*1024*1024,iP="A chatbot component to build human-to-AI interactions.",lP=`[
  {
  "role": "assistant",
  "content": "How can I help you?"
  },
  {
  "role": "user",
  "content": "I'm building a Chatbot"
  }
]`,cP=`
def handle_message_simple(payload, state):

	# payload contains a dict in the form { "role": "user", "message": "hello"}

	state["conversation"] += [payload]
    state["conversation"] += [{
        "role": "assistant",
        "content": "Hello human" if payload == "Hello" else "I don't understand"
    }]

    # Handle streaming by appending to the last message

    import time
    for i in range(10):
        conv = state["conversation"]
        conv[-1]["content"] += f" {i}"
        state["conversation"] = conv
        time.sleep(0.5)
`.trim(),uP=`
def handle_action_simple(payload, state):

    # payload contains the "data" property of the action

    if payload == "change_title":
        state["app_background_color"] = "red"

# Make an action available when adding a message

def handle_message_with_action(payload, state):
    state["conversation"] += [payload]
    state["conversation"] += [{
        "role": "assistant",
        "content": "I don't know, but check this out.",
        "actions": [{
            "subheading": "Resource",
            "name": "Surprise",
            "desc": "Click to be surprised",
            "data": "change_title"
        }]
    }]
`.trim(),dP=`
def handle_file_upload(state, payload):

	# An array of dictionaries is provided in the payload
	# The dictionaries have the properties name, type and data
    # The data property is a file-like object

    uploaded_files = payload
    for i, uploaded_file in enumerate(uploaded_files):
        name = uploaded_file.get("name")
        file_data = uploaded_file.get("data")
        with open(f"{name}-{i}.jpeg", "wb") as file_handle:
            file_handle.write(file_data)
`.trim(),fP={writer:{name:"Chatbot",description:iP,category:"Content",fields:{conversation:{name:"Conversation",init:lP,desc:"An array with messages or a writer.ai.Conversation object.",type:L.Object,validator:Dk},assistantInitials:{name:"Assistant initials",default:"AI",type:L.Text},userInitials:{name:"User initials",default:"YOU",type:L.Text},useMarkdown:{name:"Use Markdown",desc:"If active, the output will be sanitized; unsafe elements will be removed.",default:"no",type:L.Text,options:{yes:"Yes",no:"No"}},enableFileUpload:{name:"Enable file upload",default:"no",type:L.Text,options:{single:"Single file",multiple:"Multiple files",no:"No"}},placeholder:{name:"Placeholder",default:"What do you need?",type:L.Text},assistantRoleColor:{name:"Assistant role",type:L.Color,category:Be.Style,applyStyleVariable:!0},userRoleColor:{name:"User role",default:Ct.Gray1,type:L.Color,category:Be.Style,applyStyleVariable:!0},avatarBackgroundColor:{name:"Avatar",default:Ct.Gray6,type:L.Color,category:Be.Style,applyStyleVariable:!0},avatarTextColor:{name:"Avatar text",default:Ct.White,type:L.Color,category:Be.Style,applyStyleVariable:!0},accentColor:en,containerBackgroundColor:yr,primaryTextColor:Ft,secondaryTextColor:Ln,separatorColor:Gt,buttonColor:{..._r,default:Ct.Black},buttonTextColor:{...br,default:Ct.White},cssClasses:et},events:{"wf-chatbot-message":{desc:"Triggered when the user sends a message.",stub:cP},"wf-chatbot-action-click":{desc:"Handle clicks on actions.",stub:uP},"wf-file-change":{desc:"Triggered when files are uploaded",stub:dP}}}},Yg=Pe({...fP,__name:"CoreChatbot",setup(e){const t=oe(null),n=oe(null),r=oe(null),a=oe(void 0),o=Z(ee.evaluatedFields),s=go([]),i=oe(!1);let l;const c=ne(()=>{var p;return((p=o.conversation)==null?void 0:p.value)??[]}),f=oe(""),u=ne(()=>{let p=0;return Array.from(s.value).forEach($=>{p+=$.size}),p>=kc}),m=ne(()=>a.value===void 0?!1:a.value>=c.value.length);function w(){if(a.value)return;a.value=c.value.length+1;const p=new CustomEvent("wf-chatbot-message",{detail:{payload:{role:"user",content:f.value},callback:()=>{a.value=void 0}}});t.value.dispatchEvent(p),f.value=""}function b(p){const{data:$}=p,E=new CustomEvent("wf-chatbot-action-click",{detail:{payload:$}});t.value.dispatchEvent(E)}function g(){const p=document.createElement("input");p.type="file",o.enableFileUpload.value=="multiple"&&(p.multiple=!0),p.addEventListener("change",()=>{let $;o.enableFileUpload.value=="multiple"?$=[...s.value]:$=[],Array.from(p.files).forEach(E=>{$.push(E)}),s.value=$}),p.dispatchEvent(new MouseEvent("click"))}function v(p){const $=s.value.toSpliced(p,1);s.value=$}function A(){n.value.scrollTo({top:n.value.scrollHeight,left:0})}const C=async p=>{const $=new FileReader;return $.readAsDataURL(p),new Promise((E,B)=>{$.onload=()=>E($.result),$.onerror=()=>B($.error)})};async function y(){if(s.value.length==0||i.value)return;i.value=!0;const $=await(async()=>{let B=0;const z=Promise.all(Array.from(s.value).map(async le=>(B+=le.size,{name:le.name,type:le.type,data:await C(le)})));if(B>kc){alert("Size limit exceeded.");return}return z})();if(!$){i.value=!1;return}const E=new CustomEvent("wf-file-change",{detail:{payload:$,callback:()=>{i.value=!1,s.value=[]}}});t.value.dispatchEvent(E)}return Zt(()=>{l=new ResizeObserver(()=>{A()}),l.observe(r.value)}),Ba(()=>{l.unobserve(r.value)}),(p,$)=>(T(),R("div",{ref_key:"rootEl",ref:t,class:"CoreChatbot"},[q("div",{ref_key:"messageAreaEl",ref:n,class:"messageArea"},[q("div",{ref_key:"messagesEl",ref:r,class:"messages"},[(T(!0),R(je,null,It(c.value,(E,B)=>(T(),Ue($h,{key:B,message:E,"use-markdown":P(o).useMarkdown.value=="yes","assistant-role-color":P(o).assistantRoleColor.value,initials:E.role==="assistant"?P(o).assistantInitials.value:P(o).userInitials.value,onActionClick:$[0]||($[0]=z=>b(z))},null,8,["message","use-markdown","assistant-role-color","initials"]))),128)),m.value?(T(),Ue($h,{key:0,"is-loading":"",initials:P(o).assistantInitials.value},null,8,["initials"])):xe("",!0)],512)],512),s.value.length>0?(T(),R(je,{key:0},[q("div",Jx,[i.value?(T(),R(je,{key:0},[xt(" Uploading... ")],64)):xe("",!0),i.value?xe("",!0):(T(),R("div",Yx,[(T(!0),R(je,null,It(s.value,(E,B)=>(T(),R("div",{key:B,class:"file"},[q("div",null,[q("div",{class:"name",title:E.name},Te(E.name),9,Qx),q("div",Xx,Te(P(Sh)(E.size)),1)]),Ye(nr,{onClick:z=>v(B)},{default:Ze(()=>[Zx]),_:2},1032,["onClick"])]))),128))]))]),q("div",eP,[!u.value&&!i.value?(T(),Ue(nr,{key:0,title:"Upload",onClick:y},{default:Ze(()=>[tP]),_:1})):xe("",!0),u.value?(T(),R("div",nP,[rP,xt(" Size limit of "+Te(P(Sh)(kc))+" exceeded. ",1)])):xe("",!0)])],64)):xe("",!0),q("div",aP,[Ye(qx,{modelValue:f.value,"onUpdate:modelValue":$[1]||($[1]=E=>f.value=E),placeholder:P(o).placeholder.value,onKeydown:aa(Ao(w,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"])]),q("div",oP,[Ye(nr,{class:"send action",title:"Send message",onClick:w},{default:Ze(()=>[Ye(xx)]),_:1}),P(o).enableFileUpload.value!="no"?(T(),Ue(nr,{key:0,class:"action",title:"Attach files",onClick:g},{default:Ze(()=>[sP]),_:1})):xe("",!0)])],512))}}),Eh=e=>{e.writer&&(e.writer.docs="Connect it to an LLM by handling the `wf-chatbot-message` event, which is triggered every time the user sends a message.\n\nYou can add `actions` to messages, which are buttons that trigger the `wf-chatbot-action-click`.\n\nSee the stubs for more details.")};typeof Eh=="function"&&Eh(Yg);const pP=Oe(Yg,[["__scopeId","data-v-b9a3a5ac"]]);var Qg={exports:{}};/**
 * chroma.js - JavaScript library for color conversions
 *
 * Copyright (c) 2011-2019, Gregor Aisch
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice, this
 * list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 *
 * 3. The name Gregor Aisch may not be used to endorse or promote products
 * derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * -------------------------------------------------------
 *
 * chroma.js includes colors from colorbrewer2.org, which are released under
 * the following license:
 *
 * Copyright (c) 2002 Cynthia Brewer, Mark Harrower,
 * and The Pennsylvania State University.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific
 * language governing permissions and limitations under the License.
 *
 * ------------------------------------------------------
 *
 * Named colors are taken from X11 Color Names.
 * http://www.w3.org/TR/css3-color/#svg-color
 *
 * @preserve
 */(function(e,t){(function(n,r){e.exports=r()})(jC,function(){for(var n=function(d,h,_){return h===void 0&&(h=0),_===void 0&&(_=1),d<h?h:d>_?_:d},r=n,a=function(d){d._clipped=!1,d._unclipped=d.slice(0);for(var h=0;h<=3;h++)h<3?((d[h]<0||d[h]>255)&&(d._clipped=!0),d[h]=r(d[h],0,255)):h===3&&(d[h]=r(d[h],0,1));return d},o={},s=0,i=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];s<i.length;s+=1){var l=i[s];o["[object "+l+"]"]=l.toLowerCase()}var c=function(d){return o[Object.prototype.toString.call(d)]||"object"},f=c,u=function(d,h){return h===void 0&&(h=null),d.length>=3?Array.prototype.slice.call(d):f(d[0])=="object"&&h?h.split("").filter(function(_){return d[0][_]!==void 0}).map(function(_){return d[0][_]}):d[0]},m=c,w=function(d){if(d.length<2)return null;var h=d.length-1;return m(d[h])=="string"?d[h].toLowerCase():null},b=Math.PI,g={clip_rgb:a,limit:n,type:c,unpack:u,last:w,PI:b,TWOPI:b*2,PITHIRD:b/3,DEG2RAD:b/180,RAD2DEG:180/b},v={format:{},autodetect:[]},A=g.last,C=g.clip_rgb,y=g.type,p=v,$=function(){for(var h=[],_=arguments.length;_--;)h[_]=arguments[_];var x=this;if(y(h[0])==="object"&&h[0].constructor&&h[0].constructor===this.constructor)return h[0];var D=A(h),U=!1;if(!D){U=!0,p.sorted||(p.autodetect=p.autodetect.sort(function(we,Fe){return Fe.p-we.p}),p.sorted=!0);for(var N=0,X=p.autodetect;N<X.length;N+=1){var te=X[N];if(D=te.test.apply(te,h),D)break}}if(p.format[D]){var ve=p.format[D].apply(null,U?h:h.slice(0,-1));x._rgb=C(ve)}else throw new Error("unknown format: "+h);x._rgb.length===3&&x._rgb.push(1)};$.prototype.toString=function(){return y(this.hex)=="function"?this.hex():"["+this._rgb.join(",")+"]"};var E=$,B=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];return new(Function.prototype.bind.apply(B.Color,[null].concat(d)))};B.Color=E,B.version="2.4.2";var z=B,le=g.unpack,fe=Math.max,Le=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];var _=le(d,"rgb"),x=_[0],D=_[1],U=_[2];x=x/255,D=D/255,U=U/255;var N=1-fe(x,fe(D,U)),X=N<1?1/(1-N):0,te=(1-x-N)*X,ve=(1-D-N)*X,we=(1-U-N)*X;return[te,ve,we,N]},be=Le,Ce=g.unpack,Re=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];d=Ce(d,"cmyk");var _=d[0],x=d[1],D=d[2],U=d[3],N=d.length>4?d[4]:1;return U===1?[0,0,0,N]:[_>=1?0:255*(1-_)*(1-U),x>=1?0:255*(1-x)*(1-U),D>=1?0:255*(1-D)*(1-U),N]},Je=Re,se=z,ce=E,he=v,ke=g.unpack,ye=g.type,j=be;ce.prototype.cmyk=function(){return j(this._rgb)},se.cmyk=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];return new(Function.prototype.bind.apply(ce,[null].concat(d,["cmyk"])))},he.format.cmyk=Je,he.autodetect.push({p:2,test:function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];if(d=ke(d,"cmyk"),ye(d)==="array"&&d.length===4)return"cmyk"}});var ue=g.unpack,O=g.last,I=function(d){return Math.round(d*100)/100},M=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];var _=ue(d,"hsla"),x=O(d)||"lsa";return _[0]=I(_[0]||0),_[1]=I(_[1]*100)+"%",_[2]=I(_[2]*100)+"%",x==="hsla"||_.length>3&&_[3]<1?(_[3]=_.length>3?_[3]:1,x="hsla"):_.length=3,x+"("+_.join(",")+")"},Q=M,Me=g.unpack,F=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];d=Me(d,"rgba");var _=d[0],x=d[1],D=d[2];_/=255,x/=255,D/=255;var U=Math.min(_,x,D),N=Math.max(_,x,D),X=(N+U)/2,te,ve;return N===U?(te=0,ve=Number.NaN):te=X<.5?(N-U)/(N+U):(N-U)/(2-N-U),_==N?ve=(x-D)/(N-U):x==N?ve=2+(D-_)/(N-U):D==N&&(ve=4+(_-x)/(N-U)),ve*=60,ve<0&&(ve+=360),d.length>3&&d[3]!==void 0?[ve,te,X,d[3]]:[ve,te,X]},G=F,J=g.unpack,ae=g.last,K=Q,S=G,k=Math.round,V=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];var _=J(d,"rgba"),x=ae(d)||"rgb";return x.substr(0,3)=="hsl"?K(S(_),x):(_[0]=k(_[0]),_[1]=k(_[1]),_[2]=k(_[2]),(x==="rgba"||_.length>3&&_[3]<1)&&(_[3]=_.length>3?_[3]:1,x="rgba"),x+"("+_.slice(0,x==="rgb"?3:4).join(",")+")")},Y=V,re=g.unpack,ie=Math.round,$e=function(){for(var d,h=[],_=arguments.length;_--;)h[_]=arguments[_];h=re(h,"hsl");var x=h[0],D=h[1],U=h[2],N,X,te;if(D===0)N=X=te=U*255;else{var ve=[0,0,0],we=[0,0,0],Fe=U<.5?U*(1+D):U+D-U*D,Ie=2*U-Fe,ze=x/360;ve[0]=ze+1/3,ve[1]=ze,ve[2]=ze-1/3;for(var He=0;He<3;He++)ve[He]<0&&(ve[He]+=1),ve[He]>1&&(ve[He]-=1),6*ve[He]<1?we[He]=Ie+(Fe-Ie)*6*ve[He]:2*ve[He]<1?we[He]=Fe:3*ve[He]<2?we[He]=Ie+(Fe-Ie)*(2/3-ve[He])*6:we[He]=Ie;d=[ie(we[0]*255),ie(we[1]*255),ie(we[2]*255)],N=d[0],X=d[1],te=d[2]}return h.length>3?[N,X,te,h[3]]:[N,X,te,1]},ge=$e,Ae=ge,_e=v,H=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,pe=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,de=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,me=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Ee=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,De=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,We=Math.round,nt=function(d){d=d.toLowerCase().trim();var h;if(_e.format.named)try{return _e.format.named(d)}catch{}if(h=d.match(H)){for(var _=h.slice(1,4),x=0;x<3;x++)_[x]=+_[x];return _[3]=1,_}if(h=d.match(pe)){for(var D=h.slice(1,5),U=0;U<4;U++)D[U]=+D[U];return D}if(h=d.match(de)){for(var N=h.slice(1,4),X=0;X<3;X++)N[X]=We(N[X]*2.55);return N[3]=1,N}if(h=d.match(me)){for(var te=h.slice(1,5),ve=0;ve<3;ve++)te[ve]=We(te[ve]*2.55);return te[3]=+te[3],te}if(h=d.match(Ee)){var we=h.slice(1,4);we[1]*=.01,we[2]*=.01;var Fe=Ae(we);return Fe[3]=1,Fe}if(h=d.match(De)){var Ie=h.slice(1,4);Ie[1]*=.01,Ie[2]*=.01;var ze=Ae(Ie);return ze[3]=+h[4],ze}};nt.test=function(d){return H.test(d)||pe.test(d)||de.test(d)||me.test(d)||Ee.test(d)||De.test(d)};var ot=nt,_t=z,jt=E,gt=v,sn=g.type,Rt=Y,bn=ot;jt.prototype.css=function(d){return Rt(this._rgb,d)},_t.css=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];return new(Function.prototype.bind.apply(jt,[null].concat(d,["css"])))},gt.format.css=bn,gt.autodetect.push({p:5,test:function(d){for(var h=[],_=arguments.length-1;_-- >0;)h[_]=arguments[_+1];if(!h.length&&sn(d)==="string"&&bn.test(d))return"css"}});var la=E,Ht=z,Or=v,xl=g.unpack;Or.format.gl=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];var _=xl(d,"rgba");return _[0]*=255,_[1]*=255,_[2]*=255,_},Ht.gl=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];return new(Function.prototype.bind.apply(la,[null].concat(d,["gl"])))},la.prototype.gl=function(){var d=this._rgb;return[d[0]/255,d[1]/255,d[2]/255,d[3]]};var Ls=g.unpack,No=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];var _=Ls(d,"rgb"),x=_[0],D=_[1],U=_[2],N=Math.min(x,D,U),X=Math.max(x,D,U),te=X-N,ve=te*100/255,we=N/(255-te)*100,Fe;return te===0?Fe=Number.NaN:(x===X&&(Fe=(D-U)/te),D===X&&(Fe=2+(U-x)/te),U===X&&(Fe=4+(x-D)/te),Fe*=60,Fe<0&&(Fe+=360)),[Fe,ve,we]},Ds=No,Fs=g.unpack,Pl=Math.floor,js=function(){for(var d,h,_,x,D,U,N=[],X=arguments.length;X--;)N[X]=arguments[X];N=Fs(N,"hcg");var te=N[0],ve=N[1],we=N[2],Fe,Ie,ze;we=we*255;var He=ve*255;if(ve===0)Fe=Ie=ze=we;else{te===360&&(te=0),te>360&&(te-=360),te<0&&(te+=360),te/=60;var it=Pl(te),ht=te-it,bt=we*(1-ve),$t=bt+He*(1-ht),ln=bt+He*ht,rn=bt+He;switch(it){case 0:d=[rn,ln,bt],Fe=d[0],Ie=d[1],ze=d[2];break;case 1:h=[$t,rn,bt],Fe=h[0],Ie=h[1],ze=h[2];break;case 2:_=[bt,rn,ln],Fe=_[0],Ie=_[1],ze=_[2];break;case 3:x=[bt,$t,rn],Fe=x[0],Ie=x[1],ze=x[2];break;case 4:D=[ln,bt,rn],Fe=D[0],Ie=D[1],ze=D[2];break;case 5:U=[rn,bt,$t],Fe=U[0],Ie=U[1],ze=U[2];break}}return[Fe,Ie,ze,N.length>3?N[3]:1]},Vs=js,Ml=g.unpack,wr=g.type,Oo=z,Ro=E,Lo=v,Nl=Ds;Ro.prototype.hcg=function(){return Nl(this._rgb)},Oo.hcg=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];return new(Function.prototype.bind.apply(Ro,[null].concat(d,["hcg"])))},Lo.format.hcg=Vs,Lo.autodetect.push({p:1,test:function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];if(d=Ml(d,"hcg"),wr(d)==="array"&&d.length===3)return"hcg"}});var Bs=g.unpack,Jn=g.last,ca=Math.round,Us=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];var _=Bs(d,"rgba"),x=_[0],D=_[1],U=_[2],N=_[3],X=Jn(d)||"auto";N===void 0&&(N=1),X==="auto"&&(X=N<1?"rgba":"rgb"),x=ca(x),D=ca(D),U=ca(U);var te=x<<16|D<<8|U,ve="000000"+te.toString(16);ve=ve.substr(ve.length-6);var we="0"+ca(N*255).toString(16);switch(we=we.substr(we.length-2),X.toLowerCase()){case"rgba":return"#"+ve+we;case"argb":return"#"+we+ve;default:return"#"+ve}},Do=Us,Hs=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Ol=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Qe=function(d){if(d.match(Hs)){(d.length===4||d.length===7)&&(d=d.substr(1)),d.length===3&&(d=d.split(""),d=d[0]+d[0]+d[1]+d[1]+d[2]+d[2]);var h=parseInt(d,16),_=h>>16,x=h>>8&255,D=h&255;return[_,x,D,1]}if(d.match(Ol)){(d.length===5||d.length===9)&&(d=d.substr(1)),d.length===4&&(d=d.split(""),d=d[0]+d[0]+d[1]+d[1]+d[2]+d[2]+d[3]+d[3]);var U=parseInt(d,16),N=U>>24&255,X=U>>16&255,te=U>>8&255,ve=Math.round((U&255)/255*100)/100;return[N,X,te,ve]}throw new Error("unknown hex color: "+d)},W=Qe,Ne=z,Ge=E,Pt=g.type,qt=v,tn=Do;Ge.prototype.hex=function(d){return tn(this._rgb,d)},Ne.hex=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];return new(Function.prototype.bind.apply(Ge,[null].concat(d,["hex"])))},qt.format.hex=W,qt.autodetect.push({p:4,test:function(d){for(var h=[],_=arguments.length-1;_-- >0;)h[_]=arguments[_+1];if(!h.length&&Pt(d)==="string"&&[3,4,5,6,7,8,9].indexOf(d.length)>=0)return"hex"}});var hn=g.unpack,ur=g.TWOPI,ua=Math.min,mn=Math.sqrt,zs=Math.acos,Ks=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];var _=hn(d,"rgb"),x=_[0],D=_[1],U=_[2];x/=255,D/=255,U/=255;var N,X=ua(x,D,U),te=(x+D+U)/3,ve=te>0?1-X/te:0;return ve===0?N=NaN:(N=(x-D+(x-U))/2,N/=mn((x-D)*(x-D)+(x-U)*(D-U)),N=zs(N),U>D&&(N=ur-N),N/=ur),[N*360,ve,te]},Ey=Ks,ky=g.unpack,Rl=g.limit,za=g.TWOPI,Ll=g.PITHIRD,Ka=Math.cos,Ty=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];d=ky(d,"hsi");var _=d[0],x=d[1],D=d[2],U,N,X;return isNaN(_)&&(_=0),isNaN(x)&&(x=0),_>360&&(_-=360),_<0&&(_+=360),_/=360,_<1/3?(X=(1-x)/3,U=(1+x*Ka(za*_)/Ka(Ll-za*_))/3,N=1-(X+U)):_<2/3?(_-=1/3,U=(1-x)/3,N=(1+x*Ka(za*_)/Ka(Ll-za*_))/3,X=1-(U+N)):(_-=2/3,N=(1-x)/3,X=(1+x*Ka(za*_)/Ka(Ll-za*_))/3,U=1-(N+X)),U=Rl(D*U*3),N=Rl(D*N*3),X=Rl(D*X*3),[U*255,N*255,X*255,d.length>3?d[3]:1]},xy=Ty,Py=g.unpack,My=g.type,Ny=z,Wd=E,Gd=v,Oy=Ey;Wd.prototype.hsi=function(){return Oy(this._rgb)},Ny.hsi=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];return new(Function.prototype.bind.apply(Wd,[null].concat(d,["hsi"])))},Gd.format.hsi=xy,Gd.autodetect.push({p:2,test:function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];if(d=Py(d,"hsi"),My(d)==="array"&&d.length===3)return"hsi"}});var Ry=g.unpack,Ly=g.type,Dy=z,qd=E,Jd=v,Fy=G;qd.prototype.hsl=function(){return Fy(this._rgb)},Dy.hsl=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];return new(Function.prototype.bind.apply(qd,[null].concat(d,["hsl"])))},Jd.format.hsl=ge,Jd.autodetect.push({p:2,test:function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];if(d=Ry(d,"hsl"),Ly(d)==="array"&&d.length===3)return"hsl"}});var jy=g.unpack,Vy=Math.min,By=Math.max,Uy=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];d=jy(d,"rgb");var _=d[0],x=d[1],D=d[2],U=Vy(_,x,D),N=By(_,x,D),X=N-U,te,ve,we;return we=N/255,N===0?(te=Number.NaN,ve=0):(ve=X/N,_===N&&(te=(x-D)/X),x===N&&(te=2+(D-_)/X),D===N&&(te=4+(_-x)/X),te*=60,te<0&&(te+=360)),[te,ve,we]},Hy=Uy,zy=g.unpack,Ky=Math.floor,Wy=function(){for(var d,h,_,x,D,U,N=[],X=arguments.length;X--;)N[X]=arguments[X];N=zy(N,"hsv");var te=N[0],ve=N[1],we=N[2],Fe,Ie,ze;if(we*=255,ve===0)Fe=Ie=ze=we;else{te===360&&(te=0),te>360&&(te-=360),te<0&&(te+=360),te/=60;var He=Ky(te),it=te-He,ht=we*(1-ve),bt=we*(1-ve*it),$t=we*(1-ve*(1-it));switch(He){case 0:d=[we,$t,ht],Fe=d[0],Ie=d[1],ze=d[2];break;case 1:h=[bt,we,ht],Fe=h[0],Ie=h[1],ze=h[2];break;case 2:_=[ht,we,$t],Fe=_[0],Ie=_[1],ze=_[2];break;case 3:x=[ht,bt,we],Fe=x[0],Ie=x[1],ze=x[2];break;case 4:D=[$t,ht,we],Fe=D[0],Ie=D[1],ze=D[2];break;case 5:U=[we,ht,bt],Fe=U[0],Ie=U[1],ze=U[2];break}}return[Fe,Ie,ze,N.length>3?N[3]:1]},Gy=Wy,qy=g.unpack,Jy=g.type,Yy=z,Yd=E,Qd=v,Qy=Hy;Yd.prototype.hsv=function(){return Qy(this._rgb)},Yy.hsv=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];return new(Function.prototype.bind.apply(Yd,[null].concat(d,["hsv"])))},Qd.format.hsv=Gy,Qd.autodetect.push({p:2,test:function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];if(d=qy(d,"hsv"),Jy(d)==="array"&&d.length===3)return"hsv"}});var Ws={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Wa=Ws,Xy=g.unpack,Xd=Math.pow,Zy=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];var _=Xy(d,"rgb"),x=_[0],D=_[1],U=_[2],N=e_(x,D,U),X=N[0],te=N[1],ve=N[2],we=116*te-16;return[we<0?0:we,500*(X-te),200*(te-ve)]},Dl=function(d){return(d/=255)<=.04045?d/12.92:Xd((d+.055)/1.055,2.4)},Fl=function(d){return d>Wa.t3?Xd(d,1/3):d/Wa.t2+Wa.t0},e_=function(d,h,_){d=Dl(d),h=Dl(h),_=Dl(_);var x=Fl((.4124564*d+.3575761*h+.1804375*_)/Wa.Xn),D=Fl((.2126729*d+.7151522*h+.072175*_)/Wa.Yn),U=Fl((.0193339*d+.119192*h+.9503041*_)/Wa.Zn);return[x,D,U]},Zd=Zy,Ga=Ws,t_=g.unpack,n_=Math.pow,r_=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];d=t_(d,"lab");var _=d[0],x=d[1],D=d[2],U,N,X,te,ve,we;return N=(_+16)/116,U=isNaN(x)?N:N+x/500,X=isNaN(D)?N:N-D/200,N=Ga.Yn*Vl(N),U=Ga.Xn*Vl(U),X=Ga.Zn*Vl(X),te=jl(3.2404542*U-1.5371385*N-.4985314*X),ve=jl(-.969266*U+1.8760108*N+.041556*X),we=jl(.0556434*U-.2040259*N+1.0572252*X),[te,ve,we,d.length>3?d[3]:1]},jl=function(d){return 255*(d<=.00304?12.92*d:1.055*n_(d,1/2.4)-.055)},Vl=function(d){return d>Ga.t1?d*d*d:Ga.t2*(d-Ga.t0)},ef=r_,a_=g.unpack,o_=g.type,s_=z,tf=E,nf=v,i_=Zd;tf.prototype.lab=function(){return i_(this._rgb)},s_.lab=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];return new(Function.prototype.bind.apply(tf,[null].concat(d,["lab"])))},nf.format.lab=ef,nf.autodetect.push({p:2,test:function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];if(d=a_(d,"lab"),o_(d)==="array"&&d.length===3)return"lab"}});var l_=g.unpack,c_=g.RAD2DEG,u_=Math.sqrt,d_=Math.atan2,f_=Math.round,p_=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];var _=l_(d,"lab"),x=_[0],D=_[1],U=_[2],N=u_(D*D+U*U),X=(d_(U,D)*c_+360)%360;return f_(N*1e4)===0&&(X=Number.NaN),[x,N,X]},rf=p_,h_=g.unpack,m_=Zd,v_=rf,g_=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];var _=h_(d,"rgb"),x=_[0],D=_[1],U=_[2],N=m_(x,D,U),X=N[0],te=N[1],ve=N[2];return v_(X,te,ve)},y_=g_,__=g.unpack,b_=g.DEG2RAD,w_=Math.sin,A_=Math.cos,C_=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];var _=__(d,"lch"),x=_[0],D=_[1],U=_[2];return isNaN(U)&&(U=0),U=U*b_,[x,A_(U)*D,w_(U)*D]},af=C_,$_=g.unpack,I_=af,S_=ef,E_=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];d=$_(d,"lch");var _=d[0],x=d[1],D=d[2],U=I_(_,x,D),N=U[0],X=U[1],te=U[2],ve=S_(N,X,te),we=ve[0],Fe=ve[1],Ie=ve[2];return[we,Fe,Ie,d.length>3?d[3]:1]},of=E_,k_=g.unpack,T_=of,x_=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];var _=k_(d,"hcl").reverse();return T_.apply(void 0,_)},P_=x_,M_=g.unpack,N_=g.type,sf=z,Gs=E,Bl=v,lf=y_;Gs.prototype.lch=function(){return lf(this._rgb)},Gs.prototype.hcl=function(){return lf(this._rgb).reverse()},sf.lch=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];return new(Function.prototype.bind.apply(Gs,[null].concat(d,["lch"])))},sf.hcl=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];return new(Function.prototype.bind.apply(Gs,[null].concat(d,["hcl"])))},Bl.format.lch=of,Bl.format.hcl=P_,["lch","hcl"].forEach(function(d){return Bl.autodetect.push({p:2,test:function(){for(var h=[],_=arguments.length;_--;)h[_]=arguments[_];if(h=M_(h,d),N_(h)==="array"&&h.length===3)return d}})});var O_={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},cf=O_,R_=E,uf=v,L_=g.type,Fo=cf,D_=W,F_=Do;R_.prototype.name=function(){for(var d=F_(this._rgb,"rgb"),h=0,_=Object.keys(Fo);h<_.length;h+=1){var x=_[h];if(Fo[x]===d)return x.toLowerCase()}return d},uf.format.named=function(d){if(d=d.toLowerCase(),Fo[d])return D_(Fo[d]);throw new Error("unknown color name: "+d)},uf.autodetect.push({p:5,test:function(d){for(var h=[],_=arguments.length-1;_-- >0;)h[_]=arguments[_+1];if(!h.length&&L_(d)==="string"&&Fo[d.toLowerCase()])return"named"}});var j_=g.unpack,V_=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];var _=j_(d,"rgb"),x=_[0],D=_[1],U=_[2];return(x<<16)+(D<<8)+U},B_=V_,U_=g.type,H_=function(d){if(U_(d)=="number"&&d>=0&&d<=16777215){var h=d>>16,_=d>>8&255,x=d&255;return[h,_,x,1]}throw new Error("unknown num color: "+d)},z_=H_,K_=z,df=E,ff=v,W_=g.type,G_=B_;df.prototype.num=function(){return G_(this._rgb)},K_.num=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];return new(Function.prototype.bind.apply(df,[null].concat(d,["num"])))},ff.format.num=z_,ff.autodetect.push({p:5,test:function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];if(d.length===1&&W_(d[0])==="number"&&d[0]>=0&&d[0]<=16777215)return"num"}});var q_=z,Ul=E,pf=v,hf=g.unpack,mf=g.type,vf=Math.round;Ul.prototype.rgb=function(d){return d===void 0&&(d=!0),d===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(vf)},Ul.prototype.rgba=function(d){return d===void 0&&(d=!0),this._rgb.slice(0,4).map(function(h,_){return _<3?d===!1?h:vf(h):h})},q_.rgb=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];return new(Function.prototype.bind.apply(Ul,[null].concat(d,["rgb"])))},pf.format.rgb=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];var _=hf(d,"rgba");return _[3]===void 0&&(_[3]=1),_},pf.autodetect.push({p:3,test:function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];if(d=hf(d,"rgba"),mf(d)==="array"&&(d.length===3||d.length===4&&mf(d[3])=="number"&&d[3]>=0&&d[3]<=1))return"rgb"}});var qs=Math.log,J_=function(d){var h=d/100,_,x,D;return h<66?(_=255,x=h<6?0:-155.25485562709179-.44596950469579133*(x=h-2)+104.49216199393888*qs(x),D=h<20?0:-254.76935184120902+.8274096064007395*(D=h-10)+115.67994401066147*qs(D)):(_=351.97690566805693+.114206453784165*(_=h-55)-40.25366309332127*qs(_),x=325.4494125711974+.07943456536662342*(x=h-50)-28.0852963507957*qs(x),D=255),[_,x,D,1]},gf=J_,Y_=gf,Q_=g.unpack,X_=Math.round,Z_=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];for(var _=Q_(d,"rgb"),x=_[0],D=_[2],U=1e3,N=4e4,X=.4,te;N-U>X;){te=(N+U)*.5;var ve=Y_(te);ve[2]/ve[0]>=D/x?N=te:U=te}return X_(te)},eb=Z_,Hl=z,Js=E,zl=v,tb=eb;Js.prototype.temp=Js.prototype.kelvin=Js.prototype.temperature=function(){return tb(this._rgb)},Hl.temp=Hl.kelvin=Hl.temperature=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];return new(Function.prototype.bind.apply(Js,[null].concat(d,["temp"])))},zl.format.temp=zl.format.kelvin=zl.format.temperature=gf;var nb=g.unpack,Kl=Math.cbrt,rb=Math.pow,ab=Math.sign,ob=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];var _=nb(d,"rgb"),x=_[0],D=_[1],U=_[2],N=[Wl(x/255),Wl(D/255),Wl(U/255)],X=N[0],te=N[1],ve=N[2],we=Kl(.4122214708*X+.5363325363*te+.0514459929*ve),Fe=Kl(.2119034982*X+.6806995451*te+.1073969566*ve),Ie=Kl(.0883024619*X+.2817188376*te+.6299787005*ve);return[.2104542553*we+.793617785*Fe-.0040720468*Ie,1.9779984951*we-2.428592205*Fe+.4505937099*Ie,.0259040371*we+.7827717662*Fe-.808675766*Ie]},yf=ob;function Wl(d){var h=Math.abs(d);return h<.04045?d/12.92:(ab(d)||1)*rb((h+.055)/1.055,2.4)}var sb=g.unpack,Ys=Math.pow,ib=Math.sign,lb=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];d=sb(d,"lab");var _=d[0],x=d[1],D=d[2],U=Ys(_+.3963377774*x+.2158037573*D,3),N=Ys(_-.1055613458*x-.0638541728*D,3),X=Ys(_-.0894841775*x-1.291485548*D,3);return[255*Gl(4.0767416621*U-3.3077115913*N+.2309699292*X),255*Gl(-1.2684380046*U+2.6097574011*N-.3413193965*X),255*Gl(-.0041960863*U-.7034186147*N+1.707614701*X),d.length>3?d[3]:1]},_f=lb;function Gl(d){var h=Math.abs(d);return h>.0031308?(ib(d)||1)*(1.055*Ys(h,1/2.4)-.055):d*12.92}var cb=g.unpack,ub=g.type,db=z,bf=E,wf=v,fb=yf;bf.prototype.oklab=function(){return fb(this._rgb)},db.oklab=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];return new(Function.prototype.bind.apply(bf,[null].concat(d,["oklab"])))},wf.format.oklab=_f,wf.autodetect.push({p:3,test:function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];if(d=cb(d,"oklab"),ub(d)==="array"&&d.length===3)return"oklab"}});var pb=g.unpack,hb=yf,mb=rf,vb=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];var _=pb(d,"rgb"),x=_[0],D=_[1],U=_[2],N=hb(x,D,U),X=N[0],te=N[1],ve=N[2];return mb(X,te,ve)},gb=vb,yb=g.unpack,_b=af,bb=_f,wb=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];d=yb(d,"lch");var _=d[0],x=d[1],D=d[2],U=_b(_,x,D),N=U[0],X=U[1],te=U[2],ve=bb(N,X,te),we=ve[0],Fe=ve[1],Ie=ve[2];return[we,Fe,Ie,d.length>3?d[3]:1]},Ab=wb,Cb=g.unpack,$b=g.type,Ib=z,Af=E,Cf=v,Sb=gb;Af.prototype.oklch=function(){return Sb(this._rgb)},Ib.oklch=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];return new(Function.prototype.bind.apply(Af,[null].concat(d,["oklch"])))},Cf.format.oklch=Ab,Cf.autodetect.push({p:3,test:function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];if(d=Cb(d,"oklch"),$b(d)==="array"&&d.length===3)return"oklch"}});var $f=E,Eb=g.type;$f.prototype.alpha=function(d,h){return h===void 0&&(h=!1),d!==void 0&&Eb(d)==="number"?h?(this._rgb[3]=d,this):new $f([this._rgb[0],this._rgb[1],this._rgb[2],d],"rgb"):this._rgb[3]};var kb=E;kb.prototype.clipped=function(){return this._rgb._clipped||!1};var da=E,Tb=Ws;da.prototype.darken=function(d){d===void 0&&(d=1);var h=this,_=h.lab();return _[0]-=Tb.Kn*d,new da(_,"lab").alpha(h.alpha(),!0)},da.prototype.brighten=function(d){return d===void 0&&(d=1),this.darken(-d)},da.prototype.darker=da.prototype.darken,da.prototype.brighter=da.prototype.brighten;var xb=E;xb.prototype.get=function(d){var h=d.split("."),_=h[0],x=h[1],D=this[_]();if(x){var U=_.indexOf(x)-(_.substr(0,2)==="ok"?2:0);if(U>-1)return D[U];throw new Error("unknown channel "+x+" in mode "+_)}else return D};var qa=E,Pb=g.type,Mb=Math.pow,Nb=1e-7,Ob=20;qa.prototype.luminance=function(d){if(d!==void 0&&Pb(d)==="number"){if(d===0)return new qa([0,0,0,this._rgb[3]],"rgb");if(d===1)return new qa([255,255,255,this._rgb[3]],"rgb");var h=this.luminance(),_="rgb",x=Ob,D=function(N,X){var te=N.interpolate(X,.5,_),ve=te.luminance();return Math.abs(d-ve)<Nb||!x--?te:ve>d?D(N,te):D(te,X)},U=(h>d?D(new qa([0,0,0]),this):D(this,new qa([255,255,255]))).rgb();return new qa(U.concat([this._rgb[3]]))}return Rb.apply(void 0,this._rgb.slice(0,3))};var Rb=function(d,h,_){return d=ql(d),h=ql(h),_=ql(_),.2126*d+.7152*h+.0722*_},ql=function(d){return d/=255,d<=.03928?d/12.92:Mb((d+.055)/1.055,2.4)},Dn={},If=E,Sf=g.type,Qs=Dn,Ef=function(d,h,_){_===void 0&&(_=.5);for(var x=[],D=arguments.length-3;D-- >0;)x[D]=arguments[D+3];var U=x[0]||"lrgb";if(!Qs[U]&&!x.length&&(U=Object.keys(Qs)[0]),!Qs[U])throw new Error("interpolation mode "+U+" is not defined");return Sf(d)!=="object"&&(d=new If(d)),Sf(h)!=="object"&&(h=new If(h)),Qs[U](d,h,_).alpha(d.alpha()+_*(h.alpha()-d.alpha()))},kf=E,Lb=Ef;kf.prototype.mix=kf.prototype.interpolate=function(d,h){h===void 0&&(h=.5);for(var _=[],x=arguments.length-2;x-- >0;)_[x]=arguments[x+2];return Lb.apply(void 0,[this,d,h].concat(_))};var Tf=E;Tf.prototype.premultiply=function(d){d===void 0&&(d=!1);var h=this._rgb,_=h[3];return d?(this._rgb=[h[0]*_,h[1]*_,h[2]*_,_],this):new Tf([h[0]*_,h[1]*_,h[2]*_,_],"rgb")};var Jl=E,Db=Ws;Jl.prototype.saturate=function(d){d===void 0&&(d=1);var h=this,_=h.lch();return _[1]+=Db.Kn*d,_[1]<0&&(_[1]=0),new Jl(_,"lch").alpha(h.alpha(),!0)},Jl.prototype.desaturate=function(d){return d===void 0&&(d=1),this.saturate(-d)};var xf=E,Pf=g.type;xf.prototype.set=function(d,h,_){_===void 0&&(_=!1);var x=d.split("."),D=x[0],U=x[1],N=this[D]();if(U){var X=D.indexOf(U)-(D.substr(0,2)==="ok"?2:0);if(X>-1){if(Pf(h)=="string")switch(h.charAt(0)){case"+":N[X]+=+h;break;case"-":N[X]+=+h;break;case"*":N[X]*=+h.substr(1);break;case"/":N[X]/=+h.substr(1);break;default:N[X]=+h}else if(Pf(h)==="number")N[X]=h;else throw new Error("unsupported value for Color.set");var te=new xf(N,D);return _?(this._rgb=te._rgb,this):te}throw new Error("unknown channel "+U+" in mode "+D)}else return N};var Fb=E,jb=function(d,h,_){var x=d._rgb,D=h._rgb;return new Fb(x[0]+_*(D[0]-x[0]),x[1]+_*(D[1]-x[1]),x[2]+_*(D[2]-x[2]),"rgb")};Dn.rgb=jb;var Vb=E,Yl=Math.sqrt,Ja=Math.pow,Bb=function(d,h,_){var x=d._rgb,D=x[0],U=x[1],N=x[2],X=h._rgb,te=X[0],ve=X[1],we=X[2];return new Vb(Yl(Ja(D,2)*(1-_)+Ja(te,2)*_),Yl(Ja(U,2)*(1-_)+Ja(ve,2)*_),Yl(Ja(N,2)*(1-_)+Ja(we,2)*_),"rgb")};Dn.lrgb=Bb;var Ub=E,Hb=function(d,h,_){var x=d.lab(),D=h.lab();return new Ub(x[0]+_*(D[0]-x[0]),x[1]+_*(D[1]-x[1]),x[2]+_*(D[2]-x[2]),"lab")};Dn.lab=Hb;var Mf=E,Ya=function(d,h,_,x){var D,U,N,X;x==="hsl"?(N=d.hsl(),X=h.hsl()):x==="hsv"?(N=d.hsv(),X=h.hsv()):x==="hcg"?(N=d.hcg(),X=h.hcg()):x==="hsi"?(N=d.hsi(),X=h.hsi()):x==="lch"||x==="hcl"?(x="hcl",N=d.hcl(),X=h.hcl()):x==="oklch"&&(N=d.oklch().reverse(),X=h.oklch().reverse());var te,ve,we,Fe,Ie,ze;(x.substr(0,1)==="h"||x==="oklch")&&(D=N,te=D[0],we=D[1],Ie=D[2],U=X,ve=U[0],Fe=U[1],ze=U[2]);var He,it,ht,bt;return!isNaN(te)&&!isNaN(ve)?(ve>te&&ve-te>180?bt=ve-(te+360):ve<te&&te-ve>180?bt=ve+360-te:bt=ve-te,it=te+_*bt):isNaN(te)?isNaN(ve)?it=Number.NaN:(it=ve,(Ie==1||Ie==0)&&x!="hsv"&&(He=Fe)):(it=te,(ze==1||ze==0)&&x!="hsv"&&(He=we)),He===void 0&&(He=we+_*(Fe-we)),ht=Ie+_*(ze-Ie),x==="oklch"?new Mf([ht,He,it],x):new Mf([it,He,ht],x)},zb=Ya,Nf=function(d,h,_){return zb(d,h,_,"lch")};Dn.lch=Nf,Dn.hcl=Nf;var Kb=E,Wb=function(d,h,_){var x=d.num(),D=h.num();return new Kb(x+_*(D-x),"num")};Dn.num=Wb;var Gb=Ya,qb=function(d,h,_){return Gb(d,h,_,"hcg")};Dn.hcg=qb;var Jb=Ya,Yb=function(d,h,_){return Jb(d,h,_,"hsi")};Dn.hsi=Yb;var Qb=Ya,Xb=function(d,h,_){return Qb(d,h,_,"hsl")};Dn.hsl=Xb;var Zb=Ya,e0=function(d,h,_){return Zb(d,h,_,"hsv")};Dn.hsv=e0;var t0=E,n0=function(d,h,_){var x=d.oklab(),D=h.oklab();return new t0(x[0]+_*(D[0]-x[0]),x[1]+_*(D[1]-x[1]),x[2]+_*(D[2]-x[2]),"oklab")};Dn.oklab=n0;var r0=Ya,a0=function(d,h,_){return r0(d,h,_,"oklch")};Dn.oklch=a0;var Ql=E,o0=g.clip_rgb,Xl=Math.pow,Zl=Math.sqrt,ec=Math.PI,Of=Math.cos,Rf=Math.sin,s0=Math.atan2,i0=function(d,h,_){h===void 0&&(h="lrgb"),_===void 0&&(_=null);var x=d.length;_||(_=Array.from(new Array(x)).map(function(){return 1}));var D=x/_.reduce(function(it,ht){return it+ht});if(_.forEach(function(it,ht){_[ht]*=D}),d=d.map(function(it){return new Ql(it)}),h==="lrgb")return l0(d,_);for(var U=d.shift(),N=U.get(h),X=[],te=0,ve=0,we=0;we<N.length;we++)if(N[we]=(N[we]||0)*_[0],X.push(isNaN(N[we])?0:_[0]),h.charAt(we)==="h"&&!isNaN(N[we])){var Fe=N[we]/180*ec;te+=Of(Fe)*_[0],ve+=Rf(Fe)*_[0]}var Ie=U.alpha()*_[0];d.forEach(function(it,ht){var bt=it.get(h);Ie+=it.alpha()*_[ht+1];for(var $t=0;$t<N.length;$t++)if(!isNaN(bt[$t]))if(X[$t]+=_[ht+1],h.charAt($t)==="h"){var ln=bt[$t]/180*ec;te+=Of(ln)*_[ht+1],ve+=Rf(ln)*_[ht+1]}else N[$t]+=bt[$t]*_[ht+1]});for(var ze=0;ze<N.length;ze++)if(h.charAt(ze)==="h"){for(var He=s0(ve/X[ze],te/X[ze])/ec*180;He<0;)He+=360;for(;He>=360;)He-=360;N[ze]=He}else N[ze]=N[ze]/X[ze];return Ie/=x,new Ql(N,h).alpha(Ie>.99999?1:Ie,!0)},l0=function(d,h){for(var _=d.length,x=[0,0,0,0],D=0;D<d.length;D++){var U=d[D],N=h[D]/_,X=U._rgb;x[0]+=Xl(X[0],2)*N,x[1]+=Xl(X[1],2)*N,x[2]+=Xl(X[2],2)*N,x[3]+=X[3]*N}return x[0]=Zl(x[0]),x[1]=Zl(x[1]),x[2]=Zl(x[2]),x[3]>.9999999&&(x[3]=1),new Ql(o0(x))},Yn=z,Qa=g.type,c0=Math.pow,tc=function(d){var h="rgb",_=Yn("#ccc"),x=0,D=[0,1],U=[],N=[0,0],X=!1,te=[],ve=!1,we=0,Fe=1,Ie=!1,ze={},He=!0,it=1,ht=function(Se){if(Se=Se||["#fff","#000"],Se&&Qa(Se)==="string"&&Yn.brewer&&Yn.brewer[Se.toLowerCase()]&&(Se=Yn.brewer[Se.toLowerCase()]),Qa(Se)==="array"){Se.length===1&&(Se=[Se[0],Se[0]]),Se=Se.slice(0);for(var tt=0;tt<Se.length;tt++)Se[tt]=Yn(Se[tt]);U.length=0;for(var dt=0;dt<Se.length;dt++)U.push(dt/(Se.length-1))}return Sn(),te=Se},bt=function(Se){if(X!=null){for(var tt=X.length-1,dt=0;dt<tt&&Se>=X[dt];)dt++;return dt-1}return 0},$t=function(Se){return Se},ln=function(Se){return Se},rn=function(Se,tt){var dt,lt;if(tt==null&&(tt=!1),isNaN(Se)||Se===null)return _;if(tt)lt=Se;else if(X&&X.length>2){var cn=bt(Se);lt=cn/(X.length-2)}else Fe!==we?lt=(Se-we)/(Fe-we):lt=1;lt=ln(lt),tt||(lt=$t(lt)),it!==1&&(lt=c0(lt,it)),lt=N[0]+lt*(1-N[0]-N[1]),lt=Math.min(1,Math.max(0,lt));var Ot=Math.floor(lt*1e4);if(He&&ze[Ot])dt=ze[Ot];else{if(Qa(te)==="array")for(var wt=0;wt<U.length;wt++){var St=U[wt];if(lt<=St){dt=te[wt];break}if(lt>=St&&wt===U.length-1){dt=te[wt];break}if(lt>St&&lt<U[wt+1]){lt=(lt-St)/(U[wt+1]-St),dt=Yn.interpolate(te[wt],te[wt+1],lt,h);break}}else Qa(te)==="function"&&(dt=te(lt));He&&(ze[Ot]=dt)}return dt},Sn=function(){return ze={}};ht(d);var yt=function(Se){var tt=Yn(rn(Se));return ve&&tt[ve]?tt[ve]():tt};return yt.classes=function(Se){if(Se!=null){if(Qa(Se)==="array")X=Se,D=[Se[0],Se[Se.length-1]];else{var tt=Yn.analyze(D);Se===0?X=[tt.min,tt.max]:X=Yn.limits(tt,"e",Se)}return yt}return X},yt.domain=function(Se){if(!arguments.length)return D;we=Se[0],Fe=Se[Se.length-1],U=[];var tt=te.length;if(Se.length===tt&&we!==Fe)for(var dt=0,lt=Array.from(Se);dt<lt.length;dt+=1){var cn=lt[dt];U.push((cn-we)/(Fe-we))}else{for(var Ot=0;Ot<tt;Ot++)U.push(Ot/(tt-1));if(Se.length>2){var wt=Se.map(function(Et,kt){return kt/(Se.length-1)}),St=Se.map(function(Et){return(Et-we)/(Fe-we)});St.every(function(Et,kt){return wt[kt]===Et})||(ln=function(Et){if(Et<=0||Et>=1)return Et;for(var kt=0;Et>=St[kt+1];)kt++;var Xn=(Et-St[kt])/(St[kt+1]-St[kt]),Dr=wt[kt]+Xn*(wt[kt+1]-wt[kt]);return Dr})}}return D=[we,Fe],yt},yt.mode=function(Se){return arguments.length?(h=Se,Sn(),yt):h},yt.range=function(Se,tt){return ht(Se),yt},yt.out=function(Se){return ve=Se,yt},yt.spread=function(Se){return arguments.length?(x=Se,yt):x},yt.correctLightness=function(Se){return Se==null&&(Se=!0),Ie=Se,Sn(),Ie?$t=function(tt){for(var dt=rn(0,!0).lab()[0],lt=rn(1,!0).lab()[0],cn=dt>lt,Ot=rn(tt,!0).lab()[0],wt=dt+(lt-dt)*tt,St=Ot-wt,Et=0,kt=1,Xn=20;Math.abs(St)>.01&&Xn-- >0;)(function(){return cn&&(St*=-1),St<0?(Et=tt,tt+=(kt-tt)*.5):(kt=tt,tt+=(Et-tt)*.5),Ot=rn(tt,!0).lab()[0],St=Ot-wt})();return tt}:$t=function(tt){return tt},yt},yt.padding=function(Se){return Se!=null?(Qa(Se)==="number"&&(Se=[Se,Se]),N=Se,yt):N},yt.colors=function(Se,tt){arguments.length<2&&(tt="hex");var dt=[];if(arguments.length===0)dt=te.slice(0);else if(Se===1)dt=[yt(.5)];else if(Se>1){var lt=D[0],cn=D[1]-lt;dt=u0(0,Se,!1).map(function(kt){return yt(lt+kt/(Se-1)*cn)})}else{d=[];var Ot=[];if(X&&X.length>2)for(var wt=1,St=X.length,Et=1<=St;Et?wt<St:wt>St;Et?wt++:wt--)Ot.push((X[wt-1]+X[wt])*.5);else Ot=D;dt=Ot.map(function(kt){return yt(kt)})}return Yn[tt]&&(dt=dt.map(function(kt){return kt[tt]()})),dt},yt.cache=function(Se){return Se!=null?(He=Se,yt):He},yt.gamma=function(Se){return Se!=null?(it=Se,yt):it},yt.nodata=function(Se){return Se!=null?(_=Yn(Se),yt):_},yt};function u0(d,h,_){for(var x=[],D=d<h,U=_?D?h+1:h-1:h,N=d;D?N<U:N>U;D?N++:N--)x.push(N);return x}var jo=E,d0=tc,f0=function(d){for(var h=[1,1],_=1;_<d;_++){for(var x=[1],D=1;D<=h.length;D++)x[D]=(h[D]||0)+h[D-1];h=x}return h},p0=function(d){var h,_,x,D,U,N,X;if(d=d.map(function(Ie){return new jo(Ie)}),d.length===2)h=d.map(function(Ie){return Ie.lab()}),U=h[0],N=h[1],D=function(Ie){var ze=[0,1,2].map(function(He){return U[He]+Ie*(N[He]-U[He])});return new jo(ze,"lab")};else if(d.length===3)_=d.map(function(Ie){return Ie.lab()}),U=_[0],N=_[1],X=_[2],D=function(Ie){var ze=[0,1,2].map(function(He){return(1-Ie)*(1-Ie)*U[He]+2*(1-Ie)*Ie*N[He]+Ie*Ie*X[He]});return new jo(ze,"lab")};else if(d.length===4){var te;x=d.map(function(Ie){return Ie.lab()}),U=x[0],N=x[1],X=x[2],te=x[3],D=function(Ie){var ze=[0,1,2].map(function(He){return(1-Ie)*(1-Ie)*(1-Ie)*U[He]+3*(1-Ie)*(1-Ie)*Ie*N[He]+3*(1-Ie)*Ie*Ie*X[He]+Ie*Ie*Ie*te[He]});return new jo(ze,"lab")}}else if(d.length>=5){var ve,we,Fe;ve=d.map(function(Ie){return Ie.lab()}),Fe=d.length-1,we=f0(Fe),D=function(Ie){var ze=1-Ie,He=[0,1,2].map(function(it){return ve.reduce(function(ht,bt,$t){return ht+we[$t]*Math.pow(ze,Fe-$t)*Math.pow(Ie,$t)*bt[it]},0)});return new jo(He,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return D},h0=function(d){var h=p0(d);return h.scale=function(){return d0(h)},h},nc=z,Qn=function(d,h,_){if(!Qn[_])throw new Error("unknown blend mode "+_);return Qn[_](d,h)},Rr=function(d){return function(h,_){var x=nc(_).rgb(),D=nc(h).rgb();return nc.rgb(d(x,D))}},Lr=function(d){return function(h,_){var x=[];return x[0]=d(h[0],_[0]),x[1]=d(h[1],_[1]),x[2]=d(h[2],_[2]),x}},m0=function(d){return d},v0=function(d,h){return d*h/255},g0=function(d,h){return d>h?h:d},y0=function(d,h){return d>h?d:h},_0=function(d,h){return 255*(1-(1-d/255)*(1-h/255))},b0=function(d,h){return h<128?2*d*h/255:255*(1-2*(1-d/255)*(1-h/255))},w0=function(d,h){return 255*(1-(1-h/255)/(d/255))},A0=function(d,h){return d===255?255:(d=255*(h/255)/(1-d/255),d>255?255:d)};Qn.normal=Rr(Lr(m0)),Qn.multiply=Rr(Lr(v0)),Qn.screen=Rr(Lr(_0)),Qn.overlay=Rr(Lr(b0)),Qn.darken=Rr(Lr(g0)),Qn.lighten=Rr(Lr(y0)),Qn.dodge=Rr(Lr(A0)),Qn.burn=Rr(Lr(w0));for(var C0=Qn,rc=g.type,$0=g.clip_rgb,I0=g.TWOPI,S0=Math.pow,E0=Math.sin,k0=Math.cos,Lf=z,T0=function(d,h,_,x,D){d===void 0&&(d=300),h===void 0&&(h=-1.5),_===void 0&&(_=1),x===void 0&&(x=1),D===void 0&&(D=[0,1]);var U=0,N;rc(D)==="array"?N=D[1]-D[0]:(N=0,D=[D,D]);var X=function(te){var ve=I0*((d+120)/360+h*te),we=S0(D[0]+N*te,x),Fe=U!==0?_[0]+te*U:_,Ie=Fe*we*(1-we)/2,ze=k0(ve),He=E0(ve),it=we+Ie*(-.14861*ze+1.78277*He),ht=we+Ie*(-.29227*ze-.90649*He),bt=we+Ie*(1.97294*ze);return Lf($0([it*255,ht*255,bt*255,1]))};return X.start=function(te){return te==null?d:(d=te,X)},X.rotations=function(te){return te==null?h:(h=te,X)},X.gamma=function(te){return te==null?x:(x=te,X)},X.hue=function(te){return te==null?_:(_=te,rc(_)==="array"?(U=_[1]-_[0],U===0&&(_=_[1])):U=0,X)},X.lightness=function(te){return te==null?D:(rc(te)==="array"?(D=te,N=te[1]-te[0]):(D=[te,te],N=0),X)},X.scale=function(){return Lf.scale(X)},X.hue(_),X},x0=E,P0="0123456789abcdef",M0=Math.floor,N0=Math.random,O0=function(){for(var d="#",h=0;h<6;h++)d+=P0.charAt(M0(N0()*16));return new x0(d,"hex")},ac=c,Df=Math.log,R0=Math.pow,L0=Math.floor,D0=Math.abs,Ff=function(d,h){h===void 0&&(h=null);var _={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return ac(d)==="object"&&(d=Object.values(d)),d.forEach(function(x){h&&ac(x)==="object"&&(x=x[h]),x!=null&&!isNaN(x)&&(_.values.push(x),_.sum+=x,x<_.min&&(_.min=x),x>_.max&&(_.max=x),_.count+=1)}),_.domain=[_.min,_.max],_.limits=function(x,D){return jf(_,x,D)},_},jf=function(d,h,_){h===void 0&&(h="equal"),_===void 0&&(_=7),ac(d)=="array"&&(d=Ff(d));var x=d.min,D=d.max,U=d.values.sort(function(sc,ic){return sc-ic});if(_===1)return[x,D];var N=[];if(h.substr(0,1)==="c"&&(N.push(x),N.push(D)),h.substr(0,1)==="e"){N.push(x);for(var X=1;X<_;X++)N.push(x+X/_*(D-x));N.push(D)}else if(h.substr(0,1)==="l"){if(x<=0)throw new Error("Logarithmic scales are only possible for values > 0");var te=Math.LOG10E*Df(x),ve=Math.LOG10E*Df(D);N.push(x);for(var we=1;we<_;we++)N.push(R0(10,te+we/_*(ve-te)));N.push(D)}else if(h.substr(0,1)==="q"){N.push(x);for(var Fe=1;Fe<_;Fe++){var Ie=(U.length-1)*Fe/_,ze=L0(Ie);if(ze===Ie)N.push(U[ze]);else{var He=Ie-ze;N.push(U[ze]*(1-He)+U[ze+1]*He)}}N.push(D)}else if(h.substr(0,1)==="k"){var it,ht=U.length,bt=new Array(ht),$t=new Array(_),ln=!0,rn=0,Sn=null;Sn=[],Sn.push(x);for(var yt=1;yt<_;yt++)Sn.push(x+yt/_*(D-x));for(Sn.push(D);ln;){for(var Se=0;Se<_;Se++)$t[Se]=0;for(var tt=0;tt<ht;tt++)for(var dt=U[tt],lt=Number.MAX_VALUE,cn=void 0,Ot=0;Ot<_;Ot++){var wt=D0(Sn[Ot]-dt);wt<lt&&(lt=wt,cn=Ot),$t[cn]++,bt[tt]=cn}for(var St=new Array(_),Et=0;Et<_;Et++)St[Et]=null;for(var kt=0;kt<ht;kt++)it=bt[kt],St[it]===null?St[it]=U[kt]:St[it]+=U[kt];for(var Xn=0;Xn<_;Xn++)St[Xn]*=1/$t[Xn];ln=!1;for(var Dr=0;Dr<_;Dr++)if(St[Dr]!==Sn[Dr]){ln=!0;break}Sn=St,rn++,rn>200&&(ln=!1)}for(var Fr={},Xa=0;Xa<_;Xa++)Fr[Xa]=[];for(var Za=0;Za<ht;Za++)it=bt[Za],Fr[it].push(U[Za]);for(var Cr=[],fa=0;fa<_;fa++)Cr.push(Fr[fa][0]),Cr.push(Fr[fa][Fr[fa].length-1]);Cr=Cr.sort(function(sc,ic){return sc-ic}),N.push(Cr[0]);for(var Vo=1;Vo<Cr.length;Vo+=2){var pa=Cr[Vo];!isNaN(pa)&&N.indexOf(pa)===-1&&N.push(pa)}}return N},Vf={analyze:Ff,limits:jf},Bf=E,F0=function(d,h){d=new Bf(d),h=new Bf(h);var _=d.luminance(),x=h.luminance();return _>x?(_+.05)/(x+.05):(x+.05)/(_+.05)},Uf=E,Ar=Math.sqrt,zt=Math.pow,j0=Math.min,V0=Math.max,Hf=Math.atan2,zf=Math.abs,Xs=Math.cos,Kf=Math.sin,B0=Math.exp,Wf=Math.PI,U0=function(d,h,_,x,D){_===void 0&&(_=1),x===void 0&&(x=1),D===void 0&&(D=1);var U=function(pa){return 360*pa/(2*Wf)},N=function(pa){return 2*Wf*pa/360};d=new Uf(d),h=new Uf(h);var X=Array.from(d.lab()),te=X[0],ve=X[1],we=X[2],Fe=Array.from(h.lab()),Ie=Fe[0],ze=Fe[1],He=Fe[2],it=(te+Ie)/2,ht=Ar(zt(ve,2)+zt(we,2)),bt=Ar(zt(ze,2)+zt(He,2)),$t=(ht+bt)/2,ln=.5*(1-Ar(zt($t,7)/(zt($t,7)+zt(25,7)))),rn=ve*(1+ln),Sn=ze*(1+ln),yt=Ar(zt(rn,2)+zt(we,2)),Se=Ar(zt(Sn,2)+zt(He,2)),tt=(yt+Se)/2,dt=U(Hf(we,rn)),lt=U(Hf(He,Sn)),cn=dt>=0?dt:dt+360,Ot=lt>=0?lt:lt+360,wt=zf(cn-Ot)>180?(cn+Ot+360)/2:(cn+Ot)/2,St=1-.17*Xs(N(wt-30))+.24*Xs(N(2*wt))+.32*Xs(N(3*wt+6))-.2*Xs(N(4*wt-63)),Et=Ot-cn;Et=zf(Et)<=180?Et:Ot<=cn?Et+360:Et-360,Et=2*Ar(yt*Se)*Kf(N(Et)/2);var kt=Ie-te,Xn=Se-yt,Dr=1+.015*zt(it-50,2)/Ar(20+zt(it-50,2)),Fr=1+.045*tt,Xa=1+.015*tt*St,Za=30*B0(-zt((wt-275)/25,2)),Cr=2*Ar(zt(tt,7)/(zt(tt,7)+zt(25,7))),fa=-Cr*Kf(2*N(Za)),Vo=Ar(zt(kt/(_*Dr),2)+zt(Xn/(x*Fr),2)+zt(Et/(D*Xa),2)+fa*(Xn/(x*Fr))*(Et/(D*Xa)));return V0(0,j0(100,Vo))},Gf=E,H0=function(d,h,_){_===void 0&&(_="lab"),d=new Gf(d),h=new Gf(h);var x=d.get(_),D=h.get(_),U=0;for(var N in x){var X=(x[N]||0)-(D[N]||0);U+=X*X}return Math.sqrt(U)},z0=E,K0=function(){for(var d=[],h=arguments.length;h--;)d[h]=arguments[h];try{return new(Function.prototype.bind.apply(z0,[null].concat(d))),!0}catch{return!1}},qf=z,Jf=tc,W0={cool:function(){return Jf([qf.hsl(180,1,.9),qf.hsl(250,.7,.4)])},hot:function(){return Jf(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Zs={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},oc=0,Yf=Object.keys(Zs);oc<Yf.length;oc+=1){var Qf=Yf[oc];Zs[Qf.toLowerCase()]=Zs[Qf]}var G0=Zs,nn=z;nn.average=i0,nn.bezier=h0,nn.blend=C0,nn.cubehelix=T0,nn.mix=nn.interpolate=Ef,nn.random=O0,nn.scale=tc,nn.analyze=Vf.analyze,nn.contrast=F0,nn.deltaE=U0,nn.distance=H0,nn.limits=Vf.limits,nn.valid=K0,nn.scales=W0,nn.colors=cf,nn.brewer=G0;var q0=nn;return q0})})(Qg);var hP=Qg.exports;const Xg=Rv(hP),mP=e=>(Qt("data-v-efdd9e64"),e=e(),Xt(),e),vP=["onClick"],gP={key:1,class:"tag empty"},yP=mP(()=>q("span",null,"Empty Tags",-1)),_P=[yP],bP=`
def handle_tag_click(state, payload):
	state["selected_tag_id"] = payload`,wP="A component to display coloured tag pills.",AP={writer:{name:"Tags",description:wP,category:"Content",fields:{tags:{name:"Tags",desc:"Key-value object with tags. Must be a JSON string or a state reference to a dictionary.",type:L.KeyValue,default:"{}"},referenceColor:{name:"Reference",desc:"The colour to be used as reference for chroma and luminance, and as the starting point for hue rotation.",type:L.Color,default:Ct.Blue5,category:Be.Style},seed:{name:"Seed value",desc:"Choose a different value to reshuffle colours.",type:L.Number,default:"1",category:Be.Style},rotateHue:{name:"Rotate hue",desc:"If active, rotates the hue depending on the content of the string. If turned off, the reference colour is always used.",type:L.Text,options:{yes:"yes",no:"no"},default:"yes",category:Be.Style},primaryTextColor:Ft,cssClasses:et},events:{"wf-tag-click":{desc:"Triggered when a tag is clicked.",stub:bP.trim()}},previewField:"text"}},CP=Pe({...AP,__name:"CoreTags",setup(e){Ha(u=>({"1c12d0f0":i.value?"pointer":"auto"}));const t=[{h:-78,s:-34,l:16},{h:-61,s:-37,l:16},{h:-2,s:0,l:24},{h:-12,s:0,l:29},{h:28,s:-20,l:24},{h:-61,s:-95,l:25},{h:-173,s:0,l:16},{h:-228,s:0,l:22},{h:69,s:0,l:25},{h:70,s:0,l:29}],n=oe(null),r=Z(ee.evaluatedFields),a=Z(ee.componentId),o=Z(ee.core),s=Z(ee.isBeingEdited),i=ne(()=>{var m;return typeof((m=o.getComponentById(a).handlers)==null?void 0:m["wf-tag-click"])<"u"});function l(u){if(r.rotateHue.value=="no")return r.referenceColor.value;const m=Xg(r.referenceColor.value),w=t[c(u)];return m.set("hsl.h",`${Math.sign(w.h)==-1?"-":"+"}${Math.abs(w.h)}`).set("hsl.s",`${Math.sign(w.s)==-1?"-":"+"}${Math.abs(w.s/100)}`).set("hsl.l",`${Math.sign(w.l)==-1?"-":"+"}${Math.abs(w.l/100)}`).css()}function c(u){let m=r.seed.value*52673&4294967295;for(let b=0;b<u.length;b++)m=(b+1)*u.charCodeAt(b)^m&4294967295;return Math.abs(m)%t.length}function f(u){const m=new CustomEvent("wf-tag-click",{detail:{payload:u}});n.value.dispatchEvent(m)}return(u,m)=>P(s)||Object.entries(P(r).tags.value??[]).length>0?(T(),R("div",{key:0,ref_key:"rootEl",ref:n,class:"CoreTags"},[Object.entries(P(r).tags.value??[]).length>0?(T(!0),R(je,{key:0},It(P(r).tags.value,(w,b)=>(T(),R("div",{key:b,class:"tag",style:vt({background:l(b)}),onClick:()=>f(b)},[q("span",null,Te(w),1)],12,vP))),128)):(T(),R("div",gP,_P))],512)):xe("",!0)}}),$P=Oe(CP,[["__scopeId","data-v-efdd9e64"]]),IP={key:0,class:"material-symbols-outlined"},SP={class:"info"},EP={key:1,class:"caption"},kP={class:"container","data-writer-container":""},TP=`
def handle_avatar_click():
	print("The avatar was clicked")`,xP="A component to display user avatars.",PP={writer:{name:"Avatar",description:xP,category:"Content",allowedChildrenTypes:["*"],fields:{name:{name:"Name",type:L.Text},imageSrc:{name:"Image source",desc:"A valid URL. Alternatively, you can provide a state reference to a packed file.",type:L.Text},caption:{name:"Caption",desc:"Add an optional caption under the name, such as the person's job title.",type:L.Text},size:{name:"Size",type:L.Text,options:{small:"Small",medium:"Medium",large:"Large"},default:"medium",category:Be.Style},orientation:{name:"Orientation",type:L.Text,options:{horizontal:"Horizontal",vertical:"Vertical"},default:"horizontal",category:Be.Style},primaryTextColor:Ft,secondaryTextColor:Ln,separatorColor:Gt,cssClasses:et},events:{"wf-click":{desc:"Triggered when the avatar is clicked.",stub:TP.trim()}},previewField:"text"}},MP=Pe({...PP,__name:"CoreAvatar",setup(e){Ha(i=>({"3d808742":P(n).imageSrc.value?`url("${P(n).imageSrc.value}")`:"none","162f2d92":o.value?"pointer":"auto"}));const t=oe(null),n=Z(ee.evaluatedFields),r=Z(ee.componentId),a=Z(ee.core),o=ne(()=>{var l;return typeof((l=a.getComponentById(r).handlers)==null?void 0:l["wf-click"])<"u"});function s(i){const l=Ns(i);t.value.dispatchEvent(l)}return(i,l)=>(T(),R("div",{ref_key:"rootEl",ref:t,class:ut(["CoreAvatar",[P(n).size.value,P(n).orientation.value]])},[q("div",{class:"image",onClick:s},[P(n).imageSrc.value?xe("",!0):(T(),R("i",IP," account_circle "))]),q("div",SP,[P(n).name.value?(T(),R("div",{key:0,class:"name",onClick:s},Te(P(n).name.value),1)):xe("",!0),P(n).caption.value?(T(),R("div",EP,Te(P(n).caption.value),1)):xe("",!0),q("div",kP,[Dt(i.$slots,"default",{},void 0,!0)])])],2))}}),NP=Oe(MP,[["__scopeId","data-v-8100970f"]]);function Zg(e,t){return ne(()=>e[t].value==="yes")}const OP={class:"SharedControlBar"},RP=Pe({__name:"SharedControlBar",props:{copyRawContent:{},copyStructuredContent:{}},setup(e){const t=e;function n({text:r=""}){try{navigator.clipboard.writeText(r)}catch(a){Kn().error(a)}}return(r,a)=>(T(),R("div",OP,[t.copyStructuredContent?(T(),R("button",{key:0,class:"control-button",onClick:a[0]||(a[0]=o=>n({text:t.copyStructuredContent}))}," Copy JSON ")):xe("",!0),t.copyRawContent?(T(),R("button",{key:1,class:"control-button",onClick:a[1]||(a[1]=o=>n({text:t.copyRawContent}))}," Copy ")):xe("",!0)]))}}),ey=Oe(RP,[["__scopeId","data-v-bf2e0bde"]]),LP={key:0,class:"CoreAnnotatedText"},DP={key:0,class:"CoreAnnotatedText__annotation__subject"},FP={writer:{name:"Annotated text",description:"Shows text with annotations",category:"Content",fields:{text:{name:"Annotated text",type:L.Object,desc:"Value array with text/annotations. Must be a JSON string or a state reference to an array.",init:`["This ",["is", "Verb"]," some ",["annotated", "Adjective"], ["text", "Noun"]," for those of ",["you", "Pronoun"]," who ",["like", "Verb"]," this sort of ",["thing", "Noun"],". ","And here's a ",["word", "", "#faf"]," with a fancy background but no label."]`,validator:Ok},referenceColor:{name:"Reference",desc:"The colour to be used as reference for chroma and luminance, and as the starting point for hue rotation.",type:L.Color,default:Ct.Blue5,category:Be.Style},seed:{name:"Seed value",desc:"Choose a different value to reshuffle colours.",type:L.Number,default:"1",category:Be.Style},rotateHue:{name:"Rotate hue",desc:"If active, rotates the hue depending on the content of the string. If turned off, the reference colour is always used.",type:L.Text,options:{yes:"yes",no:"no"},default:"yes",category:Be.Style},useMarkdown:{name:"Use Markdown",desc:"If active, the output will be sanitized; unsafe elements will be removed.",default:"no",type:L.Text,options:{yes:"Yes",no:"No"}},copyButtons:{name:"Copy buttons",desc:"If active, adds a control bar with both copy text and JSON buttons.",type:L.Text,options:{yes:"yes",no:"no"},default:"no",category:Be.Style},buttonColor:_r,buttonTextColor:br,primaryTextColor:Ft,cssClasses:et},previewField:"data"}},jP=Pe({...FP,__name:"CoreAnnotatedText",setup(e){const t=Z(ee.evaluatedFields),n=ne(()=>t.text.value??[]),r=Z(ee.isBeingEdited),a=Z(ee.componentId),o=ne(()=>!t.text.value),s=ne(()=>!o.value||r.value),i=Zg(t,"useMarkdown"),l=[{h:-78,s:-34,l:16},{h:-61,s:-37,l:16},{h:-2,s:0,l:24},{h:-12,s:0,l:29},{h:28,s:-20,l:24},{h:-61,s:-95,l:25},{h:-173,s:0,l:16},{h:-228,s:0,l:22},{h:69,s:0,l:25},{h:70,s:0,l:29}];let c=[...l],f={},u=t.seed.value;function m(){const p=oe("");Ke([i,n],async()=>{if(!i.value)return p.value="";p.value=await E()},{immediate:!0});function $(B){const[z,le]=B,fe=le?`<span class="CoreAnnotatedText__annotation__subject">${le}</span>`:"";return`<span class="CoreAnnotatedText__annotation" style="background: ${v(B)}">${z}${fe}</span>`}async function E(){const B=n.value.reduce((le,fe)=>typeof fe=="string"?`${le} ${fe}`:Array.isArray(fe)?`${le} ${$(fe)}`:le,"");return await(await pn(()=>import("./marked.esm-273vDTCT.js"),[],import.meta.url)).parse(B)}return Vn(p)}const w=m();function b(p,$){return p.set("hsl.h",`${Math.sign($.h)==-1?"-":"+"}${Math.abs($.h)}`).set("hsl.s",`${Math.sign($.s)==-1?"-":"+"}${Math.abs($.s/100)}`).set("hsl.l",`${Math.sign($.l)==-1?"-":"+"}${Math.abs($.l/100)}`).css()}function g(p,$=l.length){let E=t.seed.value*52673&4294967295;for(let z=0;z<p.length;z++)E=(z+1)*p.charCodeAt(z)^E&4294967295;return Math.abs(E)%$}function v(p){return p[2]||A(p[1])}function A(p){if(t.rotateHue.value=="no")return t.referenceColor.value;const $=Xg(t.referenceColor.value);if(u!==t.seed.value&&(c=[...l],f={},u=t.seed.value),f[p])return b($,f[p]);c.length===0&&(c=[...l]);const E=g(p,c.length),B=c[E];return f[p]=B,c.splice(E,1),b($,B)}const C=ne(()=>n.value.reduce((p,$)=>typeof $=="string"?p+$:p+$[0],"")),y=ne(()=>{try{return JSON.stringify(n.value)}catch{return n.value.join("")}});return(p,$)=>s.value?(T(),R("div",LP,[P(i)?(T(),Ue(jg,{key:0,"raw-markdown":P(w),class:"CoreAnnotatedText__markdown"},null,8,["raw-markdown"])):(T(),R(je,{key:1},[o.value?(T(),Ue(Od,{key:0,"component-id":P(a)},null,8,["component-id"])):xe("",!0),(T(!0),R(je,null,It(n.value,(E,B)=>(T(),R("span",{key:String(E)+B},[typeof E=="string"?(T(),R(je,{key:0},[xt(Te(E),1)],64)):xe("",!0),Array.isArray(E)?(T(),R("span",{key:1,class:"CoreAnnotatedText__annotation",style:vt({backgroundColor:v(E)})},[xt(Te(E[0])+" ",1),E[1]?(T(),R("span",DP,Te(E[1]),1)):xe("",!0)],4)):xe("",!0)]))),128))],64)),P(t).copyButtons.value==="yes"?(T(),Ue(ey,{key:2,"copy-raw-content":C.value,"copy-structured-content":y.value},null,8,["copy-raw-content","copy-structured-content"])):xe("",!0)])):xe("",!0)}}),VP=Oe(jP,[["__scopeId","data-v-8bc9f9e0"]]);function El(e){return!!(["string","number","boolean"].includes(typeof e)||e===null)}function Rd(e){return El(e)?!1:Array.isArray(e)}function ty(e){return!Rd(e)&&typeof e=="object"&&e!==null}function ny(e){return El(e)?1:Object.keys(e).length}function ry(e){return typeof e.open=="boolean"&&Array.isArray(e.path)}const BP=["open","disabled"],UP={class:"SharedCollapsible__summary"},HP={key:0,class:"SharedCollapsible__summary__icon material-symbols-outlined"},zP={class:"content"},KP=Pe({__name:"SharedCollapsible",props:{open:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},icons:{type:Object,required:!1,default:void 0}},emits:{toggle:e=>typeof e=="boolean"},setup(e,{emit:t}){const n=e,r=t,a=oe(n.open);Ke(ea(n,"open"),i=>a.value=i);const o=ne(()=>{if(n.icons!==void 0)return a.value?n.icons.open:n.icons.close});function s(i){const l=i.newState==="open";a.value=l,r("toggle",l)}return(i,l)=>(T(),R("details",{class:ut(["SharedCollapsible",{"SharedCollapsible--customMarker":e.icons}]),open:a.value,disabled:e.disabled,onToggle:s},[q("summary",UP,[e.icons?(T(),R("span",HP,Te(o.value),1)):xe("",!0),Dt(i.$slots,"title",{},void 0,!0)]),q("div",zP,[Dt(i.$slots,"content",{},void 0,!0)])],42,BP))}}),WP=Oe(KP,[["__scopeId","data-v-ef5bb8f8"]]),GP=Pe({__name:"SharedJsonViewerChildrenCounter",props:{data:{type:[String,Number,Boolean,Object,Array,null],required:!0}},setup(e){const t=e,n=o=>`Object{${o}}`,r=o=>`Array[${o}]`,a=ne(()=>{const o=ny(t.data);return o===0?n(0):Rd(t.data)?r(o):ty(t.data)?n(o):n(0)});return(o,s)=>(T(),R("span",null,Te(a.value),1))}}),ay=Oe(GP,[["__scopeId","data-v-2641ae29"]]),qP={class:"SharedJsonViewerCollapsible__title"},JP={key:0},YP={class:"SharedJsonViewerCollapsible__content"},QP=Pe({__name:"SharedJsonViewerCollapsible",props:{open:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},title:{type:String,required:!1,default:void 0},data:{type:[String,Number,Boolean,Object,Array,null],required:!1,default:void 0}},emits:{toggle:e=>typeof e=="boolean"},setup(e){return(t,n)=>(T(),Ue(WP,{open:e.open,disabled:e.disabled,onToggle:n[0]||(n[0]=r=>t.$emit("toggle",r))},{title:Ze(()=>[q("div",qP,[e.title?(T(),R("span",JP,Te(e.title),1)):xe("",!0),e.data?(T(),Ue(ay,{key:1,data:e.data},null,8,["data"])):xe("",!0)])]),content:Ze(()=>[q("div",YP,[Dt(t.$slots,"default",{},void 0,!0)])]),_:3},8,["open","disabled"]))}}),oy=Oe(QP,[["__scopeId","data-v-7392db61"]]),XP={class:"SharedJsonViewerValue"},ZP=Pe({__name:"SharedJsonViewerValue",props:{data:{type:[String,Number,Boolean,Object,Array,null],required:!0}},setup(e){const t=e,n=ne(()=>JSON.stringify(t.data));return(r,a)=>(T(),R("span",XP,Te(n.value),1))}}),sy=Oe(ZP,[["__scopeId","data-v-496a5553"]]),e2={class:"SharedJsonViewerObject"},t2={key:0,class:"SharedJsonViewerObject__value"},n2=Pe({__name:"SharedJsonViewerObject",props:{data:{type:[Object,Array],required:!0},path:{type:Array,default:()=>[]},initialDepth:{type:Number,default:0}},emits:{toggle:ry},setup(e,{emit:t}){const n=e,r=ea(n,"initialDepth"),a=t,o=oe([]),s=ne(()=>n.path.length+1);Ke(r,()=>{if(r.value===0){o.value=[];return}if(!(r.value===-1||r.value>s.value))return;const f=new Set([...o.value,...Object.keys(n.data)]);o.value=Array.from(f)},{immediate:!0});function i(c,f){f?o.value=[...o.value,c]:o.value=o.value.filter(u=>u!==c),a("toggle",{open:f,path:[...n.path,c]})}function l(c){return o.value.includes(String(c))}return(c,f)=>(T(),R("div",e2,[(T(!0),R(je,null,It(Object.entries(e.data),([u,m],w)=>(T(),R(je,{key:w},[P(El)(m)||P(ny)(m)===0?(T(),R("div",t2,[q("span",null,Te(u),1),xt(": "),Ye(sy,{data:m},null,8,["data"])])):(T(),Ue(oy,{key:1,open:l(u),title:u,data:m,onToggle:b=>i(u,b)},{default:Ze(()=>[l(u)?(T(),Ue(iy,{key:0,data:m,path:[...e.path,u],"initial-depth":r.value,onToggle:f[0]||(f[0]=b=>c.$emit("toggle",b))},null,8,["data","path","initial-depth"])):xe("",!0)]),_:2},1032,["open","title","data","onToggle"]))],64))),128))]))}}),kh=Oe(n2,[["__scopeId","data-v-5480a807"]]),iy=Pe({__name:"SharedJsonViewer",props:{data:{type:[String,Number,Boolean,Object,Array,null],required:!0},path:{type:Array,default:()=>[]},hideRoot:{type:Boolean,required:!1},initialDepth:{type:Number,default:0},enableCopyToJson:{type:Boolean,required:!1}},emits:{toggle:ry},setup(e){const t=e,n=ne(()=>t.path.length===0&&!t.hideRoot),r=ne(()=>t.initialDepth===-1||t.initialDepth>0),a=ne(()=>t.data===void 0?JSON.stringify(null):JSON.stringify(t.data));return(o,s)=>(T(),R(je,null,[P(ty)(e.data)||P(Rd)(e.data)?(T(),R(je,{key:0},[n.value?(T(),Ue(oy,{key:0,open:r.value,data:e.data,onToggle:s[1]||(s[1]=i=>o.$emit("toggle",{path:[],open:i}))},{default:Ze(()=>[Ye(kh,{data:e.data,path:e.path,"initial-depth":e.initialDepth,onToggle:s[0]||(s[0]=i=>o.$emit("toggle",i))},null,8,["data","path","initial-depth"])]),_:1},8,["open","data"])):(T(),Ue(kh,{key:1,data:e.data,path:e.path,"initial-depth":e.initialDepth,onToggle:s[2]||(s[2]=i=>o.$emit("toggle",i))},null,8,["data","path","initial-depth"]))],64)):P(El)(e.data)?(T(),Ue(sy,{key:1,data:e.data},null,8,["data"])):(T(),Ue(ay,{key:2,data:{}})),e.enableCopyToJson?(T(),Ue(ey,{key:3,"copy-structured-content":a.value},null,8,["copy-structured-content"])):xe("",!0)],64))}}),r2={class:"CoreJsonViewer"},a2="A component to explore JSON data as a hierarchy.",o2={name:"JSON Viewer",description:"A JSON tree viewer where you can expand the keys.",sample:{description:"This sample is opened by default",bool:!0,null:null,list:[1,"two",{key:3}]},sampleClosed:{description:"This sample is not opened by default"},createdAt:new Date},s2={name:"JSON Viewer",description:a2,category:"Content",fields:{data:{name:"Data",init:JSON.stringify(o2),type:L.Object},initialDepth:{name:"Initial depth",desc:"Sets the initial viewing depth of the JSON tree hierarchy. Use -1 to display the full hierarchy.",type:L.Number,init:"0",validator:Nn},hideRoot:{name:"Hide root",desc:"Don't show the type of the root node when it's an Object or an Array.",type:L.Text,options:{yes:"yes",no:"no"},default:"no",category:Be.Style},copy:{name:"Copy",desc:"If active, adds a control bar with copy JSON button.",type:L.Text,options:{yes:"yes",no:"no"},default:"no",category:Be.Style},jsonViewerIndentationSpacing:{name:"JSON indentation",type:L.Width,category:Be.Style,applyStyleVariable:!0,validator:Mg},accentColor:en,secondaryTextColor:Ln,separatorColor:Gt,cssClasses:et},previewField:"data"},i2={writer:s2},l2=Pe({...i2,__name:"CoreJsonViewer",setup(e){const t=Z(ee.evaluatedFields),n=ne(()=>t.data.value),r=ne(()=>Number(t.initialDepth.value)||0);return(a,o)=>(T(),R("div",r2,[Ye(iy,{data:n.value??{},"initial-depth":r.value,"enable-copy-to-json":P(t).copy.value==="yes","hide-root":P(t).hideRoot.value==="yes"},null,8,["data","initial-depth","enable-copy-to-json","hide-root"])]))}});function c2(e,t={minimumFractionDigits:0,maximumFractionDigits:1}){const n=new Intl.NumberFormat(void 0,{style:"percent",...t});return ne(()=>n.format(e.value))}const u2=["aria-valuetext","aria-valuemin","aria-valuemax","aria-valuenow","aria-busy","tabindex"],d2={key:0,class:"CoreProgressBar__title"},f2={key:0,class:"CoreProgressBar__title__label"},p2={key:1,class:"CoreProgressBar__title__progress"},h2={class:"CoreProgressBar__bar"},m2=`
def handle_progress_bar_click():
	print("The progress bar was clicked")`,v2="A component to display a progression.",g2={name:"Progress Bar",description:v2,category:"Content",allowedChildrenTypes:["*"],fields:{label:{name:"Label",type:L.Text,default:""},value:{name:"Value",type:L.Number},min:{name:"Minimum value",type:L.Number,default:"0"},max:{name:"Maximum value",type:L.Number,default:"1"},displayPercentage:{name:"Display percentage",default:"no",type:L.Text,category:Be.Style,options:{yes:"Yes",no:"No"}},accentColor:en,primaryTextColor:Ft,separatorColor:Gt,cssClasses:et},events:{"wf-click":{desc:"Triggered when the progress bar is clicked.",stub:m2.trim()}}},y2={writer:g2},_2=Pe({...y2,__name:"CoreProgressBar",setup(e){const t=oe(),n=Z(ee.evaluatedFields),r=Z(ee.componentId),a=Z(ee.core),o=ne(()=>{var g;return String((g=n.label)==null?void 0:g.value)}),s=ne(()=>Number(n.value.value)),i=ne(()=>Number(n.min.value)),l=ne(()=>Number(n.max.value)),c=Zg(n,"displayPercentage"),f=ne(()=>{if(!(s.value===void 0||Number.isNaN(s.value)))return(s.value-i.value)/(l.value-i.value)}),u=c2(f),m=ne(()=>({width:f.value===void 0?void 0:`${f.value*100}%`})),w=ne(()=>{var v;return typeof((v=a.getComponentById(r).handlers)==null?void 0:v["wf-click"])<"u"});function b(g){if(!w.value)return;const v=Ns(g);t.value.dispatchEvent(v)}return(g,v)=>(T(),R("div",{ref_key:"rootEl",ref:t,class:ut(["CoreProgressBar",{"CoreProgressBar--clickable":w.value}]),role:"progressbar","aria-valuetext":f.value===void 0?null:P(u),"aria-valuemin":i.value,"aria-valuemax":l.value,"aria-valuenow":f.value===void 0?null:s.value,"aria-busy":f.value<1||f.value===void 0,tabindex:w.value?"0":null,onKeydown:aa(b,["enter"]),onClick:b},[o.value||P(c)?(T(),R("div",d2,[o.value?(T(),R("label",f2,Te(o.value),1)):xe("",!0),P(c)&&f.value!==void 0?(T(),R("span",p2,Te(P(u)),1)):xe("",!0)])):xe("",!0),q("div",h2,[q("div",{class:ut(["CoreProgressBar__bar__value",{"CoreProgressBar__bar__value--indeterminate":f.value===void 0}]),style:vt(m.value)},null,6)])],42,u2))}}),b2=Oe(_2,[["__scopeId","data-v-6639ebae"]]);function kl(e){const t=/[\\]?@{([^}]*)}/g;function n(c,f){var g;let u=[],m="",w=0,b=0;for(;b<c.length;){const v=c.charAt(b);v=="\\"?b+1<c.length&&(m+=c.charAt(b+1),b++):v=="."?w==0?(u.push(m),m=""):m+=v:v=="["?(w==0?(u.push(m),m=""):m+=v,w++):v=="]"?(w--,w==0?m=(g=r(m,f))==null?void 0:g.toString():m+=v):m+=v,b++}return m&&u.push(m),u}function r(c,f){let m=f?a(f):void 0,w=e.userState.value;const b=n(c,f);for(let g=0;g<b.length;g++)m=m==null?void 0:m[b[g]],w=w==null?void 0:w[b[g]];return m??w}function a(c){var u,m;const f={};for(let w=0;w<c.length-1;w++){const b=c[w],{componentId:g}=b,{type:v}=e.getComponentById(g);if(v!=="repeater"||w+1>=c.length)continue;const A=c.slice(0,w+1),C=c.slice(0,w+2),{instanceNumber:y}=C.at(-1),p=i(A,"repeaterObject");if(!p)continue;const $=Object.entries(p),E=i(A,"keyVariable"),B=i(A,"valueVariable");f[E]=(u=$[y])==null?void 0:u[0],f[B]=(m=$[y])==null?void 0:m[1]}return f}function o(c,f){return c==null?"":c.replace(t,(m,w)=>{if(m.charAt(0)=="\\")return m.substring(1);const b=w.trim();if(!b)return"";const g=r(b,f);return typeof g>"u"?"":typeof g=="object"?JSON.stringify(g):g.toString()})}function s(c){const{componentId:f}=c.at(-1),u=e.getComponentById(f);if(!u)return;const m={},{fields:w}=e.getComponentDefinition(u.type);if(w)return Object.keys(w).forEach(b=>{m[b]=ne(()=>i(c,b))}),m}function i(c,f){var y;const{componentId:u}=c.at(-1),m=e.getComponentById(u);if(!m)return;const{fields:w}=e.getComponentDefinition(m.type),b=(y=m.content)==null?void 0:y[f],g=w[f].default,v=o(b,c),A=w[f].type,C=typeof v>"u"||v===null||v==="";if(A==L.Object||A==L.KeyValue||A==L.Tools){if(!v)return JSON.parse(g??null);if(typeof v!="string")return v;let p;try{p=JSON.parse(v)}catch{return JSON.parse(g??null)}return p}else if(A==L.Number){const p=g===null?null:parseFloat(g);if(C)return p??null;const $=parseFloat(v);return typeof $>"u"||Number.isNaN($)?p??null:$}else return A==L.IdKey?b:C?g??"":v}function l(c,f){const u=e.getComponentById(c);if(!u)return;if(typeof u.visible>"u"||u.visible.expression===!0)return!0;if(u.visible.expression===!1)return!1;const m=r(u.visible.binding,f);return u.visible.reversed===!0?!m:!!m}return{getEvaluatedFields:s,isComponentVisible:l,evaluateExpression:r}}function on(e,t,n,r=""){const a=oe(),o=oe(!1),s=oe(null),i=t.at(-1).componentId,l=ne(()=>e.getComponentById(i)),{evaluateExpression:c}=kl(e);function f(){var w;const m=e.getComponentById(i);if((w=m==null?void 0:m.binding)!=null&&w.stateRef)return c(m.binding.stateRef,t)}function u(m,w,b){var y,p;a.value=m;const g=(y=l.value.handlers)==null?void 0:y[w],v=((p=l.value.binding)==null?void 0:p.eventType)==w;if(!g&&!v)return;if(o.value){s.value={eventValue:m,emitEventType:w};return}o.value=!0;const A=()=>{o.value=!1,s.value&&(u(s.value.eventValue,s.value.emitEventType),s.value=null),b==null||b()},C=new CustomEvent(w,{detail:{payload:m,callback:A}});n.value instanceof HTMLElement?n.value.dispatchEvent(C):n.value.$el.dispatchEvent(C)}return Ke(()=>f(),m=>{o.value||(a.value=m)},{immediate:!0}),Ke(a,m=>{typeof m>"u"&&(a.value=r)},{immediate:!0}),{formValue:a,handleInput:u}}const w2={key:0},A2=Pe({__name:"BaseInputWrapper",props:{label:{type:String,required:!1,default:void 0},isHorizontal:{type:Boolean,required:!1}},setup(e){return(t,n)=>(T(),R("div",{ref:"rootEl",class:ut(["BaseInputWrapper",{horizontal:e.isHorizontal}])},[e.label?(T(),R("label",w2,Te(e.label),1)):xe("",!0),Dt(t.$slots,"default",{},void 0,!0)],2))}}),_n=Oe(A2,[["__scopeId","data-v-1cbc4730"]]),C2=["checked","value"],$2=["for"],I2={a:"Option A",b:"Option B"},S2="A user input component that allows users to choose multiple values from a list of options using checkboxes.",E2=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected options.
	# The payload will be a list, as multiple options are allowed.

	state["selected"] = payload`,k2={writer:{name:"Checkbox Input",description:S2,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:L.KeyValue,default:JSON.stringify(I2,null,2),validator:La},orientation:{name:"Orientation",type:L.Text,options:{vertical:"Vertical",horizontal:"Horizontal"},default:"vertical",category:Be.Style,desc:"Specify how to lay out the options."},primaryTextColor:Ft,accentColor:en,cssClasses:et},events:{"wf-options-change":{desc:"Sent when the selected options change.",stub:E2.trim(),bindable:!0}}}},T2=Pe({...k2,__name:"CoreCheckboxInput",setup(e){const t=Z(ee.evaluatedFields),n=oe(null),r=Z(ee.core),a=Z(ee.instancePath),o=Z(ee.flattenedInstancePath),{formValue:s,handleInput:i}=on(r,a,n);function l(){return n.value?Array.from(n.value.$el.querySelectorAll('input[type="checkbox"]')).map(u=>u.checked?u.value:void 0).filter(u=>typeof u<"u"):void 0}return(c,f)=>(T(),Ue(_n,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreCheckboxInput"},{default:Ze(()=>[q("div",{class:ut(["options",{horizontal:P(t).orientation.value=="horizontal"}])},[(T(!0),R(je,null,It(P(t).options.value,(u,m)=>(T(),R("div",{key:m,class:"option"},[q("input",{type:"checkbox",checked:Array.isArray(P(s))?P(s).includes(m):!1,value:m,onInput:f[0]||(f[0]=w=>P(i)(l(),"wf-options-change"))},null,40,C2),q("label",{for:`${P(o)}-option-${m}`},Te(u),9,$2)]))),128))],2)]),_:1},8,["label"]))}}),x2=Oe(T2,[["__scopeId","data-v-4a9ecd04"]]),P2=["value","list"],M2=["id"],N2=Pe({__name:"BaseInputColor",props:{value:{type:String,required:!1,default:void 0},customColors:{type:Array,default:()=>[]}},emits:{"update:value":e=>typeof e=="string",change:e=>typeof e=="string"},setup(e,{emit:t}){const n=e,r=t,a=oe(),o=Z(ee.flattenedInstancePath),s=ne(()=>{var c;return(c=n.customColors)!=null&&c.length?`${o}_datalist`:null});function i(c){r("update:value",c.target.value)}function l(c){r("change",c.target.value)}return(c,f)=>(T(),R(je,null,[q("input",{ref_key:"pickerEl",ref:a,type:"color",class:"BaseInputColor",value:e.value,list:s.value,onInput:i,onChange:l},null,40,P2),s.value?(T(),R("datalist",{key:0,id:s.value},[(T(!0),R(je,null,It(e.customColors,u=>(T(),R("option",{key:u},Te(u),1))),128))],8,M2)):xe("",!0)],64))}}),O2=Oe(N2,[["__scopeId","data-v-93292f6d"]]),R2="A user input component that allows users to select a color using a color picker interface.",Th=`
def onchange_handler(state, payload):

	# Set the state variable "new_color" to the new value, provided as string.

	state["new_color"] = payload`,L2={name:"Color Input",description:R2,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},colorList:{name:"Color List",desc:"List of predefined colors",type:L.Object,init:JSON.stringify([Ct.Blue5,Ct.Green5,Ct.Orange5,Ct.Gray6,Ct.Blue4]),validator:Ng},cssClasses:et},events:{"wf-change":{desc:"Capture changes as they happen.",stub:Th,bindable:!0},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:Th}}},D2={writer:L2},F2=Pe({...D2,__name:"CoreColorInput",setup(e){const t=Z(ee.evaluatedFields),n=oe(null),r=Z(ee.core),a=Z(ee.instancePath),o=ne(()=>Array.isArray(t.colorList.value)?t.colorList.value:void 0),{formValue:s,handleInput:i}=on(r,a,n);return(l,c)=>(T(),Ue(_n,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreColorInput"},{default:Ze(()=>[Ye(O2,{value:P(s),"custom-colors":o.value,"onUpdate:value":c[0]||(c[0]=f=>P(i)(f,"wf-change")),onChange:c[1]||(c[1]=f=>P(i)(f,"wf-change-finish"))},null,8,["value","custom-colors"])]),_:1},8,["label"]))}}),j2=Oe(F2,[["__scopeId","data-v-e1edbdef"]]),V2=["value"],B2="A user input component that allows users to select a date using a date picker interface.",U2=`
def onchange_handler(state, payload):

	# Set the state variable "new_date" to the new value, provided as a YYYY-MM-DD string.

	state["new_date"] = payload`,H2={writer:{name:"Date Input",description:B2,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},cssClasses:et},events:{"wf-date-change":{desc:"Capture changes to this control.",stub:U2,bindable:!0}}}},z2=Pe({...H2,__name:"CoreDateInput",setup(e){const t=Z(ee.evaluatedFields),n=oe(null),r=Z(ee.core),a=Z(ee.instancePath),{formValue:o,handleInput:s}=on(r,a,n);return(i,l)=>(T(),Ue(_n,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreDateInput"},{default:Ze(()=>[q("input",{type:"date",value:P(o),onChange:l[0]||(l[0]=c=>P(s)(c.target.value,"wf-date-change"))},null,40,V2)]),_:1},8,["label"]))}}),K2=Oe(z2,[["__scopeId","data-v-55739abe"]]),W2=Pe({__name:"WdsDropdownInput",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=oa(e,"modelValue");return(n,r)=>Wt((T(),R("select",{"onUpdate:modelValue":r[0]||(r[0]=a=>t.value=a),class:"WdsDropdownInput colorTransformer"},[Dt(n.$slots,"default",{},void 0,!0)],512)),[[Fu,t.value]])}}),ly=Oe(W2,[["__scopeId","data-v-a262dc28"]]),G2=["value"],q2="A user input component that allows users to select a single value from a list of options using a dropdown menu.",J2={a:"Option A",b:"Option B"},Y2=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected option

	state["selected"] = payload`,Q2={writer:{name:"Dropdown Input",description:q2,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:L.KeyValue,default:JSON.stringify(J2,null,2),validator:La},cssClasses:et},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:Y2.trim(),bindable:!0}}}},X2=Pe({...Q2,__name:"CoreDropdownInput",setup(e){const t=Z(ee.evaluatedFields),n=oe(null),r=Z(ee.core),a=Z(ee.instancePath),{formValue:o,handleInput:s}=on(r,a,n);return(i,l)=>(T(),Ue(_n,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreDropdownInput"},{default:Ze(()=>[Ye(ly,{modelValue:P(o),"onUpdate:modelValue":l[0]||(l[0]=c=>an(o)?o.value=c:null),onInput:l[1]||(l[1]=c=>P(s)(c.target.value,"wf-option-change"))},{default:Ze(()=>[(T(!0),R(je,null,It(P(t).options.value,(c,f)=>(T(),R("option",{key:f,value:f},Te(c),9,G2))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]))}}),Z2=Oe(X2,[["__scopeId","data-v-82948749"]]),eM=Pe({__name:"WdsButton",props:{variant:{type:String,default:"primary"},size:{type:String,default:"big"}},setup(e){const t=e,n=ne(()=>["WdsButton",`WdsButton--${t.variant}`,`WdsButton--${t.size}`]);return(r,a)=>(T(),R("button",{class:ut(["WdsButton colorTransformer",n.value]),role:"button"},[Dt(r.$slots,"default",{},void 0,!0)],2))}}),or=Oe(eM,[["__scopeId","data-v-b34bac05"]]),tM={class:"main"},nM={key:0,class:"file-input"},rM=["multiple","accept"],aM={key:0,class:"file-input__files"},oM=["onClick"],sM={key:1},iM={key:1,class:"status"},lM={key:1},cM={key:2},xh=200*1024*1024,uM="A user input component that allows users to upload files.",dM=`
def onchange_handler(state, payload):

	# An array of dictionaries is provided in the payload
	# The dictionaries have the properties name, type and data
    # The data property is a file-like object

    uploaded_files = payload
    for i, uploaded_file in enumerate(uploaded_files):
		name = uploaded_file.get("name")
        file_data = uploaded_file.get("data")
        with open(f"{name}-{i}.jpeg", "wb") as file_handle:
            file_handle.write(file_data)`.trim(),fM={writer:{name:"File Input",description:uM,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},allowFileTypes:{name:"Allowed file types",type:L.Text,init:[".pdf",".txt",".doc","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].join(", "),desc:"Provides hints for browsers to select the correct file types. You can specify extensions and MIME types separated by comma, or leave empty to accept any file."},allowMultipleFiles:{name:"Allow multiple files",default:"no",type:L.Text,options:{yes:"Yes",no:"No"}},cssClasses:et},events:{"wf-file-change":{desc:"Capture changes to this control.",stub:dM,bindable:!0}}}},pM=Pe({...fM,__name:"CoreFileInput",setup(e){const t=Z(ee.evaluatedFields),n=oe(null),r=oe(null),a=oe(null),o=Z(ee.core),s=Z(ee.instancePath),i=oe(null),{formValue:l,handleInput:c}=on(o,s,n),f=ne(()=>Array.isArray(l.value)?l.value:[]),u=ne(()=>{var y;return((y=t.allowFileTypes)==null?void 0:y.value)??""}),m=ne(()=>t.allowMultipleFiles.value=="yes"?!0:void 0),w=async y=>{const p=new FileReader;return p.readAsDataURL(y),new Promise(($,E)=>{p.onload=()=>$(p.result),p.onerror=()=>E(p.error)})},b=async y=>{const p=y.target;if(!p.files||p.files.length==0)return;const $=async()=>{let B=0;a.value=null;const z=Promise.all(Array.from(p.files).map(async le=>(B+=le.size,{name:le.name,type:le.type,data:await w(le)})));return B>xh?(a.value=`Files are too big. Total size limit is ${Math.floor(xh/Math.pow(1024,2))}mb.`,[]):z};i.value=Array.from(p.files).map(B=>B.name),l.value=$();const E=()=>{i.value=null};c($(),"wf-file-change",E)};Ke(l,y=>{typeof y>"u"&&r.value&&(r.value.value="")});function g(y){const p=document.createElement("a");p.href=String(y.data),p.download=y.name,p.click(),p.remove()}const v=ne(()=>m.value?"files":"file"),A=ne(()=>`Browse ${v.value}`),C=ne(()=>`No ${v.value} selected`);return(y,p)=>(T(),Ue(_n,{ref_key:"rootInstance",ref:n,label:i.value?"":P(t).label.value,class:"CoreFileInput"},{default:Ze(()=>[q("div",tM,[i.value?xe("",!0):(T(),R("div",nM,[Wt(q("input",{ref_key:"fileEl",ref:r,type:"file",multiple:m.value,accept:u.value,onChange:p[0]||(p[0]=$=>b($))},null,40,rM),[[$n,!1]]),q("div",null,[Ye(or,{variant:"tertiary",size:"small",onClick:p[1]||(p[1]=$=>r.value.click())},{default:Ze(()=>[xt(Te(A.value),1)]),_:1})]),f.value?(T(),R("ul",aM,[(T(!0),R(je,null,It(f.value,($,E)=>(T(),R("li",{key:E},[q("a",{href:"#",onClick:B=>g($)},Te($.name),9,oM)]))),128))])):(T(),R("p",sM,Te(C.value),1))])),a.value||i.value?(T(),R("div",iM,[i.value?(T(),Ue(zg,{key:0,class:"loadingSymbol"})):xe("",!0),i.value?(T(),R("span",lM,"Processing "+Te(i.value.join(", "))+"...",1)):xe("",!0),a.value?(T(),R("span",cM,Te(a.value),1)):xe("",!0)])):xe("",!0)])]),_:1},8,["label"]))}}),hM=Oe(pM,[["__scopeId","data-v-b0144f64"]]),mM=e=>(Qt("data-v-087b2aea"),e=e(),Xt(),e),vM=["id","data-mode","data-list-position","aria-activedescendant"],gM={class:"placeholder"},yM={key:0,class:"desc",role:"option"},_M={key:1,class:"desc",role:"option"},bM=["onClick"],wM=mM(()=>q("i",{class:"material-symbols-outlined"}," close ",-1)),AM=[wM],CM=["id","data-list-offset","onMousemove","onClick"],$M={key:0,class:"empty"},Ph=200,IM=Pe({__name:"BaseSelect",props:{baseId:{type:String,required:!0},activeValue:{type:[Array,String],required:!0},options:{type:Object,required:!0},maximumCount:{type:Number,required:!0},mode:{type:String,required:!0},placeholder:{type:String,required:!1,default:void 0}},emits:["change"],setup(e,{emit:t}){Ha(ce=>({"489e9b3c":`${Ph}px`}));const n=t,r=e,{baseId:a,options:o,maximumCount:s,mode:i,placeholder:l}=$u(r),c=ne(()=>typeof r.activeValue=="string"?[r.activeValue]:r.activeValue),f=oe(null),u=oe(null),m=oe(null),w=oe(null),b=oe(""),g=oe(null),v=oe([]),A=oe("hidden"),C=ne(()=>{if(i.value=="multiple"&&y.value)return{};const ce={};return Object.entries(o.value).forEach(([he,ke])=>{i.value=="multiple"&&v.value.includes(he)||String(ke).toLocaleLowerCase().includes(b.value.toLocaleLowerCase())&&(ce[he]=ke)}),ce}),y=ne(()=>!(s.value<=0||v.value.length<s.value));Ke(c,()=>{v.value=c.value.filter(ce=>o.value[ce]!==void 0)},{immediate:!0}),Ke(C,()=>{p()});function p(){if(g.value<=0){g.value=0;return}const ce=Object.keys(C.value).length-1;g.value>=ce&&(g.value=ce)}Ke(g,()=>{var he;if(g.value===null)return;const ce=(he=f.value)==null?void 0:he.querySelector(`[data-list-offset="${g.value}"]`);ce&&ce.scrollIntoView({block:"nearest",inline:"nearest"})});function $(){const ce=Object.keys(o.value),he=v.value.filter(ke=>ce.includes(ke));n("change",he)}function E(ce){const he=v.value.indexOf(ce);he!==-1&&(v.value.splice(he,1),g.value=null),$()}function B(){v.value.pop(),$()}async function z(ce=!1){A.value="hidden",b.value="",ce&&(await Mn(),f.value&&(f.value.tabIndex=0,f.value.focus()))}function le(ce){const he=ce.key;if(he=="Escape"){ce.preventDefault(),z(!0);return}if(he!=="Tab"&&he!=="Shift"&&A.value=="hidden"){Je();return}if(he=="Enter"){if(g.value===null)return;const ke=Object.keys(C.value);if(!ke||ke.length==0)return;Le(ke[g.value]);return}if(he=="ArrowUp"){if(ce.preventDefault(),g.value===null){const ke=Object.keys(C.value).length-1;g.value=ke;return}g.value--,p();return}if(he=="ArrowDown"){if(ce.preventDefault(),g.value===null){g.value=0;return}g.value++,p();return}}function fe(ce){i.value=="multiple"&&ce.key=="Backspace"&&!b.value&&B()}async function Le(ce){if(i.value=="single")v.value=[];else if(v.value.includes(ce))return;v.value.push(ce),$(),b.value="",v.value.length==s.value&&z(!0),await Mn(),m.value.scrollTop=m.value.scrollHeight}function be(ce){const he=ce.relatedTarget;f.value&&(f.value.contains(he)||z(!1))}function Ce(ce){const he=ce.relatedTarget;f.value&&(f.value.contains(he)||z(!0))}function Re(ce){ce.target.dataset.preventList||Je()}async function Je(){var ke;if(A.value!=="hidden")return;const{bottom:ce}=f.value.getBoundingClientRect(),he=document.body.clientHeight;Ph+ce>=he?A.value="top":A.value="bottom",await Mn(),f.value.tabIndex=-1,(ke=u.value)==null||ke.focus()}function se(ce){g.value=ce}return(ce,he)=>(T(),R("div",{id:P(a),ref_key:"rootEl",ref:f,class:"BaseSelect colorTransformer",tabindex:"0","data-mode":P(i),"data-list-position":A.value,role:"listbox","aria-activedescendant":g.value?`${P(a)}-option-${g.value}`:void 0,onKeydown:le,onClick:Re,onFocusout:be},[q("div",{ref_key:"selectedOptionsEl",ref:m,class:"selectedOptions"},[Wt(q("div",gM,[P(l)?(T(),R(je,{key:0},[xt(Te(P(l)),1)],64)):P(i)=="multiple"&&P(s)>0?(T(),R(je,{key:1},[xt("Select up to "+Te(P(s))+" option"+Te(P(s)>1?"s":"")+"...",1)],64)):P(i)=="multiple"?(T(),R(je,{key:2},[xt("Select options....")],64)):P(i)=="single"?(T(),R(je,{key:3},[xt("Select an option...")],64)):xe("",!0)],512),[[$n,v.value.length==0]]),(T(!0),R(je,null,It(v.value,ke=>{var ye,j;return T(),R("div",{key:ke,class:ut(["option",{notFound:!((ye=P(o))!=null&&ye[ke])}]),"aria-selected":"true"},[(j=P(o))!=null&&j[ke]?(T(),R("div",yM,Te(P(o)[ke]),1)):(T(),R("div",_M,Te(ke),1)),q("div",{class:"remove","data-prevent-list":"true","aria-label":"Remove",onClick:ue=>E(ke)},AM,8,bM)],2)}),128)),Wt(q("input",{ref_key:"inputEl",ref:u,"onUpdate:modelValue":he[0]||(he[0]=ke=>b.value=ke),type:"text","aria-autocomplete":"none",tabindex:"-1",onKeydown:fe,onBlur:Ce},null,544),[[bo,b.value]])],512),Wt(q("div",{ref_key:"listEl",ref:w,class:"list"},[(T(!0),R(je,null,It(C.value,(ke,ye,j)=>(T(),R("div",{id:`${P(a)}-option-${j}`,key:`${j}-${ye}`,class:ut(["option",{highlighted:g.value==j}]),role:"option","data-list-offset":j,"data-prevent-list":"true",onMousemove:ue=>se(j),onClick:ue=>Le(ye)},Te(ke),43,CM))),128)),Object.keys(C.value).length==0?(T(),R("div",$M,[P(i)=="multiple"&&y.value?(T(),R(je,{key:0},[xt("Up to "+Te(P(s))+" option"+Te(P(s)>1?"s":"")+" allowed.",1)],64)):(T(),R(je,{key:1},[xt("No results")],64))])):xe("",!0)],512),[[$n,A.value!=="hidden"]])],40,vM))}}),cy=Oe(IM,[["__scopeId","data-v-087b2aea"]]),SM="A user input component that allows users to select multiple values from a searchable list of options.",EM={a:"Option A",b:"Option B"},kM=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected option

	state["selected"] = payload`,TM={writer:{name:"Multiselect Input",description:SM,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:L.KeyValue,default:JSON.stringify(EM,null,2),validator:La},placeholder:{name:"Placeholder",desc:"Text to show when no options are selected.",type:L.Text},maximumCount:{name:"Maximum count",desc:"The maximum allowable number of selected options. Set to zero for unlimited.",type:L.Number,default:"0",validator:Nn},accentColor:{...en,desc:"The colour of the chips created for each selected option."},chipTextColor:{name:"Chip text",type:L.Color,default:Ct.White,desc:"The colour of the text in the chips.",category:Be.Style,applyStyleVariable:!0},primaryTextColor:Ft,secondaryTextColor:Ln,containerBackgroundColor:yr,separatorColor:Gt,cssClasses:et},events:{"wf-options-change":{desc:"Sent when the selected options change.",stub:kM.trim(),bindable:!0}}}},xM=Pe({...TM,__name:"CoreMultiselectInput",setup(e){const t=Z(ee.evaluatedFields),n=ne(()=>t.options.value),r=ne(()=>t.maximumCount.value),a=oe(null),o=Z(ee.core),s=Z(ee.instancePath),i=Z(ee.flattenedInstancePath),{formValue:l,handleInput:c}=on(o,s,a);function f(u){c(u,"wf-options-change")}return(u,m)=>(T(),Ue(_n,{ref_key:"rootInstance",ref:a,label:P(t).label.value,class:"CoreMultiselectInput"},{default:Ze(()=>[Ye(cy,{"base-id":P(i),"active-value":P(l),options:n.value,"maximum-count":r.value,mode:"multiple",placeholder:P(t).placeholder.value,onChange:f},null,8,["base-id","active-value","options","maximum-count","placeholder"])]),_:1},8,["label"]))}}),PM=Oe(xM,[["__scopeId","data-v-3b9fe936"]]),MM=["value","placeholder","min","max","step"],NM="A user input component that allows users to enter numeric values.",Mh=`
def onchange_handler(state, payload):

	# Set the state variable "new_val" to the new value

	state["new_val"] = payload`,OM={writer:{name:"Number Input",description:NM,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},placeholder:{name:"Placeholder",type:L.Text},minValue:{name:"Minimum value",type:L.Number,default:null},maxValue:{name:"Max value",type:L.Number,default:null},valueStep:{name:"Step",type:L.Number,default:"1"},cssClasses:et},events:{"wf-number-change":{desc:"Capture changes as they happen.",stub:Mh,bindable:!0},"wf-number-change-finish":{desc:"Capture changes once this control has lost focus.",stub:Mh}}}},RM=Pe({...OM,__name:"CoreNumberInput",setup(e){const t=Z(ee.evaluatedFields),n=oe(null),r=oe(null),a=Z(ee.core),o=Z(ee.instancePath),{formValue:s,handleInput:i}=on(a,o,n);function l(){if(r.value.value=="")return null;let u=parseFloat(r.value.value);return isNaN(u)||(t.minValue.value!==null&&u<t.minValue.value&&(u=t.minValue.value,r.value.value=u),t.maxValue.value!==null&&u>t.maxValue.value&&(u=t.maxValue.value,r.value.value=u)),u}function c(){const u=l();isNaN(u)||i(u,"wf-number-change")}function f(){const u=l();isNaN(u)||i(u,"wf-number-change-finish")}return(u,m)=>(T(),Ue(_n,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreNumberInput"},{default:Ze(()=>[q("input",{ref_key:"inputEl",ref:r,type:"number",value:P(s),placeholder:P(t).placeholder.value,min:P(t).minValue.value!==null?P(t).minValue.value:void 0,max:P(t).maxValue.value!==null?P(t).maxValue.value:void 0,step:P(t).valueStep.value!==null?P(t).valueStep.value:void 0,onInput:c,onChange:f},null,40,MM)]),_:1},8,["label"]))}}),LM=Oe(RM,[["__scopeId","data-v-24160bde"]]),DM=["id","checked","value","name","onInput"],FM=["for"],jM="A user input component that allows users to choose a single value from a list of options using radio buttons.",VM={a:"Option A",b:"Option B"},BM=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected radio option

	state["selected"] = payload`,UM={writer:{name:"Radio Input",description:jM,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:L.KeyValue,default:JSON.stringify(VM,null,2),validator:La},orientation:{name:"Orientation",type:L.Text,options:{vertical:"Vertical",horizontal:"Horizontal"},default:"vertical",category:Be.Style,desc:"Specify how to lay out the options."},primaryTextColor:Ft,accentColor:en,cssClasses:et},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:BM.trim(),bindable:!0}}}},HM=Pe({...UM,__name:"CoreRadioInput",setup(e){const t=Z(ee.evaluatedFields),n=Z(ee.flattenedInstancePath),r=oe(null),a=Z(ee.core),o=Z(ee.instancePath),{formValue:s,handleInput:i}=on(a,o,r);return(l,c)=>(T(),Ue(_n,{ref_key:"rootInstance",ref:r,label:P(t).label.value,class:"CoreRadioInput"},{default:Ze(()=>[q("div",{class:ut(["options",{horizontal:P(t).orientation.value=="horizontal"}])},[(T(!0),R(je,null,It(P(t).options.value,(f,u)=>(T(),R("div",{key:u,class:"option"},[q("input",{id:`${P(n)}-option-${u}`,type:"radio",checked:P(s)===u,value:u,name:`${P(n)}-options`,onInput:m=>P(i)(u,"wf-option-change")},null,40,DM),q("label",{for:`${P(n)}-option-${u}`},Te(f),9,FM)]))),128))],2)]),_:1},8,["label"]))}}),zM=Oe(HM,[["__scopeId","data-v-09078390"]]),KM="A user input component that allows users to select a single value from a searchable list of options.",WM={a:"Option A",b:"Option B"},GM=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected option

	state["selected"] = payload`,qM={writer:{name:"Select Input",description:KM,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:L.KeyValue,default:JSON.stringify(WM,null,2),validator:La},placeholder:{name:"Placeholder",desc:"Text to show when no options are selected.",type:L.Text},maximumCount:{name:"Maximum count",desc:"The maximum allowable number of selected options. Set to zero for unlimited.",type:L.Number,default:"0",validator:Nn},accentColor:en,chipTextColor:{name:"Chip text",type:L.Color,default:Ct.White,desc:"The color of the text in the chips.",category:Be.Style,applyStyleVariable:!0},primaryTextColor:Ft,secondaryTextColor:Ln,containerBackgroundColor:yr,separatorColor:Gt,cssClasses:et},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:GM.trim(),bindable:!0}}}},JM=Pe({...qM,__name:"CoreSelectInput",setup(e){const t=Z(ee.evaluatedFields),n=ne(()=>t.options.value),r=oe(null),a=Z(ee.core),o=Z(ee.flattenedInstancePath),s=Z(ee.instancePath),{formValue:i,handleInput:l}=on(a,s,r);function c(f){const u=(f==null?void 0:f[0])??null;l(u,"wf-option-change")}return(f,u)=>(T(),Ue(_n,{ref_key:"rootInstance",ref:r,label:P(t).label.value,class:"CoreSelectInput"},{default:Ze(()=>[Ye(cy,{"base-id":P(o),"active-value":P(i)?[P(i)]:[],options:n.value,"maximum-count":1,mode:"single",placeholder:P(t).placeholder.value,onChange:c},null,8,["base-id","active-value","options","placeholder"])]),_:1},8,["label"]))}}),YM=Oe(JM,[["__scopeId","data-v-f2ad3b94"]]);function Xi(e,t){const n=ne(()=>{var r;return((r=String(t.value).split(".")[1])==null?void 0:r.length)??0});return ne(()=>Number(e.value).toFixed(n.value))}const QM={class:"BaseInputRange__popover__content"},XM=Pe({__name:"BaseInputSliderThumb",props:Ua({min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},sliderBoundingRect:{type:Object,default:void 0},popoverDisplayMode:{type:String,default:"onChange"}},{value:{type:Number,default:50},valueModifiers:{}}),emits:["update:value"],setup(e,{expose:t}){const n=e;t({handleMouseDown:w,getOffsetLeft:b});const r=oa(e,"value"),a=oe(),o=Xi(r,ea(n,"step")),s=ne(()=>typeof r.value!="number"?50:(r.value-n.min)/(n.max-n.min)*100),i=oe(n.popoverDisplayMode==="always");let l=null;Ke(ea(n.popoverDisplayMode),()=>{n.popoverDisplayMode==="always"&&(i.value=!0)});function c(){n.popoverDisplayMode!=="always"&&(i.value=!0,l&&(clearTimeout(l),l=null),l=setTimeout(()=>{i.value=!1,l=null},1e3))}const f=ne(()=>`${s.value}%`),u=ne(()=>`${s.value}%`);function m(g){if(c(),n.min!==void 0&&g<n.min||n.max!==void 0&&g>n.max)return;const v=g-n.min,A=Math.round(v/n.step),C=n.min+A*n.step;r.value!==C&&(r.value=C)}function w(g){document.addEventListener("mousemove",A),document.addEventListener("mouseup",C);const v=n.sliderBoundingRect;A(g);function A(y){const p=(y.x-v.left)/(v.right-v.left);if(p>1||p<0)return;const $=(n.max-n.min)*p+n.min;m($)}function C(){document.removeEventListener("mouseup",C),document.removeEventListener("mousemove",A)}}function b(){return a.value.offsetLeft}return(g,v)=>(T(),R(je,null,[Ye(ml,null,{default:Ze(()=>[Wt(q("div",{class:"BaseInputRange__popover",style:vt({left:u.value})},[q("span",QM,Te(P(o)),1)],4),[[$n,i.value]])]),_:1}),q("button",{ref_key:"thumb",ref:a,type:"button",class:"BaseInputRange__thumb",style:vt({left:f.value}),"aria-label":"Use the arrow keys to increase or decrease the value.",onKeydown:[v[0]||(v[0]=aa(A=>m(+r.value-e.step),["left"])),v[1]||(v[1]=aa(A=>m(+r.value+e.step),["right"]))],onMousedown:w},null,36)],64))}}),uy=Oe(XM,[["__scopeId","data-v-c5f7e9fd"]]),ZM=["aria-valuemin","aria-valuemax"],eN=Pe({__name:"BaseInputSliderLayout",props:{min:{type:Number,default:0},max:{type:Number,default:100},popoverDisplayMode:{type:String,default:"onChange"}},setup(e){return(t,n)=>(T(),R("div",{role:"slider","aria-valuemin":e.min,"aria-valuemax":e.max,class:ut(["BaseInputRange",{"BaseInputRange--popover-always-visible":e.popoverDisplayMode==="always"}])},[Dt(t.$slots,"default",{},void 0,!0)],10,ZM))}}),dy=Oe(eN,[["__scopeId","data-v-4583336d"]]);function fy(e,t=500){const n=oe(),r=setInterval(()=>{var a;n.value=(a=e.value)==null?void 0:a.getBoundingClientRect()},t);return cr(()=>{clearInterval(r)}),ne(()=>n.value)}const tN=9,nN=Pe({__name:"BaseInputSlider",props:Ua({min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},popoverDisplayMode:{type:String,default:"onChange"}},{value:{type:Number,default:50},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=oa(e,"value"),r=oe(),a=oe(),o=Xi(n,ea(t,"step")),s=ne(()=>typeof n.value!="number"?50:(n.value-t.min)/(t.max-t.min)*100),i=fy(r);return Ke(()=>t.min,()=>{typeof n.value=="number"&&n.value<t.min&&(n.value=t.min)},{immediate:!0}),Ke(()=>t.max,()=>{typeof n.value=="number"&&n.value>t.max&&(n.value=t.max)},{immediate:!0}),(l,c)=>(T(),Ue(dy,{min:e.min,max:e.max,"popover-display-mode":e.popoverDisplayMode,"aria-valuenow":e.value,"aria-valuetext":`${P(o)} (${Math.round(s.value)}%)`},{default:Ze(()=>[q("div",{ref_key:"slider",ref:r,class:"BaseInputRange__slider",onMousedown:c[0]||(c[0]=(...f)=>a.value.handleMouseDown&&a.value.handleMouseDown(...f))},[q("div",{class:"BaseInputRange__slider__progress",style:vt({width:`calc(${s.value}% + ${tN}px)`})},null,4)],544),Ye(uy,{ref_key:"thumb",ref:a,value:e.value,min:e.min,max:e.max,step:e.step,"popover-display-mode":e.popoverDisplayMode,"slider-bounding-rect":P(i),"onUpdate:value":c[1]||(c[1]=f=>n.value=f)},null,8,["value","min","max","step","popover-display-mode","slider-bounding-rect"])]),_:1},8,["min","max","popover-display-mode","aria-valuenow","aria-valuetext"]))}}),rN="A user input component that allows users to select numeric values using a slider with optional constraints like min, max, and step.",aN=`
def onchange_handler(state, payload):

	# Set the state variable "new_val" to the new value

	state["new_val"] = payload`,oN={writer:{name:"Slider Input",description:rN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},minValue:{name:"Minimum value",type:L.Number,default:"0",init:"0"},maxValue:{name:"Maximum value",type:L.Number,default:"100",init:"100"},stepSize:{name:"Step size",type:L.Number,default:"1",init:"1",validator:Nn},accentColor:en,popoverColor:{name:"Popover color",type:L.Color,category:Be.Style,applyStyleVariable:!0,default:"white"},popoverBackgroundColor:{name:"Popover background",type:L.Color,category:Be.Style,applyStyleVariable:!0,default:"rgba(0, 0, 0, 1)"},cssClasses:et},events:{"wf-number-change":{desc:"Capture changes to this control.",stub:aN,bindable:!0}}}},sN=Pe({...oN,__name:"CoreSliderInput",setup(e){const t=Z(ee.evaluatedFields),n=oe(null),r=Z(ee.core),a=Z(ee.instancePath),{formValue:o,handleInput:s}=on(r,a,n,50);return(i,l)=>(T(),Ue(_n,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreSliderInput"},{default:Ze(()=>[Ye(nN,{"popover-display-mode":"always",value:P(o),min:P(t).minValue.value,max:P(t).maxValue.value,step:P(t).stepSize.value,"onUpdate:value":l[0]||(l[0]=c=>P(s)(c,"wf-number-change"))},null,8,["value","min","max","step"])]),_:1},8,["label"]))}}),iN=Oe(sN,[["__scopeId","data-v-c2e33d68"]]),lN=9,cN=Pe({__name:"BaseInputSliderRange",props:Ua({min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},popoverDisplayMode:{type:String,default:"onChange"}},{value:{type:Array,default:()=>[20,60]},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=oa(e,"value");function r(v,A){const C=[...n.value];C[v]=A,n.value=C.sort((y,p)=>y-p)}const a=oe(),o=oe();function s(v){const A=o.value[0],C=o.value[1],y=Math.abs(v.x-A.getOffsetLeft()),p=Math.abs(v.x-C.getOffsetLeft());y>p?C.handleMouseDown(v):A.handleMouseDown(v)}const i=ne(()=>Math.min(...n.value)),l=ne(()=>Math.max(...n.value)),c=ea(t,"step"),f=Xi(i,c),u=Xi(l,c),m=ne(()=>`from ${f} to ${u}`),w=ne(()=>typeof i.value!="number"?50:(i.value-t.min)/(t.max-t.min)*100),b=ne(()=>typeof l.value!="number"?50:(l.value-t.min)/(t.max-t.min)*100-w.value),g=fy(a);return Ke(()=>t.min,()=>{n.value.some(v=>v<t.min)&&(n.value=n.value.map(v=>v<t.min?t.min:v))},{immediate:!0}),Ke(()=>t.max,()=>{n.value.some(v=>v>t.max)&&(n.value=n.value.map(v=>v>t.max?t.max:v))},{immediate:!0}),(v,A)=>(T(),Ue(dy,{class:"BaseInputRangeSlider",min:e.min,max:e.max,"popover-display-mode":e.popoverDisplayMode,"aria-valuetext":m.value},{default:Ze(()=>[q("div",{ref_key:"slider",ref:a,class:"BaseInputRange__slider",onMousedown:s},[q("div",{class:"BaseInputRange__slider__progress",style:vt({width:`calc(${b.value}% + ${lN}px)`,marginLeft:`${w.value}%`})},null,4)],544),(T(),R(je,null,It([0,1],C=>Ye(uy,{key:C,ref_for:!0,ref_key:"thumbs",ref:o,value:e.value[C],min:e.min,max:e.max,step:c.value,"popover-display-mode":e.popoverDisplayMode,"slider-bounding-rect":P(g),"onUpdate:value":y=>r(C?1:0,y)},null,8,["value","min","max","step","popover-display-mode","slider-bounding-rect","onUpdate:value"])),64))]),_:1},8,["min","max","popover-display-mode","aria-valuetext"]))}}),uN="A user input component that allows users to select numeric values range using a range slider with optional constraints like min, max, and step.",dN=`
def onchange_handler(state, payload):

	# Set the state variables "from" & "to" to the new range
	state["from"] = payload[0]
	state["to"] = payload[1]`,fN={writer:{name:"Slider Range Input",description:uN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},minValue:{name:"Minimum value",type:L.Number,default:"0",init:"0"},maxValue:{name:"Maximum value",type:L.Number,default:"100",init:"100"},stepSize:{name:"Step size",type:L.Number,default:"1",init:"1",validator:Nn},accentColor:en,popoverColor:{name:"Popover color",type:L.Color,category:Be.Style,applyStyleVariable:!0,default:"white"},popoverBackgroundColor:{name:"Popover background",type:L.Color,category:Be.Style,applyStyleVariable:!0,default:"rgba(0, 0, 0, 1)"},cssClasses:et},events:{"wf-range-change":{desc:"Capture changes to this control.",stub:dN,bindable:!0}}}},pN=Pe({...fN,__name:"CoreSliderRangeInput",setup(e){const t=Z(ee.evaluatedFields),n=oe(null),r=Z(ee.core),a=Z(ee.instancePath),{formValue:o,handleInput:s}=on(r,a,n,[20,50]);return(i,l)=>(T(),Ue(_n,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreSliderInput"},{default:Ze(()=>[Ye(cN,{"popover-display-mode":"always",value:P(o),min:P(t).minValue.value,max:P(t).maxValue.value,step:P(t).stepSize.value,"onUpdate:value":l[0]||(l[0]=c=>P(s)(c,"wf-range-change"))},null,8,["value","min","max","step"])]),_:1},8,["label"]))}}),hN=Oe(pN,[["__scopeId","data-v-6297ca8b"]]),mN=["type","value","placeholder"],vN="A user input component that allows users to enter single-line text values.",Nh=`
def onchange_handler(state, payload):

	# Set the state variable "new_val" to the new value

	state["new_val"] = payload`,gN={writer:{name:"Text Input",description:vN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},placeholder:{name:"Placeholder",type:L.Text},passwordMode:{name:"Password mode",default:"no",type:L.Text,options:{yes:"Yes",no:"No"},category:Be.Style},accentColor:en,cssClasses:et},events:{"wf-change":{desc:"Capture changes as they happen.",stub:Nh,bindable:!0},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:Nh}}}},yN=Pe({...gN,__name:"CoreTextInput",setup(e){const t=Z(ee.evaluatedFields),n=oe(null),r=Z(ee.core),a=Z(ee.instancePath),{formValue:o,handleInput:s}=on(r,a,n);return(i,l)=>(T(),Ue(_n,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreTextInput"},{default:Ze(()=>[q("input",{type:P(t).passwordMode.value=="yes"?"password":"text",value:P(o),placeholder:P(t).placeholder.value,"aria-autocomplete":"none",onInput:l[0]||(l[0]=c=>P(s)(c.target.value,"wf-change")),onChange:l[1]||(l[1]=c=>P(s)(c.target.value,"wf-change-finish"))},null,40,mN)]),_:1},8,["label"]))}}),_N=Oe(yN,[["__scopeId","data-v-3de4e860"]]),bN=["value","placeholder","rows"],wN="A user input component that allows users to enter multi-line text values.",Oh=`
def onchange_handler(state, payload):

	# Set the state variable "new_val" to the new value

	state["new_val"] = payload`,AN={writer:{name:"Textarea Input",description:wN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},placeholder:{name:"Placeholder",type:L.Text,control:gl.Textarea},rows:{name:"Rows",type:L.Number,init:"5",default:"5",validator:Nn},cssClasses:et},events:{"wf-change":{desc:"Capture changes as they happen.",stub:Oh,bindable:!0},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:Oh}}}},CN=Pe({...AN,__name:"CoreTextareaInput",setup(e){const t=Z(ee.evaluatedFields),n=oe(null),r=Z(ee.core),a=Z(ee.instancePath),{formValue:o,handleInput:s}=on(r,a,n);return(i,l)=>(T(),Ue(_n,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreTextareaInput"},{default:Ze(()=>[q("textarea",{value:P(o),placeholder:P(t).placeholder.value,rows:P(t).rows.value,onInput:l[0]||(l[0]=c=>P(s)(c.target.value,"wf-change")),onChange:l[1]||(l[1]=c=>P(s)(c.target.value,"wf-change-finish"))},null,40,bN)]),_:1},8,["label"]))}}),$N=Oe(CN,[["__scopeId","data-v-aa91e798"]]),IN=["value"],SN="A user input component that allows users to select a time.",EN=`
def onchange_handler(state, payload):

	# Set the state variable "new_time" to the new value, provided as a hh:mm string (in 24-hour format that includes leading zeros).

	state["new_time"] = payload`,kN={writer:{name:"Time Input",description:SN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},cssClasses:et},events:{"wf-time-change":{desc:"Capture changes to this control.",stub:EN,bindable:!0}}}},TN=Pe({...kN,__name:"CoreTimeInput",setup(e){const t=Z(ee.evaluatedFields),n=oe(null),r=Z(ee.core),a=Z(ee.instancePath),{formValue:o,handleInput:s}=on(r,a,n);return(i,l)=>(T(),Ue(_n,{ref_key:"rootInstance",ref:n,label:P(t).label.value,class:"CoreTimeInput"},{default:Ze(()=>[q("input",{type:"time",value:P(o),onChange:l[0]||(l[0]=c=>P(s)(c.target.value,"wf-time-change"))},null,40,IN)]),_:1},8,["label"]))}}),xN=Oe(TN,[["__scopeId","data-v-fa21b0e5"]]),py=e=>(Qt("data-v-d2e9046c"),e=e(),Xt(),e),PN={key:0,class:"filler light"},MN={key:1,class:"face"},NN={viewBox:"0 0 100 100"},ON=py(()=>q("circle",{class:"eye left",cx:"35",cy:"38",r:"6"},null,-1)),RN=py(()=>q("circle",{class:"eye right",cx:"65",cy:"38",r:"6"},null,-1)),LN=["d"],DN="A user input component that allows users to provide a rating.",FN=`
def onchange_handler(state, payload):

	# Set the state variable "rating" to the new value

	state["rating"] = payload`,jN={writer:{name:"Rating Input",description:DN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},feedback:{name:"Feedback",default:"stars",type:L.Text,options:{stars:"Stars",faces:"Faces",hearts:"Hearts"}},minValue:{name:"Minimum value",type:L.Number,default:"1",desc:"Valid values are 0 and 1.",validator:fs(0,1)},maxValue:{name:"Max value",type:L.Number,default:"5",desc:"Valid values are between 2 and 11.",validator:fs(2,11)},valueStep:{name:"Step",type:L.Number,default:"1",desc:"Valid values are between 0.25 and 1.",validator:fs(.25,1)},accentColor:en,primaryTextColor:Ft,cssClasses:et},events:{"wf-number-change":{stub:FN,bindable:!0}}}},VN=Pe({...jN,__name:"CoreRatingInput",setup(e){const t=Z(ee.evaluatedFields),n=oe(null),r=oe(null),a=Z(ee.core),o=Z(ee.instancePath),s=oe(null),{formValue:i,handleInput:l}=on(a,o,n);function c(p){const $=p.offsetX,E=r.value.querySelectorAll(".unit");let B=0;return E.forEach(z=>{const le=z;$>le.offsetLeft+le.offsetWidth?B++:$>le.offsetLeft&&(B+=($-le.offsetLeft)/le.offsetWidth)}),B}function f(p){let $=Math.ceil(p/C.value)*C.value;return $=Math.max(Math.min($,A.value),v.value),$}function u(p){const $=c(p);return f($)}function m(p){const $=u(p);s.value=$}function w(){s.value=null}function b(p){const $=Math.max(Math.min(p,A.value),v.value),E=45,B=95,z=($-v.value)/(A.value-v.value),le=z*-10,fe=70+le,Le=E+z*(B-E)+le;return`M30,${fe} Q50,${Le} 70,${fe}`}function g(p){const $=u(p);l($,"wf-number-change")}const v=ne(()=>Math.max(Math.min(t.minValue.value,1),0)),A=ne(()=>Math.max(Math.min(t.maxValue.value,11),2)),C=ne(()=>Math.max(Math.min(t.valueStep.value,1),.25)),y=ne(()=>{if(s.value!==null)return s.value;const p=parseFloat(i.value);return isNaN(p)?null:p});return(p,$)=>(T(),Ue(_n,{ref_key:"rootInstance",ref:n,class:"CoreRatingInput",label:P(t).label.value},{default:Ze(()=>[q("div",{ref_key:"unitsEl",ref:r,class:ut(["units",{valueSet:y.value!==null}]),onClick:g,onMousemove:m,onMouseout:w},[(T(!0),R(je,null,It([...Array(A.value).keys()],E=>(T(),R("div",{key:E,class:ut(["unit",P(t).feedback.value])},[q("div",{class:"filler",style:vt({width:`${y.value>E?Math.min(y.value-E,1)*100:0}%`})},null,4),y.value!==null?(T(),R("div",PN)):xe("",!0),P(t).feedback.value=="faces"?(T(),R("div",MN,[(T(),R("svg",NN,[ON,RN,q("path",{class:"mouth",d:b(y.value??E+1)},null,8,LN)]))])):xe("",!0)],2))),128))],34)]),_:1},8,["label"]))}}),BN=Oe(VN,[["__scopeId","data-v-d2e9046c"]]),UN=e=>(Qt("data-v-ab3f108e"),e=e(),Xt(),e),HN=["aria-checked","onKeydown"],zN=UN(()=>q("div",{class:"toggle"},null,-1)),KN=[zN],WN="A user input component with a simple on/off status.",GN=`
def handle_toggle(state, payload):

	# The payload will be a bool 

	state["its_on"] = payload`,qN={writer:{name:"Switch Input",description:WN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},accentColor:en,primaryTextColor:Ft,separatorColor:Gt,cssClasses:et},events:{"wf-toggle":{desc:"Sent when the switch is toggled.",stub:GN.trim(),bindable:!0}}}},JN=Pe({...qN,__name:"CoreSwitchInput",setup(e){const t=Z(ee.evaluatedFields),n=oe(null),r=Z(ee.core),a=Z(ee.instancePath),{formValue:o,handleInput:s}=on(r,a,n);function i(){s(!o.value,"wf-toggle")}return(l,c)=>(T(),Ue(_n,{ref_key:"rootInstance",ref:n,label:P(t).label.value,"is-horizontal":!0,class:"CoreSwitchInput"},{default:Ze(()=>[q("div",{class:ut(["switch",{on:!!P(o)}]),tabindex:"0",role:"switch","aria-checked":!!P(o),onClick:i,onKeydown:aa(Ao(i,["prevent"]),["enter","space"])},KN,42,HN)]),_:1},8,["label"]))}}),YN=Oe(JN,[["__scopeId","data-v-ab3f108e"]]),QN=Pe({__name:"BaseContainer",props:{contentHAlign:{},contentVAlign:{},contentPadding:{},isHorizontal:{type:Boolean}},setup(e){const t=e,n=ne(()=>{const r={padding:t.contentPadding};return t.isHorizontal?{...r,justifyContent:t.contentHAlign,alignItems:t.contentVAlign}:{...r,alignItems:t.contentHAlign,justifyContent:t.contentVAlign}});return(r,a)=>(T(),R("div",{class:ut(["BaseContainer",{horizontal:t.isHorizontal}]),style:vt(n.value),"data-writer-container":""},[Dt(r.$slots,"default",{},void 0,!0)],6))}}),Os=Oe(QN,[["__scopeId","data-v-4caa740e"]]),XN={class:"BaseCollapseIcon__icon material-symbols-outlined"},ZN=Pe({__name:"BaseCollapseButton",props:Ua({direction:{type:String,required:!0}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=oa(e,"modelValue"),r=ne(()=>{switch(t.direction){case"left-right":return"chevron_left";case"top-bottom":return"keyboard_arrow_up";case"right-left":return"chevron_right";case"bottom-top":return"keyboard_arrow_down";default:return"keyboard_arrow_up"}});return(a,o)=>(T(),Ue(or,{class:ut(["BaseCollapseIcon",{"BaseCollapseIcon--collapsed":n.value}]),variant:"tertiary",size:"icon",onClick:o[0]||(o[0]=s=>n.value=!n.value)},{default:Ze(()=>[q("i",XN,Te(r.value),1)]),_:1},8,["class"]))}}),Ld=Oe(ZN,[["__scopeId","data-v-e3ca49f7"]]),eO={key:0,class:"header"},tO={key:0,class:"titleContainer"},nO={key:0},rO={key:1,class:"collapsedTitle"},aO={class:"transformed"},oO={class:"content"},sO="A layout component that organizes its child components in columns. Must be inside a Column Container component.",iO={writer:{name:"Column",description:sO,allowedParentTypes:["columns","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{title:{name:"Title",type:L.Text},width:{name:"Width (factor)",default:"1",init:"1",type:L.Number,desc:"Relative size when compared to other columns in the same container. A column of width 2 will be double the width of one with width 1.",category:Be.Style,validator:Nn},isSticky:{name:"Sticky",default:"no",type:L.Text,options:{yes:"Yes",no:"No"},category:Be.Style},isCollapsible:Nd,startCollapsed:{...$l,desc:"Only applied when the column is collapsible."},separatorColor:Gt,contentPadding:Mo,contentHAlign:Po,contentVAlign:Md,cssClasses:et}}},lO=Pe({...iO,__name:"CoreColumn",setup(e){const t=Z(ee.instancePath),n=Z(ee.instanceData),r=Z(ee.core),a=Z(ee.componentId),o=Z(ee.evaluatedFields),s=ne(()=>o.isCollapsible.value=="yes"),i=oe(o.isCollapsible.value=="yes"&&o.startCollapsed.value=="yes"),l=ne(()=>o.isSticky.value=="yes"),c=ne(()=>{let b;return i.value?b="0 0 32px":b=`${o.width.value} 0 0`,{flex:b}}),f=ne(()=>{var b,g;return w.value>=((g=(b=m.value)==null?void 0:b.value)==null?void 0:g.minimumNonCollapsiblePosition)}),u=ne(()=>f.value?"right-left":"left-right"),m=ne(()=>{var b;for(let g=-1;g>-1*t.length;g--){const v=t.at(g);if(((b=r.getComponentById(v.componentId))==null?void 0:b.type)!=="columns")continue;return n.at(g)}return null}),w=ne(()=>{var b;return(b=r.getComponentById(a))==null?void 0:b.position});return Ke([()=>o.isCollapsible.value,w],()=>{const b=m.value;b&&(b.value={minimumNonCollapsiblePosition:void 0})}),Ke(m,b=>{!b||!b.value||s.value||typeof b.value.minimumNonCollapsiblePosition<"u"&&w.value>=b.value.minimumNonCollapsiblePosition||(b.value.minimumNonCollapsiblePosition=w.value)},{immediate:!0,deep:!0}),(b,g)=>(T(),R("div",{class:ut(["CoreColumn",{sticky:l.value,collapsible:s.value,collapsibleToRight:f.value,collapsed:i.value}]),style:vt(c.value)},[P(o).title.value||s.value?(T(),R("div",eO,[i.value?xe("",!0):(T(),R("div",tO,[P(o).title.value?(T(),R("h3",nO,Te(P(o).title.value),1)):xe("",!0)])),s.value?(T(),Ue(Ld,{key:1,modelValue:i.value,"onUpdate:modelValue":g[0]||(g[0]=v=>i.value=v),class:"collapser",direction:u.value},null,8,["modelValue","direction"])):xe("",!0)])):xe("",!0),i.value&&P(o).title.value?(T(),R("div",rO,[q("div",aO,[q("div",oO,Te(P(o).title.value),1)])])):xe("",!0),Ye(Os,{class:"container","aria-expanded":s.value?i.value:null,"content-h-align":P(o).contentHAlign.value,"content-v-align":P(o).contentVAlign.value,"content-padding":P(o).contentPadding.value},{default:Ze(()=>[Dt(b.$slots,"default",{},void 0,!0)]),_:3},8,["aria-expanded","content-h-align","content-v-align","content-padding"])],6))}}),cO=Oe(lO,[["__scopeId","data-v-e7558095"]]),uO={class:"CoreColumns horizontal","data-writer-container":""},dO={writer:{name:"Column Container",description:"Serves as container for Column components",allowedChildrenTypes:["column","repeater","separator"],category:"Layout",fields:{cssClasses:et}}},fO=Pe({...dO,__name:"CoreColumns",setup(e){const t=Z(ee.instanceData);return t.at(-1).value={minimumNonCollapsiblePosition:void 0},(n,r)=>(T(),R("div",uO,[Dt(n.$slots,"default",{},void 0,!0)]))}}),pO=Oe(fO,[["__scopeId","data-v-616070ed"]]),hO={class:"CoreHeader"},mO={class:"container horizontal","data-writer-container":""},vO="A container component that typically contains the main navigation elements.",gO={writer:{name:"Header",description:vO,category:"Layout",allowedChildrenTypes:["*"],fields:{text:{name:"Text",init:"Header Text",default:"(No text)",type:L.Text},primaryTextColor:Ft,cssClasses:et},previewField:"text"}},yO=Pe({...gO,__name:"CoreHeader",setup(e){const t=Z(ee.evaluatedFields);return(n,r)=>(T(),R("div",hO,[q("h1",null,Te(P(t).text.value),1),q("div",mO,[Dt(n.$slots,"default",{},void 0,!0)])]))}}),_O=Oe(yO,[["__scopeId","data-v-0dba4bfb"]]),bO="A layout component that stacks its child components horizontally, wrapping them to the next row if necessary.",wO={writer:{name:"Horizontal Stack",description:bO,allowedChildrenTypes:["*"],category:"Layout",fields:{contentPadding:{...Mo,default:"0"},contentHAlign:Po,contentVAlign:Md,cssClasses:et}}},AO=Pe({...wO,__name:"CoreHorizontalStack",setup(e){const t=Z(ee.evaluatedFields);return(n,r)=>(T(),Ue(Os,{class:"CoreHorizontalStack","content-h-align":P(t).contentHAlign.value,"content-v-align":P(t).contentVAlign.value,"content-padding":P(t).contentPadding.value,"is-horizontal":!0},{default:Ze(()=>[Dt(n.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-v-align","content-padding"]))}}),CO=Oe(AO,[["__scopeId","data-v-a5e8d853"]]),$O="A container component that divides the layout into sections, with an optional title.",IO={writer:{name:"Section",description:$O,category:"Layout",allowedChildrenTypes:["*"],fields:{title:{name:"Title",init:"Section Title",desc:"Leave blank to hide.",type:L.Text},isCollapsible:Nd,startCollapsed:$l,accentColor:en,primaryTextColor:Ft,secondaryTextColor:Ln,containerBackgroundColor:yr,containerShadow:xo,separatorColor:Gt,buttonColor:_r,buttonTextColor:br,buttonShadow:sa,contentPadding:{...Mo,default:"16px"},contentHAlign:Po,cssClasses:et},previewField:"title"}},SO=Pe({...IO,__name:"CoreSection",setup(e){const t=Z(ee.evaluatedFields),n=ne(()=>t.isCollapsible.value==="yes"),r=oe(n.value&&t.startCollapsed.value==="yes");return(a,o)=>(T(),R("section",{class:ut(["CoreSection",{"CoreSection--collapsible":n.value}])},[P(t).title.value||n.value?(T(),R("div",{key:0,class:ut(["CoreSection__title",{"CoreSection__title--collapsed":n.value&&r.value}])},[q("h3",null,Te(P(t).title.value),1),n.value?(T(),Ue(Ld,{key:0,modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=s=>r.value=s),direction:"top-bottom"},null,8,["modelValue"])):xe("",!0)],2)):xe("",!0),r.value?xe("",!0):(T(),Ue(Os,{key:1,"content-h-align":P(t).contentHAlign.value,"content-padding":P(t).contentPadding.value,"aria-expanded":n.value?r.value:null},{default:Ze(()=>[Dt(a.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding","aria-expanded"]))],2))}}),EO=Oe(SO,[["__scopeId","data-v-eee7bb13"]]),kO="A visual component to create a separation between adjacent elements.",hy={writer:{name:"Separator",description:kO,category:"Layout",fields:{separatorColor:Gt,cssClasses:et}}},Rh=e=>{e.writer&&(e.writer.docs=`_Separator_ components are used to separate layout elements. They can be used in most containers, including _Column Container_ to separate columns.

If the container flows horizontally (like a _Horizontal Stack_ or a _Column Container_) the _Separator_ will be a vertical line. Otherwise, it'll be a horizontal line.`)},TO=e=>(Qt("data-v-5abd9423"),e=e(),Xt(),e),xO={class:"CoreSeparator separator"},PO=TO(()=>q("div",{class:"line"},null,-1)),MO=[PO];function NO(e,t,n,r,a,o){return T(),R("div",xO,MO)}typeof Rh=="function"&&Rh(hy);const OO=Oe(hy,[["render",NO],["__scopeId","data-v-5abd9423"]]),RO={class:"collapserContainer"},LO={class:"container","data-writer-container":""},DO="A container component that organizes its children in a sidebar. Its parent must be a Page component.",FO={writer:{name:"Sidebar",description:DO,positionless:!0,slot:"sidebar",allowedParentTypes:["page"],allowedChildrenTypes:["*"],category:"Layout",fields:{startCollapsed:{...$l,desc:void 0},sidebarBackgroundColor:{name:"Background",type:L.Color,category:Be.Style,applyStyleVariable:!0,default:"rgba(255, 255, 255, 0.3)"},accentColor:en,primaryTextColor:Ft,secondaryTextColor:Ln,containerBackgroundColor:yr,containerShadow:xo,separatorColor:Gt,buttonColor:_r,buttonTextColor:br,buttonShadow:sa,cssClasses:et}}},jO=Pe({...FO,__name:"CoreSidebar",setup(e){const t=Z(ee.evaluatedFields),n=oe(t.startCollapsed.value=="yes"),r=Z(ee.core),a=Z(ee.builderManager),o=Z(ee.componentId),s=ne(()=>a==null?void 0:a.firstSelectedId.value),i=oe(0),l=ne(()=>({"max-height":`calc(100vh - ${i.value}px)`}));Ke(s,f=>{f&&c(f)&&(n.value=!1)});const c=f=>{const u=r.getComponentById(f);return!u||u.type=="root"?!1:u.parentId==o?!0:c(u.parentId)};return Zt(()=>{const f=document.querySelector(".ComponentRenderer");i.value=document.body.clientHeight-(f==null?void 0:f.parentElement.clientHeight)}),(f,u)=>(T(),R("div",{class:ut(["CoreSidebar",{collapsed:n.value}]),style:vt(l.value)},[q("div",RO,[Ye(Ld,{modelValue:n.value,"onUpdate:modelValue":u[0]||(u[0]=m=>n.value=m),direction:"left-right"},null,8,["modelValue"])]),q("div",LO,[Dt(f.$slots,"default",{},void 0,!0)])],6))}}),VO=Oe(jO,[["__scopeId","data-v-81451e0f"]]),BO={class:"CoreTab"},UO=0,Lh=1,HO="A container component that displays its child components as a tab inside a Tab Container.",zO={writer:{name:"Tab",description:HO,allowedParentTypes:["tabs","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{name:{name:"Name",default:"(No name)",init:"Tab Name",type:L.Text},contentPadding:{...Mo,default:"16px"},contentHAlign:Po,cssClasses:et},previewField:"name"}},KO=Pe({...zO,__name:"CoreTab",setup(e){const t=Z(ee.evaluatedFields),n=Z(ee.instancePath),r=Z(ee.instanceData),a=Z(ee.core),o=Z(ee.builderManager),s=Z(ee.componentId),{isComponentVisible:i}=kl(a),l=ne(()=>o==null?void 0:o.firstSelectedId.value),c=()=>{for(let p=-2;p>-1*n.length;p--){const $=n.at(p),{type:E}=a.getComponentById($.componentId);if(E==="tabs")return p+1}},f=ne(()=>{const p=c();return n.at(p)}),u=ne(()=>f==null?void 0:f.value.instanceNumber),m=ne(()=>u.value===UO),w=ne(()=>u.value===Lh),b=ne(()=>i(s)?m.value||w.value&&y.value:!1),g=()=>{for(let p=-1;p>-1*n.length;p--){const $=n.at(p),{type:E}=a.getComponentById($.componentId);if(E==="tabs")return r.at(p)}},v=()=>{const p=c(),$=n.slice(0,p),E=p+1<0?n.slice(p+1):[];return[...$,{componentId:n.at(p).componentId,instanceNumber:Lh},...E]},A=()=>{const p=g();p.value={activeTab:v()}},C=p=>{const $=a.getComponentById(p);return!$||$.type=="root"?!1:$.parentId==s?!0:C($.parentId)};Ke(l,p=>{p&&C(p)&&A()});const y=ne(()=>{var B;let p;m.value?p=v():p=n;const E=(B=g().value)==null?void 0:B.activeTab;return JSON.stringify(E)==JSON.stringify(p)});return So(()=>{var E;if(m.value)return;const p=g();(E=p.value)!=null&&E.activeTab||i(s,n)&&(p.value={activeTab:n})}),(p,$)=>Wt((T(),R("div",BO,[m.value?(T(),R("button",{key:0,class:ut(["bit",{active:y.value}]),tabindex:"0",onClick:A},Te(P(t).name.value),3)):xe("",!0),w.value?Wt((T(),Ue(Os,{key:1,class:"container","content-h-align":P(t).contentHAlign.value,"content-padding":P(t).contentPadding.value},{default:Ze(()=>[Dt(p.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding"])),[[$n,y.value]]):xe("",!0)],512)),[[$n,b.value]])}}),WO=Oe(KO,[["__scopeId","data-v-63c66105"]]),GO={class:"CoreTabs"},qO={class:"tabSelector horizontal","data-writer-cage":"","data-writer-container":""},JO={class:"container"},YO="A container component for organising and displaying Tab components in a tabbed interface.",QO={writer:{name:"Tab Container",description:YO,category:"Layout",allowedChildrenTypes:["tab","repeater"],fields:{accentColor:en,primaryTextColor:Ft,secondaryTextColor:Ln,containerBackgroundColor:yr,containerShadow:xo,separatorColor:Gt,buttonColor:_r,buttonTextColor:br,buttonShadow:sa,cssClasses:et}}},XO=Pe({...QO,__name:"CoreTabs",setup(e){const t=Z(ee.instanceData);return t.at(-1).value={activeTab:void 0},(n,r)=>(T(),R("div",GO,[q("nav",qO,[Dt(n.$slots,"default",{instanceNumber:0},void 0,!0)]),q("div",JO,[Dt(n.$slots,"default",{instanceNumber:1},void 0,!0)])]))}}),ZO=Oe(XO,[["__scopeId","data-v-46e04ad4"]]),my=e=>(Qt("data-v-2d738f54"),e=e(),Xt(),e),eR={class:"CoreStep"},tR=["disabled"],nR={class:"indicator"},rR=my(()=>q("div",{class:"linker left"},null,-1)),aR={key:0,class:"material-symbols-outlined"},oR=my(()=>q("div",{class:"linker right"},null,-1)),sR={class:"label"},wi=0,Tc=1,iR="A container component that displays its child components as a step inside a Step Container.",lR={writer:{name:"Step",description:iR,allowedParentTypes:["steps","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{name:{name:"Name",default:"(No name)",init:"Step name",type:L.Text},contentPadding:{...Mo,default:"16px"},isCompleted:{name:"Completed",desc:"Use a state reference to dynamically mark this step as complete.",default:"no",type:L.Text,options:{yes:"Yes",no:"No"}},contentHAlign:Po,cssClasses:et},previewField:"name"}},cR=Pe({...lR,__name:"CoreStep",setup(e){const t=Z(ee.evaluatedFields),n=Z(ee.instancePath),r=Z(ee.instanceData),a=Z(ee.isBeingEdited),o=Z(ee.core),s=Z(ee.builderManager),i=Z(ee.componentId),{isComponentVisible:l}=kl(o),c=ne(()=>s==null?void 0:s.firstSelectedId.value),f=m();function u(){for(let p=-1;p>-1*n.length;p--){const $=n.at(p),E=o.getComponentById($.componentId);if(!E)return;if(E.type==="steps")return p}}function m(){const p=u();if(!(typeof p>"u"))return r.at(p)}function w(){const p=u()+1,$=n.slice(0,p),E=p+1<0?n.slice(p+1):[];return[...$,{componentId:n.at(p).componentId,instanceNumber:Tc},...E]}function b(){f.value={...f.value,activeStep:w()}}function g(){const p=f.value.steps.findIndex(B=>JSON.stringify(B.instancePath)==JSON.stringify(n));if(p==-1||p+1>f.value.steps.length)return;let E=f.value.steps.slice(p+1).find(B=>B.isCompleted!="yes");E||(E=f.value.steps.at(-1)),f.value={...f.value,activeStep:E.instancePath}}function v(p){const $=o.getComponentById(p);return!$||$.type=="root"?!1:$.parentId==i?!0:v($.parentId)}function A(){if(t.isCompleted.value!="yes"){b();return}g()}const C=ne(()=>{const p=u()+1;return n.at(p)});Ke(c,p=>{p&&v(p)&&b()});const y=ne(()=>{var E;let p;(C==null?void 0:C.value.instanceNumber)==wi?p=w():p=n;const $=(E=f.value)==null?void 0:E.activeStep;return JSON.stringify($)==JSON.stringify(p)});return Ke([y,t.isCompleted],()=>{a.value||y.value&&t.isCompleted.value=="yes"&&g()}),Ke(t.isCompleted,(p,$)=>{$==="yes"&&p==="no"&&A()}),So(()=>{var $;(C==null?void 0:C.value.instanceNumber)==wi||(typeof f.value.steps.find(E=>E.instancePath==n)>"u"&&f.value.steps.push({instancePath:n,isCompleted:t.isCompleted.value}),($=f.value)==null?void 0:$.activeStep)||l(i,n)&&A()}),Ba(()=>{const p=f.value.steps.findIndex($=>JSON.stringify($.instancePath)==JSON.stringify(n));f.value.steps.splice(p,1)}),(p,$)=>{var E,B,z,le;return Wt((T(),R("div",eR,[((E=C.value)==null?void 0:E.instanceNumber)==wi?(T(),R("button",{key:0,class:ut(["bit",{active:y.value,completed:P(t).isCompleted.value=="yes"}]),disabled:!P(a),stepindex:"0",onClick:b},[q("div",nR,[rR,q("div",{class:ut(["status",{completed:P(t).isCompleted.value=="yes"}])},[P(t).isCompleted.value=="yes"?(T(),R("i",aR," done ")):xe("",!0)],2),oR]),q("div",sR,Te(P(t).name.value),1)],10,tR)):xe("",!0),((B=C.value)==null?void 0:B.instanceNumber)==Tc?Wt((T(),Ue(Os,{key:1,class:"container","content-h-align":P(t).contentHAlign.value,"content-padding":P(t).contentPadding.value},{default:Ze(()=>[Dt(p.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding"])),[[$n,y.value]]):xe("",!0)],512)),[[$n,((z=C.value)==null?void 0:z.instanceNumber)==wi||((le=C.value)==null?void 0:le.instanceNumber)==Tc&&y.value]])}}}),uR=Oe(cR,[["__scopeId","data-v-2d738f54"]]),dR={class:"CoreSteps"},fR={class:"stepSelector horizontal","data-writer-cage":"","data-writer-container":""},pR={class:"container"},hR="A container component for displaying Step components, allowing you to implement a stepped workflow.",mR={writer:{name:"Step Container",description:hR,category:"Layout",allowedChildrenTypes:["step","repeater"],fields:{accentColor:en,primaryTextColor:Ft,secondaryTextColor:Ln,containerBackgroundColor:yr,containerShadow:xo,separatorColor:Gt,buttonColor:_r,buttonTextColor:br,buttonShadow:sa,cssClasses:et}}},vR=Pe({...mR,__name:"CoreSteps",setup(e){const t=Z(ee.instanceData),n={activeStep:void 0,steps:[]};return t.at(-1).value=n,(r,a)=>(T(),R("div",dR,[q("nav",fR,[Dt(r.$slots,"default",{instanceNumber:0},void 0,!0)]),q("div",pR,[Dt(r.$slots,"default",{instanceNumber:1},void 0,!0)])]))}}),gR=Oe(vR,[["__scopeId","data-v-782ebf0b"]]),yR={key:0,class:"material-symbols-outlined"},_R=`
def handle_button_click(state):

	# Increment counter when the button is clicked

	state["counter"] += 1`,bR="A standalone button component that can be linked to a click event handler.",wR={writer:{name:"Button",description:bR,category:"Other",events:{"wf-click":{desc:"Capture single clicks.",stub:_R.trim()}},fields:{text:{name:"Text",init:"Button Text",type:L.Text},isDisabled:{name:"Disabled",default:"no",type:L.Text,options:{yes:"Yes",no:"No"},desc:"Disables all event handlers."},buttonColor:_r,buttonTextColor:br,icon:{name:"Icon",type:L.Text,desc:'A Material Symbols id, such as "arrow_forward".',category:Be.Style},buttonShadow:sa,separatorColor:Gt,cssClasses:et},previewField:"text"}},vy=Pe({...wR,__name:"CoreButton",setup(e){const t=oe(null),n=Z(ee.evaluatedFields),r=Z(ee.isDisabled);Ke(n.isDisabled,o=>{r.value=o=="yes"},{immediate:!0});function a(o){if(!t.value)return;const s=Ns(o);t.value.$el.dispatchEvent(s)}return(o,s)=>(T(),Ue(or,{ref_key:"rootInstance",ref:t,class:"CoreButton","aria-disabled":P(r),onClick:a},{default:Ze(()=>[P(n).icon.value?(T(),R("i",yR,Te(P(n).icon.value),1)):xe("",!0),xt(" "+Te(P(n).text.value),1)]),_:1},8,["aria-disabled"]))}}),Dh=e=>{e.writer&&(e.writer.docs="Writer Framework uses Material Symbols to display icons. To include an icon, check https://fonts.google.com/icons, find the icon's id (such as `arrow_forward`) and it to your _Button_.")};typeof Dh=="function"&&Dh(vy);const AR=Oe(vy,[["__scopeId","data-v-b2d8d89f"]]),CR={padding:"16px","min-height":"64px","min-width":"64px","border-radius":"8px",background:"linear-gradient(90deg, rgba(41,207,0,1) 0%, rgba(145,231,78,1) 100%)"},$R="A generic component that creates customisable HTML elements, which can serve as containers for other components.",gy={writer:{name:"HTML Element",description:$R,category:"Other",allowedChildrenTypes:["*"],fields:{element:{name:"Element",default:"div",type:L.Text,desc:"Set the type of HTML element to create, e.g., 'div', 'section', 'span', etc."},styles:{name:"Styles",default:"{}",init:JSON.stringify(CR,null,2),type:L.Object,desc:"Define the CSS styles to apply to the HTML element using a JSON object or a state reference to a dictionary.",validator:La},attrs:{name:"Attributes",default:"{}",type:L.Object,desc:"Set additional HTML attributes for the element using a JSON object or a dictionary via a state reference.",validator:La},htmlInside:{name:"HTML inside",default:null,type:L.Text,control:gl.Textarea,desc:"Define custom HTML to be used inside the element. It will be wrapped in a div and rendered after children components."},cssClasses:et}},setup(e,{slots:t}){const n=Z(ee.evaluatedFields),r=/^[a-zA-Z][a-zA-Z0-9-_:.]*$/,a=ne(()=>{if(typeof n.attrs.value!="object"||n.attrs.value===null)return{};const o=Object.entries(n.attrs.value).filter(([s])=>r.test(s));return Object.fromEntries(o)});return()=>{let o;return n.htmlInside.value&&(o=na("div",{innerHTML:n.htmlInside.value})),na(n.element.value,{...a.value,class:"CoreHTML","data-writer-container":"",style:n.styles.value},[t.default({}),o])}}},Fh=e=>{e.writer&&(e.writer.docs=`You can configure the element type, styles, and attributes to fit your design requirements. You can link them to state for advanced use cases, such as custom animations.

All valid HTML tags are supported, including tags such as \`iframe\`, allowing you to embed external sites.

Take into account the potential risks of adding custom HTML to your app, including XSS. Be specially careful when injecting user-generated data.`)};typeof Fh=="function"&&Fh(gy);const Dd=e=>(Qt("data-v-d250ae0c"),e=e(),Xt(),e),IR={class:"pagination-left"},SR={class:"pagination-pagesize"},ER=["value","selected"],kR={class:"pagination-description"},TR={class:"bold"},xR={class:"bold"},PR={class:"bold"},MR={class:"pagination-right"},NR={class:"pagination-picker"},OR=Dd(()=>q("i",{class:"material-symbols-outlined"}," navigate_before ",-1)),RR=[OR],LR={key:0,class:"paginationpicker-block paginationpicker-neutral"},DR=["onClick"],FR={key:2,class:"paginationpicker-block paginationpicker-currentpage"},jR=Dd(()=>q("i",{class:"material-symbols-outlined"}," navigate_next ",-1)),VR=[jR],BR={class:"pagination-jump"},UR=Dd(()=>q("label",null,"Jump to",-1)),HR=["value"],zR=`
def handle_page_change(state, payload):
    page = payload
    state["page"] = page

    records = _load_records_from_db(start = state["page"] * state["pageSize"], limit = state["pageSize"])
    # update a repeater
    state["highlighted_members"] = {r.id: r for r in records}
`,KR=`
def handle_page_size_change(state, payload):
    state['pageSize'] = payload

    records = _load_records_from_db(start = state["page"] * state["pageSize"], limit = state["pageSize"])
    # update a repeater
    state["highlighted_members"] = {r.id: r for r in records}
`,WR={writer:{name:"Pagination",category:"Other",description:"A component that can help you paginate records, for example from a Repeater or a DataFrame.",fields:{page:{name:"Page",init:"1",default:"1",type:L.Number,desc:"The current page number.",validator:Nn},pageSize:{name:"Page Size",default:"10",type:L.Number,desc:"The number of items per page.",validator:Nn},totalItems:{name:"Total Items",default:"10",type:L.Number,desc:"The total number of items",validator:Nn},pageSizeOptions:{name:"Page Size Options",init:"",default:"",type:L.Text,desc:"A comma-separated list of page size options. If it's empty, the user can't change the page size. Set your default page size as the first option."},pageSizeShowAll:{name:"Show All Option",default:"no",type:L.Text,options:{yes:"Yes",no:"No"},desc:"Show an option to show all records."},jumpTo:{name:"Jump To",default:"no",type:L.Text,options:{yes:"Yes",no:"No"},desc:"Show an option to jump to a specific page."}},events:{"wf-change-page":{desc:"Fires when the user pick a page",stub:zR.trim()},"wf-change-page-size":{desc:"Fires when the user change the page size.",stub:KR.trim()}}}},GR=Pe({...WR,__name:"CorePagination",setup(e){const t=Z(ee.evaluatedFields),n=Z(ee.core),r=oe(null),a=Z(ee.instancePath),{handleInput:o}=on(n,a,r),{handleInput:s}=on(n,a,r),i=ne(()=>t.pageSizeOptions.value!==""||t.pageSizeShowAll.value==="yes"),l=ne(()=>t.jumpTo.value==="yes"),c=ne(()=>t.totalItems.value==0?0:(t.page.value-1)*t.pageSize.value+1),f=ne(()=>Math.min(t.page.value*t.pageSize.value,t.totalItems.value)),u=ne(()=>t.totalItems.value),m=ne(()=>Math.ceil(parseInt(t.totalItems.value)/parseInt(t.pageSize.value))),w=ne(()=>{let p=[];const $=t.pageSizeOptions.value.split(",");for(const E in $){const B=parseInt($[E],10);p.push({value:B,label:`${B} items`})}return t.pageSizeShowAll.value==="yes"&&p.push({value:u.value,label:"All items"}),p}),b=ne(()=>{const p=[],$=parseInt(t.page.value);if(m.value<=7)for(let E=0;E<m.value;E++)p.push(E+1);else $==1||$==2?(p.push(1),p.push(2),p.push(3),p.push("..."),p.push(m.value-2),p.push(m.value-1),p.push(m.value)):$==3?(p.push(1),p.push(2),p.push(3),p.push(4),p.push("..."),p.push(m.value-1),p.push(m.value)):$==4?(p.push(1),p.push(2),p.push(3),p.push(4),p.push(5),p.push("..."),p.push(m.value)):$==m.value||$==m.value-1?(p.push(1),p.push(2),p.push(3),p.push("..."),p.push(m.value-2),p.push(m.value-1),p.push(m.value)):$==m.value-2?(p.push(1),p.push(2),p.push("..."),p.push(m.value-3),p.push(m.value-2),p.push(m.value-1),p.push(m.value)):(p.push(1),p.push("..."),p.push($-1),p.push($),p.push($+1),p.push("..."),p.push(m.value));return p}),g=ne(()=>parseInt(t.page.value)-1<1),v=ne(()=>parseInt(t.page.value)+1>m.value),A=p=>{if(p.target.value==="")return;let $=parseInt(p.target.value);$>m.value&&($=m.value),o($,"wf-change-page")},C=p=>{o(p,"wf-change-page")},y=p=>{let $=parseInt(p.target.value);s($,"wf-change-page-size")};return Ke(t.page,()=>{}),Ke(t.pageSize,()=>{}),Zt(()=>{}),cr(()=>{}),(p,$)=>(T(),R("div",{ref_key:"rootEl",ref:r,class:"CorePagination"},[q("div",IR,[Wt(q("div",SR,[q("select",{class:"pagesize-select",onChange:y},[(T(!0),R(je,null,It(w.value,(E,B)=>(T(),R("option",{key:B,value:E.value,selected:E.value==P(t).pageSize.value},Te(E.label),9,ER))),128))],32)],512),[[$n,i.value]]),q("div",kR,[xt(" Showing "),q("span",TR,Te(c.value),1),xt(" to "),q("span",xR,Te(f.value),1),xt(" of "),q("span",PR,Te(u.value),1),xt(" results ")])]),q("div",MR,[q("div",NR,[q("div",{class:ut(["paginationpicker-block",{"paginationpicker-disabled":g.value}]),onClick:$[0]||($[0]=E=>C(P(t).page.value-1))},RR,2),(T(!0),R(je,null,It(b.value,(E,B)=>(T(),R(je,{key:B},[E=="..."?(T(),R("div",LR,Te(E),1)):xe("",!0),E!="..."&&E!=P(t).page.value?(T(),R("div",{key:1,class:"paginationpicker-block",onClick:z=>C(E)},Te(E),9,DR)):xe("",!0),E==P(t).page.value?(T(),R("div",FR,Te(E),1)):xe("",!0)],64))),128)),q("div",{class:ut(["paginationpicker-block",{"paginationpicker-disabled":v.value}]),onClick:$[1]||($[1]=E=>C(P(t).page.value+1))},VR,2)]),Wt(q("div",BR,[UR,q("input",{type:"text",value:P(t).page.value,onInput:A},null,40,HR)],512),[[$n,l.value]])])],512))}}),qR=Oe(GR,[["__scopeId","data-v-d250ae0c"]]),JR="A container component that repeats its child components based on a dictionary.",YR={a:{desc:"Option A"},b:{desc:"Option B"}},QR={writer:{name:"Repeater",description:JR,category:"Other",allowedChildrenTypes:["inherit"],fields:{repeaterObject:{name:"Repeater object",default:JSON.stringify(YR,null,2),type:L.Object,desc:"Include a state reference to the dictionary used for repeating the child components. Alternatively, specify a JSON object.",validator:Rk},keyVariable:{name:"Key variable name",default:"itemId",init:"itemId",type:L.Text,desc:"Set the name of the variable that will store the key of the current repeater object entry."},valueVariable:{name:"Value variable name",default:"item",init:"item",type:L.Text,desc:"Set the name of the variable that will store the value of the current repeater object entry."}}},setup(e,{slots:t}){const n=Z(ee.core),r=Z(ee.componentId),a=Z(ee.evaluatedFields),o=Z(ee.isBeingEdited),s=Z(ee.renderProxiedComponent),i=ne(()=>n.getComponents(r,{sortedByPosition:!0})),l=()=>typeof a.repeaterObject.value!="object"?[]:Object.values(a.repeaterObject.value).map((f,u)=>i.value.map(m=>s(m.id,u)));return()=>{let c={};return i.value.length!=0&&a.repeaterObject.value!=null&&Object.keys(a.repeaterObject.value).length!=0?c=l():o.value===!0?c=t.default({}):c={},na("div",{class:"CoreRepeater","data-writer-container":""},c)}}},XR=Oe(QR,[["__scopeId","data-v-0b783e59"]]),ZR="A component that emits an event repeatedly at specified time intervals, enabling time-based refresh.",eL=`
def handle_timer_tick(state):

	# Increment counter when the timer ticks

	state["counter"] += 1`.trim(),tL={writer:{name:"Timer",description:ZR,category:"Other",fields:{intervalMs:{name:"Interval (ms)",desc:"How much time to wait between ticks. A tick is considered finished when its event is handled.",default:"200",type:L.Number,validator:Nn},isActive:{name:"Active",default:"yes",desc:"Whether the timer should trigger tick events.",type:L.Text,options:{yes:"Yes",no:"No"}},accentColor:en,cssClasses:et},events:{"wf-tick":{desc:"Emitted when the timer ticks.",stub:eL.trim()}}}},nL=Pe({...tL,__name:"CoreTimer",setup(e){const r=Z(ee.evaluatedFields),a=Z(ee.core),o=oe(null),s=ne(()=>r.intervalMs.value),i=ne(()=>r.isActive.value=="yes"),l=oe(!1),c=Z(ee.componentId),f=ne(()=>{var v,A;return!!((A=(v=a.getComponentById(c))==null?void 0:v.handlers)!=null&&A["wf-tick"])}),u=ne(()=>({"animation-duration":`${Math.max(s.value,1e3)}ms`}));Ke([i,s],()=>{g()}),Ke(f,async v=>{v&&(await Mn(),g())});let m=0,w=null;function b(){clearTimeout(w)}function g(){if(b(),!i.value||s.value<0||!o.value)return;Date.now()-m>=500&&(o.value.classList.remove("tick"),o.value.offsetWidth,m=Date.now(),o.value.classList.add("tick"));const v=({ok:C})=>{l.value=!C,w=setTimeout(()=>{g()},s.value)},A=new CustomEvent("wf-tick",{detail:{callback:v}});o.value.dispatchEvent(A)}return Zt(()=>{g()}),(v,A)=>(T(),R("div",{ref_key:"rootEl",ref:o,class:ut(["CoreTimer",{failing:l.value}]),style:vt(u.value)},null,6))}}),rL=Oe(nL,[["__scopeId","data-v-f888c908"]]),aL={class:"main"},oL={class:"actions"},sL=["value"],iL="A user input component that allows users to capture images using their webcam.",lL=`
def webcam_handler(payload):

	# This handler will save the captured images based on timestamp

	import time
	timestamp = time.time()

	# The payload is a file-like object which contains the captured image
	# in PNG format

	image_file = payload
	with open(f"capture-{timestamp}.png", "wb") as file_handle:
		file_handle.write(image_file)`.trim(),cL={writer:{name:"Webcam Capture",description:iL,category:"Other",fields:{refreshRate:{name:"Refresh rate (ms)",init:"200",default:"200",desc:"Set to 0 for manual capture.",type:L.Number,validator:Nn},buttonColor:_r,buttonTextColor:br,buttonShadow:sa,separatorColor:Gt,cssClasses:et},events:{"wf-webcam":{desc:"Sent when a frame is captured. Its payload contains the captured frame in PNG format.",stub:lL.trim()}}}},uL=Pe({...cL,__name:"CoreWebcamCapture",setup(e){const t=oe(!1),n=oe(null),r=document.createElement("canvas"),a=oe(null),o=Z(ee.evaluatedFields),s=oe(null),i=oe(null),l=Kn();Zt(async()=>{var v,A;s.value=await c(),i.value=(A=(v=s.value)==null?void 0:v[0])==null?void 0:A.deviceId}),Ba(()=>{g()});const c=async()=>(await navigator.mediaDevices.enumerateDevices()).filter(C=>C.kind=="videoinput"),f=ne(()=>o.refreshRate.value);Ke(f,(v,A)=>{v>0&&A<=0&&w()}),Ke(i,async()=>{t.value&&(g(),await b())});const u=async()=>{if(t.value=!t.value,!t.value){g();return}await b(),w()},m=()=>(r.getContext("2d").drawImage(a.value,0,0),r.toDataURL("image/png")),w=()=>{const v=new CustomEvent("wf-webcam",{detail:{payload:m(),callback:()=>{f.value<=0||!t.value||setTimeout(()=>{w()},f.value)}}});n.value.dispatchEvent(v)},b=async()=>(a.value.style.display="",new Promise((v,A)=>{navigator.mediaDevices.getUserMedia||(l.error("This browser doesn't support webcam connection."),A());const C={video:!0};s.value.length>1&&(C.video={deviceId:i.value}),navigator.mediaDevices.getUserMedia(C).then(y=>{a.value.srcObject=y;const p=y.getVideoTracks()[0].getSettings().width,$=y.getVideoTracks()[0].getSettings().height;r.setAttribute("width",p.toString()),r.setAttribute("height",$.toString()),v()}).catch(y=>{l.error("An error occurred when trying to use the webcam.",y),A()})})),g=()=>{const v=a.value.srcObject;v&&v.getTracks().map(C=>C.stop()),a.value.srcObject=null,a.value.style.display="none"};return(v,A)=>{var C;return T(),R("div",{ref_key:"rootEl",ref:n,class:"CoreWebcamCapture"},[Wt(q("div",aL,[q("video",{ref_key:"videoEl",ref:a,autoplay:"true"},null,512)],512),[[$n,t.value]]),q("div",oL,[f.value==0?(T(),Ue(or,{key:0,onClick:w},{default:Ze(()=>[xt(" Capture image ")]),_:1})):xe("",!0),Ye(or,{onClick:u},{default:Ze(()=>[xt(Te(t.value?"Stop capture":"Start webcam capture"),1)]),_:1}),((C=s.value)==null?void 0:C.length)>1?(T(),Ue(ly,{key:1,modelValue:i.value,"onUpdate:modelValue":A[0]||(A[0]=y=>i.value=y)},{default:Ze(()=>[(T(!0),R(je,null,It(s.value,(y,p)=>(T(),R("option",{key:y.deviceId,value:y.deviceId},Te(y.label||`Webcam ${p+1}`),9,sL))),128))]),_:1},8,["modelValue"])):xe("",!0)])],512)}}}),dL=Oe(uL,[["__scopeId","data-v-8189a507"]]),fL={writer:{name:"Reuse Component",slot:"*",description:"Those components are used to reuse other components. Reused components share the same state and are updated together.",category:"Other",allowedChildrenTypes:[],fields:{proxyId:{name:"Component id",type:L.Text,desc:"The id of the component to reuse."}}}},pL=Pe({...fL,__name:"CoreReuse",props:{contextSlot:{}},setup(e){const t=e,n=Z(ee.evaluatedFields),a=Z(ee.instancePath).at(-2).componentId,o=Z(ee.core),s=Z(ee.renderProxiedComponent),i=Z(ee.isBeingEdited),l=Z(ee.componentId),c=oe(na("div","")),f=oe(!0),u=ne(()=>{var g;return(g=o.getComponentById(n.proxyId.value))==null?void 0:g.type}),m=ne(()=>u.value?o.getComponentDefinition(u.value):null);function w(g,v){f.value=t.contextSlot==="default",c.value=na("div",{class:["CoreReuse",v],style:{color:"var(--primaryTextColor)"}},i.value?g:"")}function b(){if(!n.proxyId.value)return w("No component selected to reuse","empty");if(l===n.proxyId.value||!m.value)return w("The id specified for reuse doesn't match any component.","invalid-value");if(!o.getContainableTypes(a).includes(u.value))return w("The component cannot be reused here.","invalid-context");f.value=t.contextSlot===(m.value.slot??"default");const g=s(n.proxyId.value,0,{class:["CoreReuse"]});c.value=g}return Ke([n.proxyId,m],b,{immediate:!0}),(g,v)=>f.value?(T(),Ue(Ss(c.value),{key:0})):xe("",!0)}}),ia=e=>(Qt("data-v-97ac062d"),e=e(),Xt(),e),hL={key:0,class:"controls"},mL=ia(()=>q("i",{class:"material-symbols-outlined"},"arrow_upward",-1)),vL=ia(()=>q("i",{class:"material-symbols-outlined"},"arrow_downward",-1)),gL=ia(()=>q("i",{class:"material-symbols-outlined"},"zoom_in",-1)),yL=ia(()=>q("i",{class:"material-symbols-outlined"},"zoom_out",-1)),_L=ia(()=>q("span",{class:"separator"},null,-1)),bL=ia(()=>q("i",{class:"material-symbols-outlined"},"navigate_before",-1)),wL=ia(()=>q("i",{class:"material-symbols-outlined"},"navigate_next",-1)),AL={key:2},CL=["page"],$L=ia(()=>q("div",{class:"mask"},null,-1)),IL="A component to embed PDF documents.",SL={writer:{name:"PDF",description:IL,category:"Embed",fields:{source:{name:"PDF source",type:L.Text,desc:"A valid URL. Alternatively, you can provide a state reference to a packed PDF file."},highlights:{name:"Highlights",default:JSON.stringify([]),desc:"A list of highlights to be applied to the PDF as a JSON array of strings.",type:L.Object,validator:Ng},selectedMatch:{name:"Selected highlight match",default:null,desc:"The index of the selected highlight match.",type:L.Number},page:{name:"Page",type:L.Number,desc:"The page to be displayed."},controls:{name:"Controls",type:L.Text,options:{yes:"Yes",no:"No"},desc:"Show controls to navigate the PDF.",default:"yes"},containerBackgroundColor:yr,separatorColor:Gt,primaryTextColor:Ft,cssClasses:et}}},EL=Pe({...SL,__name:"CorePDF",setup(e){const t=Z(ee.evaluatedFields);let n,r,a;const o=ne(()=>t.highlights.value?t.highlights.value.map(Ce=>Ce.replaceAll("|","\\|")).join("|"):""),s=oe({completeWords:!1,ignoreCase:!0}),i=oe(1),l=oe(1),c=oe([]),f=oe(0),u=oe(null),m=oe(null),w=oe(!1),b=oe(0),g=oe([]);Zt(async()=>{const Ce=await pn(()=>import("./index-BdIZiH4Q.js"),[],import.meta.url);a=Ce.VuePDF;const Re=Ce.usePDF;({pdf:n,pages:r}=Re(t.source)),v()});const v=()=>{w.value=!0,b.value=0,g.value=[],c.value=[]},A=Ce=>{g.value=[...g.value,Ce].sort((Re,Je)=>Re.page-Je.page)},C=Ce=>{b.value++},y=()=>{c.value=g.value.reduce((Ce,Re)=>[...Ce,...Re.matches.map((Je,se)=>({page:Re.page,str:Je.str,index:se}))],[]).sort((Ce,Re)=>Ce.page===Re.page?Ce.index-Re.index:Ce.page-Re.page)},p=()=>{y(),f.value&&B(f.value),t.selectedMatch.value&&(f.value=t.selectedMatch.value)},$=Ce=>{const Re=Ce.target.getBoundingClientRect(),Je=[...Ce.target.children].filter(se=>se.className.includes("page")).find(se=>{const ce=se.getBoundingClientRect(),he=ce.y-Re.y;return he<Re.height/2&&he+ce.height>Re.height/2});Je&&(l.value=Number(Je.getAttribute("page")))},E=(Ce,Re)=>{let Je=0,se=Ce;for(;se&&se!==Re;)Je+=se.offsetTop,se=se.offsetParent;return Je},B=Ce=>{if(Ce<1||Ce>c.value.length)return;const Re=c.value[Ce-1];if(!Re)return;const se=u.value.querySelectorAll(`div[page='${Re.page}'] span.highlight`)[Re.index];m.value.scrollTop=E(se,m.value)},z=Ce=>{if(Ce<1||Ce>r.value)return;const Re=u.value.querySelector("div[page='"+Ce+"']");m.value.scrollTop=E(Re,m.value)},le=()=>{f.value<c.value.length?f.value=f.value+1:f.value=1},fe=()=>{f.value>1?f.value=f.value-1:f.value=c.value.length},Le=()=>{i.value=i.value<2?i.value+.1:i.value},be=()=>{i.value=i.value>.25?i.value-.1:i.value};return Ke(b,()=>{b.value===r.value&&t.page.value&&z(t.page.value)}),Ke([g,b],()=>{(!o.value||g.value.length===r.value)&&b.value===r.value&&(p(),w.value=!1)}),Ke(i,()=>{v()}),Ke(t.source,()=>{v()}),Ke(t.highlights,()=>{g.value=[],c.value=[]}),Ke(f,()=>{B(f.value)}),Ke(t.selectedMatch,()=>{f.value=t.selectedMatch.value}),Ke(t.page,()=>{z(t.page.value)}),(Ce,Re)=>(T(),R("div",{ref_key:"rootEl",ref:u,class:"CorePDF"},[P(t).controls.value==="yes"?(T(),R("div",hL,[Ye(nr,{onClick:Re[0]||(Re[0]=()=>z(l.value-1))},{default:Ze(()=>[mL]),_:1}),Ye(nr,{onClick:Re[1]||(Re[1]=()=>z(l.value+1))},{default:Ze(()=>[vL]),_:1}),(T(),R("span",{key:l.value},Te(l.value)+" / "+Te(P(r)),1)),Ye(nr,{disabled:w.value,onClick:Le},{default:Ze(()=>[gL]),_:1},8,["disabled"]),Ye(nr,{disabled:w.value,onClick:be},{default:Ze(()=>[yL]),_:1},8,["disabled"]),q("span",null,Te(Math.round(i.value*100))+"%",1),_L,c.value.length?(T(),Ue(nr,{key:0,onClick:fe},{default:Ze(()=>[bL]),_:1})):xe("",!0),c.value.length?(T(),Ue(nr,{key:1,onClick:le},{default:Ze(()=>[wL]),_:1})):xe("",!0),c.value.length?(T(),R("span",AL,"Matches "+Te(f.value)+" / "+Te(c.value.length),1)):xe("",!0)])):xe("",!0),q("div",{ref_key:"viewerEl",ref:m,class:"viewer",onScroll:$},[(T(!0),R(je,null,It(P(r),Je=>(T(),R("div",{key:Je,page:Je,class:"page"},[Ye(P(a),{scale:i.value,pdf:P(n),page:Je,"text-layer":"","highlight-text":o.value,"highlight-options":s.value,onHighlight:Re[2]||(Re[2]=se=>A(se)),onLoaded:C},null,8,["scale","pdf","page","highlight-text","highlight-options"])],8,CL))),128))],544),$L],512))}}),kL=Oe(EL,[["__scopeId","data-v-97ac062d"]]),yy=e=>(Qt("data-v-d4148909"),e=e(),Xt(),e),TL={key:0,class:"noURLProvided"},xL=yy(()=>q("h2",null,"No URL provided.",-1)),PL=[xL],ML=["src"],NL=yy(()=>q("div",{class:"mask"},null,-1)),OL="A component to embed an external resource in an iframe.",RL=`
def load_handler(state):

	# Sets status message when resource is loaded

	state["status"] = "Page loaded"`,LL={writer:{name:"IFrame",description:OL,category:"Embed",fields:{src:{name:"Source",default:"",desc:"A valid URL",type:L.Text,validator:Rg},separatorColor:Gt,cssClasses:et},events:{"wf-load":{desc:"Fires when the resource has successfully loaded.",stub:RL.trim()}}}},DL=Pe({...LL,__name:"CoreIFrame",setup(e){const t=oe(null),n=Z(ee.evaluatedFields);function r(){const a=new CustomEvent("wf-load");t.value.dispatchEvent(a)}return(a,o)=>(T(),R("div",{ref_key:"rootEl",ref:t,class:"CoreIFrame"},[P(n).src.value?(T(),R("iframe",{key:1,src:P(n).src.value,draggable:"false",onLoad:r},null,40,ML)):(T(),R("div",TL,PL)),NL],512))}}),FL=Oe(DL,[["__scopeId","data-v-d4148909"]]),Fd=e=>(Qt("data-v-7bd1411c"),e=e(),Xt(),e),jL={key:0,class:"noAPIKeyProvided"},VL=Fd(()=>q("h2",null,"Google Maps cannot be initialised.",-1)),BL=Fd(()=>q("h3",null,"An API key hasn't been provided.",-1)),UL=[VL,BL],HL=Fd(()=>q("div",{class:"mask"},null,-1)),zL="A component to embed a Google Map. It can be used to display a map with markers.",KL=[{lat:37.79322359164316,lng:-122.39999318828129,name:"Marker"}],WL={writer:{name:"Google Maps",description:zL,category:"Embed",fields:{apiKey:{name:"API Key",default:"",desc:"API Key from Google Cloud Console.",type:L.Text},mapId:{name:"Map ID",default:"",desc:"ID of map from Google Cloud Console, needed for markers.",type:L.Text},mapType:{name:"Map type",type:L.Text,default:"roadmap",options:{roadmap:"Roadmap",satellite:"Satellite",hybrid:"Hybrid",terrain:"Terrain"},desc:"One of 'roadmap', 'satellite', 'hybrid' or 'terrain'."},zoom:{name:"Zoom",default:"8",type:L.Number},lat:{name:"Latitude",default:"37.79322359164316",type:L.Number,validator:xd},lng:{name:"Longitude",default:"-122.39999318828129",type:L.Number,validator:Pd},markers:{name:"Markers",default:JSON.stringify(KL),desc:"Markers data",type:L.Object,validator:Og},cssClasses:et},events:{"gmap-marker-click":{desc:"Capture single clicks on markers."},"gmap-click":{desc:"Capture single click on map."}}}},GL=Pe({...WL,__name:"CoreGoogleMaps",setup(e){const t=oe(null),n=oe(null),r=Z(ee.evaluatedFields);let a=null,o=[];const s=ne(()=>({lat:r.lat.value,lng:r.lng.value})),i=ne(()=>["roadmap","satellite","hybrid","terrain"].includes(r.mapType.value)?r.mapType.value:"roadmap"),l=async()=>{f();const{Loader:u}=await pn(()=>import("./index-BQr1pfrb.js"),[],import.meta.url);await new u({apiKey:r.apiKey.value,version:"weekly"}).load(),a=new google.maps.Map(n.value,{center:s.value,mapTypeId:i.value,zoom:8,mapId:r.mapId.value}),a.addListener("click",w=>{const b=new CustomEvent("gmap-click",{detail:{payload:w.latLng.toJSON()}});t.value.dispatchEvent(b)}),c()},c=async()=>{if(!r.mapId.value||!r.markers.value)return;const{AdvancedMarkerElement:u}=await google.maps.importLibrary("marker");f(),r.markers.value.forEach(w=>{const b=new u({position:{lat:w.lat,lng:w.lng},map:a,title:w.name});o.push(b),b.addListener("click",()=>{const g=new CustomEvent("gmap-marker-click",{detail:{payload:w}});t.value.dispatchEvent(g)})})},f=()=>{o.forEach(u=>u.setMap(null)),o=[]};return Zt(async()=>{r.apiKey.value&&await l()}),Ke(s,async u=>{a&&a.setCenter(u)}),Ke(r.zoom,async u=>{a&&a.setZoom(u)}),Ke(i,async u=>{a&&a.setMapTypeId(u)}),Ke(r.markers,c),Ke(r.apiKey,l),Ke(r.mapId,l),(u,m)=>(T(),R("div",{ref_key:"rootEl",ref:t,class:"CoreGoogleMaps"},[P(r).apiKey.value?(T(),R("div",{key:1,ref_key:"mapEl",ref:n,class:"map"},null,512)):(T(),R("div",jL,UL)),HL],512))}}),qL=Oe(GL,[["__scopeId","data-v-7bd1411c"]]),JL={class:"sidebarContainer"},YL=`
def handle_keydown(state, payload):
	# The payload is a dictionary containing the key code and modifier keys.
	# For example,
	# {
	#	"key": "ArrowDown",
	#	"ctrl_key": False,
	#	"shift_key": False,
	#	"meta_key": False
	# }

	key_activated = payload.get("key")
	delta = 0
	if key_activated == "ArrowLeft":
		delta += -10
	elif key_activated == "ArrowRight":
		delta += 10

	shift_key = payload.get("shift_key")
	if shift_key:
		delta *= 2 # Shift makes it go faster

	state["position"] += delta
`,QL=`
def handle_page_open(state, payload):
	page_key = payload
	state["message"] = f"The page {page_key} has been opened."
`,XL="A container component representing a single page within the application.",ZL={writer:{name:"Page",category:"Root",events:{"wf-keydown":{desc:"Captures all key activity while this page is open.",stub:YL},"wf-page-open":{desc:"Emitted when the page is opened.",stub:QL}},description:XL,allowedChildrenTypes:["*"],allowedParentTypes:["root"],fields:{key:{name:"Page key",desc:"Unique identifier. It's needed to enable navigation to this Page.",type:L.IdKey},pageMode:{name:"Page mode",default:"compact",type:L.Text,options:{compact:"Compact",wide:"Wide"},category:Be.Style},accentColor:en,primaryTextColor:Ft,secondaryTextColor:Ln,emptinessColor:Lg,containerBackgroundColor:yr,containerShadow:xo,separatorColor:Gt,buttonColor:_r,buttonTextColor:br,buttonShadow:sa,cssClasses:et},previewField:"key"}},e5=Pe({...ZL,__name:"CorePage",setup(e){const t=oe(null),n=Z(ee.evaluatedFields);function r(o){const s=CT(o);t.value.dispatchEvent(s)}function a(){const o=n.key.value,s=new CustomEvent("wf-page-open",{detail:{payload:o}});t.value.dispatchEvent(s)}return Zt(async()=>{document.addEventListener("keydown",r),a()}),cr(()=>{document.removeEventListener("keydown",r)}),(o,s)=>(T(),R("div",{ref_key:"rootEl",ref:t,class:"CorePage"},[q("div",JL,[Dt(o.$slots,"default",{slotName:"sidebar",positionlessSlot:!0},void 0,!0)]),q("div",{class:ut(["main",{compact:P(n).pageMode.value=="compact",wide:P(n).pageMode.value=="wide"}]),"data-writer-container":""},[Dt(o.$slots,"default",{},void 0,!0)],2)],512))}}),t5=Oe(e5,[["__scopeId","data-v-ccb9cbc5"]]),n5=/^((?<pageKey>[^/]*))?(\/(?<routeVars>.*))?$/;function jd(e=document.location.hash){var o;const n=(o=e.substring(1).match(n5))==null?void 0:o.groups,r=n!=null&&n.pageKey?decodeURIComponent(n.pageKey):void 0;if(!n)return{pageKey:r,routeVars:new Map};const a=new URLSearchParams(n.routeVars);return{pageKey:r,routeVars:new Map(a.entries())}}function r5(){const e=jd(),t=Object.fromEntries(e.routeVars.entries());return{pageKey:e.pageKey,routeVars:t}}function a5(e){const{pageKey:t,routeVars:n}=e;let r="";if(t&&(r+=`${encodeURIComponent(t)}`),n.size>0){const a=new URLSearchParams([...n.entries()]);r+=`/${a.toString()}`}return r}function _y(e){document.location.hash=a5(e)}function o5(e){const t=jd();t.pageKey=e,_y(t)}function Z3(e){const t=jd(),n=(t==null?void 0:t.routeVars)??{};t.routeVars=new Map(Object.entries({...n,...e})),_y(t)}const s5=`
def handle_hashchange(state, payload):
	# The payload is a dictionary with the page key and all the route variables in the URL hash.
	# For example, if the current URL is http://localhost:3000/#main/animal=duck&colour=yellow
	# you will get the following dictionary
	# {
	#	  "page_key": "main",
	#	  "route_vars": {
	#		  "animal": "duck",
	#		  "colour": "yellow"
	#	  }
	# }

	page_key = payload.get("page_key")
	route_vars = payload.get("route_vars")

	if not route_vars:
		return

	if route_vars.get("animal") == "duck":
		state["message"] = "You've navigated to the Duck zone."
	else:
		state["message"] = "You're not in the Duck zone.`.trim(),i5=`
def handle_app_open(state):
	# The payload is a dictionary with the page key and all the route variables in the URL hash.
	# For example, if the current URL is http://localhost:3000/#/animal=duck&colour=yellow
	# you will get the following dictionary
	# {
	#   "page_key": "main",
	#	  "route_vars": {
	#		  "animal": "duck",
	#		  "colour": "yellow"
	#	  }
	# }

	page_key = payload.get("page_key")
	route_vars = payload.get("route_vars")
`.trim(),l5="The root component of the application, which serves as the starting point of the component hierarchy.",c5={writer:{name:"Root",category:"Root",description:l5,allowedChildrenTypes:["page"],fields:{appName:{name:"App name",type:L.Text,desc:"The app name will be shown in the browser's title bar."},...Vk},events:{"wf-app-open":{desc:"Captures the first application load, including page key and route vars.",stub:i5},"wf-hashchange":{desc:"Capture changes to the URL hash, including page key and route vars.",stub:s5}}}},u5=Pe({...c5,__name:"CoreRoot",setup(e){const t=Z(ee.core),n=Z(ee.builderManager),r=Z(ee.getChildrenVNodes),a=oe(null),{isComponentVisible:o}=kl(t),s=ne(()=>{const l=t.activePageId.value;if(!!t.getComponentById(l)&&t.isChildOf("root",l))return l;const f=t.getComponents("root",{includeBMC:!0,includeCMC:!0,sortedByPosition:!0});if(f.length==0)return null;const u=f.filter(m=>o(m.id));return u.length==0?null:u[0].id});function i(){var f;const l=r5(),c=new CustomEvent("wf-hashchange",{detail:{payload:l}});(f=a.value)==null||f.dispatchEvent(c),l.pageKey&&t.setActivePageFromKey(l.pageKey)}return Ke(s,l=>{var u;const f=(u=t.getComponentById(l).content)==null?void 0:u.key;n&&!n.isComponentIdSelected(l)&&n.setSelection(null),Mn().then(()=>{var m,w;window.scrollTo(0,0),(w=(m=document.querySelector(".ComponentRenderer"))==null?void 0:m.parentElement)==null||w.scrollTo(0,0)}),o5(f)}),So(()=>{window.addEventListener("hashchange",()=>{i()}),i()}),(l,c)=>(T(),R("div",{ref_key:"rootEl",ref:a,class:"CoreRoot","data-writer-container":""},[(T(!0),R(je,null,It(P(r)(),f=>(T(),R(je,{key:f.key},[f.key===`${s.value}:0`?(T(),Ue(Ss(f),{key:0})):xe("",!0)],64))),128))],512))}}),d5=Oe(u5,[["__scopeId","data-v-f647c48c"]]),Vd=e=>(Qt("data-v-2c927449"),e=e(),Xt(),e),f5={key:0,class:"noAccessTokenProvided"},p5=Vd(()=>q("h2",null,"MapBox cannot be initialised.",-1)),h5=Vd(()=>q("h3",null,"An access token hasn't been provided.",-1)),m5=[p5,h5],v5=Vd(()=>q("div",{class:"mask"},null,-1)),g5=[{lat:37.79322359164316,lng:-122.39999318828129,name:"Marker"}],y5={writer:{name:"Mapbox",description:"A component to embed a Mapbox map. It can be used to display a map with markers.",docs:"For this component you need Mapbox access token: https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",category:"Embed",fields:{accessToken:{name:"Access Token",default:"",desc:"Access token from Mapbox",type:L.Text},mapStyle:{name:"Map style",default:"mapbox://styles/mapbox/standard",type:L.Text,desc:"Map style URL"},zoom:{name:"Zoom",default:"8",type:L.Number},lat:{name:"Latitude",default:"37.79322359164316",type:L.Number,validator:xd},lng:{name:"Longitude",default:"-122.39999318828129",type:L.Number,validator:Pd},markers:{name:"Markers",init:JSON.stringify(g5,null,2),desc:"",type:L.Object,validator:Og},controls:{name:"Controls visible",default:"yes",type:L.Text,options:{yes:"Yes",no:"No"},desc:"Show map controls"},cssClasses:et},events:{"mapbox-marker-click":{desc:"Capture single clicks on markers."},"mapbox-click":{desc:"Capture single click on map."}}}},_5=Pe({...y5,__name:"CoreMapbox",setup(e){const t=Z(ee.evaluatedFields),n=oe(null),r=oe(null),a=ne(()=>[t.lng.value,t.lat.value]),o=oe(null);let s=[],i=null;const l=async()=>{if(!r.value||!t.accessToken.value)return;const f=await pn(()=>import("./mapbox-gl-BZeI_VNB.js").then(u=>u.m),[],import.meta.url);try{f.accessToken=t.accessToken.value,f.default&&(f.default.accessToken=t.accessToken.value),o.value=new f.Map({container:r.value,style:t.mapStyle.value,center:a.value,zoom:t.zoom.value}),o.value.on("click",u=>{const m=new CustomEvent("mapbox-click",{detail:{payload:{lat:u.lngLat.lat,lng:u.lngLat.lng}}});n.value.dispatchEvent(m)}),i=new f.NavigationControl,t.controls.value==="yes"&&o.value.addControl(i),t.markers.value&&o.value.on("load",c)}catch(u){Kn().error(u)}},c=async()=>{var u,m;if(!o.value)return;const f=await pn(()=>import("./mapbox-gl-BZeI_VNB.js").then(w=>w.m),[],import.meta.url);s.forEach(w=>w.remove()),s=[],(m=(u=t.markers)==null?void 0:u.value)==null||m.forEach(w=>{const b=new f.Marker().setLngLat([w.lng,w.lat]).addTo(o.value).setPopup(new f.Popup().setText(w.name));s.push(b),b.getElement().addEventListener("click",g=>{const v=new CustomEvent("mapbox-marker-click",{detail:{payload:w}});n.value.dispatchEvent(v),g.stopPropagation()})})};return Ke(t.controls,()=>{o.value&&(t.controls.value==="yes"?o.value.addControl(i):o.value.removeControl(i))}),Ke(t.markers,async()=>{o.value&&await c()}),Ke(t.mapStyle,()=>{o.value&&o.value.setStyle(t.mapStyle.value)}),Ke(a,()=>{var f,u;o.value&&((f=a.value)!=null&&f.lat)&&((u=a.value)!=null&&u.lng)&&o.value.setCenter(a.value)}),Ke(t.zoom,()=>{o.value&&t.zoom.value&&o.value.setZoom(t.zoom.value)}),Ke([r,t.accessToken],()=>{l()}),(f,u)=>(T(),R("div",{ref_key:"rootEl",ref:n,class:"CoreMapbox"},[P(t).accessToken.value?(T(),R("div",{key:1,ref_key:"mapEl",ref:r,class:"map"},null,512)):(T(),R("div",f5,m5)),v5],512))}}),b5=Oe(_5,[["__scopeId","data-v-2c927449"]]);function w5(e,t){const{type:n}=e[t],o=Hd().map(i=>({type:i,definition:Cs(i)})).filter(i=>i.definition.allowedParentTypes&&!i.definition.allowedParentTypes.includes(n));return new Set(o.map(i=>i.type))}function A5(e,t){const{type:n,parentId:r}=e[t],a=Hd().filter(l=>l!=="root"&&l!=="workflows_root"),{allowedChildrenTypes:o,toolkit:s}=Cs(n);if(!o)return new Set([]);let i=new Set(o);if(o.includes("*")&&(i=new Set([...i,...a])),i.delete("inherit")){if(!r)return i;const l=Bd(e,r);i=new Set([...i,...l])}return s&&(i=new Set(Array.from(i).filter(l=>Cs(l).toolkit==s))),i}function Bd(e,t){const n=Array.from(A5(e,t)),r=Array.from(w5(e,t));return n.filter(o=>!r.includes(o))}function by(e,t){function n(){let G="";const J=new Uint16Array(16);return window.crypto.getRandomValues(J),J.forEach(ae=>{G+=(ae%36).toString(36)}),G}function r(F){const G=e.getComponentById(F);if(!G)return;const J=G.position;if(J==0)return;const ae=e.getComponentById(G.parentId);if(!ae)return;const K=e.getComponents(ae.id,{includeBMC:!0,includeCMC:!1}).filter(k=>k.position==J-1)[0],S=`move-up-${F}`;t.openMutationTransaction(S,"Move up"),t.registerPreMutation(K),K.position++,t.registerPostMutation(K),t.registerPreMutation(G),G.position--,t.registerPostMutation(G),t.closeMutationTransaction(S),e.sendComponentUpdate()}function a(F){const G=e.getComponentById(F);if(!G)return;const J=e.getComponentById(G.parentId);if(!J)return;const ae=G.position;if(ae==-2)return;const K=e.getComponents(J.id,{includeBMC:!0,includeCMC:!1}).filter(V=>V.position!==-2);if(ae>=K.length-1)return;const S=K.filter(V=>V.position==ae+1)[0],k=`move-down-${F}`;t.openMutationTransaction(k,"Move down"),t.registerPreMutation(S),S.position--,t.registerPostMutation(S),t.registerPreMutation(G),G.position++,t.registerPostMutation(G),t.closeMutationTransaction(k),e.sendComponentUpdate()}function o(F,G,J){const ae=e.getComponentById(F);if(!ae)return;const K=e.getComponentById(ae.parentId);if(!K||F==G||K.id==G&&J===null)return;const S=`move-${F}`;t.openMutationTransaction(S,"Move"),t.registerPreMutation(ae),l(F,-1),ae.position=J??Re(G,ae.type),ae.parentId=G,l(F,1),t.registerPostMutation(ae),t.closeMutationTransaction(S),e.sendComponentUpdate()}function s(F,G,J,ae){const K=n(),S=e.getComponentDefinition(F),{fields:k}=S,V={};return Object.entries(k??{}).map(([re,ie])=>{V[re]=ie.init}),{...ae??{},id:K,type:F,parentId:G,content:V,handlers:{},position:J??Re(G,F)}}function i(F,G,J,ae){const K=s(F,G,J,ae),S=`create-${K.id}`;return t.openMutationTransaction(S,"Create"),e.addComponent(K),l(K.id,1),t.registerPostMutation(K),t.closeMutationTransaction(S),e.sendComponentUpdate(),K.id}function l(F,G){const J=e.getComponentById(F);if(e.getComponentDefinition(J.type).positionless)return;e.getComponents(J.parentId,{includeBMC:!0,includeCMC:!1}).filter(k=>k.id!==F).filter(k=>k.position>=J.position).map(k=>{t.registerPreMutation(k),k.position+=G,t.registerPostMutation(k)})}function c(F){const G=e.getComponentById(F),J=[],ae=K=>{const S=e.getComponents(K.id);J.push(K),S.map(k=>ae(k))};return ae(G),J}function f(F){return e.getComponents().filter(G=>{var J;return(J=G.outs)==null?void 0:J.find(ae=>ae.toNodeId==F)})}function u(...F){const G=F.map(ae=>e.getComponentById(ae)).filter(Boolean);if(G.length===0)return;const J=`delete-${G.map(ae=>ae.id).join(",")}`;t.openMutationTransaction(J,"Delete");for(const ae of G){e.getComponentById(ae.id).parentId&&l(ae.id,-1);const K=f(ae.id);for(const k of K)t.registerPreMutation(k),k.outs=[...k.outs.filter(V=>V.toNodeId!==ae.id)];const S=c(ae.id);for(const k of S)t.registerPreMutation(k),e.deleteComponent(k.id),t.removeSelectedComponentId(k.id)}t.closeMutationTransaction(J),e.sendComponentUpdate()}function m(F){return u(F)}function w(F){return F=="root"}function b(F){const G=e.getComponentById(F);return!w(F)&&!(G!=null&&G.isCodeManaged)}function g(F){const G=e.getComponentById(F);return!(G!=null&&G.isCodeManaged)&&e.getContainableTypes(F).length>0}function v(F){return!w(F)}function A(F){const G=e.getComponentById(F);return!w(F)&&!(G!=null&&G.isCodeManaged)}function C(F){const G=e.getComponentById(F);return!w(F)&&!(G!=null&&G.isCodeManaged)}function y(F){return!w(F)}function p(F,G){const J=e.getComponentById(F);if(!J)return;const ae=J.parentId;if(!ae)return;let K;G&&(K=G.split(",").slice(0,-1).join(",")),t.setSelection(ae,K)}function $(F){if(F.length==0)return!1;const G={};return[...e.getComponents(),...F].forEach(ae=>{G[ae.id]=ae}),F.map(ae=>Bd(G,ae.parentId).includes(ae.type)).every(ae=>ae)}function E(F){const G=e.getComponentById(F);if(!G||G.isCodeManaged)return!1;const J=t.getClipboard();if(J===null)return!1;const{jsonSubtree:ae}=J,K=JSON.parse(ae);return K.length==0?!1:(K[0].parentId=F,$(K))}function B(F){const G=V=>e.getComponents(V,{includeBMC:!0,includeCMC:!1}).filter(ie=>{var ge;return!((ge=e.getComponentDefinition(ie.type))==null?void 0:ge.positionless)}).length,J=e.getComponentById(F);if(!J||J.isCodeManaged)return{up:!1,down:!1};if(e.getComponentDefinition(J.type).positionless)return{up:!1,down:!1};const K=J.parentId?G(J.parentId):0,S=K>0&&J.position>0,k=K>0&&J.position<K-1;return{up:S,down:k}}function z(F){e.getComponentById(F)&&(t.setClipboard({operation:ro.Cut,jsonSubtree:JSON.stringify(c(F))}),t.setSelection(null),m(F),e.sendComponentUpdate())}function le(F){const G=JSON.parse(JSON.stringify(F));return G.forEach(J=>{delete J.isCodeManaged;const ae=n();G.filter(K=>K.id!==J.id).map(K=>{var S;K.parentId==J.id&&(K.parentId=ae),(S=K.outs)==null||S.forEach(k=>{k.toNodeId==J.id&&(k.toNodeId=ae)})}),J.id=ae,typeof J.x<"u"&&typeof J.y<"u"&&(J.x+=36,J.y+=36)}),G}function fe(F){if(!e.getComponentById(F))return;const J=c(F),ae=le(J);t.setClipboard({operation:ro.Copy,jsonSubtree:JSON.stringify(ae)})}function Le(F){if(!e.getComponentById(F))return;const J=t.getClipboard();if(J===null)return;const{operation:ae,jsonSubtree:K}=J,S=JSON.parse(K),k=S[0];if(typeof k.outs<"u"&&k.parentId!==F&&(k.outs=[]),ae==ro.Cut)return be(F,S);if(ae==ro.Copy)return Ce(F,S)}function be(F,G){t.setClipboard(null);const J=G[0];J.parentId=F,J.position=Re(F,J.type);const ae=`paste-cut-${F}`;t.openMutationTransaction(ae,"Paste from cut"),G.map(K=>{e.addComponent(K),t.registerPostMutation(K)}),t.closeMutationTransaction(ae),e.sendComponentUpdate()}function Ce(F,G){t.setClipboard({operation:ro.Copy,jsonSubtree:JSON.stringify(le(G))});const J=G[0];J.parentId=F,J.position=Re(F,J.type);const ae=`paste-copy-${F}`;t.openMutationTransaction(ae,"Paste from copy"),G.map(K=>{e.addComponent(K),t.registerPostMutation(K)}),t.closeMutationTransaction(ae),e.sendComponentUpdate()}function Re(F,G){if(e.getComponentDefinition(G).positionless)return-2;const ae=e.getComponents(F,{includeBMC:!0,includeCMC:!1}).filter(K=>K.position!==-2);return ae.length>0?Math.max(Math.max(...ae.map(S=>S.position))+1,0):0}function Je(){var G,J;const F=t.getMutationTransactionsSnapshot();return{isUndoAvailable:!!F.undo,isRedoAvailable:!!F.redo,undoDesc:(G=F.undo)==null?void 0:G.desc,redoDesc:(J=F.redo)==null?void 0:J.desc}}function se(){const F=t.consumeUndoTransaction();F&&(Object.entries(F.mutations).forEach(([G,J])=>{if(J.jsonPre&&J.jsonPost){e.addComponent(JSON.parse(J.jsonPre));return}if(!J.jsonPre&&J.jsonPost){e.deleteComponent(G);return}if(J.jsonPre&&!J.jsonPost){e.addComponent(JSON.parse(J.jsonPre));return}}),e.sendComponentUpdate())}function ce(){const F=t.consumeRedoTransaction();F&&(Object.entries(F.mutations).forEach(([G,J])=>{if(J.jsonPre&&J.jsonPost){e.addComponent(JSON.parse(J.jsonPost));return}if(!J.jsonPre&&J.jsonPost){e.addComponent(JSON.parse(J.jsonPost));return}if(J.jsonPre&&!J.jsonPost){e.deleteComponent(G);return}}),e.sendComponentUpdate())}function he(F,G,J){const ae=e.getComponentById(F);if(!ae)return;const K=`edit-${F}-content-${G}`;t.openMutationTransaction(K,"Edit property",!0),t.registerPreMutation(ae),ae.content[G]=J,t.registerPostMutation(ae),t.closeMutationTransaction(K),e.sendComponentUpdate()}function ke(F,G){const J=e.getComponentById(F);if(!J)return;const ae=`add-${F}-out-${G.outId}-${G.toNodeId}`;t.openMutationTransaction(ae,"Add out",!0),t.registerPreMutation(J),J.outs=[...J.outs??[],G],t.registerPostMutation(J),t.closeMutationTransaction(ae),e.sendComponentUpdate()}function ye(F,G){const J=e.getComponentById(F);if(!J)return;const ae=`edit-${F}-out-${G.outId}-${G.toNodeId}`;t.openMutationTransaction(ae,"Edit out",!0),t.registerPreMutation(J),J.outs=J.outs.filter(K=>!(G.outId===K.outId&&G.toNodeId===K.toNodeId)),t.registerPostMutation(J),t.closeMutationTransaction(ae),e.sendComponentUpdate()}function j(F,G,J){const ae=e.getComponentById(F);if(!ae)return;const K=`change-${F}-coordinates`;t.openMutationTransaction(K,"Change coordinates",!1),t.registerPreMutation(ae),ae.x=Math.floor(G),ae.y=Math.floor(J),t.registerPostMutation(ae),t.closeMutationTransaction(K),e.sendComponentUpdate()}function ue(F){const G="change-multiple-coordinates";t.openMutationTransaction(G,"Change coordinates",!1);const J=Object.entries(F);J.length!=0&&(J.forEach(([ae,{x:K,y:S}])=>{const k=e.getComponentById(ae);k&&(t.registerPreMutation(k),k.x=Math.floor(K),k.y=Math.floor(S),t.registerPostMutation(k))}),t.closeMutationTransaction(G),e.sendComponentUpdate())}function O(F,G,J="",ae=!1){const K=e.getComponentById(F);if(!K)return;const S=`change-visibility-${F}`;t.openMutationTransaction(S,"Change visibility",!0),t.registerPreMutation(K),K.visible==null&&(K.visible={expression:!0,binding:"",reversed:!1}),typeof G=="boolean"?K.visible.expression=G:G=="custom"&&(K.visible={expression:"custom",binding:J,reversed:ae}),t.registerPostMutation(K),t.closeMutationTransaction(S),e.sendComponentUpdate()}function I(F,G,J){const ae=e.getComponentById(F);if(!ae)return;let K;if(J)K=J;else{const k=e.getComponentDefinition(ae.type),Y=Object.entries(k.events).filter(([re,ie])=>ie.bindable).map(([re,ie])=>re);K=Y==null?void 0:Y[0]}if(!K)return;const S=`change-binding-${F}`;t.openMutationTransaction(S,"Change binding",!0),t.registerPreMutation(ae),G?ae.binding={eventType:K,stateRef:G}:delete ae.binding,t.registerPostMutation(ae),t.closeMutationTransaction(S),e.sendComponentUpdate()}function M(F,G,J){const ae=e.getComponentById(F);if(!ae)return;const K=`set-handler-${F}`;t.openMutationTransaction(K,"Set event handler",!0),t.registerPreMutation(ae),J?(ae.handlers||(ae.handlers={}),ae.handlers[G]=J):(delete ae.handlers[G],Object.keys(ae.handlers).length==0&&delete ae.handlers),t.registerPostMutation(ae),t.closeMutationTransaction(K),e.sendComponentUpdate()}function Q(F){const G=e.getComponentById(F);return!G||G.type=="root"?null:G.type=="page"||G.type=="workflows_workflow"?F:Q(G.parentId)}async function Me(F){var ae;const G=e.getComponentById(F);(ae=e.getComponentDefinition(G.type))!=null&&ae.name&&e.setActivePageId(Q(F))}return{moveComponent:o,moveComponentUp:r,moveComponentDown:a,cutComponent:z,copyComponent:fe,pasteComponent:Le,createAndInsertComponent:i,removeComponentSubtree:m,removeComponentsSubtree:u,isPasteAllowed:E,undo:se,redo:ce,setContentValue:he,addOut:ke,removeOut:ye,changeCoordinates:j,changeCoordinatesMultiple:ue,setVisibleValue:O,setBinding:I,getUndoRedoSnapshot:Je,setHandlerValue:M,isAddAllowed:g,isCopyAllowed:v,isCutAllowed:A,isDeleteAllowed:C,isGoToParentAllowed:y,isDraggingAllowed:b,getEnabledMoves:B,goToParent:p,goToComponentParentPage:Me}}const C5=30,$5=/^application\/json;writer=(?<componentType>\w+),(?<componentId>[\w\-]*)$/,qo=oe(null),$r=oe(null),Ai=oe(!1);let xc=null,Ci=null;function I5(e){function t(v){var y;const A=v.dataTransfer.types[0],C=(y=A==null?void 0:A.match($5))==null?void 0:y.groups;if(C)return{draggedType:C.componentType,draggedId:C.componentId}}function n(v){const y=(v.closest("[data-writer-cage]")??v).closest("[data-writer-id]");if(y)return y.dataset.writerId}function r(v){const A=t(v);if(!A)return;const{draggedType:C,draggedId:y}=A,p=n(v.target);if(!o(p,y,C))return;const E={draggedType:C,draggedId:y,parentId:qo.value,position:Ci};return g(v),E}function a(v,A,C){const y=e.getComponentById(v);if(!y)return!1;const p=e.getContainableTypes(v);return!(y!=null&&y.isCodeManaged)&&!e.isChildOf(A,v)&&p.includes(C)}function o(v,A,C){const y=e.getComponentById(v);if(y)return a(v,A,C)?v:y.parentId?o(y.parentId,A,C):null}function s(v){if(Ai.value){l(v);return}i(v)}function i(v){const A=t(v);if(!A)return;const{draggedType:C,draggedId:y}=A,p=v.target,$=n(p),E=o($,y,C);if(!E||E==y)return;const z=p.closest(`[data-writer-id="${E}"]`).dataset.writerInstancePath;if(v.preventDefault(),$r.value!==z)xc=Date.now();else if(Date.now()-xc>=OC){Ai.value=!0,m($r.value);return}qo.value=E,$r.value=z}function l(v){const A=t(v);if(!A)return;v.preventDefault();const C=document.querySelector(`[data-writer-instance-path="${$r.value}"]`);if(u(v.clientX,v.clientY,C)>C5){g(v);return}const y=c($r.value);if(y.length==0)return;const p=f(v.clientX,v.clientY,y);if(!p)return;const{el:$}=p,{draggedId:E}=A,B=parseInt($.dataset.writerPosition),z=e.getComponentById(E);if(y.map(le=>{le.classList.contains("highlighted")&&le.classList.remove("highlighted")}),!$.classList.contains("highlighted")){if($.classList.add("highlighted"),z&&z.parentId==qo.value&&B>z.position){Ci=B-1;return}Ci=B}}function c(v){const A=b(v);return Array.from(A.querySelectorAll("[data-writer-position]"))}function f(v,A,C){const y=C.map(p=>({el:p,distance:u(v,A,p)})).sort((p,$)=>p.distance>$.distance?1:-1);return y==null?void 0:y[0]}function u(v,A,C){const{top:y,left:p,right:$,bottom:E}=C.getBoundingClientRect(),B=Math.max(p-v,0,v-$),z=Math.max(y-A,0,A-E);return Math.sqrt(B*B+z*z)}function m(v){b(v).classList.add("crackedContainer")}function w(v){b(v).classList.remove("crackedContainer")}function b(v){const A=document.querySelector(`[data-writer-instance-path="${v}"]`);if(A.hasAttribute("data-writer-container"))return A;const C=A.querySelectorAll("[data-writer-container]");for(let y=0;y<C.length;y++){const p=C[y];if(p.closest("[data-writer-instance-path]")==A)return p}}function g(v){v.preventDefault(),$r.value&&(w($r.value),$r.value=null),qo.value=null,xc=null,Ci=null,Ai.value=!1}return{candidateId:qo,candidateInstancePath:$r,isParentSuitable:a,isCandidacyConfirmed:Ai,getComponentInfoFromDrag:t,dropComponent:r,assignInsertionCandidacy:s,removeInsertionCandidacy:g}}const S5=["d"],E5=["d"],k5=["cx","cy"],T5=["x1","y1","x2","y2","stroke"],x5=["x1","y1","x2","y2","stroke"],Jo=30,P5=Pe({__name:"WorkflowArrow",props:{arrow:{},isSelected:{type:Boolean},isEngaged:{type:Boolean}},emits:["delete"],setup(e,{emit:t}){const n=t,r=e,a=ne(()=>{const i=r.arrow.x2-r.arrow.x1,l=r.arrow.y2-r.arrow.y1;return[{x:r.arrow.x1,y:r.arrow.y1},{x:r.arrow.x1+Jo,y:r.arrow.y1},{x:r.arrow.x1+Jo,y:r.arrow.y1+l*.25},{x:r.arrow.x1+i*.5,y:r.arrow.y1+l*.5},{x:r.arrow.x2-Jo,y:r.arrow.y1+l*.75},{x:r.arrow.x2-Jo,y:r.arrow.y2},{x:r.arrow.x2,y:r.arrow.y2}]}),o=ne(()=>{const i=r.arrow.x2-r.arrow.x1,l=a.value;let c;return i>Jo?(c=`M ${l[0].x} ${l[0].y}`,c+=`C ${l[3].x} ${l[0].y}, ${l[3].x} ${l[6].y}, ${l[6].x} ${l[6].y}`):(c=`M ${l[0].x} ${l[0].y}`,c+=`C ${l[1].x} ${l[1].y}, ${l[2].x} ${l[2].y}, ${l[3].x} ${l[3].y}`,c+=`C ${l[4].x} ${l[4].y}, ${l[5].x} ${l[5].y}, ${l[6].x} ${l[6].y}`),c});function s(){n("delete")}return(i,l)=>(T(),R("g",{class:ut(["WorkflowArrow",{engaged:i.isEngaged}]),tabindex:"0","data-writer-unselectable":"true"},[q("path",{d:o.value,style:vt({stroke:i.arrow.color})},null,12,S5),q("path",{d:o.value,style:vt({stroke:i.arrow.color,strokeWidth:12,opacity:i.isSelected?"0.2":"0"})},null,12,E5),i.isSelected?(T(),R("g",{key:0,class:"delete",tabindex:"0","aria-label":"Delete relation",onClick:s,onKeydown:aa(s,["enter"])},[q("circle",{cx:a.value[3].x,cy:a.value[3].y,r:"12"},null,8,k5),q("line",{class:"cross",x1:a.value[3].x-4,y1:a.value[3].y-4,x2:a.value[3].x+4,y2:a.value[3].y+4,stroke:i.arrow.color,"stroke-width":"2"},null,8,T5),q("line",{class:"cross",x1:a.value[3].x+4,y1:a.value[3].y-4,x2:a.value[3].x-4,y2:a.value[3].y+4,stroke:i.arrow.color,"stroke-width":"2"},null,8,x5)],32)):xe("",!0)],2))}}),jh=Oe(P5,[["__scopeId","data-v-c436de5e"]]),M5=Pe({__name:"WorkflowMiniMap",props:{nodeContainerEl:{},renderOffset:{},zoomLevel:{}},emits:["changeRenderOffset"],setup(e,{emit:t}){Ha(C=>({"6f38a66f":`${l.value.width}px`,"2db8a334":`${l.value.height}px`,b48ba07a:c.value.isDisplayed?"":"none"}));const n=Z(ee.builderManager),r=oe(null),a=t,o=new ResizeObserver(w),s=new MutationObserver(w),i=oe(.2),l=oe({width:166,height:100}),c=oe({width:260,height:1,top:0,left:0,isDisplayed:!1}),f=oe({width:1,height:1,top:0,left:0}),u=e,m=oe([]);function w(){if(!u.nodeContainerEl)return;const C=Array.from(u.nodeContainerEl.querySelectorAll("[data-writer-id]")),y=u.nodeContainerEl.getBoundingClientRect();let p=0,$=0;m.value=C.map(E=>{const B=E.getBoundingClientRect();return p=Math.max(p,B.right+u.renderOffset.x*u.zoomLevel-y.left),$=Math.max($,B.bottom+u.renderOffset.y*u.zoomLevel-y.top),{id:E.dataset.writerId,width:B.width,height:B.height,top:B.top+u.renderOffset.y*u.zoomLevel-y.top,left:B.left+u.renderOffset.x*u.zoomLevel-y.left}}),l.value={width:260,height:y.height/y.width*y.width/7},i.value=Math.min(l.value.width/(y.width+300),l.value.height/(y.height+300),l.value.width/(p+300),l.value.height/($+300),l.value.width/(u.renderOffset.x*u.zoomLevel+y.width),l.value.height/(u.renderOffset.y*u.zoomLevel+y.height)),f.value={top:u.renderOffset.y*u.zoomLevel,left:u.renderOffset.x*u.zoomLevel,width:y.width,height:y.height},c.value={...f.value,isDisplayed:c.value.isDisplayed}}function b(C){const y=u.nodeContainerEl.getBoundingClientRect(),p=r.value.getBoundingClientRect();c.value={...c.value,top:Math.min(Math.max(0,(C.pageY-p.top)*(1/i.value)-y.height/2),p.height*(1/i.value)-y.height),left:Math.min(Math.max(0,(C.pageX-p.left)*(1/i.value)-y.width/2),p.width*(1/i.value)-y.width)}}function g(){c.value.isDisplayed=!0}function v(){c.value.isDisplayed=!1}function A(C){C.stopPropagation(),n.setSelection(null),a("changeRenderOffset",{x:c.value.left*(1/u.zoomLevel),y:c.value.top*(1/u.zoomLevel)})}return Zt(async()=>{o.observe(u.nodeContainerEl),s.observe(u.nodeContainerEl,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["style"]}),await Mn(),w()}),cr(()=>{o.disconnect(),s.disconnect()}),(C,y)=>(T(),R("div",{ref_key:"rootEl",ref:r,class:"WorkflowMiniMap",onMouseenter:g,onMouseleave:v,onMousemove:b,onClick:A},[q("div",{class:"selectedArea",style:vt({top:`${f.value.top*i.value}px`,left:`${f.value.left*i.value}px`,width:`${f.value.width*i.value}px`,height:`${f.value.height*i.value}px`})},null,4),q("div",{class:"selector",style:vt({top:`${c.value.top*i.value}px`,left:`${c.value.left*i.value}px`,width:`${c.value.width*i.value}px`,height:`${c.value.height*i.value}px`})},null,4),(T(!0),R(je,null,It(m.value,p=>(T(),R("div",{key:p.id,class:ut(["node",{selected:P(n).isComponentIdSelected(p.id)}]),style:vt({top:`${p.top*i.value}px`,left:`${p.left*i.value}px`,width:`${p.width*i.value}px`,height:`${p.height*i.value}px`})},null,6))),128))],544))}}),N5=Oe(M5,[["__scopeId","data-v-097700d3"]]);function O5(){var t;return((t=navigator==null?void 0:navigator.userAgentData)==null?void 0:t.platform)||(navigator==null?void 0:navigator.platform)}function Vh(){return Ay()?"⌘ ":"Ctrl+"}function wy(e){return Ay()?e.metaKey:e.ctrlKey}function Ay(){return O5().toLowerCase().indexOf("mac")!=-1}const Rs=e=>(Qt("data-v-a8f8cd44"),e=e(),Xt(),e),R5={class:"bar"},L5={class:"autoArranger"},D5=Rs(()=>q("i",{class:"material-symbols-outlined"},"apps",-1)),F5={class:"zoomer"},j5=Rs(()=>q("i",{class:"material-symbols-outlined"},"remove",-1)),V5=Rs(()=>q("i",{class:"material-symbols-outlined"},"add",-1)),B5=Rs(()=>q("i",{class:"material-symbols-outlined"},"undo",-1)),U5={class:"miniMapCollapser"},H5=Rs(()=>q("i",{class:"material-symbols-outlined"},"close_fullscreen",-1)),Bh=.01,$i=.2,z5=Pe({__name:"WorkflowNavigator",props:{nodeContainerEl:{},renderOffset:{},zoomLevel:{}},emits:["changeRenderOffset","changeZoomLevel","resetZoom","autoArrange"],setup(e,{emit:t}){const n=e,{zoomLevel:r}=$u(n),a=oe(null),o=t,s=oe(!0),i=oe(l(r.value));function l(C){return`${Math.floor(C*100)}%`}function c(){s.value=!s.value}function f(C){o("autoArrange")}function u(C){o("changeRenderOffset",C)}function m(){const C=r.value+$i;o("changeZoomLevel",C)}function w(){const C=r.value-$i;o("changeZoomLevel",C)}function b(C){const y=C.key;let p=r.value;if(y=="ArrowUp")p+=Bh;else if(y=="ArrowDown")p-=Bh;else return;o("changeZoomLevel",p)}function g(C){var $;const y=($=C.target)==null?void 0:$.value;let p=parseInt(y)/100;isNaN(p)&&(p=1),i.value=l(p),o("changeZoomLevel",p)}function v(){o("resetZoom")}Ke(r,C=>{i.value=l(C)});function A(C){if(wy(C)===!1)return;let y=r.value;if(C.key=="+"||C.key=="=")C.preventDefault(),y+=$i;else if(C.key=="-")C.preventDefault(),y-=$i;else return;o("changeZoomLevel",y)}return Zt(()=>{document.addEventListener("keydown",A)}),cr(()=>{document.removeEventListener("keydown",A)}),(C,y)=>(T(),R("div",{ref_key:"rootEl",ref:a,"data-writer-unselectable":"true",class:"WorkflowNavigator",onKeydown:A},[C.nodeContainerEl&&s.value?(T(),Ue(N5,{key:0,"node-container-el":C.nodeContainerEl,"render-offset":C.renderOffset,"zoom-level":P(r),class:"miniMap",onChangeRenderOffset:u},null,8,["node-container-el","render-offset","zoom-level"])):xe("",!0),q("div",R5,[q("div",L5,[Ye(or,{variant:"neutral",size:"smallIcon","data-writer-tooltip":"Auto arrange blocks","data-writer-tooltip-placement":"left",onClick:f},{default:Ze(()=>[D5]),_:1})]),q("div",F5,[Ye(or,{variant:"neutral",size:"smallIcon","data-writer-tooltip":P(r)>P(Aa).minLevel?`Zoom out (${P(Vh)()}-)`:"Can't zoom further","data-writer-tooltip-placement":"left",onClick:w},{default:Ze(()=>[j5]),_:1},8,["data-writer-tooltip"]),Ye(Fg,{modelValue:i.value,"onUpdate:modelValue":y[0]||(y[0]=p=>i.value=p),class:"zoomLevelInput",onKeydown:b,onChange:g},null,8,["modelValue"]),Ye(or,{variant:"neutral",size:"smallIcon","data-writer-tooltip":P(r)<P(Aa).maxLevel?`Zoom in (${P(Vh)()}+)`:"Can't zoom further","data-writer-tooltip-placement":"right",onClick:m},{default:Ze(()=>[V5]),_:1},8,["data-writer-tooltip"]),Ye(or,{variant:"neutral",size:"smallIcon","data-writer-tooltip":"Reset zoom","data-writer-tooltip-placement":"right",onClick:v},{default:Ze(()=>[B5]),_:1})]),q("div",U5,[Ye(or,{variant:"neutral",size:"smallIcon","data-writer-tooltip":s.value?"Close minimap":"Open minimap","data-writer-tooltip-placement":"right",onClick:c},{default:Ze(()=>[H5]),_:1},8,["data-writer-tooltip"])])])],544))}}),K5=Oe(z5,[["__scopeId","data-v-a8f8cd44"]]),W5=e=>(Qt("data-v-63b9dfe1"),e=e(),Xt(),e),G5=["data-writer-unselectable"],q5={class:"workflowsToolbar"},J5=W5(()=>q("i",{class:"material-symbols-outlined"},"play_arrow",-1)),Y5="A container component representing a single workflow within the application.",Q5={writer:{name:"Workflow",toolkit:"workflows",category:"Root",description:Y5,allowedChildrenTypes:["*"],allowedParentTypes:["workflows_root"],fields:{key:{name:"Workflow key",desc:"Unique identifier. It's needed to enable navigation to this Workflow.",type:L.IdKey}}}},Aa={minLevel:.2,maxLevel:1,step:.25,initialLevel:1},X5=Pe({...Q5,__name:"WorkflowsWorkflow",setup(e){Ha(H=>({21064679:u.value}));const t=Z(ee.renderProxiedComponent),n=Z(ee.componentId),r=oe(null),a=oe(null),o=Z(ee.core),s=Z(ee.builderManager),i=oe([]),l=go({x:0,y:0}),c=oe(!1),f=oe(null),u=oe(Aa.initialLevel),m=new MutationObserver(le),w=go({}),b=96,g=128,v=ne(()=>o.getComponents(n,{sortedByPosition:!0})),{createAndInsertComponent:A,addOut:C,removeOut:y,changeCoordinatesMultiple:p}=by(o,s),{getComponentInfoFromDrag:$}=I5(o),E=oe(null),B=oe(null),z=oe(null);function le(){const H=[];v.value.filter(pe=>{var de;return((de=pe.outs)==null?void 0:de.length)>0}).forEach(pe=>{const de=pe.id;pe.outs.forEach(me=>{const Ee=O(de,me.outId,void 0,me.toNodeId);Ee&&H.push(Ee)})}),i.value=H}const fe=ne(()=>{var H,pe;return E.value===null&&!((H=B.value)!=null&&H.isPerfected)&&!((pe=z.value)!=null&&pe.isPerfected)?null:!0});function Le(){f.value=null}function be(){const H=new Map;function pe(me,Ee){var We;H.forEach(nt=>{nt.has(me)&&nt.delete(me)}),H.has(Ee)||H.set(Ee,new Set),H.get(Ee).add(me),(We=me.outs)==null||We.forEach(nt=>{const ot=o.getComponentById(nt.toNodeId);pe(ot,Ee+1)})}const de=new Map;return v.value.forEach(me=>{var Ee;(Ee=me.outs)==null||Ee.forEach(De=>{de.has(De.toNodeId)||de.set(De.toNodeId,new Set),de.get(De.toNodeId).add(me.id)})}),v.value.filter(me=>!de.has(me.id)).forEach(me=>{pe(me,0)}),H}function Ce(H){const pe=new Map,de=new Map;return H.forEach((me,Ee)=>{let De=0,We=0;me.forEach(nt=>{const ot=a.value.querySelector(`[data-writer-id="${nt.id}"]`);if(!ot)return;const _t=ot.getBoundingClientRect();de.set(nt.id,{height:_t.height*(1/u.value)}),De+=_t.height*(1/u.value)+b,We=Math.max(We,_t.width*(1/u.value))}),pe.set(Ee,{height:De-b,width:We})}),{columnDimensions:pe,nodeDimensions:de}}function Re(){const H=be(),{columnDimensions:pe,nodeDimensions:de}=Ce(H),me=Math.max(...Array.from(pe.values()).map(We=>We.height)),Ee={};let De=g;for(let We=0;We<H.size;We++){const nt=Array.from(H.get(We)).sort((gt,sn)=>gt.y>sn.y?1:-1),{width:ot,height:_t}=pe.get(We);let jt=(me-_t)/2+b;nt.forEach(gt=>{Ee[gt.id]={x:De,y:jt},jt+=de.get(gt.id).height+b}),De+=ot+g}p(Ee)}async function Je(){c.value||(c.value=!0,await o.forwardEvent(new CustomEvent("wf-builtin-run",{detail:{callback:()=>{c.value=!1},handler:`$runWorkflowById_${n}`}}),null,!1))}function se(H,pe){Q();const me=document.querySelector(`[data-writer-id="${pe}"]`).getBoundingClientRect(),Ee=(H.pageX-me.x)*(1/u.value),De=(H.pageY-me.y)*(1/u.value);B.value={nodeId:pe,offset:{x:Ee,y:De},isPerfected:!1}}function ce(H,pe){E.value={fromNodeId:H,fromOutId:pe}}function he(H){H.preventDefault(),H.stopPropagation()}function ke(H){const pe=r.value.getBoundingClientRect(),de=l.value.x+(H.pageX-pe.x)*(1/u.value),me=l.value.y+(H.pageY-pe.y)*(1/u.value);return{x:de,y:me}}function ye(H){H.preventDefault(),H.stopPropagation();const pe=$(H);if(!pe)return;const{draggedType:de,draggedId:me}=pe;if(me)return;const{x:Ee,y:De}=ke(H);Ee<0||De<0||S(de,Ee,De)}function j(H,pe){if(f.value==pe){f.value=null;return}H.stopPropagation(),f.value=pe,s.setSelection(null)}async function ue(H){if(!H.toNodeId)return;const pe={outId:H.fromOutId,toNodeId:H.toNodeId};y(H.fromNodeId,pe)}function O(H,pe,de,me){var gt;let Ee,De,We,nt;const ot=(gt=r.value)==null?void 0:gt.getBoundingClientRect();if(!ot)return;We=((de==null?void 0:de.x)-ot.x)*(1/u.value),nt=((de==null?void 0:de.y)-ot.y)*(1/u.value);const _t=document.querySelector(`[data-writer-id="${H}"] [data-writer-socket-id="${pe}"]`);if(!_t)return;const jt=_t.getBoundingClientRect();if(Ee=(jt.x-ot.x+jt.width/2)*(1/u.value),De=(jt.y-ot.y+jt.height/2)*(1/u.value),!!_t){if(typeof me<"u"){const Rt=document.querySelector(`[data-writer-id="${me}"]`).getBoundingClientRect();We=(Rt.x-ot.x)*(1/u.value),nt=(Rt.y-ot.y+Rt.height/2)*(1/u.value)}return{x1:Ee,y1:De,x2:We,y2:nt,color:getComputedStyle(_t).backgroundColor,fromNodeId:H,fromOutId:pe,toNodeId:me}}}function I(H){const de=H.target.closest(".WorkflowsWorkflow [data-writer-id]");return de==null?void 0:de.dataset.writerId}function M(H){let pe,de;de=I(H),typeof de>"u"&&(pe={x:H.pageX,y:H.pageY});const{fromNodeId:me,fromOutId:Ee}=E.value;de!=me&&(E.value.liveArrow=O(me,Ee,pe,de))}function Q(){z.value=null,E.value=null,B.value=null}function Me(){p(w.value),w.value={}}function F(H){const{nodeId:pe,offset:de}=B.value;B.value.isPerfected=!0;const{x:me,y:Ee}=ke(H),De=Math.floor(me-de.x),We=Math.floor(Ee-de.y),nt=o.getComponentById(pe),ot=De-nt.x,_t=We-nt.y,jt=s.selection.value.map(gt=>o.getComponentById(gt.componentId)).filter(gt=>gt.id!==pe&&gt.x!==void 0&&gt.y!==void 0).reduce((gt,sn)=>(gt[sn.id]={x:sn.x+ot,y:sn.y+_t},gt),{});w.value={...w.value,...jt,[pe]:{x:De,y:We}}}function G(H){const pe=r.value.getBoundingClientRect(),de=H.pageX-pe.x,me=H.pageY-pe.y,{x:Ee,y:De}=z.value.offset;z.value.isPerfected=!0,z.value.offset={x:de,y:me},ie(l.value.x+(Ee-de)*1*(1/u.value),l.value.y+(De-me)*1*(1/u.value))}function J(H){if(H.buttons==1){if(E.value){M(H);return}if(B.value){F(H);return}if(z.value){G(H);return}}}function ae(H){if(Q(),H.buttons!=1)return;const pe=r.value.getBoundingClientRect(),de=H.pageX-pe.x,me=H.pageY-pe.y;z.value={offset:{x:de,y:me},isPerfected:!1}}async function K(H){if(B.value&&Me(),E.value===null)return;const pe=I(H);if(!pe){E.value=null;return}const{fromNodeId:de,fromOutId:me}=E.value;if(de==pe){E.value=null;return}C(E.value.fromNodeId,{toNodeId:pe,outId:me})}function S(H,pe,de){A(H,n,void 0,{x:Math.floor(pe),y:Math.floor(de)})}function k(H){var We;const pe=r.value.querySelector(`[data-writer-id="${H}"]`),de=(We=r.value)==null?void 0:We.getBoundingClientRect();if(!pe||!de)return;const{width:me,height:Ee}=pe.getBoundingClientRect(),De=o.getComponentById(H);De&&ie(De.x-de.width/2+me/2,De.y-de.height/2+Ee/2)}async function V(H){await ie(H.x,H.y)}function Y(H){u.value=Math.max(Math.min(Aa.maxLevel,H),Aa.minLevel)}function re(H){Y(H)}function ie(H,pe){l.value={x:Math.max(0,H),y:Math.max(0,pe)}}function $e(H){ie(l.value.x+H.deltaX*(1/u.value),l.value.y+H.deltaY*(1/u.value))}function ge(H){const pe=.006666666666666667,de=r.value.getBoundingClientRect(),me=u.value;u.value=Math.min(Math.max(u.value-H.deltaY*pe,Aa.minLevel),Aa.maxLevel);const Ee={w:de.width*(1/me)*(1/u.value)*(u.value-me),h:de.height*(1/me)*(1/u.value)*(u.value-me)},De={x:(H.pageX-de.x)/de.width,y:(H.pageY-de.y)/de.height};ie(l.value.x+Ee.w*De.x,l.value.y+Ee.h*De.y)}async function Ae(H){if(H.preventDefault(),!H.ctrlKey&&!wy(H)){$e(H);return}ge(H)}async function _e(){const{width:pe,height:de,x:me,y:Ee}=r.value.getBoundingClientRect(),De=a.value.querySelectorAll("[data-writer-id]"),{maxX:We,maxY:nt}=Array.from(De).reduce((_t,jt)=>{const gt=jt.getBoundingClientRect();return{maxY:Math.max(_t.maxY,(gt.bottom-Ee)*(1/u.value)+l.value.y),maxX:Math.max(_t.maxX,(gt.right-me)*(1/u.value)+l.value.x)}},{maxY:0,maxX:0}),ot=Math.min((pe-48)/We,(de-48)/nt);Y(ot),ie(0,0)}return Ke(s.firstSelectedItem,H=>{H&&(f.value=null,o.isChildOf(n,H.componentId)&&H.source!=="click"&&k(H.componentId))}),Zt(async()=>{var H;await _e(),await Mn(),le(),(H=r.value)==null||H.addEventListener("wheel",Ae),m.observe(a.value,{attributes:!0,attributeFilter:["style"],childList:!0,subtree:!0,characterData:!0})}),cr(()=>{var H;(H=r.value)==null||H.removeEventListener("wheel",Ae),m.disconnect()}),(H,pe)=>{var de;return T(),R("div",{ref_key:"rootEl",ref:r,class:"WorkflowsWorkflow","data-writer-unselectable":fe.value,onClick:Le,onDragover:he,onDrop:ye,onMousemove:J,onMousedown:ae,onMouseup:K},[q("div",{ref_key:"nodeContainerEl",ref:a,class:"nodeContainer"},[(T(),R("svg",null,[(T(!0),R(je,null,It(i.value,(me,Ee)=>(T(),Ue(jh,{key:Ee,arrow:me,"is-selected":f.value==Ee,"is-engaged":f.value==Ee||P(s).isComponentIdSelected(me.fromNodeId)||P(s).isComponentIdSelected(me.toNodeId),onClick:De=>j(De,Ee),onDelete:De=>ue(me)},null,8,["arrow","is-selected","is-engaged","onClick","onDelete"]))),128)),(de=E.value)!=null&&de.liveArrow?(T(),Ue(jh,{key:"liveArrow",arrow:E.value.liveArrow,"is-selected":!1,"is-engaged":!0},null,8,["arrow"])):xe("",!0)])),(T(!0),R(je,null,It(v.value,me=>{var Ee,De,We,nt,ot,_t,jt,gt;return T(),Ue(Ss(P(t)(me.id,0)),{key:me.id,style:vt({top:`${(((De=(Ee=w.value)==null?void 0:Ee[me.id])==null?void 0:De.y)??me.y)-l.value.y}px`,left:`${(((nt=(We=w.value)==null?void 0:We[me.id])==null?void 0:nt.x)??me.x)-l.value.x}px`,"border-color":((_t=(ot=E.value)==null?void 0:ot.liveArrow)==null?void 0:_t.toNodeId)==me.id?(gt=(jt=E.value)==null?void 0:jt.liveArrow)==null?void 0:gt.color:void 0}),onMousedown:Ao(sn=>se(sn,me.id),["stop"]),onOutMousedown:sn=>ce(me.id,sn)},null,40,["style","onMousedown","onOutMousedown"])}),128))],512),q("div",q5,[Ye(or,{variant:"secondary",size:"small","data-writer-unselectable":!0,"data-automation-action":"run-workflow",onClick:Je},{default:Ze(()=>[J5,xt(" "+Te(c.value?"Running...":"Run workflow"),1)]),_:1})]),a.value?(T(),Ue(K5,{key:0,"node-container-el":a.value,"render-offset":l.value,"zoom-level":u.value,class:"navigator",onAutoArrange:Re,onChangeRenderOffset:V,onChangeZoomLevel:re,onResetZoom:_e},null,8,["node-container-el","render-offset","zoom-level"])):xe("",!0)],40,G5)}}}),Z5=Oe(X5,[["__scopeId","data-v-63b9dfe1"]]),e3={class:"alias"},t3=["contenteditable"],n3=Pe({__name:"WorkflowsNodeNamer",props:{componentId:{},blockName:{}},setup(e){const t=e,n=Z(ee.core),r=Z(ee.builderManager),{setContentValue:a}=by(n,r),o=ne(()=>{var m;return(m=n.getComponentById(t.componentId))==null?void 0:m.content.alias}),s=ne(()=>!!o.value),i=oe(null),l=oe(!1);async function c(){if(l.value)return;l.value=!0,await Mn();const m=i.value;m.focus();const w=document.createRange(),b=window.getSelection();w.setStart(m,m.childNodes.length),w.collapse(!0),b.removeAllRanges(),b.addRange(w)}function f(){const m=i.value.textContent;i.value.blur(),l.value=!1,a(t.componentId,"alias",m)}function u(m){l.value&&m.stopPropagation()}return(m,w)=>(T(),R("div",{class:ut(["WorkflowsNodeNamer",{beingEdited:l.value,hasEyebrow:s.value||l.value}]),"data-writer-unselectable":"true"},[q("div",{class:"blockName",onClick:c},Te(m.blockName),1),q("div",e3,[s.value||l.value?(T(),R("div",{key:0,ref_key:"aliasEditorEl",ref:i,class:"aliasEditor",contenteditable:l.value,"data-writer-unselectable":"true",onClick:c,onMousemove:u,onBlur:f,onKeydown:aa(f,["enter"])},Te(o.value),41,t3)):xe("",!0)])],2))}}),r3=Oe(n3,[["__scopeId","data-v-c890df70"]]),Pc=new Map;function a3(){function e(n){const r=Pc.get(n);if(r!==void 0)return r;const a=fetch(n,{method:"HEAD"}).then(o=>{if(o.ok)return o.headers.get("Content-Type")||void 0}).catch(()=>{});return Pc.set(n,a),a}function t(){Pc.clear()}return{fetchAssetContentType:e,clearCache:t}}const o3=["src"],s3=Pe({__name:"SharedImgWithFallback",props:{urls:{type:Array,required:!0}},setup(e){const t=e,n=oe(""),{fetchAssetContentType:r}=a3();return Ke(ea(t,"urls"),async a=>{n.value="";for(const o of a){const s=await r(o);if(!(!s||s==="text/html"))return n.value=o}},{immediate:!0}),(a,o)=>(T(),R("img",{src:n.value},null,8,o3))}});function i3(e,t=window.location.toString()){return new URL(`.${e}`,t).toString()}const l3={class:"WorkflowsNode"},c3={class:"title"},u3=["data-writer-socket-id","onMousedownCapture"],d3={key:0},f3={class:"outputs"},p3=["data-writer-socket-id","onMousedownCapture"],h3={writer:{name:"Node",description:"A Workflows node.",toolkit:"workflows",category:"Other",fields:{alias:{name:"Alias",type:L.Text}},allowedParentTypes:["workflows_workflow"],previewField:"alias"}},m3=Pe({...h3,__name:"WorkflowsNode",emits:["outMousedown","engaged"],setup(e,{emit:t}){const n=t,r=Z(ee.core),a=Z(ee.builderManager),o=Z(ee.componentId),s=Z(ee.evaluatedFields),i=ne(()=>r.getComponentById(o)),l=ne(()=>{var g;return r==null?void 0:r.getComponentDefinition((g=i.value)==null?void 0:g.type)}),c=ne(()=>a.isComponentIdSelected(o)),f=ne(()=>{const g={};return Object.entries(l.value.outs).forEach(([v,A])=>{A.field||(g[v]=A)}),g});function u(g){const A=l.value.fields[g].type==L.Tools,C=Object.keys(s[g].value??{});return A?C.filter(p=>{var $;return(($=s[g].value[p])==null?void 0:$.type)=="function"}):C}const m=ne(()=>{const g={};return Object.entries(l.value.outs).forEach(([v,A])=>{if(!A.field)return;g[A.field]={},u(A.field).forEach(y=>{g[A.field][`${v}_${y}`]={name:y,description:"Dynamically created",style:"dynamic"}})}),g});function w(g,v){g.stopPropagation(),n("outMousedown",v)}const b=ne(()=>{const g=[`/components/${i.value.type}.svg`,`/components/workflows_category_${l.value.category}.svg`];return r.featureFlags.value.includes("custom_block_icons")&&g.unshift(`/static/components/${i.value.id}.svg`),g.map(v=>i3(v))});return Ke(c,()=>{n("engaged")}),(g,v)=>(T(),R("div",l3,[q("div",c3,[Ye(s3,{urls:b.value},null,8,["urls"]),Ye(r3,{"component-id":P(o),class:"nodeNamer","block-name":l.value.name},null,8,["component-id","block-name"])]),xe("",!0),(T(!0),R(je,null,It(m.value,(A,C)=>(T(),R("div",{key:C,class:"outputs"},[q("h4",null,Te(l.value.fields[C].name),1),(T(!0),R(je,null,It(A,(y,p)=>(T(),R("div",{key:p,class:"output"},[xt(Te(y.name)+" ",1),q("div",{class:ut(["ball",y.style]),"data-writer-socket-id":p,"data-writer-unselectable":!0,onClickCapture:v[0]||(v[0]=Ao(()=>{},["stop"])),onMousedownCapture:$=>w($,p)},null,42,u3)]))),128)),Object.keys(A).length==0?(T(),R("div",d3,"None configured.")):xe("",!0)]))),128)),q("div",f3,[(T(!0),R(je,null,It(f.value,(A,C)=>(T(),R("div",{key:C,class:"output"},[xt(Te(A.name)+" ",1),q("div",{class:ut(["ball",A.style]),"data-writer-socket-id":C,"data-writer-unselectable":!0,onClickCapture:v[1]||(v[1]=Ao(()=>{},["stop"])),onMousedownCapture:y=>w(y,C)},null,42,p3)]))),128))])]))}}),v3=Oe(m3,[["__scopeId","data-v-d371281f"]]),g3="The root component of the application, which serves as the starting point of the component hierarchy.",y3={writer:{name:"Workflows Root",toolkit:"workflows",category:"Root",description:g3,allowedChildrenTypes:["workflows_workflow"],fields:{}}},_3=Pe({...y3,__name:"WorkflowsRoot",setup(e){const t=Z(ee.core),n=Z(ee.getChildrenVNodes),r=oe(null),a=ne(()=>{const o=t.activePageId.value;if(!!t.getComponentById(o)&&t.isChildOf("workflows_root",o))return o;const i=t.getComponents("workflows_root",{includeBMC:!0,includeCMC:!1,sortedByPosition:!0});return i.length==0?null:i[0].id});return(o,s)=>(T(),R("div",{ref_key:"rootEl",ref:r,class:"WorkflowsRoot","data-writer-container":""},[(T(!0),R(je,null,It(P(n)(),i=>(T(),R(je,{key:i.key},[i.key===`${a.value}:0`?(T(),Ue(Ss(i),{key:0})):xe("",!0)],64))),128))],512))}}),b3=Oe(_3,[["__scopeId","data-v-e736ec53"]]),Ud={root:d5,page:t5,sidebar:VO,button:AR,text:cx,section:EO,header:_O,heading:_T,dataframe:dT,html:gy,pagination:qR,repeater:XR,column:cO,columns:pO,tab:WO,tabs:ZO,link:$x,horizontalstack:CO,separator:OO,image:TT,pdf:kL,iframe:FL,googlemaps:qL,mapbox:b5,icon:AT,timer:rL,textinput:_N,textareainput:$N,numberinput:LM,sliderinput:iN,rangeinput:hN,colorinput:j2,dateinput:K2,timeinput:xN,radioinput:zM,checkboxinput:x2,dropdowninput:Z2,selectinput:YM,multiselectinput:PM,fileinput:hM,webcamcapture:dL,vegalitechart:fx,plotlygraph:ax,metric:XT,message:zT,videoplayer:_x,chatbot:pP,step:uR,steps:gR,ratinginput:BN,tags:$P,switchinput:YN,reuse:pL,avatar:NP,annotatedtext:VP,jsonviewer:l2,workflows_root:b3,workflows_workflow:Z5,progressbar:b2},ps={};function w3(e){const t=`Component type "${e}" not supported. If it's a custom component, please ensure it's been loaded.`;return{writer:{name:"Fallback Component",allowedChildrenTypes:["*"],description:t,category:"Fallback"},setup(n,{slots:r}){return()=>na("div",{"data-writer-container":"",style:{color:"var(--primaryTextColor)"}},[t,r.default({})])}}}function A3(e){var a,o;const t={workflows_node:v3},n=ps[e];if(!n)return;const r=n.baseType;return{...t[r],writer:{...t[r].writer,...ps[e].writer,fields:{...(a=t[r].writer)==null?void 0:a.fields,...(o=ps[e].writer)==null?void 0:o.fields}}}}function C3(e){return A3(e)??Ud[e]??w3(e)}function Cs(e){var t;return(t=C3(e))==null?void 0:t.writer}function Hd(){return[...Object.keys(Ud),...Object.keys(ps)]}function Cy(e,t){Ud[e]=t}function $3(e,t){ps[e]=t}function I3(e){let t=!1;return E3(e),Object.entries(e).forEach(([,n])=>{t=x3(n,e)||t,t=S3(n)||t}),t}function S3(e){const t=Kn(),n=Cs(e.type);if(!n||n.category=="Fallback")return t.error(`Component ${e.id} (${e.type}). Invalid component type.`),!1;let r=!1;return r=N3(e),r=M3(e)||r,k3(e,n),T3(e,n),r}function uu(e,t,n={}){n[e]=!0,Object.entries(t).filter(([,r])=>r.parentId===e).forEach(([r])=>uu(r,t,n))}function E3(e){const t=Kn(),n=Object.fromEntries(Object.entries(e).map(([r])=>[r,!1]));uu("root",e,n),uu("workflows_root",e,n),Object.entries(n).forEach(([r,a])=>{a||t.warn(`Component ${r} (${e[r].type}). Orphan component.`)})}function k3(e,t){const n=Kn(),r=Object.keys(t.fields??{});e.content&&Object.keys(e.content).forEach(a=>{r.includes(a)||n.warn(`Component ${e.id} (${e.type}). Field key "${a}" is defined in the component but not in the template.`)})}function T3(e,t){const n=Object.keys(t.events??{});if(!e.binding)return;const r=e.binding.eventType;if(n.includes(r)&&t.events[r].bindable)return;Kn().warn(`Component ${e.id} (${e.type}). The component is bound to event "${e.binding.eventType}" but the template doesn't define that event or it's not bindable.`)}function x3(e,t){const n=Kn();let r=!1;e.id=="root"&&e.position!==0&&n.error("Root must be at position 0."),e.position==-1&&n.error(`Component ${e.id} (${e.type}). Invalid position.`);const a=Object.values(t).filter(i=>i.parentId===e.id&&i.position!==-2&&!i.isCodeManaged);let o=0;return a.forEach(i=>{o+=i.position}),(a.length-1)*a.length/2!==o&&(n.error(`Component ${e.id} (${e.type}). Invalid children positions. Automated fix will be applied.`),P3(a),r=!0),r}function P3(e){e.sort((t,n)=>t.position>n.position?1:-1),e.map((t,n)=>{t.position=n})}function M3(e){var n,r,a;let t=!1;if(Object.keys(e.handlers??{}).forEach(o=>{if(!o.startsWith("ss-"))return;const s=`wf-${o.substring(3)}`;e.handlers[s]=e.handlers[o],t=!0,delete e.handlers[o]}),(r=(n=e.binding)==null?void 0:n.eventType)!=null&&r.startsWith("ss-")){const s=`wf-${((a=e.binding)==null?void 0:a.eventType).substring(3)}`;e.binding.eventType=s,t=!0}return t}function N3(e,t){let n=!1;if(e.type=="column"){if("horizontalAlignment"in e.content){const r={left:"start",center:"center",right:"end"};e.content.contentHAlign=r[e.content.horizontalAlignment]||e.content.horizontalAlignment,delete e.content.horizontalAlignment,n=!0}if("verticalAlignment"in e.content){const r={normal:"unset",top:"start",center:"center",bottom:"end"};e.content.contentVAlign=r[e.content.verticalAlignment]||e.content.verticalAlignment,delete e.content.verticalAlignment,n=!0}}else if(e.type=="horizontalstack"){if("alignment"in e.content){const r={left:"start",center:"center",right:"end"};e.content.contentHAlign=r[e.content.alignment]||e.content.alignment,delete e.content.alignment,n=!0}}else e.type=="section"&&"snapMode"in e.content&&(delete e.content.snapMode,n=!0);return n}function O3(e){let t="";const n=[];let r=!1;for(let o=0;o<e.length;o++){const s=e[o];if(s==="."&&!r){n.push(t),t="";continue}t+=s,s==="\\"?r=!0:r=!1}return n.push(t),n.map(o=>o.replaceAll("\\.","."))}const R3="WriterCustomComponentTemplates";async function L3(e){await Promise.all(e.map(async t=>{const n=t.toLocaleLowerCase();n.endsWith(".js")?await D3(t):n.endsWith(".css")&&j3(t)}))}async function D3(e){var n;const t=Kn();t.log(`Importing custom component templates at "${e}"...`),await pn(()=>import($y()+e),[],import.meta.url),(n=Object.entries(window[R3]))==null||n.forEach(([r,a])=>{F3(r)?(Cy(`custom_${r}`,a),t.log(`Registering template for "${r}".`)):t.warn(`custom component '${r}' is ignored. A custom component should be declared using only alphanumeric lowercase and _.`)})}function F3(e){return/^[a-z0-9_]+$/.test(e)}function j3(e){const t=document.createElement("link");t.rel="stylesheet",t.href=$y()+e,document.head.appendChild(t)}function $y(){let e=window.location.pathname;return e.endsWith("/")||(e+="/"),`${e}extensions/`}function V3(e,t){return typeof t=="bigint"?t.toString()+"n":t}function Tl(e){return typeof e!="object"||e===null?!1:e.type==="file"&&typeof e.content=="string"}function zd(e){return typeof e!="object"||e===null?!1:e.type==="directory"&&typeof e.children=="object"}function*B3(e,t=[]){if(Tl(e)){yield t;return}for(const[n,r]of Object.entries(e.children))yield*B3(r,[...t,n])}function*U3(e,t=[]){if(yield t,!Tl(e))for(const[n,r]of Object.entries(e.children))yield*U3(r,[...t,n])}function Kd(e,t){if(e.length===0)return t;if(!zd(t))return;const[n,...r]=e,a=t.children[n];return r.length===0?a:Kd(r,a)}function Iy(e,t,n={type:"file",content:"",complete:!0}){var o;const r=structuredClone(t);let a=r;for(let s=0;s<e.length;s++){if(!zd(a))return r;const i=e.at(s);if(s===e.length-1)return a.children[i]=n,r;(o=a.children)[i]??(o[i]={type:"directory",children:{}}),a=a.children[i]}return r}function H3(e,t,n){const r=Kd(e,n);if(!Tl(r))return n;const a=Sy(e,n);return Iy(t,a,structuredClone(r))}function Sy(e,t){var a;const n=structuredClone(t);let r=n;for(let o=0;o<e.length;o++){if(!zd(r))return n;const s=e.at(o);if(!(s in r.children))return n;if(o===e.length-1)return delete r.children[s],n;(a=r.children)[s]??(a[s]={type:"directory",children:{}}),r=r.children[s]}return n}const z3=1e3,K3=6e4;function W3(){let e=null;const t=oe(null),n=oe(null),r=go([]),a=oe(null),o=go({type:"directory",children:{}}),s=oe({}),i=oe([]),l=oe({});let c;const f=oe("idle");let u=0;const m=oe(new Map);let w=[];const b=[],g=oe(null);async function v(){await A(),le("pageChange",K=>{F(K)}),y(),n.value=="edit"}async function A(){const K=await fetch("./api/init",{method:"post",cache:"no-store",headers:{"Content-Type":"application/json"},body:JSON.stringify({proposedSessionId:e})}),S=await K.json();if(K.status>400)throw"Connection rejected.";if(S.extensionPaths&&await L3(S.extensionPaths),n.value=S.mode,s.value=S.components,l.value=S.userState,z(S.mail),e=S.sessionId,t.value=new Date().getTime(),r.value=S.featureFlags,C(S.abstractTemplates),r.value.includes("dataframeEditor")){const V=await pn(()=>import("./CoreDataframe-wiZQRIXg.js"),__vite__mapDeps([5,6,7,8,9]),import.meta.url).then(Y=>Y.default);Cy("dataframe",V)}i.value=S.userFunctions,a.value=S.runCode,o.value=S.sourceFiles,await B(),!(n.value!="edit"||!I3(S.components))&&await I()}function C(K){Object.entries(K??{}).forEach(([S,k])=>{$3(S,k)})}function y(){setTimeout(()=>{j("keepAlive",{},y)},K3)}function p(K){K&&Object.entries(K).forEach(([S,k])=>{const V=S.charAt(0),Y=O3(S.substring(1)),re=Y.length-1;let ie=l.value;const $e=V==="-";for(let ge=0;ge<re;ge++){const Ae=ie==null?void 0:ie[Y[ge]];typeof Ae=="object"&&Ae!==null?ie=Ae:$e||(ie[Y[ge]]={},ie=ie[Y[ge]])}$e?delete ie[Y.at(-1)]:ie[Y.at(-1)]=k})}function $(K){K&&(s.value=K)}function E(){m.value.forEach(({callback:K})=>{K==null||K({ok:!1})}),m.value.clear()}async function B(){if(c)return;const K=Kn(),S=new URL("./api/stream",window.location.href);return S.protocol=S.protocol.replace("https","wss"),S.protocol=S.protocol.replace("http","ws"),c=new WebSocket(S.href),c.onopen=()=>{E(),f.value="connected",K.log("WebSocket connected. Initialising stream..."),j("streamInit",{sessionId:e})},c.onmessage=k=>{var re,ie,$e,ge;const V=JSON.parse(k.data);if(V.messageType=="announcement"&&V.payload.announce=="codeUpdate"){c.close(),A();return}else(V.messageType=="eventResponse"||V.messageType=="stateEnquiryResponse")&&(p((re=V.payload)==null?void 0:re.mutations),z((ie=V.payload)==null?void 0:ie.mail),$(($e=V.payload)==null?void 0:$e.components));const Y=m.value.get(V.trackingId);(ge=Y==null?void 0:Y.callback)==null||ge.call(Y,{ok:!0,payload:V.payload}),m.value.delete(V.trackingId)},c.onclose=async k=>{if(c=null,f.value="offline",k.code==1008){K.error("Invalid session. Reinitialising..."),await A();return}K.error("WebSocket closed. Attempting to reconnect..."),setTimeout(async()=>{try{await B()}catch{K.error("Couldn't reconnect.")}},z3)},new Promise((k,V)=>{c.addEventListener("open",()=>k(),{once:!0}),c.addEventListener("close",()=>V(),{once:!0})})}function z(K=[]){w.push(...K),w=w.filter(S=>{const k=b.filter(V=>V.mailType==S.type);if(k.length==0)return S;k.forEach(V=>V.fn(S.payload))})}function le(K,S){b.push({mailType:K,fn:S}),z()}function fe(K){var k;let S=null;if(K instanceof CustomEvent)S=((k=K.detail)==null?void 0:k.payload)??null;else{const V={};for(const Y in K){const re=K[Y];typeof re!="function"&&(re instanceof Object||(V[Y]=re))}S=V}return S}async function Le(K,S,k){var $e,ge;const V=k?fe(K):null;let Y,re;K instanceof CustomEvent&&(Y=($e=K.detail)==null?void 0:$e.callback,re=(ge=K.detail)==null?void 0:ge.handler),j("event",async()=>({type:K.type,instancePath:S,handler:re,payload:await V}),Y,!0)}async function be(K){return new Promise((S,k)=>{j("hashRequest",{message:K},Y=>{var re;if(!Y.ok)return k("Couldn't connect to the server.");S((re=Y.payload)==null?void 0:re.message)})})}function Ce(K,S){const k=structuredClone(ct(o.value)),V=Kd(S,k);Tl(V)&&(V.content=K,V.complete=!0,o.value=k)}async function Re(K){return new Promise((S,k)=>{j("createSourceFile",{path:K},Y=>{var re;if(!Y.ok)return k("Couldn't connect to the server.");if((re=Y.payload)!=null&&re.error)return k("Couldn't create the file.");o.value=Iy(K,ct(o.value)),S()})})}async function Je(K,S){return new Promise((k,V)=>{j("renameSourceFile",{from:K,to:S},re=>{var ie;if(!re.ok)return V("Couldn't connect to the server.");if((ie=re.payload)!=null&&ie.error)return V("Couldn't rename the file.");o.value=H3(K,S,ct(o.value)),k()})})}async function se(K){return new Promise((S,k)=>{j("deleteSourceFile",{path:K},Y=>{var re;if(!Y.ok)return k("Couldn't connect to the server.");if((re=Y.payload)!=null&&re.error)return k("Couldn't delete the file.");o.value=Sy(K,ct(o.value)),S()})})}async function ce(K,S=["main.py"]){return new Promise((k,V)=>{j("codeSaveRequest",{code:K,path:S},re=>{if(!re.ok)return V("Couldn't connect to the server.");Ce(K,S),k()}),S.join("/")==="main.py"&&(f.value="suspended")})}function he(K){return new Promise((S,k)=>{j("loadSourceFile",{path:K},Y=>{if(!Y.ok)return k("Couldn't connect to the server.");Ce(Y.payload.content,K),S()})})}async function ke(K){j("stateEnquiry",{},K,!0)}function ye(K){const V=()=>{m.value.has(K)&&ke(()=>setTimeout(V,150))};setTimeout(V,150)}async function j(K,S,k,V=!1){if(f.value=="offline"||f.value=="suspended"){k==null||k({ok:!1});return}const Y=Kn(),re=u++;try{(k||V)&&m.value.set(re,{callback:k}),V&&ye(re);let ie;typeof S=="function"?ie=await S():ie=S;const $e={type:K,trackingId:re,payload:ie};if(c.readyState!==c.OPEN)throw"Connection lost.";c.send(JSON.stringify($e,V3))}catch(ie){Y.error("sendFrontendMessage error",ie),k==null||k({ok:!1})}}function ue(K){delete s.value[K]}function O(K){s.value[K.id]=K}async function I(){const K={};Object.entries(s.value).forEach(([k,V])=>{V.isCodeManaged||(K[k]=V)});const S={components:K};return new Promise((k,V)=>{j("componentUpdate",S,re=>{if(!re.ok)return V("Couldn't connect to the server.");k()})})}function M(K){return s.value[K]}function Q(K,S){let k=s.value[S];do{if(k.parentId==K)return!0;k=s.value[k.parentId]}while(k);return!1}function Me(K,{includeBMC:S=!0,includeCMC:k=!0,sortedByPosition:V=!1}={}){let Y=Object.values(s.value);return typeof K<"u"&&(Y=Y.filter(re=>re.parentId==K)),Y=Y.filter(re=>{const ie=re.isCodeManaged;return S&&!ie||k&&ie}),V&&(Y=Y.sort((re,ie)=>re.isCodeManaged&&!ie.isCodeManaged?1:!re.isCodeManaged&&ie.isCodeManaged?-1:re.position>ie.position?1:-1)),Y}function F(K){const k=Me("root").filter(V=>V.content.key==K);k.length!=0&&G(k[0].id)}function G(K){g.value=K}function J(K){return Bd(s.value,K)}return{webSocket:c,syncHealth:f,frontendMessageMap:Vn(m),mode:Vn(n),userFunctions:Vn(i),addMailSubscription:le,init:v,forwardEvent:Le,hashMessage:be,runCode:Vn(a),sourceFiles:Vn(o),sendCodeSaveRequest:ce,sendCreateSourceFileRequest:Re,sendRenameSourceFileRequest:Je,sendDeleteSourceFileRequest:se,requestSourceFileLoading:he,sendComponentUpdate:I,addComponent:O,deleteComponent:ue,getComponentById:M,getComponents:Me,setActivePageId:G,activePageId:Vn(g),setActivePageFromKey:F,getComponentDefinition:Cs,getSupportedComponentTypes:Hd,getContainableTypes:J,sessionTimestamp:Vn(t),userState:Vn(l),isChildOf:Q,featureFlags:Vn(r)}}function G3(e){e.directive("capture-tabs",{mounted:t=>{t.addEventListener("keydown",n=>{n.key=="Tab"&&(n.preventDefault(),t.setRangeText("  ",t.selectionStart,t.selectionStart,"end"))})}})}const es=W3();globalThis.vue=uC;globalThis.injectionKeys=ee;globalThis.core=es;const Zi=Kn();async function q3(){await es.init();const e=es.mode.value,t=e=="edit"?FC():void 0;t&&es.addMailSubscription("logEntry",t.handleLogEntry),Zi.log(`Mounting app in mode ${e}...`);const{default:n}=e==="run"&&await pn(()=>import("./ComponentRenderer-BhrKbn-H.js"),__vite__mapDeps([10,11,12]),import.meta.url),{default:r}=e==="edit"&&await pn(()=>import("./BuilderApp-enbW7Uwi.js").then(o=>o.c),__vite__mapDeps([13,7,14,15]),import.meta.url),a=Sv(n||r);a.use(NC),a.provide(ee.core,es),a.provide(ee.builderManager,t),G3(a),a.mount("#app")}Zi.log("Initialising Writer Framework core...");q3().then(async()=>{Zi.log("Core initialised.")}).catch(e=>{Zi.error("Core initialisation failed.",e),document.write(e)});export{Kd as $,Xt as A,Od as B,X3 as C,So as D,Dt as E,Be as F,vt as G,o5 as H,Z3 as I,r5 as J,pn as K,xe as L,$u as M,P as N,iy as O,by as P,cr as Q,Mn as R,zg as S,rA as T,Vh as U,wy as V,or as W,ct as X,go as Y,B3 as Z,Oe as _,ee as a,Tl as a0,Iy as a1,U3 as a2,Sy as a3,qh as a4,hw as a5,Dw as a6,Dc as a7,Ao as a8,aa as a9,Rv as aA,J3 as aB,os as aC,jC as aD,Ua as aE,oa as aF,qx as aG,gl as aH,ly as aI,Y3 as aJ,Q3 as aK,Pk as aL,Fk as aM,Hd as aN,Cs as aO,s3 as aP,i3 as aQ,OC as aR,bo as aS,zd as aa,A1 as ab,Vn as ac,Fg as ad,an as ae,Kn as af,_m as ag,QA as ah,Ha as ai,I5 as aj,Ay as ak,DC as al,Vg as am,V3 as an,Ss as ao,nr as ap,L as aq,La as ar,Nn as as,Ft as at,Ln as au,en as av,Gt as aw,Ct as ax,et as ay,Ba as az,Ue as b,ne as c,Pe as d,R as e,q as f,C3 as g,na as h,Z as i,ol as j,Zt as k,Wt as l,Ye as m,Ze as n,T as o,Bm as p,xt as q,oe as r,je as s,Te as t,kl as u,$n as v,Ke as w,It as x,ut as y,Qt as z};
