function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = ["./index-DaNZqg5r.js","./serialization-DDqLB4lR.js","./Arrow.dom-C52_vrWm.js","./ComponentRenderer-Bya_Mm2H.js","./ComponentRenderer-BdFfUfAo.css","./BuilderApp-DpwpzPgf.js","./marked.esm-273vDTCT.js","./BuilderApp-ulPQVBIl.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 r of document.querySelectorAll('link[rel="modulepreload"]'))a(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&a(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();const Qm="modulepreload",qm=function(e,t){return new URL(e,t).href},Hc={},tn=function(t,n,a){let r=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),c=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));r=Promise.all(n.map(u=>{if(u=qm(u,a),u in Hc)return;Hc[u]=!0;const f=u.endsWith(".css"),h=f?'[rel="stylesheet"]':"";if(!!a)for(let I=o.length-1;I>=0;I--){const A=o[I];if(A.href===u&&(!f||A.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${h}`))return;const m=document.createElement("link");if(m.rel=f?"stylesheet":Qm,f||(m.as="script",m.crossOrigin=""),m.href=u,c&&m.setAttribute("nonce",c),document.head.appendChild(m),f)return new Promise((I,A)=>{m.addEventListener("load",I),m.addEventListener("error",()=>A(new Error(`Unable to preload CSS for ${u}`)))})}))}return r.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 ss(e,t){const n=new Set(e.split(","));return t?a=>n.has(a.toLowerCase()):a=>n.has(a)}const lt={},rr=[],cn=()=>{},Xm=()=>!1,eo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ji=e=>e.startsWith("onUpdate:"),yt=Object.assign,Qi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Zm=Object.prototype.hasOwnProperty,et=(e,t)=>Zm.call(e,t),ke=Array.isArray,or=e=>gr(e)==="[object Map]",Ba=e=>gr(e)==="[object Set]",jc=e=>gr(e)==="[object Date]",eg=e=>gr(e)==="[object RegExp]",Ve=e=>typeof e=="function",_t=e=>typeof e=="string",da=e=>typeof e=="symbol",dt=e=>e!==null&&typeof e=="object",qi=e=>(dt(e)||Ve(e))&&Ve(e.then)&&Ve(e.catch),nd=Object.prototype.toString,gr=e=>nd.call(e),tg=e=>gr(e).slice(8,-1),ad=e=>gr(e)==="[object Object]",Xi=e=>_t(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,sr=ss(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),is=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},ng=/-(\w)/g,nn=is(e=>e.replace(ng,(t,n)=>n?n.toUpperCase():"")),ag=/\B([A-Z])/g,gn=is(e=>e.replace(ag,"-$1").toLowerCase()),to=is(e=>e.charAt(0).toUpperCase()+e.slice(1)),Vr=is(e=>e?`on${to(e)}`:""),Nn=(e,t)=>!Object.is(e,t),ir=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},Yo=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},zr=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Jo=e=>{const t=_t(e)?Number(e):NaN;return isNaN(t)?e:t};let Kc;const rd=()=>Kc||(Kc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),rg="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",og=ss(rg);function ht(e){if(ke(e)){const t={};for(let n=0;n<e.length;n++){const a=e[n],r=_t(a)?cg(a):ht(a);if(r)for(const o in r)t[o]=r[o]}return t}else if(_t(e)||dt(e))return e}const sg=/;(?![^(]*\))/g,ig=/:([^]+)/,lg=/\/\*[^]*?\*\//g;function cg(e){const t={};return e.replace(lg,"").split(sg).forEach(n=>{if(n){const a=n.split(ig);a.length>1&&(t[a[0].trim()]=a[1].trim())}}),t}function ct(e){let t="";if(_t(e))t=e;else if(ke(e))for(let n=0;n<e.length;n++){const a=ct(e[n]);a&&(t+=a+" ")}else if(dt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function ug(e){if(!e)return null;let{class:t,style:n}=e;return t&&!_t(t)&&(e.class=ct(t)),n&&(e.style=ht(n)),e}const dg="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",fg=ss(dg);function od(e){return!!e||e===""}function pg(e,t){if(e.length!==t.length)return!1;let n=!0;for(let a=0;n&&a<e.length;a++)n=fa(e[a],t[a]);return n}function fa(e,t){if(e===t)return!0;let n=jc(e),a=jc(t);if(n||a)return n&&a?e.getTime()===t.getTime():!1;if(n=da(e),a=da(t),n||a)return e===t;if(n=ke(e),a=ke(t),n||a)return n&&a?pg(e,t):!1;if(n=dt(e),a=dt(t),n||a){if(!n||!a)return!1;const r=Object.keys(e).length,o=Object.keys(t).length;if(r!==o)return!1;for(const s in e){const c=e.hasOwnProperty(s),u=t.hasOwnProperty(s);if(c&&!u||!c&&u||!fa(e[s],t[s]))return!1}}return String(e)===String(t)}function ls(e,t){return e.findIndex(n=>fa(n,t))}const he=e=>_t(e)?e:e==null?"":ke(e)||dt(e)&&(e.toString===nd||!Ve(e.toString))?JSON.stringify(e,sd,2):String(e),sd=(e,t)=>t&&t.__v_isRef?sd(e,t.value):or(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[a,r],o)=>(n[li(a,o)+" =>"]=r,n),{})}:Ba(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>li(n))}:da(t)?li(t):dt(t)&&!ke(t)&&!ad(t)?String(t):t,li=(e,t="")=>{var n;return da(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 vn;class Zi{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=vn,!t&&vn&&(this.index=(vn.scopes||(vn.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=vn;try{return vn=this,t()}finally{vn=n}}}on(){vn=this}off(){vn=this.parent}stop(t){if(this._active){let n,a;for(n=0,a=this.effects.length;n<a;n++)this.effects[n].stop();for(n=0,a=this.cleanups.length;n<a;n++)this.cleanups[n]();if(this.scopes)for(n=0,a=this.scopes.length;n<a;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0,this._active=!1}}}function hg(e){return new Zi(e)}function id(e,t=vn){t&&t.active&&t.effects.push(e)}function ld(){return vn}function vg(e){vn&&vn.cleanups.push(e)}let $a;class pr{constructor(t,n,a,r){this.fn=t,this.trigger=n,this.scheduler=a,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,id(this,r)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,Ua();for(let t=0;t<this._depsLength;t++){const n=this.deps[t];if(n.computed&&(mg(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),Ha()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=ua,n=$a;try{return ua=!0,$a=this,this._runnings++,zc(this),this.fn()}finally{Wc(this),this._runnings--,$a=n,ua=t}}stop(){var t;this.active&&(zc(this),Wc(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function mg(e){return e.value}function zc(e){e._trackId++,e._depsLength=0}function Wc(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)cd(e.deps[t],e);e.deps.length=e._depsLength}}function cd(e,t){const n=e.get(t);n!==void 0&&t._trackId!==n&&(e.delete(t),e.size===0&&e.cleanup())}function gg(e,t){e.effect instanceof pr&&(e=e.effect.fn);const n=new pr(e,cn,()=>{n.dirty&&n.run()});t&&(yt(n,t),t.scope&&id(n,t.scope)),(!t||!t.lazy)&&n.run();const a=n.run.bind(n);return a.effect=n,a}function yg(e){e.effect.stop()}let ua=!0,ki=0;const ud=[];function Ua(){ud.push(ua),ua=!1}function Ha(){const e=ud.pop();ua=e===void 0?!0:e}function el(){ki++}function tl(){for(ki--;!ki&&Ei.length;)Ei.shift()()}function dd(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const a=e.deps[e._depsLength];a!==t?(a&&cd(a,e),e.deps[e._depsLength++]=t):e._depsLength++}}const Ei=[];function fd(e,t,n){el();for(const a of e.keys()){let r;a._dirtyLevel<t&&(r??(r=e.get(a)===a._trackId))&&(a._shouldSchedule||(a._shouldSchedule=a._dirtyLevel===0),a._dirtyLevel=t),a._shouldSchedule&&(r??(r=e.get(a)===a._trackId))&&(a.trigger(),(!a._runnings||a.allowRecurse)&&a._dirtyLevel!==2&&(a._shouldSchedule=!1,a.scheduler&&Ei.push(a.scheduler)))}tl()}const pd=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},Qo=new WeakMap,Ma=Symbol(""),xi=Symbol("");function dn(e,t,n){if(ua&&$a){let a=Qo.get(e);a||Qo.set(e,a=new Map);let r=a.get(n);r||a.set(n,r=pd(()=>a.delete(n))),dd($a,r)}}function Gn(e,t,n,a,r,o){const s=Qo.get(e);if(!s)return;let c=[];if(t==="clear")c=[...s.values()];else if(n==="length"&&ke(e)){const u=Number(a);s.forEach((f,h)=>{(h==="length"||!da(h)&&h>=u)&&c.push(f)})}else switch(n!==void 0&&c.push(s.get(n)),t){case"add":ke(e)?Xi(n)&&c.push(s.get("length")):(c.push(s.get(Ma)),or(e)&&c.push(s.get(xi)));break;case"delete":ke(e)||(c.push(s.get(Ma)),or(e)&&c.push(s.get(xi)));break;case"set":or(e)&&c.push(s.get(Ma));break}el();for(const u of c)u&&fd(u,4);tl()}function _g(e,t){var n;return(n=Qo.get(e))==null?void 0:n.get(t)}const bg=ss("__proto__,__v_isRef,__isVue"),hd=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(da)),Gc=Ag();function Ag(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const a=Qe(this);for(let o=0,s=this.length;o<s;o++)dn(a,"get",o+"");const r=a[t](...n);return r===-1||r===!1?a[t](...n.map(Qe)):r}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){Ua(),el();const a=Qe(this)[t].apply(this,n);return tl(),Ha(),a}}),e}function wg(e){const t=Qe(this);return dn(t,"has",e),t.hasOwnProperty(e)}class vd{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,a){const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return a===(r?o?Ad:bd:o?_d:yd).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(a)?t:void 0;const s=ke(t);if(!r){if(s&&et(Gc,n))return Reflect.get(Gc,n,a);if(n==="hasOwnProperty")return wg}const c=Reflect.get(t,n,a);return(da(n)?hd.has(n):bg(n))||(r||dn(t,"get",n),o)?c:Vt(c)?s&&Xi(n)?c:c.value:dt(c)?r?fs(c):ds(c):c}}class md extends vd{constructor(t=!1){super(!1,t)}set(t,n,a,r){let o=t[n];if(!this._isShallow){const u=Pa(o);if(!Wr(a)&&!Pa(a)&&(o=Qe(o),a=Qe(a)),!ke(t)&&Vt(o)&&!Vt(a))return u?!1:(o.value=a,!0)}const s=ke(t)&&Xi(n)?Number(n)<t.length:et(t,n),c=Reflect.set(t,n,a,r);return t===Qe(r)&&(s?Nn(a,o)&&Gn(t,"set",n,a):Gn(t,"add",n,a)),c}deleteProperty(t,n){const a=et(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&a&&Gn(t,"delete",n,void 0),r}has(t,n){const a=Reflect.has(t,n);return(!da(n)||!hd.has(n))&&dn(t,"has",n),a}ownKeys(t){return dn(t,"iterate",ke(t)?"length":Ma),Reflect.ownKeys(t)}}class gd extends vd{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Cg=new md,Ig=new gd,Tg=new md(!0),Sg=new gd(!0),nl=e=>e,cs=e=>Reflect.getPrototypeOf(e);function ko(e,t,n=!1,a=!1){e=e.__v_raw;const r=Qe(e),o=Qe(t);n||(Nn(t,o)&&dn(r,"get",t),dn(r,"get",o));const{has:s}=cs(r),c=a?nl:n?ol:Gr;if(s.call(r,t))return c(e.get(t));if(s.call(r,o))return c(e.get(o));e!==r&&e.get(t)}function Eo(e,t=!1){const n=this.__v_raw,a=Qe(n),r=Qe(e);return t||(Nn(e,r)&&dn(a,"has",e),dn(a,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function xo(e,t=!1){return e=e.__v_raw,!t&&dn(Qe(e),"iterate",Ma),Reflect.get(e,"size",e)}function Yc(e){e=Qe(e);const t=Qe(this);return cs(t).has.call(t,e)||(t.add(e),Gn(t,"add",e,e)),this}function Jc(e,t){t=Qe(t);const n=Qe(this),{has:a,get:r}=cs(n);let o=a.call(n,e);o||(e=Qe(e),o=a.call(n,e));const s=r.call(n,e);return n.set(e,t),o?Nn(t,s)&&Gn(n,"set",e,t):Gn(n,"add",e,t),this}function Qc(e){const t=Qe(this),{has:n,get:a}=cs(t);let r=n.call(t,e);r||(e=Qe(e),r=n.call(t,e)),a&&a.call(t,e);const o=t.delete(e);return r&&Gn(t,"delete",e,void 0),o}function qc(){const e=Qe(this),t=e.size!==0,n=e.clear();return t&&Gn(e,"clear",void 0,void 0),n}function $o(e,t){return function(a,r){const o=this,s=o.__v_raw,c=Qe(s),u=t?nl:e?ol:Gr;return!e&&dn(c,"iterate",Ma),s.forEach((f,h)=>a.call(r,u(f),u(h),o))}}function Mo(e,t,n){return function(...a){const r=this.__v_raw,o=Qe(r),s=or(o),c=e==="entries"||e===Symbol.iterator&&s,u=e==="keys"&&s,f=r[e](...a),h=n?nl:t?ol:Gr;return!t&&dn(o,"iterate",u?xi:Ma),{next(){const{value:d,done:m}=f.next();return m?{value:d,done:m}:{value:c?[h(d[0]),h(d[1])]:h(d),done:m}},[Symbol.iterator](){return this}}}}function na(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function kg(){const e={get(o){return ko(this,o)},get size(){return xo(this)},has:Eo,add:Yc,set:Jc,delete:Qc,clear:qc,forEach:$o(!1,!1)},t={get(o){return ko(this,o,!1,!0)},get size(){return xo(this)},has:Eo,add:Yc,set:Jc,delete:Qc,clear:qc,forEach:$o(!1,!0)},n={get(o){return ko(this,o,!0)},get size(){return xo(this,!0)},has(o){return Eo.call(this,o,!0)},add:na("add"),set:na("set"),delete:na("delete"),clear:na("clear"),forEach:$o(!0,!1)},a={get(o){return ko(this,o,!0,!0)},get size(){return xo(this,!0)},has(o){return Eo.call(this,o,!0)},add:na("add"),set:na("set"),delete:na("delete"),clear:na("clear"),forEach:$o(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=Mo(o,!1,!1),n[o]=Mo(o,!0,!1),t[o]=Mo(o,!1,!0),a[o]=Mo(o,!0,!0)}),[e,n,t,a]}const[Eg,xg,$g,Mg]=kg();function us(e,t){const n=t?e?Mg:$g:e?xg:Eg;return(a,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?a:Reflect.get(et(n,r)&&r in a?n:a,r,o)}const Ng={get:us(!1,!1)},Og={get:us(!1,!0)},Lg={get:us(!0,!1)},Pg={get:us(!0,!0)},yd=new WeakMap,_d=new WeakMap,bd=new WeakMap,Ad=new WeakMap;function Rg(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Fg(e){return e.__v_skip||!Object.isExtensible(e)?0:Rg(tg(e))}function ds(e){return Pa(e)?e:ps(e,!1,Cg,Ng,yd)}function wd(e){return ps(e,!1,Tg,Og,_d)}function fs(e){return ps(e,!0,Ig,Lg,bd)}function Dg(e){return ps(e,!0,Sg,Pg,Ad)}function ps(e,t,n,a,r){if(!dt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const s=Fg(e);if(s===0)return e;const c=new Proxy(e,s===2?a:n);return r.set(e,c),c}function Na(e){return Pa(e)?Na(e.__v_raw):!!(e&&e.__v_isReactive)}function Pa(e){return!!(e&&e.__v_isReadonly)}function Wr(e){return!!(e&&e.__v_isShallow)}function al(e){return Na(e)||Pa(e)}function Qe(e){const t=e&&e.__v_raw;return t?Qe(t):e}function rl(e){return Object.isExtensible(e)&&Yo(e,"__v_skip",!0),e}const Gr=e=>dt(e)?ds(e):e,ol=e=>dt(e)?fs(e):e;class Cd{constructor(t,n,a,r){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new pr(()=>t(this._value),()=>lr(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=a}get value(){const t=Qe(this);return(!t._cacheable||t.effect.dirty)&&Nn(t._value,t._value=t.effect.run())&&lr(t,4),sl(t),t.effect._dirtyLevel>=2&&lr(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Vg(e,t,n=!1){let a,r;const o=Ve(e);return o?(a=e,r=cn):(a=e.get,r=e.set),new Cd(a,r,o||!r,n)}function sl(e){var t;ua&&$a&&(e=Qe(e),dd($a,(t=e.dep)!=null?t:e.dep=pd(()=>e.dep=void 0,e instanceof Cd?e:void 0)))}function lr(e,t=4,n){e=Qe(e);const a=e.dep;a&&fd(a,t)}function Vt(e){return!!(e&&e.__v_isRef===!0)}function ee(e){return Id(e,!1)}function il(e){return Id(e,!0)}function Id(e,t){return Vt(e)?e:new Bg(e,t)}class Bg{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:Qe(t),this._value=n?t:Gr(t)}get value(){return sl(this),this._value}set value(t){const n=this.__v_isShallow||Wr(t)||Pa(t);t=n?t:Qe(t),Nn(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:Gr(t),lr(this,4))}}function Ug(e){lr(e,4)}function $(e){return Vt(e)?e.value:e}function Hg(e){return Ve(e)?e():$(e)}const jg={get:(e,t,n)=>$(Reflect.get(e,t,n)),set:(e,t,n,a)=>{const r=e[t];return Vt(r)&&!Vt(n)?(r.value=n,!0):Reflect.set(e,t,n,a)}};function ll(e){return Na(e)?e:new Proxy(e,jg)}class Kg{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:a}=t(()=>sl(this),()=>lr(this));this._get=n,this._set=a}get value(){return this._get()}set value(t){this._set(t)}}function Td(e){return new Kg(e)}function cl(e){const t=ke(e)?new Array(e.length):{};for(const n in e)t[n]=Sd(e,n);return t}class zg{constructor(t,n,a){this._object=t,this._key=n,this._defaultValue=a,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 _g(Qe(this._object),this._key)}}class Wg{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function ul(e,t,n){return Vt(e)?e:Ve(e)?new Wg(e):dt(e)&&arguments.length>1?Sd(e,t,n):ee(e)}function Sd(e,t,n){const a=e[t];return Vt(a)?a:new zg(e,t,n)}const Gg={GET:"get",HAS:"has",ITERATE:"iterate"},Yg={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 Jg(e,t){}const Qg={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"},qg={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 Yn(e,t,n,a){try{return a?e(...a):e()}catch(r){ja(r,t,n)}}function yn(e,t,n,a){if(Ve(e)){const o=Yn(e,t,n,a);return o&&qi(o)&&o.catch(s=>{ja(s,t,n)}),o}const r=[];for(let o=0;o<e.length;o++)r.push(yn(e[o],t,n,a));return r}function ja(e,t,n,a=!0){const r=t?t.vnode:null;if(t){let o=t.parent;const s=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const f=o.ec;if(f){for(let h=0;h<f.length;h++)if(f[h](e,s,c)===!1)return}o=o.parent}const u=t.appContext.config.errorHandler;if(u){Yn(u,null,10,[e,s,c]);return}}Xg(e,n,r,a)}function Xg(e,t,n,a=!0){console.error(e)}let Yr=!1,$i=!1;const Qt=[];let Rn=0;const cr=[];let sa=null,Ea=0;const kd=Promise.resolve();let dl=null;function Mn(e){const t=dl||kd;return e?t.then(this?e.bind(this):e):t}function Zg(e){let t=Rn+1,n=Qt.length;for(;t<n;){const a=t+n>>>1,r=Qt[a],o=Jr(r);o<e||o===e&&r.pre?t=a+1:n=a}return t}function hs(e){(!Qt.length||!Qt.includes(e,Yr&&e.allowRecurse?Rn+1:Rn))&&(e.id==null?Qt.push(e):Qt.splice(Zg(e.id),0,e),Ed())}function Ed(){!Yr&&!$i&&($i=!0,dl=kd.then(xd))}function ey(e){const t=Qt.indexOf(e);t>Rn&&Qt.splice(t,1)}function qo(e){ke(e)?cr.push(...e):(!sa||!sa.includes(e,e.allowRecurse?Ea+1:Ea))&&cr.push(e),Ed()}function Xc(e,t,n=Yr?Rn+1:0){for(;n<Qt.length;n++){const a=Qt[n];if(a&&a.pre){if(e&&a.id!==e.uid)continue;Qt.splice(n,1),n--,a()}}}function Xo(e){if(cr.length){const t=[...new Set(cr)].sort((n,a)=>Jr(n)-Jr(a));if(cr.length=0,sa){sa.push(...t);return}for(sa=t,Ea=0;Ea<sa.length;Ea++)sa[Ea]();sa=null,Ea=0}}const Jr=e=>e.id==null?1/0:e.id,ty=(e,t)=>{const n=Jr(e)-Jr(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function xd(e){$i=!1,Yr=!0,Qt.sort(ty);try{for(Rn=0;Rn<Qt.length;Rn++){const t=Qt[Rn];t&&t.active!==!1&&Yn(t,null,14)}}finally{Rn=0,Qt.length=0,Xo(),Yr=!1,dl=null,(Qt.length||cr.length)&&xd()}}let ar,No=[];function $d(e,t){var n,a;ar=e,ar?(ar.enabled=!0,No.forEach(({event:r,args:o})=>ar.emit(r,...o)),No=[]):typeof window<"u"&&window.HTMLElement&&!((a=(n=window.navigator)==null?void 0:n.userAgent)!=null&&a.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{$d(o,t)}),setTimeout(()=>{ar||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,No=[])},3e3)):No=[]}function ny(e,t,...n){if(e.isUnmounted)return;const a=e.vnode.props||lt;let r=n;const o=t.startsWith("update:"),s=o&&t.slice(7);if(s&&s in a){const h=`${s==="modelValue"?"model":s}Modifiers`,{number:d,trim:m}=a[h]||lt;m&&(r=n.map(I=>_t(I)?I.trim():I)),d&&(r=n.map(zr))}let c,u=a[c=Vr(t)]||a[c=Vr(nn(t))];!u&&o&&(u=a[c=Vr(gn(t))]),u&&yn(u,e,6,r);const f=a[c+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,yn(f,e,6,r)}}function Md(e,t,n=!1){const a=t.emitsCache,r=a.get(e);if(r!==void 0)return r;const o=e.emits;let s={},c=!1;if(!Ve(e)){const u=f=>{const h=Md(f,t,!0);h&&(c=!0,yt(s,h))};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!o&&!c?(dt(e)&&a.set(e,null),null):(ke(o)?o.forEach(u=>s[u]=null):yt(s,o),dt(e)&&a.set(e,s),s)}function vs(e,t){return!e||!eo(t)?!1:(t=t.slice(2).replace(/Once$/,""),et(e,t[0].toLowerCase()+t.slice(1))||et(e,gn(t))||et(e,t))}let $t=null,ms=null;function Qr(e){const t=$t;return $t=e,ms=e&&e.type.__scopeId||null,t}function Bt(e){ms=e}function Ut(){ms=null}const ay=e=>Be;function Be(e,t=$t,n){if(!t||e._n)return e;const a=(...r)=>{a._d&&Di(-1);const o=Qr(t);let s;try{s=e(...r)}finally{Qr(o),a._d&&Di(1)}return s};return a._n=!0,a._c=!0,a._d=!0,a}function Ko(e){const{type:t,vnode:n,proxy:a,withProxy:r,props:o,propsOptions:[s],slots:c,attrs:u,emit:f,render:h,renderCache:d,data:m,setupState:I,ctx:A,inheritAttrs:b}=e;let E,j;const M=Qr(e);try{if(n.shapeFlag&4){const y=r||a,C=y;E=mn(h.call(C,y,d,o,I,m,A)),j=u}else{const y=t;E=mn(y.length>1?y(o,{attrs:u,slots:c,emit:f}):y(o,null)),j=t.props?u:oy(u)}}catch(y){Hr.length=0,ja(y,e,1),E=Fe(qt)}let g=E;if(j&&b!==!1){const y=Object.keys(j),{shapeFlag:C}=g;y.length&&C&7&&(s&&y.some(Ji)&&(j=sy(j,s)),g=Fn(g,j))}return n.dirs&&(g=Fn(g),g.dirs=g.dirs?g.dirs.concat(n.dirs):n.dirs),n.transition&&(g.transition=n.transition),E=g,Qr(M),E}function ry(e,t=!0){let n;for(let a=0;a<e.length;a++){const r=e[a];if(pa(r)){if(r.type!==qt||r.children==="v-if"){if(n)return;n=r}}else return}return n}const oy=e=>{let t;for(const n in e)(n==="class"||n==="style"||eo(n))&&((t||(t={}))[n]=e[n]);return t},sy=(e,t)=>{const n={};for(const a in e)(!Ji(a)||!(a.slice(9)in t))&&(n[a]=e[a]);return n};function iy(e,t,n){const{props:a,children:r,component:o}=e,{props:s,children:c,patchFlag:u}=t,f=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&u>=0){if(u&1024)return!0;if(u&16)return a?Zc(a,s,f):!!s;if(u&8){const h=t.dynamicProps;for(let d=0;d<h.length;d++){const m=h[d];if(s[m]!==a[m]&&!vs(f,m))return!0}}}else return(r||c)&&(!c||!c.$stable)?!0:a===s?!1:a?s?Zc(a,s,f):!0:!!s;return!1}function Zc(e,t,n){const a=Object.keys(t);if(a.length!==Object.keys(e).length)return!0;for(let r=0;r<a.length;r++){const o=a[r];if(t[o]!==e[o]&&!vs(n,o))return!0}return!1}function fl({vnode:e,parent:t},n){for(;t;){const a=t.subTree;if(a.suspense&&a.suspense.activeBranch===e&&(a.el=e.el),a===e)(e=t.vnode).el=n,t=t.parent;else break}}const pl="components",ly="directives";function cy(e,t){return vl(pl,e,!0,t)||e}const Nd=Symbol.for("v-ndc");function hl(e){return _t(e)?vl(pl,e,!1)||e:e||Nd}function Od(e){return vl(ly,e)}function vl(e,t,n=!0,a=!1){const r=$t||Lt;if(r){const o=r.type;if(e===pl){const c=ji(o,!1);if(c&&(c===t||c===nn(t)||c===to(nn(t))))return o}const s=eu(r[e]||o[e],t)||eu(r.appContext[e],t);return!s&&a?o:s}}function eu(e,t){return e&&(e[t]||e[nn(t)]||e[to(nn(t))])}const Ld=e=>e.__isSuspense;let Mi=0;const uy={name:"Suspense",__isSuspense:!0,process(e,t,n,a,r,o,s,c,u,f){if(e==null)fy(t,n,a,r,o,s,c,u,f);else{if(o&&o.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}py(e,t,n,a,r,s,c,u,f)}},hydrate:hy,create:ml,normalize:vy},dy=uy;function qr(e,t){const n=e.props&&e.props[t];Ve(n)&&n()}function fy(e,t,n,a,r,o,s,c,u){const{p:f,o:{createElement:h}}=u,d=h("div"),m=e.suspense=ml(e,r,a,t,d,n,o,s,c,u);f(null,m.pendingBranch=e.ssContent,d,null,a,m,o,s),m.deps>0?(qr(e,"onPending"),qr(e,"onFallback"),f(null,e.ssFallback,t,n,a,null,o,s),ur(m,e.ssFallback)):m.resolve(!1,!0)}function py(e,t,n,a,r,o,s,c,{p:u,um:f,o:{createElement:h}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const m=t.ssContent,I=t.ssFallback,{activeBranch:A,pendingBranch:b,isInFallback:E,isHydrating:j}=d;if(b)d.pendingBranch=m,$n(m,b)?(u(b,m,d.hiddenContainer,null,r,d,o,s,c),d.deps<=0?d.resolve():E&&(j||(u(A,I,n,a,r,null,o,s,c),ur(d,I)))):(d.pendingId=Mi++,j?(d.isHydrating=!1,d.activeBranch=b):f(b,r,d),d.deps=0,d.effects.length=0,d.hiddenContainer=h("div"),E?(u(null,m,d.hiddenContainer,null,r,d,o,s,c),d.deps<=0?d.resolve():(u(A,I,n,a,r,null,o,s,c),ur(d,I))):A&&$n(m,A)?(u(A,m,n,a,r,d,o,s,c),d.resolve(!0)):(u(null,m,d.hiddenContainer,null,r,d,o,s,c),d.deps<=0&&d.resolve()));else if(A&&$n(m,A))u(A,m,n,a,r,d,o,s,c),ur(d,m);else if(qr(t,"onPending"),d.pendingBranch=m,m.shapeFlag&512?d.pendingId=m.component.suspenseId:d.pendingId=Mi++,u(null,m,d.hiddenContainer,null,r,d,o,s,c),d.deps<=0)d.resolve();else{const{timeout:M,pendingId:g}=d;M>0?setTimeout(()=>{d.pendingId===g&&d.fallback(I)},M):M===0&&d.fallback(I)}}function ml(e,t,n,a,r,o,s,c,u,f,h=!1){const{p:d,m,um:I,n:A,o:{parentNode:b,remove:E}}=f;let j;const M=my(e);M&&t!=null&&t.pendingBranch&&(j=t.pendingId,t.deps++);const g=e.props?Jo(e.props.timeout):void 0,y=o,C={vnode:e,parent:t,parentComponent:n,namespace:s,container:a,hiddenContainer:r,deps:0,pendingId:Mi++,timeout:typeof g=="number"?g:-1,activeBranch:null,pendingBranch:null,isInFallback:!h,isHydrating:h,isUnmounted:!1,effects:[],resolve(v=!1,D=!1){const{vnode:N,activeBranch:Y,pendingBranch:X,pendingId:_e,effects:ie,parentComponent:G,container:fe}=C;let we=!1;C.isHydrating?C.isHydrating=!1:v||(we=Y&&X.transition&&X.transition.mode==="out-in",we&&(Y.transition.afterLeave=()=>{_e===C.pendingId&&(m(X,fe,o===y?A(Y):o,0),qo(ie))}),Y&&(b(Y.el)!==C.hiddenContainer&&(o=A(Y)),I(Y,G,C,!0)),we||m(X,fe,o,0)),ur(C,X),C.pendingBranch=null,C.isInFallback=!1;let re=C.parent,oe=!1;for(;re;){if(re.pendingBranch){re.effects.push(...ie),oe=!0;break}re=re.parent}!oe&&!we&&qo(ie),C.effects=[],M&&t&&t.pendingBranch&&j===t.pendingId&&(t.deps--,t.deps===0&&!D&&t.resolve()),qr(N,"onResolve")},fallback(v){if(!C.pendingBranch)return;const{vnode:D,activeBranch:N,parentComponent:Y,container:X,namespace:_e}=C;qr(D,"onFallback");const ie=A(N),G=()=>{C.isInFallback&&(d(null,v,X,ie,Y,null,_e,c,u),ur(C,v))},fe=v.transition&&v.transition.mode==="out-in";fe&&(N.transition.afterLeave=G),C.isInFallback=!0,I(N,Y,null,!0),fe||G()},move(v,D,N){C.activeBranch&&m(C.activeBranch,v,D,N),C.container=v},next(){return C.activeBranch&&A(C.activeBranch)},registerDep(v,D){const N=!!C.pendingBranch;N&&C.deps++;const Y=v.vnode.el;v.asyncDep.catch(X=>{ja(X,v,0)}).then(X=>{if(v.isUnmounted||C.isUnmounted||C.pendingId!==v.suspenseId)return;v.asyncResolved=!0;const{vnode:_e}=v;Ui(v,X,!1),Y&&(_e.el=Y);const ie=!Y&&v.subTree.el;D(v,_e,b(Y||v.subTree.el),Y?null:A(v.subTree),C,s,u),ie&&E(ie),fl(v,_e.el),N&&--C.deps===0&&C.resolve()})},unmount(v,D){C.isUnmounted=!0,C.activeBranch&&I(C.activeBranch,n,v,D),C.pendingBranch&&I(C.pendingBranch,n,v,D)}};return C}function hy(e,t,n,a,r,o,s,c,u){const f=t.suspense=ml(t,a,n,e.parentNode,document.createElement("div"),null,r,o,s,c,!0),h=u(e,f.pendingBranch=t.ssContent,n,f,o,s);return f.deps===0&&f.resolve(!1,!0),h}function vy(e){const{shapeFlag:t,children:n}=e,a=t&32;e.ssContent=tu(a?n.default:n),e.ssFallback=a?tu(n.fallback):Fe(qt)}function tu(e){let t;if(Ve(e)){const n=Da&&e._c;n&&(e._d=!1,T()),e=e(),n&&(e._d=!0,t=un,hf())}return ke(e)&&(e=ry(e)),e=mn(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function Pd(e,t){t&&t.pendingBranch?ke(e)?t.effects.push(...e):t.effects.push(e):qo(e)}function ur(e,t){e.activeBranch=t;const{vnode:n,parentComponent:a}=e;let r=t.el;for(;!r&&t.component;)t=t.component.subTree,r=t.el;n.el=r,a&&a.subTree===n&&(a.vnode.el=r,fl(a,r))}function my(e){var t;return((t=e.props)==null?void 0:t.suspensible)!=null&&e.props.suspensible!==!1}const Rd=Symbol.for("v-scx"),Fd=()=>K(Rd);function gy(e,t){return no(e,null,t)}function Dd(e,t){return no(e,null,{flush:"post"})}function Vd(e,t){return no(e,null,{flush:"sync"})}const Oo={};function Ne(e,t,n){return no(e,t,n)}function no(e,t,{immediate:n,deep:a,flush:r,once:o,onTrack:s,onTrigger:c}=lt){if(t&&o){const v=t;t=(...D)=>{v(...D),C()}}const u=Lt,f=v=>a===!0?v:xa(v,a===!1?1:void 0);let h,d=!1,m=!1;if(Vt(e)?(h=()=>e.value,d=Wr(e)):Na(e)?(h=()=>f(e),d=!0):ke(e)?(m=!0,d=e.some(v=>Na(v)||Wr(v)),h=()=>e.map(v=>{if(Vt(v))return v.value;if(Na(v))return f(v);if(Ve(v))return Yn(v,u,2)})):Ve(e)?t?h=()=>Yn(e,u,2):h=()=>(I&&I(),yn(e,u,3,[A])):h=cn,t&&a){const v=h;h=()=>xa(v())}let I,A=v=>{I=g.onStop=()=>{Yn(v,u,4),I=g.onStop=void 0}},b;if(ro)if(A=cn,t?n&&yn(t,u,3,[h(),m?[]:void 0,A]):h(),r==="sync"){const v=Fd();b=v.__watcherHandles||(v.__watcherHandles=[])}else return cn;let E=m?new Array(e.length).fill(Oo):Oo;const j=()=>{if(!(!g.active||!g.dirty))if(t){const v=g.run();(a||d||(m?v.some((D,N)=>Nn(D,E[N])):Nn(v,E)))&&(I&&I(),yn(t,u,3,[v,E===Oo?void 0:m&&E[0]===Oo?[]:E,A]),E=v)}else g.run()};j.allowRecurse=!!t;let M;r==="sync"?M=j:r==="post"?M=()=>Kt(j,u&&u.suspense):(j.pre=!0,u&&(j.id=u.uid),M=()=>hs(j));const g=new pr(h,cn,M),y=ld(),C=()=>{g.stop(),y&&Qi(y.effects,g)};return t?n?j():E=g.run():r==="post"?Kt(g.run.bind(g),u&&u.suspense):g.run(),b&&b.push(C),C}function yy(e,t,n){const a=this.proxy,r=_t(e)?e.includes(".")?Bd(a,e):()=>a[e]:e.bind(a,a);let o;Ve(t)?o=t:(o=t.handler,n=t);const s=Va(this),c=no(r,o.bind(a),n);return s(),c}function Bd(e,t){const n=t.split(".");return()=>{let a=e;for(let r=0;r<n.length&&a;r++)a=a[n[r]];return a}}function xa(e,t,n=0,a){if(!dt(e)||e.__v_skip)return e;if(t&&t>0){if(n>=t)return e;n++}if(a=a||new Set,a.has(e))return e;if(a.add(e),Vt(e))xa(e.value,t,n,a);else if(ke(e))for(let r=0;r<e.length;r++)xa(e[r],t,n,a);else if(Ba(e)||or(e))e.forEach(r=>{xa(r,t,n,a)});else if(ad(e))for(const r in e)xa(e[r],t,n,a);return e}function Mt(e,t){if($t===null)return e;const n=As($t)||$t.proxy,a=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[o,s,c,u=lt]=t[r];o&&(Ve(o)&&(o={mounted:o,updated:o}),o.deep&&xa(s),a.push({dir:o,instance:n,value:s,oldValue:void 0,arg:c,modifiers:u}))}return e}function Pn(e,t,n,a){const r=e.dirs,o=t&&t.dirs;for(let s=0;s<r.length;s++){const c=r[s];o&&(c.oldValue=o[s].value);let u=c.dir[a];u&&(Ua(),yn(u,n,8,[e.el,c,e,t]),Ha())}}const ia=Symbol("_leaveCb"),Lo=Symbol("_enterCb");function gl(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Wt(()=>{e.isMounted=!0}),Ka(()=>{e.isUnmounting=!0}),e}const An=[Function,Array],yl={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:An,onEnter:An,onAfterEnter:An,onEnterCancelled:An,onBeforeLeave:An,onLeave:An,onAfterLeave:An,onLeaveCancelled:An,onBeforeAppear:An,onAppear:An,onAfterAppear:An,onAppearCancelled:An},_y={name:"BaseTransition",props:yl,setup(e,{slots:t}){const n=Qn(),a=gl();return()=>{const r=t.default&&gs(t.default(),!0);if(!r||!r.length)return;let o=r[0];if(r.length>1){for(const m of r)if(m.type!==qt){o=m;break}}const s=Qe(e),{mode:c}=s;if(a.isLeaving)return ci(o);const u=nu(o);if(!u)return ci(o);const f=hr(u,s,a,n);Ra(u,f);const h=n.subTree,d=h&&nu(h);if(d&&d.type!==qt&&!$n(u,d)){const m=hr(d,s,a,n);if(Ra(d,m),c==="out-in")return a.isLeaving=!0,m.afterLeave=()=>{a.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},ci(o);c==="in-out"&&u.type!==qt&&(m.delayLeave=(I,A,b)=>{const E=Hd(a,d);E[String(d.key)]=d,I[ia]=()=>{A(),I[ia]=void 0,delete f.delayedLeave},f.delayedLeave=b})}return o}}},Ud=_y;function Hd(e,t){const{leavingVNodes:n}=e;let a=n.get(t.type);return a||(a=Object.create(null),n.set(t.type,a)),a}function hr(e,t,n,a){const{appear:r,mode:o,persisted:s=!1,onBeforeEnter:c,onEnter:u,onAfterEnter:f,onEnterCancelled:h,onBeforeLeave:d,onLeave:m,onAfterLeave:I,onLeaveCancelled:A,onBeforeAppear:b,onAppear:E,onAfterAppear:j,onAppearCancelled:M}=t,g=String(e.key),y=Hd(n,e),C=(N,Y)=>{N&&yn(N,a,9,Y)},v=(N,Y)=>{const X=Y[1];C(N,Y),ke(N)?N.every(_e=>_e.length<=1)&&X():N.length<=1&&X()},D={mode:o,persisted:s,beforeEnter(N){let Y=c;if(!n.isMounted)if(r)Y=b||c;else return;N[ia]&&N[ia](!0);const X=y[g];X&&$n(e,X)&&X.el[ia]&&X.el[ia](),C(Y,[N])},enter(N){let Y=u,X=f,_e=h;if(!n.isMounted)if(r)Y=E||u,X=j||f,_e=M||h;else return;let ie=!1;const G=N[Lo]=fe=>{ie||(ie=!0,fe?C(_e,[N]):C(X,[N]),D.delayedLeave&&D.delayedLeave(),N[Lo]=void 0)};Y?v(Y,[N,G]):G()},leave(N,Y){const X=String(e.key);if(N[Lo]&&N[Lo](!0),n.isUnmounting)return Y();C(d,[N]);let _e=!1;const ie=N[ia]=G=>{_e||(_e=!0,Y(),G?C(A,[N]):C(I,[N]),N[ia]=void 0,y[X]===e&&delete y[X])};y[X]=e,m?v(m,[N,ie]):ie()},clone(N){return hr(N,t,n,a)}};return D}function ci(e){if(ao(e))return e=Fn(e),e.children=null,e}function nu(e){return ao(e)?e.children?e.children[0]:void 0:e}function Ra(e,t){e.shapeFlag&6&&e.component?Ra(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 gs(e,t=!1,n){let a=[],r=0;for(let o=0;o<e.length;o++){let s=e[o];const c=n==null?s.key:String(n)+String(s.key!=null?s.key:o);s.type===xe?(s.patchFlag&128&&r++,a=a.concat(gs(s.children,t,c))):(t||s.type!==qt)&&a.push(c!=null?Fn(s,{key:c}):s)}if(r>1)for(let o=0;o<a.length;o++)a[o].patchFlag=-2;return a}/*! #__NO_SIDE_EFFECTS__ */function me(e,t){return Ve(e)?yt({name:e.name},t,{setup:e}):e}const Oa=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function by(e){Ve(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:a,delay:r=200,timeout:o,suspensible:s=!0,onError:c}=e;let u=null,f,h=0;const d=()=>(h++,u=null,m()),m=()=>{let I;return u||(I=u=t().catch(A=>{if(A=A instanceof Error?A:new Error(String(A)),c)return new Promise((b,E)=>{c(A,()=>b(d()),()=>E(A),h+1)});throw A}).then(A=>I!==u&&u?u:(A&&(A.__esModule||A[Symbol.toStringTag]==="Module")&&(A=A.default),f=A,A)))};return me({name:"AsyncComponentWrapper",__asyncLoader:m,get __asyncResolved(){return f},setup(){const I=Lt;if(f)return()=>ui(f,I);const A=M=>{u=null,ja(M,I,13,!a)};if(s&&I.suspense||ro)return m().then(M=>()=>ui(M,I)).catch(M=>(A(M),()=>a?Fe(a,{error:M}):null));const b=ee(!1),E=ee(),j=ee(!!r);return r&&setTimeout(()=>{j.value=!1},r),o!=null&&setTimeout(()=>{if(!b.value&&!E.value){const M=new Error(`Async component timed out after ${o}ms.`);A(M),E.value=M}},o),m().then(()=>{b.value=!0,I.parent&&ao(I.parent.vnode)&&(I.parent.effect.dirty=!0,hs(I.parent.update))}).catch(M=>{A(M),E.value=M}),()=>{if(b.value&&f)return ui(f,I);if(E.value&&a)return Fe(a,{error:E.value});if(n&&!j.value)return Fe(n)}}})}function ui(e,t){const{ref:n,props:a,children:r,ce:o}=t.vnode,s=Fe(e,a,r);return s.ref=n,s.ce=o,delete t.vnode.ce,s}const ao=e=>e.type.__isKeepAlive,Ay={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Qn(),a=n.ctx;if(!a.renderer)return()=>{const M=t.default&&t.default();return M&&M.length===1?M[0]:M};const r=new Map,o=new Set;let s=null;const c=n.suspense,{renderer:{p:u,m:f,um:h,o:{createElement:d}}}=a,m=d("div");a.activate=(M,g,y,C,v)=>{const D=M.component;f(M,g,y,0,c),u(D.vnode,M,g,y,D,c,C,M.slotScopeIds,v),Kt(()=>{D.isDeactivated=!1,D.a&&ir(D.a);const N=M.props&&M.props.onVnodeMounted;N&&ln(N,D.parent,M)},c)},a.deactivate=M=>{const g=M.component;f(M,m,null,1,c),Kt(()=>{g.da&&ir(g.da);const y=M.props&&M.props.onVnodeUnmounted;y&&ln(y,g.parent,M),g.isDeactivated=!0},c)};function I(M){di(M),h(M,n,c,!0)}function A(M){r.forEach((g,y)=>{const C=ji(g.type);C&&(!M||!M(C))&&b(y)})}function b(M){const g=r.get(M);!s||!$n(g,s)?I(g):s&&di(s),r.delete(M),o.delete(M)}Ne(()=>[e.include,e.exclude],([M,g])=>{M&&A(y=>Rr(M,y)),g&&A(y=>!Rr(g,y))},{flush:"post",deep:!0});let E=null;const j=()=>{E!=null&&r.set(E,fi(n.subTree))};return Wt(j),_s(j),Ka(()=>{r.forEach(M=>{const{subTree:g,suspense:y}=n,C=fi(g);if(M.type===C.type&&M.key===C.key){di(C);const v=C.component.da;v&&Kt(v,y);return}I(M)})}),()=>{if(E=null,!t.default)return null;const M=t.default(),g=M[0];if(M.length>1)return s=null,M;if(!pa(g)||!(g.shapeFlag&4)&&!(g.shapeFlag&128))return s=null,g;let y=fi(g);const C=y.type,v=ji(Oa(y)?y.type.__asyncResolved||{}:C),{include:D,exclude:N,max:Y}=e;if(D&&(!v||!Rr(D,v))||N&&v&&Rr(N,v))return s=y,g;const X=y.key==null?C:y.key,_e=r.get(X);return y.el&&(y=Fn(y),g.shapeFlag&128&&(g.ssContent=y)),E=X,_e?(y.el=_e.el,y.component=_e.component,y.transition&&Ra(y,y.transition),y.shapeFlag|=512,o.delete(X),o.add(X)):(o.add(X),Y&&o.size>parseInt(Y,10)&&b(o.values().next().value)),y.shapeFlag|=256,s=y,Ld(g.type)?g:y}}},wy=Ay;function Rr(e,t){return ke(e)?e.some(n=>Rr(n,t)):_t(e)?e.split(",").includes(t):eg(e)?e.test(t):!1}function jd(e,t){zd(e,"a",t)}function Kd(e,t){zd(e,"da",t)}function zd(e,t,n=Lt){const a=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(ys(t,a,n),n){let r=n.parent;for(;r&&r.parent;)ao(r.parent.vnode)&&Cy(a,t,n,r),r=r.parent}}function Cy(e,t,n,a){const r=ys(t,e,a,!0);za(()=>{Qi(a[t],r)},n)}function di(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function fi(e){return e.shapeFlag&128?e.ssContent:e}function ys(e,t,n=Lt,a=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...s)=>{if(n.isUnmounted)return;Ua();const c=Va(n),u=yn(t,n,e,s);return c(),Ha(),u});return a?r.unshift(o):r.push(o),o}}const Jn=e=>(t,n=Lt)=>(!ro||e==="sp")&&ys(e,(...a)=>t(...a),n),yr=Jn("bm"),Wt=Jn("m"),Wd=Jn("bu"),_s=Jn("u"),Ka=Jn("bum"),za=Jn("um"),Gd=Jn("sp"),Yd=Jn("rtg"),Jd=Jn("rtc");function Qd(e,t=Lt){ys("ec",e,t)}function St(e,t,n,a){let r;const o=n&&n[a];if(ke(e)||_t(e)){r=new Array(e.length);for(let s=0,c=e.length;s<c;s++)r[s]=t(e[s],s,void 0,o&&o[s])}else if(typeof e=="number"){r=new Array(e);for(let s=0;s<e;s++)r[s]=t(s+1,s,void 0,o&&o[s])}else if(dt(e))if(e[Symbol.iterator])r=Array.from(e,(s,c)=>t(s,c,void 0,o&&o[c]));else{const s=Object.keys(e);r=new Array(s.length);for(let c=0,u=s.length;c<u;c++){const f=s[c];r[c]=t(e[f],f,c,o&&o[c])}}else r=[];return n&&(n[a]=r),r}function Iy(e,t){for(let n=0;n<t.length;n++){const a=t[n];if(ke(a))for(let r=0;r<a.length;r++)e[a[r].name]=a[r].fn;else a&&(e[a.name]=a.key?(...r)=>{const o=a.fn(...r);return o&&(o.key=a.key),o}:a.fn)}return e}function bt(e,t,n={},a,r){if($t.isCE||$t.parent&&Oa($t.parent)&&$t.parent.isCE)return t!=="default"&&(n.name=t),Fe("slot",n,a&&a());let o=e[t];o&&o._c&&(o._d=!1),T();const s=o&&qd(o(n)),c=De(xe,{key:n.key||s&&s.key||`_${t}`},s||(a?a():[]),s&&e._===1?64:-2);return!r&&c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),o&&o._c&&(o._d=!0),c}function qd(e){return e.some(t=>pa(t)?!(t.type===qt||t.type===xe&&!qd(t.children)):!0)?e:null}function Ty(e,t){const n={};for(const a in e)n[t&&/[A-Z]/.test(a)?`on:${a}`:Vr(a)]=e[a];return n}const Ni=e=>e?bf(e)?As(e)||e.proxy:Ni(e.parent):null,Br=yt(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=>Ni(e.parent),$root:e=>Ni(e.root),$emit:e=>e.emit,$options:e=>bl(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,hs(e.update)}),$nextTick:e=>e.n||(e.n=Mn.bind(e.proxy)),$watch:e=>yy.bind(e)}),pi=(e,t)=>e!==lt&&!e.__isScriptSetup&&et(e,t),Oi={get({_:e},t){const{ctx:n,setupState:a,data:r,props:o,accessCache:s,type:c,appContext:u}=e;let f;if(t[0]!=="$"){const I=s[t];if(I!==void 0)switch(I){case 1:return a[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(pi(a,t))return s[t]=1,a[t];if(r!==lt&&et(r,t))return s[t]=2,r[t];if((f=e.propsOptions[0])&&et(f,t))return s[t]=3,o[t];if(n!==lt&&et(n,t))return s[t]=4,n[t];Li&&(s[t]=0)}}const h=Br[t];let d,m;if(h)return t==="$attrs"&&dn(e,"get",t),h(e);if((d=c.__cssModules)&&(d=d[t]))return d;if(n!==lt&&et(n,t))return s[t]=4,n[t];if(m=u.config.globalProperties,et(m,t))return m[t]},set({_:e},t,n){const{data:a,setupState:r,ctx:o}=e;return pi(r,t)?(r[t]=n,!0):a!==lt&&et(a,t)?(a[t]=n,!0):et(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:a,appContext:r,propsOptions:o}},s){let c;return!!n[s]||e!==lt&&et(e,s)||pi(t,s)||(c=o[0])&&et(c,s)||et(a,s)||et(Br,s)||et(r.config.globalProperties,s)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:et(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},Sy=yt({},Oi,{get(e,t){if(t!==Symbol.unscopables)return Oi.get(e,t,e)},has(e,t){return t[0]!=="_"&&!og(t)}});function ky(){return null}function Ey(){return null}function xy(e){}function $y(e){}function My(){return null}function Ny(){}function Oy(e,t){return null}function Ly(){return Xd().slots}function Py(){return Xd().attrs}function Xd(){const e=Qn();return e.setupContext||(e.setupContext=Cf(e))}function Xr(e){return ke(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Ry(e,t){const n=Xr(e);for(const a in t){if(a.startsWith("__skip"))continue;let r=n[a];r?ke(r)||Ve(r)?r=n[a]={type:r,default:t[a]}:r.default=t[a]:r===null&&(r=n[a]={default:t[a]}),r&&t[`__skip_${a}`]&&(r.skipFactory=!0)}return n}function _l(e,t){return!e||!t?e||t:ke(e)&&ke(t)?e.concat(t):yt({},Xr(e),Xr(t))}function Fy(e,t){const n={};for(const a in e)t.includes(a)||Object.defineProperty(n,a,{enumerable:!0,get:()=>e[a]});return n}function Dy(e){const t=Qn();let n=e();return Bi(),qi(n)&&(n=n.catch(a=>{throw Va(t),a})),[n,()=>Va(t)]}let Li=!0;function Vy(e){const t=bl(e),n=e.proxy,a=e.ctx;Li=!1,t.beforeCreate&&au(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:s,watch:c,provide:u,inject:f,created:h,beforeMount:d,mounted:m,beforeUpdate:I,updated:A,activated:b,deactivated:E,beforeDestroy:j,beforeUnmount:M,destroyed:g,unmounted:y,render:C,renderTracked:v,renderTriggered:D,errorCaptured:N,serverPrefetch:Y,expose:X,inheritAttrs:_e,components:ie,directives:G,filters:fe}=t;if(f&&By(f,a,null),s)for(const oe in s){const ne=s[oe];Ve(ne)&&(a[oe]=ne.bind(n))}if(r){const oe=r.call(n,n);dt(oe)&&(e.data=ds(oe))}if(Li=!0,o)for(const oe in o){const ne=o[oe],be=Ve(ne)?ne.bind(n,n):Ve(ne.get)?ne.get.bind(n,n):cn,wt=!Ve(ne)&&Ve(ne.set)?ne.set.bind(n):cn,He=te({get:be,set:wt});Object.defineProperty(a,oe,{enumerable:!0,configurable:!0,get:()=>He.value,set:gt=>He.value=gt})}if(c)for(const oe in c)Zd(c[oe],a,n,oe);if(u){const oe=Ve(u)?u.call(n):u;Reflect.ownKeys(oe).forEach(ne=>{tf(ne,oe[ne])})}h&&au(h,e,"c");function re(oe,ne){ke(ne)?ne.forEach(be=>oe(be.bind(n))):ne&&oe(ne.bind(n))}if(re(yr,d),re(Wt,m),re(Wd,I),re(_s,A),re(jd,b),re(Kd,E),re(Qd,N),re(Jd,v),re(Yd,D),re(Ka,M),re(za,y),re(Gd,Y),ke(X))if(X.length){const oe=e.exposed||(e.exposed={});X.forEach(ne=>{Object.defineProperty(oe,ne,{get:()=>n[ne],set:be=>n[ne]=be})})}else e.exposed||(e.exposed={});C&&e.render===cn&&(e.render=C),_e!=null&&(e.inheritAttrs=_e),ie&&(e.components=ie),G&&(e.directives=G)}function By(e,t,n=cn){ke(e)&&(e=Pi(e));for(const a in e){const r=e[a];let o;dt(r)?"default"in r?o=K(r.from||a,r.default,!0):o=K(r.from||a):o=K(r),Vt(o)?Object.defineProperty(t,a,{enumerable:!0,configurable:!0,get:()=>o.value,set:s=>o.value=s}):t[a]=o}}function au(e,t,n){yn(ke(e)?e.map(a=>a.bind(t.proxy)):e.bind(t.proxy),t,n)}function Zd(e,t,n,a){const r=a.includes(".")?Bd(n,a):()=>n[a];if(_t(e)){const o=t[e];Ve(o)&&Ne(r,o)}else if(Ve(e))Ne(r,e.bind(n));else if(dt(e))if(ke(e))e.forEach(o=>Zd(o,t,n,a));else{const o=Ve(e.handler)?e.handler.bind(n):t[e.handler];Ve(o)&&Ne(r,o,e)}}function bl(e){const t=e.type,{mixins:n,extends:a}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:s}}=e.appContext,c=o.get(t);let u;return c?u=c:!r.length&&!n&&!a?u=t:(u={},r.length&&r.forEach(f=>Zo(u,f,s,!0)),Zo(u,t,s)),dt(t)&&o.set(t,u),u}function Zo(e,t,n,a=!1){const{mixins:r,extends:o}=t;o&&Zo(e,o,n,!0),r&&r.forEach(s=>Zo(e,s,n,!0));for(const s in t)if(!(a&&s==="expose")){const c=Uy[s]||n&&n[s];e[s]=c?c(e[s],t[s]):t[s]}return e}const Uy={data:ru,props:ou,emits:ou,methods:Fr,computed:Fr,beforeCreate:en,created:en,beforeMount:en,mounted:en,beforeUpdate:en,updated:en,beforeDestroy:en,beforeUnmount:en,destroyed:en,unmounted:en,activated:en,deactivated:en,errorCaptured:en,serverPrefetch:en,components:Fr,directives:Fr,watch:jy,provide:ru,inject:Hy};function ru(e,t){return t?e?function(){return yt(Ve(e)?e.call(this,this):e,Ve(t)?t.call(this,this):t)}:t:e}function Hy(e,t){return Fr(Pi(e),Pi(t))}function Pi(e){if(ke(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function en(e,t){return e?[...new Set([].concat(e,t))]:t}function Fr(e,t){return e?yt(Object.create(null),e,t):t}function ou(e,t){return e?ke(e)&&ke(t)?[...new Set([...e,...t])]:yt(Object.create(null),Xr(e),Xr(t??{})):t}function jy(e,t){if(!e)return t;if(!t)return e;const n=yt(Object.create(null),e);for(const a in t)n[a]=en(e[a],t[a]);return n}function ef(){return{app:null,config:{isNativeTag:Xm,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 Ky=0;function zy(e,t){return function(a,r=null){Ve(a)||(a=yt({},a)),r!=null&&!dt(r)&&(r=null);const o=ef(),s=new WeakSet;let c=!1;const u=o.app={_uid:Ky++,_component:a,_props:r,_container:null,_context:o,_instance:null,version:Tf,get config(){return o.config},set config(f){},use(f,...h){return s.has(f)||(f&&Ve(f.install)?(s.add(f),f.install(u,...h)):Ve(f)&&(s.add(f),f(u,...h))),u},mixin(f){return o.mixins.includes(f)||o.mixins.push(f),u},component(f,h){return h?(o.components[f]=h,u):o.components[f]},directive(f,h){return h?(o.directives[f]=h,u):o.directives[f]},mount(f,h,d){if(!c){const m=Fe(a,r);return m.appContext=o,d===!0?d="svg":d===!1&&(d=void 0),h&&t?t(m,f):e(m,f,d),c=!0,u._container=f,f.__vue_app__=u,As(m.component)||m.component.proxy}},unmount(){c&&(e(null,u._container),delete u._container.__vue_app__)},provide(f,h){return o.provides[f]=h,u},runWithContext(f){const h=dr;dr=u;try{return f()}finally{dr=h}}};return u}}let dr=null;function tf(e,t){if(Lt){let n=Lt.provides;const a=Lt.parent&&Lt.parent.provides;a===n&&(n=Lt.provides=Object.create(a)),n[e]=t}}function K(e,t,n=!1){const a=Lt||$t;if(a||dr){const r=a?a.parent==null?a.vnode.appContext&&a.vnode.appContext.provides:a.parent.provides:dr._context.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&Ve(t)?t.call(a&&a.proxy):t}}function Wy(){return!!(Lt||$t||dr)}function Gy(e,t,n,a=!1){const r={},o={};Yo(o,bs,1),e.propsDefaults=Object.create(null),nf(e,t,r,o);for(const s in e.propsOptions[0])s in r||(r[s]=void 0);n?e.props=a?r:wd(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function Yy(e,t,n,a){const{props:r,attrs:o,vnode:{patchFlag:s}}=e,c=Qe(r),[u]=e.propsOptions;let f=!1;if((a||s>0)&&!(s&16)){if(s&8){const h=e.vnode.dynamicProps;for(let d=0;d<h.length;d++){let m=h[d];if(vs(e.emitsOptions,m))continue;const I=t[m];if(u)if(et(o,m))I!==o[m]&&(o[m]=I,f=!0);else{const A=nn(m);r[A]=Ri(u,c,A,I,e,!1)}else I!==o[m]&&(o[m]=I,f=!0)}}}else{nf(e,t,r,o)&&(f=!0);let h;for(const d in c)(!t||!et(t,d)&&((h=gn(d))===d||!et(t,h)))&&(u?n&&(n[d]!==void 0||n[h]!==void 0)&&(r[d]=Ri(u,c,d,void 0,e,!0)):delete r[d]);if(o!==c)for(const d in o)(!t||!et(t,d))&&(delete o[d],f=!0)}f&&Gn(e,"set","$attrs")}function nf(e,t,n,a){const[r,o]=e.propsOptions;let s=!1,c;if(t)for(let u in t){if(sr(u))continue;const f=t[u];let h;r&&et(r,h=nn(u))?!o||!o.includes(h)?n[h]=f:(c||(c={}))[h]=f:vs(e.emitsOptions,u)||(!(u in a)||f!==a[u])&&(a[u]=f,s=!0)}if(o){const u=Qe(n),f=c||lt;for(let h=0;h<o.length;h++){const d=o[h];n[d]=Ri(r,u,d,f[d],e,!et(f,d))}}return s}function Ri(e,t,n,a,r,o){const s=e[n];if(s!=null){const c=et(s,"default");if(c&&a===void 0){const u=s.default;if(s.type!==Function&&!s.skipFactory&&Ve(u)){const{propsDefaults:f}=r;if(n in f)a=f[n];else{const h=Va(r);a=f[n]=u.call(null,t),h()}}else a=u}s[0]&&(o&&!c?a=!1:s[1]&&(a===""||a===gn(n))&&(a=!0))}return a}function af(e,t,n=!1){const a=t.propsCache,r=a.get(e);if(r)return r;const o=e.props,s={},c=[];let u=!1;if(!Ve(e)){const h=d=>{u=!0;const[m,I]=af(d,t,!0);yt(s,m),I&&c.push(...I)};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!o&&!u)return dt(e)&&a.set(e,rr),rr;if(ke(o))for(let h=0;h<o.length;h++){const d=nn(o[h]);su(d)&&(s[d]=lt)}else if(o)for(const h in o){const d=nn(h);if(su(d)){const m=o[h],I=s[d]=ke(m)||Ve(m)?{type:m}:yt({},m);if(I){const A=cu(Boolean,I.type),b=cu(String,I.type);I[0]=A>-1,I[1]=b<0||A<b,(A>-1||et(I,"default"))&&c.push(d)}}}const f=[s,c];return dt(e)&&a.set(e,f),f}function su(e){return e[0]!=="$"&&!sr(e)}function iu(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function lu(e,t){return iu(e)===iu(t)}function cu(e,t){return ke(t)?t.findIndex(n=>lu(n,e)):Ve(t)&&lu(t,e)?0:-1}const rf=e=>e[0]==="_"||e==="$stable",Al=e=>ke(e)?e.map(mn):[mn(e)],Jy=(e,t,n)=>{if(t._n)return t;const a=Be((...r)=>Al(t(...r)),n);return a._c=!1,a},of=(e,t,n)=>{const a=e._ctx;for(const r in e){if(rf(r))continue;const o=e[r];if(Ve(o))t[r]=Jy(r,o,a);else if(o!=null){const s=Al(o);t[r]=()=>s}}},sf=(e,t)=>{const n=Al(t);e.slots.default=()=>n},Qy=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=Qe(t),Yo(t,"_",n)):of(t,e.slots={})}else e.slots={},t&&sf(e,t);Yo(e.slots,bs,1)},qy=(e,t,n)=>{const{vnode:a,slots:r}=e;let o=!0,s=lt;if(a.shapeFlag&32){const c=t._;c?n&&c===1?o=!1:(yt(r,t),!n&&c===1&&delete r._):(o=!t.$stable,of(t,r)),s=t}else t&&(sf(e,t),s={default:1});if(o)for(const c in r)!rf(c)&&s[c]==null&&delete r[c]};function es(e,t,n,a,r=!1){if(ke(e)){e.forEach((m,I)=>es(m,t&&(ke(t)?t[I]:t),n,a,r));return}if(Oa(a)&&!r)return;const o=a.shapeFlag&4?As(a.component)||a.component.proxy:a.el,s=r?null:o,{i:c,r:u}=e,f=t&&t.r,h=c.refs===lt?c.refs={}:c.refs,d=c.setupState;if(f!=null&&f!==u&&(_t(f)?(h[f]=null,et(d,f)&&(d[f]=null)):Vt(f)&&(f.value=null)),Ve(u))Yn(u,c,12,[s,h]);else{const m=_t(u),I=Vt(u);if(m||I){const A=()=>{if(e.f){const b=m?et(d,u)?d[u]:h[u]:u.value;r?ke(b)&&Qi(b,o):ke(b)?b.includes(o)||b.push(o):m?(h[u]=[o],et(d,u)&&(d[u]=h[u])):(u.value=[o],e.k&&(h[e.k]=u.value))}else m?(h[u]=s,et(d,u)&&(d[u]=s)):I&&(u.value=s,e.k&&(h[e.k]=s))};s?(A.id=-1,Kt(A,n)):A()}}}let aa=!1;const Xy=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Zy=e=>e.namespaceURI.includes("MathML"),Po=e=>{if(Xy(e))return"svg";if(Zy(e))return"mathml"},Ro=e=>e.nodeType===8;function e_(e){const{mt:t,p:n,o:{patchProp:a,createText:r,nextSibling:o,parentNode:s,remove:c,insert:u,createComment:f}}=e,h=(g,y)=>{if(!y.hasChildNodes()){n(null,g,y),Xo(),y._vnode=g;return}aa=!1,d(y.firstChild,g,null,null,null),Xo(),y._vnode=g,aa&&console.error("Hydration completed but contains mismatches.")},d=(g,y,C,v,D,N=!1)=>{const Y=Ro(g)&&g.data==="[",X=()=>b(g,y,C,v,D,Y),{type:_e,ref:ie,shapeFlag:G,patchFlag:fe}=y;let we=g.nodeType;y.el=g,fe===-2&&(N=!1,y.dynamicChildren=null);let re=null;switch(_e){case Fa:we!==3?y.children===""?(u(y.el=r(""),s(g),g),re=g):re=X():(g.data!==y.children&&(aa=!0,g.data=y.children),re=o(g));break;case qt:M(g)?(re=o(g),j(y.el=g.content.firstChild,g,C)):we!==8||Y?re=X():re=o(g);break;case La:if(Y&&(g=o(g),we=g.nodeType),we===1||we===3){re=g;const oe=!y.children.length;for(let ne=0;ne<y.staticCount;ne++)oe&&(y.children+=re.nodeType===1?re.outerHTML:re.data),ne===y.staticCount-1&&(y.anchor=re),re=o(re);return Y?o(re):re}else X();break;case xe:Y?re=A(g,y,C,v,D,N):re=X();break;default:if(G&1)(we!==1||y.type.toLowerCase()!==g.tagName.toLowerCase())&&!M(g)?re=X():re=m(g,y,C,v,D,N);else if(G&6){y.slotScopeIds=D;const oe=s(g);if(Y?re=E(g):Ro(g)&&g.data==="teleport start"?re=E(g,g.data,"teleport end"):re=o(g),t(y,oe,null,C,v,Po(oe),N),Oa(y)){let ne;Y?(ne=Fe(xe),ne.anchor=re?re.previousSibling:oe.lastChild):ne=g.nodeType===3?pt(""):Fe("div"),ne.el=g,y.component.subTree=ne}}else G&64?we!==8?re=X():re=y.type.hydrate(g,y,C,v,D,N,e,I):G&128&&(re=y.type.hydrate(g,y,C,v,Po(s(g)),D,N,e,d))}return ie!=null&&es(ie,null,v,y),re},m=(g,y,C,v,D,N)=>{N=N||!!y.dynamicChildren;const{type:Y,props:X,patchFlag:_e,shapeFlag:ie,dirs:G,transition:fe}=y,we=Y==="input"||Y==="option";if(we||_e!==-1){G&&Pn(y,null,C,"created");let re=!1;if(M(g)){re=df(v,fe)&&C&&C.vnode.props&&C.vnode.props.appear;const ne=g.content.firstChild;re&&fe.beforeEnter(ne),j(ne,g,C),y.el=g=ne}if(ie&16&&!(X&&(X.innerHTML||X.textContent))){let ne=I(g.firstChild,y,g,C,v,D,N);for(;ne;){aa=!0;const be=ne;ne=ne.nextSibling,c(be)}}else ie&8&&g.textContent!==y.children&&(aa=!0,g.textContent=y.children);if(X)if(we||!N||_e&48)for(const ne in X)(we&&(ne.endsWith("value")||ne==="indeterminate")||eo(ne)&&!sr(ne)||ne[0]===".")&&a(g,ne,null,X[ne],void 0,void 0,C);else X.onClick&&a(g,"onClick",null,X.onClick,void 0,void 0,C);let oe;(oe=X&&X.onVnodeBeforeMount)&&ln(oe,C,y),G&&Pn(y,null,C,"beforeMount"),((oe=X&&X.onVnodeMounted)||G||re)&&Pd(()=>{oe&&ln(oe,C,y),re&&fe.enter(g),G&&Pn(y,null,C,"mounted")},v)}return g.nextSibling},I=(g,y,C,v,D,N,Y)=>{Y=Y||!!y.dynamicChildren;const X=y.children,_e=X.length;for(let ie=0;ie<_e;ie++){const G=Y?X[ie]:X[ie]=mn(X[ie]);if(g)g=d(g,G,v,D,N,Y);else{if(G.type===Fa&&!G.children)continue;aa=!0,n(null,G,C,null,v,D,Po(C),N)}}return g},A=(g,y,C,v,D,N)=>{const{slotScopeIds:Y}=y;Y&&(D=D?D.concat(Y):Y);const X=s(g),_e=I(o(g),y,X,C,v,D,N);return _e&&Ro(_e)&&_e.data==="]"?o(y.anchor=_e):(aa=!0,u(y.anchor=f("]"),X,_e),_e)},b=(g,y,C,v,D,N)=>{if(aa=!0,y.el=null,N){const _e=E(g);for(;;){const ie=o(g);if(ie&&ie!==_e)c(ie);else break}}const Y=o(g),X=s(g);return c(g),n(null,y,X,Y,C,v,Po(X),D),Y},E=(g,y="[",C="]")=>{let v=0;for(;g;)if(g=o(g),g&&Ro(g)&&(g.data===y&&v++,g.data===C)){if(v===0)return o(g);v--}return g},j=(g,y,C)=>{const v=y.parentNode;v&&v.replaceChild(g,y);let D=C;for(;D;)D.vnode.el===y&&(D.vnode.el=D.subTree.el=g),D=D.parent},M=g=>g.nodeType===1&&g.tagName.toLowerCase()==="template";return[h,d]}const Kt=Pd;function lf(e){return uf(e)}function cf(e){return uf(e,e_)}function uf(e,t){const n=rd();n.__VUE__=!0;const{insert:a,remove:r,patchProp:o,createElement:s,createText:c,createComment:u,setText:f,setElementText:h,parentNode:d,nextSibling:m,setScopeId:I=cn,insertStaticContent:A}=e,b=(S,w,R,V=null,z=null,J=null,ae=void 0,q=null,ce=!!w.dynamicChildren)=>{if(S===w)return;S&&!$n(S,w)&&(V=ft(S),gt(S,z,J,!0),S=null),w.patchFlag===-2&&(ce=!1,w.dynamicChildren=null);const{type:Z,ref:pe,shapeFlag:Me}=w;switch(Z){case Fa:E(S,w,R,V);break;case qt:j(S,w,R,V);break;case La:S==null&&M(w,R,V,ae);break;case xe:ie(S,w,R,V,z,J,ae,q,ce);break;default:Me&1?C(S,w,R,V,z,J,ae,q,ce):Me&6?G(S,w,R,V,z,J,ae,q,ce):(Me&64||Me&128)&&Z.process(S,w,R,V,z,J,ae,q,ce,It)}pe!=null&&z&&es(pe,S&&S.ref,J,w||S,!w)},E=(S,w,R,V)=>{if(S==null)a(w.el=c(w.children),R,V);else{const z=w.el=S.el;w.children!==S.children&&f(z,w.children)}},j=(S,w,R,V)=>{S==null?a(w.el=u(w.children||""),R,V):w.el=S.el},M=(S,w,R,V)=>{[S.el,S.anchor]=A(S.children,w,R,V,S.el,S.anchor)},g=({el:S,anchor:w},R,V)=>{let z;for(;S&&S!==w;)z=m(S),a(S,R,V),S=z;a(w,R,V)},y=({el:S,anchor:w})=>{let R;for(;S&&S!==w;)R=m(S),r(S),S=R;r(w)},C=(S,w,R,V,z,J,ae,q,ce)=>{w.type==="svg"?ae="svg":w.type==="math"&&(ae="mathml"),S==null?v(w,R,V,z,J,ae,q,ce):Y(S,w,z,J,ae,q,ce)},v=(S,w,R,V,z,J,ae,q)=>{let ce,Z;const{props:pe,shapeFlag:Me,transition:Ee,dirs:Re}=S;if(ce=S.el=s(S.type,J,pe&&pe.is,pe),Me&8?h(ce,S.children):Me&16&&N(S.children,ce,null,V,z,hi(S,J),ae,q),Re&&Pn(S,null,V,"created"),D(ce,S,S.scopeId,ae,V),pe){for(const qe in pe)qe!=="value"&&!sr(qe)&&o(ce,qe,null,pe[qe],J,S.children,V,z,Ue);"value"in pe&&o(ce,"value",null,pe.value,J),(Z=pe.onVnodeBeforeMount)&&ln(Z,V,S)}Re&&Pn(S,null,V,"beforeMount");const je=df(z,Ee);je&&Ee.beforeEnter(ce),a(ce,w,R),((Z=pe&&pe.onVnodeMounted)||je||Re)&&Kt(()=>{Z&&ln(Z,V,S),je&&Ee.enter(ce),Re&&Pn(S,null,V,"mounted")},z)},D=(S,w,R,V,z)=>{if(R&&I(S,R),V)for(let J=0;J<V.length;J++)I(S,V[J]);if(z){let J=z.subTree;if(w===J){const ae=z.vnode;D(S,ae,ae.scopeId,ae.slotScopeIds,z.parent)}}},N=(S,w,R,V,z,J,ae,q,ce=0)=>{for(let Z=ce;Z<S.length;Z++){const pe=S[Z]=q?la(S[Z]):mn(S[Z]);b(null,pe,w,R,V,z,J,ae,q)}},Y=(S,w,R,V,z,J,ae)=>{const q=w.el=S.el;let{patchFlag:ce,dynamicChildren:Z,dirs:pe}=w;ce|=S.patchFlag&16;const Me=S.props||lt,Ee=w.props||lt;let Re;if(R&&Ta(R,!1),(Re=Ee.onVnodeBeforeUpdate)&&ln(Re,R,w,S),pe&&Pn(w,S,R,"beforeUpdate"),R&&Ta(R,!0),Z?X(S.dynamicChildren,Z,q,R,V,hi(w,z),J):ae||ne(S,w,q,null,R,V,hi(w,z),J,!1),ce>0){if(ce&16)_e(q,w,Me,Ee,R,V,z);else if(ce&2&&Me.class!==Ee.class&&o(q,"class",null,Ee.class,z),ce&4&&o(q,"style",Me.style,Ee.style,z),ce&8){const je=w.dynamicProps;for(let qe=0;qe<je.length;qe++){const tt=je[qe],vt=Me[tt],Tt=Ee[tt];(Tt!==vt||tt==="value")&&o(q,tt,vt,Tt,z,S.children,R,V,Ue)}}ce&1&&S.children!==w.children&&h(q,w.children)}else!ae&&Z==null&&_e(q,w,Me,Ee,R,V,z);((Re=Ee.onVnodeUpdated)||pe)&&Kt(()=>{Re&&ln(Re,R,w,S),pe&&Pn(w,S,R,"updated")},V)},X=(S,w,R,V,z,J,ae)=>{for(let q=0;q<w.length;q++){const ce=S[q],Z=w[q],pe=ce.el&&(ce.type===xe||!$n(ce,Z)||ce.shapeFlag&70)?d(ce.el):R;b(ce,Z,pe,null,V,z,J,ae,!0)}},_e=(S,w,R,V,z,J,ae)=>{if(R!==V){if(R!==lt)for(const q in R)!sr(q)&&!(q in V)&&o(S,q,R[q],null,ae,w.children,z,J,Ue);for(const q in V){if(sr(q))continue;const ce=V[q],Z=R[q];ce!==Z&&q!=="value"&&o(S,q,Z,ce,ae,w.children,z,J,Ue)}"value"in V&&o(S,"value",R.value,V.value,ae)}},ie=(S,w,R,V,z,J,ae,q,ce)=>{const Z=w.el=S?S.el:c(""),pe=w.anchor=S?S.anchor:c("");let{patchFlag:Me,dynamicChildren:Ee,slotScopeIds:Re}=w;Re&&(q=q?q.concat(Re):Re),S==null?(a(Z,R,V),a(pe,R,V),N(w.children||[],R,pe,z,J,ae,q,ce)):Me>0&&Me&64&&Ee&&S.dynamicChildren?(X(S.dynamicChildren,Ee,R,z,J,ae,q),(w.key!=null||z&&w===z.subTree)&&wl(S,w,!0)):ne(S,w,R,pe,z,J,ae,q,ce)},G=(S,w,R,V,z,J,ae,q,ce)=>{w.slotScopeIds=q,S==null?w.shapeFlag&512?z.ctx.activate(w,R,V,ae,ce):fe(w,R,V,z,J,ae,ce):we(S,w,ce)},fe=(S,w,R,V,z,J,ae)=>{const q=S.component=_f(S,V,z);if(ao(S)&&(q.ctx.renderer=It),Af(q),q.asyncDep){if(z&&z.registerDep(q,re),!S.el){const ce=q.subTree=Fe(qt);j(null,ce,w,R)}}else re(q,S,w,R,z,J,ae)},we=(S,w,R)=>{const V=w.component=S.component;if(iy(S,w,R))if(V.asyncDep&&!V.asyncResolved){oe(V,w,R);return}else V.next=w,ey(V.update),V.effect.dirty=!0,V.update();else w.el=S.el,V.vnode=w},re=(S,w,R,V,z,J,ae)=>{const q=()=>{if(S.isMounted){let{next:pe,bu:Me,u:Ee,parent:Re,vnode:je}=S;{const Xt=ff(S);if(Xt){pe&&(pe.el=je.el,oe(S,pe,ae)),Xt.asyncDep.then(()=>{S.isUnmounted||q()});return}}let qe=pe,tt;Ta(S,!1),pe?(pe.el=je.el,oe(S,pe,ae)):pe=je,Me&&ir(Me),(tt=pe.props&&pe.props.onVnodeBeforeUpdate)&&ln(tt,Re,pe,je),Ta(S,!0);const vt=Ko(S),Tt=S.subTree;S.subTree=vt,b(Tt,vt,d(Tt.el),ft(Tt),S,z,J),pe.el=vt.el,qe===null&&fl(S,vt.el),Ee&&Kt(Ee,z),(tt=pe.props&&pe.props.onVnodeUpdated)&&Kt(()=>ln(tt,Re,pe,je),z)}else{let pe;const{el:Me,props:Ee}=w,{bm:Re,m:je,parent:qe}=S,tt=Oa(w);if(Ta(S,!1),Re&&ir(Re),!tt&&(pe=Ee&&Ee.onVnodeBeforeMount)&&ln(pe,qe,w),Ta(S,!0),Me&&Cn){const vt=()=>{S.subTree=Ko(S),Cn(Me,S.subTree,S,z,null)};tt?w.type.__asyncLoader().then(()=>!S.isUnmounted&&vt()):vt()}else{const vt=S.subTree=Ko(S);b(null,vt,R,V,S,z,J),w.el=vt.el}if(je&&Kt(je,z),!tt&&(pe=Ee&&Ee.onVnodeMounted)){const vt=w;Kt(()=>ln(pe,qe,vt),z)}(w.shapeFlag&256||qe&&Oa(qe.vnode)&&qe.vnode.shapeFlag&256)&&S.a&&Kt(S.a,z),S.isMounted=!0,w=R=V=null}},ce=S.effect=new pr(q,cn,()=>hs(Z),S.scope),Z=S.update=()=>{ce.dirty&&ce.run()};Z.id=S.uid,Ta(S,!0),Z()},oe=(S,w,R)=>{w.component=S;const V=S.vnode.props;S.vnode=w,S.next=null,Yy(S,w.props,V,R),qy(S,w.children,R),Ua(),Xc(S),Ha()},ne=(S,w,R,V,z,J,ae,q,ce=!1)=>{const Z=S&&S.children,pe=S?S.shapeFlag:0,Me=w.children,{patchFlag:Ee,shapeFlag:Re}=w;if(Ee>0){if(Ee&128){wt(Z,Me,R,V,z,J,ae,q,ce);return}else if(Ee&256){be(Z,Me,R,V,z,J,ae,q,ce);return}}Re&8?(pe&16&&Ue(Z,z,J),Me!==Z&&h(R,Me)):pe&16?Re&16?wt(Z,Me,R,V,z,J,ae,q,ce):Ue(Z,z,J,!0):(pe&8&&h(R,""),Re&16&&N(Me,R,V,z,J,ae,q,ce))},be=(S,w,R,V,z,J,ae,q,ce)=>{S=S||rr,w=w||rr;const Z=S.length,pe=w.length,Me=Math.min(Z,pe);let Ee;for(Ee=0;Ee<Me;Ee++){const Re=w[Ee]=ce?la(w[Ee]):mn(w[Ee]);b(S[Ee],Re,R,null,z,J,ae,q,ce)}Z>pe?Ue(S,z,J,!0,!1,Me):N(w,R,V,z,J,ae,q,ce,Me)},wt=(S,w,R,V,z,J,ae,q,ce)=>{let Z=0;const pe=w.length;let Me=S.length-1,Ee=pe-1;for(;Z<=Me&&Z<=Ee;){const Re=S[Z],je=w[Z]=ce?la(w[Z]):mn(w[Z]);if($n(Re,je))b(Re,je,R,null,z,J,ae,q,ce);else break;Z++}for(;Z<=Me&&Z<=Ee;){const Re=S[Me],je=w[Ee]=ce?la(w[Ee]):mn(w[Ee]);if($n(Re,je))b(Re,je,R,null,z,J,ae,q,ce);else break;Me--,Ee--}if(Z>Me){if(Z<=Ee){const Re=Ee+1,je=Re<pe?w[Re].el:V;for(;Z<=Ee;)b(null,w[Z]=ce?la(w[Z]):mn(w[Z]),R,je,z,J,ae,q,ce),Z++}}else if(Z>Ee)for(;Z<=Me;)gt(S[Z],z,J,!0),Z++;else{const Re=Z,je=Z,qe=new Map;for(Z=je;Z<=Ee;Z++){const kt=w[Z]=ce?la(w[Z]):mn(w[Z]);kt.key!=null&&qe.set(kt.key,Z)}let tt,vt=0;const Tt=Ee-je+1;let Xt=!1,Un=0;const bn=new Array(Tt);for(Z=0;Z<Tt;Z++)bn[Z]=0;for(Z=Re;Z<=Me;Z++){const kt=S[Z];if(vt>=Tt){gt(kt,z,J,!0);continue}let Zt;if(kt.key!=null)Zt=qe.get(kt.key);else for(tt=je;tt<=Ee;tt++)if(bn[tt-je]===0&&$n(kt,w[tt])){Zt=tt;break}Zt===void 0?gt(kt,z,J,!0):(bn[Zt-je]=Z+1,Zt>=Un?Un=Zt:Xt=!0,b(kt,w[Zt],R,null,z,J,ae,q,ce),vt++)}const Wa=Xt?t_(bn):rr;for(tt=Wa.length-1,Z=Tt-1;Z>=0;Z--){const kt=je+Z,Zt=w[kt],_a=kt+1<pe?w[kt+1].el:V;bn[Z]===0?b(null,Zt,R,_a,z,J,ae,q,ce):Xt&&(tt<0||Z!==Wa[tt]?He(Zt,R,_a,2):tt--)}}},He=(S,w,R,V,z=null)=>{const{el:J,type:ae,transition:q,children:ce,shapeFlag:Z}=S;if(Z&6){He(S.component.subTree,w,R,V);return}if(Z&128){S.suspense.move(w,R,V);return}if(Z&64){ae.move(S,w,R,It);return}if(ae===xe){a(J,w,R);for(let Me=0;Me<ce.length;Me++)He(ce[Me],w,R,V);a(S.anchor,w,R);return}if(ae===La){g(S,w,R);return}if(V!==2&&Z&1&&q)if(V===0)q.beforeEnter(J),a(J,w,R),Kt(()=>q.enter(J),z);else{const{leave:Me,delayLeave:Ee,afterLeave:Re}=q,je=()=>a(J,w,R),qe=()=>{Me(J,()=>{je(),Re&&Re()})};Ee?Ee(J,je,qe):qe()}else a(J,w,R)},gt=(S,w,R,V=!1,z=!1)=>{const{type:J,props:ae,ref:q,children:ce,dynamicChildren:Z,shapeFlag:pe,patchFlag:Me,dirs:Ee}=S;if(q!=null&&es(q,null,R,S,!0),pe&256){w.ctx.deactivate(S);return}const Re=pe&1&&Ee,je=!Oa(S);let qe;if(je&&(qe=ae&&ae.onVnodeBeforeUnmount)&&ln(qe,w,S),pe&6)nt(S.component,R,V);else{if(pe&128){S.suspense.unmount(R,V);return}Re&&Pn(S,null,w,"beforeUnmount"),pe&64?S.type.remove(S,w,R,z,It,V):Z&&(J!==xe||Me>0&&Me&64)?Ue(Z,w,R,!1,!0):(J===xe&&Me&384||!z&&pe&16)&&Ue(ce,w,R),V&&Ae(S)}(je&&(qe=ae&&ae.onVnodeUnmounted)||Re)&&Kt(()=>{qe&&ln(qe,w,S),Re&&Pn(S,null,w,"unmounted")},R)},Ae=S=>{const{type:w,el:R,anchor:V,transition:z}=S;if(w===xe){Le(R,V);return}if(w===La){y(S);return}const J=()=>{r(R),z&&!z.persisted&&z.afterLeave&&z.afterLeave()};if(S.shapeFlag&1&&z&&!z.persisted){const{leave:ae,delayLeave:q}=z,ce=()=>ae(R,J);q?q(S.el,J,ce):ce()}else J()},Le=(S,w)=>{let R;for(;S!==w;)R=m(S),r(S),S=R;r(w)},nt=(S,w,R)=>{const{bum:V,scope:z,update:J,subTree:ae,um:q}=S;V&&ir(V),z.stop(),J&&(J.active=!1,gt(ae,S,w,R)),q&&Kt(q,w),Kt(()=>{S.isUnmounted=!0},w),w&&w.pendingBranch&&!w.isUnmounted&&S.asyncDep&&!S.asyncResolved&&S.suspenseId===w.pendingId&&(w.deps--,w.deps===0&&w.resolve())},Ue=(S,w,R,V=!1,z=!1,J=0)=>{for(let ae=J;ae<S.length;ae++)gt(S[ae],w,R,V,z)},ft=S=>S.shapeFlag&6?ft(S.component.subTree):S.shapeFlag&128?S.suspense.next():m(S.anchor||S.el);let rt=!1;const Ct=(S,w,R)=>{S==null?w._vnode&&gt(w._vnode,null,null,!0):b(w._vnode||null,S,w,null,null,null,R),rt||(rt=!0,Xc(),Xo(),rt=!1),w._vnode=S},It={p:b,um:gt,m:He,r:Ae,mt:fe,mc:N,pc:ne,pbc:X,n:ft,o:e};let Nt,Cn;return t&&([Nt,Cn]=t(It)),{render:Ct,hydrate:Nt,createApp:zy(Ct,Nt)}}function hi({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 Ta({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function df(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function wl(e,t,n=!1){const a=e.children,r=t.children;if(ke(a)&&ke(r))for(let o=0;o<a.length;o++){const s=a[o];let c=r[o];c.shapeFlag&1&&!c.dynamicChildren&&((c.patchFlag<=0||c.patchFlag===32)&&(c=r[o]=la(r[o]),c.el=s.el),n||wl(s,c)),c.type===Fa&&(c.el=s.el)}}function t_(e){const t=e.slice(),n=[0];let a,r,o,s,c;const u=e.length;for(a=0;a<u;a++){const f=e[a];if(f!==0){if(r=n[n.length-1],e[r]<f){t[a]=r,n.push(a);continue}for(o=0,s=n.length-1;o<s;)c=o+s>>1,e[n[c]]<f?o=c+1:s=c;f<e[n[o]]&&(o>0&&(t[a]=n[o-1]),n[o]=a)}}for(o=n.length,s=n[o-1];o-- >0;)n[o]=s,s=t[s];return n}function ff(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ff(t)}const n_=e=>e.__isTeleport,Ur=e=>e&&(e.disabled||e.disabled===""),uu=e=>typeof SVGElement<"u"&&e instanceof SVGElement,du=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Fi=(e,t)=>{const n=e&&e.to;return _t(n)?t?t(n):null:n},a_={name:"Teleport",__isTeleport:!0,process(e,t,n,a,r,o,s,c,u,f){const{mc:h,pc:d,pbc:m,o:{insert:I,querySelector:A,createText:b,createComment:E}}=f,j=Ur(t.props);let{shapeFlag:M,children:g,dynamicChildren:y}=t;if(e==null){const C=t.el=b(""),v=t.anchor=b("");I(C,n,a),I(v,n,a);const D=t.target=Fi(t.props,A),N=t.targetAnchor=b("");D&&(I(N,D),s==="svg"||uu(D)?s="svg":(s==="mathml"||du(D))&&(s="mathml"));const Y=(X,_e)=>{M&16&&h(g,X,_e,r,o,s,c,u)};j?Y(n,v):D&&Y(D,N)}else{t.el=e.el;const C=t.anchor=e.anchor,v=t.target=e.target,D=t.targetAnchor=e.targetAnchor,N=Ur(e.props),Y=N?n:v,X=N?C:D;if(s==="svg"||uu(v)?s="svg":(s==="mathml"||du(v))&&(s="mathml"),y?(m(e.dynamicChildren,y,Y,r,o,s,c),wl(e,t,!0)):u||d(e,t,Y,X,r,o,s,c,!1),j)N?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Fo(t,n,C,f,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const _e=t.target=Fi(t.props,A);_e&&Fo(t,_e,null,f,0)}else N&&Fo(t,v,D,f,1)}pf(t)},remove(e,t,n,a,{um:r,o:{remove:o}},s){const{shapeFlag:c,children:u,anchor:f,targetAnchor:h,target:d,props:m}=e;if(d&&o(h),s&&o(f),c&16){const I=s||!Ur(m);for(let A=0;A<u.length;A++){const b=u[A];r(b,t,n,I,!!b.dynamicChildren)}}},move:Fo,hydrate:r_};function Fo(e,t,n,{o:{insert:a},m:r},o=2){o===0&&a(e.targetAnchor,t,n);const{el:s,anchor:c,shapeFlag:u,children:f,props:h}=e,d=o===2;if(d&&a(s,t,n),(!d||Ur(h))&&u&16)for(let m=0;m<f.length;m++)r(f[m],t,n,2);d&&a(c,t,n)}function r_(e,t,n,a,r,o,{o:{nextSibling:s,parentNode:c,querySelector:u}},f){const h=t.target=Fi(t.props,u);if(h){const d=h._lpa||h.firstChild;if(t.shapeFlag&16)if(Ur(t.props))t.anchor=f(s(e),t,c(e),n,a,r,o),t.targetAnchor=d;else{t.anchor=s(e);let m=d;for(;m;)if(m=s(m),m&&m.nodeType===8&&m.data==="teleport anchor"){t.targetAnchor=m,h._lpa=t.targetAnchor&&s(t.targetAnchor);break}f(d,t,h,n,a,r,o)}pf(t)}return t.anchor&&s(t.anchor)}const o_=a_;function pf(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 xe=Symbol.for("v-fgt"),Fa=Symbol.for("v-txt"),qt=Symbol.for("v-cmt"),La=Symbol.for("v-stc"),Hr=[];let un=null;function T(e=!1){Hr.push(un=e?null:[])}function hf(){Hr.pop(),un=Hr[Hr.length-1]||null}let Da=1;function Di(e){Da+=e}function vf(e){return e.dynamicChildren=Da>0?un||rr:null,hf(),Da>0&&un&&un.push(e),e}function P(e,t,n,a,r,o){return vf(H(e,t,n,a,r,o,!0))}function De(e,t,n,a,r){return vf(Fe(e,t,n,a,r,!0))}function pa(e){return e?e.__v_isVNode===!0:!1}function $n(e,t){return e.type===t.type&&e.key===t.key}function s_(e){}const bs="__vInternal",mf=({key:e})=>e??null,zo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?_t(e)||Vt(e)||Ve(e)?{i:$t,r:e,k:t,f:!!n}:e:null);function H(e,t=null,n=null,a=0,r=null,o=e===xe?0:1,s=!1,c=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&mf(t),ref:t&&zo(t),scopeId:ms,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:a,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:$t};return c?(Cl(u,n),o&128&&e.normalize(u)):n&&(u.shapeFlag|=_t(n)?8:16),Da>0&&!s&&un&&(u.patchFlag>0||o&6)&&u.patchFlag!==32&&un.push(u),u}const Fe=i_;function i_(e,t=null,n=null,a=0,r=null,o=!1){if((!e||e===Nd)&&(e=qt),pa(e)){const c=Fn(e,t,!0);return n&&Cl(c,n),Da>0&&!o&&un&&(c.shapeFlag&6?un[un.indexOf(e)]=c:un.push(c)),c.patchFlag|=-2,c}if(v_(e)&&(e=e.__vccOpts),t){t=gf(t);let{class:c,style:u}=t;c&&!_t(c)&&(t.class=ct(c)),dt(u)&&(al(u)&&!ke(u)&&(u=yt({},u)),t.style=ht(u))}const s=_t(e)?1:Ld(e)?128:n_(e)?64:dt(e)?4:Ve(e)?2:0;return H(e,t,n,a,r,s,o,!0)}function gf(e){return e?al(e)||bs in e?yt({},e):e:null}function Fn(e,t,n=!1){const{props:a,ref:r,patchFlag:o,children:s}=e,c=t?yf(a||{},t):a;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&mf(c),ref:t&&t.ref?n&&r?ke(r)?r.concat(zo(t)):[r,zo(t)]:zo(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==xe?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&&Fn(e.ssContent),ssFallback:e.ssFallback&&Fn(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function pt(e=" ",t=0){return Fe(Fa,null,e,t)}function l_(e,t){const n=Fe(La,null,e);return n.staticCount=t,n}function ve(e="",t=!1){return t?(T(),De(qt,null,e)):Fe(qt,null,e)}function mn(e){return e==null||typeof e=="boolean"?Fe(qt):ke(e)?Fe(xe,null,e.slice()):typeof e=="object"?la(e):Fe(Fa,null,String(e))}function la(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Fn(e)}function Cl(e,t){let n=0;const{shapeFlag:a}=e;if(t==null)t=null;else if(ke(t))n=16;else if(typeof t=="object")if(a&65){const r=t.default;r&&(r._c&&(r._d=!1),Cl(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!(bs in t)?t._ctx=$t:r===3&&$t&&($t.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ve(t)?(t={default:t,_ctx:$t},n=32):(t=String(t),a&64?(n=16,t=[pt(t)]):n=8);e.children=t,e.shapeFlag|=n}function yf(...e){const t={};for(let n=0;n<e.length;n++){const a=e[n];for(const r in a)if(r==="class")t.class!==a.class&&(t.class=ct([t.class,a.class]));else if(r==="style")t.style=ht([t.style,a.style]);else if(eo(r)){const o=t[r],s=a[r];s&&o!==s&&!(ke(o)&&o.includes(s))&&(t[r]=o?[].concat(o,s):s)}else r!==""&&(t[r]=a[r])}return t}function ln(e,t,n,a=null){yn(e,t,7,[n,a])}const c_=ef();let u_=0;function _f(e,t,n){const a=e.type,r=(t?t.appContext:e.appContext)||c_,o={uid:u_++,vnode:e,type:a,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new Zi(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:af(a,r),emitsOptions:Md(a,r),emit:null,emitted:null,propsDefaults:lt,inheritAttrs:a.inheritAttrs,ctx:lt,data:lt,props:lt,attrs:lt,slots:lt,refs:lt,setupState:lt,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=ny.bind(null,o),e.ce&&e.ce(o),o}let Lt=null;const Qn=()=>Lt||$t;let ts,Vi;{const e=rd(),t=(n,a)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(a),o=>{r.length>1?r.forEach(s=>s(o)):r[0](o)}};ts=t("__VUE_INSTANCE_SETTERS__",n=>Lt=n),Vi=t("__VUE_SSR_SETTERS__",n=>ro=n)}const Va=e=>{const t=Lt;return ts(e),e.scope.on(),()=>{e.scope.off(),ts(t)}},Bi=()=>{Lt&&Lt.scope.off(),ts(null)};function bf(e){return e.vnode.shapeFlag&4}let ro=!1;function Af(e,t=!1){t&&Vi(t);const{props:n,children:a}=e.vnode,r=bf(e);Gy(e,n,r,t),Qy(e,a);const o=r?d_(e,t):void 0;return t&&Vi(!1),o}function d_(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=rl(new Proxy(e.ctx,Oi));const{setup:a}=n;if(a){const r=e.setupContext=a.length>1?Cf(e):null,o=Va(e);Ua();const s=Yn(a,e,0,[e.props,r]);if(Ha(),o(),qi(s)){if(s.then(Bi,Bi),t)return s.then(c=>{Ui(e,c,t)}).catch(c=>{ja(c,e,0)});e.asyncDep=s}else Ui(e,s,t)}else wf(e,t)}function Ui(e,t,n){Ve(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:dt(t)&&(e.setupState=ll(t)),wf(e,n)}let ns,Hi;function f_(e){ns=e,Hi=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,Sy))}}const p_=()=>!ns;function wf(e,t,n){const a=e.type;if(!e.render){if(!t&&ns&&!a.render){const r=a.template||bl(e).template;if(r){const{isCustomElement:o,compilerOptions:s}=e.appContext.config,{delimiters:c,compilerOptions:u}=a,f=yt(yt({isCustomElement:o,delimiters:c},s),u);a.render=ns(r,f)}}e.render=a.render||cn,Hi&&Hi(e)}{const r=Va(e);Ua();try{Vy(e)}finally{Ha(),r()}}}function h_(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,n){return dn(e,"get","$attrs"),t[n]}}))}function Cf(e){const t=n=>{e.exposed=n||{}};return{get attrs(){return h_(e)},slots:e.slots,emit:e.emit,expose:t}}function As(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(ll(rl(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Br)return Br[n](e)},has(t,n){return n in t||n in Br}}))}function ji(e,t=!0){return Ve(e)?e.displayName||e.name:e.name||t&&e.__name}function v_(e){return Ve(e)&&"__vccOpts"in e}const te=(e,t)=>Vg(e,t,ro);function oo(e,t,n=lt){const a=Qn(),r=nn(t),o=gn(t),s=Td((u,f)=>{let h;return Vd(()=>{const d=e[t];Nn(h,d)&&(h=d,f())}),{get(){return u(),n.get?n.get(h):h},set(d){const m=a.vnode.props;!(m&&(t in m||r in m||o in m)&&(`onUpdate:${t}`in m||`onUpdate:${r}`in m||`onUpdate:${o}`in m))&&Nn(d,h)&&(h=d,f()),a.emit(`update:${t}`,n.set?n.set(d):d)}}}),c=t==="modelValue"?"modelModifiers":`${t}Modifiers`;return s[Symbol.iterator]=()=>{let u=0;return{next(){return u<2?{value:u++?e[c]||{}:s,done:!1}:{done:!0}}}},s}function ha(e,t,n){const a=arguments.length;return a===2?dt(t)&&!ke(t)?pa(t)?Fe(e,null,[t]):Fe(e,t):Fe(e,null,t):(a>3?n=Array.prototype.slice.call(arguments,2):a===3&&pa(n)&&(n=[n]),Fe(e,t,n))}function m_(){}function g_(e,t,n,a){const r=n[a];if(r&&If(r,e))return r;const o=t();return o.memo=e.slice(),n[a]=o}function If(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let a=0;a<n.length;a++)if(Nn(n[a],t[a]))return!1;return Da>0&&un&&un.push(e),!0}const Tf="3.4.21",y_=cn,__=qg,b_=ar,A_=$d,w_={createComponentInstance:_f,setupComponent:Af,renderComponentRoot:Ko,setCurrentRenderingInstance:Qr,isVNode:pa,normalizeVNode:mn},C_=w_,I_=null,T_=null,S_=null;/**
* @vue/runtime-dom v3.4.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const k_="http://www.w3.org/2000/svg",E_="http://www.w3.org/1998/Math/MathML",ca=typeof document<"u"?document:null,fu=ca&&ca.createElement("template"),x_={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,a)=>{const r=t==="svg"?ca.createElementNS(k_,e):t==="mathml"?ca.createElementNS(E_,e):ca.createElement(e,n?{is:n}:void 0);return e==="select"&&a&&a.multiple!=null&&r.setAttribute("multiple",a.multiple),r},createText:e=>ca.createTextNode(e),createComment:e=>ca.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ca.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,a,r,o){const s=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{fu.innerHTML=a==="svg"?`<svg>${e}</svg>`:a==="mathml"?`<math>${e}</math>`:e;const c=fu.content;if(a==="svg"||a==="mathml"){const u=c.firstChild;for(;u.firstChild;)c.appendChild(u.firstChild);c.removeChild(u)}t.insertBefore(c,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ra="transition",Mr="animation",vr=Symbol("_vtc"),ws=(e,{slots:t})=>ha(Ud,kf(e),t);ws.displayName="Transition";const Sf={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},$_=ws.props=yt({},yl,Sf),Sa=(e,t=[])=>{ke(e)?e.forEach(n=>n(...t)):e&&e(...t)},pu=e=>e?ke(e)?e.some(t=>t.length>1):e.length>1:!1;function kf(e){const t={};for(const ie in e)ie in Sf||(t[ie]=e[ie]);if(e.css===!1)return t;const{name:n="v",type:a,duration:r,enterFromClass:o=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:u=o,appearActiveClass:f=s,appearToClass:h=c,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:m=`${n}-leave-active`,leaveToClass:I=`${n}-leave-to`}=e,A=M_(r),b=A&&A[0],E=A&&A[1],{onBeforeEnter:j,onEnter:M,onEnterCancelled:g,onLeave:y,onLeaveCancelled:C,onBeforeAppear:v=j,onAppear:D=M,onAppearCancelled:N=g}=t,Y=(ie,G,fe)=>{oa(ie,G?h:c),oa(ie,G?f:s),fe&&fe()},X=(ie,G)=>{ie._isLeaving=!1,oa(ie,d),oa(ie,I),oa(ie,m),G&&G()},_e=ie=>(G,fe)=>{const we=ie?D:M,re=()=>Y(G,ie,fe);Sa(we,[G,re]),hu(()=>{oa(G,ie?u:o),zn(G,ie?h:c),pu(we)||vu(G,a,b,re)})};return yt(t,{onBeforeEnter(ie){Sa(j,[ie]),zn(ie,o),zn(ie,s)},onBeforeAppear(ie){Sa(v,[ie]),zn(ie,u),zn(ie,f)},onEnter:_e(!1),onAppear:_e(!0),onLeave(ie,G){ie._isLeaving=!0;const fe=()=>X(ie,G);zn(ie,d),xf(),zn(ie,m),hu(()=>{ie._isLeaving&&(oa(ie,d),zn(ie,I),pu(y)||vu(ie,a,E,fe))}),Sa(y,[ie,fe])},onEnterCancelled(ie){Y(ie,!1),Sa(g,[ie])},onAppearCancelled(ie){Y(ie,!0),Sa(N,[ie])},onLeaveCancelled(ie){X(ie),Sa(C,[ie])}})}function M_(e){if(e==null)return null;if(dt(e))return[vi(e.enter),vi(e.leave)];{const t=vi(e);return[t,t]}}function vi(e){return Jo(e)}function zn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[vr]||(e[vr]=new Set)).add(t)}function oa(e,t){t.split(/\s+/).forEach(a=>a&&e.classList.remove(a));const n=e[vr];n&&(n.delete(t),n.size||(e[vr]=void 0))}function hu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let N_=0;function vu(e,t,n,a){const r=e._endId=++N_,o=()=>{r===e._endId&&a()};if(n)return setTimeout(o,n);const{type:s,timeout:c,propCount:u}=Ef(e,t);if(!s)return a();const f=s+"end";let h=0;const d=()=>{e.removeEventListener(f,m),o()},m=I=>{I.target===e&&++h>=u&&d()};setTimeout(()=>{h<u&&d()},c+1),e.addEventListener(f,m)}function Ef(e,t){const n=window.getComputedStyle(e),a=A=>(n[A]||"").split(", "),r=a(`${ra}Delay`),o=a(`${ra}Duration`),s=mu(r,o),c=a(`${Mr}Delay`),u=a(`${Mr}Duration`),f=mu(c,u);let h=null,d=0,m=0;t===ra?s>0&&(h=ra,d=s,m=o.length):t===Mr?f>0&&(h=Mr,d=f,m=u.length):(d=Math.max(s,f),h=d>0?s>f?ra:Mr:null,m=h?h===ra?o.length:u.length:0);const I=h===ra&&/\b(transform|all)(,|$)/.test(a(`${ra}Property`).toString());return{type:h,timeout:d,propCount:m,hasTransform:I}}function mu(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,a)=>gu(n)+gu(e[a])))}function gu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function xf(){return document.body.offsetHeight}function O_(e,t,n){const a=e[vr];a&&(t=(t?[t,...a]:[...a]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const as=Symbol("_vod"),$f=Symbol("_vsh"),an={beforeMount(e,{value:t},{transition:n}){e[as]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Nr(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:a}){!t!=!n&&(a?t?(a.beforeEnter(e),Nr(e,!0),a.enter(e)):a.leave(e,()=>{Nr(e,!1)}):Nr(e,t))},beforeUnmount(e,{value:t}){Nr(e,t)}};function Nr(e,t){e.style.display=t?e[as]:"none",e[$f]=!t}function L_(){an.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const Mf=Symbol("");function _r(e){const t=Qn();if(!t)return;const n=t.ut=(r=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(o=>zi(o,r))},a=()=>{const r=e(t.proxy);Ki(t.subTree,r),n(r)};Dd(a),Wt(()=>{const r=new MutationObserver(a);r.observe(t.subTree.el.parentNode,{childList:!0}),za(()=>r.disconnect())})}function Ki(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Ki(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)zi(e.el,t);else if(e.type===xe)e.children.forEach(n=>Ki(n,t));else if(e.type===La){let{el:n,anchor:a}=e;for(;n&&(zi(n,t),n!==a);)n=n.nextSibling}}function zi(e,t){if(e.nodeType===1){const n=e.style;let a="";for(const r in t)n.setProperty(`--${r}`,t[r]),a+=`--${r}: ${t[r]};`;n[Mf]=a}}const P_=/(^|;)\s*display\s*:/;function R_(e,t,n){const a=e.style,r=_t(n);let o=!1;if(n&&!r){if(t)if(_t(t))for(const s of t.split(";")){const c=s.slice(0,s.indexOf(":")).trim();n[c]==null&&Wo(a,c,"")}else for(const s in t)n[s]==null&&Wo(a,s,"");for(const s in n)s==="display"&&(o=!0),Wo(a,s,n[s])}else if(r){if(t!==n){const s=a[Mf];s&&(n+=";"+s),a.cssText=n,o=P_.test(n)}}else t&&e.removeAttribute("style");as in e&&(e[as]=o?a.display:"",e[$f]&&(a.display="none"))}const yu=/\s*!important$/;function Wo(e,t,n){if(ke(n))n.forEach(a=>Wo(e,t,a));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const a=F_(e,t);yu.test(n)?e.setProperty(gn(a),n.replace(yu,""),"important"):e[a]=n}}const _u=["Webkit","Moz","ms"],mi={};function F_(e,t){const n=mi[t];if(n)return n;let a=nn(t);if(a!=="filter"&&a in e)return mi[t]=a;a=to(a);for(let r=0;r<_u.length;r++){const o=_u[r]+a;if(o in e)return mi[t]=o}return t}const bu="http://www.w3.org/1999/xlink";function D_(e,t,n,a,r){if(a&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(bu,t.slice(6,t.length)):e.setAttributeNS(bu,t,n);else{const o=fg(t);n==null||o&&!od(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}function V_(e,t,n,a,r,o,s){if(t==="innerHTML"||t==="textContent"){a&&s(a,r,o),e[t]=n??"";return}const c=e.tagName;if(t==="value"&&c!=="PROGRESS"&&!c.includes("-")){const f=c==="OPTION"?e.getAttribute("value")||"":e.value,h=n??"";(f!==h||!("_value"in e))&&(e.value=h),n==null&&e.removeAttribute(t),e._value=n;return}let u=!1;if(n===""||n==null){const f=typeof e[t];f==="boolean"?n=od(n):n==null&&f==="string"?(n="",u=!0):f==="number"&&(n=0,u=!0)}try{e[t]=n}catch{}u&&e.removeAttribute(t)}function Wn(e,t,n,a){e.addEventListener(t,n,a)}function B_(e,t,n,a){e.removeEventListener(t,n,a)}const Au=Symbol("_vei");function U_(e,t,n,a,r=null){const o=e[Au]||(e[Au]={}),s=o[t];if(a&&s)s.value=a;else{const[c,u]=H_(t);if(a){const f=o[t]=z_(a,r);Wn(e,c,f,u)}else s&&(B_(e,c,s,u),o[t]=void 0)}}const wu=/(?:Once|Passive|Capture)$/;function H_(e){let t;if(wu.test(e)){t={};let a;for(;a=e.match(wu);)e=e.slice(0,e.length-a[0].length),t[a[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):gn(e.slice(2)),t]}let gi=0;const j_=Promise.resolve(),K_=()=>gi||(j_.then(()=>gi=0),gi=Date.now());function z_(e,t){const n=a=>{if(!a._vts)a._vts=Date.now();else if(a._vts<=n.attached)return;yn(W_(a,n.value),t,5,[a])};return n.value=e,n.attached=K_(),n}function W_(e,t){if(ke(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(a=>r=>!r._stopped&&a&&a(r))}else return t}const Cu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,G_=(e,t,n,a,r,o,s,c,u)=>{const f=r==="svg";t==="class"?O_(e,a,f):t==="style"?R_(e,n,a):eo(t)?Ji(t)||U_(e,t,n,a,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Y_(e,t,a,f))?V_(e,t,a,o,s,c,u):(t==="true-value"?e._trueValue=a:t==="false-value"&&(e._falseValue=a),D_(e,t,a,f))};function Y_(e,t,n,a){if(a)return!!(t==="innerHTML"||t==="textContent"||t in e&&Cu(t)&&Ve(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 r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Cu(t)&&_t(n)?!1:t in e}/*! #__NO_SIDE_EFFECTS__ */function Nf(e,t){const n=me(e);class a extends Cs{constructor(o){super(n,o,t)}}return a.def=n,a}/*! #__NO_SIDE_EFFECTS__ */const J_=e=>Nf(e,Hf),Q_=typeof HTMLElement<"u"?HTMLElement:class{};class Cs extends Q_{constructor(t,n={},a){super(),this._def=t,this._props=n,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&a?a(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||(Wi(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let a=0;a<this.attributes.length;a++)this._setAttr(this.attributes[a].name);this._ob=new MutationObserver(a=>{for(const r of a)this._setAttr(r.attributeName)}),this._ob.observe(this,{attributes:!0});const t=(a,r=!1)=>{const{props:o,styles:s}=a;let c;if(o&&!ke(o))for(const u in o){const f=o[u];(f===Number||f&&f.type===Number)&&(u in this._props&&(this._props[u]=Jo(this._props[u])),(c||(c=Object.create(null)))[nn(u)]=!0)}this._numberProps=c,r&&this._resolveProps(a),this._applyStyles(s),this._update()},n=this._def.__asyncLoader;n?n().then(a=>t(a,!0)):t(this._def)}_resolveProps(t){const{props:n}=t,a=ke(n)?n:Object.keys(n||{});for(const r of Object.keys(this))r[0]!=="_"&&a.includes(r)&&this._setProp(r,this[r],!0,!1);for(const r of a.map(nn))Object.defineProperty(this,r,{get(){return this._getProp(r)},set(o){this._setProp(r,o)}})}_setAttr(t){let n=this.getAttribute(t);const a=nn(t);this._numberProps&&this._numberProps[a]&&(n=Jo(n)),this._setProp(a,n,!1)}_getProp(t){return this._props[t]}_setProp(t,n,a=!0,r=!0){n!==this._props[t]&&(this._props[t]=n,r&&this._instance&&this._update(),a&&(n===!0?this.setAttribute(gn(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(gn(t),n+""):n||this.removeAttribute(gn(t))))}_update(){Wi(this._createVNode(),this.shadowRoot)}_createVNode(){const t=Fe(this._def,yt({},this._props));return this._instance||(t.ce=n=>{this._instance=n,n.isCE=!0;const a=(o,s)=>{this.dispatchEvent(new CustomEvent(o,{detail:s}))};n.emit=(o,...s)=>{a(o,s),gn(o)!==o&&a(gn(o),s)};let r=this;for(;r=r&&(r.parentNode||r.host);)if(r instanceof Cs){n.parent=r._instance,n.provides=r._instance.provides;break}}),t}_applyStyles(t){t&&t.forEach(n=>{const a=document.createElement("style");a.textContent=n,this.shadowRoot.appendChild(a)})}}function q_(e="$style"){{const t=Qn();if(!t)return lt;const n=t.type.__cssModules;if(!n)return lt;const a=n[e];return a||lt}}const Of=new WeakMap,Lf=new WeakMap,rs=Symbol("_moveCb"),Iu=Symbol("_enterCb"),Pf={name:"TransitionGroup",props:yt({},$_,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Qn(),a=gl();let r,o;return _s(()=>{if(!r.length)return;const s=e.moveClass||`${e.name||"v"}-move`;if(!ab(r[0].el,n.vnode.el,s))return;r.forEach(eb),r.forEach(tb);const c=r.filter(nb);xf(),c.forEach(u=>{const f=u.el,h=f.style;zn(f,s),h.transform=h.webkitTransform=h.transitionDuration="";const d=f[rs]=m=>{m&&m.target!==f||(!m||/transform$/.test(m.propertyName))&&(f.removeEventListener("transitionend",d),f[rs]=null,oa(f,s))};f.addEventListener("transitionend",d)})}),()=>{const s=Qe(e),c=kf(s);let u=s.tag||xe;r=o,o=t.default?gs(t.default()):[];for(let f=0;f<o.length;f++){const h=o[f];h.key!=null&&Ra(h,hr(h,c,a,n))}if(r)for(let f=0;f<r.length;f++){const h=r[f];Ra(h,hr(h,c,a,n)),Of.set(h,h.el.getBoundingClientRect())}return Fe(u,null,o)}}},X_=e=>delete e.mode;Pf.props;const Z_=Pf;function eb(e){const t=e.el;t[rs]&&t[rs](),t[Iu]&&t[Iu]()}function tb(e){Lf.set(e,e.el.getBoundingClientRect())}function nb(e){const t=Of.get(e),n=Lf.get(e),a=t.left-n.left,r=t.top-n.top;if(a||r){const o=e.el.style;return o.transform=o.webkitTransform=`translate(${a}px,${r}px)`,o.transitionDuration="0s",e}}function ab(e,t,n){const a=e.cloneNode(),r=e[vr];r&&r.forEach(c=>{c.split(/\s+/).forEach(u=>u&&a.classList.remove(u))}),n.split(/\s+/).forEach(c=>c&&a.classList.add(c)),a.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(a);const{hasTransform:s}=Ef(a);return o.removeChild(a),s}const va=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ke(t)?n=>ir(t,n):t};function rb(e){e.target.composing=!0}function Tu(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const wn=Symbol("_assign"),ma={created(e,{modifiers:{lazy:t,trim:n,number:a}},r){e[wn]=va(r);const o=a||r.props&&r.props.type==="number";Wn(e,t?"change":"input",s=>{if(s.target.composing)return;let c=e.value;n&&(c=c.trim()),o&&(c=zr(c)),e[wn](c)}),n&&Wn(e,"change",()=>{e.value=e.value.trim()}),t||(Wn(e,"compositionstart",rb),Wn(e,"compositionend",Tu),Wn(e,"change",Tu))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:a,number:r}},o){if(e[wn]=va(o),e.composing)return;const s=r||e.type==="number"?zr(e.value):e.value,c=t??"";s!==c&&(document.activeElement===e&&e.type!=="range"&&(n||a&&e.value.trim()===c)||(e.value=c))}},Il={deep:!0,created(e,t,n){e[wn]=va(n),Wn(e,"change",()=>{const a=e._modelValue,r=mr(e),o=e.checked,s=e[wn];if(ke(a)){const c=ls(a,r),u=c!==-1;if(o&&!u)s(a.concat(r));else if(!o&&u){const f=[...a];f.splice(c,1),s(f)}}else if(Ba(a)){const c=new Set(a);o?c.add(r):c.delete(r),s(c)}else s(Rf(e,o))})},mounted:Su,beforeUpdate(e,t,n){e[wn]=va(n),Su(e,t,n)}};function Su(e,{value:t,oldValue:n},a){e._modelValue=t,ke(t)?e.checked=ls(t,a.props.value)>-1:Ba(t)?e.checked=t.has(a.props.value):t!==n&&(e.checked=fa(t,Rf(e,!0)))}const Tl={created(e,{value:t},n){e.checked=fa(t,n.props.value),e[wn]=va(n),Wn(e,"change",()=>{e[wn](mr(e))})},beforeUpdate(e,{value:t,oldValue:n},a){e[wn]=va(a),t!==n&&(e.checked=fa(t,a.props.value))}},Sl={deep:!0,created(e,{value:t,modifiers:{number:n}},a){const r=Ba(t);Wn(e,"change",()=>{const o=Array.prototype.filter.call(e.options,s=>s.selected).map(s=>n?zr(mr(s)):mr(s));e[wn](e.multiple?r?new Set(o):o:o[0]),e._assigning=!0,Mn(()=>{e._assigning=!1})}),e[wn]=va(a)},mounted(e,{value:t,modifiers:{number:n}}){ku(e,t,n)},beforeUpdate(e,t,n){e[wn]=va(n)},updated(e,{value:t,modifiers:{number:n}}){e._assigning||ku(e,t,n)}};function ku(e,t,n){const a=e.multiple,r=ke(t);if(!(a&&!r&&!Ba(t))){for(let o=0,s=e.options.length;o<s;o++){const c=e.options[o],u=mr(c);if(a)if(r){const f=typeof u;f==="string"||f==="number"?c.selected=t.includes(n?zr(u):u):c.selected=ls(t,u)>-1}else c.selected=t.has(u);else if(fa(mr(c),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!a&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function mr(e){return"_value"in e?e._value:e.value}function Rf(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Ff={created(e,t,n){Do(e,t,n,null,"created")},mounted(e,t,n){Do(e,t,n,null,"mounted")},beforeUpdate(e,t,n,a){Do(e,t,n,a,"beforeUpdate")},updated(e,t,n,a){Do(e,t,n,a,"updated")}};function Df(e,t){switch(e){case"SELECT":return Sl;case"TEXTAREA":return ma;default:switch(t){case"checkbox":return Il;case"radio":return Tl;default:return ma}}}function Do(e,t,n,a,r){const s=Df(e.tagName,n.props&&n.props.type)[r];s&&s(e,t,n,a)}function ob(){ma.getSSRProps=({value:e})=>({value:e}),Tl.getSSRProps=({value:e},t)=>{if(t.props&&fa(t.props.value,e))return{checked:!0}},Il.getSSRProps=({value:e},t)=>{if(ke(e)){if(t.props&&ls(e,t.props.value)>-1)return{checked:!0}}else if(Ba(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Ff.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=Df(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const sb=["ctrl","shift","alt","meta"],ib={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)=>sb.some(n=>e[`${n}Key`]&&!t.includes(n))},kl=(e,t)=>{const n=e._withMods||(e._withMods={}),a=t.join(".");return n[a]||(n[a]=(r,...o)=>{for(let s=0;s<t.length;s++){const c=ib[t[s]];if(c&&c(r,t))return}return e(r,...o)})},lb={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Zr=(e,t)=>{const n=e._withKeys||(e._withKeys={}),a=t.join(".");return n[a]||(n[a]=r=>{if(!("key"in r))return;const o=gn(r.key);if(t.some(s=>s===o||lb[s]===o))return e(r)})},Vf=yt({patchProp:G_},x_);let jr,Eu=!1;function Bf(){return jr||(jr=lf(Vf))}function Uf(){return jr=Eu?jr:cf(Vf),Eu=!0,jr}const Wi=(...e)=>{Bf().render(...e)},Hf=(...e)=>{Uf().hydrate(...e)},jf=(...e)=>{const t=Bf().createApp(...e),{mount:n}=t;return t.mount=a=>{const r=zf(a);if(!r)return;const o=t._component;!Ve(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.innerHTML="";const s=n(r,!1,Kf(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),s},t},cb=(...e)=>{const t=Uf().createApp(...e),{mount:n}=t;return t.mount=a=>{const r=zf(a);if(r)return n(r,!0,Kf(r))},t};function Kf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function zf(e){return _t(e)?document.querySelector(e):e}let xu=!1;const ub=()=>{xu||(xu=!0,ob(),L_())};/**
* vue v3.4.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const db=()=>{},fb=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:Ud,BaseTransitionPropsValidators:yl,Comment:qt,DeprecationTypes:S_,EffectScope:Zi,ErrorCodes:Qg,ErrorTypeStrings:__,Fragment:xe,KeepAlive:wy,ReactiveEffect:pr,Static:La,Suspense:dy,Teleport:o_,Text:Fa,TrackOpTypes:Gg,Transition:ws,TransitionGroup:Z_,TriggerOpTypes:Yg,VueElement:Cs,assertNumber:Jg,callWithAsyncErrorHandling:yn,callWithErrorHandling:Yn,camelize:nn,capitalize:to,cloneVNode:Fn,compatUtils:T_,compile:db,computed:te,createApp:jf,createBlock:De,createCommentVNode:ve,createElementBlock:P,createElementVNode:H,createHydrationRenderer:cf,createPropsRestProxy:Fy,createRenderer:lf,createSSRApp:cb,createSlots:Iy,createStaticVNode:l_,createTextVNode:pt,createVNode:Fe,customRef:Td,defineAsyncComponent:by,defineComponent:me,defineCustomElement:Nf,defineEmits:Ey,defineExpose:xy,defineModel:Ny,defineOptions:$y,defineProps:ky,defineSSRCustomElement:J_,defineSlots:My,devtools:b_,effect:gg,effectScope:hg,getCurrentInstance:Qn,getCurrentScope:ld,getTransitionRawChildren:gs,guardReactiveProps:gf,h:ha,handleError:ja,hasInjectionContext:Wy,hydrate:Hf,initCustomFormatter:m_,initDirectivesForSSR:ub,inject:K,isMemoSame:If,isProxy:al,isReactive:Na,isReadonly:Pa,isRef:Vt,isRuntimeOnly:p_,isShallow:Wr,isVNode:pa,markRaw:rl,mergeDefaults:Ry,mergeModels:_l,mergeProps:yf,nextTick:Mn,normalizeClass:ct,normalizeProps:ug,normalizeStyle:ht,onActivated:jd,onBeforeMount:yr,onBeforeUnmount:Ka,onBeforeUpdate:Wd,onDeactivated:Kd,onErrorCaptured:Qd,onMounted:Wt,onRenderTracked:Jd,onRenderTriggered:Yd,onScopeDispose:vg,onServerPrefetch:Gd,onUnmounted:za,onUpdated:_s,openBlock:T,popScopeId:Ut,provide:tf,proxyRefs:ll,pushScopeId:Bt,queuePostFlushCb:qo,reactive:ds,readonly:fs,ref:ee,registerRuntimeCompiler:f_,render:Wi,renderList:St,renderSlot:bt,resolveComponent:cy,resolveDirective:Od,resolveDynamicComponent:hl,resolveFilter:I_,resolveTransitionHooks:hr,setBlockTracking:Di,setDevtoolsHook:A_,setTransitionHooks:Ra,shallowReactive:wd,shallowReadonly:Dg,shallowRef:il,ssrContextKey:Rd,ssrUtils:C_,stop:yg,toDisplayString:he,toHandlerKey:Vr,toHandlers:Ty,toRaw:Qe,toRef:ul,toRefs:cl,toValue:Hg,transformVNodeArgs:s_,triggerRef:Ug,unref:$,useAttrs:Py,useCssModule:q_,useCssVars:_r,useModel:oo,useSSRContext:Fd,useSlots:Ly,useTransitionState:gl,vModelCheckbox:Il,vModelDynamic:Ff,vModelRadio:Tl,vModelSelect:Sl,vModelText:ma,vShow:an,version:Tf,warn:y_,watch:Ne,watchEffect:gy,watchPostEffect:Dd,watchSyncEffect:Vd,withAsyncContext:Dy,withCtx:Be,withDefaults:Oy,withDirectives:Mt,withKeys:Zr,withMemo:g_,withModifiers:kl,withScopeId:ay},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:Wf,setPrototypeOf:$u,isFrozen:pb,getPrototypeOf:hb,getOwnPropertyDescriptor:vb}=Object;let{freeze:rn,seal:On,create:Gf}=Object,{apply:Gi,construct:Yi}=typeof Reflect<"u"&&Reflect;rn||(rn=function(t){return t});On||(On=function(t){return t});Gi||(Gi=function(t,n,a){return t.apply(n,a)});Yi||(Yi=function(t,n){return new t(...n)});const Vo=_n(Array.prototype.forEach),Mu=_n(Array.prototype.pop),Or=_n(Array.prototype.push),Go=_n(String.prototype.toLowerCase),yi=_n(String.prototype.toString),mb=_n(String.prototype.match),Lr=_n(String.prototype.replace),gb=_n(String.prototype.indexOf),yb=_n(String.prototype.trim),En=_n(Object.prototype.hasOwnProperty),hn=_n(RegExp.prototype.test),Pr=_b(TypeError);function _n(e){return function(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];return Gi(e,t,a)}}function _b(e){return function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return Yi(e,n)}}function Ye(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Go;$u&&$u(e,null);let a=t.length;for(;a--;){let r=t[a];if(typeof r=="string"){const o=n(r);o!==r&&(pb(t)||(t[a]=o),r=o)}e[r]=!0}return e}function bb(e){for(let t=0;t<e.length;t++)En(e,t)||(e[t]=null);return e}function ka(e){const t=Gf(null);for(const[n,a]of Wf(e))En(e,n)&&(Array.isArray(a)?t[n]=bb(a):a&&typeof a=="object"&&a.constructor===Object?t[n]=ka(a):t[n]=a);return t}function Bo(e,t){for(;e!==null;){const a=vb(e,t);if(a){if(a.get)return _n(a.get);if(typeof a.value=="function")return _n(a.value)}e=hb(e)}function n(){return null}return n}const Nu=rn(["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"]),_i=rn(["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"]),bi=rn(["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"]),Ab=rn(["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"]),Ai=rn(["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"]),wb=rn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ou=rn(["#text"]),Lu=rn(["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"]),wi=rn(["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"]),Pu=rn(["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"]),Uo=rn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Cb=On(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ib=On(/<%[\w\W]*|[\w\W]*%>/gm),Tb=On(/\${[\w\W]*}/gm),Sb=On(/^data-[\-\w.\u00B7-\uFFFF]/),kb=On(/^aria-[\-\w]+$/),Yf=On(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Eb=On(/^(?:\w+script|data):/i),xb=On(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Jf=On(/^html$/i);var Ru=Object.freeze({__proto__:null,MUSTACHE_EXPR:Cb,ERB_EXPR:Ib,TMPLIT_EXPR:Tb,DATA_ATTR:Sb,ARIA_ATTR:kb,IS_ALLOWED_URI:Yf,IS_SCRIPT_OR_DATA:Eb,ATTR_WHITESPACE:xb,DOCTYPE_NAME:Jf});const $b=function(){return typeof window>"u"?null:window},Mb=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let a=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(a=n.getAttribute(r));const o="dompurify"+(a?"#"+a:"");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 Qf(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$b();const t=$e=>Qf($e);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 a=n,r=a.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:c,Element:u,NodeFilter:f,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:m,trustedTypes:I}=e,A=u.prototype,b=Bo(A,"cloneNode"),E=Bo(A,"nextSibling"),j=Bo(A,"childNodes"),M=Bo(A,"parentNode");if(typeof s=="function"){const $e=n.createElement("template");$e.content&&$e.content.ownerDocument&&(n=$e.content.ownerDocument)}let g,y="";const{implementation:C,createNodeIterator:v,createDocumentFragment:D,getElementsByTagName:N}=n,{importNode:Y}=a;let X={};t.isSupported=typeof Wf=="function"&&typeof M=="function"&&C&&C.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:_e,ERB_EXPR:ie,TMPLIT_EXPR:G,DATA_ATTR:fe,ARIA_ATTR:we,IS_SCRIPT_OR_DATA:re,ATTR_WHITESPACE:oe}=Ru;let{IS_ALLOWED_URI:ne}=Ru,be=null;const wt=Ye({},[...Nu,..._i,...bi,...Ai,...Ou]);let He=null;const gt=Ye({},[...Lu,...wi,...Pu,...Uo]);let Ae=Object.seal(Gf(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}})),Le=null,nt=null,Ue=!0,ft=!0,rt=!1,Ct=!0,It=!1,Nt=!1,Cn=!1,S=!1,w=!1,R=!1,V=!1,z=!0,J=!1;const ae="user-content-";let q=!0,ce=!1,Z={},pe=null;const Me=Ye({},["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 Ee=null;const Re=Ye({},["audio","video","img","source","image","track"]);let je=null;const qe=Ye({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tt="http://www.w3.org/1998/Math/MathML",vt="http://www.w3.org/2000/svg",Tt="http://www.w3.org/1999/xhtml";let Xt=Tt,Un=!1,bn=null;const Wa=Ye({},[tt,vt,Tt],yi);let kt=null;const Zt=["application/xhtml+xml","text/html"],_a="text/html";let Et=null,qn=null;const $s=n.createElement("form"),lo=function(F){return F instanceof RegExp||F instanceof Function},Cr=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(qn&&qn===F)){if((!F||typeof F!="object")&&(F={}),F=ka(F),kt=Zt.indexOf(F.PARSER_MEDIA_TYPE)===-1?_a:F.PARSER_MEDIA_TYPE,Et=kt==="application/xhtml+xml"?yi:Go,be=En(F,"ALLOWED_TAGS")?Ye({},F.ALLOWED_TAGS,Et):wt,He=En(F,"ALLOWED_ATTR")?Ye({},F.ALLOWED_ATTR,Et):gt,bn=En(F,"ALLOWED_NAMESPACES")?Ye({},F.ALLOWED_NAMESPACES,yi):Wa,je=En(F,"ADD_URI_SAFE_ATTR")?Ye(ka(qe),F.ADD_URI_SAFE_ATTR,Et):qe,Ee=En(F,"ADD_DATA_URI_TAGS")?Ye(ka(Re),F.ADD_DATA_URI_TAGS,Et):Re,pe=En(F,"FORBID_CONTENTS")?Ye({},F.FORBID_CONTENTS,Et):Me,Le=En(F,"FORBID_TAGS")?Ye({},F.FORBID_TAGS,Et):{},nt=En(F,"FORBID_ATTR")?Ye({},F.FORBID_ATTR,Et):{},Z=En(F,"USE_PROFILES")?F.USE_PROFILES:!1,Ue=F.ALLOW_ARIA_ATTR!==!1,ft=F.ALLOW_DATA_ATTR!==!1,rt=F.ALLOW_UNKNOWN_PROTOCOLS||!1,Ct=F.ALLOW_SELF_CLOSE_IN_ATTR!==!1,It=F.SAFE_FOR_TEMPLATES||!1,Nt=F.WHOLE_DOCUMENT||!1,w=F.RETURN_DOM||!1,R=F.RETURN_DOM_FRAGMENT||!1,V=F.RETURN_TRUSTED_TYPE||!1,S=F.FORCE_BODY||!1,z=F.SANITIZE_DOM!==!1,J=F.SANITIZE_NAMED_PROPS||!1,q=F.KEEP_CONTENT!==!1,ce=F.IN_PLACE||!1,ne=F.ALLOWED_URI_REGEXP||Yf,Xt=F.NAMESPACE||Tt,Ae=F.CUSTOM_ELEMENT_HANDLING||{},F.CUSTOM_ELEMENT_HANDLING&&lo(F.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ae.tagNameCheck=F.CUSTOM_ELEMENT_HANDLING.tagNameCheck),F.CUSTOM_ELEMENT_HANDLING&&lo(F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ae.attributeNameCheck=F.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),F.CUSTOM_ELEMENT_HANDLING&&typeof F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Ae.allowCustomizedBuiltInElements=F.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),It&&(ft=!1),R&&(w=!0),Z&&(be=Ye({},Ou),He=[],Z.html===!0&&(Ye(be,Nu),Ye(He,Lu)),Z.svg===!0&&(Ye(be,_i),Ye(He,wi),Ye(He,Uo)),Z.svgFilters===!0&&(Ye(be,bi),Ye(He,wi),Ye(He,Uo)),Z.mathMl===!0&&(Ye(be,Ai),Ye(He,Pu),Ye(He,Uo))),F.ADD_TAGS&&(be===wt&&(be=ka(be)),Ye(be,F.ADD_TAGS,Et)),F.ADD_ATTR&&(He===gt&&(He=ka(He)),Ye(He,F.ADD_ATTR,Et)),F.ADD_URI_SAFE_ATTR&&Ye(je,F.ADD_URI_SAFE_ATTR,Et),F.FORBID_CONTENTS&&(pe===Me&&(pe=ka(pe)),Ye(pe,F.FORBID_CONTENTS,Et)),q&&(be["#text"]=!0),Nt&&Ye(be,["html","head","body"]),be.table&&(Ye(be,["tbody"]),delete Le.tbody),F.TRUSTED_TYPES_POLICY){if(typeof F.TRUSTED_TYPES_POLICY.createHTML!="function")throw Pr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof F.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Pr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=F.TRUSTED_TYPES_POLICY,y=g.createHTML("")}else g===void 0&&(g=Mb(I,r)),g!==null&&typeof y=="string"&&(y=g.createHTML(""));rn&&rn(F),qn=F}},co=Ye({},["mi","mo","mn","ms","mtext"]),uo=Ye({},["foreignobject","desc","title","annotation-xml"]),Ms=Ye({},["title","style","font","a","script"]),fo=Ye({},[..._i,...bi,...Ab]),po=Ye({},[...Ai,...wb]),Ns=function(F){let de=M(F);(!de||!de.tagName)&&(de={namespaceURI:Xt,tagName:"template"});const Se=Go(F.tagName),ut=Go(de.tagName);return bn[F.namespaceURI]?F.namespaceURI===vt?de.namespaceURI===Tt?Se==="svg":de.namespaceURI===tt?Se==="svg"&&(ut==="annotation-xml"||co[ut]):!!fo[Se]:F.namespaceURI===tt?de.namespaceURI===Tt?Se==="math":de.namespaceURI===vt?Se==="math"&&uo[ut]:!!po[Se]:F.namespaceURI===Tt?de.namespaceURI===vt&&!uo[ut]||de.namespaceURI===tt&&!co[ut]?!1:!po[Se]&&(Ms[Se]||!fo[Se]):!!(kt==="application/xhtml+xml"&&bn[F.namespaceURI]):!1},Hn=function(F){Or(t.removed,{element:F});try{F.parentNode.removeChild(F)}catch{F.remove()}},Ir=function(F,de){try{Or(t.removed,{attribute:de.getAttributeNode(F),from:de})}catch{Or(t.removed,{attribute:null,from:de})}if(de.removeAttribute(F),F==="is"&&!He[F])if(w||R)try{Hn(de)}catch{}else try{de.setAttribute(F,"")}catch{}},Tr=function(F){let de=null,Se=null;if(S)F="<remove></remove>"+F;else{const Rt=mb(F,/^[\r\n\t ]+/);Se=Rt&&Rt[0]}kt==="application/xhtml+xml"&&Xt===Tt&&(F='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+F+"</body></html>");const ut=g?g.createHTML(F):F;if(Xt===Tt)try{de=new m().parseFromString(ut,kt)}catch{}if(!de||!de.documentElement){de=C.createDocument(Xt,"template",null);try{de.documentElement.innerHTML=Un?y:ut}catch{}}const Ot=de.body||de.documentElement;return F&&Se&&Ot.insertBefore(n.createTextNode(Se),Ot.childNodes[0]||null),Xt===Tt?N.call(de,Nt?"html":"body")[0]:Nt?de.documentElement:Ot},Sr=function(F){return v.call(F.ownerDocument||F,F,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT,null)},Os=function(F){return F instanceof d&&(typeof F.nodeName!="string"||typeof F.textContent!="string"||typeof F.removeChild!="function"||!(F.attributes instanceof h)||typeof F.removeAttribute!="function"||typeof F.setAttribute!="function"||typeof F.namespaceURI!="string"||typeof F.insertBefore!="function"||typeof F.hasChildNodes!="function")},ho=function(F){return typeof c=="function"&&F instanceof c},In=function(F,de,Se){X[F]&&Vo(X[F],ut=>{ut.call(t,de,Se,qn)})},ba=function(F){let de=null;if(In("beforeSanitizeElements",F,null),Os(F))return Hn(F),!0;const Se=Et(F.nodeName);if(In("uponSanitizeElement",F,{tagName:Se,allowedTags:be}),F.hasChildNodes()&&!ho(F.firstElementChild)&&hn(/<[/\w]/g,F.innerHTML)&&hn(/<[/\w]/g,F.textContent))return Hn(F),!0;if(!be[Se]||Le[Se]){if(!Le[Se]&&kr(Se)&&(Ae.tagNameCheck instanceof RegExp&&hn(Ae.tagNameCheck,Se)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(Se)))return!1;if(q&&!pe[Se]){const ut=M(F)||F.parentNode,Ot=j(F)||F.childNodes;if(Ot&&ut){const Rt=Ot.length;for(let Yt=Rt-1;Yt>=0;--Yt)ut.insertBefore(b(Ot[Yt],!0),E(F))}}return Hn(F),!0}return F instanceof u&&!Ns(F)||(Se==="noscript"||Se==="noembed"||Se==="noframes")&&hn(/<\/no(script|embed|frames)/i,F.innerHTML)?(Hn(F),!0):(It&&F.nodeType===3&&(de=F.textContent,Vo([_e,ie,G],ut=>{de=Lr(de,ut," ")}),F.textContent!==de&&(Or(t.removed,{element:F.cloneNode()}),F.textContent=de)),In("afterSanitizeElements",F,null),!1)},vo=function(F,de,Se){if(z&&(de==="id"||de==="name")&&(Se in n||Se in $s))return!1;if(!(ft&&!nt[de]&&hn(fe,de))){if(!(Ue&&hn(we,de))){if(!He[de]||nt[de]){if(!(kr(F)&&(Ae.tagNameCheck instanceof RegExp&&hn(Ae.tagNameCheck,F)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(F))&&(Ae.attributeNameCheck instanceof RegExp&&hn(Ae.attributeNameCheck,de)||Ae.attributeNameCheck instanceof Function&&Ae.attributeNameCheck(de))||de==="is"&&Ae.allowCustomizedBuiltInElements&&(Ae.tagNameCheck instanceof RegExp&&hn(Ae.tagNameCheck,Se)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(Se))))return!1}else if(!je[de]){if(!hn(ne,Lr(Se,oe,""))){if(!((de==="src"||de==="xlink:href"||de==="href")&&F!=="script"&&gb(Se,"data:")===0&&Ee[F])){if(!(rt&&!hn(re,Lr(Se,oe,"")))){if(Se)return!1}}}}}}return!0},kr=function(F){return F!=="annotation-xml"&&F.indexOf("-")>0},mo=function(F){In("beforeSanitizeAttributes",F,null);const{attributes:de}=F;if(!de)return;const Se={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:He};let ut=de.length;for(;ut--;){const Ot=de[ut],{name:Rt,namespaceURI:Yt,value:Ln}=Ot,Aa=Et(Rt);let Jt=Rt==="value"?Ln:yb(Ln);if(Se.attrName=Aa,Se.attrValue=Jt,Se.keepAttr=!0,Se.forceKeepAttr=void 0,In("uponSanitizeAttribute",F,Se),Jt=Se.attrValue,Se.forceKeepAttr||(Ir(Rt,F),!Se.keepAttr))continue;if(!Ct&&hn(/\/>/i,Jt)){Ir(Rt,F);continue}It&&Vo([_e,ie,G],yo=>{Jt=Lr(Jt,yo," ")});const go=Et(F.nodeName);if(vo(go,Aa,Jt)){if(J&&(Aa==="id"||Aa==="name")&&(Ir(Rt,F),Jt=ae+Jt),g&&typeof I=="object"&&typeof I.getAttributeType=="function"&&!Yt)switch(I.getAttributeType(go,Aa)){case"TrustedHTML":{Jt=g.createHTML(Jt);break}case"TrustedScriptURL":{Jt=g.createScriptURL(Jt);break}}try{Yt?F.setAttributeNS(Yt,Rt,Jt):F.setAttribute(Rt,Jt),Mu(t.removed)}catch{}}}In("afterSanitizeAttributes",F,null)},Ls=function $e(F){let de=null;const Se=Sr(F);for(In("beforeSanitizeShadowDOM",F,null);de=Se.nextNode();)In("uponSanitizeShadowNode",de,null),!ba(de)&&(de.content instanceof o&&$e(de.content),mo(de));In("afterSanitizeShadowDOM",F,null)};return t.sanitize=function($e){let F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},de=null,Se=null,ut=null,Ot=null;if(Un=!$e,Un&&($e="<!-->"),typeof $e!="string"&&!ho($e))if(typeof $e.toString=="function"){if($e=$e.toString(),typeof $e!="string")throw Pr("dirty is not a string, aborting")}else throw Pr("toString is not a function");if(!t.isSupported)return $e;if(Cn||Cr(F),t.removed=[],typeof $e=="string"&&(ce=!1),ce){if($e.nodeName){const Ln=Et($e.nodeName);if(!be[Ln]||Le[Ln])throw Pr("root node is forbidden and cannot be sanitized in-place")}}else if($e instanceof c)de=Tr("<!---->"),Se=de.ownerDocument.importNode($e,!0),Se.nodeType===1&&Se.nodeName==="BODY"||Se.nodeName==="HTML"?de=Se:de.appendChild(Se);else{if(!w&&!It&&!Nt&&$e.indexOf("<")===-1)return g&&V?g.createHTML($e):$e;if(de=Tr($e),!de)return w?null:V?y:""}de&&S&&Hn(de.firstChild);const Rt=Sr(ce?$e:de);for(;ut=Rt.nextNode();)ba(ut)||(ut.content instanceof o&&Ls(ut.content),mo(ut));if(ce)return $e;if(w){if(R)for(Ot=D.call(de.ownerDocument);de.firstChild;)Ot.appendChild(de.firstChild);else Ot=de;return(He.shadowroot||He.shadowrootmode)&&(Ot=Y.call(a,Ot,!0)),Ot}let Yt=Nt?de.outerHTML:de.innerHTML;return Nt&&be["!doctype"]&&de.ownerDocument&&de.ownerDocument.doctype&&de.ownerDocument.doctype.name&&hn(Jf,de.ownerDocument.doctype.name)&&(Yt="<!DOCTYPE "+de.ownerDocument.doctype.name+`>
`+Yt),It&&Vo([_e,ie,G],Ln=>{Yt=Lr(Yt,Ln," ")}),g&&V?g.createHTML(Yt):Yt},t.setConfig=function(){let $e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Cr($e),Cn=!0},t.clearConfig=function(){qn=null,Cn=!1},t.isValidAttribute=function($e,F,de){qn||Cr({});const Se=Et($e),ut=Et(F);return vo(Se,ut,de)},t.addHook=function($e,F){typeof F=="function"&&(X[$e]=X[$e]||[],Or(X[$e],F))},t.removeHook=function($e){if(X[$e])return Mu(X[$e])},t.removeHooks=function($e){X[$e]&&(X[$e]=[])},t.removeAllHooks=function(){X={}},t}var Nb=Qf();function Ob(e,t){const n=e.hooks??{};let a;for(a in n){const r=n[a];r!==void 0&&t.addHook(a,r)}}function qf(){return Nb()}function Lb(e={},t=qf){const n=t();Ob(e,n);const a=function(r,o){const s=o.value;if(o.oldValue===s)return;const c=`${s}`,u=o.arg,f=e.namedConfigurations,h=e.default??{};if(f&&u!==void 0){r.innerHTML=n.sanitize(c,f[u]??h);return}r.innerHTML=n.sanitize(c,h)};return{mounted:a,updated:a}}const Pb={install(e,t={},n=qf){e.directive("dompurify-html",Lb(t,n))}},Ak=1500,Rb=1e3,Fb=100;function Db(){const t=ee({mode:"ui",settingsBarCollapsed:!1,selection:null,clipboard:null,mutationTransactionsSnapshot:{undo:null,redo:null},logEntries:[]});let n=null,a=0;const r=[],o=G=>{t.value.mode=G},s=()=>t.value.mode,c=(G,fe)=>{if(G===null){t.value.selection=null;return}let we=fe;typeof we>"u"&&(we=document.querySelector(`.ComponentRenderer [data-writer-id="${G}"]`).dataset.writerInstancePath),t.value.selection={componentId:G,instancePath:we}},u=()=>t.value.selection!==null,f=()=>t.value.selection,h=()=>{var G;return(G=t.value.selection)==null?void 0:G.componentId},d=G=>{t.value.clipboard=G},m=()=>t.value.clipboard,I=G=>{t.value.settingsBarCollapsed=G},A=()=>t.value.settingsBarCollapsed,b=(G,fe,we=!1)=>{if(n!==null)return;a<0&&(r.splice(a),a=0);const re=r[r.length-1],oe=Date.now()-(re==null?void 0:re.timestamp);if(re!=null&&re.enableDebounce&&(re==null?void 0:re.id)==G&&oe<Rb){n=r.pop();return}n={id:G,desc:fe,timestamp:null,enableDebounce:we,mutations:{}}},E=G=>{n.mutations[G.id]||(n.mutations[G.id]={jsonPre:G?JSON.stringify(G):void 0})},j=G=>{n.mutations[G.id]||(n.mutations[G.id]={}),n.mutations[G.id].jsonPost=G?JSON.stringify(G):void 0},M=G=>{n.id===G&&(n.timestamp=Date.now(),r.push(n),n=null,C())},g=()=>{const G=r.length-1+a,fe=r[G];return fe&&a--,C(),fe},y=()=>{const G=r.length+a,fe=r[G];return fe&&a++,C(),fe},C=()=>{const G=r.length-1+a,fe=r[G],we=r.length+a,re=r[we];t.value.mutationTransactionsSnapshot={undo:fe,redo:re}},v=()=>t.value.mutationTransactionsSnapshot;async function D(G){const fe=JSON.stringify(G);let we=5981;for(let oe=0;oe<fe.length;oe++)we=(we<<5)+we+fe.charCodeAt(oe);return we.toString(16).padStart(2,"0")}return{setMode:o,getMode:s,setSettingsBarCollapsed:I,isSettingsBarCollapsed:A,isSelectionActive:u,setSelection:c,getSelection:f,getSelectedId:h,setClipboard:d,getClipboard:m,openMutationTransaction:b,registerPreMutation:E,registerPostMutation:j,closeMutationTransaction:M,consumeUndoTransaction:g,consumeRedoTransaction:y,getMutationTransactionsSnapshot:v,handleLogEntry:async G=>{const{type:fe,title:we,message:re,code:oe}=G,ne=await D(G),be=t.value.logEntries.find(wt=>wt.fingerprint===ne);if(be){be.repeated++,be.timestampReceived=new Date,t.value.logEntries.sort((wt,He)=>wt.timestampReceived<He.timestampReceived?1:-1);return}t.value.logEntries.unshift({type:fe,title:we,message:re,code:oe,timestampReceived:new Date,fingerprint:ne,repeated:0}),t.value.logEntries.splice(Fb)},getLogEntryCount:()=>t.value.logEntries.length,clearLogEntries:()=>{t.value.logEntries=[]},getLogEntries:()=>t.value.logEntries}}const W={core:Symbol(),builderManager:Symbol(),evaluatedFields:Symbol(),componentId:Symbol(),isBeingEdited:Symbol(),isDisabled:Symbol(),getChildrenVNodes:Symbol(),renderProxiedComponent:Symbol(),instancePath:Symbol(),flattenedInstancePath:Symbol(),instanceData:Symbol()};var Vb=(e=>(e.Cut="cut",e.Copy="copy",e))(Vb||{}),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))(L||{}),Te=(e=>(e.General="General",e.Style="Style",e))(Te||{}),Is=(e=>(e.Text="Text",e.Textarea="Textarea",e))(Is||{});const Gt={name:"Accent",type:L.Color,category:Te.Style,applyStyleVariable:!0},At={name:"Primary text",type:L.Color,category:Te.Style,applyStyleVariable:!0},fn={name:"Secondary text",type:L.Color,category:Te.Style,applyStyleVariable:!0},Xf={name:"Emptiness",desc:"Page background color",type:L.Color,category:Te.Style,applyStyleVariable:!0},Dn={name:"Container background",type:L.Color,category:Te.Style,applyStyleVariable:!0},br={name:"Container shadow",type:L.Shadow,category:Te.Style,applyStyleVariable:!0},Pt={name:"Separator",type:L.Color,category:Te.Style,applyStyleVariable:!0},Vn={name:"Button",type:L.Color,category:Te.Style,applyStyleVariable:!0},Bn={name:"Button text",type:L.Color,category:Te.Style,applyStyleVariable:!0},ga={name:"Button shadow",type:L.Shadow,category:Te.Style,applyStyleVariable:!0},Oe={name:"Custom CSS classes",type:L.Text,category:Te.Style,desc:"CSS classes, separated by spaces. You can define classes in custom stylesheets."},Bb={name:"Content width",type:L.Width,default:"100%",category:Te.Style,desc:"Configure content width using CSS units, e.g. 100px, 50%, 10vw, etc."},Ar={name:"Content alignment (H)",type:L.HAlign,default:"unset",category:Te.Style},Zf={name:"Content alignment (V)",type:L.VAlign,default:"unset",category:Te.Style},wr={name:"Padding",type:L.Padding,default:"0",category:Te.Style},Ub=Object.freeze(Object.defineProperty({__proto__:null,accentColor:Gt,buttonColor:Vn,buttonShadow:ga,buttonTextColor:Bn,containerBackgroundColor:Dn,containerShadow:br,contentHAlign:Ar,contentPadding:wr,contentVAlign:Zf,contentWidth:Bb,cssClasses:Oe,emptinessColor:Xf,primaryTextColor:At,secondaryTextColor:fn,separatorColor:Pt},Symbol.toStringTag,{value:"Module"})),Hb={class:"material-symbols-outlined"},jb=["placeholder"],Kb=me({__name:"WdsTextInput",props:_l({leftIcon:{type:String,required:!1,default:void 0},placeholder:{type:String,required:!1,default:void 0}},{modelValue:{type:String},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=oo(e,"modelValue"),n=ee();return(a,r)=>e.leftIcon?(T(),P("div",{key:0,class:"WdsTextInput WdsTextInput--leftIcon",onClick:r[1]||(r[1]=o=>n.value.focus())},[H("i",Hb,he(e.leftIcon),1),Mt(H("input",{ref_key:"input",ref:n,"onUpdate:modelValue":r[0]||(r[0]=o=>t.value=o),type:"text",placeholder:e.placeholder},null,8,jb),[[ma,t.value]])])):Mt((T(),P("input",{key:1,"onUpdate:modelValue":r[2]||(r[2]=o=>t.value=o),type:"text",class:"WdsTextInput"},null,512)),[[ma,t.value]])}}),ye=(e,t)=>{const n=e.__vccOpts||e;for(const[a,r]of t)n[a]=r;return n},zb=ye(Kb,[["__scopeId","data-v-dceb6d0f"]]),Wb={};function Gb(e,t){return T(),P("button",null,[bt(e.$slots,"default",{},void 0,!0)])}const xn=ye(Wb,[["render",Gb],["__scopeId","data-v-75345289"]]),Yb={key:0,class:"BaseMarkdown markdown"},Jb=me({__name:"BaseMarkdown",props:{rawText:{}},setup(e){let t;const n=ee(!1),a=e;return yr(async()=>{t=await tn(()=>import("./marked.esm-273vDTCT.js"),[],import.meta.url),n.value=!0}),(r,o)=>{const s=Od("dompurify-html");return n.value?Mt((T(),P("div",Yb,null,512)),[[s,$(t).parse(a.rawText).trim()]]):ve("",!0)}}}),El=ye(Jb,[["__scopeId","data-v-f3d52aa9"]]),Ts=e=>(Bt("data-v-d16683f5"),e=e(),Ut(),e),Qb={key:0},qb=Ts(()=>H("i",{class:"material-symbols-outlined"}," download ",-1)),Xb={key:0,"data-writer-grid-col":"0",class:"cell headerCell indexCell"},Zb=Ts(()=>H("div",{class:"name"},null,-1)),e0=Ts(()=>H("div",{class:"widthAdjuster"},null,-1)),t0=[Zb,e0],n0=["data-writer-grid-col","onClick"],a0={class:"name"},r0={class:"material-symbols-outlined"},o0={class:"material-symbols-outlined"},s0=Ts(()=>H("div",{class:"widthAdjuster"},null,-1)),i0={key:0,class:"cell indexCell"},l0="A component to display Pandas DataFrames.",c0="data:application/vnd.apache.arrow.file;base64,QVJST1cxAAD/////iAMAABAAAAAAAAoADgAGAAUACAAKAAAAAAEEABAAAAAAAAoADAAAAAQACAAKAAAAlAIAAAQAAAABAAAADAAAAAgADAAEAAgACAAAAGwCAAAEAAAAXwIAAHsiaW5kZXhfY29sdW1ucyI6IFsiX19pbmRleF9sZXZlbF8wX18iXSwgImNvbHVtbl9pbmRleGVzIjogW3sibmFtZSI6IG51bGwsICJmaWVsZF9uYW1lIjogbnVsbCwgInBhbmRhc190eXBlIjogInVuaWNvZGUiLCAibnVtcHlfdHlwZSI6ICJvYmplY3QiLCAibWV0YWRhdGEiOiB7ImVuY29kaW5nIjogIlVURi04In19XSwgImNvbHVtbnMiOiBbeyJuYW1lIjogImNvbF9hIiwgImZpZWxkX25hbWUiOiAiY29sX2EiLCAicGFuZGFzX3R5cGUiOiAiaW50NjQiLCAibnVtcHlfdHlwZSI6ICJpbnQ2NCIsICJtZXRhZGF0YSI6IG51bGx9LCB7Im5hbWUiOiAiY29sX2IiLCAiZmllbGRfbmFtZSI6ICJjb2xfYiIsICJwYW5kYXNfdHlwZSI6ICJpbnQ2NCIsICJudW1weV90eXBlIjogImludDY0IiwgIm1ldGFkYXRhIjogbnVsbH0sIHsibmFtZSI6IG51bGwsICJmaWVsZF9uYW1lIjogIl9faW5kZXhfbGV2ZWxfMF9fIiwgInBhbmRhc190eXBlIjogImludDY0IiwgIm51bXB5X3R5cGUiOiAiaW50NjQiLCAibWV0YWRhdGEiOiBudWxsfV0sICJjcmVhdG9yIjogeyJsaWJyYXJ5IjogInB5YXJyb3ciLCAidmVyc2lvbiI6ICIxMi4wLjAifSwgInBhbmRhc192ZXJzaW9uIjogIjEuNS4zIn0ABgAAAHBhbmRhcwAAAwAAAIgAAABEAAAABAAAAJT///8AAAECEAAAACQAAAAEAAAAAAAAABEAAABfX2luZGV4X2xldmVsXzBfXwAAAJD///8AAAABQAAAAND///8AAAECEAAAABgAAAAEAAAAAAAAAAUAAABjb2xfYgAAAMD///8AAAABQAAAABAAFAAIAAYABwAMAAAAEAAQAAAAAAABAhAAAAAgAAAABAAAAAAAAAAFAAAAY29sX2EAAAAIAAwACAAHAAgAAAAAAAABQAAAAAAAAAD/////6AAAABQAAAAAAAAADAAWAAYABQAIAAwADAAAAAADBAAYAAAAMAAAAAAAAAAAAAoAGAAMAAQACAAKAAAAfAAAABAAAAACAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAABAAAAAAAAAAAAAAAAMAAAACAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAIAAAAAAAAAAwAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAD/////AAAAABAAAAAMABQABgAIAAwAEAAMAAAAAAAEADwAAAAoAAAABAAAAAEAAACYAwAAAAAAAPAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAACgAMAAAABAAIAAoAAACUAgAABAAAAAEAAAAMAAAACAAMAAQACAAIAAAAbAIAAAQAAABfAgAAeyJpbmRleF9jb2x1bW5zIjogWyJfX2luZGV4X2xldmVsXzBfXyJdLCAiY29sdW1uX2luZGV4ZXMiOiBbeyJuYW1lIjogbnVsbCwgImZpZWxkX25hbWUiOiBudWxsLCAicGFuZGFzX3R5cGUiOiAidW5pY29kZSIsICJudW1weV90eXBlIjogIm9iamVjdCIsICJtZXRhZGF0YSI6IHsiZW5jb2RpbmciOiAiVVRGLTgifX1dLCAiY29sdW1ucyI6IFt7Im5hbWUiOiAiY29sX2EiLCAiZmllbGRfbmFtZSI6ICJjb2xfYSIsICJwYW5kYXNfdHlwZSI6ICJpbnQ2NCIsICJudW1weV90eXBlIjogImludDY0IiwgIm1ldGFkYXRhIjogbnVsbH0sIHsibmFtZSI6ICJjb2xfYiIsICJmaWVsZF9uYW1lIjogImNvbF9iIiwgInBhbmRhc190eXBlIjogImludDY0IiwgIm51bXB5X3R5cGUiOiAiaW50NjQiLCAibWV0YWRhdGEiOiBudWxsfSwgeyJuYW1lIjogbnVsbCwgImZpZWxkX25hbWUiOiAiX19pbmRleF9sZXZlbF8wX18iLCAicGFuZGFzX3R5cGUiOiAiaW50NjQiLCAibnVtcHlfdHlwZSI6ICJpbnQ2NCIsICJtZXRhZGF0YSI6IG51bGx9XSwgImNyZWF0b3IiOiB7ImxpYnJhcnkiOiAicHlhcnJvdyIsICJ2ZXJzaW9uIjogIjEyLjAuMCJ9LCAicGFuZGFzX3ZlcnNpb24iOiAiMS41LjMifQAGAAAAcGFuZGFzAAADAAAAiAAAAEQAAAAEAAAAlP///wAAAQIQAAAAJAAAAAQAAAAAAAAAEQAAAF9faW5kZXhfbGV2ZWxfMF9fAAAAkP///wAAAAFAAAAA0P///wAAAQIQAAAAGAAAAAQAAAAAAAAABQAAAGNvbF9iAAAAwP///wAAAAFAAAAAEAAUAAgABgAHAAwAAAAQABAAAAAAAAECEAAAACAAAAAEAAAAAAAAAAUAAABjb2xfYQAAAAgADAAIAAcACAAAAAAAAAFAAAAAsAMAAEFSUk9XMQ==",u0={writer:{name:"DataFrame",description:l0,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:c0},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:Te.Style,default:"10"},wrapText:{name:"Wrap text",type:L.Text,category:Te.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:At,secondaryTextColor:fn,separatorColor:Pt,dataframeBackgroundColor:{name:"Background",type:L.Color,category:Te.Style,default:"#ffffff",applyStyleVariable:!0},fontStyle:{name:"Font style",type:L.Text,category:Te.Style,options:{normal:"normal",monospace:"monospace"},default:"normal"},cssClasses:Oe}}},d0=me({...u0,__name:"CoreDataframe",setup(e){_r(Ae=>({83651982:D.value?"sticky":"unset"}));const t=1e3,n=36,a=80,r=300,o=/^__index_level_[0-9]+__$/,s=K(W.evaluatedFields),c=ee(),u=ee(),f=ee();let h=null;const d=ee(null),m=ee([]),I=te(()=>s.showIndex.value=="yes"),A=ee(null),b=ee(0),E=ee([]);let j=null;const M=te(()=>{var Ae;return d.value?(Ae=d.value)==null?void 0:Ae.columnNames():[]}),g=te(()=>M.value.filter(Ae=>m.value.includes(Ae))),y=te(()=>M.value.filter(Le=>{const nt=m.value.includes(Le),Ue=o.test(Le);return!(nt&&Ue)})),C=te(()=>(I.value?1:0)+y.value.length),v=te(()=>{var Ae;return((Ae=d.value)==null?void 0:Ae.numRows())??0}),D=te(()=>v.value>t),N=te(()=>Math.min(s.displayRowCount.value,v.value)),Y=te(()=>{let Ae;return s.wrapText.value=="yes"?Ae=v.value-1:Ae=v.value-N.value,Math.min(Math.ceil(b.value*Ae),Ae)}),X=te(()=>{if(!d.value)return null;const Ae=D.value?Y.value:0,Le=D.value?N.value:t,nt=d.value.objects({offset:Ae,limit:Le}),Ue=d.value.indices().slice(Y.value,Y.value+N.value);return{data:nt,indices:Ue}}),_e=te(()=>{const Ae=s.fontStyle.value;let Le;return E.value.length==0?Le=`repeat(${C.value}, minmax(min-content, 1fr))`:Le=E.value.map(nt=>`${Math.max(nt,a)}px`).join(" "),{"min-height":`${n*(1+s.displayRowCount.value)}px`,"max-height":`${(N.value+1)*n}px`,"font-family":Ae=="monospace"?"monospace":void 0,"grid-template-columns":Le,"grid-template-rows":`${n}px repeat(${N.value}, min-content)`}}),ie=te(()=>({top:`${n*v.value}px`}));function G(){const Ae=f.value.scrollTop;b.value=Ae/(f.value.scrollHeight-f.value.clientHeight)}function fe(){f.value.scrollTop=0}async function we(){var Le;E.value=[],await Mn();const Ae=(Le=f.value)==null?void 0:Le.querySelectorAll("[data-writer-grid-col]");Ae==null||Ae.forEach(nt=>{const Ue=nt,ft=Ue.dataset.writerGridCol,{width:rt}=Ue.getBoundingClientRect(),Ct=Math.min(rt,r);E.value[ft]=Ct})}function re(Ae,Le){var rt,Ct;if(Ae.target.classList.contains("widthAdjuster"))return;if(((rt=A.value)==null?void 0:rt.columnName)!==Le){A.value={columnName:Le,descending:!1};return}if((Ct=A.value)==null?void 0:Ct.descending){A.value=null;return}A.value={columnName:Le,descending:!A.value.descending}}function oe(Ae){const Le=Ae.schema.metadata.get("pandas");return Le?JSON.parse(Le).index_columns:[]}async function ne(){const Ae=await tn(()=>import("./index-DaNZqg5r.js"),__vite__mapDeps([0,1]),import.meta.url),{tableFromIPC:Le}=await tn(()=>import("./Arrow.dom-C52_vrWm.js"),__vite__mapDeps([2,1]),import.meta.url),nt=s.dataframe.value;try{const rt=await(await(await fetch(nt)).blob()).arrayBuffer(),Ct=Le(rt);m.value=oe(Ct),h=Ae.fromArrow(Ct),d.value=h}catch(Ue){console.error("Couldn't load dataframe from Arrow URL.",Ue)}}function be(){const Ae=d.value.toCSV(),Le=document.createElement("a"),nt=new Blob([Ae],{type:"text/csv"}),Ue=URL.createObjectURL(nt);Le.href=Ue,Le.download="data.csv",Le.click(),URL.revokeObjectURL(Ue)}async function wt(){const Ae=await tn(()=>import("./index-DaNZqg5r.js"),__vite__mapDeps([0,1]),import.meta.url);if(A.value===null){d.value=d.value.unorder();return}let Le;A.value.descending?Le=Ae.desc(A.value.columnName):Le=A.value.columnName,d.value=d.value.orderby(Le)}async function He(Ae){const Le=Ae.target.value;if(!Le)d.value=h;else{const nt=new RegExp(Le,"i"),ft="(d, $) => "+h.columnNames().map(rt=>`aq.op.match(d.${rt}, $.pattern) !== null`).join(" || ");d.value=h.params({pattern:nt,filterS:ft}).filter(ft)}await Mn(),fe()}async function gt(Ae){if(Ae.buttons!==1){j=null;return}const Le=Ae.target;if(!c.value.contains(Le))return;if(j===null&&Le.classList.contains("widthAdjuster")){const Nt=Le.closest(".cell");j=parseInt(Nt.dataset.writerGridCol)}else if(j===null)return;const nt=f.value.querySelector(`[data-writer-grid-col="${j}"]`),Ue=nt.querySelector(".widthAdjuster"),{width:ft}=Ue.getBoundingClientRect(),{left:rt}=nt.getBoundingClientRect(),It=Ae.clientX-rt+ft/2;E.value[j]=It}return Ne(s.dataframe,()=>{ne()}),Ne(A,async()=>{await wt()}),Ne(C,()=>{we()}),Ne(s.wrapText,()=>{we()}),Wt(async()=>{await ne(),document.addEventListener("mousemove",gt),u.value&&new ResizeObserver(we).observe(u.value,{box:"border-box"})}),za(()=>{document.removeEventListener("mousemove",gt)}),(Ae,Le)=>{var nt;return T(),P("div",{ref_key:"rootEl",ref:c,class:"CoreDataframe"},[H("div",{ref_key:"toolsEl",ref:u,class:"tools"},[$(s).enableSearch.value==="yes"?(T(),P("div",Qb,[Fe(zb,{class:"search",placeholder:"Search","left-icon":"search",onChange:He})])):ve("",!0),$(s).enableDownload.value==="yes"?(T(),De(xn,{key:1,title:"Download",class:"download",onClick:be},{default:Be(()=>[qb]),_:1})):ve("",!0)],512),H("div",{ref_key:"gridContainerEl",ref:f,class:"gridContainer",onScroll:G},[H("div",{class:ct(["grid",{scrolled:Y.value>0,wrapText:$(s).wrapText.value==="yes"}]),style:ht(_e.value)},[I.value?(T(),P("div",Xb,t0)):ve("",!0),(T(!0),P(xe,null,St(y.value,(Ue,ft)=>{var rt,Ct,It;return T(),P("div",{key:Ue,"data-writer-grid-col":ft+(I.value?1:0),class:"cell headerCell",onClick:Nt=>re(Nt,Ue)},[H("div",a0,he(Ue),1),H("div",{class:"icon",style:ht({visibility:((rt=A.value)==null?void 0:rt.columnName)==Ue?"visible":"hidden"})},[Mt(H("span",r0," arrow_downward ",512),[[an,!((Ct=A.value)!=null&&Ct.descending)]]),Mt(H("span",o0," arrow_upward ",512),[[an,(It=A.value)==null?void 0:It.descending]])],4),s0],8,n0)}),128)),(T(!0),P(xe,null,St((nt=X.value)==null?void 0:nt.data,(Ue,ft)=>(T(),P(xe,{key:ft},[I.value?(T(),P("div",i0,[m.value.length==0?(T(),P(xe,{key:0},[pt(he(X.value.indices[ft]),1)],64)):(T(),P(xe,{key:1},[pt(he(g.value.map(rt=>Ue[rt]).join(", ")),1)],64))])):ve("",!0),(T(!0),P(xe,null,St(y.value,rt=>(T(),P("div",{key:rt,class:"cell"},[$(s).useMarkdown.value=="yes"?(T(),De(El,{key:0,"raw-text":Ue[rt]},null,8,["raw-text"])):(T(),P(xe,{key:1},[pt(he(Ue[rt]),1)],64))]))),128))],64))),128))],6),D.value?(T(),P("div",{key:0,class:"endpoint",style:ht(ie.value)},null,4)):ve("",!0)],544)],512)}}}),f0=ye(d0,[["__scopeId","data-v-d16683f5"]]),p0={key:0},h0={key:1},v0={key:2},m0={key:3},g0="A text component used to display headings or titles in different sizes and styles.",y0={writer:{name:"Heading",description:g0,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:Te.Style},alignment:{name:"Alignment",default:"left",type:L.Text,category:Te.Style,options:{left:"Left",center:"Center",right:"Right"}},primaryTextColor:At,cssClasses:Oe},previewField:"text"}},_0=me({...y0,__name:"CoreHeading",setup(e){const t=K(W.evaluatedFields);return(n,a)=>(T(),P("div",{class:"CoreHeading",style:ht({"text-align":$(t).alignment.value})},[$(t).headingType.value=="h1"?(T(),P("h1",p0,he($(t).text.value),1)):$(t).headingType.value=="h3"?(T(),P("h3",h0,he($(t).text.value),1)):$(t).headingType.value=="h4"?(T(),P("h4",v0,he($(t).text.value),1)):(T(),P("h2",m0,he($(t).text.value),1))],4))}}),b0=ye(_0,[["__scopeId","data-v-1e1b3959"]]),A0={class:"icon"},w0={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:Te.Style,default:"arrow_forward"},size:{name:"Icon size",type:L.Number,desc:"Icon size in px",category:Te.Style,default:"14"},color:{name:"Icon color",type:L.Color,category:Te.Style},cssClasses:Oe},previewField:"icon"}},ep=me({...w0,__name:"CoreIcon",setup(e){const t=K(W.evaluatedFields);return(n,a)=>(T(),P("div",A0,[$(t).icon.value?(T(),P("span",{key:0,class:"material-symbols-outlined",style:ht({fontSize:`${$(t).size.value}px`,color:$(t).color.value})},he($(t).icon.value),5)):ve("",!0)]))}}),Fu=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 Fu=="function"&&Fu(ep);const C0=ye(ep,[["__scopeId","data-v-2f1b15f5"]]);function Ss(e){const t={ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey};return new CustomEvent("wf-click",{detail:{payload:t}})}function I0(e){const t={key:e.key,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey};return new CustomEvent("wf-keydown",{detail:{payload:t}})}const T0=["src","alt"],S0={key:0,class:"captionContainer"},k0="A component to display images.",E0=`
def click_handler(state):

	# Increment counter when the image is clicked

	state["counter"] += 1`,x0={writer:{name:"Image",description:k0,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:Te.Style},maxHeight:{name:"Max height (px)",type:L.Number,default:"-1",category:Te.Style},secondaryTextColor:fn,cssClasses:Oe},events:{"wf-click":{desc:"Capture single clicks.",stub:E0.trim()}},previewField:"caption"}},tp=me({...x0,__name:"CoreImage",setup(e){const t=ee(null),n=K(W.core),a=K(W.evaluatedFields),r=K(W.componentId),o=te(()=>{var h;return{cursor:typeof((h=n.getComponentById(r).handlers)==null?void 0:h["wf-click"])<"u"?"pointer":"unset"}}),s=te(()=>{const u=a.maxWidth.value,f=a.maxHeight.value;return{"max-width":u!==-1?`${u}px`:void 0,"max-height":f!==-1?`${f}px`:void 0}});function c(u){const f=Ss(u);t.value.dispatchEvent(f)}return(u,f)=>(T(),P("div",{ref_key:"rootEl",ref:t,class:"CoreImage",style:ht(o.value),onClick:c},[H("img",{src:$(a).src.value,alt:$(a).caption.value,draggable:"false",style:ht(s.value)},null,12,T0),$(a).caption.value||$(a).caption.value===0?(T(),P("div",S0,he($(a).caption.value),1)):ve("",!0)],4))}}),Du=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 Du=="function"&&Du(tp);const $0=ye(tp,[["__scopeId","data-v-ed8e7850"]]),M0={},N0=e=>(Bt("data-v-5a38f374"),e=e(),Ut(),e),O0={class:"LoadingSymbol"},L0=N0(()=>H("div",null,null,-1)),P0=[L0];function R0(e,t){return T(),P("div",O0,P0)}const xl=ye(M0,[["render",R0],["__scopeId","data-v-5a38f374"]]),F0={class:"BaseEmptiness"},D0={class:"content"},V0={class:"title"},B0={key:0,class:"message"},U0=me({__name:"BaseEmptiness",props:{componentId:{type:String,required:!0},message:{type:String,required:!1,default:void 0}},setup(e){const t=e,n=K(W.core),a=te(()=>n.getComponentById(t.componentId)),r=te(()=>n.getComponentDefinition(a.value.type));return(o,s)=>(T(),P("div",F0,[H("div",D0,[H("div",V0,[H("h3",null,"Empty "+he(r.value.name),1)]),e.message?(T(),P("div",B0,he(e.message),1)):ve("",!0)])]))}}),$l=ye(U0,[["__scopeId","data-v-c6c8cdaf"]]),H0={key:0,class:"message"},j0="A component that displays a message in various styles, including success, error, warning, and informational.",K0={writer:{name:"Message",description:j0,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:"#A9F9E1",type:L.Color,category:Te.Style},errorColor:{name:"Error",default:"#FFCFC2",type:L.Color,category:Te.Style},warningColor:{name:"Warning",default:"#FFE999",type:L.Color,category:Te.Style},infoColor:{name:"Info",default:"#E4E9FF",type:L.Color,category:Te.Style},loadingColor:{name:"Loading",default:"#E4E9FF",type:L.Color,category:Te.Style},primaryTextColor:At,cssClasses:Oe},previewField:"name"}},np=me({...K0,__name:"CoreMessage",setup(e){const t=K(W.componentId),n=K(W.evaluatedFields),a=K(W.isBeingEdited),r=te(()=>{const c=n.message.value;if(!c)return"neutral";const u=c.charAt(0);return u=="+"?"success":u=="-"?"error":u=="!"?"warning":u=="%"?"loading":"info"}),o=te(()=>{const c=n.message.value;if(!c)return;const u=c.charAt(0);return u=="+"||u=="-"||u=="!"||u=="%"?c.substring(1).trim():c}),s=te(()=>({"--messageActiveSeverityColor":{error:n.errorColor.value,success:n.successColor.value,warning:n.warningColor.value,info:n.infoColor.value,loading:n.loadingColor.value}[r.value]}));return(c,u)=>o.value||$(a)?(T(),P("div",{key:0,class:ct(["CoreMessage",r.value]),style:ht(s.value)},[o.value?(T(),P("div",H0,[r.value=="loading"?(T(),De(xl,{key:0,class:"loadingSymbol"})):ve("",!0),H("span",null,he(o.value),1)])):(T(),De($l,{key:1,"component-id":$(t)},null,8,["component-id"]))],6)):ve("",!0)}}),Vu=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 Vu=="function"&&Vu(np);const z0=ye(np,[["__scopeId","data-v-b02413ad"]]),W0={key:0,class:"name"},G0={key:1,class:"description"},Y0={class:"value"},J0={key:2,class:"note"},Q0="A component that prominently displays a metric value and associated information.",q0={writer:{name:"Metric",description:Q0,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:At,secondaryTextColor:fn,positiveColor:{name:"Positive",default:"#a9f9e1",type:L.Color,category:Te.Style},neutralColor:{name:"Neutral",default:"var(--separatorColor)",type:L.Color,category:Te.Style},negativeColor:{name:"Negative",default:"#ffcfc2",type:L.Color,category:Te.Style},cssClasses:Oe},previewField:"name"}},X0=me({...q0,__name:"CoreMetric",setup(e){const t=K(W.evaluatedFields),n=te(()=>{const o=t.note.value;if(!o)return"neutral";const s=o.charAt(0);return s=="+"?"positive":s=="-"?"negative":"neutral"}),a=te(()=>{const o=t.note.value;if(!o)return;const s=o.charAt(0);return s=="+"||s=="-"?o.substring(1):o}),r=te(()=>({"--messageActiveSentimentColor":{positive:t.positiveColor.value,neutral:t.neutralColor.value,negative:t.negativeColor.value}[n.value]}));return(o,s)=>(T(),P("div",{class:"CoreMetric",style:ht(r.value)},[$(t).name.value?(T(),P("div",W0,he($(t).name.value),1)):ve("",!0),$(t).description.value?(T(),P("div",G0,he($(t).description.value),1)):ve("",!0),H("h2",Y0,he($(t).metricValue.value),1),a.value?(T(),P("div",J0,he(a.value),1)):ve("",!0)],4))}}),Z0=ye(X0,[["__scopeId","data-v-171411f0"]]),eA=e=>(Bt("data-v-d4ebc632"),e=e(),Ut(),e),tA=eA(()=>H("div",{class:"mask"},null,-1)),nA="A component that displays Plotly graphs.",aA={data:[{x:["a","b","c"],y:[22,25,29],type:"bar"}]},rA={writer:{name:"Plotly Graph",description:nA,category:"Content",fields:{spec:{name:"Graph specification",default:JSON.stringify(aA,null,2),desc:"Plotly graph specification. Pass it using state, e.g. @{fig}, or paste a JSON specification.",type:L.Object},cssClasses:Oe},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."}}}},ap=me({...rA,__name:"CorePlotlyGraph",setup(e){const t=ee(null),n=ee(null),a=K(W.evaluatedFields),r=te(()=>a.spec.value),o={paper_bgcolor:"#ffffff",plot_bgcolor:"#f5f5f9",colorway:["#6985FF","#A95EF8","#F86","#3BDCAB"],font:{family:"Poppins, sans-serif",size:12,color:"#000000"},hoverlabel:{color:"#ffffff",bgcolor:"#000000"}},s=async()=>{var I,A,b;if(!r.value||!n.value)return;const d=await tn(()=>import("./plotly.min-UNe_QNsO.js").then(E=>E.p),[],import.meta.url);if(!t.value||t.value.clientHeight==0)return;const m={...r.value,layout:{...o,...(I=r.value)==null?void 0:I.layout}};d.newPlot(n.value,m),u(),(b=(A=r.value)==null?void 0:A.layout)!=null&&b.autosize&&c()};function c(){const d=t.value.parentElement;d!=null&&d.clientHeight&&(t.value.style.height="100%",n.value.style.height="100%")}function u(){n.value.on("plotly_click",h("plotly-click")),n.value.on("plotly_selected",h("plotly-selected")),n.value.on("plotly_deselect",h("plotly-deselect"))}function f(d){var m,I;return{curveNumber:d.curveNumber,pointNumber:d.pointNumber,pointNumbers:d.pointNumbers,x:d.x,y:d.y,z:d.z,label:d.label,lat:d.lat,lon:d.lon,xaxis:{anchor:(m=d.xaxis)==null?void 0:m.anchor},yaxis:{anchor:(I=d.yaxis)==null?void 0:I.anchor}}}function h(d){return m=>{var A;const I=new CustomEvent(d,{detail:{payload:(A=m==null?void 0:m.points)==null?void 0:A.map(b=>f(b))}});t.value.dispatchEvent(I)}}return Ne(r,d=>{d&&s()}),Wt(async()=>{await s(),t.value&&new ResizeObserver(s).observe(t.value,{box:"border-box"})}),(d,m)=>(T(),P("div",{ref_key:"rootEl",ref:t,class:"CorePlotlyGraph"},[H("div",{ref_key:"chartTargetEl",ref:n,class:"target"},null,512),tA],512))}}),Bu=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 Bu=="function"&&Bu(ap);const oA=ye(ap,[["__scopeId","data-v-d4ebc632"]]),sA=`
def click_handler(state):

	# Increment counter when the text is clicked

	state["counter"] += 1`,iA="A component to display plain text or formatted text using Markdown syntax.",lA={writer:{name:"Text",description:iA,category:"Content",fields:{text:{name:"Text",init:"Text",desc:"Add text directly, or reference state elements with @{my_text}.",type:L.Text,control:Is.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:Te.Style},primaryTextColor:At,cssClasses:Oe},events:{"wf-click":{desc:"Capture single clicks.",stub:sA.trim()}},previewField:"text"}},cA=me({...lA,__name:"CoreText",setup(e){const t=ee(null),n=K(W.evaluatedFields),a=K(W.componentId),r=K(W.core),o=K(W.isBeingEdited),s=te(()=>!n.text.value),c=te(()=>!s.value||o.value),u=te(()=>{var I;return{cursor:typeof((I=r.getComponentById(a).handlers)==null?void 0:I.click)<"u"?"pointer":"unset"}}),f=te(()=>({"text-align":n.alignment.value}));function h(d){const m=Ss(d);t.value.dispatchEvent(m)}return(d,m)=>c.value?(T(),P("div",{key:0,ref_key:"rootEl",ref:t,class:"CoreText",style:ht(u.value),onClick:h},[s.value?(T(),De($l,{key:0,"component-id":$(a)},null,8,["component-id"])):(T(),P(xe,{key:1},[$(n).useMarkdown.value=="yes"?(T(),De(El,{key:0,"raw-text":$(n).text.value,style:ht(f.value)},null,8,["raw-text","style"])):(T(),P("div",{key:1,class:"plainText",style:ht(f.value)},he($(n).text.value),5))],64))],4)):ve("",!0)}}),uA=ye(cA,[["__scopeId","data-v-0a7c171b"]]),rp="A component that displays Vega-Lite/Altair charts.",dA={$schema:"https://vega.github.io/schema/vega-lite/v5.json",description:rp,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"}}},fA={writer:{name:"Vega Lite Chart",description:rp,category:"Content",fields:{spec:{name:"Chart specification",default:JSON.stringify(dA,null,2),desc:"Vega-Lite chart specification. Pass a Vega Altair chart using state or paste a JSON specification.",type:L.Object},cssClasses:Oe}}},op=me({...fA,__name:"CoreVegaLiteChart",setup(e){const t=ee(null),n=ee(null),a=K(W.evaluatedFields),r=async()=>{if(!a.spec.value||!n.value)return;const{default:o}=await tn(()=>import("./vega-embed.module-Dq1FOBEP.js"),[],import.meta.url);await o(n.value,a.spec.value)};return Ne(()=>a.spec.value,o=>{o&&r()}),Wt(()=>{r(),new ResizeObserver(r).observe(t.value,{box:"border-box"})}),(o,s)=>(T(),P("div",{ref_key:"rootEl",ref:t,class:"CoreVegaLiteChart"},[H("div",{ref_key:"chartTargetEl",ref:n,class:"target"},null,512)],512))}}),Uu=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 Uu=="function"&&Uu(op);const pA=ye(op,[["__scopeId","data-v-d93bd6f0"]]),hA=e=>(Bt("data-v-7180acc3"),e=e(),Ut(),e),vA={class:"CoreVideoPlayer"},mA=["src","controls","autoplay","loop","muted"],gA=hA(()=>H("div",{class:"mask"},null,-1)),yA="A video player component that can play various video formats.",_A={writer:{name:"Video Player",description:yA,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},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:Oe}}},sp=me({..._A,__name:"CoreVideoPlayer",setup(e){const t=K(W.evaluatedFields);return(n,a)=>(T(),P("div",vA,[H("video",{src:$(t).src.value,controls:$(t).controls.value==="yes",autoplay:$(t).autoplay.value==="yes",loop:$(t).loop.value==="yes",muted:$(t).muted.value==="yes"},null,8,mA),gA]))}}),Hu=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 Hu=="function"&&Hu(sp);const bA=ye(sp,[["__scopeId","data-v-7180acc3"]]),AA={class:"CoreLink"},wA=["href","target","rel"],CA={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:At,cssClasses:Oe}}},IA=me({...CA,__name:"CoreLink",setup(e){const t=K(W.evaluatedFields),n=te(()=>t.text.value||t.url.value);return(a,r)=>(T(),P("div",AA,[H("a",{href:$(t).url.value,target:$(t).target.value,rel:$(t).rel.value},he(n.value),9,wA)]))}}),TA=ye(IA,[["__scopeId","data-v-757d882c"]]),SA=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],kA=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],EA=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],xA=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],ju=(e,t,n)=>{let a=e;return typeof t=="string"||Array.isArray(t)?a=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(a=e.toLocaleString(void 0,n)),a};function Ku(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?xA:EA:t.binary?kA:SA,a=t.space?" ":"";if(t.signed&&e===0)return` 0${a}${n[0]}`;const r=e<0,o=r?"-":t.signed?"+":"";r&&(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 h=ju(e,t.locale,s);return o+h+a+n[0]}const c=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**c,s||(e=e.toPrecision(3));const u=ju(Number(e),t.locale,s),f=n[c];return o+u+a+f}const $A=me({__name:"WdsTextareaInput",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=oo(e,"modelValue");return(n,a)=>Mt((T(),P("textarea",{"onUpdate:modelValue":a[0]||(a[0]=r=>t.value=r)},null,512)),[[ma,t.value]])}}),MA=ye($A,[["__scopeId","data-v-4cec29bc"]]),so=e=>(Bt("data-v-d0aa71a9"),e=e(),Ut(),e),NA={class:"avatar"},OA={class:"content"},LA={class:"text"},PA={key:0,class:"actions"},RA=["onClick"],FA={key:0,class:"subheading"},DA={class:"name"},VA={key:1,class:"desc"},BA={key:0,class:"loadingContainer"},UA={class:"filesArea"},HA={key:1,class:"list"},jA=["title"],KA={class:"size"},zA=so(()=>H("i",{class:"material-symbols-outlined"}," delete ",-1)),WA={class:"filesButtons"},GA=so(()=>H("i",{class:"material-symbols-outlined"},"upload",-1)),YA={key:1,class:"sizeExceededMessage"},JA=so(()=>H("i",{class:"material-symbols-outlined"},"warning",-1)),QA={class:"inputArea"},qA={class:"inputButtons"},XA=so(()=>H("svg",{width:"15",height:"12",viewBox:"0 0 15 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[H("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"})],-1)),ZA=so(()=>H("i",{class:"material-symbols-outlined"},"attach_file",-1)),Ci=200*1024*1024,e1="A chatbot component to build human-to-AI interactions.",t1=`[
  {
  "role": "assistant",
  "content": "How can I help you?"
  },
  {
  "role": "user",
  "content": "I'm building a Chatbot"
  }
]`,n1=`
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(),a1=`
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(),r1=`
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(),o1={writer:{name:"Chatbot",description:e1,category:"Content",fields:{conversation:{name:"Conversation",default:t1,desc:"An array with messages or a writer.ai.Conversation object.",type:L.Object},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:Te.Style,applyStyleVariable:!0},userRoleColor:{name:"User role",default:"#F5F5F9",type:L.Color,category:Te.Style,applyStyleVariable:!0},avatarBackgroundColor:{name:"Avatar",default:"#2C2D30",type:L.Color,category:Te.Style,applyStyleVariable:!0},avatarTextColor:{name:"Avatar text",default:"#FFFFFF",type:L.Color,category:Te.Style,applyStyleVariable:!0},accentColor:Gt,containerBackgroundColor:Dn,primaryTextColor:At,secondaryTextColor:fn,separatorColor:Pt,buttonColor:{...Vn,default:"#000000"},buttonTextColor:{...Bn,default:"#ffffff"},cssClasses:Oe},events:{"wf-chatbot-message":{desc:"Triggered when the user sends a message.",stub:n1},"wf-chatbot-action-click":{desc:"Handle clicks on actions.",stub:a1},"wf-file-change":{desc:"Triggered when files are uploaded",stub:r1}}}},ip=me({...o1,__name:"CoreChatbot",setup(e){_r(g=>({47160240:$(o).assistantRoleColor.value?$(o).assistantRoleColor.value:"linear-gradient(264deg, #f5ebff 0.71%, #eef1ff 100%)"}));const t=ee(null),n=ee(null),a=ee(null),r=ee(!1),o=K(W.evaluatedFields),s=il([]),c=ee(!1);let u;const f=te(()=>{var g;return((g=o.conversation)==null?void 0:g.value)??[]}),h=ee(""),d=te(()=>{let g=0;return Array.from(s.value).forEach(y=>{g+=y.size}),g>=Ci});function m(){r.value=!0;const g=new CustomEvent("wf-chatbot-message",{detail:{payload:{role:"user",content:h.value},callback:()=>{r.value=!1}}});t.value.dispatchEvent(g),h.value=""}function I(g){const{data:y}=g,C=new CustomEvent("wf-chatbot-action-click",{detail:{payload:y}});t.value.dispatchEvent(C)}function A(){const g=document.createElement("input");g.type="file",o.enableFileUpload.value=="multiple"&&(g.multiple=!0),g.addEventListener("change",()=>{let y;o.enableFileUpload.value=="multiple"?y=[...s.value]:y=[],Array.from(g.files).forEach(C=>{y.push(C)}),s.value=y}),g.dispatchEvent(new MouseEvent("click"))}function b(g){const y=s.value.toSpliced(g,1);s.value=y}function E(){n.value.scrollTo({top:n.value.scrollHeight,left:0})}const j=async g=>{var y=new FileReader;return y.readAsDataURL(g),new Promise((C,v)=>{y.onload=()=>C(y.result),y.onerror=()=>v(y.error)})};async function M(){if(s.value.length==0||c.value)return;c.value=!0;const y=await(async()=>{let v=0;const D=Promise.all(Array.from(s.value).map(async N=>(v+=N.size,{name:N.name,type:N.type,data:await j(N)})));if(v>Ci){alert("Size limit exceeded.");return}return D})();if(!y){c.value=!1;return}const C=new CustomEvent("wf-file-change",{detail:{payload:y,callback:()=>{c.value=!1,s.value=[]}}});t.value.dispatchEvent(C)}return Wt(()=>{u=new ResizeObserver(()=>{E()}),u.observe(a.value)}),Ka(()=>{u.unobserve(a.value)}),(g,y)=>(T(),P("div",{ref_key:"rootEl",ref:t,class:"CoreChatbot"},[H("div",{ref_key:"messageAreaEl",ref:n,class:"messageArea"},[H("div",{ref_key:"messagesEl",ref:a,class:"messages"},[(T(!0),P(xe,null,St(f.value,(C,v)=>{var D,N;return T(),P("div",{key:v,class:ct(["message",C.role])},[H("div",NA,he(C.role=="assistant"?$(o).assistantInitials.value:$(o).userInitials.value),1),H("div",OA,[H("div",LA,[$(o).useMarkdown.value=="yes"?(T(),De(El,{key:0,"raw-text":(D=C.content)==null?void 0:D.trim()},null,8,["raw-text"])):(T(),P(xe,{key:1},[pt(he((N=C.content)==null?void 0:N.trim()),1)],64))]),C.actions?(T(),P("div",PA,[(T(!0),P(xe,null,St(C.actions,(Y,X)=>(T(),P("button",{key:X,class:"action",onClick:_e=>I(Y)},[Y.subheading?(T(),P("div",FA,he(Y.subheading),1)):ve("",!0),H("h3",DA,he(Y.name),1),Y.desc?(T(),P("div",VA,he(Y.desc),1)):ve("",!0)],8,RA))),128))])):ve("",!0)])],2)}),128)),r.value?(T(),P("div",BA,[Fe(xl,{class:"loadingSymbol"}),pt("Loading... ")])):ve("",!0)],512)],512),s.value.length>0?(T(),P(xe,{key:0},[H("div",UA,[c.value?(T(),P(xe,{key:0},[pt(" Uploading... ")],64)):ve("",!0),c.value?ve("",!0):(T(),P("div",HA,[(T(!0),P(xe,null,St(s.value,(C,v)=>(T(),P("div",{key:v,class:"file"},[H("div",null,[H("div",{class:"name",title:C.name},he(C.name),9,jA),H("div",KA,he($(Ku)(C.size)),1)]),Fe(xn,{onClick:D=>b(v)},{default:Be(()=>[zA]),_:2},1032,["onClick"])]))),128))]))]),H("div",WA,[!d.value&&!c.value?(T(),De(xn,{key:0,title:"Upload",onClick:M},{default:Be(()=>[GA]),_:1})):ve("",!0),d.value?(T(),P("div",YA,[JA,pt(" Size limit of "+he($(Ku)(Ci))+" exceeded. ",1)])):ve("",!0)])],64)):ve("",!0),H("div",QA,[Fe(MA,{modelValue:h.value,"onUpdate:modelValue":y[0]||(y[0]=C=>h.value=C),placeholder:$(o).placeholder.value,onKeydown:Zr(kl(m,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"])]),H("div",qA,[Fe(xn,{class:"send action",title:"Send message",onClick:m},{default:Be(()=>[XA]),_:1}),$(o).enableFileUpload.value!="no"?(T(),De(xn,{key:0,class:"action",title:"Attach files",onClick:A},{default:Be(()=>[ZA]),_:1})):ve("",!0)])],512))}}),zu=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 zu=="function"&&zu(ip);const s1=ye(ip,[["__scopeId","data-v-d0aa71a9"]]);var i1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function l1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wk(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function a(){return this instanceof a?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(a){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}),n}var lp={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,a){e.exports=a()})(i1,function(){for(var n=function(i,l,p){return l===void 0&&(l=0),p===void 0&&(p=1),i<l?l:i>p?p:i},a=n,r=function(i){i._clipped=!1,i._unclipped=i.slice(0);for(var l=0;l<=3;l++)l<3?((i[l]<0||i[l]>255)&&(i._clipped=!0),i[l]=a(i[l],0,255)):l===3&&(i[l]=a(i[l],0,1));return i},o={},s=0,c=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];s<c.length;s+=1){var u=c[s];o["[object "+u+"]"]=u.toLowerCase()}var f=function(i){return o[Object.prototype.toString.call(i)]||"object"},h=f,d=function(i,l){return l===void 0&&(l=null),i.length>=3?Array.prototype.slice.call(i):h(i[0])=="object"&&l?l.split("").filter(function(p){return i[0][p]!==void 0}).map(function(p){return i[0][p]}):i[0]},m=f,I=function(i){if(i.length<2)return null;var l=i.length-1;return m(i[l])=="string"?i[l].toLowerCase():null},A=Math.PI,b={clip_rgb:r,limit:n,type:f,unpack:d,last:I,PI:A,TWOPI:A*2,PITHIRD:A/3,DEG2RAD:A/180,RAD2DEG:180/A},E={format:{},autodetect:[]},j=b.last,M=b.clip_rgb,g=b.type,y=E,C=function(){for(var l=[],p=arguments.length;p--;)l[p]=arguments[p];var _=this;if(g(l[0])==="object"&&l[0].constructor&&l[0].constructor===this.constructor)return l[0];var x=j(l),O=!1;if(!x){O=!0,y.sorted||(y.autodetect=y.autodetect.sort(function(se,ge){return ge.p-se.p}),y.sorted=!0);for(var k=0,B=y.autodetect;k<B.length;k+=1){var U=B[k];if(x=U.test.apply(U,l),x)break}}if(y.format[x]){var Q=y.format[x].apply(null,O?l:l.slice(0,-1));_._rgb=M(Q)}else throw new Error("unknown format: "+l);_._rgb.length===3&&_._rgb.push(1)};C.prototype.toString=function(){return g(this.hex)=="function"?this.hex():"["+this._rgb.join(",")+"]"};var v=C,D=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];return new(Function.prototype.bind.apply(D.Color,[null].concat(i)))};D.Color=v,D.version="2.4.2";var N=D,Y=b.unpack,X=Math.max,_e=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];var p=Y(i,"rgb"),_=p[0],x=p[1],O=p[2];_=_/255,x=x/255,O=O/255;var k=1-X(_,X(x,O)),B=k<1?1/(1-k):0,U=(1-_-k)*B,Q=(1-x-k)*B,se=(1-O-k)*B;return[U,Q,se,k]},ie=_e,G=b.unpack,fe=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];i=G(i,"cmyk");var p=i[0],_=i[1],x=i[2],O=i[3],k=i.length>4?i[4]:1;return O===1?[0,0,0,k]:[p>=1?0:255*(1-p)*(1-O),_>=1?0:255*(1-_)*(1-O),x>=1?0:255*(1-x)*(1-O),k]},we=fe,re=N,oe=v,ne=E,be=b.unpack,wt=b.type,He=ie;oe.prototype.cmyk=function(){return He(this._rgb)},re.cmyk=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];return new(Function.prototype.bind.apply(oe,[null].concat(i,["cmyk"])))},ne.format.cmyk=we,ne.autodetect.push({p:2,test:function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];if(i=be(i,"cmyk"),wt(i)==="array"&&i.length===4)return"cmyk"}});var gt=b.unpack,Ae=b.last,Le=function(i){return Math.round(i*100)/100},nt=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];var p=gt(i,"hsla"),_=Ae(i)||"lsa";return p[0]=Le(p[0]||0),p[1]=Le(p[1]*100)+"%",p[2]=Le(p[2]*100)+"%",_==="hsla"||p.length>3&&p[3]<1?(p[3]=p.length>3?p[3]:1,_="hsla"):p.length=3,_+"("+p.join(",")+")"},Ue=nt,ft=b.unpack,rt=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];i=ft(i,"rgba");var p=i[0],_=i[1],x=i[2];p/=255,_/=255,x/=255;var O=Math.min(p,_,x),k=Math.max(p,_,x),B=(k+O)/2,U,Q;return k===O?(U=0,Q=Number.NaN):U=B<.5?(k-O)/(k+O):(k-O)/(2-k-O),p==k?Q=(_-x)/(k-O):_==k?Q=2+(x-p)/(k-O):x==k&&(Q=4+(p-_)/(k-O)),Q*=60,Q<0&&(Q+=360),i.length>3&&i[3]!==void 0?[Q,U,B,i[3]]:[Q,U,B]},Ct=rt,It=b.unpack,Nt=b.last,Cn=Ue,S=Ct,w=Math.round,R=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];var p=It(i,"rgba"),_=Nt(i)||"rgb";return _.substr(0,3)=="hsl"?Cn(S(p),_):(p[0]=w(p[0]),p[1]=w(p[1]),p[2]=w(p[2]),(_==="rgba"||p.length>3&&p[3]<1)&&(p[3]=p.length>3?p[3]:1,_="rgba"),_+"("+p.slice(0,_==="rgb"?3:4).join(",")+")")},V=R,z=b.unpack,J=Math.round,ae=function(){for(var i,l=[],p=arguments.length;p--;)l[p]=arguments[p];l=z(l,"hsl");var _=l[0],x=l[1],O=l[2],k,B,U;if(x===0)k=B=U=O*255;else{var Q=[0,0,0],se=[0,0,0],ge=O<.5?O*(1+x):O+x-O*x,le=2*O-ge,Ie=_/360;Q[0]=Ie+1/3,Q[1]=Ie,Q[2]=Ie-1/3;for(var Ce=0;Ce<3;Ce++)Q[Ce]<0&&(Q[Ce]+=1),Q[Ce]>1&&(Q[Ce]-=1),6*Q[Ce]<1?se[Ce]=le+(ge-le)*6*Q[Ce]:2*Q[Ce]<1?se[Ce]=ge:3*Q[Ce]<2?se[Ce]=le+(ge-le)*(2/3-Q[Ce])*6:se[Ce]=le;i=[J(se[0]*255),J(se[1]*255),J(se[2]*255)],k=i[0],B=i[1],U=i[2]}return l.length>3?[k,B,U,l[3]]:[k,B,U,1]},q=ae,ce=q,Z=E,pe=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,Me=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,Ee=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Re=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,je=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,qe=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,tt=Math.round,vt=function(i){i=i.toLowerCase().trim();var l;if(Z.format.named)try{return Z.format.named(i)}catch{}if(l=i.match(pe)){for(var p=l.slice(1,4),_=0;_<3;_++)p[_]=+p[_];return p[3]=1,p}if(l=i.match(Me)){for(var x=l.slice(1,5),O=0;O<4;O++)x[O]=+x[O];return x}if(l=i.match(Ee)){for(var k=l.slice(1,4),B=0;B<3;B++)k[B]=tt(k[B]*2.55);return k[3]=1,k}if(l=i.match(Re)){for(var U=l.slice(1,5),Q=0;Q<3;Q++)U[Q]=tt(U[Q]*2.55);return U[3]=+U[3],U}if(l=i.match(je)){var se=l.slice(1,4);se[1]*=.01,se[2]*=.01;var ge=ce(se);return ge[3]=1,ge}if(l=i.match(qe)){var le=l.slice(1,4);le[1]*=.01,le[2]*=.01;var Ie=ce(le);return Ie[3]=+l[4],Ie}};vt.test=function(i){return pe.test(i)||Me.test(i)||Ee.test(i)||Re.test(i)||je.test(i)||qe.test(i)};var Tt=vt,Xt=N,Un=v,bn=E,Wa=b.type,kt=V,Zt=Tt;Un.prototype.css=function(i){return kt(this._rgb,i)},Xt.css=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];return new(Function.prototype.bind.apply(Un,[null].concat(i,["css"])))},bn.format.css=Zt,bn.autodetect.push({p:5,test:function(i){for(var l=[],p=arguments.length-1;p-- >0;)l[p]=arguments[p+1];if(!l.length&&Wa(i)==="string"&&Zt.test(i))return"css"}});var _a=v,Et=N,qn=E,$s=b.unpack;qn.format.gl=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];var p=$s(i,"rgba");return p[0]*=255,p[1]*=255,p[2]*=255,p},Et.gl=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];return new(Function.prototype.bind.apply(_a,[null].concat(i,["gl"])))},_a.prototype.gl=function(){var i=this._rgb;return[i[0]/255,i[1]/255,i[2]/255,i[3]]};var lo=b.unpack,Cr=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];var p=lo(i,"rgb"),_=p[0],x=p[1],O=p[2],k=Math.min(_,x,O),B=Math.max(_,x,O),U=B-k,Q=U*100/255,se=k/(255-U)*100,ge;return U===0?ge=Number.NaN:(_===B&&(ge=(x-O)/U),x===B&&(ge=2+(O-_)/U),O===B&&(ge=4+(_-x)/U),ge*=60,ge<0&&(ge+=360)),[ge,Q,se]},co=Cr,uo=b.unpack,Ms=Math.floor,fo=function(){for(var i,l,p,_,x,O,k=[],B=arguments.length;B--;)k[B]=arguments[B];k=uo(k,"hcg");var U=k[0],Q=k[1],se=k[2],ge,le,Ie;se=se*255;var Ce=Q*255;if(Q===0)ge=le=Ie=se;else{U===360&&(U=0),U>360&&(U-=360),U<0&&(U+=360),U/=60;var Ke=Ms(U),Ge=U-Ke,Xe=se*(1-Q),at=Xe+Ce*(1-Ge),Ht=Xe+Ce*Ge,Dt=Xe+Ce;switch(Ke){case 0:i=[Dt,Ht,Xe],ge=i[0],le=i[1],Ie=i[2];break;case 1:l=[at,Dt,Xe],ge=l[0],le=l[1],Ie=l[2];break;case 2:p=[Xe,Dt,Ht],ge=p[0],le=p[1],Ie=p[2];break;case 3:_=[Xe,at,Dt],ge=_[0],le=_[1],Ie=_[2];break;case 4:x=[Ht,Xe,Dt],ge=x[0],le=x[1],Ie=x[2];break;case 5:O=[Dt,Xe,at],ge=O[0],le=O[1],Ie=O[2];break}}return[ge,le,Ie,k.length>3?k[3]:1]},po=fo,Ns=b.unpack,Hn=b.type,Ir=N,Tr=v,Sr=E,Os=co;Tr.prototype.hcg=function(){return Os(this._rgb)},Ir.hcg=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];return new(Function.prototype.bind.apply(Tr,[null].concat(i,["hcg"])))},Sr.format.hcg=po,Sr.autodetect.push({p:1,test:function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];if(i=Ns(i,"hcg"),Hn(i)==="array"&&i.length===3)return"hcg"}});var ho=b.unpack,In=b.last,ba=Math.round,vo=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];var p=ho(i,"rgba"),_=p[0],x=p[1],O=p[2],k=p[3],B=In(i)||"auto";k===void 0&&(k=1),B==="auto"&&(B=k<1?"rgba":"rgb"),_=ba(_),x=ba(x),O=ba(O);var U=_<<16|x<<8|O,Q="000000"+U.toString(16);Q=Q.substr(Q.length-6);var se="0"+ba(k*255).toString(16);switch(se=se.substr(se.length-2),B.toLowerCase()){case"rgba":return"#"+Q+se;case"argb":return"#"+se+Q;default:return"#"+Q}},kr=vo,mo=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Ls=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,$e=function(i){if(i.match(mo)){(i.length===4||i.length===7)&&(i=i.substr(1)),i.length===3&&(i=i.split(""),i=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]);var l=parseInt(i,16),p=l>>16,_=l>>8&255,x=l&255;return[p,_,x,1]}if(i.match(Ls)){(i.length===5||i.length===9)&&(i=i.substr(1)),i.length===4&&(i=i.split(""),i=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]+i[3]+i[3]);var O=parseInt(i,16),k=O>>24&255,B=O>>16&255,U=O>>8&255,Q=Math.round((O&255)/255*100)/100;return[k,B,U,Q]}throw new Error("unknown hex color: "+i)},F=$e,de=N,Se=v,ut=b.type,Ot=E,Rt=kr;Se.prototype.hex=function(i){return Rt(this._rgb,i)},de.hex=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];return new(Function.prototype.bind.apply(Se,[null].concat(i,["hex"])))},Ot.format.hex=F,Ot.autodetect.push({p:4,test:function(i){for(var l=[],p=arguments.length-1;p-- >0;)l[p]=arguments[p+1];if(!l.length&&ut(i)==="string"&&[3,4,5,6,7,8,9].indexOf(i.length)>=0)return"hex"}});var Yt=b.unpack,Ln=b.TWOPI,Aa=Math.min,Jt=Math.sqrt,go=Math.acos,yo=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];var p=Yt(i,"rgb"),_=p[0],x=p[1],O=p[2];_/=255,x/=255,O/=255;var k,B=Aa(_,x,O),U=(_+x+O)/3,Q=U>0?1-B/U:0;return Q===0?k=NaN:(k=(_-x+(_-O))/2,k/=Jt((_-x)*(_-x)+(_-O)*(x-O)),k=go(k),O>x&&(k=Ln-k),k/=Ln),[k*360,Q,U]},Ep=yo,xp=b.unpack,Ps=b.limit,Ga=b.TWOPI,Rs=b.PITHIRD,Ya=Math.cos,$p=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];i=xp(i,"hsi");var p=i[0],_=i[1],x=i[2],O,k,B;return isNaN(p)&&(p=0),isNaN(_)&&(_=0),p>360&&(p-=360),p<0&&(p+=360),p/=360,p<1/3?(B=(1-_)/3,O=(1+_*Ya(Ga*p)/Ya(Rs-Ga*p))/3,k=1-(B+O)):p<2/3?(p-=1/3,O=(1-_)/3,k=(1+_*Ya(Ga*p)/Ya(Rs-Ga*p))/3,B=1-(O+k)):(p-=2/3,k=(1-_)/3,B=(1+_*Ya(Ga*p)/Ya(Rs-Ga*p))/3,O=1-(k+B)),O=Ps(x*O*3),k=Ps(x*k*3),B=Ps(x*B*3),[O*255,k*255,B*255,i.length>3?i[3]:1]},Mp=$p,Np=b.unpack,Op=b.type,Lp=N,Fl=v,Dl=E,Pp=Ep;Fl.prototype.hsi=function(){return Pp(this._rgb)},Lp.hsi=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];return new(Function.prototype.bind.apply(Fl,[null].concat(i,["hsi"])))},Dl.format.hsi=Mp,Dl.autodetect.push({p:2,test:function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];if(i=Np(i,"hsi"),Op(i)==="array"&&i.length===3)return"hsi"}});var Rp=b.unpack,Fp=b.type,Dp=N,Vl=v,Bl=E,Vp=Ct;Vl.prototype.hsl=function(){return Vp(this._rgb)},Dp.hsl=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];return new(Function.prototype.bind.apply(Vl,[null].concat(i,["hsl"])))},Bl.format.hsl=q,Bl.autodetect.push({p:2,test:function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];if(i=Rp(i,"hsl"),Fp(i)==="array"&&i.length===3)return"hsl"}});var Bp=b.unpack,Up=Math.min,Hp=Math.max,jp=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];i=Bp(i,"rgb");var p=i[0],_=i[1],x=i[2],O=Up(p,_,x),k=Hp(p,_,x),B=k-O,U,Q,se;return se=k/255,k===0?(U=Number.NaN,Q=0):(Q=B/k,p===k&&(U=(_-x)/B),_===k&&(U=2+(x-p)/B),x===k&&(U=4+(p-_)/B),U*=60,U<0&&(U+=360)),[U,Q,se]},Kp=jp,zp=b.unpack,Wp=Math.floor,Gp=function(){for(var i,l,p,_,x,O,k=[],B=arguments.length;B--;)k[B]=arguments[B];k=zp(k,"hsv");var U=k[0],Q=k[1],se=k[2],ge,le,Ie;if(se*=255,Q===0)ge=le=Ie=se;else{U===360&&(U=0),U>360&&(U-=360),U<0&&(U+=360),U/=60;var Ce=Wp(U),Ke=U-Ce,Ge=se*(1-Q),Xe=se*(1-Q*Ke),at=se*(1-Q*(1-Ke));switch(Ce){case 0:i=[se,at,Ge],ge=i[0],le=i[1],Ie=i[2];break;case 1:l=[Xe,se,Ge],ge=l[0],le=l[1],Ie=l[2];break;case 2:p=[Ge,se,at],ge=p[0],le=p[1],Ie=p[2];break;case 3:_=[Ge,Xe,se],ge=_[0],le=_[1],Ie=_[2];break;case 4:x=[at,Ge,se],ge=x[0],le=x[1],Ie=x[2];break;case 5:O=[se,Ge,Xe],ge=O[0],le=O[1],Ie=O[2];break}}return[ge,le,Ie,k.length>3?k[3]:1]},Yp=Gp,Jp=b.unpack,Qp=b.type,qp=N,Ul=v,Hl=E,Xp=Kp;Ul.prototype.hsv=function(){return Xp(this._rgb)},qp.hsv=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];return new(Function.prototype.bind.apply(Ul,[null].concat(i,["hsv"])))},Hl.format.hsv=Yp,Hl.autodetect.push({p:2,test:function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];if(i=Jp(i,"hsv"),Qp(i)==="array"&&i.length===3)return"hsv"}});var _o={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Ja=_o,Zp=b.unpack,jl=Math.pow,eh=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];var p=Zp(i,"rgb"),_=p[0],x=p[1],O=p[2],k=th(_,x,O),B=k[0],U=k[1],Q=k[2],se=116*U-16;return[se<0?0:se,500*(B-U),200*(U-Q)]},Fs=function(i){return(i/=255)<=.04045?i/12.92:jl((i+.055)/1.055,2.4)},Ds=function(i){return i>Ja.t3?jl(i,1/3):i/Ja.t2+Ja.t0},th=function(i,l,p){i=Fs(i),l=Fs(l),p=Fs(p);var _=Ds((.4124564*i+.3575761*l+.1804375*p)/Ja.Xn),x=Ds((.2126729*i+.7151522*l+.072175*p)/Ja.Yn),O=Ds((.0193339*i+.119192*l+.9503041*p)/Ja.Zn);return[_,x,O]},Kl=eh,Qa=_o,nh=b.unpack,ah=Math.pow,rh=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];i=nh(i,"lab");var p=i[0],_=i[1],x=i[2],O,k,B,U,Q,se;return k=(p+16)/116,O=isNaN(_)?k:k+_/500,B=isNaN(x)?k:k-x/200,k=Qa.Yn*Bs(k),O=Qa.Xn*Bs(O),B=Qa.Zn*Bs(B),U=Vs(3.2404542*O-1.5371385*k-.4985314*B),Q=Vs(-.969266*O+1.8760108*k+.041556*B),se=Vs(.0556434*O-.2040259*k+1.0572252*B),[U,Q,se,i.length>3?i[3]:1]},Vs=function(i){return 255*(i<=.00304?12.92*i:1.055*ah(i,1/2.4)-.055)},Bs=function(i){return i>Qa.t1?i*i*i:Qa.t2*(i-Qa.t0)},zl=rh,oh=b.unpack,sh=b.type,ih=N,Wl=v,Gl=E,lh=Kl;Wl.prototype.lab=function(){return lh(this._rgb)},ih.lab=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];return new(Function.prototype.bind.apply(Wl,[null].concat(i,["lab"])))},Gl.format.lab=zl,Gl.autodetect.push({p:2,test:function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];if(i=oh(i,"lab"),sh(i)==="array"&&i.length===3)return"lab"}});var ch=b.unpack,uh=b.RAD2DEG,dh=Math.sqrt,fh=Math.atan2,ph=Math.round,hh=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];var p=ch(i,"lab"),_=p[0],x=p[1],O=p[2],k=dh(x*x+O*O),B=(fh(O,x)*uh+360)%360;return ph(k*1e4)===0&&(B=Number.NaN),[_,k,B]},Yl=hh,vh=b.unpack,mh=Kl,gh=Yl,yh=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];var p=vh(i,"rgb"),_=p[0],x=p[1],O=p[2],k=mh(_,x,O),B=k[0],U=k[1],Q=k[2];return gh(B,U,Q)},_h=yh,bh=b.unpack,Ah=b.DEG2RAD,wh=Math.sin,Ch=Math.cos,Ih=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];var p=bh(i,"lch"),_=p[0],x=p[1],O=p[2];return isNaN(O)&&(O=0),O=O*Ah,[_,Ch(O)*x,wh(O)*x]},Jl=Ih,Th=b.unpack,Sh=Jl,kh=zl,Eh=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];i=Th(i,"lch");var p=i[0],_=i[1],x=i[2],O=Sh(p,_,x),k=O[0],B=O[1],U=O[2],Q=kh(k,B,U),se=Q[0],ge=Q[1],le=Q[2];return[se,ge,le,i.length>3?i[3]:1]},Ql=Eh,xh=b.unpack,$h=Ql,Mh=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];var p=xh(i,"hcl").reverse();return $h.apply(void 0,p)},Nh=Mh,Oh=b.unpack,Lh=b.type,ql=N,bo=v,Us=E,Xl=_h;bo.prototype.lch=function(){return Xl(this._rgb)},bo.prototype.hcl=function(){return Xl(this._rgb).reverse()},ql.lch=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];return new(Function.prototype.bind.apply(bo,[null].concat(i,["lch"])))},ql.hcl=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];return new(Function.prototype.bind.apply(bo,[null].concat(i,["hcl"])))},Us.format.lch=Ql,Us.format.hcl=Nh,["lch","hcl"].forEach(function(i){return Us.autodetect.push({p:2,test:function(){for(var l=[],p=arguments.length;p--;)l[p]=arguments[p];if(l=Oh(l,i),Lh(l)==="array"&&l.length===3)return i}})});var Ph={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"},Zl=Ph,Rh=v,ec=E,Fh=b.type,Er=Zl,Dh=F,Vh=kr;Rh.prototype.name=function(){for(var i=Vh(this._rgb,"rgb"),l=0,p=Object.keys(Er);l<p.length;l+=1){var _=p[l];if(Er[_]===i)return _.toLowerCase()}return i},ec.format.named=function(i){if(i=i.toLowerCase(),Er[i])return Dh(Er[i]);throw new Error("unknown color name: "+i)},ec.autodetect.push({p:5,test:function(i){for(var l=[],p=arguments.length-1;p-- >0;)l[p]=arguments[p+1];if(!l.length&&Fh(i)==="string"&&Er[i.toLowerCase()])return"named"}});var Bh=b.unpack,Uh=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];var p=Bh(i,"rgb"),_=p[0],x=p[1],O=p[2];return(_<<16)+(x<<8)+O},Hh=Uh,jh=b.type,Kh=function(i){if(jh(i)=="number"&&i>=0&&i<=16777215){var l=i>>16,p=i>>8&255,_=i&255;return[l,p,_,1]}throw new Error("unknown num color: "+i)},zh=Kh,Wh=N,tc=v,nc=E,Gh=b.type,Yh=Hh;tc.prototype.num=function(){return Yh(this._rgb)},Wh.num=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];return new(Function.prototype.bind.apply(tc,[null].concat(i,["num"])))},nc.format.num=zh,nc.autodetect.push({p:5,test:function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];if(i.length===1&&Gh(i[0])==="number"&&i[0]>=0&&i[0]<=16777215)return"num"}});var Jh=N,Hs=v,ac=E,rc=b.unpack,oc=b.type,sc=Math.round;Hs.prototype.rgb=function(i){return i===void 0&&(i=!0),i===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(sc)},Hs.prototype.rgba=function(i){return i===void 0&&(i=!0),this._rgb.slice(0,4).map(function(l,p){return p<3?i===!1?l:sc(l):l})},Jh.rgb=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];return new(Function.prototype.bind.apply(Hs,[null].concat(i,["rgb"])))},ac.format.rgb=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];var p=rc(i,"rgba");return p[3]===void 0&&(p[3]=1),p},ac.autodetect.push({p:3,test:function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];if(i=rc(i,"rgba"),oc(i)==="array"&&(i.length===3||i.length===4&&oc(i[3])=="number"&&i[3]>=0&&i[3]<=1))return"rgb"}});var Ao=Math.log,Qh=function(i){var l=i/100,p,_,x;return l<66?(p=255,_=l<6?0:-155.25485562709179-.44596950469579133*(_=l-2)+104.49216199393888*Ao(_),x=l<20?0:-254.76935184120902+.8274096064007395*(x=l-10)+115.67994401066147*Ao(x)):(p=351.97690566805693+.114206453784165*(p=l-55)-40.25366309332127*Ao(p),_=325.4494125711974+.07943456536662342*(_=l-50)-28.0852963507957*Ao(_),x=255),[p,_,x,1]},ic=Qh,qh=ic,Xh=b.unpack,Zh=Math.round,ev=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];for(var p=Xh(i,"rgb"),_=p[0],x=p[2],O=1e3,k=4e4,B=.4,U;k-O>B;){U=(k+O)*.5;var Q=qh(U);Q[2]/Q[0]>=x/_?k=U:O=U}return Zh(U)},tv=ev,js=N,wo=v,Ks=E,nv=tv;wo.prototype.temp=wo.prototype.kelvin=wo.prototype.temperature=function(){return nv(this._rgb)},js.temp=js.kelvin=js.temperature=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];return new(Function.prototype.bind.apply(wo,[null].concat(i,["temp"])))},Ks.format.temp=Ks.format.kelvin=Ks.format.temperature=ic;var av=b.unpack,zs=Math.cbrt,rv=Math.pow,ov=Math.sign,sv=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];var p=av(i,"rgb"),_=p[0],x=p[1],O=p[2],k=[Ws(_/255),Ws(x/255),Ws(O/255)],B=k[0],U=k[1],Q=k[2],se=zs(.4122214708*B+.5363325363*U+.0514459929*Q),ge=zs(.2119034982*B+.6806995451*U+.1073969566*Q),le=zs(.0883024619*B+.2817188376*U+.6299787005*Q);return[.2104542553*se+.793617785*ge-.0040720468*le,1.9779984951*se-2.428592205*ge+.4505937099*le,.0259040371*se+.7827717662*ge-.808675766*le]},lc=sv;function Ws(i){var l=Math.abs(i);return l<.04045?i/12.92:(ov(i)||1)*rv((l+.055)/1.055,2.4)}var iv=b.unpack,Co=Math.pow,lv=Math.sign,cv=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];i=iv(i,"lab");var p=i[0],_=i[1],x=i[2],O=Co(p+.3963377774*_+.2158037573*x,3),k=Co(p-.1055613458*_-.0638541728*x,3),B=Co(p-.0894841775*_-1.291485548*x,3);return[255*Gs(4.0767416621*O-3.3077115913*k+.2309699292*B),255*Gs(-1.2684380046*O+2.6097574011*k-.3413193965*B),255*Gs(-.0041960863*O-.7034186147*k+1.707614701*B),i.length>3?i[3]:1]},cc=cv;function Gs(i){var l=Math.abs(i);return l>.0031308?(lv(i)||1)*(1.055*Co(l,1/2.4)-.055):i*12.92}var uv=b.unpack,dv=b.type,fv=N,uc=v,dc=E,pv=lc;uc.prototype.oklab=function(){return pv(this._rgb)},fv.oklab=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];return new(Function.prototype.bind.apply(uc,[null].concat(i,["oklab"])))},dc.format.oklab=cc,dc.autodetect.push({p:3,test:function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];if(i=uv(i,"oklab"),dv(i)==="array"&&i.length===3)return"oklab"}});var hv=b.unpack,vv=lc,mv=Yl,gv=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];var p=hv(i,"rgb"),_=p[0],x=p[1],O=p[2],k=vv(_,x,O),B=k[0],U=k[1],Q=k[2];return mv(B,U,Q)},yv=gv,_v=b.unpack,bv=Jl,Av=cc,wv=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];i=_v(i,"lch");var p=i[0],_=i[1],x=i[2],O=bv(p,_,x),k=O[0],B=O[1],U=O[2],Q=Av(k,B,U),se=Q[0],ge=Q[1],le=Q[2];return[se,ge,le,i.length>3?i[3]:1]},Cv=wv,Iv=b.unpack,Tv=b.type,Sv=N,fc=v,pc=E,kv=yv;fc.prototype.oklch=function(){return kv(this._rgb)},Sv.oklch=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];return new(Function.prototype.bind.apply(fc,[null].concat(i,["oklch"])))},pc.format.oklch=Cv,pc.autodetect.push({p:3,test:function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];if(i=Iv(i,"oklch"),Tv(i)==="array"&&i.length===3)return"oklch"}});var hc=v,Ev=b.type;hc.prototype.alpha=function(i,l){return l===void 0&&(l=!1),i!==void 0&&Ev(i)==="number"?l?(this._rgb[3]=i,this):new hc([this._rgb[0],this._rgb[1],this._rgb[2],i],"rgb"):this._rgb[3]};var xv=v;xv.prototype.clipped=function(){return this._rgb._clipped||!1};var wa=v,$v=_o;wa.prototype.darken=function(i){i===void 0&&(i=1);var l=this,p=l.lab();return p[0]-=$v.Kn*i,new wa(p,"lab").alpha(l.alpha(),!0)},wa.prototype.brighten=function(i){return i===void 0&&(i=1),this.darken(-i)},wa.prototype.darker=wa.prototype.darken,wa.prototype.brighter=wa.prototype.brighten;var Mv=v;Mv.prototype.get=function(i){var l=i.split("."),p=l[0],_=l[1],x=this[p]();if(_){var O=p.indexOf(_)-(p.substr(0,2)==="ok"?2:0);if(O>-1)return x[O];throw new Error("unknown channel "+_+" in mode "+p)}else return x};var qa=v,Nv=b.type,Ov=Math.pow,Lv=1e-7,Pv=20;qa.prototype.luminance=function(i){if(i!==void 0&&Nv(i)==="number"){if(i===0)return new qa([0,0,0,this._rgb[3]],"rgb");if(i===1)return new qa([255,255,255,this._rgb[3]],"rgb");var l=this.luminance(),p="rgb",_=Pv,x=function(k,B){var U=k.interpolate(B,.5,p),Q=U.luminance();return Math.abs(i-Q)<Lv||!_--?U:Q>i?x(k,U):x(U,B)},O=(l>i?x(new qa([0,0,0]),this):x(this,new qa([255,255,255]))).rgb();return new qa(O.concat([this._rgb[3]]))}return Rv.apply(void 0,this._rgb.slice(0,3))};var Rv=function(i,l,p){return i=Ys(i),l=Ys(l),p=Ys(p),.2126*i+.7152*l+.0722*p},Ys=function(i){return i/=255,i<=.03928?i/12.92:Ov((i+.055)/1.055,2.4)},pn={},vc=v,mc=b.type,Io=pn,gc=function(i,l,p){p===void 0&&(p=.5);for(var _=[],x=arguments.length-3;x-- >0;)_[x]=arguments[x+3];var O=_[0]||"lrgb";if(!Io[O]&&!_.length&&(O=Object.keys(Io)[0]),!Io[O])throw new Error("interpolation mode "+O+" is not defined");return mc(i)!=="object"&&(i=new vc(i)),mc(l)!=="object"&&(l=new vc(l)),Io[O](i,l,p).alpha(i.alpha()+p*(l.alpha()-i.alpha()))},yc=v,Fv=gc;yc.prototype.mix=yc.prototype.interpolate=function(i,l){l===void 0&&(l=.5);for(var p=[],_=arguments.length-2;_-- >0;)p[_]=arguments[_+2];return Fv.apply(void 0,[this,i,l].concat(p))};var _c=v;_c.prototype.premultiply=function(i){i===void 0&&(i=!1);var l=this._rgb,p=l[3];return i?(this._rgb=[l[0]*p,l[1]*p,l[2]*p,p],this):new _c([l[0]*p,l[1]*p,l[2]*p,p],"rgb")};var Js=v,Dv=_o;Js.prototype.saturate=function(i){i===void 0&&(i=1);var l=this,p=l.lch();return p[1]+=Dv.Kn*i,p[1]<0&&(p[1]=0),new Js(p,"lch").alpha(l.alpha(),!0)},Js.prototype.desaturate=function(i){return i===void 0&&(i=1),this.saturate(-i)};var bc=v,Ac=b.type;bc.prototype.set=function(i,l,p){p===void 0&&(p=!1);var _=i.split("."),x=_[0],O=_[1],k=this[x]();if(O){var B=x.indexOf(O)-(x.substr(0,2)==="ok"?2:0);if(B>-1){if(Ac(l)=="string")switch(l.charAt(0)){case"+":k[B]+=+l;break;case"-":k[B]+=+l;break;case"*":k[B]*=+l.substr(1);break;case"/":k[B]/=+l.substr(1);break;default:k[B]=+l}else if(Ac(l)==="number")k[B]=l;else throw new Error("unsupported value for Color.set");var U=new bc(k,x);return p?(this._rgb=U._rgb,this):U}throw new Error("unknown channel "+O+" in mode "+x)}else return k};var Vv=v,Bv=function(i,l,p){var _=i._rgb,x=l._rgb;return new Vv(_[0]+p*(x[0]-_[0]),_[1]+p*(x[1]-_[1]),_[2]+p*(x[2]-_[2]),"rgb")};pn.rgb=Bv;var Uv=v,Qs=Math.sqrt,Xa=Math.pow,Hv=function(i,l,p){var _=i._rgb,x=_[0],O=_[1],k=_[2],B=l._rgb,U=B[0],Q=B[1],se=B[2];return new Uv(Qs(Xa(x,2)*(1-p)+Xa(U,2)*p),Qs(Xa(O,2)*(1-p)+Xa(Q,2)*p),Qs(Xa(k,2)*(1-p)+Xa(se,2)*p),"rgb")};pn.lrgb=Hv;var jv=v,Kv=function(i,l,p){var _=i.lab(),x=l.lab();return new jv(_[0]+p*(x[0]-_[0]),_[1]+p*(x[1]-_[1]),_[2]+p*(x[2]-_[2]),"lab")};pn.lab=Kv;var wc=v,Za=function(i,l,p,_){var x,O,k,B;_==="hsl"?(k=i.hsl(),B=l.hsl()):_==="hsv"?(k=i.hsv(),B=l.hsv()):_==="hcg"?(k=i.hcg(),B=l.hcg()):_==="hsi"?(k=i.hsi(),B=l.hsi()):_==="lch"||_==="hcl"?(_="hcl",k=i.hcl(),B=l.hcl()):_==="oklch"&&(k=i.oklch().reverse(),B=l.oklch().reverse());var U,Q,se,ge,le,Ie;(_.substr(0,1)==="h"||_==="oklch")&&(x=k,U=x[0],se=x[1],le=x[2],O=B,Q=O[0],ge=O[1],Ie=O[2]);var Ce,Ke,Ge,Xe;return!isNaN(U)&&!isNaN(Q)?(Q>U&&Q-U>180?Xe=Q-(U+360):Q<U&&U-Q>180?Xe=Q+360-U:Xe=Q-U,Ke=U+p*Xe):isNaN(U)?isNaN(Q)?Ke=Number.NaN:(Ke=Q,(le==1||le==0)&&_!="hsv"&&(Ce=ge)):(Ke=U,(Ie==1||Ie==0)&&_!="hsv"&&(Ce=se)),Ce===void 0&&(Ce=se+p*(ge-se)),Ge=le+p*(Ie-le),_==="oklch"?new wc([Ge,Ce,Ke],_):new wc([Ke,Ce,Ge],_)},zv=Za,Cc=function(i,l,p){return zv(i,l,p,"lch")};pn.lch=Cc,pn.hcl=Cc;var Wv=v,Gv=function(i,l,p){var _=i.num(),x=l.num();return new Wv(_+p*(x-_),"num")};pn.num=Gv;var Yv=Za,Jv=function(i,l,p){return Yv(i,l,p,"hcg")};pn.hcg=Jv;var Qv=Za,qv=function(i,l,p){return Qv(i,l,p,"hsi")};pn.hsi=qv;var Xv=Za,Zv=function(i,l,p){return Xv(i,l,p,"hsl")};pn.hsl=Zv;var em=Za,tm=function(i,l,p){return em(i,l,p,"hsv")};pn.hsv=tm;var nm=v,am=function(i,l,p){var _=i.oklab(),x=l.oklab();return new nm(_[0]+p*(x[0]-_[0]),_[1]+p*(x[1]-_[1]),_[2]+p*(x[2]-_[2]),"oklab")};pn.oklab=am;var rm=Za,om=function(i,l,p){return rm(i,l,p,"oklch")};pn.oklch=om;var qs=v,sm=b.clip_rgb,Xs=Math.pow,Zs=Math.sqrt,ei=Math.PI,Ic=Math.cos,Tc=Math.sin,im=Math.atan2,lm=function(i,l,p){l===void 0&&(l="lrgb"),p===void 0&&(p=null);var _=i.length;p||(p=Array.from(new Array(_)).map(function(){return 1}));var x=_/p.reduce(function(Ke,Ge){return Ke+Ge});if(p.forEach(function(Ke,Ge){p[Ge]*=x}),i=i.map(function(Ke){return new qs(Ke)}),l==="lrgb")return cm(i,p);for(var O=i.shift(),k=O.get(l),B=[],U=0,Q=0,se=0;se<k.length;se++)if(k[se]=(k[se]||0)*p[0],B.push(isNaN(k[se])?0:p[0]),l.charAt(se)==="h"&&!isNaN(k[se])){var ge=k[se]/180*ei;U+=Ic(ge)*p[0],Q+=Tc(ge)*p[0]}var le=O.alpha()*p[0];i.forEach(function(Ke,Ge){var Xe=Ke.get(l);le+=Ke.alpha()*p[Ge+1];for(var at=0;at<k.length;at++)if(!isNaN(Xe[at]))if(B[at]+=p[Ge+1],l.charAt(at)==="h"){var Ht=Xe[at]/180*ei;U+=Ic(Ht)*p[Ge+1],Q+=Tc(Ht)*p[Ge+1]}else k[at]+=Xe[at]*p[Ge+1]});for(var Ie=0;Ie<k.length;Ie++)if(l.charAt(Ie)==="h"){for(var Ce=im(Q/B[Ie],U/B[Ie])/ei*180;Ce<0;)Ce+=360;for(;Ce>=360;)Ce-=360;k[Ie]=Ce}else k[Ie]=k[Ie]/B[Ie];return le/=_,new qs(k,l).alpha(le>.99999?1:le,!0)},cm=function(i,l){for(var p=i.length,_=[0,0,0,0],x=0;x<i.length;x++){var O=i[x],k=l[x]/p,B=O._rgb;_[0]+=Xs(B[0],2)*k,_[1]+=Xs(B[1],2)*k,_[2]+=Xs(B[2],2)*k,_[3]+=B[3]*k}return _[0]=Zs(_[0]),_[1]=Zs(_[1]),_[2]=Zs(_[2]),_[3]>.9999999&&(_[3]=1),new qs(sm(_))},Tn=N,er=b.type,um=Math.pow,ti=function(i){var l="rgb",p=Tn("#ccc"),_=0,x=[0,1],O=[],k=[0,0],B=!1,U=[],Q=!1,se=0,ge=1,le=!1,Ie={},Ce=!0,Ke=1,Ge=function(ue){if(ue=ue||["#fff","#000"],ue&&er(ue)==="string"&&Tn.brewer&&Tn.brewer[ue.toLowerCase()]&&(ue=Tn.brewer[ue.toLowerCase()]),er(ue)==="array"){ue.length===1&&(ue=[ue[0],ue[0]]),ue=ue.slice(0);for(var Pe=0;Pe<ue.length;Pe++)ue[Pe]=Tn(ue[Pe]);O.length=0;for(var We=0;We<ue.length;We++)O.push(We/(ue.length-1))}return sn(),U=ue},Xe=function(ue){if(B!=null){for(var Pe=B.length-1,We=0;We<Pe&&ue>=B[We];)We++;return We-1}return 0},at=function(ue){return ue},Ht=function(ue){return ue},Dt=function(ue,Pe){var We,ze;if(Pe==null&&(Pe=!1),isNaN(ue)||ue===null)return p;if(Pe)ze=ue;else if(B&&B.length>2){var jt=Xe(ue);ze=jt/(B.length-2)}else ge!==se?ze=(ue-se)/(ge-se):ze=1;ze=Ht(ze),Pe||(ze=at(ze)),Ke!==1&&(ze=um(ze,Ke)),ze=k[0]+ze*(1-k[0]-k[1]),ze=Math.min(1,Math.max(0,ze));var mt=Math.floor(ze*1e4);if(Ce&&Ie[mt])We=Ie[mt];else{if(er(U)==="array")for(var Ze=0;Ze<O.length;Ze++){var ot=O[Ze];if(ze<=ot){We=U[Ze];break}if(ze>=ot&&Ze===O.length-1){We=U[Ze];break}if(ze>ot&&ze<O[Ze+1]){ze=(ze-ot)/(O[Ze+1]-ot),We=Tn.interpolate(U[Ze],U[Ze+1],ze,l);break}}else er(U)==="function"&&(We=U(ze));Ce&&(Ie[mt]=We)}return We},sn=function(){return Ie={}};Ge(i);var Je=function(ue){var Pe=Tn(Dt(ue));return Q&&Pe[Q]?Pe[Q]():Pe};return Je.classes=function(ue){if(ue!=null){if(er(ue)==="array")B=ue,x=[ue[0],ue[ue.length-1]];else{var Pe=Tn.analyze(x);ue===0?B=[Pe.min,Pe.max]:B=Tn.limits(Pe,"e",ue)}return Je}return B},Je.domain=function(ue){if(!arguments.length)return x;se=ue[0],ge=ue[ue.length-1],O=[];var Pe=U.length;if(ue.length===Pe&&se!==ge)for(var We=0,ze=Array.from(ue);We<ze.length;We+=1){var jt=ze[We];O.push((jt-se)/(ge-se))}else{for(var mt=0;mt<Pe;mt++)O.push(mt/(Pe-1));if(ue.length>2){var Ze=ue.map(function(st,it){return it/(ue.length-1)}),ot=ue.map(function(st){return(st-se)/(ge-se)});ot.every(function(st,it){return Ze[it]===st})||(Ht=function(st){if(st<=0||st>=1)return st;for(var it=0;st>=ot[it+1];)it++;var kn=(st-ot[it])/(ot[it+1]-ot[it]),ea=Ze[it]+kn*(Ze[it+1]-Ze[it]);return ea})}}return x=[se,ge],Je},Je.mode=function(ue){return arguments.length?(l=ue,sn(),Je):l},Je.range=function(ue,Pe){return Ge(ue),Je},Je.out=function(ue){return Q=ue,Je},Je.spread=function(ue){return arguments.length?(_=ue,Je):_},Je.correctLightness=function(ue){return ue==null&&(ue=!0),le=ue,sn(),le?at=function(Pe){for(var We=Dt(0,!0).lab()[0],ze=Dt(1,!0).lab()[0],jt=We>ze,mt=Dt(Pe,!0).lab()[0],Ze=We+(ze-We)*Pe,ot=mt-Ze,st=0,it=1,kn=20;Math.abs(ot)>.01&&kn-- >0;)(function(){return jt&&(ot*=-1),ot<0?(st=Pe,Pe+=(it-Pe)*.5):(it=Pe,Pe+=(st-Pe)*.5),mt=Dt(Pe,!0).lab()[0],ot=mt-Ze})();return Pe}:at=function(Pe){return Pe},Je},Je.padding=function(ue){return ue!=null?(er(ue)==="number"&&(ue=[ue,ue]),k=ue,Je):k},Je.colors=function(ue,Pe){arguments.length<2&&(Pe="hex");var We=[];if(arguments.length===0)We=U.slice(0);else if(ue===1)We=[Je(.5)];else if(ue>1){var ze=x[0],jt=x[1]-ze;We=dm(0,ue,!1).map(function(it){return Je(ze+it/(ue-1)*jt)})}else{i=[];var mt=[];if(B&&B.length>2)for(var Ze=1,ot=B.length,st=1<=ot;st?Ze<ot:Ze>ot;st?Ze++:Ze--)mt.push((B[Ze-1]+B[Ze])*.5);else mt=x;We=mt.map(function(it){return Je(it)})}return Tn[Pe]&&(We=We.map(function(it){return it[Pe]()})),We},Je.cache=function(ue){return ue!=null?(Ce=ue,Je):Ce},Je.gamma=function(ue){return ue!=null?(Ke=ue,Je):Ke},Je.nodata=function(ue){return ue!=null?(p=Tn(ue),Je):p},Je};function dm(i,l,p){for(var _=[],x=i<l,O=p?x?l+1:l-1:l,k=i;x?k<O:k>O;x?k++:k--)_.push(k);return _}var xr=v,fm=ti,pm=function(i){for(var l=[1,1],p=1;p<i;p++){for(var _=[1],x=1;x<=l.length;x++)_[x]=(l[x]||0)+l[x-1];l=_}return l},hm=function(i){var l,p,_,x,O,k,B;if(i=i.map(function(le){return new xr(le)}),i.length===2)l=i.map(function(le){return le.lab()}),O=l[0],k=l[1],x=function(le){var Ie=[0,1,2].map(function(Ce){return O[Ce]+le*(k[Ce]-O[Ce])});return new xr(Ie,"lab")};else if(i.length===3)p=i.map(function(le){return le.lab()}),O=p[0],k=p[1],B=p[2],x=function(le){var Ie=[0,1,2].map(function(Ce){return(1-le)*(1-le)*O[Ce]+2*(1-le)*le*k[Ce]+le*le*B[Ce]});return new xr(Ie,"lab")};else if(i.length===4){var U;_=i.map(function(le){return le.lab()}),O=_[0],k=_[1],B=_[2],U=_[3],x=function(le){var Ie=[0,1,2].map(function(Ce){return(1-le)*(1-le)*(1-le)*O[Ce]+3*(1-le)*(1-le)*le*k[Ce]+3*(1-le)*le*le*B[Ce]+le*le*le*U[Ce]});return new xr(Ie,"lab")}}else if(i.length>=5){var Q,se,ge;Q=i.map(function(le){return le.lab()}),ge=i.length-1,se=pm(ge),x=function(le){var Ie=1-le,Ce=[0,1,2].map(function(Ke){return Q.reduce(function(Ge,Xe,at){return Ge+se[at]*Math.pow(Ie,ge-at)*Math.pow(le,at)*Xe[Ke]},0)});return new xr(Ce,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return x},vm=function(i){var l=hm(i);return l.scale=function(){return fm(l)},l},ni=N,Sn=function(i,l,p){if(!Sn[p])throw new Error("unknown blend mode "+p);return Sn[p](i,l)},Xn=function(i){return function(l,p){var _=ni(p).rgb(),x=ni(l).rgb();return ni.rgb(i(_,x))}},Zn=function(i){return function(l,p){var _=[];return _[0]=i(l[0],p[0]),_[1]=i(l[1],p[1]),_[2]=i(l[2],p[2]),_}},mm=function(i){return i},gm=function(i,l){return i*l/255},ym=function(i,l){return i>l?l:i},_m=function(i,l){return i>l?i:l},bm=function(i,l){return 255*(1-(1-i/255)*(1-l/255))},Am=function(i,l){return l<128?2*i*l/255:255*(1-2*(1-i/255)*(1-l/255))},wm=function(i,l){return 255*(1-(1-l/255)/(i/255))},Cm=function(i,l){return i===255?255:(i=255*(l/255)/(1-i/255),i>255?255:i)};Sn.normal=Xn(Zn(mm)),Sn.multiply=Xn(Zn(gm)),Sn.screen=Xn(Zn(bm)),Sn.overlay=Xn(Zn(Am)),Sn.darken=Xn(Zn(ym)),Sn.lighten=Xn(Zn(_m)),Sn.dodge=Xn(Zn(Cm)),Sn.burn=Xn(Zn(wm));for(var Im=Sn,ai=b.type,Tm=b.clip_rgb,Sm=b.TWOPI,km=Math.pow,Em=Math.sin,xm=Math.cos,Sc=N,$m=function(i,l,p,_,x){i===void 0&&(i=300),l===void 0&&(l=-1.5),p===void 0&&(p=1),_===void 0&&(_=1),x===void 0&&(x=[0,1]);var O=0,k;ai(x)==="array"?k=x[1]-x[0]:(k=0,x=[x,x]);var B=function(U){var Q=Sm*((i+120)/360+l*U),se=km(x[0]+k*U,_),ge=O!==0?p[0]+U*O:p,le=ge*se*(1-se)/2,Ie=xm(Q),Ce=Em(Q),Ke=se+le*(-.14861*Ie+1.78277*Ce),Ge=se+le*(-.29227*Ie-.90649*Ce),Xe=se+le*(1.97294*Ie);return Sc(Tm([Ke*255,Ge*255,Xe*255,1]))};return B.start=function(U){return U==null?i:(i=U,B)},B.rotations=function(U){return U==null?l:(l=U,B)},B.gamma=function(U){return U==null?_:(_=U,B)},B.hue=function(U){return U==null?p:(p=U,ai(p)==="array"?(O=p[1]-p[0],O===0&&(p=p[1])):O=0,B)},B.lightness=function(U){return U==null?x:(ai(U)==="array"?(x=U,k=U[1]-U[0]):(x=[U,U],k=0),B)},B.scale=function(){return Sc.scale(B)},B.hue(p),B},Mm=v,Nm="0123456789abcdef",Om=Math.floor,Lm=Math.random,Pm=function(){for(var i="#",l=0;l<6;l++)i+=Nm.charAt(Om(Lm()*16));return new Mm(i,"hex")},ri=f,kc=Math.log,Rm=Math.pow,Fm=Math.floor,Dm=Math.abs,Ec=function(i,l){l===void 0&&(l=null);var p={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return ri(i)==="object"&&(i=Object.values(i)),i.forEach(function(_){l&&ri(_)==="object"&&(_=_[l]),_!=null&&!isNaN(_)&&(p.values.push(_),p.sum+=_,_<p.min&&(p.min=_),_>p.max&&(p.max=_),p.count+=1)}),p.domain=[p.min,p.max],p.limits=function(_,x){return xc(p,_,x)},p},xc=function(i,l,p){l===void 0&&(l="equal"),p===void 0&&(p=7),ri(i)=="array"&&(i=Ec(i));var _=i.min,x=i.max,O=i.values.sort(function(si,ii){return si-ii});if(p===1)return[_,x];var k=[];if(l.substr(0,1)==="c"&&(k.push(_),k.push(x)),l.substr(0,1)==="e"){k.push(_);for(var B=1;B<p;B++)k.push(_+B/p*(x-_));k.push(x)}else if(l.substr(0,1)==="l"){if(_<=0)throw new Error("Logarithmic scales are only possible for values > 0");var U=Math.LOG10E*kc(_),Q=Math.LOG10E*kc(x);k.push(_);for(var se=1;se<p;se++)k.push(Rm(10,U+se/p*(Q-U)));k.push(x)}else if(l.substr(0,1)==="q"){k.push(_);for(var ge=1;ge<p;ge++){var le=(O.length-1)*ge/p,Ie=Fm(le);if(Ie===le)k.push(O[Ie]);else{var Ce=le-Ie;k.push(O[Ie]*(1-Ce)+O[Ie+1]*Ce)}}k.push(x)}else if(l.substr(0,1)==="k"){var Ke,Ge=O.length,Xe=new Array(Ge),at=new Array(p),Ht=!0,Dt=0,sn=null;sn=[],sn.push(_);for(var Je=1;Je<p;Je++)sn.push(_+Je/p*(x-_));for(sn.push(x);Ht;){for(var ue=0;ue<p;ue++)at[ue]=0;for(var Pe=0;Pe<Ge;Pe++)for(var We=O[Pe],ze=Number.MAX_VALUE,jt=void 0,mt=0;mt<p;mt++){var Ze=Dm(sn[mt]-We);Ze<ze&&(ze=Ze,jt=mt),at[jt]++,Xe[Pe]=jt}for(var ot=new Array(p),st=0;st<p;st++)ot[st]=null;for(var it=0;it<Ge;it++)Ke=Xe[it],ot[Ke]===null?ot[Ke]=O[it]:ot[Ke]+=O[it];for(var kn=0;kn<p;kn++)ot[kn]*=1/at[kn];Ht=!1;for(var ea=0;ea<p;ea++)if(ot[ea]!==sn[ea]){Ht=!0;break}sn=ot,Dt++,Dt>200&&(Ht=!1)}for(var ta={},tr=0;tr<p;tr++)ta[tr]=[];for(var nr=0;nr<Ge;nr++)Ke=Xe[nr],ta[Ke].push(O[nr]);for(var Kn=[],Ca=0;Ca<p;Ca++)Kn.push(ta[Ca][0]),Kn.push(ta[Ca][ta[Ca].length-1]);Kn=Kn.sort(function(si,ii){return si-ii}),k.push(Kn[0]);for(var $r=1;$r<Kn.length;$r+=2){var Ia=Kn[$r];!isNaN(Ia)&&k.indexOf(Ia)===-1&&k.push(Ia)}}return k},$c={analyze:Ec,limits:xc},Mc=v,Vm=function(i,l){i=new Mc(i),l=new Mc(l);var p=i.luminance(),_=l.luminance();return p>_?(p+.05)/(_+.05):(_+.05)/(p+.05)},Nc=v,jn=Math.sqrt,xt=Math.pow,Bm=Math.min,Um=Math.max,Oc=Math.atan2,Lc=Math.abs,To=Math.cos,Pc=Math.sin,Hm=Math.exp,Rc=Math.PI,jm=function(i,l,p,_,x){p===void 0&&(p=1),_===void 0&&(_=1),x===void 0&&(x=1);var O=function(Ia){return 360*Ia/(2*Rc)},k=function(Ia){return 2*Rc*Ia/360};i=new Nc(i),l=new Nc(l);var B=Array.from(i.lab()),U=B[0],Q=B[1],se=B[2],ge=Array.from(l.lab()),le=ge[0],Ie=ge[1],Ce=ge[2],Ke=(U+le)/2,Ge=jn(xt(Q,2)+xt(se,2)),Xe=jn(xt(Ie,2)+xt(Ce,2)),at=(Ge+Xe)/2,Ht=.5*(1-jn(xt(at,7)/(xt(at,7)+xt(25,7)))),Dt=Q*(1+Ht),sn=Ie*(1+Ht),Je=jn(xt(Dt,2)+xt(se,2)),ue=jn(xt(sn,2)+xt(Ce,2)),Pe=(Je+ue)/2,We=O(Oc(se,Dt)),ze=O(Oc(Ce,sn)),jt=We>=0?We:We+360,mt=ze>=0?ze:ze+360,Ze=Lc(jt-mt)>180?(jt+mt+360)/2:(jt+mt)/2,ot=1-.17*To(k(Ze-30))+.24*To(k(2*Ze))+.32*To(k(3*Ze+6))-.2*To(k(4*Ze-63)),st=mt-jt;st=Lc(st)<=180?st:mt<=jt?st+360:st-360,st=2*jn(Je*ue)*Pc(k(st)/2);var it=le-U,kn=ue-Je,ea=1+.015*xt(Ke-50,2)/jn(20+xt(Ke-50,2)),ta=1+.045*Pe,tr=1+.015*Pe*ot,nr=30*Hm(-xt((Ze-275)/25,2)),Kn=2*jn(xt(Pe,7)/(xt(Pe,7)+xt(25,7))),Ca=-Kn*Pc(2*k(nr)),$r=jn(xt(it/(p*ea),2)+xt(kn/(_*ta),2)+xt(st/(x*tr),2)+Ca*(kn/(_*ta))*(st/(x*tr)));return Um(0,Bm(100,$r))},Fc=v,Km=function(i,l,p){p===void 0&&(p="lab"),i=new Fc(i),l=new Fc(l);var _=i.get(p),x=l.get(p),O=0;for(var k in _){var B=(_[k]||0)-(x[k]||0);O+=B*B}return Math.sqrt(O)},zm=v,Wm=function(){for(var i=[],l=arguments.length;l--;)i[l]=arguments[l];try{return new(Function.prototype.bind.apply(zm,[null].concat(i))),!0}catch{return!1}},Dc=N,Vc=ti,Gm={cool:function(){return Vc([Dc.hsl(180,1,.9),Dc.hsl(250,.7,.4)])},hot:function(){return Vc(["#000","#f00","#ff0","#fff"]).mode("rgb")}},So={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"]},oi=0,Bc=Object.keys(So);oi<Bc.length;oi+=1){var Uc=Bc[oi];So[Uc.toLowerCase()]=So[Uc]}var Ym=So,Ft=N;Ft.average=lm,Ft.bezier=vm,Ft.blend=Im,Ft.cubehelix=$m,Ft.mix=Ft.interpolate=gc,Ft.random=Pm,Ft.scale=ti,Ft.analyze=$c.analyze,Ft.contrast=Vm,Ft.deltaE=jm,Ft.distance=Km,Ft.limits=$c.limits,Ft.valid=Wm,Ft.scales=Gm,Ft.colors=Zl,Ft.brewer=Ym;var Jm=Ft;return Jm})})(lp);var c1=lp.exports;const cp=l1(c1),u1=e=>(Bt("data-v-11b01a96"),e=e(),Ut(),e),d1=["onClick"],f1={key:1,class:"tag empty"},p1=u1(()=>H("span",null,"Empty Tags",-1)),h1=[p1],v1=`
def handle_tag_click(state, payload):
	state["selected_tag_id"] = payload`,m1="A component to display coloured tag pills.",g1={writer:{name:"Tags",description:m1,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:"#5551FF",category:Te.Style},seed:{name:"Seed value",desc:"Choose a different value to reshuffle colours.",type:L.Number,default:"1",category:Te.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:Te.Style},primaryTextColor:At,cssClasses:Oe},events:{"wf-tag-click":{desc:"Triggered when a tag is clicked.",stub:v1.trim()}},previewField:"text"}},y1=me({...g1,__name:"CoreTags",setup(e){_r(d=>({fc7ef3c0:c.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=ee(null),a=K(W.evaluatedFields),r=K(W.componentId),o=K(W.core),s=K(W.isBeingEdited),c=te(()=>{var m;return typeof((m=o.getComponentById(r).handlers)==null?void 0:m["wf-tag-click"])<"u"});function u(d){if(a.rotateHue.value=="no")return a.referenceColor.value;const m=cp(a.referenceColor.value),I=t[f(d)];return m.set("hsl.h",`${Math.sign(I.h)==-1?"-":"+"}${Math.abs(I.h)}`).set("hsl.s",`${Math.sign(I.s)==-1?"-":"+"}${Math.abs(I.s/100)}`).set("hsl.l",`${Math.sign(I.l)==-1?"-":"+"}${Math.abs(I.l/100)}`).css()}function f(d){let m=a.seed.value*52673&4294967295;for(let A=0;A<d.length;A++)m=(A+1)*d.charCodeAt(A)^m&4294967295;return Math.abs(m)%t.length}function h(d){const m=new CustomEvent("wf-tag-click",{detail:{payload:d}});n.value.dispatchEvent(m)}return(d,m)=>$(s)||Object.entries($(a).tags.value??[]).length>0?(T(),P("div",{key:0,ref_key:"rootEl",ref:n,class:"CoreTags"},[Object.entries($(a).tags.value??[]).length>0?(T(!0),P(xe,{key:0},St($(a).tags.value,(I,A)=>(T(),P("div",{key:A,class:"tag",style:ht({background:u(A)}),onClick:()=>h(A)},[H("span",null,he(I),1)],12,d1))),128)):(T(),P("div",f1,h1))],512)):ve("",!0)}}),_1=ye(y1,[["__scopeId","data-v-11b01a96"]]),b1={key:0,class:"material-symbols-outlined"},A1={class:"info"},w1={key:1,class:"caption"},C1={class:"container","data-writer-container":""},I1=`
def handle_avatar_click():
	print("The avatar was clicked")`,T1="A component to display user avatars.",S1={writer:{name:"Avatar",description:T1,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:Te.Style},orientation:{name:"Orientation",type:L.Text,options:{horizontal:"Horizontal",vertical:"Vertical"},default:"horizontal",category:Te.Style},primaryTextColor:At,secondaryTextColor:fn,separatorColor:Pt,cssClasses:Oe},events:{"wf-click":{desc:"Triggered when the avatar is clicked.",stub:I1.trim()}},previewField:"text"}},k1=me({...S1,__name:"CoreAvatar",setup(e){_r(c=>({c63322da:$(n).imageSrc.value?`url("${$(n).imageSrc.value}")`:"none",f0da2d3a:o.value?"pointer":"auto"}));const t=ee(null),n=K(W.evaluatedFields),a=K(W.componentId),r=K(W.core),o=te(()=>{var u;return typeof((u=r.getComponentById(a).handlers)==null?void 0:u["wf-click"])<"u"});function s(c){const u=Ss(c);t.value.dispatchEvent(u)}return(c,u)=>(T(),P("div",{ref_key:"rootEl",ref:t,class:ct(["CoreAvatar",[$(n).size.value,$(n).orientation.value]])},[H("div",{class:"image",onClick:s},[$(n).imageSrc.value?ve("",!0):(T(),P("i",b1," account_circle "))]),H("div",A1,[$(n).name.value?(T(),P("div",{key:0,class:"name",onClick:s},he($(n).name.value),1)):ve("",!0),$(n).caption.value?(T(),P("div",w1,he($(n).caption.value),1)):ve("",!0),H("div",C1,[bt(c.$slots,"default",{},void 0,!0)])])],2))}}),E1=ye(k1,[["__scopeId","data-v-2e4a1890"]]),x1={class:"BaseControlBar"},$1=me({__name:"BaseControlBar",props:{copyRawContent:{},copyStructuredContent:{}},setup(e){const t=e;function n({text:a=""}){try{navigator.clipboard.writeText(a)}catch(r){console.error(r)}}return(a,r)=>(T(),P("div",x1,[t.copyStructuredContent?(T(),P("button",{key:0,class:"control-button",onClick:r[0]||(r[0]=o=>n({text:t.copyStructuredContent}))}," Copy JSON ")):ve("",!0),t.copyRawContent?(T(),P("button",{key:1,class:"control-button",onClick:r[1]||(r[1]=o=>n({text:t.copyRawContent}))}," Copy ")):ve("",!0)]))}}),M1=ye($1,[["__scopeId","data-v-48b27c2c"]]),N1={key:0,class:"CoreAnnotatedText"},O1={key:0,class:"annotation-subject"},L1={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."]`},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:"#5551FF",category:Te.Style},seed:{name:"Seed value",desc:"Choose a different value to reshuffle colours.",type:L.Number,default:"1",category:Te.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:Te.Style},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:Te.Style},buttonColor:Vn,buttonTextColor:Bn,primaryTextColor:At,cssClasses:Oe},previewField:"data"}},P1=me({...L1,__name:"CoreAnnotatedText",setup(e){const t=K(W.evaluatedFields),n=te(()=>t.text.value?t.text.value:[]),a=K(W.isBeingEdited),r=K(W.componentId),o=te(()=>!t.text.value),s=te(()=>!o.value||a.value),c=[{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 u=[...c],f={},h=t.seed.value;function d(E,j){return E.set("hsl.h",`${Math.sign(j.h)==-1?"-":"+"}${Math.abs(j.h)}`).set("hsl.s",`${Math.sign(j.s)==-1?"-":"+"}${Math.abs(j.s/100)}`).set("hsl.l",`${Math.sign(j.l)==-1?"-":"+"}${Math.abs(j.l/100)}`).css()}function m(E,j=c.length){let M=t.seed.value*52673&4294967295;for(let y=0;y<E.length;y++)M=(y+1)*E.charCodeAt(y)^M&4294967295;return Math.abs(M)%j}function I(E){if(t.rotateHue.value=="no")return t.referenceColor.value;const j=cp(t.referenceColor.value);if(h!==t.seed.value&&(u=[...c],f={},h=t.seed.value),f[E])return d(j,f[E]);u.length===0&&(u=[...c]);const M=m(E,u.length),g=u[M];return f[E]=g,u.splice(M,1),d(j,g)}function A(E){return E.reduce((j,M)=>typeof M=="string"?j+M:j+M[0],"")}function b(E){try{return JSON.stringify(E)}catch{return E.join("")}}return(E,j)=>s.value?(T(),P("div",N1,[o.value?(T(),De($l,{key:0,"component-id":$(r)},null,8,["component-id"])):ve("",!0),(T(!0),P(xe,null,St(n.value,(M,g)=>(T(),P("span",{key:String(M)+g},[typeof M=="string"?(T(),P(xe,{key:0},[pt(he(M),1)],64)):ve("",!0),Array.isArray(M)?(T(),P("span",{key:1,class:"annotation",style:ht({background:M[2]||I(M[1])})},[pt(he(M[0])+" ",1),M[1]?(T(),P("span",O1,he(M[1]),1)):ve("",!0)],4)):ve("",!0)]))),128)),$(t).copyButtons.value==="yes"?(T(),De(M1,{key:1,"copy-raw-content":A(n.value),"copy-structured-content":b(n.value)},null,8,["copy-raw-content","copy-structured-content"])):ve("",!0)])):ve("",!0)}}),R1=ye(P1,[["__scopeId","data-v-a7d58481"]]);function ks(e){return!!(["string","number","boolean"].includes(typeof e)||e===null)}function Ml(e){return ks(e)?!1:Array.isArray(e)}function up(e){return!Ml(e)&&typeof e=="object"&&e!==null}function dp(e){return ks(e)?1:Object.keys(e).length}function fp(e){return typeof e.open=="boolean"&&Array.isArray(e.path)}const F1=["open","disabled"],D1={class:"content"},V1=me({__name:"BaseCollapsible",props:{open:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1}},emits:{toggle:e=>typeof e=="boolean"},setup(e,{emit:t}){const n=t;function a(r){n("toggle",r.newState==="open")}return(r,o)=>(T(),P("details",{class:"collapsible",open:e.open,disabled:e.disabled,onToggle:a},[H("summary",null,[bt(r.$slots,"title",{},void 0,!0)]),H("div",D1,[bt(r.$slots,"content",{},void 0,!0)])],40,F1))}}),B1=ye(V1,[["__scopeId","data-v-b8d34709"]]),U1=me({__name:"BaseJsonViewerChildrenCounter",props:{data:{type:Object,required:!0}},setup(e){const t=e,n=o=>`Object{${o}}`,a=o=>`Array[${o}]`,r=te(()=>{const o=dp(t.data);return o===0?n(0):Ml(t.data)?a(o):up(t.data)?n(o):n(0)});return(o,s)=>(T(),P("span",null,he(r.value),1))}}),pp=ye(U1,[["__scopeId","data-v-caef27f2"]]),H1={class:"BaseJsonViewerCollapsible__title"},j1={key:0},K1={class:"BaseJsonViewerCollapsible__content"},z1=me({__name:"BaseJsonViewerCollapsible",props:{open:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},title:{type:String,required:!1,default:void 0},data:{type:[Object,Array],required:!1,default:void 0}},emits:{toggle:e=>typeof e=="boolean"},setup(e){return(t,n)=>(T(),De(B1,{open:e.open,disabled:e.disabled,onToggle:n[0]||(n[0]=a=>t.$emit("toggle",a))},{title:Be(()=>[H("div",H1,[e.title?(T(),P("span",j1,he(e.title),1)):ve("",!0),e.data?(T(),De(pp,{key:1,data:e.data},null,8,["data"])):ve("",!0)])]),content:Be(()=>[H("div",K1,[bt(t.$slots,"default",{},void 0,!0)])]),_:3},8,["open","disabled"]))}}),hp=ye(z1,[["__scopeId","data-v-0e276f06"]]),W1={class:"JsonViewerValue"},G1=me({__name:"BaseJsonViewerValue",props:{data:{type:[Object,String,Number],required:!0}},setup(e){const t=e,n=te(()=>JSON.stringify(t.data));return(a,r)=>(T(),P("span",W1,he(n.value),1))}}),vp=ye(G1,[["__scopeId","data-v-463c7721"]]),Y1={class:"WdsJsonViewerObject"},J1={key:0,class:"WdsJsonViewerObject__value"},Q1=me({__name:"BaseJsonViewerObject",props:{data:{type:Object,required:!0},path:{type:Array,default:()=>[]},initialDepth:{type:Number,default:0}},emits:{toggle:fp},setup(e,{emit:t}){const n=e,a=ul(n,"initialDepth"),r=t,o=ee([]),s=te(()=>n.path.length+1);Ne(a,()=>{if(a.value===0){o.value=[];return}if(!(a.value===-1||a.value>s.value))return;const h=new Set([...o.value,...Object.keys(n.data)]);o.value=Array.from(h)},{immediate:!0});function c(f,h){h?o.value=[...o.value,f]:o.value=o.value.filter(d=>d!==f),r("toggle",{open:h,path:[...n.path,f]})}function u(f){return o.value.includes(String(f))}return(f,h)=>(T(),P("div",Y1,[(T(!0),P(xe,null,St(Object.entries(e.data),([d,m],I)=>(T(),P(xe,{key:I},[$(ks)(m)||$(dp)(m)===0?(T(),P("div",J1,[H("span",null,he(d),1),pt(": "),Fe(vp,{data:m},null,8,["data"])])):(T(),De(hp,{key:1,open:u(d),title:d,data:m,onToggle:A=>c(d,A)},{default:Be(()=>[u(d)?(T(),De(mp,{key:0,data:m,path:[...e.path,d],"initial-depth":a.value,onToggle:h[0]||(h[0]=A=>f.$emit("toggle",A))},null,8,["data","path","initial-depth"])):ve("",!0)]),_:2},1032,["open","title","data","onToggle"]))],64))),128))]))}}),Wu=ye(Q1,[["__scopeId","data-v-e27c7dc6"]]),mp=me({__name:"BaseJsonViewer",props:{data:{type:Object,required:!0},path:{type:Array,default:()=>[]},initialDepth:{type:Number,default:0}},emits:{toggle:fp},setup(e){const t=e,n=te(()=>t.path.length===0),a=te(()=>t.initialDepth===-1||t.initialDepth>0);return(r,o)=>$(up)(e.data)||$(Ml)(e.data)?(T(),P(xe,{key:0},[n.value?(T(),De(hp,{key:0,open:a.value,data:e.data,onToggle:o[1]||(o[1]=s=>r.$emit("toggle",{path:[],open:s}))},{default:Be(()=>[Fe(Wu,{data:e.data,path:e.path,"initial-depth":e.initialDepth,onToggle:o[0]||(o[0]=s=>r.$emit("toggle",s))},null,8,["data","path","initial-depth"])]),_:1},8,["open","data"])):(T(),De(Wu,{key:1,data:e.data,path:e.path,"initial-depth":e.initialDepth,onToggle:o[2]||(o[2]=s=>r.$emit("toggle",s))},null,8,["data","path","initial-depth"]))],64)):$(ks)(e.data)?(T(),De(vp,{key:1,data:e.data},null,8,["data"])):ve("",!0)}}),q1={class:"CoreJsonViewer"},X1="A component to explore JSON data as a hierarchy.",Z1={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},ew={name:"JSON Viewer",description:X1,category:"Content",fields:{data:{name:"Data",init:JSON.stringify(Z1),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"},jsonViewerIndentationSpacing:{name:"JSON indentation",type:L.Width,category:Te.Style,applyStyleVariable:!0},accentColor:Gt,secondaryTextColor:fn,separatorColor:Pt,cssClasses:Oe},previewField:"data"},tw={writer:ew},nw=me({...tw,__name:"CoreJsonViewer",setup(e){const t=K(W.evaluatedFields),n=te(()=>t.data.value),a=te(()=>Number(t.initialDepth.value)||0);return(r,o)=>(T(),P("div",q1,[n.value?(T(),De(mp,{key:0,data:n.value,"initial-depth":a.value},null,8,["data","initial-depth"])):(T(),De(pp,{key:1,data:{}}))]))}}),aw=ye(nw,[["__scopeId","data-v-f500cee8"]]);function Es(e){const t=/[\\]?@{([^}]*)}/g;function n(f,h){var A;let d=[],m="",I=0;for(let b=0;b<f.length;b++){const E=f.charAt(b);E=="."?I==0?(d.push(m),m=""):m+=E:E=="["?(I==0?(d.push(m),m=""):m+=E,I++):E=="]"?(I--,I==0?m=(A=a(m,h))==null?void 0:A.toString():m+=E):m+=E}return m&&d.push(m),d}function a(f,h){let m=h?r(h):void 0,I=e.getUserState();const A=n(f,h);for(let b=0;b<A.length;b++)m=m==null?void 0:m[A[b]],I=I==null?void 0:I[A[b]];return m??I}function r(f){var d,m;const h={};for(let I=0;I<f.length-1;I++){const A=f[I],{componentId:b}=A,{type:E}=e.getComponentById(b);if(E!=="repeater"||I+1>=f.length)continue;const j=f.slice(0,I+1),M=f.slice(0,I+2),{instanceNumber:g}=M.at(-1),y=c(j,"repeaterObject");if(!y)continue;const C=Object.entries(y),v=c(j,"keyVariable"),D=c(j,"valueVariable");h[v]=(d=C[g])==null?void 0:d[0],h[D]=(m=C[g])==null?void 0:m[1]}return h}function o(f,h){return f==null?"":f.replace(t,(m,I)=>{if(m.charAt(0)=="\\")return m.substring(1);const A=I.trim();if(!A)return"";const b=a(A,h);return typeof b>"u"?"":typeof b=="object"?JSON.stringify(b):b.toString()})}function s(f){const{componentId:h}=f.at(-1),d=e.getComponentById(h);if(!d)return;const m={},{fields:I}=e.getComponentDefinition(d.type);if(I)return Object.keys(I).forEach(A=>{m[A]=te(()=>c(f,A))}),m}function c(f,h){var g;const{componentId:d}=f.at(-1),m=e.getComponentById(d);if(!m)return;const{fields:I}=e.getComponentDefinition(m.type),A=(g=m.content)==null?void 0:g[h],b=I[h].default,E=o(A,f),j=I[h].type,M=typeof E>"u"||E===null||E==="";if(j==L.Object||j==L.KeyValue){if(!E)return JSON.parse(b??null);if(typeof E!="string")return E;let y;try{y=JSON.parse(E)}catch{return JSON.parse(b)??null}return y}else if(j==L.Number){const y=b===null?null:parseFloat(b);if(M)return y??null;const C=parseFloat(E);return typeof C===void 0||Number.isNaN(C)?y??null:C}else return j==L.IdKey?A:M?b??"":E}function u(f,h){const d=e.getComponentById(f);if(!d)return;if(typeof d.visible>"u"||d.visible.expression===!0)return!0;if(d.visible.expression===!1)return!1;const m=a(d.visible.binding,h);return d.visible.reversed===!0?!m:!!m}return{getEvaluatedFields:s,isComponentVisible:u,evaluateExpression:a}}function zt(e,t,n){const a=ee(),r=ee(!1),o=ee(null),s=t.at(-1).componentId,c=te(()=>e.getComponentById(s)),{evaluateExpression:u}=Es(e);function f(){var m;const d=e.getComponentById(s);if((m=d==null?void 0:d.binding)!=null&&m.stateRef)return u(d.binding.stateRef,t)}function h(d,m,I){var M,g;a.value=d;const A=(M=c.value.handlers)==null?void 0:M[m],b=((g=c.value.binding)==null?void 0:g.eventType)==m;if(!A&&!b)return;if(r.value){o.value={eventValue:d,emitEventType:m};return}r.value=!0;const E=()=>{r.value=!1,o.value&&(h(o.value.eventValue,o.value.emitEventType),o.value=null),I==null||I()},j=new CustomEvent(m,{detail:{payload:d,callback:E}});n.value instanceof HTMLElement?n.value.dispatchEvent(j):n.value.$el.dispatchEvent(j)}return Ne(()=>f(),d=>{r.value||(a.value=d)},{immediate:!0}),Ne(a,d=>{typeof d>"u"&&(a.value="")},{immediate:!0}),{formValue:a,handleInput:h}}const rw={key:0},ow=me({__name:"BaseInputWrapper",props:{label:{},isHorizontal:{type:Boolean}},setup(e){const t=e;return(n,a)=>(T(),P("div",{ref:"rootEl",class:ct(["BaseInputWrapper",{horizontal:n.isHorizontal}])},[t.label?(T(),P("label",rw,he(t.label),1)):ve("",!0),bt(n.$slots,"default",{},void 0,!0)],2))}}),on=ye(ow,[["__scopeId","data-v-47a9ce23"]]),sw=["checked","value"],iw=["for"],lw={a:"Option A",b:"Option B"},cw="A user input component that allows users to choose multiple values from a list of options using checkboxes.",uw=`
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`,dw={writer:{name:"Checkbox Input",description:cw,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(lw,null,2)},orientation:{name:"Orientation",type:L.Text,options:{vertical:"Vertical",horizontal:"Horizontal"},default:"vertical",category:Te.Style,desc:"Specify how to lay out the options."},primaryTextColor:At,accentColor:Gt,cssClasses:Oe},events:{"wf-options-change":{desc:"Sent when the selected options change.",stub:uw.trim(),bindable:!0}}}},fw=me({...dw,__name:"CoreCheckboxInput",setup(e){const t=K(W.evaluatedFields),n=ee(null),a=K(W.core),r=K(W.instancePath),o=K(W.flattenedInstancePath),{formValue:s,handleInput:c}=zt(a,r,n);function u(){return n.value?Array.from(n.value.$el.querySelectorAll('input[type="checkbox"]')).map(d=>d.checked?d.value:void 0).filter(d=>typeof d<"u"):void 0}return(f,h)=>(T(),De(on,{ref_key:"rootInstance",ref:n,label:$(t).label.value,class:"CoreCheckboxInput"},{default:Be(()=>[H("div",{class:ct(["options",{horizontal:$(t).orientation.value=="horizontal"}])},[(T(!0),P(xe,null,St($(t).options.value,(d,m)=>(T(),P("div",{key:m,class:"option"},[H("input",{type:"checkbox",checked:Array.isArray($(s))?$(s).includes(m):!1,value:m,onInput:h[0]||(h[0]=I=>$(c)(u(),"wf-options-change"))},null,40,sw),H("label",{for:`${$(o)}-option-${m}`},he(d),9,iw)]))),128))],2)]),_:1},8,["label"]))}}),pw=ye(fw,[["__scopeId","data-v-bd83e48c"]]),hw=["value","list"],vw=["id"],mw=me({__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,a=t,r=ee(),o=K(W.flattenedInstancePath),s=te(()=>{var f;return(f=n.customColors)!=null&&f.length?`${o}_datalist`:null});function c(f){a("update:value",f.target.value)}function u(f){a("change",f.target.value)}return(f,h)=>(T(),P(xe,null,[H("input",{ref_key:"pickerEl",ref:r,type:"color",class:"BaseInputColor",value:e.value,list:s.value,onInput:c,onChange:u},null,40,hw),s.value?(T(),P("datalist",{key:0,id:s.value},[(T(!0),P(xe,null,St(e.customColors,d=>(T(),P("option",{key:d},he(d),1))),128))],8,vw)):ve("",!0)],64))}}),gw=ye(mw,[["__scopeId","data-v-f220f523"]]),yw="A user input component that allows users to select a color using a color picker interface.",Gu=`
def onchange_handler(state, payload):

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

	state["new_color"] = payload`,_w={name:"Color Input",description:yw,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(["#5551ff","#3be19b","#ff3d00","#333333","#0094d1"])},cssClasses:Oe},events:{"wf-change":{desc:"Capture changes as they happen.",stub:Gu,bindable:!0},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:Gu}}},bw={writer:_w},Aw=me({...bw,__name:"CoreColorInput",setup(e){const t=K(W.evaluatedFields),n=ee(null),a=K(W.core),r=K(W.instancePath),o=te(()=>Array.isArray(t.colorList.value)?t.colorList.value:void 0),{formValue:s,handleInput:c}=zt(a,r,n);return(u,f)=>(T(),De(on,{ref_key:"rootInstance",ref:n,label:$(t).label.value,class:"CoreColorInput"},{default:Be(()=>[Fe(gw,{value:$(s),"custom-colors":o.value,"onUpdate:value":f[0]||(f[0]=h=>$(c)(h,"wf-change")),onChange:f[1]||(f[1]=h=>$(c)(h,"wf-change-finish"))},null,8,["value","custom-colors"])]),_:1},8,["label"]))}}),ww=ye(Aw,[["__scopeId","data-v-4ec9b3f8"]]),Cw=["value"],Iw="A user input component that allows users to select a date using a date picker interface.",Tw=`
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`,Sw={writer:{name:"Date Input",description:Iw,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},cssClasses:Oe},events:{"wf-date-change":{desc:"Capture changes to this control.",stub:Tw,bindable:!0}}}},kw=me({...Sw,__name:"CoreDateInput",setup(e){const t=K(W.evaluatedFields),n=ee(null),a=K(W.core),r=K(W.instancePath),{formValue:o,handleInput:s}=zt(a,r,n);return(c,u)=>(T(),De(on,{ref_key:"rootInstance",ref:n,label:$(t).label.value,class:"CoreDateInput"},{default:Be(()=>[H("input",{type:"date",value:$(o),onChange:u[0]||(u[0]=f=>$(s)(f.target.value,"wf-date-change"))},null,40,Cw)]),_:1},8,["label"]))}}),Ew=ye(kw,[["__scopeId","data-v-07fd1bb8"]]),xw=me({__name:"WdsDropdownInput",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=oo(e,"modelValue");return(n,a)=>Mt((T(),P("select",{"onUpdate:modelValue":a[0]||(a[0]=r=>t.value=r)},[bt(n.$slots,"default",{},void 0,!0)],512)),[[Sl,t.value]])}}),gp=ye(xw,[["__scopeId","data-v-a8415965"]]),$w=["value"],Mw="A user input component that allows users to select a single value from a list of options using a dropdown menu.",Nw={a:"Option A",b:"Option B"},Ow=`
def onchange_handler(state, payload):

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

	state["selected"] = payload`,Lw={writer:{name:"Dropdown Input",description:Mw,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(Nw,null,2)},cssClasses:Oe},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:Ow.trim(),bindable:!0}}}},Pw=me({...Lw,__name:"CoreDropdownInput",setup(e){const t=K(W.evaluatedFields),n=ee(null),a=K(W.core),r=K(W.instancePath),{formValue:o,handleInput:s}=zt(a,r,n);return(c,u)=>(T(),De(on,{ref_key:"rootInstance",ref:n,label:$(t).label.value,class:"CoreDropdownInput"},{default:Be(()=>[Fe(gp,{modelValue:$(o),"onUpdate:modelValue":u[0]||(u[0]=f=>Vt(o)?o.value=f:null),onInput:u[1]||(u[1]=f=>$(s)(f.target.value,"wf-option-change"))},{default:Be(()=>[(T(!0),P(xe,null,St($(t).options.value,(f,h)=>(T(),P("option",{key:h,value:h},he(f),9,$w))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]))}}),Rw=ye(Pw,[["__scopeId","data-v-df70eb5d"]]),Fw=me({__name:"WdsButton",props:{variant:{type:String,default:"primary"},size:{type:String,default:"big"}},setup(e){const t=e,n=te(()=>["WdsButton",`WdsButton--${t.variant}`,`WdsButton--${t.size}`]);return(a,r)=>(T(),P("button",{class:ct(["WdsButton",n.value])},[bt(a.$slots,"default",{},void 0,!0)],2))}}),os=ye(Fw,[["__scopeId","data-v-4bf97e38"]]),Dw={class:"main"},Vw={key:0,class:"file-input"},Bw=["multiple"],Uw={key:0,class:"file-input__files"},Hw=["onClick"],jw={key:1},Kw={key:1,class:"status"},zw={key:1},Ww={key:2},Yu=200*1024*1024,Gw="A user input component that allows users to upload files.",Yw=`
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(),Jw={writer:{name:"File Input",description:Gw,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},allowMultipleFiles:{name:"Allow multiple files",default:"no",type:L.Text,options:{yes:"Yes",no:"No"}},cssClasses:Oe},events:{"wf-file-change":{desc:"Capture changes to this control.",stub:Yw,bindable:!0}}}},Qw=me({...Jw,__name:"CoreFileInput",setup(e){const t=K(W.evaluatedFields),n=ee(null),a=ee(null),r=ee(null),o=K(W.core),s=K(W.instancePath),c=ee(null),{formValue:u,handleInput:f}=zt(o,s,n),h=te(()=>Array.isArray(u.value)?u.value:[]),d=te(()=>t.allowMultipleFiles.value=="yes"?!0:void 0),m=async M=>{const g=new FileReader;return g.readAsDataURL(M),new Promise((y,C)=>{g.onload=()=>y(g.result),g.onerror=()=>C(g.error)})},I=async M=>{const g=M.target;if(!g.files||g.files.length==0)return;const y=async()=>{let v=0;r.value=null;const D=Promise.all(Array.from(g.files).map(async N=>(v+=N.size,{name:N.name,type:N.type,data:await m(N)})));return v>Yu?(r.value=`Files are too big. Total size limit is ${Math.floor(Yu/Math.pow(1024,2))}mb.`,[]):D};c.value=Array.from(g.files).map(v=>v.name),u.value=y();const C=()=>{c.value=null};f(y(),"wf-file-change",C)};Ne(u,M=>{typeof M>"u"&&a.value&&(a.value.value="")});function A(M){const g=document.createElement("a");g.href=String(M.data),g.download=M.name,g.click(),g.remove()}const b=te(()=>d.value?"files":"file"),E=te(()=>`Browse ${b.value}`),j=te(()=>`No ${b.value} selected`);return(M,g)=>(T(),De(on,{ref_key:"rootInstance",ref:n,label:c.value?"":$(t).label.value,class:"CoreFileInput"},{default:Be(()=>[H("div",Dw,[c.value?ve("",!0):(T(),P("div",Vw,[Mt(H("input",{ref_key:"fileEl",ref:a,type:"file",multiple:d.value,onChange:g[0]||(g[0]=y=>I(y))},null,40,Bw),[[an,!1]]),H("div",null,[Fe(os,{variant:"tertiary",size:"small",onClick:g[1]||(g[1]=y=>a.value.click())},{default:Be(()=>[pt(he(E.value),1)]),_:1})]),h.value?(T(),P("ul",Uw,[(T(!0),P(xe,null,St(h.value,(y,C)=>(T(),P("li",{key:C},[H("a",{href:"#",onClick:v=>A(y)},he(y.name),9,Hw)]))),128))])):(T(),P("p",jw,he(j.value),1))])),r.value||c.value?(T(),P("div",Kw,[c.value?(T(),De(xl,{key:0,class:"loadingSymbol"})):ve("",!0),c.value?(T(),P("span",zw,"Processing "+he(c.value.join(", "))+"...",1)):ve("",!0),r.value?(T(),P("span",Ww,he(r.value),1)):ve("",!0)])):ve("",!0)])]),_:1},8,["label"]))}}),qw=ye(Qw,[["__scopeId","data-v-47bd8a50"]]),Xw=e=>(Bt("data-v-f834fe9a"),e=e(),Ut(),e),Zw=["id","data-mode","data-list-position","aria-activedescendant"],eC={class:"placeholder"},tC={key:0,class:"desc",role:"option"},nC={key:1,class:"desc",role:"option"},aC=["onClick"],rC=Xw(()=>H("i",{class:"material-symbols-outlined"}," close ",-1)),oC=[rC],sC=["id","data-list-offset","onMousemove","onClick"],iC={key:0,class:"empty"},Ju=200,lC=me({__name:"BaseSelect",props:{baseId:{type:String,required:!0},activeValue:{required:!0,validator:()=>!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}){_r(oe=>({42180986:`${Ju}px`}));const n=t,a=e,{baseId:r,activeValue:o,options:s,maximumCount:c,mode:u,placeholder:f}=cl(a),h=ee(null),d=ee(null),m=ee(null),I=ee(null),A=ee(""),b=ee(null),E=ee([]),j=ee("hidden"),M=te(()=>{if(u.value=="multiple"&&g.value)return{};const oe={};return Object.entries(s.value).forEach(([ne,be])=>{u.value=="multiple"&&E.value.includes(ne)||String(be).toLocaleLowerCase().includes(A.value.toLocaleLowerCase())&&(oe[ne]=be)}),oe}),g=te(()=>!(c.value<=0||E.value.length<c.value));Ne(o,()=>{var oe,ne;E.value=[],(ne=(oe=o.value).forEach)==null||ne.call(oe,be=>{typeof s.value[be]>"u"||E.value.push(be)})},{immediate:!0}),Ne(M,()=>{y()});function y(){if(b.value<=0){b.value=0;return}const oe=Object.keys(M.value).length-1;b.value>=oe&&(b.value=oe)}Ne(b,()=>{var ne;if(b.value===null)return;const oe=(ne=h.value)==null?void 0:ne.querySelector(`[data-list-offset="${b.value}"]`);oe&&oe.scrollIntoView({block:"nearest",inline:"nearest"})});function C(){const oe=Object.keys(s.value),ne=E.value.filter(be=>oe.includes(be));n("change",ne)}function v(oe){const ne=E.value.indexOf(oe);ne!==-1&&(E.value.splice(ne,1),b.value=null),C()}function D(){E.value.pop(),C()}async function N(oe=!1){j.value="hidden",A.value="",oe&&(await Mn(),h.value&&(h.value.tabIndex=0,h.value.focus()))}function Y(oe){const ne=oe.key;if(ne=="Escape"){oe.preventDefault(),N(!0);return}if(ne!=="Tab"&&ne!=="Shift"&&j.value=="hidden"){we();return}if(ne=="Enter"){if(b.value===null)return;const be=Object.keys(M.value);if(!be||be.length==0)return;_e(be[b.value]);return}if(ne=="ArrowUp"){if(oe.preventDefault(),b.value===null){const be=Object.keys(M.value).length-1;b.value=be;return}b.value--,y();return}if(ne=="ArrowDown"){if(oe.preventDefault(),b.value===null){b.value=0;return}b.value++,y();return}}function X(oe){u.value=="multiple"&&oe.key=="Backspace"&&!A.value&&D()}async function _e(oe){if(u.value=="single")E.value=[];else if(E.value.includes(oe))return;E.value.push(oe),C(),A.value="",E.value.length==c.value&&N(!0),await Mn(),m.value.scrollTop=m.value.scrollHeight}function ie(oe){const ne=oe.relatedTarget;h.value&&(h.value.contains(ne)||N(!1))}function G(oe){const ne=oe.relatedTarget;h.value&&(h.value.contains(ne)||N(!0))}function fe(oe){oe.target.dataset.preventList||we()}async function we(){var be;if(j.value!=="hidden")return;const{bottom:oe}=h.value.getBoundingClientRect(),ne=document.body.clientHeight;Ju+oe>=ne?j.value="top":j.value="bottom",await Mn(),h.value.tabIndex=-1,(be=d.value)==null||be.focus()}function re(oe){b.value=oe}return(oe,ne)=>(T(),P("div",{id:$(r),ref_key:"rootEl",ref:h,class:"BaseSelect colorTransformer",tabindex:"0","data-mode":$(u),"data-list-position":j.value,role:"listbox","aria-activedescendant":b.value?`${$(r)}-option-${b.value}`:void 0,onKeydown:Y,onClick:fe,onFocusout:ie},[H("div",{ref_key:"selectedOptionsEl",ref:m,class:"selectedOptions"},[Mt(H("div",eC,[$(f)?(T(),P(xe,{key:0},[pt(he($(f)),1)],64)):$(u)=="multiple"&&$(c)>0?(T(),P(xe,{key:1},[pt("Select up to "+he($(c))+" option"+he($(c)>1?"s":"")+"...",1)],64)):$(u)=="multiple"?(T(),P(xe,{key:2},[pt("Select options....")],64)):$(u)=="single"?(T(),P(xe,{key:3},[pt("Select an option...")],64)):ve("",!0)],512),[[an,E.value.length==0]]),(T(!0),P(xe,null,St(E.value,be=>{var wt,He;return T(),P("div",{key:be,class:ct(["option",{notFound:!((wt=$(s))!=null&&wt[be])}]),"aria-selected":"true"},[(He=$(s))!=null&&He[be]?(T(),P("div",tC,he($(s)[be]),1)):(T(),P("div",nC,he(be),1)),H("div",{class:"remove","data-prevent-list":"true","aria-label":"Remove",onClick:gt=>v(be)},oC,8,aC)],2)}),128)),Mt(H("input",{ref_key:"inputEl",ref:d,"onUpdate:modelValue":ne[0]||(ne[0]=be=>A.value=be),type:"text","aria-autocomplete":"none",tabindex:"-1",onKeydown:X,onBlur:G},null,544),[[ma,A.value]])],512),Mt(H("div",{ref_key:"listEl",ref:I,class:"list"},[(T(!0),P(xe,null,St(M.value,(be,wt,He)=>(T(),P("div",{id:`${$(r)}-option-${He}`,key:`${He}-${wt}`,class:ct(["option",{highlighted:b.value==He}]),role:"option","data-list-offset":He,"data-prevent-list":"true",onMousemove:gt=>re(He),onClick:gt=>_e(wt)},he(be),43,sC))),128)),Object.keys(M.value).length==0?(T(),P("div",iC,[$(u)=="multiple"&&g.value?(T(),P(xe,{key:0},[pt("Up to "+he($(c))+" option"+he($(c)>1?"s":"")+" allowed.",1)],64)):(T(),P(xe,{key:1},[pt("No results")],64))])):ve("",!0)],512),[[an,j.value!=="hidden"]])],40,Zw))}}),yp=ye(lC,[["__scopeId","data-v-f834fe9a"]]),cC="A user input component that allows users to select multiple values from a searchable list of options.",uC={a:"Option A",b:"Option B"},dC=`
def onchange_handler(state, payload):

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

	state["selected"] = payload`,fC={writer:{name:"Multiselect Input",description:cC,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(uC,null,2)},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"},accentColor:{...Gt,desc:"The colour of the chips created for each selected option."},chipTextColor:{name:"Chip text",type:L.Color,default:"#ffffff",desc:"The colour of the text in the chips.",category:Te.Style,applyStyleVariable:!0},primaryTextColor:At,secondaryTextColor:fn,containerBackgroundColor:Dn,separatorColor:Pt,cssClasses:Oe},events:{"wf-options-change":{desc:"Sent when the selected options change.",stub:dC.trim(),bindable:!0}}}},pC=me({...fC,__name:"CoreMultiselectInput",setup(e){const t=K(W.evaluatedFields),n=te(()=>t.options.value),a=te(()=>t.maximumCount.value),r=ee(null),o=K(W.core),s=K(W.instancePath),c=K(W.flattenedInstancePath),{formValue:u,handleInput:f}=zt(o,s,r);function h(d){f(d,"wf-options-change")}return(d,m)=>(T(),De(on,{ref_key:"rootInstance",ref:r,label:$(t).label.value,class:"CoreMultiselectInput"},{default:Be(()=>[Fe(yp,{"base-id":$(c),"active-value":$(u),options:n.value,"maximum-count":a.value,mode:"multiple",placeholder:$(t).placeholder.value,onChange:h},null,8,["base-id","active-value","options","maximum-count","placeholder"])]),_:1},8,["label"]))}}),hC=ye(pC,[["__scopeId","data-v-dbfdb41b"]]),vC=["value","placeholder","min","max","step"],mC="A user input component that allows users to enter numeric values.",Qu=`
def onchange_handler(state, payload):

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

	state["new_val"] = payload`,gC={writer:{name:"Number Input",description:mC,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:Oe},events:{"wf-number-change":{desc:"Capture changes as they happen.",stub:Qu,bindable:!0},"wf-number-change-finish":{desc:"Capture changes once this control has lost focus.",stub:Qu}}}},yC=me({...gC,__name:"CoreNumberInput",setup(e){const t=K(W.evaluatedFields),n=ee(null),a=ee(null),r=K(W.core),o=K(W.instancePath),{formValue:s,handleInput:c}=zt(r,o,n);function u(){if(a.value.value=="")return null;let d=parseFloat(a.value.value);return isNaN(d)||(t.minValue.value!==null&&d<t.minValue.value&&(d=t.minValue.value,a.value.value=d),t.maxValue.value!==null&&d>t.maxValue.value&&(d=t.maxValue.value,a.value.value=d)),d}function f(){const d=u();isNaN(d)||c(d,"wf-number-change")}function h(){const d=u();isNaN(d)||c(d,"wf-number-change-finish")}return(d,m)=>(T(),De(on,{ref_key:"rootInstance",ref:n,label:$(t).label.value,class:"CoreNumberInput"},{default:Be(()=>[H("input",{ref_key:"inputEl",ref:a,type:"number",value:$(s),placeholder:$(t).placeholder.value,min:$(t).minValue.value!==null?$(t).minValue.value:void 0,max:$(t).maxValue.value!==null?$(t).maxValue.value:void 0,step:$(t).valueStep.value!==null?$(t).valueStep.value:void 0,onInput:f,onChange:h},null,40,vC)]),_:1},8,["label"]))}}),_C=ye(yC,[["__scopeId","data-v-b9f7d256"]]),bC=["id","checked","value","name","onInput"],AC=["for"],wC="A user input component that allows users to choose a single value from a list of options using radio buttons.",CC={a:"Option A",b:"Option B"},IC=`
def onchange_handler(state, payload):

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

	state["selected"] = payload`,TC={writer:{name:"Radio Input",description:wC,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(CC,null,2)},orientation:{name:"Orientation",type:L.Text,options:{vertical:"Vertical",horizontal:"Horizontal"},default:"vertical",category:Te.Style,desc:"Specify how to lay out the options."},primaryTextColor:At,accentColor:Gt,cssClasses:Oe},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:IC.trim(),bindable:!0}}}},SC=me({...TC,__name:"CoreRadioInput",setup(e){const t=K(W.evaluatedFields),n=K(W.flattenedInstancePath),a=ee(null),r=K(W.core),o=K(W.instancePath),{formValue:s,handleInput:c}=zt(r,o,a);return(u,f)=>(T(),De(on,{ref_key:"rootInstance",ref:a,label:$(t).label.value,class:"CoreRadioInput"},{default:Be(()=>[H("div",{class:ct(["options",{horizontal:$(t).orientation.value=="horizontal"}])},[(T(!0),P(xe,null,St($(t).options.value,(h,d)=>(T(),P("div",{key:d,class:"option"},[H("input",{id:`${$(n)}-option-${d}`,type:"radio",checked:$(s)===d,value:d,name:`${$(n)}-options`,onInput:m=>$(c)(d,"wf-option-change")},null,40,bC),H("label",{for:`${$(n)}-option-${d}`},he(h),9,AC)]))),128))],2)]),_:1},8,["label"]))}}),kC=ye(SC,[["__scopeId","data-v-6a98a0d3"]]),EC="A user input component that allows users to select a single value from a searchable list of options.",xC={a:"Option A",b:"Option B"},$C=`
def onchange_handler(state, payload):

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

	state["selected"] = payload`,MC={writer:{name:"Select Input",description:EC,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(xC,null,2)},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"},accentColor:Gt,chipTextColor:{name:"Chip text",type:L.Color,default:"#ffffff",desc:"The color of the text in the chips.",category:Te.Style,applyStyleVariable:!0},primaryTextColor:At,secondaryTextColor:fn,containerBackgroundColor:Dn,separatorColor:Pt,cssClasses:Oe},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:$C.trim(),bindable:!0}}}},NC=me({...MC,__name:"CoreSelectInput",setup(e){const t=K(W.evaluatedFields),n=te(()=>t.options.value),a=ee(null),r=K(W.core),o=K(W.flattenedInstancePath),s=K(W.instancePath),{formValue:c,handleInput:u}=zt(r,s,a);function f(h){const d=(h==null?void 0:h[0])??null;u(d,"wf-option-change")}return(h,d)=>(T(),De(on,{ref_key:"rootInstance",ref:a,label:$(t).label.value,class:"CoreSelectInput"},{default:Be(()=>[Fe(yp,{"base-id":$(o),"active-value":$(c)?[$(c)]:[],options:n.value,"maximum-count":1,mode:"single",placeholder:$(t).placeholder.value,onChange:f},null,8,["base-id","active-value","options","placeholder"])]),_:1},8,["label"]))}}),OC=ye(NC,[["__scopeId","data-v-fd9759cc"]]),LC=["aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext"],PC={class:"BaseInputRange__popover__content"},Ii=9,RC=me({__name:"BaseInputRange",props:_l({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=oo(e,"value"),a=ee(),r=ee(),o=te(()=>typeof n.value!="number"?50:(n.value-t.min)/(t.max-t.min)*100),s=ee(t.popoverDisplayMode==="always");let c=null;Ne(ul(t.popoverDisplayMode),()=>{t.popoverDisplayMode==="always"&&(s.value=!0)});function u(){t.popoverDisplayMode!=="always"&&(s.value=!0,c&&(clearTimeout(c),c=null),c=setTimeout(()=>{s.value=!1,c=null},1e3))}const f=te(()=>`clamp(
		0px,
		calc(${o.value}% - ${Ii}px),
		calc(100% - ${Ii*2}px)
	)`),h=te(()=>`calc(${f.value} - 3px)`);function d(I){if(u(),t.min!==void 0&&I<t.min||t.max!==void 0&&I>t.max)return;const A=I-t.min,b=Math.round(A/t.step),E=t.min+b*t.step;n.value!==E&&(n.value=E)}function m(I){document.addEventListener("mousemove",b),document.addEventListener("mouseup",E);const A=r.value.getBoundingClientRect();b(I);function b(j){const M=(j.x-A.left)/(A.right-A.left);if(M>1||M<0)return;const g=Math.round((t.max-t.min)*M+t.min);d(g)}function E(){document.removeEventListener("mouseup",E),document.removeEventListener("mousemove",b)}}return(I,A)=>(T(),P("div",{role:"slider","aria-valuemin":e.min,"aria-valuemax":e.max,"aria-valuenow":e.value,"aria-valuetext":`${e.value} (${Math.round(o.value)}%)`,class:ct(["BaseInputRange",{"BaseInputRange--popover-always-visible":e.popoverDisplayMode==="always"}])},[Fe(ws,null,{default:Be(()=>[Mt(H("div",{class:"BaseInputRange__popover",style:ht({left:h.value})},[H("span",PC,he(e.value),1)],4),[[an,s.value]])]),_:1}),H("div",{ref_key:"slider",ref:r,class:"BaseInputRange__slider",onMousedown:m},[H("div",{class:"BaseInputRange__slider__progress",style:ht({width:`calc(${o.value}% + ${Ii}px)`})},null,4)],544),H("button",{ref_key:"thumb",ref:a,type:"button",class:"BaseInputRange__thumb",style:ht({left:f.value}),"aria-label":"Use the arrow keys to increase or decrease the value.",onKeydown:[A[0]||(A[0]=Zr(b=>d(+n.value-e.step),["left"])),A[1]||(A[1]=Zr(b=>d(+n.value+e.step),["right"]))],onMousedown:m},null,36)],10,LC))}}),FC=ye(RC,[["__scopeId","data-v-ef9903dd"]]),DC="A user input component that allows users to select numeric values using a slider with optional constraints like min, max, and step.",VC=`
def onchange_handler(state, payload):

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

	state["new_val"] = payload`,BC={writer:{name:"Slider Input",description:DC,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"},accentColor:Gt,popoverColor:{name:"Popover color",type:L.Color,category:Te.Style,applyStyleVariable:!0,default:"white"},popoverBackgroundColor:{name:"Popover background",type:L.Color,category:Te.Style,applyStyleVariable:!0,default:"rgba(0, 0, 0, 1)"},cssClasses:Oe},events:{"wf-number-change":{desc:"Capture changes to this control.",stub:VC,bindable:!0}}}},UC=me({...BC,__name:"CoreSliderInput",setup(e){const t=K(W.evaluatedFields),n=ee(null),a=K(W.core),r=K(W.instancePath),{formValue:o,handleInput:s}=zt(a,r,n);return(c,u)=>(T(),De(on,{ref_key:"rootInstance",ref:n,label:$(t).label.value,class:"CoreSliderInput"},{default:Be(()=>[Fe(FC,{"popover-display-mode":"always",value:$(o),min:$(t).minValue.value,max:$(t).maxValue.value,step:$(t).stepSize.value,"onUpdate:value":u[0]||(u[0]=f=>$(s)(f,"wf-number-change"))},null,8,["value","min","max","step"])]),_:1},8,["label"]))}}),HC=ye(UC,[["__scopeId","data-v-5368e517"]]),jC=["type","value","placeholder"],KC="A user input component that allows users to enter single-line text values.",qu=`
def onchange_handler(state, payload):

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

	state["new_val"] = payload`,zC={writer:{name:"Text Input",description:KC,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:Te.Style},accentColor:Gt,cssClasses:Oe},events:{"wf-change":{desc:"Capture changes as they happen.",stub:qu,bindable:!0},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:qu}}}},WC=me({...zC,__name:"CoreTextInput",setup(e){const t=K(W.evaluatedFields),n=ee(null),a=K(W.core),r=K(W.instancePath),{formValue:o,handleInput:s}=zt(a,r,n);return(c,u)=>(T(),De(on,{ref_key:"rootInstance",ref:n,label:$(t).label.value,class:"CoreTextInput"},{default:Be(()=>[H("input",{type:$(t).passwordMode.value=="yes"?"password":"text",value:$(o),placeholder:$(t).placeholder.value,"aria-autocomplete":"none",onInput:u[0]||(u[0]=f=>$(s)(f.target.value,"wf-change")),onChange:u[1]||(u[1]=f=>$(s)(f.target.value,"wf-change-finish"))},null,40,jC)]),_:1},8,["label"]))}}),GC=ye(WC,[["__scopeId","data-v-1389a5bf"]]),YC=["value","placeholder","rows"],JC="A user input component that allows users to enter multi-line text values.",Xu=`
def onchange_handler(state, payload):

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

	state["new_val"] = payload`,QC={writer:{name:"Textarea Input",description:JC,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},placeholder:{name:"Placeholder",type:L.Text,control:Is.Textarea},rows:{name:"Rows",type:L.Number,init:"5",default:"5"},cssClasses:Oe},events:{"wf-change":{desc:"Capture changes as they happen.",stub:Xu,bindable:!0},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:Xu}}}},qC=me({...QC,__name:"CoreTextareaInput",setup(e){const t=K(W.evaluatedFields),n=ee(null),a=K(W.core),r=K(W.instancePath),{formValue:o,handleInput:s}=zt(a,r,n);return(c,u)=>(T(),De(on,{ref_key:"rootInstance",ref:n,label:$(t).label.value,class:"CoreTextareaInput"},{default:Be(()=>[H("textarea",{value:$(o),placeholder:$(t).placeholder.value,rows:$(t).rows.value,onInput:u[0]||(u[0]=f=>$(s)(f.target.value,"wf-change")),onChange:u[1]||(u[1]=f=>$(s)(f.target.value,"wf-change-finish"))},null,40,YC)]),_:1},8,["label"]))}}),XC=ye(qC,[["__scopeId","data-v-ccc605d0"]]),ZC=["value"],eI="A user input component that allows users to select a time.",tI=`
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`,nI={writer:{name:"Time Input",description:eI,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},cssClasses:Oe},events:{"wf-time-change":{desc:"Capture changes to this control.",stub:tI,bindable:!0}}}},aI=me({...nI,__name:"CoreTimeInput",setup(e){const t=K(W.evaluatedFields),n=ee(null),a=K(W.core),r=K(W.instancePath),{formValue:o,handleInput:s}=zt(a,r,n);return(c,u)=>(T(),De(on,{ref_key:"rootInstance",ref:n,label:$(t).label.value,class:"CoreTimeInput"},{default:Be(()=>[H("input",{type:"time",value:$(o),onChange:u[0]||(u[0]=f=>$(s)(f.target.value,"wf-time-change"))},null,40,ZC)]),_:1},8,["label"]))}}),rI=ye(aI,[["__scopeId","data-v-e3f68955"]]),_p=e=>(Bt("data-v-cd6b4273"),e=e(),Ut(),e),oI={key:0,class:"filler light"},sI={key:1,class:"face"},iI={viewBox:"0 0 100 100"},lI=_p(()=>H("circle",{class:"eye left",cx:"35",cy:"38",r:"6"},null,-1)),cI=_p(()=>H("circle",{class:"eye right",cx:"65",cy:"38",r:"6"},null,-1)),uI=["d"],dI="A user input component that allows users to provide a rating.",fI=`
def onchange_handler(state, payload):

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

	state["rating"] = payload`,pI={writer:{name:"Rating Input",description:dI,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."},maxValue:{name:"Max value",type:L.Number,default:"5",desc:"Valid values are between 2 and 11."},valueStep:{name:"Step",type:L.Number,default:"1",desc:"Valid values are between 0.25 and 1."},accentColor:Gt,primaryTextColor:At,cssClasses:Oe},events:{"wf-number-change":{stub:fI,bindable:!0}}}},hI=me({...pI,__name:"CoreRatingInput",setup(e){const t=K(W.evaluatedFields),n=ee(null),a=ee(null),r=K(W.core),o=K(W.instancePath),s=ee(null),{formValue:c,handleInput:u}=zt(r,o,n);function f(y){const C=y.offsetX,v=a.value.querySelectorAll(".unit");let D=0;return v.forEach(N=>{const Y=N;C>Y.offsetLeft+Y.offsetWidth?D++:C>Y.offsetLeft&&(D+=(C-Y.offsetLeft)/Y.offsetWidth)}),D}function h(y){let C=Math.ceil(y/M.value)*M.value;return C=Math.max(Math.min(C,j.value),E.value),C}function d(y){const C=f(y);return h(C)}function m(y){const C=d(y);s.value=C}function I(){s.value=null}function A(y){const C=Math.max(Math.min(y,j.value),E.value),v=45,D=95,N=(C-E.value)/(j.value-E.value),Y=N*-10,X=70+Y,_e=v+N*(D-v)+Y;return`M30,${X} Q50,${_e} 70,${X}`}function b(y){const C=d(y);u(C,"wf-number-change")}const E=te(()=>Math.max(Math.min(t.minValue.value,1),0)),j=te(()=>Math.max(Math.min(t.maxValue.value,11),2)),M=te(()=>Math.max(Math.min(t.valueStep.value,1),.25)),g=te(()=>{if(s.value!==null)return s.value;const y=parseFloat(c.value);return isNaN(y)?null:y});return(y,C)=>(T(),De(on,{ref_key:"rootInstance",ref:n,class:"CoreRatingInput",label:$(t).label.value},{default:Be(()=>[H("div",{ref_key:"unitsEl",ref:a,class:ct(["units",{valueSet:g.value!==null}]),onClick:b,onMousemove:m,onMouseout:I},[(T(!0),P(xe,null,St([...Array(j.value).keys()],v=>(T(),P("div",{key:v,class:ct(["unit",$(t).feedback.value])},[H("div",{class:"filler",style:ht({width:`${g.value>v?Math.min(g.value-v,1)*100:0}%`})},null,4),g.value!==null?(T(),P("div",oI)):ve("",!0),$(t).feedback.value=="faces"?(T(),P("div",sI,[(T(),P("svg",iI,[lI,cI,H("path",{class:"mouth",d:A(g.value??v+1)},null,8,uI)]))])):ve("",!0)],2))),128))],34)]),_:1},8,["label"]))}}),vI=ye(hI,[["__scopeId","data-v-cd6b4273"]]),mI=e=>(Bt("data-v-99da7290"),e=e(),Ut(),e),gI=["aria-checked","onKeydown"],yI=mI(()=>H("div",{class:"toggle"},null,-1)),_I=[yI],bI="A user input component with a simple on/off status.",AI=`
def handle_toggle(state, payload):

	# The payload will be a bool 

	state["its_on"] = payload`,wI={writer:{name:"Switch Input",description:bI,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:L.Text},accentColor:Gt,primaryTextColor:At,separatorColor:Pt,cssClasses:Oe},events:{"wf-toggle":{desc:"Sent when the switch is toggled.",stub:AI.trim(),bindable:!0}}}},CI=me({...wI,__name:"CoreSwitchInput",setup(e){const t=K(W.evaluatedFields),n=ee(null),a=K(W.core),r=K(W.instancePath),{formValue:o,handleInput:s}=zt(a,r,n),c=ee(!1);function u(){c.value=!c.value,s(c.value,"wf-toggle")}return Wt(()=>{c.value=!!o.value}),(f,h)=>(T(),De(on,{ref_key:"rootInstance",ref:n,label:$(t).label.value,"is-horizontal":!0,class:"CoreSwitchInput"},{default:Be(()=>[H("div",{class:ct(["switch",{on:c.value}]),tabindex:"0",role:"switch","aria-checked":c.value,onClick:u,onKeydown:Zr(kl(u,["prevent"]),["enter","space"])},_I,42,gI)]),_:1},8,["label"]))}}),II=ye(CI,[["__scopeId","data-v-99da7290"]]),TI=e=>(Bt("data-v-e614080e"),e=e(),Ut(),e),SI={class:"IconGen"},kI={key:0,width:"5",height:"9",viewBox:"0 0 5 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},EI=TI(()=>H("path",{d:"M4 1L1 4.64L4 8"},null,-1)),xI=[EI],$I=me({__name:"IconGen",props:{iconKey:{}},setup(e){const t=e,{iconKey:n}=cl(t);return(a,r)=>(T(),P("div",SI,[$(n)=="collapseArrow"?(T(),P("svg",kI,xI)):ve("",!0)]))}}),Nl=ye($I,[["__scopeId","data-v-e614080e"]]),MI=me({__name:"BaseContainer",props:{contentHAlign:{},contentVAlign:{},contentPadding:{},isHorizontal:{type:Boolean}},setup(e){const t=e,n=te(()=>{const a={padding:t.contentPadding};return t.isHorizontal?{...a,justifyContent:t.contentHAlign,alignItems:t.contentVAlign}:{...a,alignItems:t.contentHAlign,justifyContent:t.contentVAlign}});return(a,r)=>(T(),P("div",{class:ct(["BaseContainer",{horizontal:t.isHorizontal}]),style:ht(n.value),"data-writer-container":""},[bt(a.$slots,"default",{},void 0,!0)],6))}}),io=ye(MI,[["__scopeId","data-v-f05a4e20"]]),NI={key:0,class:"header"},OI={key:0,class:"titleContainer"},LI={key:0},PI={key:1,class:"collapsedTitle"},RI={class:"transformed"},FI={class:"content"},DI="A layout component that organises its child components in columns. Must be inside a Column Container component.",VI={writer:{name:"Column",description:DI,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:Te.Style},isSticky:{name:"Sticky",default:"no",type:L.Text,options:{yes:"Yes",no:"No"},category:Te.Style},isCollapsible:{name:"Collapsible",default:"no",type:L.Text,options:{yes:"Yes",no:"No"},category:Te.Style},startCollapsed:{name:"Start collapsed",type:L.Text,category:Te.Style,default:"no",options:{yes:"Yes",no:"No"},desc:"Only applied when the column is collapsible."},separatorColor:Pt,contentPadding:wr,contentHAlign:Ar,contentVAlign:Zf,cssClasses:Oe}},components:{IconGen:Nl}},BI=me({...VI,__name:"CoreColumn",setup(e){const t=K(W.instancePath),n=K(W.instanceData),a=K(W.core),r=K(W.componentId),o=K(W.evaluatedFields),s=te(()=>o.isCollapsible.value=="yes"),c=ee(o.isCollapsible.value=="yes"&&o.startCollapsed.value=="yes"),u=te(()=>o.isSticky.value=="yes"),f=te(()=>{let A;return c.value?A="0 0 32px":A=`${o.width.value} 0 0`,{flex:A}}),h=()=>{c.value=!c.value},d=te(()=>{var A,b;return I.value>=((b=(A=m.value)==null?void 0:A.value)==null?void 0:b.minimumNonCollapsiblePosition)}),m=te(()=>{var A;for(let b=-1;b>-1*t.length;b--){const E=t.at(b);if(((A=a.getComponentById(E.componentId))==null?void 0:A.type)!=="columns")continue;return n.at(b)}return null}),I=te(()=>{var A;return(A=a.getComponentById(r))==null?void 0:A.position});return Ne([()=>o.isCollapsible.value,I],()=>{const A=m.value;A&&(A.value={minimumNonCollapsiblePosition:void 0})}),Ne(m,A=>{!A||!A.value||s.value||typeof A.value.minimumNonCollapsiblePosition<"u"&&I.value>=A.value.minimumNonCollapsiblePosition||(A.value.minimumNonCollapsiblePosition=I.value)},{immediate:!0,deep:!0}),(A,b)=>(T(),P("div",{class:ct(["CoreColumn",{sticky:u.value,collapsible:s.value,collapsibleToRight:d.value,collapsed:c.value}]),style:ht(f.value)},[$(o).title.value||s.value?(T(),P("div",NI,[c.value?ve("",!0):(T(),P("div",OI,[$(o).title.value?(T(),P("h3",LI,he($(o).title.value),1)):ve("",!0)])),s.value?(T(),P("div",{key:1,class:"collapser",onClick:h},[Fe(Nl,{class:"collapserArrow","icon-key":"collapseArrow"})])):ve("",!0)])):ve("",!0),c.value&&$(o).title.value?(T(),P("div",PI,[H("div",RI,[H("div",FI,he($(o).title.value),1)])])):ve("",!0),Fe(io,{class:"container","content-h-align":$(o).contentHAlign.value,"content-v-align":$(o).contentVAlign.value,"content-padding":$(o).contentPadding.value},{default:Be(()=>[bt(A.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-v-align","content-padding"])],6))}}),UI=ye(BI,[["__scopeId","data-v-16cb53d1"]]),HI={class:"CoreColumns horizontal","data-writer-container":""},jI={writer:{name:"Column Container",description:"Serves as container for Column components",allowedChildrenTypes:["column","repeater","separator"],category:"Layout",fields:{cssClasses:Oe}}},KI=me({...jI,__name:"CoreColumns",setup(e){const t=K(W.instanceData);return t.at(-1).value={minimumNonCollapsiblePosition:void 0},(n,a)=>(T(),P("div",HI,[bt(n.$slots,"default",{},void 0,!0)]))}}),zI=ye(KI,[["__scopeId","data-v-715f8750"]]),WI={class:"CoreHeader"},GI={class:"container horizontal","data-writer-container":""},YI="A container component that typically contains the main navigation elements.",JI={writer:{name:"Header",description:YI,category:"Layout",allowedChildrenTypes:["*"],fields:{text:{name:"Text",init:"Header Text",default:"(No text)",type:L.Text},primaryTextColor:At,cssClasses:Oe},previewField:"text"}},QI=me({...JI,__name:"CoreHeader",setup(e){const t=K(W.evaluatedFields);return(n,a)=>(T(),P("div",WI,[H("h1",null,he($(t).text.value),1),H("div",GI,[bt(n.$slots,"default",{},void 0,!0)])]))}}),qI=ye(QI,[["__scopeId","data-v-36fb3480"]]),XI="A layout component that stacks its child components horizontally, wrapping them to the next row if necessary.",ZI={writer:{name:"Horizontal Stack",description:XI,allowedChildrenTypes:["*"],category:"Layout",fields:{contentPadding:{...wr,default:"0"},contentHAlign:Ar,cssClasses:Oe}}},eT=me({...ZI,__name:"CoreHorizontalStack",setup(e){const t=K(W.evaluatedFields);return(n,a)=>(T(),De(io,{class:"CoreHorizontalStack","content-h-align":$(t).contentHAlign.value,"content-v-align":"center","content-padding":$(t).contentPadding.value,"is-horizontal":!0},{default:Be(()=>[bt(n.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding"]))}}),tT=ye(eT,[["__scopeId","data-v-a52064e8"]]),nT={class:"CoreSection"},aT={key:0},rT="A container component that divides the layout into sections, with an optional title.",oT={writer:{name:"Section",description:rT,category:"Layout",allowedChildrenTypes:["*"],fields:{title:{name:"Title",init:"Section Title",desc:"Leave blank to hide.",type:L.Text},accentColor:Gt,primaryTextColor:At,secondaryTextColor:fn,containerBackgroundColor:Dn,containerShadow:br,separatorColor:Pt,buttonColor:Vn,buttonTextColor:Bn,buttonShadow:ga,contentPadding:{...wr,default:"16px"},contentHAlign:Ar,cssClasses:Oe},previewField:"title"}},sT=me({...oT,__name:"CoreSection",setup(e){const t=K(W.evaluatedFields);return(n,a)=>(T(),P("section",nT,[$(t).title.value?(T(),P("h3",aT,he($(t).title.value),1)):ve("",!0),Fe(io,{"content-h-align":$(t).contentHAlign.value,"content-padding":$(t).contentPadding.value},{default:Be(()=>[bt(n.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding"])]))}}),iT=ye(sT,[["__scopeId","data-v-1c422c8f"]]),lT="A visual component to create a separation between adjacent elements.",bp={writer:{name:"Separator",description:lT,category:"Layout",fields:{separatorColor:Pt,cssClasses:Oe}}},Zu=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.`)},cT=e=>(Bt("data-v-a6984589"),e=e(),Ut(),e),uT={class:"CoreSeparator separator"},dT=cT(()=>H("div",{class:"line"},null,-1)),fT=[dT];function pT(e,t,n,a,r,o){return T(),P("div",uT,fT)}typeof Zu=="function"&&Zu(bp);const hT=ye(bp,[["render",pT],["__scopeId","data-v-a6984589"]]),vT={class:"collapserContainer"},mT={class:"container","data-writer-container":""},gT="A container component that organises its children in a sidebar. Its parent must be a Page component.",yT={writer:{name:"Sidebar",description:gT,positionless:!0,slot:"sidebar",allowedParentTypes:["page"],allowedChildrenTypes:["*"],category:"Layout",fields:{startCollapsed:{name:"Start collapsed",type:L.Text,category:Te.Style,default:"no",options:{yes:"Yes",no:"No"}},sidebarBackgroundColor:{name:"Background",type:L.Color,category:Te.Style,applyStyleVariable:!0,default:"rgba(255, 255, 255, 0.3)"},accentColor:Gt,primaryTextColor:At,secondaryTextColor:fn,containerBackgroundColor:Dn,containerShadow:br,separatorColor:Pt,buttonColor:Vn,buttonTextColor:Bn,buttonShadow:ga,cssClasses:Oe}}},_T=me({...yT,__name:"CoreSidebar",setup(e){const t=K(W.evaluatedFields),n=ee(t.startCollapsed.value=="yes"),a=K(W.core),r=K(W.builderManager),o=K(W.componentId),s=te(()=>r==null?void 0:r.getSelectedId()),c=()=>{n.value=!n.value},u=ee(0),f=te(()=>({"max-height":`calc(100vh - ${u.value}px)`}));Ne(s,d=>{d&&h(d)&&(n.value=!1)});const h=d=>{const m=a.getComponentById(d);return!m||m.type=="root"?!1:m.parentId==o?!0:h(m.parentId)};return Wt(()=>{const d=document.querySelector(".ComponentRenderer");u.value=document.body.clientHeight-(d==null?void 0:d.parentElement.clientHeight)}),(d,m)=>(T(),P("div",{class:ct(["CoreSidebar",{collapsed:n.value}]),style:ht(f.value)},[H("div",vT,[H("div",{class:"collapser",onClick:c},[Fe(Nl,{class:"collapserArrow","icon-key":"collapseArrow"})])]),H("div",mT,[bt(d.$slots,"default",{},void 0,!0)])],6))}}),bT=ye(_T,[["__scopeId","data-v-8f197312"]]),AT={class:"CoreTab"},Ho=0,Ti=1,wT="A container component that displays its child components as a tab inside a Tab Container.",CT={writer:{name:"Tab",description:wT,allowedParentTypes:["tabs","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{name:{name:"Name",default:"(No name)",init:"Tab Name",type:L.Text},contentPadding:{...wr,default:"16px"},contentHAlign:Ar,cssClasses:Oe},previewField:"name"}},IT=me({...CT,__name:"CoreTab",setup(e){const t=K(W.evaluatedFields),n=K(W.instancePath),a=K(W.instanceData),r=K(W.core),o=K(W.builderManager),s=K(W.componentId),{isComponentVisible:c}=Es(r),u=te(()=>o==null?void 0:o.getSelectedId()),f=()=>{for(let E=-2;E>-1*n.length;E--){const j=n.at(E),{type:M}=r.getComponentById(j.componentId);if(M==="tabs")return E+1}},h=te(()=>{const E=f();return n.at(E)}),d=()=>{for(let E=-1;E>-1*n.length;E--){const j=n.at(E),{type:M}=r.getComponentById(j.componentId);if(M==="tabs")return a.at(E)}},m=()=>{const E=f(),j=n.slice(0,E),M=E+1<0?n.slice(E+1):[];return[...j,{componentId:n.at(E).componentId,instanceNumber:Ti},...M]},I=()=>{const E=d();E.value={activeTab:m()}},A=E=>{const j=r.getComponentById(E);return!j||j.type=="root"?!1:j.parentId==s?!0:A(j.parentId)};Ne(u,E=>{E&&A(E)&&I()});const b=te(()=>{var g;let E;(h==null?void 0:h.value.instanceNumber)==Ho?E=m():E=n;const M=(g=d().value)==null?void 0:g.activeTab;return JSON.stringify(M)==JSON.stringify(E)});return yr(()=>{var M;if((h==null?void 0:h.value.instanceNumber)==Ho)return;const E=d();(M=E.value)!=null&&M.activeTab||c(s,n)&&(E.value={activeTab:n})}),(E,j)=>{var M,g,y,C;return Mt((T(),P("div",AT,[((M=h.value)==null?void 0:M.instanceNumber)==Ho?(T(),P("button",{key:0,class:ct(["bit",{active:b.value}]),tabindex:"0",onClick:I},he($(t).name.value),3)):ve("",!0),((g=h.value)==null?void 0:g.instanceNumber)==Ti?Mt((T(),De(io,{key:1,class:"container","content-h-align":$(t).contentHAlign.value,"content-padding":$(t).contentPadding.value},{default:Be(()=>[bt(E.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding"])),[[an,b.value]]):ve("",!0)],512)),[[an,((y=h.value)==null?void 0:y.instanceNumber)==Ho||((C=h.value)==null?void 0:C.instanceNumber)==Ti&&b.value]])}}}),TT=ye(IT,[["__scopeId","data-v-8f193692"]]),ST={class:"CoreTabs"},kT={class:"tabSelector horizontal","data-writer-cage":"","data-writer-container":""},ET={class:"container"},xT="A container component for organising and displaying Tab components in a tabbed interface.",$T={writer:{name:"Tab Container",description:xT,category:"Layout",allowedChildrenTypes:["tab","repeater"],fields:{accentColor:Gt,primaryTextColor:At,secondaryTextColor:fn,containerBackgroundColor:Dn,containerShadow:br,separatorColor:Pt,buttonColor:Vn,buttonTextColor:Bn,buttonShadow:ga,cssClasses:Oe}}},MT=me({...$T,__name:"CoreTabs",setup(e){const t=K(W.instanceData);return t.at(-1).value={activeTab:void 0},(n,a)=>(T(),P("div",ST,[H("nav",kT,[bt(n.$slots,"default",{instanceNumber:0},void 0,!0)]),H("div",ET,[bt(n.$slots,"default",{instanceNumber:1},void 0,!0)])]))}}),NT=ye(MT,[["__scopeId","data-v-b4748194"]]),Ap=e=>(Bt("data-v-d224ec1f"),e=e(),Ut(),e),OT={class:"CoreStep"},LT=["disabled"],PT={class:"indicator"},RT=Ap(()=>H("div",{class:"linker left"},null,-1)),FT={key:0,class:"material-symbols-outlined"},DT=Ap(()=>H("div",{class:"linker right"},null,-1)),VT={class:"label"},jo=0,Si=1,BT="A container component that displays its child components as a step inside a Step Container.",UT={writer:{name:"Step",description:BT,allowedParentTypes:["steps","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{name:{name:"Name",default:"(No name)",init:"Step name",type:L.Text},contentPadding:{...wr,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:Ar,cssClasses:Oe},previewField:"name"}},HT=me({...UT,__name:"CoreStep",setup(e){const t=K(W.evaluatedFields),n=K(W.instancePath),a=K(W.instanceData),r=K(W.isBeingEdited),o=K(W.core),s=K(W.builderManager),c=K(W.componentId),{isComponentVisible:u}=Es(o),f=te(()=>s==null?void 0:s.getSelectedId()),h=m();function d(){for(let y=-1;y>-1*n.length;y--){const C=n.at(y),v=o.getComponentById(C.componentId);if(!v)return;if(v.type==="steps")return y}}function m(){const y=d();if(!(typeof y>"u"))return a.at(y)}function I(){const y=d()+1,C=n.slice(0,y),v=y+1<0?n.slice(y+1):[];return[...C,{componentId:n.at(y).componentId,instanceNumber:Si},...v]}function A(){h.value={...h.value,activeStep:I()}}function b(){const y=h.value.steps.findIndex(D=>JSON.stringify(D.instancePath)==JSON.stringify(n));if(y==-1||y+1>h.value.steps.length)return;let v=h.value.steps.slice(y+1).find(D=>D.isCompleted!="yes");v||(v=h.value.steps.at(-1)),h.value={...h.value,activeStep:v.instancePath}}function E(y){const C=o.getComponentById(y);return!C||C.type=="root"?!1:C.parentId==c?!0:E(C.parentId)}function j(){if(t.isCompleted.value!="yes"){A();return}b()}const M=te(()=>{const y=d()+1;return n.at(y)});Ne(f,y=>{y&&E(y)&&A()});const g=te(()=>{var v;let y;(M==null?void 0:M.value.instanceNumber)==jo?y=I():y=n;const C=(v=h.value)==null?void 0:v.activeStep;return JSON.stringify(C)==JSON.stringify(y)});return Ne([g,t.isCompleted],()=>{r.value||g.value&&t.isCompleted.value=="yes"&&b()}),Ne(t.isCompleted,(y,C)=>{C==="yes"&&y==="no"&&j()}),yr(()=>{var C;(M==null?void 0:M.value.instanceNumber)==jo||(typeof h.value.steps.find(v=>v.instancePath==n)>"u"&&h.value.steps.push({instancePath:n,isCompleted:t.isCompleted.value}),(C=h.value)==null?void 0:C.activeStep)||u(c,n)&&j()}),Ka(()=>{const y=h.value.steps.findIndex(C=>JSON.stringify(C.instancePath)==JSON.stringify(n));h.value.steps.splice(y,1)}),(y,C)=>{var v,D,N,Y;return Mt((T(),P("div",OT,[((v=M.value)==null?void 0:v.instanceNumber)==jo?(T(),P("button",{key:0,class:ct(["bit",{active:g.value,completed:$(t).isCompleted.value=="yes"}]),disabled:!$(r),stepindex:"0",onClick:A},[H("div",PT,[RT,H("div",{class:ct(["status",{completed:$(t).isCompleted.value=="yes"}])},[$(t).isCompleted.value=="yes"?(T(),P("i",FT," done ")):ve("",!0)],2),DT]),H("div",VT,he($(t).name.value),1)],10,LT)):ve("",!0),((D=M.value)==null?void 0:D.instanceNumber)==Si?Mt((T(),De(io,{key:1,class:"container","content-h-align":$(t).contentHAlign.value,"content-padding":$(t).contentPadding.value},{default:Be(()=>[bt(y.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding"])),[[an,g.value]]):ve("",!0)],512)),[[an,((N=M.value)==null?void 0:N.instanceNumber)==jo||((Y=M.value)==null?void 0:Y.instanceNumber)==Si&&g.value]])}}}),jT=ye(HT,[["__scopeId","data-v-d224ec1f"]]),KT={class:"CoreSteps"},zT={class:"stepSelector horizontal","data-writer-cage":"","data-writer-container":""},WT={class:"container"},GT="A container component for displaying Step components, allowing you to implement a stepped workflow.",YT={writer:{name:"Step Container",description:GT,category:"Layout",allowedChildrenTypes:["step","repeater"],fields:{accentColor:Gt,primaryTextColor:At,secondaryTextColor:fn,containerBackgroundColor:Dn,containerShadow:br,separatorColor:Pt,buttonColor:Vn,buttonTextColor:Bn,buttonShadow:ga,cssClasses:Oe}}},JT=me({...YT,__name:"CoreSteps",setup(e){const t=K(W.instanceData),n={activeStep:void 0,steps:[]};return t.at(-1).value=n,(a,r)=>(T(),P("div",KT,[H("nav",zT,[bt(a.$slots,"default",{instanceNumber:0},void 0,!0)]),H("div",WT,[bt(a.$slots,"default",{instanceNumber:1},void 0,!0)])]))}}),QT=ye(JT,[["__scopeId","data-v-74bbe8d7"]]),qT={key:0,class:"material-symbols-outlined"},XT=`
def handle_button_click(state):

	# Increment counter when the button is clicked

	state["counter"] += 1`,ZT="A standalone button component that can be linked to a click event handler.",eS={writer:{name:"Button",description:ZT,category:"Other",events:{"wf-click":{desc:"Capture single clicks.",stub:XT.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:Vn,buttonTextColor:Bn,icon:{name:"Icon",type:L.Text,desc:'A Material Symbols id, such as "arrow_forward".',category:Te.Style},buttonShadow:ga,separatorColor:Pt,cssClasses:Oe},previewField:"text"}},wp=me({...eS,__name:"CoreButton",setup(e){const t=ee(null),n=K(W.evaluatedFields),a=K(W.isDisabled);Ne(n.isDisabled,o=>{a.value=o=="yes"},{immediate:!0});function r(o){if(!t.value)return;const s=Ss(o);t.value.$el.dispatchEvent(s)}return(o,s)=>(T(),De(os,{ref_key:"rootInstance",ref:t,class:"CoreButton","aria-disabled":$(a),onClick:r},{default:Be(()=>[$(n).icon.value?(T(),P("i",qT,he($(n).icon.value),1)):ve("",!0),pt(" "+he($(n).text.value),1)]),_:1},8,["aria-disabled"]))}}),ed=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 ed=="function"&&ed(wp);const tS=ye(wp,[["__scopeId","data-v-5e8e22bd"]]),nS={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%)"},aS="A generic component that creates customisable HTML elements, which can serve as containers for other components.",Cp={writer:{name:"HTML Element",description:aS,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:null,init:JSON.stringify(nS,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."},attrs:{name:"Attributes",default:null,type:L.Object,desc:"Set additional HTML attributes for the element using a JSON object or a dictionary via a state reference."},htmlInside:{name:"HTML inside",default:null,type:L.Text,control:Is.Textarea,desc:"Define custom HTML to be used inside the element. It will be wrapped in a div and rendered after children components."},cssClasses:Oe}},setup(e,{slots:t}){const n=K(W.evaluatedFields);return()=>{let a;return n.htmlInside.value&&(a=ha("div",{innerHTML:n.htmlInside.value})),ha(n.element.value,{...n.attrs.value,class:"CoreHTML","data-writer-container":"",style:n.styles.value},[t.default({}),a])}}},td=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 td=="function"&&td(Cp);const Ol=e=>(Bt("data-v-bc7a1a0a"),e=e(),Ut(),e),rS={class:"pagination-left"},oS={class:"pagination-pagesize"},sS=["value","selected"],iS={class:"pagination-description"},lS={class:"bold"},cS={class:"bold"},uS={class:"bold"},dS={class:"pagination-right"},fS={class:"pagination-picker"},pS=Ol(()=>H("i",{class:"material-symbols-outlined"}," navigate_before ",-1)),hS=[pS],vS={key:0,class:"paginationpicker-block paginationpicker-neutral"},mS=["onClick"],gS={key:2,class:"paginationpicker-block paginationpicker-currentpage"},yS=Ol(()=>H("i",{class:"material-symbols-outlined"}," navigate_next ",-1)),_S=[yS],bS={class:"pagination-jump"},AS=Ol(()=>H("label",null,"Jump to",-1)),wS=["value"],CS=`
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}
`,IS=`
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}
`,TS={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."},pageSize:{name:"Page Size",default:"10",type:L.Number,desc:"The number of items per page."},totalItems:{name:"Total Items",default:"10",type:L.Number,desc:"The total number of items"},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:CS.trim()},"wf-change-page-size":{desc:"Fires when the user change the page size.",stub:IS.trim()}}}},SS=me({...TS,__name:"CorePagination",setup(e){const t=K(W.evaluatedFields),n=K(W.core),a=ee(null),r=K(W.instancePath),{formValue:o,handleInput:s}=zt(n,r,a),{formValue:c,handleInput:u}=zt(n,r,a),f=te(()=>t.pageSizeOptions.value!==""||t.pageSizeShowAll.value==="yes"),h=te(()=>t.jumpTo.value==="yes"),d=te(()=>t.totalItems.value==0?0:(t.page.value-1)*t.pageSize.value+1),m=te(()=>Math.min(t.page.value*t.pageSize.value,t.totalItems.value)),I=te(()=>t.totalItems.value),A=te(()=>Math.ceil(parseInt(t.totalItems.value)/parseInt(t.pageSize.value))),b=te(()=>{let v=[];const D=t.pageSizeOptions.value.split(",");for(const N in D){const Y=parseInt(D[N],10);v.push({value:Y,label:`${Y} items`})}return t.pageSizeShowAll.value==="yes"&&v.push({value:I.value,label:"All items"}),v}),E=te(()=>{const v=[],D=parseInt(t.page.value);if(A.value<=7)for(let N=0;N<A.value;N++)v.push(N+1);else D==1||D==2?(v.push(1),v.push(2),v.push(3),v.push("..."),v.push(A.value-2),v.push(A.value-1),v.push(A.value)):D==3?(v.push(1),v.push(2),v.push(3),v.push(4),v.push("..."),v.push(A.value-1),v.push(A.value)):D==4?(v.push(1),v.push(2),v.push(3),v.push(4),v.push(5),v.push("..."),v.push(A.value)):D==A.value||D==A.value-1?(v.push(1),v.push(2),v.push(3),v.push("..."),v.push(A.value-2),v.push(A.value-1),v.push(A.value)):D==A.value-2?(v.push(1),v.push(2),v.push("..."),v.push(A.value-3),v.push(A.value-2),v.push(A.value-1),v.push(A.value)):(v.push(1),v.push("..."),v.push(D-1),v.push(D),v.push(D+1),v.push("..."),v.push(A.value));return v}),j=te(()=>parseInt(t.page.value)-1<1),M=te(()=>parseInt(t.page.value)+1>A.value),g=v=>{if(v.target.value==="")return;let D=parseInt(v.target.value);D>A.value&&(D=A.value),s(D,"wf-change-page")},y=v=>{s(v,"wf-change-page")},C=v=>{let D=parseInt(v.target.value);u(D,"wf-change-page-size")};return Ne(t.page,()=>{}),Ne(t.pageSize,()=>{}),Wt(()=>{}),za(()=>{}),(v,D)=>(T(),P("div",{ref_key:"rootEl",ref:a,class:"CorePagination"},[H("div",rS,[Mt(H("div",oS,[H("select",{class:"pagesize-select",onChange:C},[(T(!0),P(xe,null,St(b.value,(N,Y)=>(T(),P("option",{key:Y,value:N.value,selected:N.value==$(t).pageSize.value},he(N.label),9,sS))),128))],32)],512),[[an,f.value]]),H("div",iS,[pt(" Showing "),H("span",lS,he(d.value),1),pt(" to "),H("span",cS,he(m.value),1),pt(" of "),H("span",uS,he(I.value),1),pt(" results ")])]),H("div",dS,[H("div",fS,[H("div",{class:ct(["paginationpicker-block",{"paginationpicker-disabled":j.value}]),onClick:D[0]||(D[0]=N=>y($(t).page.value-1))},hS,2),(T(!0),P(xe,null,St(E.value,(N,Y)=>(T(),P(xe,{key:Y},[N=="..."?(T(),P("div",vS,he(N),1)):ve("",!0),N!="..."&&N!=$(t).page.value?(T(),P("div",{key:1,class:"paginationpicker-block",onClick:X=>y(N)},he(N),9,mS)):ve("",!0),N==$(t).page.value?(T(),P("div",gS,he(N),1)):ve("",!0)],64))),128)),H("div",{class:ct(["paginationpicker-block",{"paginationpicker-disabled":M.value}]),onClick:D[1]||(D[1]=N=>y($(t).page.value+1))},_S,2)]),Mt(H("div",bS,[AS,H("input",{type:"text",value:$(t).page.value,onInput:g},null,40,wS)],512),[[an,h.value]])])],512))}}),kS=ye(SS,[["__scopeId","data-v-bc7a1a0a"]]),ES="A container component that repeats its child components based on a dictionary.",xS={a:{desc:"Option A"},b:{desc:"Option B"}},$S={writer:{name:"Repeater",description:ES,category:"Other",allowedChildrenTypes:["inherit"],fields:{repeaterObject:{name:"Repeater object",default:JSON.stringify(xS,null,2),type:L.Object,desc:"Include a state reference to the dictionary used for repeating the child components. Alternatively, specify a JSON object."},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=K(W.core),a=K(W.componentId),r=K(W.evaluatedFields),o=K(W.isBeingEdited),s=K(W.renderProxiedComponent),c=te(()=>n.getComponents(a,{sortedByPosition:!0})),u=()=>typeof r.repeaterObject.value!="object"?[]:Object.values(r.repeaterObject.value).map((h,d)=>c.value.map(m=>s(m.id,d)));return()=>{let f={};return c.value.length!=0&&r.repeaterObject.value!=null&&Object.keys(r.repeaterObject.value).length!=0?f=u():o.value===!0?f=t.default({}):f={},ha("div",{class:"CoreRepeater","data-writer-container":""},f)}}},MS=ye($S,[["__scopeId","data-v-b27fc9af"]]),NS="A component that emits an event repeatedly at specified time intervals, enabling time-based refresh.",OS=`
def handle_timer_tick(state):

	# Increment counter when the timer ticks

	state["counter"] += 1`.trim(),LS={writer:{name:"Timer",description:NS,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},isActive:{name:"Active",default:"yes",desc:"Whether the timer should trigger tick events.",type:L.Text,options:{yes:"Yes",no:"No"}},accentColor:Gt,cssClasses:Oe},events:{"wf-tick":{desc:"Emitted when the timer ticks.",stub:OS.trim()}}}},PS=me({...LS,__name:"CoreTimer",setup(e){const a=K(W.evaluatedFields),r=K(W.core),o=ee(null),s=te(()=>a.intervalMs.value),c=te(()=>a.isActive.value=="yes"),u=ee(!1),f=K(W.componentId),h=te(()=>{var E,j;return!!((j=(E=r.getComponentById(f))==null?void 0:E.handlers)!=null&&j["wf-tick"])}),d=te(()=>({"animation-duration":`${Math.max(s.value,1e3)}ms`}));Ne([c,s],()=>{b()}),Ne(h,async E=>{E&&(await Mn(),b())});let m=0,I=null;function A(){clearTimeout(I)}function b(){if(A(),!c.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 E=({ok:M})=>{u.value=!M,I=setTimeout(()=>{b()},s.value)},j=new CustomEvent("wf-tick",{detail:{callback:E}});o.value.dispatchEvent(j)}return Wt(()=>{b()}),(E,j)=>(T(),P("div",{ref_key:"rootEl",ref:o,class:ct(["CoreTimer",{failing:u.value}]),style:ht(d.value)},null,6))}}),RS=ye(PS,[["__scopeId","data-v-93971f17"]]),FS={class:"main"},DS={class:"actions"},VS=["value"],BS="A user input component that allows users to capture images using their webcam.",US=`
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(),HS={writer:{name:"Webcam Capture",description:BS,category:"Other",fields:{refreshRate:{name:"Refresh rate (ms)",init:"200",default:"200",desc:"Set to 0 for manual capture.",type:L.Number},buttonColor:Vn,buttonTextColor:Bn,buttonShadow:ga,separatorColor:Pt,cssClasses:Oe},events:{"wf-webcam":{desc:"Sent when a frame is captured. Its payload contains the captured frame in PNG format.",stub:US.trim()}}}},jS=me({...HS,__name:"CoreWebcamCapture",setup(e){const t=ee(!1),n=ee(null),a=document.createElement("canvas"),r=ee(null),o=K(W.evaluatedFields),s=ee(null),c=ee(null);Wt(async()=>{var b,E;s.value=await u(),c.value=(E=(b=s.value)==null?void 0:b[0])==null?void 0:E.deviceId}),Ka(()=>{A()});const u=async()=>(await navigator.mediaDevices.enumerateDevices()).filter(j=>j.kind=="videoinput"),f=te(()=>o.refreshRate.value);Ne(f,(b,E)=>{b>0&&E<=0&&m()}),Ne(c,async()=>{t.value&&(A(),await I())});const h=async()=>{if(t.value=!t.value,!t.value){A();return}await I(),m()},d=()=>(a.getContext("2d").drawImage(r.value,0,0),a.toDataURL("image/png")),m=()=>{const b=new CustomEvent("wf-webcam",{detail:{payload:d(),callback:()=>{f.value<=0||!t.value||setTimeout(()=>{m()},f.value)}}});n.value.dispatchEvent(b)},I=async()=>(r.value.style.display="",new Promise((b,E)=>{navigator.mediaDevices.getUserMedia||(console.error("This browser doesn't support webcam connection."),E());const j={video:!0};s.value.length>1&&(j.video={deviceId:c.value}),navigator.mediaDevices.getUserMedia(j).then(M=>{r.value.srcObject=M;const g=M.getVideoTracks()[0].getSettings().width,y=M.getVideoTracks()[0].getSettings().height;a.setAttribute("width",g.toString()),a.setAttribute("height",y.toString()),b()}).catch(M=>{console.error("An error occurred when trying to use the webcam.",M),E()})})),A=()=>{const b=r.value.srcObject;b&&b.getTracks().map(j=>j.stop()),r.value.srcObject=null,r.value.style.display="none"};return(b,E)=>{var j;return T(),P("div",{ref_key:"rootEl",ref:n,class:"CoreWebcamCapture"},[Mt(H("div",FS,[H("video",{ref_key:"videoEl",ref:r,autoplay:"true"},null,512)],512),[[an,t.value]]),H("div",DS,[f.value==0?(T(),De(os,{key:0,onClick:m},{default:Be(()=>[pt(" Capture image ")]),_:1})):ve("",!0),Fe(os,{onClick:h},{default:Be(()=>[pt(he(t.value?"Stop capture":"Start webcam capture"),1)]),_:1}),((j=s.value)==null?void 0:j.length)>1?(T(),De(gp,{key:1,modelValue:c.value,"onUpdate:modelValue":E[0]||(E[0]=M=>c.value=M)},{default:Be(()=>[(T(!0),P(xe,null,St(s.value,(M,g)=>(T(),P("option",{key:M.deviceId,value:M.deviceId},he(M.label||`Webcam ${g+1}`),9,VS))),128))]),_:1},8,["modelValue"])):ve("",!0)])],512)}}}),KS=ye(jS,[["__scopeId","data-v-9613302a"]]),zS={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."}}}},WS=me({...zS,__name:"CoreReuse",props:{contextSlot:{}},setup(e){const t=e,n=K(W.evaluatedFields),r=K(W.instancePath).at(-2).componentId,o=K(W.core),s=K(W.renderProxiedComponent),c=K(W.isBeingEdited),u=K(W.componentId),f=ee(ha("div","")),h=ee(!0),d=te(()=>{var g;return(g=o.getComponentById(n.proxyId.value))==null?void 0:g.type}),m=te(()=>{var g;return(g=o.getComponentById(r))==null?void 0:g.type}),I=te(()=>d.value?o.getComponentDefinition(d.value):null),A=te(()=>o.getComponentDefinition(m.value));function b(g,y){h.value=t.contextSlot==="default",f.value=ha("div",{class:["CoreReuse",y]},c.value?g:"")}function E(g){var y,C;return((y=A.value.allowedChildrenTypes)==null?void 0:y.includes(g))||((C=A.value.allowedChildrenTypes)==null?void 0:C.includes("*"))}function j(g){var y;return!I.value.allowedParentTypes||((y=I.value.allowedParentTypes)==null?void 0:y.includes(g))}function M(){if(!n.proxyId.value)return b("No component selected to reuse","empty");if(u===n.proxyId.value||!I.value)return b("The id specified for reuse doesn't match any component.","invalid-value");if(!E(d.value)||!j(m.value))return b("The component cannot be reused here.","invalid-context");h.value=t.contextSlot===(I.value.slot??"default");const g=s(n.proxyId.value,0,{class:["CoreReuse"]});f.value=g}return Ne([n.proxyId,I],M,{immediate:!0}),(g,y)=>h.value?(T(),De(hl(f.value),{key:0})):ve("",!0)}}),ya=e=>(Bt("data-v-1b10f19c"),e=e(),Ut(),e),GS={key:0,class:"controls"},YS=ya(()=>H("i",{class:"material-symbols-outlined"},"arrow_upward",-1)),JS=ya(()=>H("i",{class:"material-symbols-outlined"},"arrow_downward",-1)),QS=ya(()=>H("i",{class:"material-symbols-outlined"},"zoom_in",-1)),qS=ya(()=>H("i",{class:"material-symbols-outlined"},"zoom_out",-1)),XS=ya(()=>H("span",{class:"separator"},null,-1)),ZS=ya(()=>H("i",{class:"material-symbols-outlined"},"navigate_before",-1)),e2=ya(()=>H("i",{class:"material-symbols-outlined"},"navigate_next",-1)),t2={key:2},n2=["page"],a2=ya(()=>H("div",{class:"mask"},null,-1)),r2="A component to embed PDF documents.",o2={writer:{name:"PDF",description:r2,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},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:Dn,separatorColor:Pt,primaryTextColor:At,cssClasses:Oe}}},s2=me({...o2,__name:"CorePDF",setup(e){const t=K(W.evaluatedFields);let n,a,r;const o=te(()=>t.highlights.value?t.highlights.value.map(G=>G.replaceAll("|","\\|")).join("|"):""),s=ee({completeWords:!1,ignoreCase:!0}),c=ee(1),u=ee(1),f=ee([]),h=ee(0),d=ee(null),m=ee(null),I=ee(!1),A=ee(0),b=ee([]);Wt(async()=>{const G=await tn(()=>import("./index-YjEF0UEc.js"),[],import.meta.url);r=G.VuePDF;const fe=G.usePDF;({pdf:n,pages:a}=fe(t.source)),E()});const E=()=>{I.value=!0,A.value=0,b.value=[],f.value=[]},j=G=>{b.value=[...b.value,G].sort((fe,we)=>fe.page-we.page)},M=G=>{A.value++},g=()=>{f.value=b.value.reduce((G,fe)=>[...G,...fe.matches.map((we,re)=>({page:fe.page,str:we.str,index:re}))],[]).sort((G,fe)=>G.page===fe.page?G.index-fe.index:G.page-fe.page)},y=()=>{g(),h.value&&D(h.value),t.selectedMatch.value&&(h.value=t.selectedMatch.value)},C=G=>{const fe=G.target.getBoundingClientRect(),we=[...G.target.children].filter(re=>re.className.includes("page")).find(re=>{const oe=re.getBoundingClientRect(),ne=oe.y-fe.y;return ne<fe.height/2&&ne+oe.height>fe.height/2});we&&(u.value=Number(we.getAttribute("page")))},v=(G,fe)=>{let we=0,re=G;for(;re&&re!==fe;)we+=re.offsetTop,re=re.offsetParent;return we},D=G=>{if(G<1||G>f.value.length)return;const fe=f.value[G-1];if(!fe)return;const re=d.value.querySelectorAll(`div[page='${fe.page}'] span.highlight`)[fe.index];m.value.scrollTop=v(re,m.value)},N=G=>{if(G<1||G>a.value)return;const fe=d.value.querySelector("div[page='"+G+"']");m.value.scrollTop=v(fe,m.value)},Y=()=>{h.value<f.value.length?h.value=h.value+1:h.value=1},X=()=>{h.value>1?h.value=h.value-1:h.value=f.value.length},_e=()=>{c.value=c.value<2?c.value+.1:c.value},ie=()=>{c.value=c.value>.25?c.value-.1:c.value};return Ne(A,()=>{A.value===a.value&&t.page.value&&N(t.page.value)}),Ne([b,A],()=>{(!o.value||b.value.length===a.value)&&A.value===a.value&&(y(),I.value=!1)}),Ne(c,()=>{E()}),Ne(t.source,()=>{E()}),Ne(t.highlights,()=>{b.value=[],f.value=[]}),Ne(h,()=>{D(h.value)}),Ne(t.selectedMatch,()=>{h.value=t.selectedMatch.value}),Ne(t.page,()=>{N(t.page.value)}),(G,fe)=>(T(),P("div",{ref_key:"rootEl",ref:d,class:"CorePDF"},[$(t).controls.value==="yes"?(T(),P("div",GS,[Fe(xn,{onClick:fe[0]||(fe[0]=()=>N(u.value-1))},{default:Be(()=>[YS]),_:1}),Fe(xn,{onClick:fe[1]||(fe[1]=()=>N(u.value+1))},{default:Be(()=>[JS]),_:1}),(T(),P("span",{key:u.value},he(u.value)+" / "+he($(a)),1)),Fe(xn,{disabled:I.value,onClick:_e},{default:Be(()=>[QS]),_:1},8,["disabled"]),Fe(xn,{disabled:I.value,onClick:ie},{default:Be(()=>[qS]),_:1},8,["disabled"]),H("span",null,he(Math.round(c.value*100))+"%",1),XS,f.value.length?(T(),De(xn,{key:0,onClick:X},{default:Be(()=>[ZS]),_:1})):ve("",!0),f.value.length?(T(),De(xn,{key:1,onClick:Y},{default:Be(()=>[e2]),_:1})):ve("",!0),f.value.length?(T(),P("span",t2,"Matches "+he(h.value)+" / "+he(f.value.length),1)):ve("",!0)])):ve("",!0),H("div",{ref_key:"viewerEl",ref:m,class:"viewer",onScroll:C},[(T(!0),P(xe,null,St($(a),we=>(T(),P("div",{key:we,page:we,class:"page"},[Fe($(r),{scale:c.value,pdf:$(n),page:we,"text-layer":"","highlight-text":o.value,"highlight-options":s.value,onHighlight:fe[2]||(fe[2]=re=>j(re)),onLoaded:M},null,8,["scale","pdf","page","highlight-text","highlight-options"])],8,n2))),128))],544),a2],512))}}),i2=ye(s2,[["__scopeId","data-v-1b10f19c"]]),Ip=e=>(Bt("data-v-787cde05"),e=e(),Ut(),e),l2={key:0,class:"noURLProvided"},c2=Ip(()=>H("h2",null,"No URL provided.",-1)),u2=[c2],d2=["src"],f2=Ip(()=>H("div",{class:"mask"},null,-1)),p2="A component to embed an external resource in an iframe.",h2=`
def load_handler(state):

	# Sets status message when resource is loaded

	state["status"] = "Page loaded"`,v2={writer:{name:"IFrame",description:p2,category:"Embed",fields:{src:{name:"Source",default:"",desc:"A valid URL",type:L.Text},separatorColor:Pt,cssClasses:Oe},events:{"wf-load":{desc:"Fires when the resource has successfully loaded.",stub:h2.trim()}}}},m2=me({...v2,__name:"CoreIFrame",setup(e){const t=ee(null),n=K(W.evaluatedFields);function a(){const r=new CustomEvent("wf-load");t.value.dispatchEvent(r)}return(r,o)=>(T(),P("div",{ref_key:"rootEl",ref:t,class:"CoreIFrame"},[$(n).src.value?(T(),P("iframe",{key:1,src:$(n).src.value,draggable:"false",onLoad:a},null,40,d2)):(T(),P("div",l2,u2)),f2],512))}}),g2=ye(m2,[["__scopeId","data-v-787cde05"]]),Ll=e=>(Bt("data-v-4ca754c7"),e=e(),Ut(),e),y2={key:0,class:"noAPIKeyProvided"},_2=Ll(()=>H("h2",null,"Google Maps cannot be initialised.",-1)),b2=Ll(()=>H("h3",null,"An API key hasn't been provided.",-1)),A2=[_2,b2],w2=Ll(()=>H("div",{class:"mask"},null,-1)),C2="A component to embed a Google Map. It can be used to display a map with markers.",I2=[{lat:37.79322359164316,lng:-122.39999318828129,name:"Marker"}],T2={writer:{name:"Google Maps",description:C2,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},lng:{name:"Longitude",default:"-122.39999318828129",type:L.Number},markers:{name:"Markers",default:JSON.stringify(I2),desc:"Markers data",type:L.Object},cssClasses:Oe},events:{"gmap-marker-click":{desc:"Capture single clicks on markers."},"gmap-click":{desc:"Capture single click on map."}}}},S2=me({...T2,__name:"CoreGoogleMaps",setup(e){const t=ee(null),n=ee(null),a=K(W.evaluatedFields);let r=null,o=[];const s=te(()=>({lat:a.lat.value,lng:a.lng.value})),c=te(()=>["roadmap","satellite","hybrid","terrain"].includes(a.mapType.value)?a.mapType.value:"roadmap"),u=async()=>{h();const{Loader:d}=await tn(()=>import("./index-DMFOqlrb.js"),[],import.meta.url);await new d({apiKey:a.apiKey.value,version:"weekly"}).load(),r=new google.maps.Map(n.value,{center:s.value,mapTypeId:c.value,zoom:8,mapId:a.mapId.value}),r.addListener("click",I=>{const A=new CustomEvent("gmap-click",{detail:{payload:I.latLng.toJSON()}});t.value.dispatchEvent(A)}),f()},f=async()=>{if(!a.mapId.value||!a.markers.value)return;const{AdvancedMarkerElement:d}=await google.maps.importLibrary("marker");h(),a.markers.value.forEach(I=>{const A=new d({position:{lat:I.lat,lng:I.lng},map:r,title:I.name});o.push(A),A.addListener("click",()=>{const b=new CustomEvent("gmap-marker-click",{detail:{payload:I}});t.value.dispatchEvent(b)})})},h=()=>{o.forEach(d=>d.setMap(null)),o=[]};return Wt(async()=>{a.apiKey.value&&await u()}),Ne(s,async d=>{r&&r.setCenter(d)}),Ne(a.zoom,async d=>{r&&r.setZoom(d)}),Ne(c,async d=>{r&&r.setMapTypeId(d)}),Ne(a.markers,f),Ne(a.apiKey,u),Ne(a.mapId,u),(d,m)=>(T(),P("div",{ref_key:"rootEl",ref:t,class:"CoreGoogleMaps"},[$(a).apiKey.value?(T(),P("div",{key:1,ref_key:"mapEl",ref:n,class:"map"},null,512)):(T(),P("div",y2,A2)),w2],512))}}),k2=ye(S2,[["__scopeId","data-v-4ca754c7"]]),E2={class:"sidebarContainer"},x2=`
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
`,$2=`
def handle_page_open(state, payload):
	page_key = payload
	state["message"] = f"The page {page_key} has been opened."
`,M2="A container component representing a single page within the application.",N2={writer:{name:"Page",category:"Root",events:{"wf-keydown":{desc:"Captures all key activity while this page is open.",stub:x2},"wf-page-open":{desc:"Emitted when the page is opened.",stub:$2}},description:M2,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:Te.Style},accentColor:Gt,primaryTextColor:At,secondaryTextColor:fn,emptinessColor:Xf,containerBackgroundColor:Dn,containerShadow:br,separatorColor:Pt,buttonColor:Vn,buttonTextColor:Bn,buttonShadow:ga,cssClasses:Oe},previewField:"key"}},O2=me({...N2,__name:"CorePage",setup(e){const t=ee(null),n=K(W.evaluatedFields);function a(o){const s=I0(o);t.value.dispatchEvent(s)}function r(){const o=n.key.value,s=new CustomEvent("wf-page-open",{detail:{payload:o}});t.value.dispatchEvent(s)}return Wt(async()=>{document.addEventListener("keydown",a),r()}),za(()=>{document.removeEventListener("keydown",a)}),(o,s)=>(T(),P("div",{ref_key:"rootEl",ref:t,class:"CorePage"},[H("div",E2,[bt(o.$slots,"default",{slotName:"sidebar",positionlessSlot:!0},void 0,!0)]),H("div",{class:ct(["main",{compact:$(n).pageMode.value=="compact",wide:$(n).pageMode.value=="wide"}]),"data-writer-container":""},[bt(o.$slots,"default",{},void 0,!0)],2)],512))}}),L2=ye(O2,[["__scopeId","data-v-c4507808"]]),P2=`
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(),R2="The root component of the application, which serves as the starting point of the component hierarchy.",F2={writer:{name:"Root",category:"Root",description:R2,allowedChildrenTypes:["page"],fields:{appName:{name:"App name",type:L.Text,desc:"The app name will be shown in the browser's title bar."},...Ub},events:{"wf-hashchange":{desc:"Capture changes to the URL hash, including page key and route vars.",stub:P2}}}},D2=me({...F2,__name:"CoreRoot",setup(e){const t={},n=K(W.core),a=K(W.builderManager),r=K(W.getChildrenVNodes),o=ee(null),{isComponentVisible:s}=Es(n),c=()=>{const C=n.getComponents("root",{includeBMC:!0,includeCMC:!0,sortedByPosition:!0});if(C.length==0)return null;const v=C.filter(D=>s(D.id));return v.length==0?null:v[0].id},u=/^((?<pageKey>[^/]*))?(\/(?<routeVars>.*))?$/,f=/^(?<key>[^=]+)=(?<value>.*)$/,h=te(()=>n.getActivePageId()??c());Ne(h,C=>{var N;const D=(N=n.getComponentById(C).content)==null?void 0:N.key;a&&a.getSelectedId()!==C&&a.setSelection(null),Mn().then(()=>{window.scrollTo(0,0),document.querySelector(".ComponentRenderer").parentElement.scrollTo(0,0)}),I(D)});function d(){var X,_e;const v=(X=document.location.hash.substring(1).match(u))==null?void 0:X.groups;let D,N={};return v?(D=v!=null&&v.pageKey?decodeURIComponent(v.pageKey):void 0,(((_e=v.routeVars)==null?void 0:_e.split("&"))??[]).forEach(ie=>{var ne;const G=(ne=ie.match(f))==null?void 0:ne.groups;if(!G)return;const{key:fe,value:we}=G,re=decodeURIComponent(fe),oe=decodeURIComponent(we);N[re]=oe}),{pageKey:D,routeVars:N}):{pageKey:D,routeVars:N}}function m(C){const{pageKey:v,routeVars:D}=C;let N="";v&&(N+=`${encodeURIComponent(v)}`),Object.keys(D).length>0&&(N+="/",N+=Object.entries(D).map(([Y,X])=>X===null?null:`${encodeURIComponent(Y)}=${encodeURIComponent(X)}`).filter(Y=>Y).join("&")),document.location.hash=N}function I(C){const v=d();v.pageKey=C,m(v)}function A(C){const v=d(),D=(v==null?void 0:v.routeVars)??{};v.routeVars={...D,...C},m(v)}function b(){var D;const C=d(),v=new CustomEvent("wf-hashchange",{detail:{payload:C}});(D=o.value)==null||D.dispatchEvent(v),C.pageKey&&n.setActivePageFromKey(C.pageKey)}async function E(C,v){const D=document.querySelector(`[data-writer-stylesheet-key="${C}"]`);D==null||D.remove();const N=document.createElement("link");N.dataset.writerStylesheetKey=C,N.setAttribute("href",v),N.setAttribute("rel","stylesheet"),document.head.appendChild(N)}async function j(C,v){const D=document.querySelector(`[data-writer-script-key="${C}"]`);D==null||D.remove();const N=document.createElement("script");N.dataset.writerScriptKey=C,N.src=v,N.setAttribute("rel","modulepreload"),document.head.appendChild(N)}async function M(C,v){t[C]=v,await tn(()=>import(v),[],import.meta.url)}async function g(C,v,D){const N=t[C],Y=await tn(()=>import(N),[],import.meta.url);if(!Y){console.warn(`The module with key "${C}" cannot be found. Please check that it has been imported.`);return}Y[v](...D)}function y(){n.addMailSubscription("fileDownload",C=>{const v=document.createElement("a");v.href=C.data,v.download=C.fileName,v.click()}),n.addMailSubscription("openUrl",C=>{const v=document.createElement("a");v.href=C,v.target="_blank",v.rel="noopener noreferrer",v.click()}),n.addMailSubscription("pageChange",C=>{I(C)}),n.addMailSubscription("routeVarsChange",C=>{A(C)}),n.addMailSubscription("importStylesheet",({stylesheetKey:C,path:v})=>{E(C,v)}),n.addMailSubscription("importScript",({scriptKey:C,path:v})=>{j(C,v)}),n.addMailSubscription("importModule",({moduleKey:C,specifier:v})=>{M(C,v)}),n.addMailSubscription("functionCall",({moduleKey:C,functionName:v,args:D})=>{g(C,v,D)})}return yr(()=>{y(),window.addEventListener("hashchange",()=>{b()}),b()}),(C,v)=>(T(),P("div",{ref_key:"rootEl",ref:o,class:"CoreRoot","data-writer-container":""},[(T(!0),P(xe,null,St($(r)(),(D,N)=>(T(),P(xe,{key:N},[D.key===`${h.value}:0`?(T(),De(hl(D),{key:0})):ve("",!0)],64))),128))],512))}}),V2=ye(D2,[["__scopeId","data-v-f20c516c"]]),Pl=e=>(Bt("data-v-1debfb69"),e=e(),Ut(),e),B2={key:0,class:"noAccessTokenProvided"},U2=Pl(()=>H("h2",null,"MapBox cannot be initialised.",-1)),H2=Pl(()=>H("h3",null,"An access token hasn't been provided.",-1)),j2=[U2,H2],K2=Pl(()=>H("div",{class:"mask"},null,-1)),z2=[{lat:37.79322359164316,lng:-122.39999318828129,name:"Marker"}],W2={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},lng:{name:"Longitude",default:"-122.39999318828129",type:L.Number},markers:{name:"Markers",init:JSON.stringify(z2,null,2),desc:"",type:L.Object},controls:{name:"Controls visible",default:"yes",type:L.Text,options:{yes:"Yes",no:"No"},desc:"Show map controls"},cssClasses:Oe},events:{"mapbox-marker-click":{desc:"Capture single clicks on markers."},"mapbox-click":{desc:"Capture single click on map."}}}},G2=me({...W2,__name:"CoreMapbox",setup(e){const t=K(W.evaluatedFields),n=ee(null),a=ee(null),r=te(()=>[t.lng.value,t.lat.value]),o=ee(null);let s=[],c=null;const u=async()=>{if(!a.value||!t.accessToken.value)return;const h=await tn(()=>import("./mapbox-gl-DIelXBQ6.js").then(d=>d.m),[],import.meta.url);try{h.accessToken=t.accessToken.value,h.default&&(h.default.accessToken=t.accessToken.value),o.value=new h.Map({container:a.value,style:t.mapStyle.value,center:r.value,zoom:t.zoom.value}),o.value.on("click",d=>{const m=new CustomEvent("mapbox-click",{detail:{payload:{lat:d.lngLat.lat,lng:d.lngLat.lng}}});n.value.dispatchEvent(m)}),c=new h.NavigationControl,t.controls.value==="yes"&&o.value.addControl(c),t.markers.value&&o.value.on("load",f)}catch(d){console.error(d)}},f=async()=>{var d,m;if(!o.value)return;const h=await tn(()=>import("./mapbox-gl-DIelXBQ6.js").then(I=>I.m),[],import.meta.url);s.forEach(I=>I.remove()),s=[],(m=(d=t.markers)==null?void 0:d.value)==null||m.forEach(I=>{const A=new h.Marker().setLngLat([I.lng,I.lat]).addTo(o.value).setPopup(new h.Popup().setText(I.name));s.push(A),A.getElement().addEventListener("click",b=>{const E=new CustomEvent("mapbox-marker-click",{detail:{payload:I}});n.value.dispatchEvent(E),b.stopPropagation()})})};return Ne(t.controls,()=>{o.value&&(t.controls.value==="yes"?o.value.addControl(c):o.value.removeControl(c))}),Ne(t.markers,async()=>{o.value&&await f()}),Ne(t.mapStyle,()=>{o.value&&o.value.setStyle(t.mapStyle.value)}),Ne(r,()=>{var h,d;o.value&&((h=r.value)!=null&&h.lat)&&((d=r.value)!=null&&d.lng)&&o.value.setCenter(r.value)}),Ne(t.zoom,()=>{o.value&&t.zoom.value&&o.value.setZoom(t.zoom.value)}),Ne([a,t.accessToken],()=>{u()}),(h,d)=>(T(),P("div",{ref_key:"rootEl",ref:n,class:"CoreMapbox"},[$(t).accessToken.value?(T(),P("div",{key:1,ref_key:"mapEl",ref:a,class:"map"},null,512)):(T(),P("div",B2,j2)),K2],512))}}),Y2=ye(G2,[["__scopeId","data-v-1debfb69"]]),fr={root:V2,page:L2,sidebar:bT,button:tS,text:uA,section:iT,header:qI,heading:b0,dataframe:f0,html:Cp,pagination:kS,repeater:MS,column:UI,columns:zI,tab:TT,tabs:NT,link:TA,horizontalstack:tT,separator:hT,image:$0,pdf:i2,iframe:g2,googlemaps:k2,mapbox:Y2,icon:C0,timer:RS,textinput:GC,textareainput:XC,numberinput:_C,sliderinput:HC,colorinput:ww,dateinput:Ew,timeinput:rI,radioinput:kC,checkboxinput:pw,dropdowninput:Rw,selectinput:OC,multiselectinput:hC,fileinput:qw,webcamcapture:KS,vegalitechart:pA,plotlygraph:oA,metric:Z0,message:z0,videoplayer:bA,chatbot:s1,step:jT,steps:QT,ratinginput:vI,tags:_1,switchinput:II,reuse:WS,avatar:E1,annotatedtext:R1,jsonviewer:aw},Kr={};function J2(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:a}){return()=>ha("div",{"data-writer-container":"",style:{color:"var(--primaryTextColor)"}},[t,a.default({})])}}}function Q2(e){var a,r;const t=Kr[e];if(!t)return;const n=t.baseType;return{...fr[n],writer:{...fr[n].writer,...Kr[e].writer,fields:{...(a=fr[n].writer)==null?void 0:a.fields,...(r=Kr[e].writer)==null?void 0:r.fields}}}}function q2(e){return Q2(e)??fr[e]??J2(e)}function xs(e){var t;return(t=q2(e))==null?void 0:t.writer}function Rl(){return[...Object.keys(fr),...Object.keys(Kr)]}function X2(e,t){fr[e]=t}function Z2(e,t){Kr[e]=t}function ek(e,t){const{type:n}=e[t],o=Rl().map(c=>({type:c,definition:xs(c)})).filter(c=>c.definition.allowedParentTypes&&!c.definition.allowedParentTypes.includes(n));return new Set(o.map(c=>c.type))}function tk(e,t){const{type:n,parentId:a}=e[t],r=Rl().filter(c=>c!=="root"),{allowedChildrenTypes:o}=xs(n);if(!o)return new Set([]);let s=new Set(o);if(o.includes("*"))return new Set(r);if(s.delete("inherit")){if(!a)return s;const c=Tp(e,a);s=new Set([...s,...c])}return s}function Tp(e,t){const n=Array.from(tk(e,t)),a=Array.from(ek(e,t));return n.filter(o=>!a.includes(o))}function nk(e){let t=!1;return rk(e),Object.entries(e).forEach(([,n])=>{t=ik(n,e)||t,t=ak(n)||t}),t}function ak(e){const t=xs(e.type);if(!t||t.category=="Fallback")return console.error(`Component ${e.id} (${e.type}). Invalid component type.`),!1;let n=!1;return n=uk(e),n=ck(e)||n,ok(e,t),sk(e,t),n}function Sp(e,t,n={}){n[e]=!0,Object.entries(t).filter(([,a])=>a.parentId===e).forEach(([a])=>Sp(a,t,n))}function rk(e){const t=Object.fromEntries(Object.entries(e).map(([n])=>[n,!1]));Sp("root",e,t),Object.entries(t).forEach(([n,a])=>{a||console.warn(`Component ${n} (${e[n].type}). Orphan component.`)})}function ok(e,t){const n=Object.keys(t.fields??{});e.content&&Object.keys(e.content).forEach(a=>{n.includes(a)||console.warn(`Component ${e.id} (${e.type}). Field key "${a}" is defined in the component but not in the template.`)})}function sk(e,t){const n=Object.keys(t.events??{});if(!e.binding)return;const a=e.binding.eventType;n.includes(a)&&t.events[a].bindable||console.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 ik(e,t){let n=!1;e.id=="root"&&e.position!==0&&console.error("Root must be at position 0."),e.position==-1&&console.error(`Component ${e.id} (${e.type}). Invalid position.`);const a=Object.values(t).filter(s=>s.parentId===e.id&&s.position!==-2&&!s.isCodeManaged);let r=0;return a.forEach(s=>{r+=s.position}),(a.length-1)*a.length/2!==r&&(console.error(`Component ${e.id} (${e.type}). Invalid children positions. Automated fix will be applied.`),lk(a),n=!0),n}function lk(e){e.sort((t,n)=>t.position>n.position?1:-1),e.map((t,n)=>{t.position=n})}function ck(e){var n,a,r;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]}),(a=(n=e.binding)==null?void 0:n.eventType)!=null&&a.startsWith("ss-")){const s=`wf-${((r=e.binding)==null?void 0:r.eventType).substring(3)}`;e.binding.eventType=s,t=!0}return t}function uk(e,t){let n=!1;if(e.type=="column"){if("horizontalAlignment"in e.content){const a={left:"start",center:"center",right:"end"};e.content.contentHAlign=a[e.content.horizontalAlignment]||e.content.horizontalAlignment,delete e.content.horizontalAlignment,n=!0}if("verticalAlignment"in e.content){const a={normal:"unset",top:"start",center:"center",bottom:"end"};e.content.contentVAlign=a[e.content.verticalAlignment]||e.content.verticalAlignment,delete e.content.verticalAlignment,n=!0}}else if(e.type=="horizontalstack"){if("alignment"in e.content){const a={left:"start",center:"center",right:"end"};e.content.contentHAlign=a[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 dk(e){let t="";const n=[];let a=!1;for(let o=0;o<e.length;o++){const s=e[o];if(s==="."&&!a){n.push(t),t="";continue}t+=s,s==="\\"?a=!0:a=!1}return n.push(t),n.map(o=>o.replaceAll("\\.","."))}const fk="WriterCustomComponentTemplates";async function pk(e){await Promise.all(e.map(async t=>{const n=t.toLocaleLowerCase();n.endsWith(".js")?await hk(t):n.endsWith(".css")&&vk(t)}))}async function hk(e){var t;console.log(`Importing custom component templates at "${e}"...`),await tn(()=>import(kp()+e),[],import.meta.url),(t=Object.entries(window[fk]))==null||t.forEach(([n,a])=>{console.log(`Registering template for "${n}".`),X2(`custom_${n}`,a)})}function vk(e){const t=document.createElement("link");t.rel="stylesheet",t.href=kp()+e,document.head.appendChild(t)}function kp(){let e=window.location.pathname;return e.endsWith("/")||(e+="/"),`${e}extensions/`}const mk=1e3,gk=6e4;function yk(){let e=null;const t=ee(null),n=ee(null),a=il([]),r=ee(null),o=ee({}),s=ee([]),c=ee({});let u;const f=ee("idle");let h=0;const d=ee(new Map);let m=[];const I=[],A=ee(null);function b(){return d.value}function E(){return n.value}async function j(){await M(),_e("pageChange",w=>{ft(w)}),C(),n.value=="edit"}async function M(){const w=await fetch("./api/init",{method:"post",cache:"no-store",headers:{"Content-Type":"application/json"},body:JSON.stringify({proposedSessionId:e})}),R=await w.json();if(w.status>400)throw"Connection rejected.";R.extensionPaths&&await pk(R.extensionPaths),n.value=R.mode,o.value=R.components,c.value=R.userState,X(R.mail),e=R.sessionId,t.value=new Date().getTime(),a.value=R.featureFlags,g(R.abstractTemplates),s.value=R.userFunctions,r.value=R.runCode,await Y(),!(n.value!="edit"||!nk(R.components))&&await gt()}function g(w){Object.entries(w??{}).forEach(([R,V])=>{Z2(R,V)})}function y(){return t.value}function C(){setTimeout(()=>{be("keepAlive",{},C)},gk)}function v(w){w&&Object.entries(w).forEach(([R,V])=>{const z=R.charAt(0),J=dk(R.substring(1)),ae=J.length-1;let q=c.value;const ce=z==="-";for(let Z=0;Z<ae;Z++){const pe=q==null?void 0:q[J[Z]];typeof pe=="object"&&pe!==null?q=pe:ce||(q[J[Z]]={},q=q[J[Z]])}ce?delete q[J.at(-1)]:q[J.at(-1)]=V})}function D(w){w&&(o.value=w)}function N(){d.value.forEach(({callback:w})=>{w==null||w({ok:!1})}),d.value.clear()}async function Y(){if(u)return;const w=new URL("./api/stream",window.location.href);return w.protocol=w.protocol.replace("https","wss"),w.protocol=w.protocol.replace("http","ws"),u=new WebSocket(w.href),u.onopen=()=>{N(),f.value="connected",console.log("WebSocket connected. Initialising stream..."),be("streamInit",{sessionId:e})},u.onmessage=R=>{var J,ae,q,ce;const V=JSON.parse(R.data);if(V.messageType=="announcement"&&V.payload.announce=="codeUpdate"){u.close(),M();return}else(V.messageType=="eventResponse"||V.messageType=="stateEnquiryResponse")&&(v((J=V.payload)==null?void 0:J.mutations),X((ae=V.payload)==null?void 0:ae.mail),D((q=V.payload)==null?void 0:q.components));const z=d.value.get(V.trackingId);(ce=z==null?void 0:z.callback)==null||ce.call(z,{ok:!0,payload:V.payload}),d.value.delete(V.trackingId)},u.onclose=async R=>{if(u=null,f.value="offline",R.code==1008){console.error("Invalid session. Reinitialising..."),await M();return}console.error("WebSocket closed. Attempting to reconnect..."),setTimeout(async()=>{try{await Y()}catch{console.error("Couldn't reconnect.")}},mk)},new Promise((R,V)=>{u.addEventListener("open",()=>R(),{once:!0}),u.addEventListener("close",()=>V(),{once:!0})})}function X(w=[]){m.push(...w),m=m.filter(R=>{const V=I.filter(z=>z.mailType==R.type);if(V.length==0)return R;V.forEach(z=>z.fn(R.payload))})}function _e(w,R){I.push({mailType:w,fn:R}),X()}function ie(w){var V;let R=null;if(w instanceof CustomEvent)R=((V=w.detail)==null?void 0:V.payload)??null;else{const z={};for(const J in w){const ae=w[J];typeof ae!="function"&&(ae instanceof Object||(z[J]=ae))}R=z}return R}async function G(w,R,V){var q;const z=V?ie(w):null;let J;w instanceof CustomEvent&&(J=(q=w.detail)==null?void 0:q.callback),be("event",async()=>({type:w.type,instancePath:R,payload:await z}),J,!0)}async function fe(w){const R={code:w};return new Promise((V,z)=>{be("codeSaveRequest",R,ae=>{if(!ae.ok){z("Couldn't connect to the server.");return}V()}),f.value="suspended"})}async function we(w){const R={code:w};return new Promise((V,z)=>{be("codeUpdate",R,ae=>{if(!ae.ok){z("Couldn't connect to the server.");return}V()})})}async function re(w){be("stateEnquiry",{},w,!0)}function oe(){return r.value}function ne(w){const z=()=>{d.value.has(w)&&re(()=>setTimeout(z,150))};setTimeout(z,150)}async function be(w,R,V,z=!1){if(f.value=="offline"||f.value=="suspended"){V==null||V({ok:!1});return}const J=h++;try{(V||z)&&d.value.set(J,{callback:V}),z&&ne(J);let ae;typeof R=="function"?ae=await R():ae=R;const q={type:w,trackingId:J,payload:ae};if(u.readyState!==u.OPEN)throw"Connection lost.";u.send(JSON.stringify(q))}catch{V==null||V({ok:!1})}}function wt(w){delete o.value[w]}function He(w){o.value[w.id]=w}async function gt(){const w={};Object.entries(o.value).forEach(([V,z])=>{z.isCodeManaged||(w[V]=z)});const R={components:w};return new Promise((V,z)=>{be("componentUpdate",R,ae=>{if(!ae.ok){z("Couldn't connect to the server.");return}V()})})}function Ae(){return s.value}function Le(w){return o.value[w]}function nt(w,R){let V=o.value[R];do{if(V.parentId==w)return!0;V=o.value[V.parentId]}while(V);return!1}function Ue(w,{includeBMC:R=!0,includeCMC:V=!0,sortedByPosition:z=!1}={}){let J=Object.values(o.value);return typeof w<"u"&&(J=J.filter(ae=>ae.parentId==w)),J=J.filter(ae=>{const q=ae.isCodeManaged;return R&&!q||V&&q}),z&&(J=J.sort((ae,q)=>ae.isCodeManaged&&!q.isCodeManaged?1:!ae.isCodeManaged&&q.isCodeManaged?-1:ae.position>q.position?1:-1)),J}function ft(w){const V=Ue("root").filter(z=>z.content.key==w);V.length!=0&&Ct(V[0].id)}function rt(){return Ue("root").map(V=>V.content.key).filter(V=>!!V)}function Ct(w){A.value=w}function It(){return A.value}function Nt(w){return Tp(o.value,w)}function Cn(){return c.value}return{webSocket:u,syncHealth:f,getFrontendMessageMap:b,getMode:E,getUserFunctions:Ae,addMailSubscription:_e,init:j,forwardEvent:G,getRunCode:oe,sendCodeSaveRequest:fe,sendCodeUpdate:we,sendComponentUpdate:gt,addComponent:He,deleteComponent:wt,getComponentById:Le,getComponents:Ue,setActivePageId:Ct,getActivePageId:It,getPageKeys:rt,setActivePageFromKey:ft,getComponentDefinition:xs,getSupportedComponentTypes:Rl,getContainableTypes:Nt,getSessionTimestamp:y,getUserState:Cn,isChildOf:nt,featureFlags:fs(a)}}function _k(e){e.directive("capture-tabs",{mounted:t=>{t.addEventListener("keydown",n=>{n.key=="Tab"&&(n.preventDefault(),t.setRangeText("  ",t.selectionStart,t.selectionStart,"end"))})}})}const Dr=yk();globalThis.vue=fb;globalThis.injectionKeys=W;globalThis.core=Dr;async function bk(){await Dr.init();const e=Dr.getMode(),t=e=="edit"?Db():void 0;t&&Dr.addMailSubscription("logEntry",t.handleLogEntry),console.log(`Mounting app in mode ${e}...`);const{default:n}=e==="run"&&await tn(()=>import("./ComponentRenderer-Bya_Mm2H.js").then(o=>o.a),__vite__mapDeps([3,4]),import.meta.url),{default:a}=e==="edit"&&await tn(()=>import("./BuilderApp-DpwpzPgf.js").then(o=>o.B),__vite__mapDeps([5,6,3,4,7]),import.meta.url),r=jf(n||a);r.use(Pb),r.provide(W.core,Dr),r.provide(W.builderManager,t),_k(r),r.mount("#app")}console.log("Initialising Writer Framework core...");bk().then(async()=>{console.log("Core initialised.")}).catch(e=>{console.error("Core initialisation failed.",e),document.write(e)});export{os as $,Be as A,tn as B,Ak as C,Od as D,ma as E,xe as F,Sl as G,Mn as H,Wt as I,Ka as J,Ne as K,Zr as L,Es as M,Is as N,Te as O,L as P,za as Q,_l as R,oo as S,o_ as T,ht as U,$l as V,q2 as W,tf as X,ha as Y,ds as Z,ye as _,Vb as a,l1 as a0,wk as a1,yf as a2,il as a3,Vt as a4,Qe as a5,i1 as a6,W as b,te as c,me as d,P as e,H as f,Tp as g,pt as h,K as i,Ut as j,cl as k,De as l,ve as m,ct as n,T as o,Bt as p,bt as q,ee as r,St as s,he as t,$ as u,an as v,Mt as w,_r as x,cy as y,Fe as z};
